summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
Diffstat (limited to 'mac')
-rw-r--r--mac/AppleScript.html298
-rw-r--r--mac/Background.doc92
-rw-r--r--mac/MW_TclAppleScriptHeader.pch46
-rw-r--r--mac/MW_TclHeader.pch112
-rw-r--r--mac/README187
-rw-r--r--mac/bugs.doc32
-rw-r--r--mac/libmoto.doc39
-rw-r--r--mac/morefiles.doc74
-rw-r--r--mac/porting.notes23
-rw-r--r--mac/tclMac.h101
-rw-r--r--mac/tclMacAETE.r58
-rw-r--r--mac/tclMacAlloc.c340
-rw-r--r--mac/tclMacAppInit.c205
-rw-r--r--mac/tclMacApplication.r75
-rw-r--r--mac/tclMacBOAAppInit.c257
-rw-r--r--mac/tclMacBOAMain.c360
-rw-r--r--mac/tclMacChan.c1356
-rw-r--r--mac/tclMacDNR.c23
-rw-r--r--mac/tclMacEnv.c536
-rw-r--r--mac/tclMacExit.c317
-rw-r--r--mac/tclMacFCmd.c1408
-rw-r--r--mac/tclMacFile.c840
-rw-r--r--mac/tclMacInit.c284
-rw-r--r--mac/tclMacInt.h79
-rw-r--r--mac/tclMacInterupt.c289
-rw-r--r--mac/tclMacLibrary.c241
-rw-r--r--mac/tclMacLibrary.r223
-rw-r--r--mac/tclMacLoad.c245
-rw-r--r--mac/tclMacMSLPrefix.h24
-rw-r--r--mac/tclMacMath.h145
-rw-r--r--mac/tclMacNotify.c416
-rw-r--r--mac/tclMacOSA.c2937
-rw-r--r--mac/tclMacOSA.exp1
-rw-r--r--mac/tclMacOSA.r76
-rw-r--r--mac/tclMacPanic.c235
-rw-r--r--mac/tclMacPort.h263
-rw-r--r--mac/tclMacProjects.sit.hqx3157
-rw-r--r--mac/tclMacResource.c2165
-rw-r--r--mac/tclMacResource.r92
-rw-r--r--mac/tclMacShLib.exp1069
-rw-r--r--mac/tclMacSock.c2615
-rw-r--r--mac/tclMacTest.c242
-rw-r--r--mac/tclMacTime.c312
-rw-r--r--mac/tclMacUnix.c464
-rw-r--r--mac/tclMacUtil.c441
45 files changed, 22794 insertions, 0 deletions
diff --git a/mac/AppleScript.html b/mac/AppleScript.html
new file mode 100644
index 0000000..4a73fbb
--- /dev/null
+++ b/mac/AppleScript.html
@@ -0,0 +1,298 @@
+<HTML>
+
+<HEAD>
+
+<TITLE>tclOSAScript -- OSA</TITLE>
+
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#FF0000" ALINK="#00FF00">
+
+<H2 ALIGN="CENTER">TclAppleScript Extension Command</H2>
+
+<H3>NAME</H3>
+<DL>
+<DT>
+AppleScript - Communicate with the AppleScript OSA component to run
+ AppleScripts from Tcl.
+</DL>
+<H3>SYNOPSIS</H3>
+<DL><DT>
+<B>AppleScript <A NAME="compile">compile</A> </B><I>?-flag value?</I> <I>scriptData1
+ ?ScriptData2 ...?</I><I>componentName</I>
+<BR>
+<B>AppleScript <A NAME="decompile">decompile</A></B> <I>scriptName</I>
+<BR>
+<B>AppleScript delete </B><I>scriptName</I>
+<BR>
+<B>AppleScript <A NAME="execute">execute</A> </B><I>?flags value?</I> <I>scriptData1
+ ?scriptData2 ...?</I>
+<BR>
+<B>AppleScript <A NAME="info">info</A> </B><I>what</I>
+<BR>
+<B>AppleScript <A NAME="load">load</A></B> <I>?flag value? fileName</I>
+<BR>
+<B>AppleScript <A NAME="run">run</A></B> <I>?flag value?</I>
+ <I>scriptName</I>
+<BR>
+<B>AppleScript <A NAME="store">store</A></B> <I>?flag value? scriptName fileName</I>
+<BR>
+</DL>
+
+<H3>DESCRIPTION</H3>
+<DL>
+<DT>
+
+
+This command is used to communicate with the AppleScript OSA component.
+You can <A HREF="#compile"><B>compile</B></A> scripts, <A
+HREF="#run"><B>run</B></A> compiled scripts, <A
+HREF="#execute"><B>execute</B></A> script data (i.e. compile and run at a
+blow). You can get script data from a compiled script (<A
+HREF="#decompile"><B>decompile</B></A> it), and you can <A
+HREF="#load"><B>load</B></A> a compiled script from the scpt resource of a
+file, or <A HREF="store"><B>store</B></A> one to a scpt resource. You can
+also get <A HREF="#info"><B>info</B></A> on the currently available scripts
+and contexts. It has the general form
+
+<DL>
+<DT>
+<P>
+<I>AppleScript option ?arg arg ...?</I>
+<P>
+</DL>
+The possible sub-commands are:
+<P>
+<DL>
+ <DT>
+ <I>AppleScript</I> <A NAME="compile"><B>compile</A> </B><I>?-flag value?</I> <I>scriptData1
+ ?ScriptData2 ...?</I>
+ <BR>
+
+ <DD>
+ The scriptData
+ elements are concatenated (with a space between each), and
+ sent to AppleScript
+ for compilation. There is no limitation on the size of
+ the scriptData, beyond the available memory of the Wish interpreter.
+ <P>
+ If the compilation is successful, then the command will return a token
+ that you can pass to the <A HREF="#run">"run"</A> subcommand. If the
+ compilation fails, then the return value will be the error message from
+ AppleScript, and the pertinent line of code, with an "_" to indicate
+ the place where it thinks the error occured.
+ <P>
+ The
+ compilation is controlled by flag value pairs. The available flags
+ are:
+ <P>
+ <DL>
+ <DT>
+ <A NAME="first compile switch"><B>-augment Boolean</B></A>
+ <DD>
+ To be used in concert with the <A HREF="#-context">-context</A> flag.
+ If augment is yes,
+ then the scriptData augments the handlers and data already in the
+ script context. If augment is no, then the scriptData replaces the
+ data and handlers already in the context. The default is yes.
+ <P>
+ <!-- I'm leaving this flag out for now, since I can't seem to get the
+ AE manager to obey it. Even when I hard code the value, applications
+ still switch to the foreground. Oh, well...
+
+ <DT>
+ <B>-canswitch Boolean </B>
+ <DD>
+ If yes, then applications activated by the code in scriptData will
+ be allowed to switch to the foreground. If no, then they will use
+ the notification manager to indicate they need attention (this
+ usually means they blink the Finder icon, and put a check in the
+ application's entry in the Finder menu).
+ -->
+
+ <DT>
+ <B><A NAME="-context">-context</A> Boolean</B>
+ <DD>
+ This flag causes the code given in the scriptData to be compiled
+ into a "context". In AppleScript, this is the equivalent of creating an Tcl
+ Namespace. The command in this case returns the name of the context as
+ the its result, rather than a compiled script name.
+ <P>
+ You can store data and procedures (aka
+ handlers) in a script context. Then later, you can
+ run other scripts in this context, and they will see all the data and
+ handlers that were set up with this command. You do this by passing the
+ name of this context to the -context flag of the run or execute subcommands.
+ <P>
+ Unlike the straight compile command, the code compiled into a
+ script context is run immediatly, when it is compiled, to set up the context.
+ <DT>
+ <P>
+ <B>-name string</B>
+ <DD>
+ Use <I>string</I> as the name of the script or script context. If there is
+ already a script
+ of this name, it will be discarded. The same is true with script
+ contexts, unless the <I>-augment</I> flag is true. If no name is provided, then a
+ unique name will be created for you.
+ <DT>
+ <P>
+ <B>-parent contextName </B>
+ <DD>
+ This flag is also to be used in conjunction with the <A HREF="#-context">-context</A> flag.
+ <I>contextName</I> must be the name of a compiled script context. Then
+ the new script context will inherit the data and handlers from the
+ parent context.
+ </DL>
+ <P>
+ <DT>
+ <I>AppleScript</I> <B><A NAME="decompile">decompile</A></B> <I>scriptName</I>
+ <BR>
+ <DD>
+ This decompiles the script data compiled into the script scriptName,
+ and returns the source code.
+ <P>
+ <DT>
+ <I>AppleScript</I> <B>delete </B><I>scriptName</I>
+ <BR>
+ <DD>
+ This deletes the script data compiled into the script scriptName,
+ and frees up all the resources associated with it.
+ <P>
+ <DT>
+ <I>AppleScript</I> <B><A NAME="execute">execute</A> </B><I>?flags value?</I> <I>scriptData1
+ ?scriptData2 ...?</I>
+ <BR>
+ <DD>
+ This compiles and runs the script in scriptData (concatenating first), and
+ returns the results of the script execution. It is the same as doing
+ <I>compile</I> and then <I>run</I>, except that the compiled script is
+ immediately discarded.
+ <P>
+ <DT>
+ <I>AppleScript</I> <B><A NAME="info">info</A> </B><I>what</I>
+ <DD>
+ This gives info on the connection. The allowed values for "what" are:
+ <P>
+ <DL>
+ <DT>
+ <P>
+ <B>contexts </B> <I>?pattern?</I>
+ <DD>
+ This gives the list of the script contexts that have been.
+ If <I>pattern</I> is given, it only reports the contexts
+ that match this pattern.
+ <DT>
+ <!-- <P>
+ <B>language</B>
+ <DD>
+ Returns the language of this OSA component
+ <DT>
+ -->
+ <P>
+ <B>scripts</B> <I>?pattern?</I>
+ <DD>
+ This returns a list of the scripts that have been compiled in the
+ current connection. If <I>pattern</I> is given, it only reports the
+ script names that match this pattern.
+ </DL>
+ <P>
+ <DT>
+ <I>AppleScript</I> <B><A NAME="load">load</A></B> <I>?flag value? fileName</I>
+ <DD>
+ This loads compiled script data from a resource of type 'scpt' in the
+ file fileName, and returns a token for the script data. As with the
+ <I>compile</I> command, the script is not actually executed. Note that all
+ scripts compiled with Apple's "Script Editor" are stored as script
+ contexts. However, unlike with the "<I>compile -context</I>" command, the <I>load</I>
+ command does not run these scripts automatically. If you want to set up
+ the handlers contained in the loaded script, you must run it manually.
+ <P>
+ <I>load</I> takes the following flags:
+ <P>
+ <DL>
+ <DT>
+ <B>-rsrcname string</B>
+ <DD>
+ load a named resource of type 'scpt' using the rsrcname
+ flag.
+ <DT>
+ <P>
+ <B>-rsrcid integer</B>
+ <DD>
+ load a resource by number with the rsrcid flag.
+ </DL>
+ <DD>
+ <P>
+ If neither the <I>rsrcname</I> nor the <I>rsrcid</I> flag is provided, then the load
+ command defaults to -rsrcid = 128. This is the resource in which
+ Apple's Script Editor puts the script data when it writes out a
+ compiled script.
+ <P>
+ <DT>
+ <I>AppleScript</I> <B><A NAME="run">run</A></B> <I>?flag value?</I> <I>scriptName</I>
+ <DD>
+ This runs the script which was previously compiled into <I>scriptName</I>. If the script
+ runs successfully, the command returns the return value for this command,
+ coerced to a text string.
+ If there is an error in
+ the script execution, then it returns the error result from the
+ scripting component. It accepts the following flag:
+
+ <DL>
+ <DT>
+ <P>
+ <B>-context contextName</B>
+ <DD>
+ <I>contextName</I> must be a context created by a previous call to <I>compile</I> with
+ the -<I>context</I> flag set. This flag causes the code given in the
+ <I>scriptData</I> to be run in this "context". It will see all the data and
+ handlers that were set up previously.
+ <!-- <DT>
+ <B>-canswitch Boolean </B>
+ <DD>
+ If yes, then applications activated by the code
+ in scriptData will be allowed to switch to the foreground. If no, then
+ they will use the notification manager to indicate they need attention
+ (this usually means they blink the Finder icon, and put a check in the
+ application's entry in the Finder menu). -->
+ </DL>
+ <P>
+ <DT>
+ <I>AppleScript </I> <B> <A NAME="store">store</A></B> <I>?flag value? scriptName fileName</I>
+ <DD>
+ This stores a compiled script or script context into a resource of type 'scpt' in the
+ file fileName.
+ <P>
+ store takes the following flags:
+ <P>
+ <DL>
+ <DT>
+ <B>-rsrcname string</B>
+ <DD>
+ store to a named resource of type 'scpt' using the rsrcname
+ flag.
+ <DT>
+ <P>
+ <B>-rsrcid integer</B>
+ <DD>
+ store to a numbered resource with the rsrcid flag.
+ </DL>
+ <P>
+ <DD>
+ If neither the rsrcname nor the rsrcid flag is provided, then the load
+ command defaults to -rsrcid = 128. Apple's Script Editor can read in files written by
+ tclOSAScript with this setting of the <I>-rsrcid</I> flag.
+</DL>
+</DL>
+<H2>Notes:</H2>
+
+The AppleScript command is a stopgap command to fill the place of exec
+ on the Mac. It is not a supported command, and will likely change
+ as we broaden it to allow communication with other OSA languages.
+<H2>See Also:</H2>
+
+
+</BODY>
+
+</HTML>
diff --git a/mac/Background.doc b/mac/Background.doc
new file mode 100644
index 0000000..8c4409d
--- /dev/null
+++ b/mac/Background.doc
@@ -0,0 +1,92 @@
+Notes about the Background Only application template
+====================================================
+
+SCCS: @(#) Background.doc 1.1 97/11/03 17:05:54
+
+We have included sample code and project files for making a Background-Only
+ application (BOA) in Tcl. This could be used for server processes (like the
+Tcl Web-Server).
+
+Files:
+------
+
+* BOA_TclShells.¼ - This is the project file.
+* tclMacBOAAppInit.c - This is the AppInit file for the BOA App.
+* tclMacBOAMain - This is a replacement for the Tcl_Main for BOA's.
+
+Caveat:
+-------
+
+This is an unsupported addition to MacTcl. The main feature that will certainly
+change is how we handle AppleEvents. Currently, all the AppleEvent handling is
+done on the Tk side, which is not really right. Also, there is no way to
+register your own AppleEvent handlers, which is obviously something that would be
+useful in a BOA App. We will address these issues in Tcl8.1. If you need to
+register your own AppleEvent Handlers in the meantime, be aware that your code
+will probably break in Tcl8.1.
+
+I will also improve the basic code here based on feedback that I recieve. This
+is to be considered a first cut only at writing a BOA in Tcl.
+
+Introduction:
+-------------
+
+This project makes a double-clickable BOA application. It obviously needs
+some Tcl code to get it started. It will look for this code first in a
+'TEXT' resource in the application shell whose name is "bgScript.tcl". If
+it does not find any such resource, it will look for a file called
+bgScript.tcl in the application's folder. Otherwise it will quit with an
+error.
+
+It creates three files in the application folder to store stdin, stdout &
+stderr. They are imaginatively called temp.in, temp.out & temp.err. They
+will be opened append, so you do not need to erase them after each use of
+the BOA.
+
+The app does understand the "quit", and the "doScript" AppleEvents, so you can
+kill it with the former, and instruct it with the latter. It also has an
+aete, so you can target it with Apple's "Script Editor".
+
+For more information on Macintosh BOA's, see the Apple TechNote: 1070.
+
+Notifications:
+--------------
+
+BOA's are not supposed to have direct contact with the outside world. They
+are, however, allowed to go through the Notification Manager to post
+alerts. To this end, I have added a Tcl command called "bgnotify" to the
+shell, that simply posts a notification through the notification manager.
+
+To use it, say:
+
+bgnotify "Hi, there little buddy"
+
+It will make the system beep, and pop up an annoying message box with the
+text of the first argument to the command. While the message is up, Tcl
+is yielding processor time, but not processing any events.
+
+Errors:
+-------
+
+Usually a Tcl background application will have some startup code, opening
+up a server socket, or whatever, and at the end of this, will use the
+vwait command to kick off the event loop. If an error occurs in the
+startup code, it will kill the application, and a notification of the error
+will be posted through the Notification Manager.
+
+If an error occurs in the event handling code after the
+vwait, the error message will be written to the file temp.err. However,
+if you would like to have these errors post a notification as well, just
+define a proc called bgerror that takes one argument, the error message,
+and passes that off to "bgnotify", thusly:
+
+proc bgerror {mssg} {
+ bgnotify "A background error has occured\n $mssg"
+}
+
+Support:
+--------
+
+If you have any questions, contact me at:
+
+jim.ingham@eng.sun.com
diff --git a/mac/MW_TclAppleScriptHeader.pch b/mac/MW_TclAppleScriptHeader.pch
new file mode 100644
index 0000000..9575a8d
--- /dev/null
+++ b/mac/MW_TclAppleScriptHeader.pch
@@ -0,0 +1,46 @@
+/*
+ * MW_TclAppleScriptHeader.pch --
+ *
+ * This file is the source for a pre-compilied header that gets used
+ * for TclAppleScript. This make compilies go a bit
+ * faster. This file is only intended to be used in the MetroWerks
+ * CodeWarrior environment. It essentially acts as a place to set
+ * compiler flags. See MetroWerks documention for more details.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) MW_TclAppleScriptHeader.pch 1.1 97/09/09 16:38:07
+ */
+
+/*
+ * To use the compilied header you need to set the "Prefix file" in
+ * the "C/C++ Language" preference panel to point to the created
+ * compilied header. The name of the header depends on the
+ * architecture we are compiling for (see the code below). For
+ * example, for a 68k app the prefix file should be: MW_TclHeader68K.
+ */
+#if __POWERPC__
+#pragma precompile_target "MW_TclAppleScriptHeaderPPC"
+#include "MW_TclHeaderPPC"
+#elif __CFM68K__
+#pragma precompile_target "MW_TclAppleScriptHeaderCFM68K"
+#include "MW_TclHeaderCFM68K"
+#else
+#pragma precompile_target "MW_TclAppleScriptHeader68K"
+#include "MW_TclHeader68K"
+#endif
+
+
+#define TCL_REGISTER_LIBRARY 1
+/*
+ * Place any includes below that will are needed by the majority of the
+ * and is OK to be in any file in the system. The pragma's are used
+ * to control what functions are exported in the Tcl shared library.
+ */
+
+#pragma export on
+#pragma export off
+
diff --git a/mac/MW_TclHeader.pch b/mac/MW_TclHeader.pch
new file mode 100644
index 0000000..6a27544
--- /dev/null
+++ b/mac/MW_TclHeader.pch
@@ -0,0 +1,112 @@
+/*
+ * MW_TclHeader.pch --
+ *
+ * This file is the source for a pre-compilied header that gets used
+ * for all files in the Tcl projects. This make compilies go a bit
+ * faster. This file is only intended to be used in the MetroWerks
+ * CodeWarrior environment. It essentially acts as a place to set
+ * compiler flags. See MetroWerks documention for more details.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) MW_TclHeader.pch 1.27 97/11/20 18:45:25
+ */
+
+/*
+ * To use the compilied header you need to set the "Prefix file" in
+ * the "C/C++ Language" preference panel to point to the created
+ * compilied header. The name of the header depends on the
+ * architecture we are compiling for (see the code below). For
+ * example, for a 68k app the prefix file should be: MW_TclHeader68K.
+ */
+#if __POWERPC__
+#pragma precompile_target "MW_TclHeaderPPC"
+#elif __CFM68K__
+#pragma precompile_target "MW_TclHeaderCFM68K"
+#else
+#pragma precompile_target "MW_TclHeader68K"
+#endif
+
+/*
+ * Macintosh Tcl must be compiled with certain compiler options to
+ * ensure that it will work correctly. The following pragmas are
+ * used to ensure that those options are set correctly. An error
+ * will occur at compile time if they are not set correctly.
+ */
+
+#if !__option(enumsalwaysint)
+#error Tcl requires the Metrowerks setting "Enums always ints".
+#endif
+
+#if !defined(__POWERPC__)
+#if !__option(far_data)
+#error Tcl requires the Metrowerks setting "Far data".
+#endif
+#endif
+
+#if !defined(__POWERPC__)
+#if !__option(fourbyteints)
+#error Tcl requires the Metrowerks setting "4 byte ints".
+#endif
+#endif
+
+#if !defined(__POWERPC__)
+#if !__option(IEEEdoubles)
+#error Tcl requires the Metrowerks setting "8 byte doubles".
+#endif
+#endif
+
+/*
+ * The define is used most everywhere to tell Tcl (or any Tcl
+ * extensions) that we are compiling for the Macintosh platform.
+ */
+
+#define MAC_TCL
+
+/*
+ * The following defines control the behavior of the Macintosh
+ * Universial Headers.
+ */
+
+#define SystemSevenOrLater 1
+#define STRICT_CONTROLS 1
+#define STRICT_WINDOWS 1
+
+/*
+ * Define the following symbol if you want
+ * comprehensive debugging turned on.
+ */
+
+/* #define TCL_DEBUG */
+
+#ifdef TCL_DEBUG
+# define TCL_MEM_DEBUG
+# define TCL_TEST
+#endif
+
+
+/*
+ * For a while, we will continue to use the old routine names, so that
+ * people with older versions of CodeWarrior will still be able to compile
+ * the source (albeit they will have to update the project files themselves).
+ *
+ * At some point, we will convert over to the new routine names.
+ */
+
+#define OLDROUTINENAMES 1
+
+/*
+ * Place any includes below that will are needed by the majority of the
+ * and is OK to be in any file in the system. The pragma's are used
+ * to control what functions are exported in the Tcl shared library.
+ */
+
+#pragma export on
+#include "tcl.h"
+#include "tclMac.h"
+#include "tclInt.h"
+#pragma export off
+
diff --git a/mac/README b/mac/README
new file mode 100644
index 0000000..81cdac6
--- /dev/null
+++ b/mac/README
@@ -0,0 +1,187 @@
+Tcl 8.0p1 for Macintosh
+
+by Ray Johnson
+Sun Microsystems Laboratories
+rjohnson@eng.sun.com
+
+SCCS: @(#) README 1.30 97/11/20 22:01:16
+
+1. Introduction
+---------------
+
+This is the README file for the Macintosh version of the Tcl
+scripting language. The file consists of information specific
+to the Macintosh version of Tcl. For more general information
+please read the README file in the main Tcl directory.
+
+2. What's new?
+--------------
+
+The main new feature is the Tcl compilier. You should certainly
+notice the speed improvements. Any problems are probably
+generic rather than Mac specific. If you have questions or
+comments about the compilier feel free to forward them to the
+author of the compilier: Brian Lewis <btlewis@eng.sun.com>.
+Several things were fixed/changed since the a1 release so be
+sure to check this out.
+
+The largest incompatible change on the Mac is the removal of the
+following commands: "rm", "rmdir", "mkdir", "mv" and "cp". These
+commands were never really supported and their functionality is
+superceded by the file command.
+
+I've also added in a new "AppleScript" command. This was contributed
+by Jim Ingham who is a new member of the Tcl group. It's very cool.
+The command isn't actually in the core - you need to do a "package
+require Tclapplescript" to get access to it. This code is officially
+unsupported and will change in the next release. However, the core
+functionality is there and is stable enough to use. Documentation
+can be found in "AppleScript.html" in the mac subdirectory.
+
+The resource command has also been rewacked. You can now read and
+write any Mac resource. Tcl now has the new (and VERY COOL) binary
+command that will allow you to pack and unpack the resources into
+useful Tcl code. We will eventually provide Tcl libraries for
+accessing the most common resources.
+
+See the main Tcl README for other features new to Tcl 8.0.
+
+3. Mac specific features
+------------------------
+
+There are several features or enhancements in Tcl that are unique to
+the Macintosh version of Tcl. Here is a list of those features and
+pointers to where you can find more information about the feature.
+
+* The "resource" command allows you manipulate Macintosh resources.
+ A complete man page is available for this command.
+
+* The Mac version of the "source" command has an option to source from
+ a Macintosh resource. Check the man page from the source command
+ for details.
+
+* The only command NOT available on the Mac is the exec command.
+ However, we include a Mac only package called Tclapplescript that
+ provides access to Mac's AppleScript system. This command is still
+ under design & construction. Documentatin can be found in the mac
+ subdirectory in a file called "AppleScript.html".
+
+* The env variable on the Macintosh works rather differently than on
+ Windows or UNIX platforms. Check out the tclvars man page for
+ details.
+
+* The command "file volumes" returns the available volumes on your
+ Macintosh. Check out the file command for details.
+
+* The command "file attributes" has the Mac specific options of
+ -creator and -type which allow you to query and set the Macintosh
+ creator and type codes for Mac files. See file man page for details.
+
+* We have added a template for creating a Background-only Tcl application.
+ So you can use Tcl as a faceless server process. For more details, see
+ the file background.doc.
+
+If you are writing cross platform code but would still like to use
+some of these Mac specific commands, please remember to use the
+tcl_platform variable to special case your code.
+
+4. 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:
+
+mactk8.0.1.sea.hqx
+
+ This distribution is a "binary" only release. It contains an
+ installer program that will install a 68k, PowerPC, or Fat
+ version of the "Tcl Shell" and "Wish" applications. In addition,
+ it installs the Tcl & Tk libraries in the Extensions folder inside
+ your System Folder.
+
+mactcltk-full-8.0.1.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.0.1.sea.hqx
+
+ This release contains the complete source for Tcl 8.0. In
+ addition, Metrowerks CodeWarrior libraries and project files
+ are included. However, you must already have the More Files
+ package to compile this code.
+
+5. Documentation
+----------------
+
+The "html" subdirectory contains reference documentation in
+in the HTML format. You may also find these pages at:
+
+ http://sunscript.sun.com/man/tcl8.0/contents.html
+
+Other documentation and sample Tcl scripts can be found at
+the Tcl ftp site:
+
+ ftp://ftp.neosoft.com/tcl/
+
+The internet news group comp.lang.tcl is also a valuable
+source of information about Tcl. A mailing list is also
+available (see below).
+
+6. Compiling Tcl
+----------------
+
+In order to compile Macintosh Tcl you must have the
+following items:
+
+ CodeWarrior Pro 1
+ Mac Tcl 8.0 (source)
+ More Files 1.4.3
+
+There are two sets of project files included with the package. The ones
+we use for the release are for CodeWarrior Pro 1, and are not compatible
+with CodeWarrior Gold release 11 and earlier. We have included the files
+for earlier versions of CodeWarrior in the folder tcl8.0:mac:CW11 Projects,
+but they are unsupported, and a little out of date.
+
+As of Tcl8.0p2, the code will also build under CW Pro 2. The only
+change that needs to be made is that float.mac.c should be replaced by
+float.c in the MacTcl MSL project file.
+
+However, there seems to be a bug in the CFM68K Linker in CW Pro 2,
+which renders the CFM68K Version under CW Pro 2 very unstable. I am
+working with MetroWerks to resolve this issue. The PPC version is
+fine, as is the Traditional 68K Shell. But if you need to use the
+CFM68K, then you must stay with CW Pro 1 for now.
+
+The project files included with the Mac Tcl source should work
+fine. The only thing you may need to update are the access paths.
+Unfortunantly, it's somewhat common for the project files to become
+slightly corrupted. The most common problem is that the "Prefix file"
+found in the "C/C++ Preference" panel is incorrect. This should be
+set to MW_TclHeaderPPC, MW_TclHeader68K or MW_TclHeaderCFM68K.
+
+To build the fat version of TclShell, open the project file "TclShells.¼",
+select the "TclShell" target, and build. All of the associated binaries will
+be built automoatically. There are also targets for building static 68K
+and Power PC builds, for building a CFM 68K build, and for building a
+shared library Power PC only build.
+
+Special notes:
+
+* There is a small bug in More Files 1.4.3. Also you should not use
+ MoreFiles 1.4.4 - 1.4.6. Look in the file named morefiles.doc for
+ more details.
+
+* You may not have the libmoto library which will cause a compile
+ error. You don't REALLY need it - it can be removed. Look at the
+ file libmoto.doc for more details.
+
+* Check out the file bugs.doc for information about known bugs.
+
+If you have comments or Bug reports send them to:
+Jim Ingham
+jingham@eng.sun.com
+
diff --git a/mac/bugs.doc b/mac/bugs.doc
new file mode 100644
index 0000000..5f4d45e
--- /dev/null
+++ b/mac/bugs.doc
@@ -0,0 +1,32 @@
+Known bug list for Tcl 8.0 for Macintosh
+
+by Ray Johnson
+Sun Microsystems Laboratories
+rjohnson@eng.sun.com
+
+SCCS: @(#) bugs.doc 1.6 97/08/13 18:09:12
+
+This was a new feature as of Tcl7.6b1 and as such I'll started with
+a clean slate. I currently know of no reproducable bugs. I often
+get vague reports - but nothing I've been able to confirm. Let
+me know what bugs you find!
+
+The Macintosh version of Tcl passes most all tests in the Tcl
+test suite. Slower Macs may fail some tests in event.test whose
+timing constraints are too tight. If other tests fail please report
+them.
+
+Ray
+
+Known bugs in the current release.
+
+* With the socket code you can't use the "localhost" host name. This
+ is actually a known bug in Apple's MacTcp stack. However, you can
+ use [info hostname] whereever you would have used "localhost" to
+ achive the same effect.
+
+* Most socket bugs have been fixed. We do have a couple of test cases
+ that will hang the Mac, however, and we are still working on them.
+ If you find additional test cases that show crashes please let us
+ know!
+
diff --git a/mac/libmoto.doc b/mac/libmoto.doc
new file mode 100644
index 0000000..50b98e1
--- /dev/null
+++ b/mac/libmoto.doc
@@ -0,0 +1,39 @@
+Notes about the use of libmoto
+------------------------------
+
+@(#) libmoto.doc 1.1 96/07/17 14:29:48
+
+First of all, libmoto is not required! If you don't have it, you
+can simply remove the library reference from the project file and
+everything should compile just fine.
+
+The libmoto library replaces certain functions in the MathLib and
+ANSI libraries. Motorola has optimized the functions in the library
+to run very fast on the PowerPC. As I said above, you don't need
+this library, but it does make things faster.
+
+Obtaining Libmoto:
+
+ For more information about Libmoto and how to doanload
+ it, visit the following URL:
+
+ http://www.mot.com/SPS/PowerPC/library/fact_sheet/libmoto.html
+
+ You will need to register for the library. However, the
+ library is free and you can use it in any commercial product
+ you might have.
+
+Installing Libmoto:
+
+ Just follow the instructions provided by the Motorola
+ README file. You need to make sure that the Libmoto
+ library is before the ANSI and MathLib libraries in
+ link order. Also, you will get several warnings stateing
+ that certain functions have already been defined in
+ Libmoto. (These can safely be ignored.)
+
+Finally, you can thank Kate Stewart of Motorola for twisting my
+arm at the Tcl/Tk Conference to provide some support for Libmoto.
+
+Ray Johnson
+
diff --git a/mac/morefiles.doc b/mac/morefiles.doc
new file mode 100644
index 0000000..b7c7118
--- /dev/null
+++ b/mac/morefiles.doc
@@ -0,0 +1,74 @@
+Notes about MoreFiles, dnr.c & other non-Tcl source files
+---------------------------------------------------------
+
+@(#) morefiles.doc 1.4 97/08/13 12:57:08
+
+The Macintosh distribution uses several source files that don't
+actually ship with Tcl. This sometimes causes problems or confusion
+to developers. This document should help clear up a few things.
+
+dnr.c
+-----
+
+We have found a way to work around some bugs in dnr.c that
+Apple has never fixed even though we sent in numerous bug reports.
+The file tclMacDNR.c simply set's some #pragma's and the includes
+the Apple dnr.c file. This should work the problems that many of
+you have reported with dnr.c.
+
+More Files
+----------
+
+Macintosh Tcl/Tk also uses Jim Luther's very useful package called
+More Files. More Files fixes many of the broken or underfunctional
+parts of the file system.
+
+More Files can be found on the MetroWerks CD and Developer CD from
+Apple. You can also down load the latest version from:
+
+ ftp://members.aol.com/JumpLong/
+
+The package can also be found at the home of Tcl/Tk for the mac:
+
+ ftp://ftp.sunlabs.com/pub/tcl/mac/
+
+I used to just link the More Files library in the Tcl projects.
+However, this caused problems when libraries wern't matched correctly.
+I'm now including the files in the Tcl project directly. This
+solves the problem of missmatched libraries - but may not always
+compile.
+
+If you get a compiliation error in MoreFiles you need to contact
+Jim Luther. His email address:
+
+ JumpLong@aol.com
+
+The version of More Files that we use with Tcl/Tk is 1.4.3. Early
+version may work as well..
+
+Unfortunantly, there is one bug in his library (in 1.4.3). The bug is
+in the function FSpGetFullPath found in the file FullPath.c. After
+the call to PBGetCatInfoSync you need to change the line:
+
+ if ( result == noErr )
+
+ to:
+
+ if ( (result == noErr) || (result == fnfErr) )
+
+
+The latest version of More Files is 1.4.6. Unfortunantly, this
+version has a bug that keeps it from working with shared libraries
+right out of the box. If you want to use 1.4.6 you can but you will
+need to make the following fix:
+
+ In the file "Opimization.h" in the More Files package you
+ need to remove the line "#pragma internal on". And in the
+ file "OptimazationEnd.h" you need to remove the line
+ "#pragma internal reset".
+
+Note: the version of MoreFile downloaded from the Sun Tcl/Tk site
+will have the fix included. (If you want you can send email to
+Jim Luther suggesting that he use Tcl for regression testing!)
+
+Ray Johnson
diff --git a/mac/porting.notes b/mac/porting.notes
new file mode 100644
index 0000000..f1f36e5
--- /dev/null
+++ b/mac/porting.notes
@@ -0,0 +1,23 @@
+Porting Notes
+-------------
+
+@(#) porting.notes 1.5 96/07/31 14:59:28
+
+Currently, the Macintosh version Tcl only compilies with the
+CodeWarrior C compilier from MetroWerks. It should be straight
+forward to port the Tcl source to MPW.
+
+Tcl on the Mac no longer requires the use of GUSI. It should now
+be easier to port Tcl/Tk to other compiliers such as Symantic C
+and MPW C.
+
+If you attempt to port Tcl to other Macintosh compiliers please
+let me know. I would be glad to help with advice and encouragement.
+If your efforts are succesfull I wold also be interested in puting
+those changes into the core distribution. Furthermore, please feel
+free to send me any notes you might make about your porting
+experience so I may include them in this file for others to reference.
+
+Ray Johnson
+ray.johnson@eng.sun.com
+
diff --git a/mac/tclMac.h b/mac/tclMac.h
new file mode 100644
index 0000000..eec480c
--- /dev/null
+++ b/mac/tclMac.h
@@ -0,0 +1,101 @@
+/*
+ * tclMac.h --
+ *
+ * Declarations of Macintosh specific public variables and procedures.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMac.h 1.8 97/06/24 18:59:08
+ */
+
+#ifndef _TCLMAC
+#define _TCLMAC
+
+#ifndef _TCL
+# include "tcl.h"
+#endif
+#include <Types.h>
+#include <Files.h>
+#include <Events.h>
+
+/*
+ * "export" is a MetroWerks specific pragma. It flags the linker that
+ * any symbols that are defined when this pragma is on will be exported
+ * to shared libraries that link with this library.
+ */
+
+#pragma export on
+
+typedef int (*Tcl_MacConvertEventPtr) _ANSI_ARGS_((EventRecord *eventPtr));
+
+/*
+ * This is needed by the shells to handle Macintosh events.
+ */
+
+EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr));
+
+/*
+ * These routines are useful for handling using scripts from resources
+ * in the application shell
+ */
+
+EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_((Handle resource));
+EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp *interp,
+ char *resourceName, int resourceNumber, char *fileName));
+EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp *interp,
+ long resourceType, char *resourceName,
+ int resourceNumber, char *resFileRef, int * releaseIt));
+
+/* These routines support the new OSType object type (i.e. the packed 4
+ * character type and creator codes).
+ */
+
+EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *objPtr, OSType *osTypePtr));
+EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj *objPtr,
+ OSType osType));
+EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType));
+
+
+
+/*
+ * The following routines are utility functions in Tcl. They are exported
+ * here because they are needed in Tk. They are not officially supported,
+ * however. The first set are from the MoreFiles package.
+ */
+
+EXTERN pascal OSErr FSpGetDirectoryID(const FSSpec *spec,
+ long *theDirID, Boolean *isDirectory);
+EXTERN pascal short FSpOpenResFileCompat(const FSSpec *spec,
+ SignedByte permission);
+EXTERN pascal void FSpCreateResFileCompat(const FSSpec *spec,
+ OSType creator, OSType fileType,
+ ScriptCode scriptTag);
+/*
+ * Like the MoreFiles routines these fix problems in the standard
+ * Mac calls. These routines is from tclMacUtils.h.
+ */
+
+EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, char *path,
+ FSSpecPtr theSpec));
+EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec,
+ int *length, Handle *fullPath));
+
+/*
+ * These are not in MSL 2.1.2, so we need to export them from the
+ * Tcl shared library. They are found in the compat directory
+ * except the panic routine which is found in tclMacPanic.h.
+ */
+
+EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
+ CONST char *s2, size_t n));
+EXTERN int strcasecmp _ANSI_ARGS_((CONST char *s1,
+ CONST char *s2));
+EXTERN void panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
+
+#pragma export reset
+
+#endif /* _TCLMAC */
diff --git a/mac/tclMacAETE.r b/mac/tclMacAETE.r
new file mode 100644
index 0000000..17fb6fe
--- /dev/null
+++ b/mac/tclMacAETE.r
@@ -0,0 +1,58 @@
+/*
+ * tclMacAETE.r --
+ *
+ * This file creates the Apple Event Terminology resources
+ * for use Tcl and Tk. It is not used in the Simple Tcl shell
+ * since SIOUX does not support AppleEvents. An example of its
+ * use in Tcl is the TclBGOnly project. And it is used in all the
+ * Tk Shells.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacAETE.r 1.1 97/11/03 17:06:22
+ */
+
+#define SystemSevenOrLater 1
+
+#include <Types.r>
+#include <SysTypes.r>
+#include <AEUserTermTypes.r>
+
+/*
+ * The following resources defines the Apple Events that Tk can be
+ * sent from Apple Script.
+ */
+
+resource 'aete' (0, "Wish Suite") {
+ 0x01, 0x00, english, roman,
+ {
+ "Required Suite",
+ "Events that every application should support",
+ 'reqd', 1, 1,
+ {},
+ {},
+ {},
+ {},
+
+ "Wish Suite", "Events for the Wish application", 'WIsH', 1, 1,
+ {
+ "do script", "Execute a Tcl script", 'misc', 'dosc',
+ 'TEXT', "Result", replyOptional, singleItem,
+ notEnumerated, reserved, reserved, reserved, reserved,
+ reserved, reserved, reserved, reserved, reserved,
+ reserved, reserved, reserved, reserved,
+ 'TEXT', "Script to execute", directParamRequired,
+ singleItem, notEnumerated, changesState, reserved,
+ reserved, reserved, reserved, reserved, reserved,
+ reserved, reserved, reserved, reserved, reserved,
+ reserved,
+ {},
+ },
+ {},
+ {},
+ {},
+ }
+};
diff --git a/mac/tclMacAlloc.c b/mac/tclMacAlloc.c
new file mode 100644
index 0000000..59d1417
--- /dev/null
+++ b/mac/tclMacAlloc.c
@@ -0,0 +1,340 @@
+/*
+ * tclMacAlloc.c --
+ *
+ * This is a very fast storage allocator. It allocates blocks of a
+ * small number of different sizes, and keeps free lists of each size.
+ * Blocks that don't exactly fit are passed up to the next larger size.
+ * Blocks over a certain size are directly allocated by calling NewPtr.
+ *
+ * Copyright (c) 1983 Regents of the University of California.
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * Portions contributed by Chris Kingsley, Jack Jansen and Ray Johnson
+ *.
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacAlloc.c 1.13 97/07/24 14:42:19
+ */
+
+#include "tclMacInt.h"
+#include "tclInt.h"
+#include <Memory.h>
+#include <stdlib.h>
+#include <string.h>
+
+/*
+ * Flags that are used by ConfigureMemory to define how the allocator
+ * should work. They can be or'd together.
+ */
+#define MEMORY_ALL_SYS 1 /* All memory should come from the system
+heap. */
+
+/*
+ * Amount of space to leave in the application heap for the Toolbox to work.
+ */
+
+#define TOOLBOX_SPACE (32 * 1024)
+
+static int memoryFlags = 0;
+static Handle toolGuardHandle = NULL;
+ /* This handle must be around so that we don't
+ * have NewGWorld failures. This handle is
+ * purgeable. Before we allocate any blocks,
+ * we see if this handle is still around.
+ * If it is not, then we try to get it again.
+ * If we can get it, we lock it and try
+ * to do the normal allocation, unlocking on
+ * the way out. If we can't, we go to the
+ * system heap directly. */
+
+
+/*
+ * The following typedef and variable are used to keep track of memory
+ * blocks that are allocated directly from the System Heap. These chunks
+ * of memory must always be freed - even if we crash.
+ */
+
+typedef struct listEl {
+ Handle memoryHandle;
+ struct listEl * next;
+} ListEl;
+
+ListEl * systemMemory = NULL;
+ListEl * appMemory = NULL;
+
+/*
+ * Prototypes for functions used only in this file.
+ */
+
+static pascal void CleanUpExitProc _ANSI_ARGS_((void));
+void ConfigureMemory _ANSI_ARGS_((int flags));
+void FreeAllMemory _ANSI_ARGS_((void));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpSysRealloc --
+ *
+ * This function reallocates a chunk of system memory. If the
+ * chunk is already big enough to hold the new block, then no
+ * allocation happens.
+ *
+ * Results:
+ * Returns a pointer to the newly allocated block.
+ *
+ * Side effects:
+ * May copy the contents of the original block to the new block
+ * and deallocate the original block.
+ *
+ *----------------------------------------------------------------------
+ */
+
+VOID *
+TclpSysRealloc(
+ VOID *oldPtr, /* Original block */
+ unsigned int size) /* New size of block. */
+{
+ Handle hand;
+ void *newPtr;
+ int maxsize;
+
+ hand = * (Handle *) ((Ptr) oldPtr - sizeof(Handle));
+ maxsize = GetHandleSize(hand) - sizeof(Handle);
+ if (maxsize < size) {
+ newPtr = TclpSysAlloc(size, 1);
+ memcpy(newPtr, oldPtr, maxsize);
+ TclpSysFree(oldPtr);
+ } else {
+ newPtr = oldPtr;
+ }
+ return newPtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpSysAlloc --
+ *
+ * Allocate a new block of memory free from the System.
+ *
+ * Results:
+ * Returns a pointer to a new block of memory.
+ *
+ * Side effects:
+ * May obtain memory from app or sys space. Info is added to
+ * overhead lists etc.
+ *
+ *----------------------------------------------------------------------
+ */
+
+VOID *
+TclpSysAlloc(
+ long size, /* Size of block to allocate. */
+ int isBin) /* Is this a bin allocation? */
+{
+ Handle hand = NULL;
+ ListEl * newMemoryRecord;
+
+ if (!(memoryFlags & MEMORY_ALL_SYS)) {
+
+ /*
+ * If the guard handle has been purged, throw it away and try
+ * to allocate it again.
+ */
+
+ if ((toolGuardHandle != NULL) && (*toolGuardHandle == NULL)) {
+ DisposeHandle(toolGuardHandle);
+ toolGuardHandle = NULL;
+ }
+
+ /*
+ * If we have never allocated the guard handle, or it was purged
+ * and thrown away, then try to allocate it again.
+ */
+
+ if (toolGuardHandle == NULL) {
+ toolGuardHandle = NewHandle(TOOLBOX_SPACE);
+ if (toolGuardHandle != NULL) {
+ HPurge(toolGuardHandle);
+ }
+ }
+
+ /*
+ * If we got the handle, lock it and do our allocation.
+ */
+
+ if (toolGuardHandle != NULL) {
+ HLock(toolGuardHandle);
+ hand = NewHandle(size + sizeof(Handle));
+ HUnlock(toolGuardHandle);
+ }
+ }
+ if (hand != NULL) {
+ newMemoryRecord = (ListEl *) NewPtr(sizeof(ListEl));
+ if (newMemoryRecord == NULL) {
+ DisposeHandle(hand);
+ return NULL;
+ }
+ newMemoryRecord->memoryHandle = hand;
+ newMemoryRecord->next = appMemory;
+ appMemory = newMemoryRecord;
+ } else {
+ /*
+ * Ran out of memory in application space. Lets try to get
+ * more memory from system. Otherwise, we return NULL to
+ * denote failure.
+ */
+ isBin = 0;
+ hand = NewHandleSys(size + sizeof(Handle));
+ if (hand == NULL) {
+ return NULL;
+ }
+ if (systemMemory == NULL) {
+ /*
+ * This is the first time we've attempted to allocate memory
+ * directly from the system heap. We need to now install the
+ * exit handle to ensure the memory is cleaned up.
+ */
+ TclMacInstallExitToShellPatch(CleanUpExitProc);
+ }
+ newMemoryRecord = (ListEl *) NewPtrSys(sizeof(ListEl));
+ if (newMemoryRecord == NULL) {
+ DisposeHandle(hand);
+ return NULL;
+ }
+ newMemoryRecord->memoryHandle = hand;
+ newMemoryRecord->next = systemMemory;
+ systemMemory = newMemoryRecord;
+ }
+ if (isBin) {
+ HLockHi(hand);
+ } else {
+ HLock(hand);
+ }
+ (** (Handle **) hand) = hand;
+
+ return (*hand + sizeof(Handle));
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpSysFree --
+ *
+ * Free memory that we allocated back to the system.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Memory is freed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclpSysFree(
+ void * ptr) /* Free this system memory. */
+{
+ Handle hand;
+ OSErr err;
+
+ hand = * (Handle *) ((Ptr) ptr - sizeof(Handle));
+ DisposeHandle(hand);
+ err = MemError();
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CleanUpExitProc --
+ *
+ * This procedure is invoked as an exit handler when ExitToShell
+ * is called. It removes any memory that was allocated directly
+ * from the system heap. This must be called when the application
+ * quits or the memory will never be freed.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * May free memory in the system heap.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal void
+CleanUpExitProc()
+{
+ ListEl * memRecord;
+
+ while (systemMemory != NULL) {
+ memRecord = systemMemory;
+ systemMemory = memRecord->next;
+ DisposeHandle(memRecord->memoryHandle);
+ DisposePtr((void *) memRecord);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FreeAllMemory --
+ *
+ * This procedure frees all memory blocks allocated by the memory
+ * sub-system. Make sure you don't have any code that references
+ * any malloced data!
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Frees all memory allocated by TclpAlloc.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+FreeAllMemory()
+{
+ ListEl * memRecord;
+
+ while (systemMemory != NULL) {
+ memRecord = systemMemory;
+ systemMemory = memRecord->next;
+ DisposeHandle(memRecord->memoryHandle);
+ DisposePtr((void *) memRecord);
+ }
+ while (appMemory != NULL) {
+ memRecord = appMemory;
+ appMemory = memRecord->next;
+ DisposeHandle(memRecord->memoryHandle);
+ DisposePtr((void *) memRecord);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ConfigureMemory --
+ *
+ * This procedure sets certain flags in this file that control
+ * how memory is allocated and managed. This call must be made
+ * before any call to TclpAlloc is made.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Certain state will be changed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+ConfigureMemory(
+ int flags) /* Flags that control memory alloc scheme. */
+{
+ memoryFlags = flags;
+}
diff --git a/mac/tclMacAppInit.c b/mac/tclMacAppInit.c
new file mode 100644
index 0000000..8906270
--- /dev/null
+++ b/mac/tclMacAppInit.c
@@ -0,0 +1,205 @@
+/*
+ * tclMacAppInit.c --
+ *
+ * Provides a version of the Tcl_AppInit procedure for the example shell.
+ *
+ * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacAppInit.c 1.20 97/07/28 11:03:58
+ */
+
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMac.h"
+#include "tclMacInt.h"
+
+#if defined(THINK_C)
+# include <console.h>
+#elif defined(__MWERKS__)
+# include <SIOUX.h>
+short InstallConsole _ANSI_ARGS_((short fd));
+#endif
+
+#ifdef TCL_TEST
+EXTERN int TclObjTest_Init _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp));
+#endif /* TCL_TEST */
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+static int MacintoshInit _ANSI_ARGS_((void));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * main --
+ *
+ * Main program for tclsh. This file can be used as a prototype
+ * for other applications using the Tcl library.
+ *
+ * Results:
+ * None. This procedure never returns (it exits the process when
+ * it's done.
+ *
+ * Side effects:
+ * This procedure initializes the Macintosh world and then
+ * calls Tcl_Main. Tcl_Main will never return except to exit.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+main(
+ int argc, /* Number of arguments. */
+ char **argv) /* Array of argument strings. */
+{
+ char *newArgv[2];
+
+ if (MacintoshInit() != TCL_OK) {
+ Tcl_Exit(1);
+ }
+
+ argc = 1;
+ newArgv[0] = "tclsh";
+ newArgv[1] = NULL;
+ Tcl_Main(argc, newArgv, Tcl_AppInit);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_AppInit --
+ *
+ * This procedure performs application-specific initialization.
+ * Most applications, especially those that incorporate additional
+ * packages, will have their own version of this procedure.
+ *
+ * Results:
+ * Returns a standard Tcl completion code, and leaves an error
+ * message in interp->result if an error occurs.
+ *
+ * Side effects:
+ * Depends on the startup script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_AppInit(
+ Tcl_Interp *interp) /* Interpreter for application. */
+{
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+
+#ifdef TCL_TEST
+ if (Tcltest_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init,
+ (Tcl_PackageInitProc *) NULL);
+ if (TclObjTest_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+#endif /* TCL_TEST */
+
+ /*
+ * Call the init procedures for included packages. Each call should
+ * look like this:
+ *
+ * if (Mod_Init(interp) == TCL_ERROR) {
+ * return TCL_ERROR;
+ * }
+ *
+ * where "Mod" is the name of the module.
+ */
+
+ /*
+ * Call Tcl_CreateCommand for application-specific commands, if
+ * they weren't already created by the init procedures called above.
+ * Each call would loo like this:
+ *
+ * Tcl_CreateCommand(interp, "tclName", CFuncCmd, NULL, NULL);
+ */
+
+ /*
+ * Specify a user-specific startup script to invoke if the application
+ * is run interactively. On the Mac we can specifiy either a TEXT resource
+ * which contains the script or the more UNIX like file location
+ * may also used. (I highly recommend using the resource method.)
+ */
+
+ Tcl_SetVar(interp, "tcl_rcRsrcName", "tclshrc", TCL_GLOBAL_ONLY);
+ /* Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY); */
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * MacintoshInit --
+ *
+ * This procedure calls initalization routines to set up a simple
+ * console on a Macintosh. This is necessary as the Mac doesn't
+ * have a stdout & stderr by default.
+ *
+ * Results:
+ * Returns TCL_OK if everything went fine. If it didn't the
+ * application should probably fail.
+ *
+ * Side effects:
+ * Inits the appropiate console package.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+MacintoshInit()
+{
+#if GENERATING68K && !GENERATINGCFM
+ SetApplLimit(GetApplLimit() - (TCL_MAC_68K_STACK_GROWTH));
+#endif
+ MaxApplZone();
+
+#if defined(THINK_C)
+
+ /* Set options for Think C console package */
+ /* The console package calls the Mac init calls */
+ console_options.pause_atexit = 0;
+ console_options.title = "\pTcl Interpreter";
+
+#elif defined(__MWERKS__)
+
+ /* Set options for CodeWarrior SIOUX package */
+ SIOUXSettings.autocloseonquit = true;
+ SIOUXSettings.showstatusline = true;
+ SIOUXSettings.asktosaveonclose = false;
+ InstallConsole(0);
+ SIOUXSetTitle("\pTcl Interpreter");
+
+#elif defined(applec)
+
+ /* Init packages used by MPW SIOW package */
+ InitGraf((Ptr)&qd.thePort);
+ InitFonts();
+ InitWindows();
+ InitMenus();
+ TEInit();
+ InitDialogs(nil);
+ InitCursor();
+
+#endif
+
+ Tcl_MacSetEventProc((Tcl_MacConvertEventPtr) SIOUXHandleOneEvent);
+
+ /* No problems with initialization */
+ return TCL_OK;
+}
diff --git a/mac/tclMacApplication.r b/mac/tclMacApplication.r
new file mode 100644
index 0000000..90d3456
--- /dev/null
+++ b/mac/tclMacApplication.r
@@ -0,0 +1,75 @@
+/*
+ * tclMacApplication.r --
+ *
+ * This file creates resources for use Tcl Shell application.
+ * It should be viewed as an example of how to create a new
+ * Tcl application using the shared Tcl libraries.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacApplication.r 1.2 97/06/20 11:27:07
+ */
+
+#include <Types.r>
+#include <SysTypes.r>
+
+/*
+ * The folowing include and defines help construct
+ * the version string for Tcl.
+ */
+
+#define RESOURCE_INCLUDED
+#include "tcl.h"
+
+#if (TCL_RELEASE_LEVEL == 0)
+# define RELEASE_LEVEL alpha
+#elif (TCL_RELEASE_LEVEL == 1)
+# define RELEASE_LEVEL beta
+#elif (TCL_RELEASE_LEVEL == 2)
+# define RELEASE_LEVEL final
+#endif
+
+#if (TCL_RELEASE_LEVEL == 2)
+# define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
+#else
+# define MINOR_VERSION TCL_MINOR_VERSION * 16
+#endif
+
+resource 'vers' (1) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
+};
+
+resource 'vers' (2) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ "Tcl Shell " TCL_PATCH_LEVEL " © 1996"
+};
+
+#define TCL_APP_CREATOR 'Tcl '
+
+type TCL_APP_CREATOR as 'STR ';
+resource TCL_APP_CREATOR (0, purgeable) {
+ "Tcl Shell " TCL_PATCH_LEVEL " © 1996"
+};
+
+/*
+ * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open
+ * to affect the text the Finder displays in the "kind" column and
+ * file info dialog. This information will be applied to all files
+ * with the listed creator and type.
+ */
+
+resource 'kind' (128, "Tcl kind", purgeable) {
+ TCL_APP_CREATOR,
+ 0, /* region = USA */
+ {
+ 'APPL', "Tcl Shell",
+ }
+};
diff --git a/mac/tclMacBOAAppInit.c b/mac/tclMacBOAAppInit.c
new file mode 100644
index 0000000..db9890b
--- /dev/null
+++ b/mac/tclMacBOAAppInit.c
@@ -0,0 +1,257 @@
+/*
+ * tclMacBOAAppInit.c --
+ *
+ * Provides a version of the Tcl_AppInit procedure for a
+ * Macintosh Background Only Application.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacBOAAppInit.c 1.1 97/11/03 17:06:21
+ */
+
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMac.h"
+#include "tclMacInt.h"
+#include <Fonts.h>
+#include <Windows.h>
+#include <Dialogs.h>
+#include <Menus.h>
+#include <Aliases.h>
+#include <LowMem.h>
+
+#include <AppleEvents.h>
+#include <SegLoad.h>
+#include <ToolUtils.h>
+
+#if defined(THINK_C)
+# include <console.h>
+#elif defined(__MWERKS__)
+# include <SIOUX.h>
+short InstallConsole _ANSI_ARGS_((short fd));
+#endif
+
+void TkMacInitAppleEvents(Tcl_Interp *interp);
+int HandleHighLevelEvents(EventRecord *eventPtr);
+
+#ifdef TCL_TEST
+EXTERN int TclObjTest_Init _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp));
+#endif /* TCL_TEST */
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+static int MacintoshInit _ANSI_ARGS_((void));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * main --
+ *
+ * Main program for tclsh. This file can be used as a prototype
+ * for other applications using the Tcl library.
+ *
+ * Results:
+ * None. This procedure never returns (it exits the process when
+ * it's done.
+ *
+ * Side effects:
+ * This procedure initializes the Macintosh world and then
+ * calls Tcl_Main. Tcl_Main will never return except to exit.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+main(
+ int argc, /* Number of arguments. */
+ char **argv) /* Array of argument strings. */
+{
+ char *newArgv[3];
+
+ if (MacintoshInit() != TCL_OK) {
+ Tcl_Exit(1);
+ }
+
+ argc = 2;
+ newArgv[0] = "tclsh";
+ newArgv[1] = "bgScript.tcl";
+ newArgv[2] = NULL;
+ Tcl_Main(argc, newArgv, Tcl_AppInit);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_AppInit --
+ *
+ * This procedure performs application-specific initialization.
+ * Most applications, especially those that incorporate additional
+ * packages, will have their own version of this procedure.
+ *
+ * Results:
+ * Returns a standard Tcl completion code, and leaves an error
+ * message in interp->result if an error occurs.
+ *
+ * Side effects:
+ * Depends on the startup script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_AppInit(
+ Tcl_Interp *interp) /* Interpreter for application. */
+{
+ Tcl_Channel tempChan;
+
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+
+#ifdef TCL_TEST
+ if (Tcltest_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init,
+ (Tcl_PackageInitProc *) NULL);
+ if (TclObjTest_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+#endif /* TCL_TEST */
+
+ /*
+ * Call the init procedures for included packages. Each call should
+ * look like this:
+ *
+ * if (Mod_Init(interp) == TCL_ERROR) {
+ * return TCL_ERROR;
+ * }
+ *
+ * where "Mod" is the name of the module.
+ */
+
+ /*
+ * Call Tcl_CreateCommand for application-specific commands, if
+ * they weren't already created by the init procedures called above.
+ * Each call would loo like this:
+ *
+ * Tcl_CreateCommand(interp, "tclName", CFuncCmd, NULL, NULL);
+ */
+
+ /*
+ * Specify a user-specific startup script to invoke if the application
+ * is run interactively. On the Mac we can specifiy either a TEXT resource
+ * which contains the script or the more UNIX like file location
+ * may also used. (I highly recommend using the resource method.)
+ */
+
+ Tcl_SetVar(interp, "tcl_rcRsrcName", "tclshrc", TCL_GLOBAL_ONLY);
+
+ /* Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclshrc", TCL_GLOBAL_ONLY); */
+
+ /*
+ * We have to support at least the quit Apple Event.
+ */
+
+ TkMacInitAppleEvents(interp);
+
+ /*
+ * Open a file channel to put stderr, stdin, stdout...
+ */
+
+ tempChan = Tcl_OpenFileChannel(interp, ":temp.in", "a+", 0);
+ Tcl_SetStdChannel(tempChan,TCL_STDIN);
+ Tcl_RegisterChannel(interp, tempChan);
+ Tcl_SetChannelOption(NULL, tempChan, "-translation", "cr");
+ Tcl_SetChannelOption(NULL, tempChan, "-buffering", "line");
+
+ tempChan = Tcl_OpenFileChannel(interp, ":temp.out", "a+", 0);
+ Tcl_SetStdChannel(tempChan,TCL_STDOUT);
+ Tcl_RegisterChannel(interp, tempChan);
+ Tcl_SetChannelOption(NULL, tempChan, "-translation", "cr");
+ Tcl_SetChannelOption(NULL, tempChan, "-buffering", "line");
+
+ tempChan = Tcl_OpenFileChannel(interp, ":temp.err", "a+", 0);
+ Tcl_SetStdChannel(tempChan,TCL_STDERR);
+ Tcl_RegisterChannel(interp, tempChan);
+ Tcl_SetChannelOption(NULL, tempChan, "-translation", "cr");
+ Tcl_SetChannelOption(NULL, tempChan, "-buffering", "none");
+
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * MacintoshInit --
+ *
+ * This procedure calls initalization routines to set up a simple
+ * console on a Macintosh. This is necessary as the Mac doesn't
+ * have a stdout & stderr by default.
+ *
+ * Results:
+ * Returns TCL_OK if everything went fine. If it didn't the
+ * application should probably fail.
+ *
+ * Side effects:
+ * Inits the appropiate console package.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+MacintoshInit()
+{
+ THz theZone = GetZone();
+ SysEnvRec sys;
+
+
+ /*
+ * There is a bug in systems earlier that 7.5.5, where a second BOA will
+ * get a corrupted heap. This is the fix from TechNote 1070
+ */
+
+ SysEnvirons(1, &sys);
+
+ if (sys.systemVersion < 0x0755)
+ {
+ if ( LMGetHeapEnd() != theZone->bkLim) {
+ LMSetHeapEnd(theZone->bkLim);
+ }
+ }
+
+#if GENERATING68K && !GENERATINGCFM
+ SetApplLimit(GetApplLimit() - (TCL_MAC_68K_STACK_GROWTH));
+#endif
+ MaxApplZone();
+
+ InitGraf((Ptr)&qd.thePort);
+
+ /* No problems with initialization */
+ Tcl_MacSetEventProc(HandleHighLevelEvents);
+
+ return TCL_OK;
+}
+
+int
+HandleHighLevelEvents(
+ EventRecord *eventPtr)
+{
+ int eventFound = false;
+
+ if (eventPtr->what == kHighLevelEvent) {
+ AEProcessAppleEvent(eventPtr);
+ eventFound = true;
+ } else if (eventPtr->what == nullEvent) {
+ eventFound = true;
+ }
+ return eventFound;
+}
diff --git a/mac/tclMacBOAMain.c b/mac/tclMacBOAMain.c
new file mode 100644
index 0000000..76689de
--- /dev/null
+++ b/mac/tclMacBOAMain.c
@@ -0,0 +1,360 @@
+/*
+ * tclMacBGMain.c --
+ *
+ * Main program for Macintosh Background Only Application shells.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacBOAMain.c 1.1 97/11/03 17:06:22
+ */
+
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include <Resources.h>
+#include <Notification.h>
+#include <Strings.h>
+
+/*
+ * This variable is used to get out of the modal loop of the
+ * notification manager.
+ */
+
+int NotificationIsDone = 0;
+
+/*
+ * The following code ensures that tclLink.c is linked whenever
+ * Tcl is linked. Without this code there's no reference to the
+ * code in that file from anywhere in Tcl, so it may not be
+ * linked into the application.
+ */
+
+EXTERN int Tcl_LinkVar();
+int (*tclDummyLinkVarPtr)() = Tcl_LinkVar;
+
+/*
+ * Declarations for various library procedures and variables (don't want
+ * to include tclPort.h here, because people might copy this file out of
+ * the Tcl source directory to make their own modified versions).
+ * Note: "exit" should really be declared here, but there's no way to
+ * declare it without causing conflicts with other definitions elsewher
+ * on some systems, so it's better just to leave it out.
+ */
+
+extern int isatty _ANSI_ARGS_((int fd));
+extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src));
+
+static Tcl_Interp *interp; /* Interpreter for application. */
+
+#ifdef TCL_MEM_DEBUG
+static char dumpFile[100]; /* Records where to dump memory allocation
+ * information. */
+static int quitFlag = 0; /* 1 means "checkmem" command was called,
+ * so the application should quit and dump
+ * memory allocation information. */
+#endif
+
+/*
+ * Forward references for procedures defined later in this file:
+ */
+
+#ifdef TCL_MEM_DEBUG
+static int CheckmemCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, char *argv[]));
+#endif
+void TclMacDoNotification(char *mssg);
+void TclMacNotificationResponse(NMRecPtr nmRec);
+int Tcl_MacBGNotifyObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv);
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_Main --
+ *
+ * Main program for tclsh and most other Tcl-based applications.
+ *
+ * Results:
+ * None. This procedure never returns (it exits the process when
+ * it's done.
+ *
+ * Side effects:
+ * This procedure initializes the Tk world and then starts
+ * interpreting commands; almost anything could happen, depending
+ * on the script being interpreted.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_Main(argc, argv, appInitProc)
+ int argc; /* Number of arguments. */
+ char **argv; /* Array of argument strings. */
+ Tcl_AppInitProc *appInitProc;
+ /* Application-specific initialization
+ * procedure to call after most
+ * initialization but before starting to
+ * execute commands. */
+{
+ Tcl_Obj *prompt1NamePtr = NULL;
+ Tcl_Obj *prompt2NamePtr = NULL;
+ Tcl_Obj *commandPtr = NULL;
+ char buffer[1000], *args, *fileName;
+ int code, tty;
+ int exitCode = 0;
+
+ Tcl_FindExecutable(argv[0]);
+ interp = Tcl_CreateInterp();
+#ifdef TCL_MEM_DEBUG
+ Tcl_InitMemory(interp);
+ Tcl_CreateCommand(interp, "checkmem", CheckmemCmd, (ClientData) 0,
+ (Tcl_CmdDeleteProc *) NULL);
+#endif
+
+ /*
+ * Make command-line arguments available in the Tcl variables "argc"
+ * and "argv". If the first argument doesn't start with a "-" then
+ * strip it off and use it as the name of a script file to process.
+ */
+
+ fileName = NULL;
+ if ((argc > 1) && (argv[1][0] != '-')) {
+ fileName = argv[1];
+ argc--;
+ argv++;
+ }
+ args = Tcl_Merge(argc-1, argv+1);
+ Tcl_SetVar(interp, "argv", args, TCL_GLOBAL_ONLY);
+ ckfree(args);
+ TclFormatInt(buffer, argc-1);
+ Tcl_SetVar(interp, "argc", buffer, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "argv0", (fileName != NULL) ? fileName : argv[0],
+ TCL_GLOBAL_ONLY);
+
+ /*
+ * Set the "tcl_interactive" variable.
+ */
+
+ tty = isatty(0);
+ Tcl_SetVar(interp, "tcl_interactive",
+ ((fileName == NULL) && tty) ? "1" : "0", TCL_GLOBAL_ONLY);
+
+ /*
+ * Invoke application-specific initialization.
+ */
+
+ if ((*appInitProc)(interp) != TCL_OK) {
+ Tcl_DString errStr;
+ Tcl_DStringInit(&errStr);
+ Tcl_DStringAppend(&errStr,
+ "application-specific initialization failed: \n", -1);
+ Tcl_DStringAppend(&errStr, interp->result, -1);
+ Tcl_DStringAppend(&errStr, "\n", 1);
+ TclMacDoNotification(Tcl_DStringValue(&errStr));
+ goto done;
+ }
+
+ /*
+ * Install the BGNotify command:
+ */
+
+ if ( Tcl_CreateObjCommand(interp, "bgnotify", Tcl_MacBGNotifyObjCmd, NULL,
+ (Tcl_CmdDeleteProc *) NULL) == NULL) {
+ goto done;
+ }
+
+ /*
+ * If a script file was specified then just source that file
+ * and quit. In this Mac BG Application version, we will try the
+ * resource fork first, then the file system second...
+ */
+
+ if (fileName != NULL) {
+ Str255 resName;
+ Handle resource;
+
+ strcpy((char *) resName + 1, fileName);
+ resName[0] = strlen(fileName);
+ resource = GetNamedResource('TEXT',resName);
+ if (resource != NULL) {
+ code = Tcl_MacEvalResource(interp, fileName, -1, NULL);
+ } else {
+ code = Tcl_EvalFile(interp, fileName);
+ }
+
+ if (code != TCL_OK) {
+ Tcl_DString errStr;
+
+ Tcl_DStringInit(&errStr);
+ Tcl_DStringAppend(&errStr, " Error sourcing resource or file: ", -1);
+ Tcl_DStringAppend(&errStr, fileName, -1);
+ Tcl_DStringAppend(&errStr, "\n\nError was: ", -1);
+ Tcl_DStringAppend(&errStr, interp->result, -1);
+
+ TclMacDoNotification(Tcl_DStringValue(&errStr));
+
+ }
+ goto done;
+ }
+
+
+ /*
+ * Rather than calling exit, invoke the "exit" command so that
+ * users can replace "exit" with some other command to do additional
+ * cleanup on exit. The Tcl_Eval call should never return.
+ */
+
+ done:
+ if (commandPtr != NULL) {
+ Tcl_DecrRefCount(commandPtr);
+ }
+ if (prompt1NamePtr != NULL) {
+ Tcl_DecrRefCount(prompt1NamePtr);
+ }
+ if (prompt2NamePtr != NULL) {
+ Tcl_DecrRefCount(prompt2NamePtr);
+ }
+ sprintf(buffer, "exit %d", exitCode);
+ Tcl_Eval(interp, buffer);
+}
+
+/*----------------------------------------------------------------------
+ *
+ * TclMacDoNotification --
+ *
+ * This posts an error message using the Notification manager.
+ *
+ * Results:
+ * Post a Notification Manager dialog.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+void
+TclMacDoNotification(mssg)
+ char *mssg;
+{
+ NMRec errorNot;
+ EventRecord *theEvent = NULL;
+ OSErr err;
+ char *ptr;
+
+ errorNot.qType = nmType;
+ errorNot.nmMark = 0;
+ errorNot.nmIcon = 0;
+ errorNot.nmSound = (Handle) -1;
+
+ for ( ptr = mssg; *ptr != '\0'; ptr++) {
+ if (*ptr == '\n') {
+ *ptr = '\r';
+ }
+ }
+
+ c2pstr(mssg);
+ errorNot.nmStr = (StringPtr) mssg;
+
+ errorNot.nmResp = NewNMProc(TclMacNotificationResponse);
+ errorNot.nmRefCon = SetCurrentA5();
+
+ NotificationIsDone = 0;
+
+ /*
+ * Cycle while waiting for the user to click on the
+ * notification box. Don't take any events off the event queue,
+ * since we want Tcl to do this but we want to block till the notification
+ * has been handled...
+ */
+
+ err = NMInstall(&errorNot);
+ if (err == noErr) {
+ while (!NotificationIsDone) {
+ WaitNextEvent(0, theEvent, 20, NULL);
+ }
+ NMRemove(&errorNot);
+ }
+
+ p2cstr((unsigned char *) mssg);
+}
+
+void
+TclMacNotificationResponse(nmRec)
+ NMRecPtr nmRec;
+{
+ int curA5;
+
+ curA5 = SetCurrentA5();
+ SetA5(nmRec->nmRefCon);
+
+ NotificationIsDone = 1;
+
+ SetA5(curA5);
+
+}
+
+int
+Tcl_MacBGNotifyObjCmd(clientData, interp, objc, objv)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ int objc;
+ Tcl_Obj **objv;
+{
+ Tcl_Obj *resultPtr;
+
+ resultPtr = Tcl_GetObjResult(interp);
+
+ if ( objc != 2 ) {
+ Tcl_WrongNumArgs(interp, 1, objv, "message");
+ return TCL_ERROR;
+ }
+
+ TclMacDoNotification(Tcl_GetStringFromObj(objv[1], (int *) NULL));
+ return TCL_OK;
+
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CheckmemCmd --
+ *
+ * This is the command procedure for the "checkmem" command, which
+ * causes the application to exit after printing information about
+ * memory usage to the file passed to this command as its first
+ * argument.
+ *
+ * Results:
+ * Returns a standard Tcl completion code.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+#ifdef TCL_MEM_DEBUG
+
+ /* ARGSUSED */
+static int
+CheckmemCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Not used. */
+ Tcl_Interp *interp; /* Interpreter for evaluation. */
+ int argc; /* Number of arguments. */
+ char *argv[]; /* String values of arguments. */
+{
+ extern char *tclMemDumpFileName;
+ if (argc != 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
+ " fileName\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ strcpy(dumpFile, argv[1]);
+ tclMemDumpFileName = dumpFile;
+ quitFlag = 1;
+ return TCL_OK;
+}
+#endif
diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c
new file mode 100644
index 0000000..b05d2f5
--- /dev/null
+++ b/mac/tclMacChan.c
@@ -0,0 +1,1356 @@
+/*
+ * tclMacChan.c
+ *
+ * Channel drivers for Macintosh channels for the
+ * console fds.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacChan.c 1.43 97/06/20 11:27:48
+ */
+
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMacInt.h"
+#include <Aliases.h>
+#include <Errors.h>
+#include <Files.h>
+#include <Gestalt.h>
+#include <Processes.h>
+#include <Strings.h>
+#include <FSpCompat.h>
+#include <MoreFiles.h>
+#include <MoreFilesExtras.h>
+
+/*
+ * The following variable is used to tell whether this module has been
+ * initialized.
+ */
+
+static int initialized = 0;
+
+/*
+ * The following are flags returned by GetOpenMode. They
+ * are or'd together to determine how opening and handling
+ * a file should occur.
+ */
+
+#define TCL_RDONLY (1<<0)
+#define TCL_WRONLY (1<<1)
+#define TCL_RDWR (1<<2)
+#define TCL_CREAT (1<<3)
+#define TCL_TRUNC (1<<4)
+#define TCL_APPEND (1<<5)
+#define TCL_ALWAYS_APPEND (1<<6)
+#define TCL_EXCL (1<<7)
+#define TCL_NOCTTY (1<<8)
+#define TCL_NONBLOCK (1<<9)
+#define TCL_RW_MODES (TCL_RDONLY|TCL_WRONLY|TCL_RDWR)
+
+/*
+ * This structure describes per-instance state of a
+ * macintosh file based channel.
+ */
+
+typedef struct FileState {
+ short fileRef; /* Macintosh file reference number. */
+ Tcl_Channel fileChan; /* Pointer to the channel for this file. */
+ int watchMask; /* OR'ed set of flags indicating which events
+ * are being watched. */
+ int appendMode; /* Flag to tell if in O_APPEND mode or not. */
+ int volumeRef; /* Flag to tell if in O_APPEND mode or not. */
+ int pending; /* 1 if message is pending on queue. */
+ struct FileState *nextPtr; /* Pointer to next registered file. */
+} FileState;
+
+/*
+ * The following pointer refers to the head of the list of files managed
+ * that are being watched for file events.
+ */
+
+static FileState *firstFilePtr;
+
+/*
+ * The following structure is what is added to the Tcl event queue when
+ * file events are generated.
+ */
+
+typedef struct FileEvent {
+ Tcl_Event header; /* Information that is standard for
+ * all events. */
+ FileState *infoPtr; /* Pointer to file info structure. Note
+ * that we still have to verify that the
+ * file exists before dereferencing this
+ * pointer. */
+} FileEvent;
+
+
+/*
+ * Static routines for this file:
+ */
+
+static int CommonGetHandle _ANSI_ARGS_((ClientData instanceData,
+ int direction, ClientData *handlePtr));
+static void CommonWatch _ANSI_ARGS_((ClientData instanceData,
+ int mask));
+static int FileBlockMode _ANSI_ARGS_((ClientData instanceData,
+ int mode));
+static void FileChannelExitHandler _ANSI_ARGS_((
+ ClientData clientData));
+static void FileCheckProc _ANSI_ARGS_((ClientData clientData,
+ int flags));
+static int FileClose _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp));
+static int FileEventProc _ANSI_ARGS_((Tcl_Event *evPtr,
+ int flags));
+static void FileInit _ANSI_ARGS_((void));
+static int FileInput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toRead, int *errorCode));
+static int FileOutput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toWrite, int *errorCode));
+static int FileSeek _ANSI_ARGS_((ClientData instanceData,
+ long offset, int mode, int *errorCode));
+static void FileSetupProc _ANSI_ARGS_((ClientData clientData,
+ int flags));
+static int GetOpenMode _ANSI_ARGS_((Tcl_Interp *interp,
+ char *string));
+static Tcl_Channel OpenFileChannel _ANSI_ARGS_((char *fileName, int mode,
+ int permissions, int *errorCodePtr));
+static int StdIOBlockMode _ANSI_ARGS_((ClientData instanceData,
+ int mode));
+static int StdIOClose _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp));
+static int StdIOInput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toRead, int *errorCode));
+static int StdIOOutput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toWrite, int *errorCode));
+static int StdIOSeek _ANSI_ARGS_((ClientData instanceData,
+ long offset, int mode, int *errorCode));
+static int StdReady _ANSI_ARGS_((ClientData instanceData,
+ int mask));
+
+/*
+ * This structure describes the channel type structure for file based IO:
+ */
+
+static Tcl_ChannelType consoleChannelType = {
+ "file", /* Type name. */
+ StdIOBlockMode, /* Set blocking/nonblocking mode.*/
+ StdIOClose, /* Close proc. */
+ StdIOInput, /* Input proc. */
+ StdIOOutput, /* Output proc. */
+ StdIOSeek, /* Seek proc. */
+ NULL, /* Set option proc. */
+ NULL, /* Get option proc. */
+ CommonWatch, /* Initialize notifier. */
+ CommonGetHandle /* Get OS handles out of channel. */
+};
+
+/*
+ * This variable describes the channel type structure for file based IO.
+ */
+
+static Tcl_ChannelType fileChannelType = {
+ "file", /* Type name. */
+ FileBlockMode, /* Set blocking or
+ * non-blocking mode.*/
+ FileClose, /* Close proc. */
+ FileInput, /* Input proc. */
+ FileOutput, /* Output proc. */
+ FileSeek, /* Seek proc. */
+ NULL, /* Set option proc. */
+ NULL, /* Get option proc. */
+ CommonWatch, /* Initialize notifier. */
+ CommonGetHandle /* Get OS handles out of channel. */
+};
+
+
+/*
+ * Hack to allow Mac Tk to override the TclGetStdChannels function.
+ */
+
+typedef void (*TclGetStdChannelsProc) _ANSI_ARGS_((Tcl_Channel *stdinPtr,
+ Tcl_Channel *stdoutPtr, Tcl_Channel *stderrPtr));
+
+TclGetStdChannelsProc getStdChannelsProc = NULL;
+
+/*
+ * Static variables to hold channels for stdin, stdout and stderr.
+ */
+
+static Tcl_Channel stdinChannel = NULL;
+static Tcl_Channel stdoutChannel = NULL;
+static Tcl_Channel stderrChannel = NULL;
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileInit --
+ *
+ * This function initializes the file channel event source.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Creates a new event source.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FileInit()
+{
+ initialized = 1;
+ firstFilePtr = NULL;
+ Tcl_CreateEventSource(FileSetupProc, FileCheckProc, NULL);
+ Tcl_CreateExitHandler(FileChannelExitHandler, NULL);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileChannelExitHandler --
+ *
+ * This function is called to cleanup the channel driver before
+ * Tcl is unloaded.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Destroys the communication window.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FileChannelExitHandler(
+ ClientData clientData) /* Old window proc */
+{
+ Tcl_DeleteEventSource(FileSetupProc, FileCheckProc, NULL);
+ initialized = 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileSetupProc --
+ *
+ * This procedure is invoked before Tcl_DoOneEvent blocks waiting
+ * for an event.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Adjusts the block time if needed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+FileSetupProc(
+ ClientData data, /* Not used. */
+ int flags) /* Event flags as passed to Tcl_DoOneEvent. */
+{
+ FileState *infoPtr;
+ Tcl_Time blockTime = { 0, 0 };
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return;
+ }
+
+ /*
+ * Check to see if there is a ready file. If so, poll.
+ */
+
+ for (infoPtr = firstFilePtr; infoPtr != NULL; infoPtr = infoPtr->nextPtr) {
+ if (infoPtr->watchMask) {
+ Tcl_SetMaxBlockTime(&blockTime);
+ break;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileCheckProc --
+ *
+ * This procedure is called by Tcl_DoOneEvent to check the file
+ * event source for events.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * May queue an event.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FileCheckProc(
+ ClientData data, /* Not used. */
+ int flags) /* Event flags as passed to Tcl_DoOneEvent. */
+{
+ FileEvent *evPtr;
+ FileState *infoPtr;
+ int sentMsg = 0;
+ Tcl_Time blockTime = { 0, 0 };
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return;
+ }
+
+ /*
+ * Queue events for any ready files that don't already have events
+ * queued (caused by persistent states that won't generate WinSock
+ * events).
+ */
+
+ for (infoPtr = firstFilePtr; infoPtr != NULL; infoPtr = infoPtr->nextPtr) {
+ if (infoPtr->watchMask && !infoPtr->pending) {
+ infoPtr->pending = 1;
+ evPtr = (FileEvent *) ckalloc(sizeof(FileEvent));
+ evPtr->header.proc = FileEventProc;
+ evPtr->infoPtr = infoPtr;
+ Tcl_QueueEvent((Tcl_Event *) evPtr, TCL_QUEUE_TAIL);
+ }
+ }
+}
+
+/*----------------------------------------------------------------------
+ *
+ * FileEventProc --
+ *
+ * This function is invoked by Tcl_ServiceEvent when a file event
+ * reaches the front of the event queue. This procedure invokes
+ * Tcl_NotifyChannel on the file.
+ *
+ * Results:
+ * Returns 1 if the event was handled, meaning it should be removed
+ * from the queue. Returns 0 if the event was not handled, meaning
+ * it should stay on the queue. The only time the event isn't
+ * handled is if the TCL_FILE_EVENTS flag bit isn't set.
+ *
+ * Side effects:
+ * Whatever the notifier callback does.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileEventProc(
+ Tcl_Event *evPtr, /* Event to service. */
+ int flags) /* Flags that indicate what events to
+ * handle, such as TCL_FILE_EVENTS. */
+{
+ FileEvent *fileEvPtr = (FileEvent *)evPtr;
+ FileState *infoPtr;
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return 0;
+ }
+
+ /*
+ * Search through the list of watched files for the one whose handle
+ * matches the event. We do this rather than simply dereferencing
+ * the handle in the event so that files can be deleted while the
+ * event is in the queue.
+ */
+
+ for (infoPtr = firstFilePtr; infoPtr != NULL; infoPtr = infoPtr->nextPtr) {
+ if (fileEvPtr->infoPtr == infoPtr) {
+ infoPtr->pending = 0;
+ Tcl_NotifyChannel(infoPtr->fileChan, infoPtr->watchMask);
+ break;
+ }
+ }
+ return 1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StdIOBlockMode --
+ *
+ * Set blocking or non-blocking mode on channel.
+ *
+ * Results:
+ * 0 if successful, errno when failed.
+ *
+ * Side effects:
+ * Sets the device into blocking or non-blocking mode.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StdIOBlockMode(
+ ClientData instanceData, /* Unused. */
+ int mode) /* The mode to set. */
+{
+ /*
+ * Do not allow putting stdin, stdout or stderr into nonblocking mode.
+ */
+
+ if (mode == TCL_MODE_NONBLOCKING) {
+ return EFAULT;
+ }
+
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StdIOClose --
+ *
+ * Closes the IO channel.
+ *
+ * Results:
+ * 0 if successful, the value of errno if failed.
+ *
+ * Side effects:
+ * Closes the physical channel
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StdIOClose(
+ ClientData instanceData, /* Unused. */
+ Tcl_Interp *interp) /* Unused. */
+{
+ int fd, errorCode = 0;
+
+ /*
+ * Invalidate the stdio cache if necessary. Note that we assume that
+ * the stdio file and channel pointers will become invalid at the same
+ * time.
+ */
+
+ fd = (int) ((FileState*)instanceData)->fileRef;
+ if (fd == 0) {
+ fd = 0;
+ stdinChannel = NULL;
+ } else if (fd == 1) {
+ stdoutChannel = NULL;
+ } else if (fd == 2) {
+ stderrChannel = NULL;
+ } else {
+ panic("recieved invalid std file");
+ }
+
+ if (close(fd) < 0) {
+ errorCode = errno;
+ }
+
+ return errorCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CommonGetHandle --
+ *
+ * Called from Tcl_GetChannelFile to retrieve OS handles from inside
+ * a file based channel.
+ *
+ * Results:
+ * The appropriate handle or NULL if not present.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+CommonGetHandle(
+ ClientData instanceData, /* The file state. */
+ int direction, /* Which handle to retrieve? */
+ ClientData *handlePtr)
+{
+ if ((direction == TCL_READABLE) || (direction == TCL_WRITABLE)) {
+ *handlePtr = (ClientData) ((FileState*)instanceData)->fileRef;
+ return TCL_OK;
+ }
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StdIOInput --
+ *
+ * Reads input from the IO channel into the buffer given. Returns
+ * count of how many bytes were actually read, and an error indication.
+ *
+ * Results:
+ * A count of how many bytes were read is returned and an error
+ * indication is returned in an output argument.
+ *
+ * Side effects:
+ * Reads input from the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+StdIOInput(
+ ClientData instanceData, /* Unused. */
+ char *buf, /* Where to store data read. */
+ int bufSize, /* How much space is available
+ * in the buffer? */
+ int *errorCode) /* Where to store error code. */
+{
+ int fd;
+ int bytesRead; /* How many bytes were read? */
+
+ *errorCode = 0;
+ errno = 0;
+ fd = (int) ((FileState*)instanceData)->fileRef;
+ bytesRead = read(fd, buf, (size_t) bufSize);
+ if (bytesRead > -1) {
+ return bytesRead;
+ }
+ *errorCode = errno;
+ return -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StdIOOutput--
+ *
+ * Writes the given output on the IO channel. Returns count of how
+ * many characters were actually written, and an error indication.
+ *
+ * Results:
+ * A count of how many characters were written is returned and an
+ * error indication is returned in an output argument.
+ *
+ * Side effects:
+ * Writes output on the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StdIOOutput(
+ ClientData instanceData, /* Unused. */
+ char *buf, /* The data buffer. */
+ int toWrite, /* How many bytes to write? */
+ int *errorCode) /* Where to store error code. */
+{
+ int written;
+ int fd;
+
+ *errorCode = 0;
+ errno = 0;
+ fd = (int) ((FileState*)instanceData)->fileRef;
+ written = write(fd, buf, (size_t) toWrite);
+ if (written > -1) {
+ return written;
+ }
+ *errorCode = errno;
+ return -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StdIOSeek --
+ *
+ * Seeks on an IO channel. Returns the new position.
+ *
+ * Results:
+ * -1 if failed, the new position if successful. If failed, it
+ * also sets *errorCodePtr to the error code.
+ *
+ * Side effects:
+ * Moves the location at which the channel will be accessed in
+ * future operations.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+StdIOSeek(
+ ClientData instanceData, /* Unused. */
+ long offset, /* Offset to seek to. */
+ int mode, /* Relative to where
+ * should we seek? */
+ int *errorCodePtr) /* To store error code. */
+{
+ int newLoc;
+ int fd;
+
+ *errorCodePtr = 0;
+ fd = (int) ((FileState*)instanceData)->fileRef;
+ newLoc = lseek(fd, offset, mode);
+ if (newLoc > -1) {
+ return newLoc;
+ }
+ *errorCodePtr = errno;
+ return -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_PidObjCmd --
+ *
+ * This procedure is invoked to process the "pid" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ /* ARGSUSED */
+int
+Tcl_PidObjCmd(dummy, interp, objc, objv)
+ ClientData dummy; /* Not used. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int objc; /* Number of arguments. */
+ Tcl_Obj *CONST *objv; /* Argument strings. */
+{
+ ProcessSerialNumber psn;
+ char buf[20];
+ Tcl_Channel chan;
+ Tcl_Obj *resultPtr;
+
+ if (objc > 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?channelId?");
+ return TCL_ERROR;
+ }
+ if (objc == 1) {
+ resultPtr = Tcl_GetObjResult(interp);
+ GetCurrentProcess(&psn);
+ sprintf(buf, "0x%08x%08x", psn.highLongOfPSN, psn.lowLongOfPSN);
+ Tcl_SetStringObj(resultPtr, buf, -1);
+ } else {
+ chan = Tcl_GetChannel(interp, Tcl_GetStringFromObj(objv[1], NULL),
+ NULL);
+ if (chan == (Tcl_Channel) NULL) {
+ return TCL_ERROR;
+ }
+ /*
+ * We can't create pipelines on the Mac so
+ * this will always return an empty list.
+ */
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetDefaultStdChannel --
+ *
+ * Constructs a channel for the specified standard OS handle.
+ *
+ * Results:
+ * Returns the specified default standard channel, or NULL.
+ *
+ * Side effects:
+ * May cause the creation of a standard channel and the underlying
+ * file.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+TclGetDefaultStdChannel(
+ int type) /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */
+{
+ Tcl_Channel channel = NULL;
+ int fd = 0; /* Initializations needed to prevent */
+ int mode = 0; /* compiler warning (used before set). */
+ char *bufMode = NULL;
+ char channelName[20];
+ int channelPermissions;
+ FileState *fileState;
+
+ /*
+ * If the channels were not created yet, create them now and
+ * store them in the static variables.
+ */
+
+ switch (type) {
+ case TCL_STDIN:
+ fd = 0;
+ channelPermissions = TCL_READABLE;
+ bufMode = "line";
+ break;
+ case TCL_STDOUT:
+ fd = 1;
+ channelPermissions = TCL_WRITABLE;
+ bufMode = "line";
+ break;
+ case TCL_STDERR:
+ fd = 2;
+ channelPermissions = TCL_WRITABLE;
+ bufMode = "none";
+ break;
+ default:
+ panic("TclGetDefaultStdChannel: Unexpected channel type");
+ break;
+ }
+
+ sprintf(channelName, "console%d", (int) fd);
+ fileState = (FileState *) ckalloc((unsigned) sizeof(FileState));
+ channel = Tcl_CreateChannel(&consoleChannelType, channelName,
+ (ClientData) fileState, channelPermissions);
+ fileState->fileChan = channel;
+ fileState->fileRef = fd;
+
+ /*
+ * Set up the normal channel options for stdio handles.
+ */
+
+ Tcl_SetChannelOption(NULL, channel, "-translation", "cr");
+ Tcl_SetChannelOption(NULL, channel, "-buffering", bufMode);
+
+ return channel;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_OpenFileChannel --
+ *
+ * Open an File based channel on Unix systems.
+ *
+ * Results:
+ * The new channel or NULL. If NULL, the output argument
+ * errorCodePtr is set to a POSIX error.
+ *
+ * Side effects:
+ * May open the channel and may cause creation of a file on the
+ * file system.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+Tcl_OpenFileChannel(
+ Tcl_Interp *interp, /* Interpreter for error reporting;
+ * can be NULL. */
+ char *fileName, /* Name of file to open. */
+ char *modeString, /* A list of POSIX open modes or
+ * a string such as "rw". */
+ int permissions) /* If the open involves creating a
+ * file, with what modes to create
+ * it? */
+{
+ Tcl_Channel chan;
+ int mode;
+ char *nativeName;
+ Tcl_DString buffer;
+ int errorCode;
+
+ mode = GetOpenMode(interp, modeString);
+ if (mode == -1) {
+ return NULL;
+ }
+
+ nativeName = Tcl_TranslateFileName(interp, fileName, &buffer);
+ if (nativeName == NULL) {
+ return NULL;
+ }
+
+ chan = OpenFileChannel(nativeName, mode, permissions, &errorCode);
+ Tcl_DStringFree(&buffer);
+
+ if (chan == NULL) {
+ Tcl_SetErrno(errorCode);
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open \"", fileName, "\": ",
+ Tcl_PosixError(interp), (char *) NULL);
+ }
+ return NULL;
+ }
+
+ return chan;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * OpenFileChannel--
+ *
+ * Opens a Macintosh file and creates a Tcl channel to control it.
+ *
+ * Results:
+ * A Tcl channel.
+ *
+ * Side effects:
+ * Will open a Macintosh file.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tcl_Channel
+OpenFileChannel(
+ char *fileName, /* Name of file to open. */
+ int mode, /* Mode for opening file. */
+ int permissions, /* If the open involves creating a
+ * file, with what modes to create
+ * it? */
+ int *errorCodePtr) /* Where to store error code. */
+{
+ int channelPermissions;
+ Tcl_Channel chan;
+ char macPermision;
+ FSSpec fileSpec;
+ OSErr err;
+ short fileRef;
+ FileState *fileState;
+ char channelName[64];
+
+ /*
+ * Note we use fsRdWrShPerm instead of fsRdWrPerm which allows shared
+ * writes on a file. This isn't common on a mac but is common with
+ * Windows and UNIX and the feature is used by Tcl.
+ */
+
+ switch (mode & (TCL_RDONLY | TCL_WRONLY | TCL_RDWR)) {
+ case TCL_RDWR:
+ channelPermissions = (TCL_READABLE | TCL_WRITABLE);
+ macPermision = fsRdWrShPerm;
+ break;
+ case TCL_WRONLY:
+ /*
+ * Mac's fsRdPerm permission actually defaults to fsRdWrPerm because
+ * the Mac OS doesn't realy support write only access. We explicitly
+ * set the permission fsRdWrShPerm so that we can have shared write
+ * access.
+ */
+ channelPermissions = TCL_WRITABLE;
+ macPermision = fsRdWrShPerm;
+ break;
+ case TCL_RDONLY:
+ default:
+ channelPermissions = TCL_READABLE;
+ macPermision = fsRdPerm;
+ break;
+ }
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ if ((err != noErr) && (err != fnfErr)) {
+ *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
+ Tcl_SetErrno(errno);
+ return NULL;
+ }
+
+ if ((err == fnfErr) && (mode & TCL_CREAT)) {
+ err = HCreate(fileSpec.vRefNum, fileSpec.parID, fileSpec.name, 'MPW ', 'TEXT');
+ if (err != noErr) {
+ *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
+ Tcl_SetErrno(errno);
+ return NULL;
+ }
+ } else if ((mode & TCL_CREAT) && (mode & TCL_EXCL)) {
+ *errorCodePtr = errno = EEXIST;
+ Tcl_SetErrno(errno);
+ return NULL;
+ }
+
+ err = HOpenDF(fileSpec.vRefNum, fileSpec.parID, fileSpec.name, macPermision, &fileRef);
+ if (err != noErr) {
+ *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
+ Tcl_SetErrno(errno);
+ return NULL;
+ }
+
+ if (mode & TCL_TRUNC) {
+ SetEOF(fileRef, 0);
+ }
+
+ sprintf(channelName, "file%d", (int) fileRef);
+ fileState = (FileState *) ckalloc((unsigned) sizeof(FileState));
+ chan = Tcl_CreateChannel(&fileChannelType, channelName,
+ (ClientData) fileState, channelPermissions);
+ if (chan == (Tcl_Channel) NULL) {
+ *errorCodePtr = errno = EFAULT;
+ Tcl_SetErrno(errno);
+ FSClose(fileRef);
+ ckfree((char *) fileState);
+ return NULL;
+ }
+
+ fileState->fileChan = chan;
+ fileState->volumeRef = fileSpec.vRefNum;
+ fileState->fileRef = fileRef;
+ fileState->pending = 0;
+ fileState->watchMask = 0;
+ if (mode & TCL_ALWAYS_APPEND) {
+ fileState->appendMode = true;
+ } else {
+ fileState->appendMode = false;
+ }
+
+ if ((mode & TCL_ALWAYS_APPEND) || (mode & TCL_APPEND)) {
+ if (Tcl_Seek(chan, 0, SEEK_END) < 0) {
+ *errorCodePtr = errno = EFAULT;
+ Tcl_SetErrno(errno);
+ Tcl_Close(NULL, chan);
+ FSClose(fileRef);
+ ckfree((char *) fileState);
+ return NULL;
+ }
+ }
+
+ return chan;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileBlockMode --
+ *
+ * Set blocking or non-blocking mode on channel. Macintosh files
+ * can never really be set to blocking or non-blocking modes.
+ * However, we don't generate an error - we just return success.
+ *
+ * Results:
+ * 0 if successful, errno when failed.
+ *
+ * Side effects:
+ * Sets the device into blocking or non-blocking mode.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileBlockMode(
+ ClientData instanceData, /* Unused. */
+ int mode) /* The mode to set. */
+{
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileClose --
+ *
+ * Closes the IO channel.
+ *
+ * Results:
+ * 0 if successful, the value of errno if failed.
+ *
+ * Side effects:
+ * Closes the physical channel
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileClose(
+ ClientData instanceData, /* Unused. */
+ Tcl_Interp *interp) /* Unused. */
+{
+ FileState *fileState = (FileState *) instanceData;
+ int errorCode = 0;
+ OSErr err;
+
+ err = FSClose(fileState->fileRef);
+ FlushVol(NULL, fileState->volumeRef);
+ if (err != noErr) {
+ errorCode = errno = TclMacOSErrorToPosixError(err);
+ panic("error during file close");
+ }
+
+ ckfree((char *) fileState);
+ Tcl_SetErrno(errorCode);
+ return errorCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileInput --
+ *
+ * Reads input from the IO channel into the buffer given. Returns
+ * count of how many bytes were actually read, and an error indication.
+ *
+ * Results:
+ * A count of how many bytes were read is returned and an error
+ * indication is returned in an output argument.
+ *
+ * Side effects:
+ * Reads input from the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+FileInput(
+ ClientData instanceData, /* Unused. */
+ char *buffer, /* Where to store data read. */
+ int bufSize, /* How much space is available
+ * in the buffer? */
+ int *errorCodePtr) /* Where to store error code. */
+{
+ FileState *fileState = (FileState *) instanceData;
+ OSErr err;
+ long length = bufSize;
+
+ *errorCodePtr = 0;
+ errno = 0;
+ err = FSRead(fileState->fileRef, &length, buffer);
+ if ((err == noErr) || (err == eofErr)) {
+ return length;
+ } else {
+ switch (err) {
+ case ioErr:
+ *errorCodePtr = errno = EIO;
+ case afpAccessDenied:
+ *errorCodePtr = errno = EACCES;
+ default:
+ *errorCodePtr = errno = EINVAL;
+ }
+ return -1;
+ }
+ *errorCodePtr = errno;
+ return -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileOutput--
+ *
+ * Writes the given output on the IO channel. Returns count of how
+ * many characters were actually written, and an error indication.
+ *
+ * Results:
+ * A count of how many characters were written is returned and an
+ * error indication is returned in an output argument.
+ *
+ * Side effects:
+ * Writes output on the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileOutput(
+ ClientData instanceData, /* Unused. */
+ char *buffer, /* The data buffer. */
+ int toWrite, /* How many bytes to write? */
+ int *errorCodePtr) /* Where to store error code. */
+{
+ FileState *fileState = (FileState *) instanceData;
+ long length = toWrite;
+ OSErr err;
+
+ *errorCodePtr = 0;
+ errno = 0;
+
+ if (fileState->appendMode == true) {
+ FileSeek(instanceData, 0, SEEK_END, errorCodePtr);
+ *errorCodePtr = 0;
+ }
+
+ err = FSWrite(fileState->fileRef, &length, buffer);
+ if (err == noErr) {
+ err = FlushFile(fileState->fileRef);
+ } else {
+ *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ }
+ return length;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileSeek --
+ *
+ * Seeks on an IO channel. Returns the new position.
+ *
+ * Results:
+ * -1 if failed, the new position if successful. If failed, it
+ * also sets *errorCodePtr to the error code.
+ *
+ * Side effects:
+ * Moves the location at which the channel will be accessed in
+ * future operations.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+FileSeek(
+ ClientData instanceData, /* Unused. */
+ long offset, /* Offset to seek to. */
+ int mode, /* Relative to where
+ * should we seek? */
+ int *errorCodePtr) /* To store error code. */
+{
+ FileState *fileState = (FileState *) instanceData;
+ IOParam pb;
+ OSErr err;
+
+ *errorCodePtr = 0;
+ pb.ioCompletion = NULL;
+ pb.ioRefNum = fileState->fileRef;
+ if (mode == SEEK_SET) {
+ pb.ioPosMode = fsFromStart;
+ } else if (mode == SEEK_END) {
+ pb.ioPosMode = fsFromLEOF;
+ } else if (mode == SEEK_CUR) {
+ err = PBGetFPosSync((ParmBlkPtr) &pb);
+ if (pb.ioResult == noErr) {
+ if (offset == 0) {
+ return pb.ioPosOffset;
+ }
+ offset += pb.ioPosOffset;
+ }
+ pb.ioPosMode = fsFromStart;
+ }
+ pb.ioPosOffset = offset;
+ err = PBSetFPosSync((ParmBlkPtr) &pb);
+ if (pb.ioResult == noErr){
+ return pb.ioPosOffset;
+ } else if (pb.ioResult == eofErr) {
+ long currentEOF, newEOF;
+ long buffer, i, length;
+
+ err = PBGetEOFSync((ParmBlkPtr) &pb);
+ currentEOF = (long) pb.ioMisc;
+ if (mode == SEEK_SET) {
+ newEOF = offset;
+ } else if (mode == SEEK_END) {
+ newEOF = offset + currentEOF;
+ } else if (mode == SEEK_CUR) {
+ err = PBGetFPosSync((ParmBlkPtr) &pb);
+ newEOF = offset + pb.ioPosOffset;
+ }
+
+ /*
+ * Write 0's to the new EOF.
+ */
+ pb.ioPosOffset = 0;
+ pb.ioPosMode = fsFromLEOF;
+ err = PBGetFPosSync((ParmBlkPtr) &pb);
+ length = 1;
+ buffer = 0;
+ for (i = 0; i < (newEOF - currentEOF); i++) {
+ err = FSWrite(fileState->fileRef, &length, &buffer);
+ }
+ err = PBGetFPosSync((ParmBlkPtr) &pb);
+ if (pb.ioResult == noErr){
+ return pb.ioPosOffset;
+ }
+ }
+ *errorCodePtr = errno = TclMacOSErrorToPosixError(err);
+ return -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CommonWatch --
+ *
+ * Initialize the notifier to watch handles from this channel.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+CommonWatch(
+ ClientData instanceData, /* The file state. */
+ int mask) /* Events of interest; an OR-ed
+ * combination of TCL_READABLE,
+ * TCL_WRITABLE and TCL_EXCEPTION. */
+{
+ FileState **nextPtrPtr, *ptr;
+ FileState *infoPtr = (FileState *) instanceData;
+ int oldMask = infoPtr->watchMask;
+
+ if (!initialized) {
+ FileInit();
+ }
+
+ infoPtr->watchMask = mask;
+ if (infoPtr->watchMask) {
+ if (!oldMask) {
+ infoPtr->nextPtr = firstFilePtr;
+ firstFilePtr = infoPtr;
+ }
+ } else {
+ if (oldMask) {
+ /*
+ * Remove the file from the list of watched files.
+ */
+
+ for (nextPtrPtr = &firstFilePtr, ptr = *nextPtrPtr;
+ ptr != NULL;
+ nextPtrPtr = &ptr->nextPtr, ptr = *nextPtrPtr) {
+ if (infoPtr == ptr) {
+ *nextPtrPtr = ptr->nextPtr;
+ break;
+ }
+ }
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetOpenMode --
+ *
+ * Description:
+ * Computes a POSIX mode mask from a given string and also sets
+ * a flag to indicate whether the caller should seek to EOF during
+ * opening of the file.
+ *
+ * Results:
+ * On success, returns mode to pass to "open". If an error occurs, the
+ * returns -1 and if interp is not NULL, sets interp->result to an
+ * error message.
+ *
+ * Side effects:
+ * Sets the integer referenced by seekFlagPtr to 1 if the caller
+ * should seek to EOF during opening the file.
+ *
+ * Special note:
+ * This code is based on a prototype implementation contributed
+ * by Mark Diekhans.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+GetOpenMode(
+ Tcl_Interp *interp, /* Interpreter to use for error
+ * reporting - may be NULL. */
+ char *string) /* Mode string, e.g. "r+" or
+ * "RDONLY CREAT". */
+{
+ int mode, modeArgc, c, i, gotRW;
+ char **modeArgv, *flag;
+
+ /*
+ * Check for the simpler fopen-like access modes (e.g. "r"). They
+ * are distinguished from the POSIX access modes by the presence
+ * of a lower-case first letter.
+ */
+
+ mode = 0;
+ if (islower(UCHAR(string[0]))) {
+ switch (string[0]) {
+ case 'r':
+ mode = TCL_RDONLY;
+ break;
+ case 'w':
+ mode = TCL_WRONLY|TCL_CREAT|TCL_TRUNC;
+ break;
+ case 'a':
+ mode = TCL_WRONLY|TCL_CREAT|TCL_APPEND;
+ break;
+ default:
+ error:
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp,
+ "illegal access mode \"", string, "\"",
+ (char *) NULL);
+ }
+ return -1;
+ }
+ if (string[1] == '+') {
+ mode &= ~(TCL_RDONLY|TCL_WRONLY);
+ mode |= TCL_RDWR;
+ if (string[2] != 0) {
+ goto error;
+ }
+ } else if (string[1] != 0) {
+ goto error;
+ }
+ return mode;
+ }
+
+ /*
+ * The access modes are specified using a list of POSIX modes
+ * such as TCL_CREAT.
+ */
+
+ if (Tcl_SplitList(interp, string, &modeArgc, &modeArgv) != TCL_OK) {
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AddErrorInfo(interp,
+ "\n while processing open access modes \"");
+ Tcl_AddErrorInfo(interp, string);
+ Tcl_AddErrorInfo(interp, "\"");
+ }
+ return -1;
+ }
+
+ gotRW = 0;
+ for (i = 0; i < modeArgc; i++) {
+ flag = modeArgv[i];
+ c = flag[0];
+ if ((c == 'R') && (strcmp(flag, "RDONLY") == 0)) {
+ mode = (mode & ~TCL_RW_MODES) | TCL_RDONLY;
+ gotRW = 1;
+ } else if ((c == 'W') && (strcmp(flag, "WRONLY") == 0)) {
+ mode = (mode & ~TCL_RW_MODES) | TCL_WRONLY;
+ gotRW = 1;
+ } else if ((c == 'R') && (strcmp(flag, "RDWR") == 0)) {
+ mode = (mode & ~TCL_RW_MODES) | TCL_RDWR;
+ gotRW = 1;
+ } else if ((c == 'A') && (strcmp(flag, "APPEND") == 0)) {
+ mode |= TCL_ALWAYS_APPEND;
+ } else if ((c == 'C') && (strcmp(flag, "CREAT") == 0)) {
+ mode |= TCL_CREAT;
+ } else if ((c == 'E') && (strcmp(flag, "EXCL") == 0)) {
+ mode |= TCL_EXCL;
+ } else if ((c == 'N') && (strcmp(flag, "NOCTTY") == 0)) {
+ mode |= TCL_NOCTTY;
+ } else if ((c == 'N') && (strcmp(flag, "NONBLOCK") == 0)) {
+ mode |= TCL_NONBLOCK;
+ } else if ((c == 'T') && (strcmp(flag, "TRUNC") == 0)) {
+ mode |= TCL_TRUNC;
+ } else {
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "invalid access mode \"", flag,
+ "\": must be RDONLY, WRONLY, RDWR, APPEND, CREAT",
+ " EXCL, NOCTTY, NONBLOCK, or TRUNC", (char *) NULL);
+ }
+ ckfree((char *) modeArgv);
+ return -1;
+ }
+ }
+ ckfree((char *) modeArgv);
+ if (!gotRW) {
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "access mode must include either",
+ " RDONLY, WRONLY, or RDWR", (char *) NULL);
+ }
+ return -1;
+ }
+ return mode;
+}
diff --git a/mac/tclMacDNR.c b/mac/tclMacDNR.c
new file mode 100644
index 0000000..b42b4dd
--- /dev/null
+++ b/mac/tclMacDNR.c
@@ -0,0 +1,23 @@
+/*
+ * tclMacDNR.c
+ *
+ * This file actually just includes the file "dnr.c" provided by
+ * Apple Computer and redistributed by MetroWerks (and other compiler
+ * vendors.) Unfortunantly, despite various bug reports, dnr.c uses
+ * C++ style comments and will not compile under the "ANSI Strict"
+ * mode that the rest of Tcl compiles under. Furthermore, the Apple
+ * license prohibits me from redistributing a corrected version of
+ * dnr.c. This file uses a pragma to turn off the Strict ANSI option
+ * and then includes the dnr.c file.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacDNR.c 1.2 97/01/28 10:37:21
+ */
+
+#pragma ANSI_strict off
+#include <dnr.c>
+#pragma ANSI_strict reset
diff --git a/mac/tclMacEnv.c b/mac/tclMacEnv.c
new file mode 100644
index 0000000..afb6028
--- /dev/null
+++ b/mac/tclMacEnv.c
@@ -0,0 +1,536 @@
+/*
+ * tclMacEnv.c --
+ *
+ * Implements the "environment" on a Macintosh.
+ *
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacEnv.c 1.29 96/12/06 14:19:57
+ */
+
+#include <Gestalt.h>
+#include <Folders.h>
+#include <TextUtils.h>
+#include <Resources.h>
+#include <string.h>
+
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include "tclPort.h"
+
+#define kMaxEnvStringSize 255
+#define kMaxEnvVarSize 100
+#define kLoginnameTag "LOGIN="
+#define kUsernameTag "USER="
+#define kDefaultDirTag "HOME="
+
+/*
+ * The following specifies a text file where additional environment variables
+ * can be set. The file must reside in the preferences folder. If the file
+ * doesn't exist NO error will occur. Commet out the difinition if you do
+ * NOT want to use an environment variables file.
+ */
+#define kPrefsFile "Tcl Environment Variables"
+
+/*
+ * The following specifies the Name of a 'STR#' resource in the application
+ * where additional environment variables may be set. If the resource doesn't
+ * exist no errors will occur. Commet it out if you don't want it.
+ */
+#define REZ_ENV "\pTcl Environment Variables"
+
+/* Globals */
+char **environ = NULL;
+
+/*
+ * Declarations for local procedures defined in this file:
+ */
+static char ** RezRCVariables _ANSI_ARGS_((void));
+static char ** FileRCVariables _ANSI_ARGS_((void));
+static char ** PathVariables _ANSI_ARGS_((void));
+static char ** SystemVariables _ANSI_ARGS_((void));
+static char * MakeFolderEnvVar _ANSI_ARGS_((char * prefixTag,
+ long whichFolder));
+static char * GetUserName _ANSI_ARGS_((void));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * RezRCVariables --
+ *
+ * Creates environment variables from the applications resource fork.
+ * The function looks for the 'STR#' resource with the name defined
+ * in the #define REZ_ENV. If the define is not defined this code
+ * will not be included. If the resource doesn't exist or no strings
+ * reside in the resource nothing will happen.
+ *
+ * Results:
+ * ptr to value on success, NULL if error.
+ *
+ * Side effects:
+ * Memory is allocated and returned to the caller.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#ifdef REZ_ENV
+static char **
+RezRCVariables()
+{
+ Handle envStrs = NULL;
+ char** rezEnv = NULL;
+ short int numStrs;
+
+ envStrs = GetNamedResource('STR#', REZ_ENV);
+ if (envStrs == NULL) return NULL;
+ numStrs = *((short *) (*envStrs));
+
+ rezEnv = (char **) ckalloc((numStrs + 1) * sizeof(char *));
+
+ if (envStrs != NULL) {
+ ResType theType;
+ Str255 theName;
+ short theID, index = 1;
+ int i = 0;
+ char* string;
+
+ GetResInfo(envStrs, &theID, &theType, theName);
+ for(;;) {
+ GetIndString(theName, theID, index++);
+ if (theName[0] == '\0') break;
+ string = (char *) ckalloc(theName[0] + 2);
+ strncpy(string, (char *) theName + 1, theName[0]);
+ string[theName[0]] = '\0';
+ rezEnv[i++] = string;
+ }
+ ReleaseResource(envStrs);
+
+ rezEnv[i] = NULL;
+ return rezEnv;
+ }
+
+ return NULL;
+}
+#endif
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FileRCVariables --
+ *
+ * Creates environment variables from a file in the system preferences
+ * folder. The function looks for a file in the preferences folder
+ * a name defined in the #define kPrefsFile. If the define is not
+ * defined this code will not be included. If the resource doesn't exist or
+ * no strings reside in the resource nothing will happen.
+ *
+ * Results:
+ * ptr to value on success, NULL if error.
+ *
+ * Side effects:
+ * Memory is allocated and returned to the caller.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#ifdef kPrefsFile
+static char **
+FileRCVariables()
+{
+ char *prefsFolder = NULL;
+ char *tempPtr = NULL;
+ char **fileEnv = NULL;
+ FILE *thePrefsFile = NULL;
+ int i;
+ FSSpec prefDir;
+ OSErr err;
+ Handle theString = NULL;
+ Tcl_Channel chan;
+ int size;
+ Tcl_DString lineRead;
+
+ err = FSpFindFolder(kOnSystemDisk, kPreferencesFolderType,
+ kDontCreateFolder, &prefDir);
+ if (err != noErr) {
+ return NULL;
+ }
+ err = FSpPathFromLocation(&prefDir, &size, &theString);
+ if (err != noErr) {
+ return NULL;
+ }
+ (void) Munger(theString, size, NULL, 0, kPrefsFile, strlen(kPrefsFile));
+
+ HLock(theString);
+ chan = Tcl_OpenFileChannel(NULL, *theString, "r", 0);
+ HUnlock(theString);
+ DisposeHandle(theString);
+ if (chan == NULL) {
+ return NULL;
+ }
+
+ /*
+ * We found a env file. Let start parsing it.
+ */
+ fileEnv = (char **) ckalloc((kMaxEnvVarSize + 1) * sizeof(char *));
+
+ i = 0;
+ Tcl_DStringInit(&lineRead);
+ while (Tcl_Gets(chan, &lineRead) != -1) {
+ /*
+ * First strip off new line char
+ */
+ if (lineRead.string[lineRead.length-1] == '\n') {
+ lineRead.string[lineRead.length-1] = '\0';
+ }
+ if (lineRead.string[0] == '\0' || lineRead.string[0] == '#') {
+ /*
+ * skip empty lines or commented lines
+ */
+ Tcl_DStringSetLength(&lineRead, 0);
+ continue;
+ }
+
+ tempPtr = (char *) ckalloc(lineRead.length + 1);
+ strcpy(tempPtr, lineRead.string);
+ fileEnv[i++] = tempPtr;
+ Tcl_DStringSetLength(&lineRead, 0);
+ }
+
+ fileEnv[i] = NULL;
+ Tcl_Close(NULL, chan);
+ Tcl_DStringFree(&lineRead);
+
+ return fileEnv;
+}
+#endif
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * MakeFolderEnvVar --
+ *
+ * This function creates "environment" variable by taking a prefix and
+ * appending a folder path to a directory. The directory is specified
+ * by a integer value acceptable by the FindFolder function.
+ *
+ * Results:
+ * The function returns an *allocated* string. If the folder doesn't
+ * exist the return string is still allocated and just contains the
+ * given prefix.
+ *
+ * Side effects:
+ * Memory is allocated and returned to the caller.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static char *
+MakeFolderEnvVar(
+ char * prefixTag, /* Prefix added before result. */
+ long whichFolder) /* Constant for FSpFindFolder. */
+{
+ char * thePath = NULL;
+ char * result = NULL;
+ OSErr theErr = noErr;
+ Handle theString = NULL;
+ FSSpec theFolder;
+ int size;
+ Tcl_DString pathStr;
+ Tcl_DString tagPathStr;
+
+ Tcl_DStringInit(&pathStr);
+ theErr = FSpFindFolder(kOnSystemDisk, whichFolder,
+ kDontCreateFolder, &theFolder);
+ if (theErr == noErr) {
+ theErr = FSpPathFromLocation(&theFolder, &size, &theString);
+
+ HLock(theString);
+ tclPlatform = TCL_PLATFORM_MAC;
+ Tcl_DStringAppend(&pathStr, *theString, -1);
+ HUnlock(theString);
+ DisposeHandle(theString);
+
+ Tcl_DStringInit(&tagPathStr);
+ Tcl_DStringAppend(&tagPathStr, prefixTag, strlen(prefixTag));
+ Tcl_DStringAppend(&tagPathStr, pathStr.string, pathStr.length);
+ Tcl_DStringFree(&pathStr);
+
+ /*
+ * Make sure the path ends with a ':'
+ */
+ if (tagPathStr.string[tagPathStr.length - 1] != ':') {
+ Tcl_DStringAppend(&tagPathStr, ":", 1);
+ }
+
+ /*
+ * Don't free tagPathStr - rather make sure it's allocated
+ * and return it as the result.
+ */
+ if (tagPathStr.string == tagPathStr.staticSpace) {
+ result = (char *) ckalloc(tagPathStr.length + 1);
+ strcpy(result, tagPathStr.string);
+ } else {
+ result = tagPathStr.string;
+ }
+ } else {
+ result = (char *) ckalloc(strlen(prefixTag) + 1);
+ strcpy(result, prefixTag);
+ }
+
+ return result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * PathVariables --
+ *
+ * Creates environment variables from the system call FSpFindFolder.
+ * The function generates environment variables for many of the
+ * commonly used paths on the Macintosh.
+ *
+ * Results:
+ * ptr to value on success, NULL if error.
+ *
+ * Side effects:
+ * Memory is allocated and returned to the caller.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static char **
+PathVariables()
+{
+ int i = 0;
+ char **sysEnv;
+ char *thePath = NULL;
+
+ sysEnv = (char **) ckalloc((12) * sizeof(char *));
+
+ sysEnv[i++] = MakeFolderEnvVar("PREF_FOLDER=", kPreferencesFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("SYS_FOLDER=", kSystemFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("TEMP=", kTemporaryFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("APPLE_M_FOLDER=", kAppleMenuFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("CP_FOLDER=", kControlPanelFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("DESK_FOLDER=", kDesktopFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("EXT_FOLDER=", kExtensionFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("PRINT_MON_FOLDER=",
+ kPrintMonitorDocsFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("SHARED_TRASH_FOLDER=",
+ kWhereToEmptyTrashFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("TRASH_FOLDER=", kTrashFolderType);
+ sysEnv[i++] = MakeFolderEnvVar("START_UP_FOLDER=", kStartupFolderType);
+ sysEnv[i++] = NULL;
+
+ return sysEnv;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SystemVariables --
+ *
+ * Creates environment variables from various Mac system calls.
+ *
+ * Results:
+ * ptr to value on success, NULL if error.
+ *
+ * Side effects:
+ * Memory is allocated and returned to the caller.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static char **
+SystemVariables()
+{
+ int i = 0;
+ char ** sysEnv;
+ char * thePath = NULL;
+ Handle theString = NULL;
+ FSSpec currentDir;
+ int size;
+
+ sysEnv = (char **) ckalloc((4) * sizeof(char *));
+
+ /*
+ * Get user name from chooser. It will be assigned to both
+ * the USER and LOGIN environment variables.
+ */
+ thePath = GetUserName();
+ if (thePath != NULL) {
+ sysEnv[i] = (char *) ckalloc(strlen(kLoginnameTag) + strlen(thePath) + 1);
+ strcpy(sysEnv[i], kLoginnameTag);
+ strcpy(sysEnv[i]+strlen(kLoginnameTag), thePath);
+ i++;
+ sysEnv[i] = (char *) ckalloc(strlen(kUsernameTag) + strlen(thePath) + 1);
+ strcpy(sysEnv[i], kUsernameTag);
+ strcpy(sysEnv[i]+strlen(kUsernameTag), thePath);
+ i++;
+ }
+
+ /*
+ * Get 'home' directory
+ */
+#ifdef kDefaultDirTag
+ FSpGetDefaultDir(&currentDir);
+ FSpPathFromLocation(&currentDir, &size, &theString);
+ HLock(theString);
+ sysEnv[i] = (char *) ckalloc(strlen(kDefaultDirTag) + size + 4);
+ strcpy(sysEnv[i], kDefaultDirTag);
+ strncpy(sysEnv[i]+strlen(kDefaultDirTag) , *theString, size);
+ if (sysEnv[i][strlen(kDefaultDirTag) + size - 1] != ':') {
+ sysEnv[i][strlen(kDefaultDirTag) + size] = ':';
+ sysEnv[i][strlen(kDefaultDirTag) + size + 1] = '\0';
+ } else {
+ sysEnv[i][strlen(kDefaultDirTag) + size] = '\0';
+ }
+ HUnlock(theString);
+ DisposeHandle(theString);
+ i++;
+#endif
+
+ sysEnv[i++] = NULL;
+ return sysEnv;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacCreateEnv --
+ *
+ * This function allocates and populates the global "environ"
+ * variable. Entries are in traditional Unix format but variables
+ * are, hopefully, a bit more relevant for the Macintosh.
+ *
+ * Results:
+ * The number of elements in the newly created environ array.
+ *
+ * Side effects:
+ * Memory is allocated and pointed too by the environ variable.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacCreateEnv()
+{
+ char ** sysEnv = NULL;
+ char ** pathEnv = NULL;
+ char ** fileEnv = NULL;
+ char ** rezEnv = NULL;
+ int count = 0;
+ int i, j;
+
+ sysEnv = SystemVariables();
+ if (sysEnv != NULL) {
+ for (i = 0; sysEnv[i] != NULL; count++, i++) {
+ /* Empty Loop */
+ }
+ }
+
+ pathEnv = PathVariables();
+ if (pathEnv != NULL) {
+ for (i = 0; pathEnv[i] != NULL; count++, i++) {
+ /* Empty Loop */
+ }
+ }
+
+#ifdef kPrefsFile
+ fileEnv = FileRCVariables();
+ if (fileEnv != NULL) {
+ for (i = 0; fileEnv[i] != NULL; count++, i++) {
+ /* Empty Loop */
+ }
+ }
+#endif
+
+#ifdef REZ_ENV
+ rezEnv = RezRCVariables();
+ if (rezEnv != NULL) {
+ for (i = 0; rezEnv[i] != NULL; count++, i++) {
+ /* Empty Loop */
+ }
+ }
+#endif
+
+ /*
+ * Create environ variable
+ */
+ environ = (char **) ckalloc((count + 1) * sizeof(char *));
+ j = 0;
+
+ if (sysEnv != NULL) {
+ for (i = 0; sysEnv[i] != NULL;)
+ environ[j++] = sysEnv[i++];
+ ckfree((char *) sysEnv);
+ }
+
+ if (pathEnv != NULL) {
+ for (i = 0; pathEnv[i] != NULL;)
+ environ[j++] = pathEnv[i++];
+ ckfree((char *) pathEnv);
+ }
+
+#ifdef kPrefsFile
+ if (fileEnv != NULL) {
+ for (i = 0; fileEnv[i] != NULL;)
+ environ[j++] = fileEnv[i++];
+ ckfree((char *) fileEnv);
+ }
+#endif
+
+#ifdef REZ_ENV
+ if (rezEnv != NULL) {
+ for (i = 0; rezEnv[i] != NULL;)
+ environ[j++] = rezEnv[i++];
+ ckfree((char *) rezEnv);
+ }
+#endif
+
+ environ[j] = NULL;
+ return j;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetUserName --
+ *
+ * Get the user login name.
+ *
+ * Results:
+ * ptr to static string, NULL if error.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static char *
+GetUserName()
+{
+ static char buf[33];
+ short refnum;
+ Handle h;
+
+ refnum = CurResFile();
+ UseResFile(0);
+ h = GetResource('STR ', -16096);
+ UseResFile(refnum);
+ if (h == NULL) {
+ return NULL;
+ }
+
+ HLock(h);
+ strncpy(buf, (*h)+1, **h);
+ buf[**h] = '\0';
+ HUnlock(h);
+ ReleaseResource(h);
+ return(buf[0] ? buf : NULL);
+}
diff --git a/mac/tclMacExit.c b/mac/tclMacExit.c
new file mode 100644
index 0000000..f5f403d
--- /dev/null
+++ b/mac/tclMacExit.c
@@ -0,0 +1,317 @@
+/*
+ * tclMacExit.c --
+ *
+ * This file contains routines that deal with cleaning up various state
+ * when Tcl/Tk applications quit. Unfortunantly, not all state is cleaned
+ * up by the process when an application quites or crashes. Also you
+ * need to do different things depending on wether you are running as
+ * 68k code, PowerPC, or a code resource. The Exit handler code was
+ * adapted from code posted on alt.sources.mac by Dave Nebinger.
+ *
+ * Copyright (c) 1995 Dave Nebinger.
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacExit.c 1.6 97/11/20 18:37:38
+ */
+
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include <SegLoad.h>
+#include <Traps.h>
+#include <Processes.h>
+
+/*
+ * Various typedefs and defines needed to patch ExitToShell.
+ */
+
+enum {
+ uppExitToShellProcInfo = kPascalStackBased
+};
+
+#if GENERATINGCFM
+typedef UniversalProcPtr ExitToShellUPP;
+
+#define CallExitToShellProc(userRoutine) \
+ CallUniversalProc((UniversalProcPtr)(userRoutine),uppExitToShellProcInfo)
+#define NewExitToShellProc(userRoutine) \
+ (ExitToShellUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), \
+ uppExitToShellProcInfo, GetCurrentArchitecture())
+
+#else
+typedef ExitToShellProcPtr ExitToShellUPP;
+
+#define CallExitToShellProc(userRoutine) \
+ (*(userRoutine))()
+#define NewExitToShellProc(userRoutine) \
+ (ExitToShellUPP)(userRoutine)
+#endif
+
+#define DisposeExitToShellProc(userRoutine) \
+ DisposeRoutineDescriptor(userRoutine)
+
+#if defined(powerc)||defined(__powerc)
+#pragma options align=mac68k
+#endif
+struct ExitToShellUPPList{
+ struct ExitToShellUPPList* nextProc;
+ ExitToShellUPP userProc;
+};
+#if defined(powerc)||defined(__powerc)
+#pragma options align=reset
+#endif
+
+typedef struct ExitToShellDataStruct ExitToShellDataRec,* ExitToShellDataPtr,** ExitToShellDataHdl;
+
+typedef struct ExitToShellUPPList ExitToShellUPPList,* ExitToShellUPPListPtr,** ExitToShellUPPHdl;
+
+#if defined(powerc)||defined(__powerc)
+#pragma options align=mac68k
+#endif
+struct ExitToShellDataStruct{
+ unsigned long a5;
+ ExitToShellUPPList* userProcs;
+ ExitToShellUPP oldProc;
+};
+#if defined(powerc)||defined(__powerc)
+#pragma options align=reset
+#endif
+
+/*
+ * Static globals used within this file.
+ */
+static ExitToShellDataPtr gExitToShellData = (ExitToShellDataPtr) NULL;
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclPlatformExit --
+ *
+ * This procedure implements the Macintosh specific exit routine.
+ * We explicitly callthe ExitHandler function to do various clean
+ * up.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * We exit the process.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclPlatformExit(
+ int status) /* Ignored. */
+{
+ TclMacExitHandler();
+ ExitToShell();
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacExitHandler --
+ *
+ * This procedure is invoked after Tcl at the last possible moment
+ * to clean up any state Tcl has left around that may cause other
+ * applications to crash. For example, this function can be used
+ * as the termination routine for CFM applications.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Various cleanup occurs.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclMacExitHandler()
+{
+ ExitToShellUPPListPtr curProc;
+
+ /*
+ * Loop through all installed Exit handlers
+ * and call them. Always make sure we are in
+ * a clean state in case we are recursivly called.
+ */
+ if ((gExitToShellData) != NULL && (gExitToShellData->userProcs != NULL)){
+
+ /*
+ * Call the installed exit to shell routines.
+ */
+ curProc = gExitToShellData->userProcs;
+ do {
+ gExitToShellData->userProcs = curProc->nextProc;
+ CallExitToShellProc(curProc->userProc);
+ DisposeExitToShellProc(curProc->userProc);
+ DisposePtr((Ptr) curProc);
+ curProc = gExitToShellData->userProcs;
+ } while (curProc != (ExitToShellUPPListPtr) NULL);
+ }
+
+ return;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacInstallExitToShellPatch --
+ *
+ * This procedure installs a way to clean up state at the latest
+ * possible moment before we exit. These are things that must
+ * be cleaned up or the system will crash. The exact way in which
+ * this is implemented depends on the architecture in which we are
+ * running. For 68k applications we patch the ExitToShell call.
+ * For PowerPC applications we just create a list of procs to call.
+ * The function ExitHandler should be installed in the Code
+ * Fragments terminiation routine.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Installs the new routine.
+ *
+ *----------------------------------------------------------------------
+ */
+
+OSErr
+TclMacInstallExitToShellPatch(
+ ExitToShellProcPtr newProc) /* Function pointer. */
+{
+ ExitToShellUPP exitHandler;
+ ExitToShellUPPListPtr listPtr;
+
+ if (gExitToShellData == (ExitToShellDataPtr) NULL){
+ TclMacInitExitToShell(true);
+ }
+
+ /*
+ * Add the passed in function pointer to the list of functions
+ * to be called when ExitToShell is called.
+ */
+ exitHandler = NewExitToShellProc(newProc);
+ listPtr = (ExitToShellUPPListPtr) NewPtrClear(sizeof(ExitToShellUPPList));
+ listPtr->userProc = exitHandler;
+ listPtr->nextProc = gExitToShellData->userProcs;
+ gExitToShellData->userProcs = listPtr;
+
+ return noErr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ExitToShellPatchRoutine --
+ *
+ * This procedure is invoked when someone calls ExitToShell for
+ * this application. This function performs some last miniute
+ * clean up and then calls the real ExitToShell routine.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Various cleanup occurs.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal void
+ExitToShellPatchRoutine()
+{
+ ExitToShellUPP oldETS;
+ long oldA5;
+
+ /*
+ * Set up our A5 world. This allows us to have
+ * access to our global variables in the 68k world.
+ */
+ oldA5 = SetCurrentA5();
+ SetA5(gExitToShellData->a5);
+
+ /*
+ * Call the function that invokes all
+ * of the handlers.
+ */
+ TclMacExitHandler();
+
+ /*
+ * Call the origional ExitToShell routine.
+ */
+ oldETS = gExitToShellData->oldProc;
+ DisposePtr((Ptr) gExitToShellData);
+ SetA5(oldA5);
+ CallExitToShellProc(oldETS);
+ return;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacInitExitToShell --
+ *
+ * This procedure initializes the ExitToShell clean up machanism.
+ * Generally, this is handled automatically when users make a call
+ * to InstallExitToShellPatch. However, it can be called
+ * explicitly at startup time to turn off the patching mechanism.
+ * This can be used by code resources which could be removed from
+ * the application before ExitToShell is called.
+ *
+ * Note, if we are running from CFM code we never install the
+ * patch. Instead, the function ExitHandler should be installed
+ * as the terminiation routine for the code fragment.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Creates global state.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclMacInitExitToShell(
+ int usePatch) /* True if on 68k. */
+{
+ if (gExitToShellData == (ExitToShellDataPtr) NULL){
+#if GENERATINGCFM
+ gExitToShellData = (ExitToShellDataPtr)
+ NewPtr(sizeof(ExitToShellDataRec));
+ gExitToShellData->a5 = SetCurrentA5();
+ gExitToShellData->userProcs = (ExitToShellUPPList*) NULL;
+#else
+ ExitToShellUPP oldExitToShell, newExitToShellPatch;
+ short exitToShellTrap;
+
+ /*
+ * Initialize patch mechanism.
+ */
+
+ gExitToShellData = (ExitToShellDataPtr) NewPtr(sizeof(ExitToShellDataRec));
+ gExitToShellData->a5 = SetCurrentA5();
+ gExitToShellData->userProcs = (ExitToShellUPPList*) NULL;
+
+ /*
+ * Save state needed to call origional ExitToShell routine. Install
+ * the new ExitToShell code in it's place.
+ */
+ if (usePatch) {
+ exitToShellTrap = _ExitToShell & 0x3ff;
+ newExitToShellPatch = NewExitToShellProc(ExitToShellPatchRoutine);
+ oldExitToShell = (ExitToShellUPP)
+ NGetTrapAddress(exitToShellTrap, ToolTrap);
+ NSetTrapAddress((UniversalProcPtr) newExitToShellPatch,
+ exitToShellTrap, ToolTrap);
+ gExitToShellData->oldProc = oldExitToShell;
+ }
+#endif
+ }
+}
diff --git a/mac/tclMacFCmd.c b/mac/tclMacFCmd.c
new file mode 100644
index 0000000..0dcac1c
--- /dev/null
+++ b/mac/tclMacFCmd.c
@@ -0,0 +1,1408 @@
+/*
+ * tclMacFCmd.c --
+ *
+ * Implements the Macintosh specific portions of the file manipulation
+ * subcommands of the "file" command.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacFCmd.c 1.22 97/05/20 15:44:26
+ */
+
+#include "tclInt.h"
+#include "tclMac.h"
+#include "tclMacInt.h"
+#include "tclPort.h"
+#include <FSpCompat.h>
+#include <MoreFilesExtras.h>
+#include <Strings.h>
+#include <Errors.h>
+#include <FileCopy.h>
+#include <DirectoryCopy.h>
+#include <Script.h>
+#include <string.h>
+#include <Finder.h>
+
+/*
+ * Callback for the file attributes code.
+ */
+
+static int GetFileFinderAttributes _ANSI_ARGS_((Tcl_Interp *interp,
+ int objIndex, char *fileName,
+ Tcl_Obj **attributePtrPtr));
+static int GetFileReadOnly _ANSI_ARGS_((Tcl_Interp *interp,
+ int objIndex, char *fileName,
+ Tcl_Obj **readOnlyPtrPtr));
+static int SetFileFinderAttributes _ANSI_ARGS_((Tcl_Interp *interp,
+ int objIndex, char *fileName,
+ Tcl_Obj *attributePtr));
+static int SetFileReadOnly _ANSI_ARGS_((Tcl_Interp *interp,
+ int objIndex, char *fileName,
+ Tcl_Obj *readOnlyPtr));
+
+/*
+ * These are indeces into the tclpFileAttrsStrings table below.
+ */
+
+#define MAC_CREATOR_ATTRIBUTE 0
+#define MAC_HIDDEN_ATTRIBUTE 1
+#define MAC_READONLY_ATTRIBUTE 2
+#define MAC_TYPE_ATTRIBUTE 3
+
+/*
+ * Global variables for the file attributes code.
+ */
+
+char *tclpFileAttrStrings[] = {"-creator", "-hidden", "-readonly",
+ "-type", (char *) NULL};
+CONST TclFileAttrProcs tclpFileAttrProcs[] = {
+ {GetFileFinderAttributes, SetFileFinderAttributes},
+ {GetFileFinderAttributes, SetFileFinderAttributes},
+ {GetFileReadOnly, SetFileReadOnly},
+ {GetFileFinderAttributes, SetFileFinderAttributes}};
+
+
+/*
+ * Prototypes for procedure only used in this file
+ */
+
+static pascal Boolean CopyErrHandler _ANSI_ARGS_((OSErr error,
+ short failedOperation,
+ short srcVRefNum, long srcDirID,
+ StringPtr srcName, short dstVRefNum,
+ long dstDirID,StringPtr dstName));
+OSErr FSpGetFLockCompat _ANSI_ARGS_((const FSSpec *specPtr,
+ Boolean *lockedPtr));
+static OSErr GenerateUniqueName _ANSI_ARGS_((short vRefNum,
+ long dirID1, long dirID2, Str31 uniqueName));
+static OSErr GetFileSpecs _ANSI_ARGS_((char *path, FSSpec *pathSpecPtr,
+ FSSpec *dirSpecPtr, Boolean *pathExistsPtr,
+ Boolean *pathIsDirectoryPtr));
+static OSErr MoveRename _ANSI_ARGS_((const FSSpec *srcSpecPtr,
+ const FSSpec *dstSpecPtr, StringPtr copyName));
+static int Pstrequal _ANSI_ARGS_((ConstStr255Param stringA,
+ ConstStr255Param stringB));
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpRenameFile --
+ *
+ * Changes the name of an existing file or directory, from src to dst.
+ * If src and dst refer to the same file or directory, does nothing
+ * and returns success. Otherwise if dst already exists, it will be
+ * deleted and replaced by src subject to the following conditions:
+ * If src is a directory, dst may be an empty directory.
+ * If src is a file, dst may be a file.
+ * In any other situation where dst already exists, the rename will
+ * fail.
+ *
+ * Results:
+ * If the directory was successfully created, returns TCL_OK.
+ * Otherwise the return value is TCL_ERROR and errno is set to
+ * indicate the error. Some possible values for errno are:
+ *
+ * EACCES: src or dst parent directory can't be read and/or written.
+ * EEXIST: dst is a non-empty directory.
+ * EINVAL: src is a root directory or dst is a subdirectory of src.
+ * EISDIR: dst is a directory, but src is not.
+ * ENOENT: src doesn't exist. src or dst is "".
+ * ENOTDIR: src is a directory, but dst is not.
+ * EXDEV: src and dst are on different filesystems.
+ *
+ * Side effects:
+ * The implementation of rename may allow cross-filesystem renames,
+ * but the caller should be prepared to emulate it with copy and
+ * delete if errno is EXDEV.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpRenameFile(
+ char *src, /* Pathname of file or dir to be renamed. */
+ char *dst) /* New pathname for file or directory. */
+{
+ FSSpec srcFileSpec, dstFileSpec, dstDirSpec;
+ OSErr err;
+ long srcID, dummy;
+ Boolean srcIsDirectory, dstIsDirectory, dstExists, dstLocked;
+
+ err = FSpLocationFromPath(strlen(src), src, &srcFileSpec);
+ if (err == noErr) {
+ FSpGetDirectoryID(&srcFileSpec, &srcID, &srcIsDirectory);
+ }
+ if (err == noErr) {
+ err = GetFileSpecs(dst, &dstFileSpec, &dstDirSpec, &dstExists,
+ &dstIsDirectory);
+ }
+ if (err == noErr) {
+ if (dstExists == 0) {
+ err = MoveRename(&srcFileSpec, &dstDirSpec, dstFileSpec.name);
+ goto end;
+ }
+ err = FSpGetFLockCompat(&dstFileSpec, &dstLocked);
+ if (dstLocked) {
+ FSpRstFLockCompat(&dstFileSpec);
+ }
+ }
+ if (err == noErr) {
+ if (srcIsDirectory) {
+ if (dstIsDirectory) {
+ /*
+ * The following call will remove an empty directory. If it
+ * fails, it's because it wasn't empty.
+ */
+
+ if (TclpRemoveDirectory(dst, 0, NULL) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now that that empty directory is gone, we can try
+ * renaming src. If that fails, we'll put this empty
+ * directory back, for completeness.
+ */
+
+ err = MoveRename(&srcFileSpec, &dstDirSpec, dstFileSpec.name);
+ if (err != noErr) {
+ FSpDirCreateCompat(&dstFileSpec, smSystemScript, &dummy);
+ if (dstLocked) {
+ FSpSetFLockCompat(&dstFileSpec);
+ }
+ }
+ } else {
+ errno = ENOTDIR;
+ return TCL_ERROR;
+ }
+ } else {
+ if (dstIsDirectory) {
+ errno = EISDIR;
+ return TCL_ERROR;
+ } else {
+ /*
+ * Overwrite existing file by:
+ *
+ * 1. Rename existing file to temp name.
+ * 2. Rename old file to new name.
+ * 3. If success, delete temp file. If failure,
+ * put temp file back to old name.
+ */
+
+ Str31 tmpName;
+ FSSpec tmpFileSpec;
+
+ err = GenerateUniqueName(dstFileSpec.vRefNum,
+ dstFileSpec.parID, dstFileSpec.parID, tmpName);
+ if (err == noErr) {
+ err = FSpRenameCompat(&dstFileSpec, tmpName);
+ }
+ if (err == noErr) {
+ err = FSMakeFSSpecCompat(dstFileSpec.vRefNum,
+ dstFileSpec.parID, tmpName, &tmpFileSpec);
+ }
+ if (err == noErr) {
+ err = MoveRename(&srcFileSpec, &dstDirSpec,
+ dstFileSpec.name);
+ }
+ if (err == noErr) {
+ FSpDeleteCompat(&tmpFileSpec);
+ } else {
+ FSpDeleteCompat(&dstFileSpec);
+ FSpRenameCompat(&tmpFileSpec, dstFileSpec.name);
+ if (dstLocked) {
+ FSpSetFLockCompat(&dstFileSpec);
+ }
+ }
+ }
+ }
+ }
+
+ end:
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpCopyFile --
+ *
+ * Copy a single file (not a directory). If dst already exists and
+ * is not a directory, it is removed.
+ *
+ * Results:
+ * If the file was successfully copied, returns TCL_OK. Otherwise
+ * the return value is TCL_ERROR and errno is set to indicate the
+ * error. Some possible values for errno are:
+ *
+ * EACCES: src or dst parent directory can't be read and/or written.
+ * EISDIR: src or dst is a directory.
+ * ENOENT: src doesn't exist. src or dst is "".
+ *
+ * Side effects:
+ * This procedure will also copy symbolic links, block, and
+ * character devices, and fifos. For symbolic links, the links
+ * themselves will be copied and not what they point to. For the
+ * other special file types, the directory entry will be copied and
+ * not the contents of the device that it refers to.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpCopyFile(
+ char *src, /* Pathname of file to be copied. */
+ char *dst) /* Pathname of file to copy to. */
+{
+ OSErr err, dstErr;
+ Boolean dstExists, dstIsDirectory, dstLocked;
+ FSSpec srcFileSpec, dstFileSpec, dstDirSpec, tmpFileSpec;
+ Str31 tmpName;
+
+ err = FSpLocationFromPath(strlen(src), src, &srcFileSpec);
+ if (err == noErr) {
+ err = GetFileSpecs(dst, &dstFileSpec, &dstDirSpec, &dstExists,
+ &dstIsDirectory);
+ }
+ if (dstExists) {
+ if (dstIsDirectory) {
+ errno = EISDIR;
+ return TCL_ERROR;
+ }
+ err = FSpGetFLockCompat(&dstFileSpec, &dstLocked);
+ if (dstLocked) {
+ FSpRstFLockCompat(&dstFileSpec);
+ }
+
+ /*
+ * Backup dest file.
+ */
+
+ dstErr = GenerateUniqueName(dstFileSpec.vRefNum, dstFileSpec.parID,
+ dstFileSpec.parID, tmpName);
+ if (dstErr == noErr) {
+ dstErr = FSpRenameCompat(&dstFileSpec, tmpName);
+ }
+ }
+ if (err == noErr) {
+ err = FSpFileCopy(&srcFileSpec, &dstDirSpec,
+ (StringPtr) dstFileSpec.name, NULL, 0, true);
+ }
+ if ((dstExists != false) && (dstErr == noErr)) {
+ FSMakeFSSpecCompat(dstFileSpec.vRefNum, dstFileSpec.parID,
+ tmpName, &tmpFileSpec);
+ if (err == noErr) {
+ /*
+ * Delete backup file.
+ */
+
+ FSpDeleteCompat(&tmpFileSpec);
+ } else {
+
+ /*
+ * Restore backup file.
+ */
+
+ FSpDeleteCompat(&dstFileSpec);
+ FSpRenameCompat(&tmpFileSpec, dstFileSpec.name);
+ if (dstLocked) {
+ FSpSetFLockCompat(&dstFileSpec);
+ }
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpDeleteFile --
+ *
+ * Removes a single file (not a directory).
+ *
+ * Results:
+ * If the file was successfully deleted, returns TCL_OK. Otherwise
+ * the return value is TCL_ERROR and errno is set to indicate the
+ * error. Some possible values for errno are:
+ *
+ * EACCES: a parent directory can't be read and/or written.
+ * EISDIR: path is a directory.
+ * ENOENT: path doesn't exist or is "".
+ *
+ * Side effects:
+ * The file is deleted, even if it is read-only.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpDeleteFile(
+ char *path) /* Pathname of file to be removed. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ Boolean isDirectory;
+ long dirID;
+
+ err = FSpLocationFromPath(strlen(path), path, &fileSpec);
+ if (err == noErr) {
+ /*
+ * Since FSpDeleteCompat will delete an empty directory, make sure
+ * that this isn't a directory first.
+ */
+
+ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ if (isDirectory == true) {
+ errno = EISDIR;
+ return TCL_ERROR;
+ }
+ }
+ err = FSpDeleteCompat(&fileSpec);
+ if (err == fLckdErr) {
+ FSpRstFLockCompat(&fileSpec);
+ err = FSpDeleteCompat(&fileSpec);
+ if (err != noErr) {
+ FSpSetFLockCompat(&fileSpec);
+ }
+ }
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpCreateDirectory --
+ *
+ * Creates the specified directory. All parent directories of the
+ * specified directory must already exist. The directory is
+ * automatically created with permissions so that user can access
+ * the new directory and create new files or subdirectories in it.
+ *
+ * Results:
+ * If the directory was successfully created, returns TCL_OK.
+ * Otherwise the return value is TCL_ERROR and errno is set to
+ * indicate the error. Some possible values for errno are:
+ *
+ * EACCES: a parent directory can't be read and/or written.
+ * EEXIST: path already exists.
+ * ENOENT: a parent directory doesn't exist.
+ *
+ * Side effects:
+ * A directory is created with the current umask, except that
+ * permission for u+rwx will always be added.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpCreateDirectory(
+ char *path) /* Pathname of directory to create. */
+{
+ OSErr err;
+ FSSpec dirSpec;
+ long outDirID;
+
+ err = FSpLocationFromPath(strlen(path), path, &dirSpec);
+ if (err == noErr) {
+ err = dupFNErr; /* EEXIST. */
+ } else if (err == fnfErr) {
+ err = FSpDirCreateCompat(&dirSpec, smSystemScript, &outDirID);
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpCopyDirectory --
+ *
+ * Recursively copies a directory. The target directory dst must
+ * not already exist. Note that this function does not merge two
+ * directory hierarchies, even if the target directory is an an
+ * empty directory.
+ *
+ * Results:
+ * If the directory was successfully copied, returns TCL_OK.
+ * Otherwise the return value is TCL_ERROR, errno is set to indicate
+ * the error, and the pathname of the file that caused the error
+ * is stored in errorPtr. See TclpCreateDirectory and TclpCopyFile
+ * for a description of possible values for errno.
+ *
+ * Side effects:
+ * An exact copy of the directory hierarchy src will be created
+ * with the name dst. If an error occurs, the error will
+ * be returned immediately, and remaining files will not be
+ * processed.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpCopyDirectory(
+ char *src, /* Pathname of directory to be copied. */
+ char *dst, /* Pathname of target directory. */
+ Tcl_DString *errorPtr) /* If non-NULL, initialized DString for
+ * error reporting. */
+{
+ OSErr err, saveErr;
+ long srcID, tmpDirID;
+ FSSpec srcFileSpec, dstFileSpec, dstDirSpec, tmpDirSpec, tmpFileSpec;
+ Boolean srcIsDirectory, srcLocked;
+ Boolean dstIsDirectory, dstExists;
+ Str31 tmpName;
+
+ err = FSpLocationFromPath(strlen(src), src, &srcFileSpec);
+ if (err == noErr) {
+ err = FSpGetDirectoryID(&srcFileSpec, &srcID, &srcIsDirectory);
+ }
+ if (err == noErr) {
+ if (srcIsDirectory == false) {
+ err = afpObjectTypeErr; /* ENOTDIR. */
+ }
+ }
+ if (err == noErr) {
+ err = GetFileSpecs(dst, &dstFileSpec, &dstDirSpec, &dstExists,
+ &dstIsDirectory);
+ }
+ if (dstExists) {
+ if (dstIsDirectory == false) {
+ err = afpObjectTypeErr; /* ENOTDIR. */
+ } else {
+ err = dupFNErr; /* EEXIST. */
+ }
+ }
+ if (err != noErr) {
+ goto done;
+ }
+ if ((srcFileSpec.vRefNum == dstFileSpec.vRefNum) &&
+ (srcFileSpec.parID == dstFileSpec.parID) &&
+ (Pstrequal(srcFileSpec.name, dstFileSpec.name) != 0)) {
+ /*
+ * Copying on top of self. No-op.
+ */
+
+ goto done;
+ }
+
+ /*
+ * This algorthm will work making a copy of the source directory in
+ * the current directory with a new name, in a new directory with the
+ * same name, and in a new directory with a new name:
+ *
+ * 1. Make dstDir/tmpDir.
+ * 2. Copy srcDir/src to dstDir/tmpDir/src
+ * 3. Rename dstDir/tmpDir/src to dstDir/tmpDir/dst (if necessary).
+ * 4. CatMove dstDir/tmpDir/dst to dstDir/dst.
+ * 5. Remove dstDir/tmpDir.
+ */
+
+ err = FSpGetFLockCompat(&srcFileSpec, &srcLocked);
+ if (srcLocked) {
+ FSpRstFLockCompat(&srcFileSpec);
+ }
+ if (err == noErr) {
+ err = GenerateUniqueName(dstFileSpec.vRefNum, dstFileSpec.parID,
+ dstFileSpec.parID, tmpName);
+ }
+ if (err == noErr) {
+ FSMakeFSSpecCompat(dstFileSpec.vRefNum, dstFileSpec.parID,
+ tmpName, &tmpDirSpec);
+ err = FSpDirCreateCompat(&tmpDirSpec, smSystemScript, &tmpDirID);
+ }
+ if (err == noErr) {
+ err = FSpDirectoryCopy(&srcFileSpec, &tmpDirSpec, NULL, 0, true,
+ CopyErrHandler);
+ }
+
+ /*
+ * Even if the Copy failed, Rename/Move whatever did get copied to the
+ * appropriate final destination, if possible.
+ */
+
+ saveErr = err;
+ err = noErr;
+ if (Pstrequal(srcFileSpec.name, dstFileSpec.name) == 0) {
+ err = FSMakeFSSpecCompat(tmpDirSpec.vRefNum, tmpDirID,
+ srcFileSpec.name, &tmpFileSpec);
+ if (err == noErr) {
+ err = FSpRenameCompat(&tmpFileSpec, dstFileSpec.name);
+ }
+ }
+ if (err == noErr) {
+ err = FSMakeFSSpecCompat(tmpDirSpec.vRefNum, tmpDirID,
+ dstFileSpec.name, &tmpFileSpec);
+ }
+ if (err == noErr) {
+ err = FSpCatMoveCompat(&tmpFileSpec, &dstDirSpec);
+ }
+ if (err == noErr) {
+ if (srcLocked) {
+ FSpSetFLockCompat(&dstFileSpec);
+ }
+ }
+
+ FSpDeleteCompat(&tmpDirSpec);
+
+ if (saveErr != noErr) {
+ err = saveErr;
+ }
+
+ done:
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ if (errorPtr != NULL) {
+ Tcl_DStringAppend(errorPtr, dst, -1);
+ }
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CopyErrHandler --
+ *
+ * This procedure is called from the MoreFiles procedure
+ * FSpDirectoryCopy whenever an error occurs.
+ *
+ * Results:
+ * False if the condition should not be considered an error, true
+ * otherwise.
+ *
+ * Side effects:
+ * Since FSpDirectoryCopy() is called only after removing any
+ * existing target directories, there shouldn't be any errors.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal Boolean
+CopyErrHandler(
+ OSErr error, /* Error that occured */
+ short failedOperation, /* operation that caused the error */
+ short srcVRefNum, /* volume ref number of source */
+ long srcDirID, /* directory id of source */
+ StringPtr srcName, /* name of source */
+ short dstVRefNum, /* volume ref number of dst */
+ long dstDirID, /* directory id of dst */
+ StringPtr dstName) /* name of dst directory */
+{
+ return true;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpRemoveDirectory --
+ *
+ * Removes directory (and its contents, if the recursive flag is set).
+ *
+ * Results:
+ * If the directory was successfully removed, returns TCL_OK.
+ * Otherwise the return value is TCL_ERROR, errno is set to indicate
+ * the error, and the pathname of the file that caused the error
+ * is stored in errorPtr. Some possible values for errno are:
+ *
+ * EACCES: path directory can't be read and/or written.
+ * EEXIST: path is a non-empty directory.
+ * EINVAL: path is a root directory.
+ * ENOENT: path doesn't exist or is "".
+ * ENOTDIR: path is not a directory.
+ *
+ * Side effects:
+ * Directory removed. If an error occurs, the error will be returned
+ * immediately, and remaining files will not be deleted.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpRemoveDirectory(
+ char *path, /* Pathname of directory to be removed. */
+ int recursive, /* If non-zero, removes directories that
+ * are nonempty. Otherwise, will only remove
+ * empty directories. */
+ Tcl_DString *errorPtr) /* If non-NULL, initialized DString for
+ * error reporting. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ long dirID;
+ int locked;
+ Boolean isDirectory;
+ CInfoPBRec pb;
+ Str255 fileName;
+
+ locked = 0;
+ err = FSpLocationFromPath(strlen(path), path, &fileSpec);
+ if (err != noErr) {
+ goto done;
+ }
+
+ /*
+ * Since FSpDeleteCompat will delete a file, make sure this isn't
+ * a file first.
+ */
+
+ isDirectory = 1;
+ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ if (isDirectory == 0) {
+ errno = ENOTDIR;
+ return TCL_ERROR;
+ }
+
+ err = FSpDeleteCompat(&fileSpec);
+ if (err == fLckdErr) {
+ locked = 1;
+ FSpRstFLockCompat(&fileSpec);
+ err = FSpDeleteCompat(&fileSpec);
+ }
+ if (err == noErr) {
+ return TCL_OK;
+ }
+ if (err != fBsyErr) {
+ goto done;
+ }
+
+ if (recursive == 0) {
+ /*
+ * fBsyErr means one of three things: file busy, directory not empty,
+ * or working directory control block open. Determine if directory
+ * is empty. If directory is not empty, return EEXIST.
+ */
+
+ pb.hFileInfo.ioVRefNum = fileSpec.vRefNum;
+ pb.hFileInfo.ioDirID = dirID;
+ pb.hFileInfo.ioNamePtr = (StringPtr) fileName;
+ pb.hFileInfo.ioFDirIndex = 1;
+ if (PBGetCatInfoSync(&pb) == noErr) {
+ err = dupFNErr; /* EEXIST */
+ goto done;
+ }
+ }
+
+ /*
+ * DeleteDirectory removes a directory and all its contents, including
+ * any locked files. There is no interface to get the name of the
+ * file that caused the error, if an error occurs deleting this tree,
+ * unless we rewrite DeleteDirectory ourselves.
+ */
+
+ err = DeleteDirectory(fileSpec.vRefNum, dirID, NULL);
+
+ done:
+ if (err != noErr) {
+ if (errorPtr != NULL) {
+ Tcl_DStringAppend(errorPtr, path, -1);
+ }
+ if (locked) {
+ FSpSetFLockCompat(&fileSpec);
+ }
+ errno = TclMacOSErrorToPosixError(err);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------------------
+ *
+ * MoveRename --
+ *
+ * Helper function for TclpRenameFile. Renames a file or directory
+ * into the same directory or another directory. The target name
+ * must not already exist in the destination directory.
+ *
+ * Don't use FSpMoveRenameCompat because it doesn't work with
+ * directories or with locked files.
+ *
+ * Results:
+ * Returns a mac error indicating the cause of the failure.
+ *
+ * Side effects:
+ * Creates a temp file in the target directory to handle a rename
+ * between directories.
+ *
+ *--------------------------------------------------------------------------
+ */
+
+static OSErr
+MoveRename(
+ const FSSpec *srcFileSpecPtr, /* Source object. */
+ const FSSpec *dstDirSpecPtr, /* Destination directory. */
+ StringPtr copyName) /* New name for object in destination
+ * directory. */
+{
+ OSErr err;
+ long srcID, dstID;
+ Boolean srcIsDir, dstIsDir;
+ Str31 tmpName;
+ FSSpec dstFileSpec, srcDirSpec, tmpSrcFileSpec, tmpDstFileSpec;
+ Boolean locked;
+
+ if (srcFileSpecPtr->parID == 1) {
+ /*
+ * Trying to rename a volume.
+ */
+
+ return badMovErr;
+ }
+ if (srcFileSpecPtr->vRefNum != dstDirSpecPtr->vRefNum) {
+ /*
+ * Renaming across volumes.
+ */
+
+ return diffVolErr;
+ }
+ err = FSpGetFLockCompat(srcFileSpecPtr, &locked);
+ if (locked) {
+ FSpRstFLockCompat(srcFileSpecPtr);
+ }
+ if (err == noErr) {
+ err = FSpGetDirectoryID(dstDirSpecPtr, &dstID, &dstIsDir);
+ }
+ if (err == noErr) {
+ if (srcFileSpecPtr->parID == dstID) {
+ /*
+ * Renaming object within directory.
+ */
+
+ err = FSpRenameCompat(srcFileSpecPtr, copyName);
+ goto done;
+ }
+ if (Pstrequal(srcFileSpecPtr->name, copyName)) {
+ /*
+ * Moving object to another directory (under same name).
+ */
+
+ err = FSpCatMoveCompat(srcFileSpecPtr, dstDirSpecPtr);
+ goto done;
+ }
+ err = FSpGetDirectoryID(srcFileSpecPtr, &srcID, &srcIsDir);
+ }
+ if (err == noErr) {
+ /*
+ * Fullblown: rename source object to temp name, move temp to
+ * dest directory, and rename temp to target.
+ */
+
+ err = GenerateUniqueName(srcFileSpecPtr->vRefNum,
+ srcFileSpecPtr->parID, dstID, tmpName);
+ FSMakeFSSpecCompat(srcFileSpecPtr->vRefNum, srcFileSpecPtr->parID,
+ tmpName, &tmpSrcFileSpec);
+ FSMakeFSSpecCompat(dstDirSpecPtr->vRefNum, dstID, tmpName,
+ &tmpDstFileSpec);
+ }
+ if (err == noErr) {
+ err = FSpRenameCompat(srcFileSpecPtr, tmpName);
+ }
+ if (err == noErr) {
+ err = FSpCatMoveCompat(&tmpSrcFileSpec, dstDirSpecPtr);
+ if (err == noErr) {
+ err = FSpRenameCompat(&tmpDstFileSpec, copyName);
+ if (err == noErr) {
+ goto done;
+ }
+ FSMakeFSSpecCompat(srcFileSpecPtr->vRefNum, srcFileSpecPtr->parID,
+ NULL, &srcDirSpec);
+ FSpCatMoveCompat(&tmpDstFileSpec, &srcDirSpec);
+ }
+ FSpRenameCompat(&tmpSrcFileSpec, srcFileSpecPtr->name);
+ }
+
+ done:
+ if (locked != false) {
+ if (err == noErr) {
+ FSMakeFSSpecCompat(dstDirSpecPtr->vRefNum,
+ dstID, copyName, &dstFileSpec);
+ FSpSetFLockCompat(&dstFileSpec);
+ } else {
+ FSpSetFLockCompat(srcFileSpecPtr);
+ }
+ }
+ return err;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * GetFileSpecs --
+ *
+ * Generate a filename that is not in either of the two specified
+ * directories (on the same volume).
+ *
+ * Results:
+ * Standard macintosh error. On success, uniqueName is filled with
+ * the name of the temporary file.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+static OSErr
+GenerateUniqueName(
+ short vRefNum, /* Volume on which the following directories
+ * are located. */
+ long dirID1, /* ID of first directory. */
+ long dirID2, /* ID of second directory. May be the same
+ * as the first. */
+ Str31 uniqueName) /* Filled with filename for a file that is
+ * not located in either of the above two
+ * directories. */
+{
+ OSErr err;
+ long i;
+ CInfoPBRec pb;
+ static unsigned char hexStr[16] = "0123456789ABCDEF";
+ static long startSeed = 248923489;
+
+ pb.hFileInfo.ioVRefNum = vRefNum;
+ pb.hFileInfo.ioFDirIndex = 0;
+ pb.hFileInfo.ioNamePtr = uniqueName;
+
+ while (1) {
+ startSeed++;
+ pb.hFileInfo.ioNamePtr[0] = 8;
+ for (i = 1; i <= 8; i++) {
+ pb.hFileInfo.ioNamePtr[i] = hexStr[((startSeed >> ((8-i)*4)) & 0xf)];
+ }
+ pb.hFileInfo.ioDirID = dirID1;
+ err = PBGetCatInfoSync(&pb);
+ if (err == fnfErr) {
+ if (dirID1 != dirID2) {
+ pb.hFileInfo.ioDirID = dirID2;
+ err = PBGetCatInfoSync(&pb);
+ }
+ if (err == fnfErr) {
+ return noErr;
+ }
+ }
+ if (err == noErr) {
+ continue;
+ }
+ return err;
+ }
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * GetFileSpecs --
+ *
+ * Gets FSSpecs for the specified path and its parent directory.
+ *
+ * Results:
+ * The return value is noErr if there was no error getting FSSpecs,
+ * otherwise it is an error describing the problem. Fills buffers
+ * with information, as above.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+static OSErr
+GetFileSpecs(
+ char *path, /* The path to query. */
+ FSSpec *pathSpecPtr, /* Filled with information about path. */
+ FSSpec *dirSpecPtr, /* Filled with information about path's
+ * parent directory. */
+ Boolean *pathExistsPtr, /* Set to true if path actually exists,
+ * false if it doesn't or there was an
+ * error reading the specified path. */
+ Boolean *pathIsDirectoryPtr)/* Set to true if path is itself a directory,
+ * otherwise false. */
+{
+ char *dirName;
+ OSErr err;
+ int argc;
+ char **argv;
+ long d;
+ Tcl_DString buffer;
+
+ *pathExistsPtr = false;
+ *pathIsDirectoryPtr = false;
+
+ Tcl_DStringInit(&buffer);
+ Tcl_SplitPath(path, &argc, &argv);
+ if (argc == 1) {
+ dirName = ":";
+ } else {
+ dirName = Tcl_JoinPath(argc - 1, argv, &buffer);
+ }
+ err = FSpLocationFromPath(strlen(dirName), dirName, dirSpecPtr);
+ Tcl_DStringFree(&buffer);
+ ckfree((char *) argv);
+
+ if (err == noErr) {
+ err = FSpLocationFromPath(strlen(path), path, pathSpecPtr);
+ if (err == noErr) {
+ *pathExistsPtr = true;
+ err = FSpGetDirectoryID(pathSpecPtr, &d, pathIsDirectoryPtr);
+ } else if (err == fnfErr) {
+ err = noErr;
+ }
+ }
+ return err;
+}
+
+/*
+ *-------------------------------------------------------------------------
+ *
+ * FSpGetFLockCompat --
+ *
+ * Determines if there exists a software lock on the specified
+ * file. The software lock could prevent the file from being
+ * renamed or moved.
+ *
+ * Results:
+ * Standard macintosh error code.
+ *
+ * Side effects:
+ * None.
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+
+OSErr
+FSpGetFLockCompat(
+ const FSSpec *specPtr, /* File to query. */
+ Boolean *lockedPtr) /* Set to true if file is locked, false
+ * if it isn't or there was an error reading
+ * specified file. */
+{
+ CInfoPBRec pb;
+ OSErr err;
+
+ pb.hFileInfo.ioVRefNum = specPtr->vRefNum;
+ pb.hFileInfo.ioDirID = specPtr->parID;
+ pb.hFileInfo.ioNamePtr = (StringPtr) specPtr->name;
+ pb.hFileInfo.ioFDirIndex = 0;
+
+ err = PBGetCatInfoSync(&pb);
+ if ((err == noErr) && (pb.hFileInfo.ioFlAttrib & 0x01)) {
+ *lockedPtr = true;
+ } else {
+ *lockedPtr = false;
+ }
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Pstrequal --
+ *
+ * Pascal string compare.
+ *
+ * Results:
+ * Returns 1 if strings equal, 0 otherwise.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+Pstrequal (
+ ConstStr255Param stringA, /* Pascal string A */
+ ConstStr255Param stringB) /* Pascal string B */
+{
+ int i, len;
+
+ len = *stringA;
+ for (i = 0; i <= len; i++) {
+ if (*stringA++ != *stringB++) {
+ return 0;
+ }
+ }
+ return 1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetFileFinderAttributes --
+ *
+ * Returns a Tcl_Obj containing the value of a file attribute
+ * which is part of the FInfo record. Which attribute is controlled
+ * by objIndex.
+ *
+ * Results:
+ * Returns a standard TCL error. If the return value is TCL_OK,
+ * the new creator or file type object is put into attributePtrPtr.
+ * The object will have ref count 0. If there is an error,
+ * attributePtrPtr is not touched.
+ *
+ * Side effects:
+ * A new object is allocated if the file is valid.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+GetFileFinderAttributes(
+ Tcl_Interp *interp, /* The interp to report errors with. */
+ int objIndex, /* The index of the attribute option. */
+ char *fileName, /* The name of the file. */
+ Tcl_Obj **attributePtrPtr) /* A pointer to return the object with. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ FInfo finfo;
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+
+ if (err == noErr) {
+ err = FSpGetFInfo(&fileSpec, &finfo);
+ }
+
+ if (err == noErr) {
+ switch (objIndex) {
+ case MAC_CREATOR_ATTRIBUTE:
+ *attributePtrPtr = Tcl_NewOSTypeObj(finfo.fdCreator);
+ break;
+ case MAC_HIDDEN_ATTRIBUTE:
+ *attributePtrPtr = Tcl_NewBooleanObj(finfo.fdFlags
+ & kIsInvisible);
+ break;
+ case MAC_TYPE_ATTRIBUTE:
+ *attributePtrPtr = Tcl_NewOSTypeObj(finfo.fdType);
+ break;
+ }
+ } else if (err == fnfErr) {
+ long dirID;
+ Boolean isDirectory = 0;
+
+ err = FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ if ((err == noErr) && isDirectory) {
+ if (objIndex == MAC_HIDDEN_ATTRIBUTE) {
+ *attributePtrPtr = Tcl_NewBooleanObj(0);
+ } else {
+ *attributePtrPtr = Tcl_NewOSTypeObj('Fldr');
+ }
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "couldn't get attributes for file \"", fileName, "\": ",
+ Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetFileReadOnly --
+ *
+ * Returns a Tcl_Obj containing a Boolean value indicating whether
+ * or not the file is read-only. The object will have ref count 0.
+ * This procedure just checks the Finder attributes; it does not
+ * check AppleShare sharing attributes.
+ *
+ * Results:
+ * Returns a standard TCL error. If the return value is TCL_OK,
+ * the new creator type object is put into readOnlyPtrPtr.
+ * If there is an error, readOnlyPtrPtr is not touched.
+ *
+ * Side effects:
+ * A new object is allocated if the file is valid.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+GetFileReadOnly(
+ Tcl_Interp *interp, /* The interp to report errors with. */
+ int objIndex, /* The index of the attribute. */
+ char *fileName, /* The name of the file. */
+ Tcl_Obj **readOnlyPtrPtr) /* A pointer to return the object with. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ CInfoPBRec paramBlock;
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+
+ if (err == noErr) {
+ if (err == noErr) {
+ paramBlock.hFileInfo.ioCompletion = NULL;
+ paramBlock.hFileInfo.ioNamePtr = fileSpec.name;
+ paramBlock.hFileInfo.ioVRefNum = fileSpec.vRefNum;
+ paramBlock.hFileInfo.ioFDirIndex = 0;
+ paramBlock.hFileInfo.ioDirID = fileSpec.parID;
+ err = PBGetCatInfo(&paramBlock, 0);
+ if (err == noErr) {
+
+ /*
+ * For some unknown reason, the Mac does not give
+ * symbols for the bits in the ioFlAttrib field.
+ * 1 -> locked.
+ */
+
+ *readOnlyPtrPtr = Tcl_NewBooleanObj(
+ paramBlock.hFileInfo.ioFlAttrib & 1);
+ }
+ }
+ }
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "couldn't get attributes for file \"", fileName, "\": ",
+ Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SetFileFinderAttributes --
+ *
+ * Sets the file to the creator or file type given by attributePtr.
+ * objIndex determines whether the creator or file type is set.
+ *
+ * Results:
+ * Returns a standard TCL error.
+ *
+ * Side effects:
+ * The file's attribute is set.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SetFileFinderAttributes(
+ Tcl_Interp *interp, /* The interp to report errors with. */
+ int objIndex, /* The index of the attribute. */
+ char *fileName, /* The name of the file. */
+ Tcl_Obj *attributePtr) /* The command line object. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ FInfo finfo;
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+
+ if (err == noErr) {
+ err = FSpGetFInfo(&fileSpec, &finfo);
+ }
+
+ if (err == noErr) {
+ switch (objIndex) {
+ case MAC_CREATOR_ATTRIBUTE:
+ if (Tcl_GetOSTypeFromObj(interp, attributePtr,
+ &finfo.fdCreator) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ break;
+ case MAC_HIDDEN_ATTRIBUTE: {
+ int hidden;
+
+ if (Tcl_GetBooleanFromObj(interp, attributePtr, &hidden)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (hidden) {
+ finfo.fdFlags |= kIsInvisible;
+ } else {
+ finfo.fdFlags &= ~kIsInvisible;
+ }
+ break;
+ }
+ case MAC_TYPE_ATTRIBUTE:
+ if (Tcl_GetOSTypeFromObj(interp, attributePtr,
+ &finfo.fdType) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ break;
+ }
+ err = FSpSetFInfo(&fileSpec, &finfo);
+ } else if (err == fnfErr) {
+ long dirID;
+ Boolean isDirectory = 0;
+
+ err = FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ if ((err == noErr) && isDirectory) {
+ Tcl_Obj *resultPtr = Tcl_GetObjResult(interp);
+ Tcl_AppendStringsToObj(resultPtr, "cannot set ",
+ tclpFileAttrStrings[objIndex], ": \"",
+ fileName, "\" is a directory", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "couldn't set attributes for file \"", fileName, "\": ",
+ Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SetFileReadOnly --
+ *
+ * Sets the file to be read-only according to the Boolean value
+ * given by hiddenPtr.
+ *
+ * Results:
+ * Returns a standard TCL error.
+ *
+ * Side effects:
+ * The file's attribute is set.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SetFileReadOnly(
+ Tcl_Interp *interp, /* The interp to report errors with. */
+ int objIndex, /* The index of the attribute. */
+ char *fileName, /* The name of the file. */
+ Tcl_Obj *readOnlyPtr) /* The command line object. */
+{
+ OSErr err;
+ FSSpec fileSpec;
+ HParamBlockRec paramBlock;
+ int hidden;
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+
+ if (err == noErr) {
+ if (Tcl_GetBooleanFromObj(interp, readOnlyPtr, &hidden) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ paramBlock.fileParam.ioCompletion = NULL;
+ paramBlock.fileParam.ioNamePtr = fileSpec.name;
+ paramBlock.fileParam.ioVRefNum = fileSpec.vRefNum;
+ paramBlock.fileParam.ioDirID = fileSpec.parID;
+ if (hidden) {
+ err = PBHSetFLock(&paramBlock, 0);
+ } else {
+ err = PBHRstFLock(&paramBlock, 0);
+ }
+ }
+
+ if (err == fnfErr) {
+ long dirID;
+ Boolean isDirectory = 0;
+ err = FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ if ((err == noErr) && isDirectory) {
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "cannot set a directory to read-only when File Sharing is turned off",
+ (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ err = fnfErr;
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "couldn't set attributes for file \"", fileName, "\": ",
+ Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclpListVolumes --
+ *
+ * Lists the currently mounted volumes
+ *
+ * Results:
+ * A standard Tcl result. Will always be TCL_OK, since there is no way
+ * that this command can fail. Also, the interpreter's result is set to
+ * the list of volumes.
+ *
+ * Side effects:
+ * None
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclpListVolumes(
+ Tcl_Interp *interp) /* Interpreter to which to pass the volume list */
+{
+ HParamBlockRec pb;
+ Str255 name;
+ OSErr theError = noErr;
+ Tcl_Obj *resultPtr, *elemPtr;
+ short volIndex = 1;
+
+ resultPtr = Tcl_NewObj();
+
+ /*
+ * We use two facts:
+ * 1) The Mac volumes are enumerated by the ioVolIndex parameter of
+ * the HParamBlockRec. They run through the integers contiguously,
+ * starting at 1.
+ * 2) PBHGetVInfoSync returns an error when you ask for a volume index
+ * that does not exist.
+ *
+ */
+
+ while ( 1 ) {
+ pb.volumeParam.ioNamePtr = (StringPtr) & name;
+ pb.volumeParam.ioVolIndex = volIndex;
+
+ theError = PBHGetVInfoSync(&pb);
+
+ if ( theError != noErr ) {
+ break;
+ }
+
+ elemPtr = Tcl_NewStringObj((char *) name + 1, (int) name[0]);
+ Tcl_AppendToObj(elemPtr, ":", 1);
+ Tcl_ListObjAppendElement(interp, resultPtr, elemPtr);
+
+ volIndex++;
+ }
+
+ Tcl_SetObjResult(interp, resultPtr);
+ return TCL_OK;
+}
+
diff --git a/mac/tclMacFile.c b/mac/tclMacFile.c
new file mode 100644
index 0000000..3d4a22b
--- /dev/null
+++ b/mac/tclMacFile.c
@@ -0,0 +1,840 @@
+/*
+ * tclMacFile.c --
+ *
+ * This file implements the channel drivers for Macintosh
+ * files. It also comtains Macintosh version of other Tcl
+ * functions that deal with the file system.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacFile.c 1.57 97/04/23 16:23:05
+ */
+
+/*
+ * Note: This code eventually needs to support async I/O. In doing this
+ * we will need to keep track of all current async I/O. If exit to shell
+ * is called - we shouldn't exit until all asyc I/O completes.
+ */
+
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMacInt.h"
+#include <Aliases.h>
+#include <Errors.h>
+#include <Processes.h>
+#include <Strings.h>
+#include <Types.h>
+#include <MoreFiles.h>
+#include <MoreFilesExtras.h>
+#include <FSpCompat.h>
+
+/*
+ * Static variables used by the TclMacStat function.
+ */
+static int initalized = false;
+static long gmt_offset;
+
+/*
+ * The variable below caches the name of the current working directory
+ * in order to avoid repeated calls to getcwd. The string is malloc-ed.
+ * NULL means the cache needs to be refreshed.
+ */
+
+static char *currentDir = NULL;
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclChdir --
+ *
+ * Change the current working directory.
+ *
+ * Results:
+ * The result is a standard Tcl result. If an error occurs and
+ * interp isn't NULL, an error message is left in interp->result.
+ *
+ * Side effects:
+ * The working directory for this application is changed. Also
+ * the cache maintained used by TclGetCwd is deallocated and
+ * set to NULL.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclChdir(
+ Tcl_Interp *interp, /* If non NULL, used for error reporting. */
+ char *dirName) /* Path to new working directory. */
+{
+ FSSpec spec;
+ OSErr err;
+ Boolean isFolder;
+ long dirID;
+
+ if (currentDir != NULL) {
+ ckfree(currentDir);
+ currentDir = NULL;
+ }
+
+ err = FSpLocationFromPath(strlen(dirName), dirName, &spec);
+ if (err != noErr) {
+ errno = ENOENT;
+ goto chdirError;
+ }
+
+ err = FSpGetDirectoryID(&spec, &dirID, &isFolder);
+ if (err != noErr) {
+ errno = ENOENT;
+ goto chdirError;
+ }
+
+ if (isFolder != true) {
+ errno = ENOTDIR;
+ goto chdirError;
+ }
+
+ err = FSpSetDefaultDir(&spec);
+ if (err != noErr) {
+ switch (err) {
+ case afpAccessDenied:
+ errno = EACCES;
+ break;
+ default:
+ errno = ENOENT;
+ }
+ goto chdirError;
+ }
+
+ return TCL_OK;
+ chdirError:
+ if (interp != NULL) {
+ Tcl_AppendResult(interp, "couldn't change working directory to \"",
+ dirName, "\": ", Tcl_PosixError(interp), (char *) NULL);
+ }
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetCwd --
+ *
+ * Return the path name of the current working directory.
+ *
+ * Results:
+ * The result is the full path name of the current working
+ * directory, or NULL if an error occurred while figuring it
+ * out. If an error occurs and interp isn't NULL, an error
+ * message is left in interp->result.
+ *
+ * Side effects:
+ * The path name is cached to avoid having to recompute it
+ * on future calls; if it is already cached, the cached
+ * value is returned.
+ *
+ *----------------------------------------------------------------------
+ */
+
+char *
+TclGetCwd(
+ Tcl_Interp *interp) /* If non NULL, used for error reporting. */
+{
+ FSSpec theSpec;
+ int length;
+ Handle pathHandle = NULL;
+
+ if (currentDir == NULL) {
+ if (FSpGetDefaultDir(&theSpec) != noErr) {
+ if (interp != NULL) {
+ interp->result = "error getting working directory name";
+ }
+ return NULL;
+ }
+ if (FSpPathFromLocation(&theSpec, &length, &pathHandle) != noErr) {
+ if (interp != NULL) {
+ interp->result = "error getting working directory name";
+ }
+ return NULL;
+ }
+ HLock(pathHandle);
+ currentDir = (char *) ckalloc((unsigned) (length + 1));
+ strcpy(currentDir, *pathHandle);
+ HUnlock(pathHandle);
+ DisposeHandle(pathHandle);
+ }
+ return currentDir;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_WaitPid --
+ *
+ * Fakes a call to wait pid.
+ *
+ * Results:
+ * Always returns -1.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Pid
+Tcl_WaitPid(
+ Tcl_Pid pid,
+ int *statPtr,
+ int options)
+{
+ return (Tcl_Pid) -1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_FindExecutable --
+ *
+ * This procedure computes the absolute path name of the current
+ * application, given its argv[0] value. However, this
+ * implementation doesn't use of need the argv[0] value. NULL
+ * may be passed in its place.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The variable tclExecutableName gets filled in with the file
+ * name for the application, if we figured it out. If we couldn't
+ * figure it out, Tcl_FindExecutable is set to NULL.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_FindExecutable(
+ char *argv0) /* The value of the application's argv[0]. */
+{
+ ProcessSerialNumber psn;
+ ProcessInfoRec info;
+ Str63 appName;
+ FSSpec fileSpec;
+ int pathLength;
+ Handle pathName = NULL;
+ OSErr err;
+
+ GetCurrentProcess(&psn);
+ info.processInfoLength = sizeof(ProcessInfoRec);
+ info.processName = appName;
+ info.processAppSpec = &fileSpec;
+ GetProcessInformation(&psn, &info);
+
+ if (tclExecutableName != NULL) {
+ ckfree(tclExecutableName);
+ tclExecutableName = NULL;
+ }
+
+ err = FSpPathFromLocation(&fileSpec, &pathLength, &pathName);
+
+ tclExecutableName = (char *) ckalloc((unsigned) pathLength + 1);
+ HLock(pathName);
+ strcpy(tclExecutableName, *pathName);
+ HUnlock(pathName);
+ DisposeHandle(pathName);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGetUserHome --
+ *
+ * This function takes the passed in user name and finds the
+ * corresponding home directory specified in the password file.
+ *
+ * Results:
+ * On a Macintosh we always return a NULL.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+char *
+TclGetUserHome(
+ char *name, /* User name to use to find home directory. */
+ Tcl_DString *bufferPtr) /* May be used to hold result. Must not hold
+ * anything at the time of the call, and need
+ * not even be initialized. */
+{
+ return NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMatchFiles --
+ *
+ * This routine is used by the globbing code to search a
+ * directory for all files which match a given pattern.
+ *
+ * Results:
+ * If the tail argument is NULL, then the matching files are
+ * added to the interp->result. Otherwise, TclDoGlob is called
+ * recursively for each matching subdirectory. The return value
+ * is a standard Tcl result indicating whether an error occurred
+ * in globbing.
+ *
+ * Side effects:
+ * None.
+ *
+ *---------------------------------------------------------------------- */
+
+int
+TclMatchFiles(
+ Tcl_Interp *interp, /* Interpreter to receive results. */
+ char *separators, /* Directory separators to pass to TclDoGlob. */
+ Tcl_DString *dirPtr, /* Contains path to directory to search. */
+ char *pattern, /* Pattern to match against. */
+ char *tail) /* Pointer to end of pattern. Tail must
+ * point to a location in pattern. */
+{
+ char *dirName, *patternEnd = tail;
+ char savedChar;
+ int result = TCL_OK;
+ int baseLength = Tcl_DStringLength(dirPtr);
+ CInfoPBRec pb;
+ OSErr err;
+ FSSpec dirSpec;
+ Boolean isDirectory;
+ long dirID;
+ short itemIndex;
+ Str255 fileName;
+
+
+ /*
+ * Make sure that the directory part of the name really is a
+ * directory.
+ */
+
+ dirName = dirPtr->string;
+ FSpLocationFromPath(strlen(dirName), dirName, &dirSpec);
+ err = FSpGetDirectoryID(&dirSpec, &dirID, &isDirectory);
+ if ((err != noErr) || !isDirectory) {
+ return TCL_OK;
+ }
+
+ /*
+ * Now open the directory for reading and iterate over the contents.
+ */
+
+ pb.hFileInfo.ioVRefNum = dirSpec.vRefNum;
+ pb.hFileInfo.ioDirID = dirID;
+ pb.hFileInfo.ioNamePtr = (StringPtr) fileName;
+ pb.hFileInfo.ioFDirIndex = itemIndex = 1;
+
+ /*
+ * Clean up the end of the pattern and the tail pointer. Leave
+ * the tail pointing to the first character after the path separator
+ * following the pattern, or NULL. Also, ensure that the pattern
+ * is null-terminated.
+ */
+
+ if (*tail == '\\') {
+ tail++;
+ }
+ if (*tail == '\0') {
+ tail = NULL;
+ } else {
+ tail++;
+ }
+ savedChar = *patternEnd;
+ *patternEnd = '\0';
+
+ while (1) {
+ pb.hFileInfo.ioFDirIndex = itemIndex;
+ pb.hFileInfo.ioDirID = dirID;
+ err = PBGetCatInfoSync(&pb);
+ if (err != noErr) {
+ break;
+ }
+
+ /*
+ * Now check to see if the file matches. If there are more
+ * characters to be processed, then ensure matching files are
+ * directories before calling TclDoGlob. Otherwise, just add
+ * the file to the result.
+ */
+
+ p2cstr(fileName);
+ if (Tcl_StringMatch((char *) fileName, pattern)) {
+ Tcl_DStringSetLength(dirPtr, baseLength);
+ Tcl_DStringAppend(dirPtr, (char *) fileName, -1);
+ if (tail == NULL) {
+ if ((dirPtr->length > 1) &&
+ (strchr(dirPtr->string+1, ':') == NULL)) {
+ Tcl_AppendElement(interp, dirPtr->string+1);
+ } else {
+ Tcl_AppendElement(interp, dirPtr->string);
+ }
+ } else if ((pb.hFileInfo.ioFlAttrib & ioDirMask) != 0) {
+ Tcl_DStringAppend(dirPtr, ":", 1);
+ result = TclDoGlob(interp, separators, dirPtr, tail);
+ if (result != TCL_OK) {
+ break;
+ }
+ }
+ }
+
+ itemIndex++;
+ }
+ *patternEnd = savedChar;
+
+ return result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacStat --
+ *
+ * This function replaces the library version of stat. The stat
+ * function provided by most Mac compiliers is rather broken and
+ * incomplete.
+ *
+ * Results:
+ * See stat documentation.
+ *
+ * Side effects:
+ * See stat documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacStat(
+ char *path,
+ struct stat *buf)
+{
+ HFileInfo fpb;
+ HVolumeParam vpb;
+ OSErr err;
+ FSSpec fileSpec;
+ Boolean isDirectory;
+ long dirID;
+
+ err = FSpLocationFromPath(strlen(path), path, &fileSpec);
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ }
+
+ /*
+ * Fill the fpb & vpb struct up with info about file or directory.
+ */
+
+ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ vpb.ioVRefNum = fpb.ioVRefNum = fileSpec.vRefNum;
+ vpb.ioNamePtr = fpb.ioNamePtr = fileSpec.name;
+ if (isDirectory) {
+ fpb.ioDirID = fileSpec.parID;
+ } else {
+ fpb.ioDirID = dirID;
+ }
+
+ fpb.ioFDirIndex = 0;
+ err = PBGetCatInfoSync((CInfoPBPtr)&fpb);
+ if (err == noErr) {
+ vpb.ioVolIndex = 0;
+ err = PBHGetVInfoSync((HParmBlkPtr)&vpb);
+ if (err == noErr && buf != NULL) {
+ /*
+ * Files are always readable by everyone.
+ */
+
+ buf->st_mode = S_IRUSR | S_IRGRP | S_IROTH;
+
+ /*
+ * Use the Volume Info & File Info to fill out stat buf.
+ */
+ if (fpb.ioFlAttrib & 0x10) {
+ buf->st_mode |= S_IFDIR;
+ buf->st_nlink = 2;
+ } else {
+ buf->st_nlink = 1;
+ if (fpb.ioFlFndrInfo.fdFlags & 0x8000) {
+ buf->st_mode |= S_IFLNK;
+ } else {
+ buf->st_mode |= S_IFREG;
+ }
+ }
+ if ((fpb.ioFlAttrib & 0x10) || (fpb.ioFlFndrInfo.fdType == 'APPL')) {
+ /*
+ * Directories and applications are executable by everyone.
+ */
+
+ buf->st_mode |= S_IXUSR | S_IXGRP | S_IXOTH;
+ }
+ if ((fpb.ioFlAttrib & 0x01) == 0){
+ /*
+ * If not locked, then everyone has write acces.
+ */
+
+ buf->st_mode |= S_IWUSR | S_IWGRP | S_IWOTH;
+ }
+ buf->st_ino = fpb.ioDirID;
+ buf->st_dev = fpb.ioVRefNum;
+ buf->st_uid = -1;
+ buf->st_gid = -1;
+ buf->st_rdev = 0;
+ buf->st_size = fpb.ioFlLgLen;
+ buf->st_blksize = vpb.ioVAlBlkSiz;
+ buf->st_blocks = (buf->st_size + buf->st_blksize - 1)
+ / buf->st_blksize;
+
+ /*
+ * The times returned by the Mac file system are in the
+ * local time zone. We convert them to GMT so that the
+ * epoch starts from GMT. This is also consistant with
+ * what is returned from "clock seconds".
+ */
+ if (initalized == false) {
+ MachineLocation loc;
+
+ ReadLocation(&loc);
+ gmt_offset = loc.u.gmtDelta & 0x00ffffff;
+ if (gmt_offset & 0x00800000) {
+ gmt_offset = gmt_offset | 0xff000000;
+ }
+ initalized = true;
+ }
+ buf->st_atime = buf->st_mtime = fpb.ioFlMdDat - gmt_offset;
+ buf->st_ctime = fpb.ioFlCrDat - gmt_offset;
+
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ }
+
+ return (err == noErr ? 0 : -1);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacReadlink --
+ *
+ * This function replaces the library version of readlink.
+ *
+ * Results:
+ * See readlink documentation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacReadlink(
+ char *path,
+ char *buf,
+ int size)
+{
+ HFileInfo fpb;
+ OSErr err;
+ FSSpec fileSpec;
+ Boolean isDirectory;
+ Boolean wasAlias;
+ long dirID;
+ char fileName[256];
+ char *end;
+ Handle theString = NULL;
+ int pathSize;
+
+ /*
+ * Remove ending colons if they exist.
+ */
+ while ((strlen(path) != 0) && (path[strlen(path) - 1] == ':')) {
+ path[strlen(path) - 1] = NULL;
+ }
+
+ if (strchr(path, ':') == NULL) {
+ strcpy(fileName, path);
+ path = NULL;
+ } else {
+ end = strrchr(path, ':') + 1;
+ strcpy(fileName, end);
+ *end = NULL;
+ }
+ c2pstr(fileName);
+
+ /*
+ * Create the file spec for the directory of the file
+ * we want to look at.
+ */
+ if (path != NULL) {
+ err = FSpLocationFromPath(strlen(path), path, &fileSpec);
+ if (err != noErr) {
+ errno = EINVAL;
+ return -1;
+ }
+ } else {
+ FSMakeFSSpecCompat(0, 0, NULL, &fileSpec);
+ }
+
+ /*
+ * Fill the fpb struct up with info about file or directory.
+ */
+ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ fpb.ioVRefNum = fileSpec.vRefNum;
+ fpb.ioDirID = dirID;
+ fpb.ioNamePtr = (StringPtr) fileName;
+
+ fpb.ioFDirIndex = 0;
+ err = PBGetCatInfoSync((CInfoPBPtr)&fpb);
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ } else {
+ if (fpb.ioFlAttrib & 0x10) {
+ errno = EINVAL;
+ return -1;
+ } else {
+ if (fpb.ioFlFndrInfo.fdFlags & 0x8000) {
+ /*
+ * The file is a link!
+ */
+ } else {
+ errno = EINVAL;
+ return -1;
+ }
+ }
+ }
+
+ /*
+ * If we are here it's really a link - now find out
+ * where it points to.
+ */
+ err = FSMakeFSSpecCompat(fileSpec.vRefNum, dirID, (StringPtr) fileName, &fileSpec);
+ if (err == noErr) {
+ err = ResolveAliasFile(&fileSpec, true, &isDirectory, &wasAlias);
+ }
+ if ((err == fnfErr) || wasAlias) {
+ err = FSpPathFromLocation(&fileSpec, &pathSize, &theString);
+ if ((err != noErr) || (pathSize > size)) {
+ DisposeHandle(theString);
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+ } else {
+ errno = EINVAL;
+ return -1;
+ }
+
+ strncpy(buf, *theString, pathSize);
+ DisposeHandle(theString);
+
+ return pathSize;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacAccess --
+ *
+ * This function replaces the library version of access. The
+ * access function provided by most Mac compiliers is rather
+ * broken or incomplete.
+ *
+ * Results:
+ * See access documentation.
+ *
+ * Side effects:
+ * See access documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacAccess(
+ const char *path,
+ int mode)
+{
+ HFileInfo fpb;
+ HVolumeParam vpb;
+ OSErr err;
+ FSSpec fileSpec;
+ Boolean isDirectory;
+ long dirID;
+ int full_mode = 0;
+
+ err = FSpLocationFromPath(strlen(path), (char *) path, &fileSpec);
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ }
+
+ /*
+ * Fill the fpb & vpb struct up with info about file or directory.
+ */
+ FSpGetDirectoryID(&fileSpec, &dirID, &isDirectory);
+ vpb.ioVRefNum = fpb.ioVRefNum = fileSpec.vRefNum;
+ vpb.ioNamePtr = fpb.ioNamePtr = fileSpec.name;
+ if (isDirectory) {
+ fpb.ioDirID = fileSpec.parID;
+ } else {
+ fpb.ioDirID = dirID;
+ }
+
+ fpb.ioFDirIndex = 0;
+ err = PBGetCatInfoSync((CInfoPBPtr)&fpb);
+ if (err == noErr) {
+ vpb.ioVolIndex = 0;
+ err = PBHGetVInfoSync((HParmBlkPtr)&vpb);
+ if (err == noErr) {
+ /*
+ * Use the Volume Info & File Info to determine
+ * access information. If we have got this far
+ * we know the directory is searchable or the file
+ * exists. (We have F_OK)
+ */
+
+ /*
+ * Check to see if the volume is hardware or
+ * software locked. If so we arn't W_OK.
+ */
+ if (mode & W_OK) {
+ if ((vpb.ioVAtrb & 0x0080) || (vpb.ioVAtrb & 0x8000)) {
+ errno = EROFS;
+ return -1;
+ }
+ if (fpb.ioFlAttrib & 0x01) {
+ errno = EACCES;
+ return -1;
+ }
+ }
+
+ /*
+ * Directories are always searchable and executable. But only
+ * files of type 'APPL' are executable.
+ */
+ if (!(fpb.ioFlAttrib & 0x10) && (mode & X_OK)
+ && (fpb.ioFlFndrInfo.fdType != 'APPL')) {
+ return -1;
+ }
+ }
+ }
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacFOpenHack --
+ *
+ * This function replaces fopen. It supports paths with alises.
+ * Note, remember to undefine the fopen macro!
+ *
+ * Results:
+ * See fopen documentation.
+ *
+ * Side effects:
+ * See fopen documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#undef fopen
+FILE *
+TclMacFOpenHack(
+ const char *path,
+ const char *mode)
+{
+ OSErr err;
+ FSSpec fileSpec;
+ Handle pathString = NULL;
+ int size;
+ FILE * f;
+
+ err = FSpLocationFromPath(strlen(path), (char *) path, &fileSpec);
+ if ((err != noErr) && (err != fnfErr)) {
+ return NULL;
+ }
+ err = FSpPathFromLocation(&fileSpec, &size, &pathString);
+ if ((err != noErr) && (err != fnfErr)) {
+ return NULL;
+ }
+
+ HLock(pathString);
+ f = fopen(*pathString, mode);
+ HUnlock(pathString);
+ DisposeHandle(pathString);
+ return f;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacOSErrorToPosixError --
+ *
+ * Given a Macintosh OSErr return the appropiate POSIX error.
+ *
+ * Results:
+ * A Posix error.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacOSErrorToPosixError(
+ int error) /* A Macintosh error. */
+{
+ switch (error) {
+ case noErr:
+ return 0;
+ case bdNamErr:
+ return ENAMETOOLONG;
+ case afpObjectTypeErr:
+ return ENOTDIR;
+ case fnfErr:
+ case dirNFErr:
+ return ENOENT;
+ case dupFNErr:
+ return EEXIST;
+ case dirFulErr:
+ case dskFulErr:
+ return ENOSPC;
+ case fBsyErr:
+ return EBUSY;
+ case tmfoErr:
+ return ENFILE;
+ case fLckdErr:
+ case permErr:
+ case afpAccessDenied:
+ return EACCES;
+ case wPrErr:
+ case vLckdErr:
+ return EROFS;
+ case badMovErr:
+ return EINVAL;
+ case diffVolErr:
+ return EXDEV;
+ default:
+ return EINVAL;
+ }
+}
diff --git a/mac/tclMacInit.c b/mac/tclMacInit.c
new file mode 100644
index 0000000..9dc6bd0
--- /dev/null
+++ b/mac/tclMacInit.c
@@ -0,0 +1,284 @@
+/*
+ * tclMacInit.c --
+ *
+ * Contains the Mac-specific interpreter initialization functions.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacInit.c 1.39 97/09/23 13:17:30
+ */
+
+#include <Files.h>
+#include <Gestalt.h>
+#include <TextUtils.h>
+#include <Resources.h>
+#include <Strings.h>
+#include "tclInt.h"
+#include "tclMacInt.h"
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclPlatformInit --
+ *
+ * Performs Mac-specific interpreter initialization related to the
+ * tcl_platform and tcl_library variables.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Sets "tcl_library" & "tcl_platfrom" Tcl variable
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclPlatformInit(
+ Tcl_Interp *interp) /* Tcl interpreter to initialize. */
+{
+ char *libDir;
+ Tcl_DString path, libPath;
+ long int gestaltResult;
+ int minor, major;
+ char versStr[10];
+
+ /*
+ * Set runtime C variable that tells cross platform C functions
+ * what platform they are running on. This can change at
+ * runtime for testing purposes.
+ */
+ tclPlatform = TCL_PLATFORM_MAC;
+
+ /*
+ * Define the tcl_platfrom variable.
+ */
+ Tcl_SetVar2(interp, "tcl_platform", "platform", "macintosh",
+ TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "tcl_platform", "os", "MacOS", TCL_GLOBAL_ONLY);
+ Gestalt(gestaltSystemVersion, &gestaltResult);
+ major = (gestaltResult & 0x0000FF00) >> 8;
+ minor = (gestaltResult & 0x000000F0) >> 4;
+ sprintf(versStr, "%d.%d", major, minor);
+ Tcl_SetVar2(interp, "tcl_platform", "osVersion", versStr, TCL_GLOBAL_ONLY);
+#if GENERATINGPOWERPC
+ Tcl_SetVar2(interp, "tcl_platform", "machine", "ppc", TCL_GLOBAL_ONLY);
+#else
+ Tcl_SetVar2(interp, "tcl_platform", "machine", "68k", TCL_GLOBAL_ONLY);
+#endif
+
+ /*
+ * The tcl_library path can be found in one of two places. As an element
+ * in the env array. Or the default which is to a folder in side the
+ * Extensions folder of your system.
+ */
+
+ Tcl_DStringInit(&path);
+ libDir = Tcl_GetVar2(interp, "env", "TCL_LIBRARY", TCL_GLOBAL_ONLY);
+ if (libDir != NULL) {
+ Tcl_SetVar(interp, "tcl_library", libDir, TCL_GLOBAL_ONLY);
+ } else {
+ libDir = Tcl_GetVar2(interp, "env", "EXT_FOLDER", TCL_GLOBAL_ONLY);
+ if (libDir != NULL) {
+ Tcl_JoinPath(1, &libDir, &path);
+
+ Tcl_DStringInit(&libPath);
+ Tcl_DStringAppend(&libPath, ":Tool Command Language:tcl", -1);
+ Tcl_DStringAppend(&libPath, TCL_VERSION, -1);
+ Tcl_JoinPath(1, &libPath.string, &path);
+ Tcl_DStringFree(&libPath);
+ Tcl_SetVar(interp, "tcl_library", path.string, TCL_GLOBAL_ONLY);
+ } else {
+ Tcl_SetVar(interp, "tcl_library", "no library", TCL_GLOBAL_ONLY);
+ }
+ }
+
+ /*
+ * Now create the tcl_pkgPath variable.
+ */
+ Tcl_DStringSetLength(&path, 0);
+ libDir = Tcl_GetVar2(interp, "env", "EXT_FOLDER", TCL_GLOBAL_ONLY);
+ if (libDir != NULL) {
+ Tcl_JoinPath(1, &libDir, &path);
+ libDir = ":Tool Command Language:";
+ Tcl_JoinPath(1, &libDir, &path);
+ Tcl_SetVar(interp, "tcl_pkgPath", path.string,
+ TCL_GLOBAL_ONLY|TCL_LIST_ELEMENT);
+ } else {
+ Tcl_SetVar(interp, "tcl_pkgPath", "no extension folder",
+ TCL_GLOBAL_ONLY|TCL_LIST_ELEMENT);
+ }
+ Tcl_DStringFree(&path);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpCheckStackSpace --
+ *
+ * On a 68K Mac, we can detect if we are about to blow the stack.
+ * Called before an evaluation can happen when nesting depth is
+ * checked.
+ *
+ * Results:
+ * 1 if there is enough stack space to continue; 0 if not.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclpCheckStackSpace()
+{
+ return StackSpace() > TCL_MAC_STACK_THRESHOLD;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_Init --
+ *
+ * This procedure is typically invoked by Tcl_AppInit procedures
+ * to perform additional initialization for a Tcl interpreter,
+ * such as sourcing the "init.tcl" script.
+ *
+ * Results:
+ * Returns a standard Tcl completion code and sets interp->result
+ * if there is an error.
+ *
+ * Side effects:
+ * Depends on what's in the init.tcl script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_Init(
+ Tcl_Interp *interp) /* Interpreter to initialize. */
+{
+ static char initCmd[] =
+ "if {[catch {source -rsrc Init}] != 0} {\n\
+ if [file exists [info library]:init.tcl] {\n\
+ source [info library]:init.tcl\n\
+ } else {\n\
+ set msg \"can't find Init resource or [info library]:init.tcl;\"\n\
+ append msg \" perhaps you need to\\ninstall Tcl or set your \"\n\
+ append msg \"TCL_LIBRARY environment variable?\"\n\
+ error $msg\n\
+ }\n}\n\
+ if {[catch {source -rsrc History}] != 0} {\n\
+ if [file exists [info library]:history.tcl] {\n\
+ source [info library]:history.tcl\n\
+ } else {\n\
+ set msg \"can't find History resource or [info library]:history.tcl;\"\n\
+ append msg \" perhaps you need to\\ninstall Tcl or set your \"\n\
+ append msg \"TCL_LIBRARY environment variable?\"\n\
+ error $msg\n\
+ }\n}\n\
+ if {[catch {source -rsrc Word}] != 0} {\n\
+ if [file exists [info library]:word.tcl] {\n\
+ source [info library]:word.tcl\n\
+ } else {\n\
+ set msg \"can't find Word resource or [info library]:word.tcl;\"\n\
+ append msg \" perhaps you need to\\ninstall Tcl or set your \"\n\
+ append msg \"TCL_LIBRARY environment variable?\"\n\
+ error $msg\n\
+ }\n}";
+
+ /*
+ * For Macintosh applications the Init function may be contained in
+ * the application resources. If it exists we use it - otherwise we
+ * look in the tcl_library directory. Ditto for the history command.
+ */
+
+ return Tcl_Eval(interp, initCmd);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_SourceRCFile --
+ *
+ * This procedure is typically invoked by Tcl_Main or Tk_Main
+ * procedure to source an application specific rc file into the
+ * interpreter at startup time. This will either source a file
+ * in the "tcl_rcFileName" variable or a TEXT resource in the
+ * "tcl_rcRsrcName" variable.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Depends on what's in the rc script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_SourceRCFile(
+ Tcl_Interp *interp) /* Interpreter to source rc file into. */
+{
+ Tcl_DString temp;
+ char *fileName;
+ Tcl_Channel errChannel;
+ Handle h;
+
+ fileName = Tcl_GetVar(interp, "tcl_rcFileName", TCL_GLOBAL_ONLY);
+
+ if (fileName != NULL) {
+ Tcl_Channel c;
+ char *fullName;
+
+ Tcl_DStringInit(&temp);
+ fullName = Tcl_TranslateFileName(interp, fileName, &temp);
+ if (fullName == NULL) {
+ /*
+ * Couldn't translate the file name (e.g. it referred to a
+ * bogus user or there was no HOME environment variable).
+ * Just do nothing.
+ */
+ } else {
+
+ /*
+ * Test for the existence of the rc file before trying to read it.
+ */
+
+ c = Tcl_OpenFileChannel(NULL, fullName, "r", 0);
+ if (c != (Tcl_Channel) NULL) {
+ Tcl_Close(NULL, c);
+ if (Tcl_EvalFile(interp, fullName) != TCL_OK) {
+ errChannel = Tcl_GetStdChannel(TCL_STDERR);
+ if (errChannel) {
+ Tcl_Write(errChannel, interp->result, -1);
+ Tcl_Write(errChannel, "\n", 1);
+ }
+ }
+ }
+ }
+ Tcl_DStringFree(&temp);
+ }
+
+ fileName = Tcl_GetVar(interp, "tcl_rcRsrcName", TCL_GLOBAL_ONLY);
+
+ if (fileName != NULL) {
+ c2pstr(fileName);
+ h = GetNamedResource('TEXT', (StringPtr) fileName);
+ p2cstr((StringPtr) fileName);
+ if (h != NULL) {
+ if (Tcl_MacEvalResource(interp, fileName, 0, NULL) != TCL_OK) {
+ errChannel = Tcl_GetStdChannel(TCL_STDERR);
+ if (errChannel) {
+ Tcl_Write(errChannel, interp->result, -1);
+ Tcl_Write(errChannel, "\n", 1);
+ }
+ }
+ Tcl_ResetResult(interp);
+ ReleaseResource(h);
+ }
+ }
+}
diff --git a/mac/tclMacInt.h b/mac/tclMacInt.h
new file mode 100644
index 0000000..d4d43b4
--- /dev/null
+++ b/mac/tclMacInt.h
@@ -0,0 +1,79 @@
+/*
+ * tclMacInt.h --
+ *
+ * Declarations of Macintosh specific shared variables and procedures.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacInt.h 1.24 97/09/09 16:22:01
+ */
+
+#ifndef _TCLMACINT
+#define _TCLMACINT
+
+#ifndef _TCL
+# include "tcl.h"
+#endif
+#ifndef _TCLMAC
+# include "tclMac.h"
+#endif
+
+#include <Events.h>
+#include <Files.h>
+
+#pragma export on
+
+/*
+ * Defines to control stack behavior
+ */
+
+#define TCL_MAC_68K_STACK_GROWTH (256*1024)
+#define TCL_MAC_STACK_THRESHOLD 16384
+
+/*
+ * This flag is passed to TclMacRegisterResourceFork
+ * by a file (usually a library) whose resource fork
+ * should not be closed by the resource command.
+ */
+
+#define TCL_RESOURCE_DONT_CLOSE 2
+
+/*
+ * Typedefs used by Macintosh parts of Tcl.
+ */
+typedef pascal void (*ExitToShellProcPtr)(void);
+
+/*
+ * Prototypes for functions found in the tclMacUtil.c compatability library.
+ */
+
+EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
+EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec));
+EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, OSType folderType,
+ Boolean createFolder, FSSpec *spec));
+EXTERN void GetGlobalMouse _ANSI_ARGS_((Point *mouse));
+
+/*
+ * Prototypes of Mac only internal functions.
+ */
+
+EXTERN void TclCreateMacEventSource _ANSI_ARGS_((void));
+EXTERN int TclMacConsoleInit _ANSI_ARGS_((void));
+EXTERN void TclMacExitHandler _ANSI_ARGS_((void));
+EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch));
+EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_((
+ ExitToShellProcPtr newProc));
+EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error));
+EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void *timerToken));
+EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms));
+EXTERN int TclMacTimerExpired _ANSI_ARGS_((void *timerToken));
+EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_((short fileRef, Tcl_Obj *tokenPtr,
+ int insert));
+EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_((char *tokenPtr, Tcl_Obj *resultPtr));
+
+#pragma export reset
+
+#endif /* _TCLMACINT */
diff --git a/mac/tclMacInterupt.c b/mac/tclMacInterupt.c
new file mode 100644
index 0000000..97620f8
--- /dev/null
+++ b/mac/tclMacInterupt.c
@@ -0,0 +1,289 @@
+/*
+ * tclMacInterupt.c --
+ *
+ * This file contains routines that deal with the Macintosh's low level
+ * time manager. This code provides a better resolution timer than what
+ * can be provided by WaitNextEvent.
+ *
+ * Copyright (c) 1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacInterupt.c 1.16 96/12/12 19:22:01
+ */
+
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include <LowMem.h>
+#include <Processes.h>
+#include <Timer.h>
+
+/*
+ * Data structure for timer tasks.
+ */
+typedef struct TMInfo {
+ TMTask tmTask;
+ ProcessSerialNumber psn;
+ Point lastPoint;
+ Point newPoint;
+ long currentA5;
+ long ourA5;
+ int installed;
+} TMInfo;
+
+/*
+ * Globals used within this file.
+ */
+
+static TimerUPP sleepTimerProc = NULL;
+static int interuptsInited = false;
+static ProcessSerialNumber applicationPSN;
+#define MAX_TIMER_ARRAY_SIZE 16
+static TMInfo timerInfoArray[MAX_TIMER_ARRAY_SIZE];
+static int topTimerElement = 0;
+
+/*
+ * Prototypes for procedures that are referenced only in this file:
+ */
+
+#if !GENERATINGCFM
+static TMInfo * GetTMInfo(void) ONEWORDINLINE(0x2E89); /* MOVE.L A1,(SP) */
+#endif
+static void SleepTimerProc _ANSI_ARGS_((void));
+static pascal void CleanUpExitProc _ANSI_ARGS_((void));
+static void InitInteruptSystem _ANSI_ARGS_((void));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * InitInteruptSystem --
+ *
+ * Does various initialization for the functions used in this
+ * file. Sets up Universial Pricedure Pointers, installs a trap
+ * patch for ExitToShell, etc.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Various initialization.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+InitInteruptSystem()
+{
+ int i;
+
+ sleepTimerProc = NewTimerProc(SleepTimerProc);
+ GetCurrentProcess(&applicationPSN);
+ for (i = 0; i < MAX_TIMER_ARRAY_SIZE; i++) {
+ timerInfoArray[i].installed = false;
+ }
+
+ /*
+ * Install the ExitToShell patch. We use this patch instead
+ * of the Tcl exit mechanism because we need to ensure that
+ * these routines are cleaned up even if we crash or are forced
+ * to quit. There are some circumstances when the Tcl exit
+ * handlers may not fire.
+ */
+
+ TclMacInstallExitToShellPatch(CleanUpExitProc);
+ interuptsInited = true;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacStartTimer --
+ *
+ * Install a Time Manager task to wake our process up in the
+ * future. The process should get a NULL event after ms
+ * milliseconds.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Schedules our process to wake up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void *
+TclMacStartTimer(
+ long ms) /* Milliseconds. */
+{
+ TMInfo *timerInfoPtr;
+
+ if (!interuptsInited) {
+ InitInteruptSystem();
+ }
+
+ /*
+ * Obtain a pointer for the timer. We only allocate up
+ * to MAX_TIMER_ARRAY_SIZE timers. If we are past that
+ * max we return NULL.
+ */
+ if (topTimerElement < MAX_TIMER_ARRAY_SIZE) {
+ timerInfoPtr = &timerInfoArray[topTimerElement];
+ topTimerElement++;
+ } else {
+ return NULL;
+ }
+
+ /*
+ * Install timer to wake process in ms milliseconds.
+ */
+ timerInfoPtr->tmTask.tmAddr = sleepTimerProc;
+ timerInfoPtr->tmTask.tmWakeUp = 0;
+ timerInfoPtr->tmTask.tmReserved = 0;
+ timerInfoPtr->psn = applicationPSN;
+ timerInfoPtr->installed = true;
+
+ InsTime((QElemPtr) timerInfoPtr);
+ PrimeTime((QElemPtr) timerInfoPtr, (long) ms);
+
+ return (void *) timerInfoPtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacRemoveTimer --
+ *
+ * Remove the timer event from the Time Manager.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A scheduled timer would be removed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclMacRemoveTimer(
+ void * timerToken) /* Token got from start timer. */
+{
+ TMInfo *timerInfoPtr = (TMInfo *) timerToken;
+
+ if (timerInfoPtr == NULL) {
+ return;
+ }
+
+ RmvTime((QElemPtr) timerInfoPtr);
+ timerInfoPtr->installed = false;
+ topTimerElement--;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacTimerExpired --
+ *
+ * Check to see if the installed timer has expired.
+ *
+ * Results:
+ * True if timer has expired, false otherwise.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacTimerExpired(
+ void * timerToken) /* Our token again. */
+{
+ TMInfo *timerInfoPtr = (TMInfo *) timerToken;
+
+ if ((timerInfoPtr == NULL) ||
+ !(timerInfoPtr->tmTask.qType & kTMTaskActive)) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SleepTimerProc --
+ *
+ * Time proc is called by the is a callback routine placed in the
+ * system by Tcl_Sleep. The routine is called at interupt time
+ * and threrfor can not move or allocate memory. This call will
+ * schedule our process to wake up the next time the process gets
+ * around to consider running it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Schedules our process to wake up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SleepTimerProc()
+{
+ /*
+ * In CFM code we can access our code directly. In 68k code that
+ * isn't based on CFM we must do a glorious hack. The function
+ * GetTMInfo is an inline assembler call that moves the pointer
+ * at A1 to the top of the stack. The Time Manager keeps the TMTask
+ * info record there before calling this call back. In order for
+ * this to work the infoPtr argument must be the *last* item on the
+ * stack. If we "piggyback" our data to the TMTask info record we
+ * can get access to the information we need. While this is really
+ * ugly - it's the way Apple recomends it be done - go figure...
+ */
+
+#if GENERATINGCFM
+ WakeUpProcess(&applicationPSN);
+#else
+ TMInfo * infoPtr;
+
+ infoPtr = GetTMInfo();
+ WakeUpProcess(&infoPtr->psn);
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CleanUpExitProc --
+ *
+ * This procedure is invoked as an exit handler when ExitToShell
+ * is called. It removes the system level timer handler if it
+ * is installed. This must be called or the Mac OS will more than
+ * likely crash.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal void
+CleanUpExitProc()
+{
+ int i;
+
+ for (i = 0; i < MAX_TIMER_ARRAY_SIZE; i++) {
+ if (timerInfoArray[i].installed) {
+ RmvTime((QElemPtr) &timerInfoArray[i]);
+ timerInfoArray[i].installed = false;
+ }
+ }
+}
diff --git a/mac/tclMacLibrary.c b/mac/tclMacLibrary.c
new file mode 100644
index 0000000..c49aae6
--- /dev/null
+++ b/mac/tclMacLibrary.c
@@ -0,0 +1,241 @@
+/*
+ * tclMacLibrary.c --
+ *
+ * This file should be included in Tcl extensions that want to
+ * automatically oepn their resource forks when the code is linked.
+ * These routines should not be exported but should be compiled
+ * locally by each fragment. Many thanks to Jay Lieske
+ * <lieske@princeton.edu> who provide an initial version of this
+ * file.
+ *
+ * Copyright (c) 1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacLibrary.c 1.6 97/11/20 19:29:42
+ */
+
+/*
+ * Here is another place that we are using the old routine names...
+ */
+
+#define OLDROUTINENAMES 1
+
+#include <CodeFragments.h>
+#include <Errors.h>
+#include <Resources.h>
+#include <Strings.h>
+#include "tclMacInt.h"
+
+/*
+ * These function are not currently defined in any header file. The
+ * only place they should be used is in the Initialization and
+ * Termination entry points for a code fragment. The prototypes
+ * are included here to avoid compile errors.
+ */
+
+OSErr TclMacInitializeFragment _ANSI_ARGS_((
+ struct CFragInitBlock* initBlkPtr));
+void TclMacTerminateFragment _ANSI_ARGS_((void));
+
+/*
+ * Static functions in this file.
+ */
+
+static OSErr OpenLibraryResource _ANSI_ARGS_((
+ struct CFragInitBlock* initBlkPtr));
+static void CloseLibraryResource _ANSI_ARGS_((void));
+
+/*
+ * The refnum of the opened resource fork.
+ */
+static short ourResFile = kResFileNotOpened;
+
+/*
+ * This is the resource token for the our resource file.
+ * It stores the name we registered with the resource facility.
+ * We only need to use this if we are actually registering ourselves.
+ */
+
+#ifdef TCL_REGISTER_LIBRARY
+static Tcl_Obj *ourResToken;
+#endif
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacInitializeFragment --
+ *
+ * Called by MacOS CFM when the shared library is loaded. All this
+ * function really does is give Tcl a chance to open and register
+ * the resource fork of the library.
+ *
+ * Results:
+ * MacOS error code if loading should be canceled.
+ *
+ * Side effects:
+ * Opens the resource fork of the shared library file.
+ *
+ *----------------------------------------------------------------------
+ */
+
+OSErr
+TclMacInitializeFragment(
+ struct CFragInitBlock* initBlkPtr) /* Pointer to our library. */
+{
+ OSErr err = noErr;
+
+#ifdef __MWERKS__
+ {
+ extern OSErr __initialize( CFragInitBlock* initBlkPtr);
+ err = __initialize((CFragInitBlock *) initBlkPtr);
+ }
+#endif
+ if (err == noErr)
+ err = OpenLibraryResource( initBlkPtr);
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacTerminateFragment --
+ *
+ * Called by MacOS CFM when the shared library is unloaded.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The resource fork of the code fragment is closed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclMacTerminateFragment()
+{
+ CloseLibraryResource();
+
+#ifdef __MWERKS__
+ {
+ extern void __terminate(void);
+ __terminate();
+ }
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * OpenLibraryResource --
+ *
+ * This routine can be called by a MacOS fragment's initialiation
+ * function to open the resource fork of the file.
+ * Call it with the same data passed to the initialization function.
+ * If the fragment loading should fail if the resource fork can't
+ * be opened, then the initialization function can pass on this
+ * return value.
+ *
+ * If you #define TCL_REGISTER_RESOURCE before compiling this resource,
+ * then your library will register its open resource fork with the
+ * resource command.
+ *
+ * Results:
+ * It returns noErr on success and a MacOS error code on failure.
+ *
+ * Side effects:
+ * The resource fork of the code fragment is opened read-only and
+ * is installed at the head of the resource chain.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OSErr
+OpenLibraryResource(
+ struct CFragInitBlock* initBlkPtr)
+{
+ /*
+ * The 3.0 version of the Universal headers changed CFragInitBlock
+ * to an opaque pointer type. CFragSystem7InitBlock is now the
+ * real pointer.
+ */
+
+#if !defined(UNIVERSAL_INTERFACES_VERSION) || (UNIVERSAL_INTERFACES_VERSION < 0x0300)
+ struct CFragInitBlock *realInitBlkPtr = initBlkPtr;
+#else
+ CFragSystem7InitBlock *realInitBlkPtr = (CFragSystem7InitBlock *) initBlkPtr;
+#endif
+ FSSpec* fileSpec = NULL;
+ OSErr err = noErr;
+
+
+ if (realInitBlkPtr->fragLocator.where == kOnDiskFlat) {
+ fileSpec = realInitBlkPtr->fragLocator.u.onDisk.fileSpec;
+ } else if (realInitBlkPtr->fragLocator.where == kOnDiskSegmented) {
+ fileSpec = realInitBlkPtr->fragLocator.u.inSegs.fileSpec;
+ } else {
+ err = resFNotFound;
+ }
+
+ /*
+ * Open the resource fork for this library in read-only mode.
+ * This will make it the current res file, ahead of the
+ * application's own resources.
+ */
+
+ if (fileSpec != NULL) {
+ ourResFile = FSpOpenResFile(fileSpec, fsRdPerm);
+ if (ourResFile == kResFileNotOpened) {
+ err = ResError();
+ } else {
+#ifdef TCL_REGISTER_LIBRARY
+ ourResToken = Tcl_NewObj();
+ Tcl_IncrRefCount(ourResToken);
+ p2cstr(realInitBlkPtr->libName);
+ Tcl_SetStringObj(ourResToken, (char *) realInitBlkPtr->libName, -1);
+ c2pstr((char *) realInitBlkPtr->libName);
+ TclMacRegisterResourceFork(ourResFile, ourResToken,
+ TCL_RESOURCE_DONT_CLOSE);
+#endif
+ SetResFileAttrs(ourResFile, mapReadOnly);
+ }
+ }
+
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CloseLibraryResource --
+ *
+ * This routine should be called by a MacOS fragment's termination
+ * function to close the resource fork of the file
+ * that was opened with OpenLibraryResource.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The resource fork of the code fragment is closed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+CloseLibraryResource()
+{
+ if (ourResFile != kResFileNotOpened) {
+#ifdef TCL_REGISTER_LIBRARY
+ int length;
+ TclMacUnRegisterResourceFork(
+ Tcl_GetStringFromObj(ourResToken, &length),
+ NULL);
+ Tcl_DecrRefCount(ourResToken);
+#endif
+ CloseResFile(ourResFile);
+ ourResFile = kResFileNotOpened;
+ }
+}
diff --git a/mac/tclMacLibrary.r b/mac/tclMacLibrary.r
new file mode 100644
index 0000000..b83118d
--- /dev/null
+++ b/mac/tclMacLibrary.r
@@ -0,0 +1,223 @@
+/*
+ * tclMacLibrary.r --
+ *
+ * This file creates resources used by the Tcl shared library.
+ * Many thanks go to "Jay Lieske, Jr." <lieske@princeton.edu> who
+ * wrote the initial version of this file.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacLibrary.r 1.5 97/09/23 12:53:28
+ */
+
+#include <Types.r>
+#include <SysTypes.r>
+
+/*
+ * The folowing include and defines help construct
+ * the version string for Tcl.
+ */
+
+#define RESOURCE_INCLUDED
+#include "tcl.h"
+
+#if (TCL_RELEASE_LEVEL == 0)
+# define RELEASE_LEVEL alpha
+#elif (TCL_RELEASE_LEVEL == 1)
+# define RELEASE_LEVEL beta
+#elif (TCL_RELEASE_LEVEL == 2)
+# define RELEASE_LEVEL final
+#endif
+
+#if (TCL_RELEASE_LEVEL == 2)
+# define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
+#else
+# define MINOR_VERSION TCL_MINOR_VERSION * 16
+#endif
+
+resource 'vers' (1) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
+};
+
+resource 'vers' (2) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ "Tcl Library " TCL_PATCH_LEVEL " © 1996"
+};
+
+/*
+ * Currently the creator for all Tcl/Tk libraries and extensions
+ * should be 'TclL'. This will allow those extension and libraries
+ * to use the common icon for Tcl extensions. However, this signature
+ * still needs to be approved by the signature police at Apple and may
+ * change.
+ */
+#define TCL_CREATOR 'TclL'
+#define TCL_LIBRARY_RESOURCES 2000
+
+/*
+ * The 'BNDL' resource is the primary link between a file's
+ * creator/type and its icon. This resource acts for all Tcl shared
+ * libraries; other libraries will not need one and ought to use
+ * custom icons rather than new file types for a different appearance.
+ */
+
+resource 'BNDL' (TCL_LIBRARY_RESOURCES, "Tcl bundle", purgeable)
+{
+ TCL_CREATOR,
+ 0,
+ { /* array TypeArray: 2 elements */
+ /* [1] */
+ 'FREF',
+ { /* array IDArray: 1 elements */
+ /* [1] */
+ 0, TCL_LIBRARY_RESOURCES
+ },
+ /* [2] */
+ 'ICN#',
+ { /* array IDArray: 1 elements */
+ /* [1] */
+ 0, TCL_LIBRARY_RESOURCES
+ }
+ }
+};
+
+resource 'FREF' (TCL_LIBRARY_RESOURCES, purgeable)
+{
+ 'shlb', 0, ""
+};
+
+type TCL_CREATOR as 'STR ';
+resource TCL_CREATOR (0, purgeable) {
+ "Tcl Library " TCL_PATCH_LEVEL " © 1996"
+};
+
+/*
+ * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open
+ * to affect the text the Finder displays in the "kind" column and
+ * file info dialog. This information will be applied to all files
+ * with the listed creator and type.
+ */
+
+resource 'kind' (TCL_LIBRARY_RESOURCES, "Tcl kind", purgeable) {
+ TCL_CREATOR,
+ 0, /* region = USA */
+ {
+ 'shlb', "Tcl Library"
+ }
+};
+
+
+/*
+ * The -16397 string will be displayed by Finder when a user
+ * tries to open the shared library. The string should
+ * give the user a little detail about the library's capabilities
+ * and enough information to install the library in the correct location.
+ * A similar string should be placed in all shared libraries.
+ */
+resource 'STR ' (-16397, purgeable) {
+ "Tcl Library\n\n"
+ "This is the core library needed to run Tool Command Language programs. "
+ "To work properly, it should be placed in the ÔTool Command LanguageÕ folder "
+ "within the Extensions folder."
+};
+
+/*
+ * The mechanisim below loads Tcl source into the resource fork of the
+ * application. The example below creates a TEXT resource named
+ * "Init" from the file "init.tcl". This allows applications to use
+ * Tcl to define the behavior of the application without having to
+ * require some predetermined file structure - all needed Tcl "files"
+ * are located within the application. To source a file for the
+ * resource fork the source command has been modified to support
+ * sourcing from resources. In the below case "source -rsrc {Init}"
+ * will load the TEXT resource named "Init".
+ */
+
+read 'TEXT' (TCL_LIBRARY_RESOURCES, "Init", purgeable) "::library:init.tcl";
+read 'TEXT' (TCL_LIBRARY_RESOURCES + 1, "History", purgeable) "::library:history.tcl";
+read 'TEXT' (TCL_LIBRARY_RESOURCES + 2, "Word", purgeable,preload) "::library:word.tcl";
+
+/*
+ * The following are icons for the shared library.
+ */
+
+data 'icl4' (2000, "Tcl Shared Library", purgeable) {
+ $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
+ $"F000 0000 0000 0000 0000 0000 000C F000"
+ $"F0CC CFFF CCCC CCC6 66CC CCCC CCCC F000"
+ $"F0CC CFFF FFFF FF66 F6CC CCCC CCCC F000"
+ $"F0CC CFFF 2000 0D66 6CCC CCCC CCCC F000"
+ $"F0CC CFFF 0202 056F 6E5C CCCC CCCC F000"
+ $"F0CC CFFF 2020 C666 F66F CCCC CCCC F000"
+ $"F0CC CFFF 0200 B66F 666B FCCC CCCC F000"
+ $"F0FC CFFF B020 55F6 6F52 BFCC CCCC F000"
+ $"FF0F 0CCC FB02 5665 66D0 2FCC CCCC F0F0"
+ $"F00F 0CCC CFB0 BF55 F6CF FFCC CCCC FFCF"
+ $"000F 0CCC CCFB 06C9 66CC CCCC CCCC F0CF"
+ $"000F 0CCC CCCF 56C6 6CCC CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 6FC6 FCCC CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 65C5 65CC CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 55D6 57CC CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 65CF 6CCC CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 5AC6 6CFF CCCC CCCC CCCF"
+ $"000F 0CCC CCCC 65C5 6CF0 FCCC CCCC CCCF"
+ $"000F 0CCC CCCC CECF CCF0 0FCC CCCC CCCF"
+ $"000F 0CCC CCCC C5C6 CCCF 20FC CCCC FCCF"
+ $"F00F 0CCC CCCF FFD5 CCCC F20F CCCC FFCF"
+ $"FF0F 0CCC CCCF 20CF CCCC F020 FCCC F0F0"
+ $"F0F0 CCCC CCCF B2C2 FFFF 0002 0FFC F000"
+ $"F00C CCCC CCCC FBC0 2000 0020 2FFC F000"
+ $"F0CC CCCC CCCC CFCB 0202 0202 0FFC F000"
+ $"F0CC CCCC CCCC CCCF B020 2020 2FFC F000"
+ $"F0CC CCCC CCCC CCDC FBBB BBBB BFFC F000"
+ $"F0CC CCCC CCCC CCCC CFFF FFFF FFFC F000"
+ $"F0CC CCCC CCCC CCCC CCCC CCCC CFFC F000"
+ $"FCCC CCCC CCCC CCCC CCCC CCCC CCCC F000"
+ $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF 0000"
+};
+
+data 'ICN#' (2000, "Tcl Shared Library", purgeable) {
+ $"7FFF FFF0 8000 0008 8701 C008 87FF C008"
+ $"8703 8008 8707 E008 8707 F008 870F F808"
+ $"A78F EC08 D0CF C40A 906F DC0D 1035 C009"
+ $"101D 8001 100D 8001 100D C001 100D C001"
+ $"100D 8001 100D B001 100D A801 1005 2401"
+ $"1005 1209 901D 090D D011 088A A018 F068"
+ $"800C 0068 8005 0068 8001 8068 8000 FFE8"
+ $"8000 7FE8 8000 0068 8000 0008 7FFF FFF0"
+ $"7FFF FFF0 FFFF FFF8 FFFF FFF8 FFFF FFF8"
+ $"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
+ $"FFFF FFF8 DFFF FFFA 9FFF FFFF 1FFF FFFF"
+ $"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
+ $"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
+ $"1FFF FFFF 9FFF FFFF DFFF FFFA FFFF FFF8"
+ $"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
+ $"FFFF FFF8 FFFF FFF8 FFFF FFF8 7FFF FFF0"
+};
+
+data 'ics#' (2000, "Tcl Shared Library", purgeable) {
+ $"FFFE B582 BB82 B3C2 BFA2 43C3 4381 4381"
+ $"4381 4763 4392 856E 838E 81AE 811E FFFE"
+ $"FFFE FFFE FFFE FFFE FFFE FFFF 7FFF 7FFF"
+ $"7FFF 7FFF 7FFF FFFE FFFE FFFE FFFE FFFE"
+};
+
+data 'ics4' (2000, "Tcl Shared Library", purgeable) {
+ $"FFFF FFFF FFFF FFF0 FCFF DED5 6CCC CCF0"
+ $"FCFF C0D6 ECCC CCF0 FCFF 2056 65DC CCF0"
+ $"FDFE D256 6DAC CCFF FFCC DDDE 5DDC CCEF"
+ $"0FCC CD67 5CCC CCCF 0FCC CC5D 6CCC CCCF"
+ $"0FCC CC5D 5CCC CCCF 0FCC CCD5 5CCC CCCF"
+ $"FFCC CFFD CCFF CCFF FCCC CF2D DF20 FCFC"
+ $"FCCC CCFD D202 FEF0 FCCC CC0D 2020 FEF0"
+ $"FCCC CCCD FBBB FEF0 FFFF FFFF FFFF FFE0"
+};
+
diff --git a/mac/tclMacLoad.c b/mac/tclMacLoad.c
new file mode 100644
index 0000000..060a734
--- /dev/null
+++ b/mac/tclMacLoad.c
@@ -0,0 +1,245 @@
+/*
+ * tclMacLoad.c --
+ *
+ * This procedure provides a version of the TclLoadFile for use
+ * on the Macintosh. This procedure will only work with systems
+ * that use the Code Fragment Manager.
+ *
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacLoad.c 1.20 97/11/20 18:39:20
+ */
+
+#include <CodeFragments.h>
+#include <Errors.h>
+#include <Resources.h>
+#include <Strings.h>
+#include <FSpCompat.h>
+
+/*
+ * Seems that the 3.0.1 Universal headers leave this define out. So we
+ * define it here...
+ */
+
+#ifndef fragNoErr
+ #define fragNoErr noErr
+#endif
+
+#include "tclPort.h"
+#include "tclInt.h"
+#include "tclMacInt.h"
+
+#if GENERATINGPOWERPC
+ #define OUR_ARCH_TYPE kPowerPCCFragArch
+#else
+ #define OUR_ARCH_TYPE kMotorola68KCFragArch
+#endif
+
+/*
+ * The following data structure defines the structure of a code fragment
+ * resource. We can cast the resource to be of this type to access
+ * any fields we need to see.
+ */
+struct CfrgHeader {
+ long res1;
+ long res2;
+ long version;
+ long res3;
+ long res4;
+ long filler1;
+ long filler2;
+ long itemCount;
+ char arrayStart; /* Array of externalItems begins here. */
+};
+typedef struct CfrgHeader CfrgHeader, *CfrgHeaderPtr, **CfrgHeaderPtrHand;
+
+/*
+ * The below structure defines a cfrag item within the cfrag resource.
+ */
+struct CfrgItem {
+ OSType archType;
+ long updateLevel;
+ long currVersion;
+ long oldDefVersion;
+ long appStackSize;
+ short appSubFolder;
+ char usage;
+ char location;
+ long codeOffset;
+ long codeLength;
+ long res1;
+ long res2;
+ short itemSize;
+ Str255 name; /* This is actually variable sized. */
+};
+typedef struct CfrgItem CfrgItem;
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclLoadFile --
+ *
+ * This procedure is called to carry out dynamic loading of binary
+ * code for the Macintosh. This implementation is based on the
+ * Code Fragment Manager & will not work on other systems.
+ *
+ * Results:
+ * The result is TCL_ERROR, and an error message is left in
+ * interp->result.
+ *
+ * Side effects:
+ * New binary code is loaded.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclLoadFile(
+ Tcl_Interp *interp, /* Used for error reporting. */
+ char *fileName, /* Name of the file containing the desired
+ * code. */
+ char *sym1, char *sym2, /* Names of two procedures to look up in
+ * the file's symbol table. */
+ Tcl_PackageInitProc **proc1Ptr,
+ Tcl_PackageInitProc **proc2Ptr)
+ /* Where to return the addresses corresponding
+ * to sym1 and sym2. */
+{
+ CFragConnectionID connID;
+ Ptr dummy;
+ OSErr err;
+ CFragSymbolClass symClass;
+ FSSpec fileSpec;
+ short fragFileRef, saveFileRef;
+ Handle fragResource;
+ UInt32 offset = 0;
+ UInt32 length = kCFragGoesToEOF;
+ char packageName[255];
+ Str255 errName;
+
+ /*
+ * First thing we must do is infer the package name from the sym1
+ * variable. This is kind of dumb since the caller actually knows
+ * this value, it just doesn't give it to us.
+ */
+ strcpy(packageName, sym1);
+ *packageName = (char) tolower(*packageName);
+ packageName[strlen(packageName) - 5] = NULL;
+
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ if (err != noErr) {
+ interp->result = "could not locate shared library";
+ return TCL_ERROR;
+ }
+
+ /*
+ * See if this fragment has a 'cfrg' resource. It will tell us were
+ * to look for the fragment in the file. If it doesn't exist we will
+ * assume we have a ppc frag using the whole data fork. If it does
+ * exist we find the frag that matches the one we are looking for and
+ * get the offset and size from the resource.
+ */
+ saveFileRef = CurResFile();
+ SetResLoad(false);
+ fragFileRef = FSpOpenResFile(&fileSpec, fsRdPerm);
+ SetResLoad(true);
+ if (fragFileRef != -1) {
+ UseResFile(fragFileRef);
+ fragResource = Get1Resource(kCFragResourceType, kCFragResourceID);
+ HLock(fragResource);
+ if (ResError() == noErr) {
+ CfrgItem* srcItem;
+ long itemCount, index;
+ Ptr itemStart;
+
+ itemCount = (*(CfrgHeaderPtrHand)fragResource)->itemCount;
+ itemStart = &(*(CfrgHeaderPtrHand)fragResource)->arrayStart;
+ for (index = 0; index < itemCount;
+ index++, itemStart += srcItem->itemSize) {
+ srcItem = (CfrgItem*)itemStart;
+ if (srcItem->archType != OUR_ARCH_TYPE) continue;
+ if (!strncasecmp(packageName, (char *) srcItem->name + 1,
+ srcItem->name[0])) {
+ offset = srcItem->codeOffset;
+ length = srcItem->codeLength;
+ }
+ }
+ }
+ /*
+ * Close the resource file. If the extension wants to reopen the
+ * resource fork it should use the tclMacLibrary.c file during it's
+ * construction.
+ */
+ HUnlock(fragResource);
+ ReleaseResource(fragResource);
+ CloseResFile(fragFileRef);
+ UseResFile(saveFileRef);
+ }
+
+ /*
+ * Now we can attempt to load the fragement using the offset & length
+ * obtained from the resource. We don't worry about the main entry point
+ * as we are going to search for specific entry points passed to us.
+ */
+
+ c2pstr(packageName);
+ err = GetDiskFragment(&fileSpec, offset, length, (StringPtr) packageName,
+ kLoadCFrag, &connID, &dummy, errName);
+ if (err != fragNoErr) {
+ p2cstr(errName);
+ Tcl_AppendResult(interp, "couldn't load file \"", fileName,
+ "\": ", errName, (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ c2pstr(sym1);
+ err = FindSymbol(connID, (StringPtr) sym1, (Ptr *) proc1Ptr, &symClass);
+ p2cstr((StringPtr) sym1);
+ if (err != fragNoErr || symClass == kDataCFragSymbol) {
+ interp->result =
+ "could not find Initialization routine in library";
+ return TCL_ERROR;
+ }
+
+ c2pstr(sym2);
+ err = FindSymbol(connID, (StringPtr) sym2, (Ptr *) proc2Ptr, &symClass);
+ p2cstr((StringPtr) sym2);
+ if (err != fragNoErr || symClass == kDataCFragSymbol) {
+ *proc2Ptr = NULL;
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclGuessPackageName --
+ *
+ * If the "load" command is invoked without providing a package
+ * name, this procedure is invoked to try to figure it out.
+ *
+ * Results:
+ * Always returns 0 to indicate that we couldn't figure out a
+ * package name; generic code will then try to guess the package
+ * from the file name. A return value of 1 would have meant that
+ * we figured out the package name and put it in bufPtr.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclGuessPackageName(
+ char *fileName, /* Name of file containing package (already
+ * translated to local form if needed). */
+ Tcl_DString *bufPtr) /* Initialized empty dstring. Append
+ * package name to this if possible. */
+{
+ return 0;
+}
diff --git a/mac/tclMacMSLPrefix.h b/mac/tclMacMSLPrefix.h
new file mode 100644
index 0000000..ce569da
--- /dev/null
+++ b/mac/tclMacMSLPrefix.h
@@ -0,0 +1,24 @@
+/*
+ * tclMacMSLPrefix.h --
+ *
+ * A wrapper for the MSL ansi_prefix.mac.h file. This just turns export on
+ * after including the MSL prefix file, so we can export symbols from the MSL
+ * and through the Tcl shared libraries
+ *
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMac.h 1.2 97/03/18 10:58:49
+ */
+
+#include <ansi_prefix.mac.h>
+/*
+ * "export" is a MetroWerks specific pragma. It flags the linker that
+ * any symbols that are defined when this pragma is on will be exported
+ * to shared libraries that link with this library.
+ */
+
+#pragma export on
diff --git a/mac/tclMacMath.h b/mac/tclMacMath.h
new file mode 100644
index 0000000..7ec3257
--- /dev/null
+++ b/mac/tclMacMath.h
@@ -0,0 +1,145 @@
+/*
+ * tclMacMath.h --
+ *
+ * This file is necessary because of Metrowerks CodeWarrior Pro 1
+ * on the Macintosh. With 8-byte doubles turned on, the definitions of
+ * sin, cos, acos, etc., are screwed up. They are fine as long as
+ * they are used as function calls, but if the function pointers
+ * are passed around and used, they will crash hard on the 68K.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacMath.h 1.2 97/07/28 11:04:02
+ */
+
+#ifndef _TCLMACMATH
+#define _TCLMACMATH
+
+#include <math.h>
+
+#if defined(__MWERKS__) && !defined(__POWERPC__)
+#if __option(IEEEdoubles)
+
+# ifdef cos
+# undef cos
+# define cos cosd
+# endif
+
+# ifdef sin
+# undef sin
+# define sin sind
+# endif
+
+# ifdef tan
+# undef tan
+# define tan tand
+# endif
+
+# ifdef acos
+# undef acos
+# define acos acosd
+# endif
+
+# ifdef asin
+# undef asin
+# define asin asind
+# endif
+
+# ifdef atan
+# undef atan
+# define atan atand
+# endif
+
+# ifdef cosh
+# undef cosh
+# define cosh coshd
+# endif
+
+# ifdef sinh
+# undef sinh
+# define sinh sinhd
+# endif
+
+# ifdef tanh
+# undef tanh
+# define tanh tanhd
+# endif
+
+# ifdef exp
+# undef exp
+# define exp expd
+# endif
+
+# ifdef ldexp
+# undef ldexp
+# define ldexp ldexpd
+# endif
+
+# ifdef log
+# undef log
+# define log logd
+# endif
+
+# ifdef log10
+# undef log10
+# define log10 log10d
+# endif
+
+# ifdef fabs
+# undef fabs
+# define fabs fabsd
+# endif
+
+# ifdef sqrt
+# undef sqrt
+# define sqrt sqrtd
+# endif
+
+# ifdef fmod
+# undef fmod
+# define fmod fmodd
+# endif
+
+# ifdef atan2
+# undef atan2
+# define atan2 atan2d
+# endif
+
+# ifdef frexp
+# undef frexp
+# define frexp frexpd
+# endif
+
+# ifdef modf
+# undef modf
+# define modf modfd
+# endif
+
+# ifdef pow
+# undef pow
+# define pow powd
+# endif
+
+# ifdef ceil
+# undef ceil
+# define ceil ceild
+# endif
+
+# ifdef floor
+# undef floor
+# define floor floord
+# endif
+#endif
+#endif
+
+#if (defined(THINK_C) || defined(__MWERKS__))
+#pragma export on
+double hypotd(double x, double y);
+#define hypot hypotd
+#pragma export reset
+#endif
+
+#endif /* _TCLMACMATH */
diff --git a/mac/tclMacNotify.c b/mac/tclMacNotify.c
new file mode 100644
index 0000000..1537f0c
--- /dev/null
+++ b/mac/tclMacNotify.c
@@ -0,0 +1,416 @@
+/*
+ * tclMacNotify.c --
+ *
+ * This file contains Macintosh-specific procedures for the notifier,
+ * which is the lowest-level part of the Tcl event loop. This file
+ * works together with ../generic/tclNotify.c.
+ *
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacNotify.c 1.36 97/05/07 19:09:29
+ */
+
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMac.h"
+#include "tclMacInt.h"
+#include <signal.h>
+#include <Events.h>
+#include <LowMem.h>
+#include <Processes.h>
+#include <Timer.h>
+
+
+/*
+ * This is necessary to work around a bug in Apple's Universal header files
+ * for the CFM68K libraries.
+ */
+
+#ifdef __CFM68K__
+#undef GetEventQueue
+extern pascal QHdrPtr GetEventQueue(void)
+ THREEWORDINLINE(0x2EBC, 0x0000, 0x014A);
+#pragma import list GetEventQueue
+#define GetEvQHdr() GetEventQueue()
+#endif
+
+/*
+ * The follwing static indicates whether this module has been initialized.
+ */
+
+static int initialized = 0;
+
+/*
+ * The following structure contains the state information for the
+ * notifier module.
+ */
+
+static struct {
+ int timerActive; /* 1 if timer is running. */
+ Tcl_Time timer; /* Time when next timer event is expected. */
+ int flags; /* OR'ed set of flags defined below. */
+ Point lastMousePosition; /* Last known mouse location. */
+ RgnHandle utilityRgn; /* Region used as the mouse region for
+ * WaitNextEvent and the update region when
+ * checking for events. */
+ Tcl_MacConvertEventPtr eventProcPtr;
+ /* This pointer holds the address of the
+ * function that will handle all incoming
+ * Macintosh events. */
+} notifier;
+
+/*
+ * The following defines are used in the flags field of the notifier struct.
+ */
+
+#define NOTIFY_IDLE (1<<1) /* Tcl_ServiceIdle should be called. */
+#define NOTIFY_TIMER (1<<2) /* Tcl_ServiceTimer should be called. */
+
+/*
+ * Prototypes for procedures that are referenced only in this file:
+ */
+
+static int HandleMacEvents _ANSI_ARGS_((void));
+static void InitNotifier _ANSI_ARGS_((void));
+static void NotifierExitHandler _ANSI_ARGS_((
+ ClientData clientData));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * InitNotifier --
+ *
+ * Initializes the notifier structure.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Creates a new exit handler.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+InitNotifier(void)
+{
+ initialized = 1;
+ memset(&notifier, 0, sizeof(notifier));
+ Tcl_CreateExitHandler(NotifierExitHandler, NULL);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * NotifierExitHandler --
+ *
+ * This function is called to cleanup the notifier state before
+ * Tcl is unloaded.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+NotifierExitHandler(
+ ClientData clientData) /* Not used. */
+{
+ initialized = 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * HandleMacEvents --
+ *
+ * This function checks for events from the Macintosh event queue.
+ *
+ * Results:
+ * Returns 1 if event found, 0 otherwise.
+ *
+ * Side effects:
+ * Pulls events off of the Mac event queue and then calls
+ * convertEventProc.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+HandleMacEvents(void)
+{
+ EventRecord theEvent;
+ int eventFound = 0, needsUpdate = 0;
+ Point currentMouse;
+ WindowRef windowRef;
+ Rect mouseRect;
+
+ /*
+ * Check for mouse moved events. These events aren't placed on the
+ * system event queue unless we call WaitNextEvent.
+ */
+
+ GetGlobalMouse(&currentMouse);
+ if ((notifier.eventProcPtr != NULL) &&
+ !EqualPt(currentMouse, notifier.lastMousePosition)) {
+ notifier.lastMousePosition = currentMouse;
+ theEvent.what = nullEvent;
+ if ((*notifier.eventProcPtr)(&theEvent) == true) {
+ eventFound = 1;
+ }
+ }
+
+ /*
+ * Check for update events. Since update events aren't generated
+ * until we call GetNextEvent, we may need to force a call to
+ * GetNextEvent, even if the queue is empty.
+ */
+
+ for (windowRef = FrontWindow(); windowRef != NULL;
+ windowRef = GetNextWindow(windowRef)) {
+ GetWindowUpdateRgn(windowRef, notifier.utilityRgn);
+ if (!EmptyRgn(notifier.utilityRgn)) {
+ needsUpdate = 1;
+ break;
+ }
+ }
+
+ /*
+ * Process events from the OS event queue.
+ */
+
+ while (needsUpdate || (GetEvQHdr()->qHead != NULL)) {
+ GetGlobalMouse(&currentMouse);
+ SetRect(&mouseRect, currentMouse.h, currentMouse.v,
+ currentMouse.h + 1, currentMouse.v + 1);
+ RectRgn(notifier.utilityRgn, &mouseRect);
+
+ WaitNextEvent(everyEvent, &theEvent, 5, notifier.utilityRgn);
+ needsUpdate = 0;
+ if ((notifier.eventProcPtr != NULL)
+ && ((*notifier.eventProcPtr)(&theEvent) == true)) {
+ eventFound = 1;
+ }
+ }
+
+ return eventFound;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_SetTimer --
+ *
+ * This procedure sets the current notifier timer value. The
+ * notifier will ensure that Tcl_ServiceAll() is called after
+ * the specified interval, even if no events have occurred.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Replaces any previous timer.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_SetTimer(
+ Tcl_Time *timePtr) /* New value for interval timer. */
+{
+ if (!timePtr) {
+ notifier.timerActive = 0;
+ } else {
+ /*
+ * Compute when the timer should fire.
+ */
+
+ TclpGetTime(&notifier.timer);
+ notifier.timer.sec += timePtr->sec;
+ notifier.timer.usec += timePtr->usec;
+ if (notifier.timer.usec >= 1000000) {
+ notifier.timer.usec -= 1000000;
+ notifier.timer.sec += 1;
+ }
+ notifier.timerActive = 1;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_WaitForEvent --
+ *
+ * This function is called by Tcl_DoOneEvent to wait for new
+ * events on the message queue. If the block time is 0, then
+ * Tcl_WaitForEvent just polls the event queue without blocking.
+ *
+ * Results:
+ * Always returns 0.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_WaitForEvent(
+ Tcl_Time *timePtr) /* Maximum block time. */
+{
+ int found;
+ EventRecord macEvent;
+ long sleepTime = 5;
+ long ms;
+ Point currentMouse;
+ void * timerToken;
+ Rect mouseRect;
+
+ /*
+ * Compute the next timeout value.
+ */
+
+ if (!timePtr) {
+ ms = INT_MAX;
+ } else {
+ ms = (timePtr->sec * 1000) + (timePtr->usec / 1000);
+ }
+ timerToken = TclMacStartTimer((long) ms);
+
+ /*
+ * Poll the Mac event sources. This loop repeats until something
+ * happens: a timeout, a socket event, mouse motion, or some other
+ * window event. Note that we don't call WaitNextEvent if another
+ * event is found to avoid context switches. This effectively gives
+ * events coming in via WaitNextEvent a slightly lower priority.
+ */
+
+ found = 0;
+ if (notifier.utilityRgn == NULL) {
+ notifier.utilityRgn = NewRgn();
+ }
+
+ while (!found) {
+ /*
+ * Check for generated and queued events.
+ */
+
+ if (HandleMacEvents()) {
+ found = 1;
+ }
+
+ /*
+ * Check for time out.
+ */
+
+ if (!found && TclMacTimerExpired(timerToken)) {
+ found = 1;
+ }
+
+ /*
+ * Check for window events. We may receive a NULL event for
+ * various reasons. 1) the timer has expired, 2) a mouse moved
+ * event is occuring or 3) the os is giving us time for idle
+ * events. Note that we aren't sharing the processor very
+ * well here. We really ought to do a better job of calling
+ * WaitNextEvent for time slicing purposes.
+ */
+
+ if (!found) {
+ /*
+ * Set up mouse region so we will wake if the mouse is moved.
+ * We do this by defining the smallest possible region around
+ * the current mouse position.
+ */
+
+ GetGlobalMouse(&currentMouse);
+ SetRect(&mouseRect, currentMouse.h, currentMouse.v,
+ currentMouse.h + 1, currentMouse.v + 1);
+ RectRgn(notifier.utilityRgn, &mouseRect);
+
+ WaitNextEvent(everyEvent, &macEvent, sleepTime,
+ notifier.utilityRgn);
+
+ if (notifier.eventProcPtr != NULL) {
+ if ((*notifier.eventProcPtr)(&macEvent) == true) {
+ found = 1;
+ }
+ }
+ }
+ }
+ TclMacRemoveTimer(timerToken);
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_Sleep --
+ *
+ * Delay execution for the specified number of milliseconds. This
+ * is not a very good call to make. It will block the system -
+ * you will not even be able to switch applications.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Time passes.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_Sleep(
+ int ms) /* Number of milliseconds to sleep. */
+{
+ EventRecord dummy;
+ void *timerToken;
+
+ if (ms <= 0) {
+ return;
+ }
+
+ timerToken = TclMacStartTimer((long) ms);
+ while (1) {
+ WaitNextEvent(0, &dummy, (ms / 16.66) + 1, NULL);
+
+ if (TclMacTimerExpired(timerToken)) {
+ break;
+ }
+ }
+ TclMacRemoveTimer(timerToken);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_MacSetEventProc --
+ *
+ * This function sets the event handling procedure for the
+ * application. This function will be passed all incoming Mac
+ * events. This function usually controls the console or some
+ * other entity like Tk.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Changes the event handling function.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_MacSetEventProc(
+ Tcl_MacConvertEventPtr procPtr)
+{
+ notifier.eventProcPtr = procPtr;
+}
diff --git a/mac/tclMacOSA.c b/mac/tclMacOSA.c
new file mode 100644
index 0000000..110cfe2
--- /dev/null
+++ b/mac/tclMacOSA.c
@@ -0,0 +1,2937 @@
+/*
+ * tclMacOSA.c --
+ *
+ * This contains the initialization routines, and the implementation of
+ * the OSA and Component commands. These commands allow you to connect
+ * with the AppleScript or any other OSA component to compile and execute
+ * scripts.
+ *
+ * Copyright (c) 1996 Lucent Technologies and Jim Ingham
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "License Terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacOSA.c 1.7 97/06/18 14:29:58
+ */
+
+#define MAC_TCL
+
+#include <Aliases.h>
+#include <string.h>
+#include <AppleEvents.h>
+#include <AppleScript.h>
+#include <OSA.h>
+#include <OSAGeneric.h>
+#include <Script.h>
+
+#include <FullPath.h>
+#include <components.h>
+
+#include <resources.h>
+#include <FSpCompat.h>
+/*
+ * The following two Includes are from the More Files package.
+ */
+#include <MoreFiles.h>
+#include <FullPath.h>
+
+#include "tcl.h"
+#include "tclInt.h"
+
+/*
+ * I need this only for the call to FspGetFullPath,
+ * I'm really not poking my nose where it does not belong!
+ */
+#include "tclMacInt.h"
+
+/*
+ * Data structures used by the OSA code.
+ */
+typedef struct tclOSAScript {
+ OSAID scriptID;
+ OSType languageID;
+ long modeFlags;
+} tclOSAScript;
+
+typedef struct tclOSAContext {
+ OSAID contextID;
+} tclOSAContext;
+
+typedef struct tclOSAComponent {
+ char *theName;
+ ComponentInstance theComponent; /* The OSA Component represented */
+ long componentFlags;
+ OSType languageID;
+ char *languageName;
+ Tcl_HashTable contextTable; /* Hash Table linking the context names & ID's */
+ Tcl_HashTable scriptTable;
+ Tcl_Interp *theInterp;
+ OSAActiveUPP defActiveProc;
+ long defRefCon;
+} tclOSAComponent;
+
+/*
+ * Prototypes for static procedures.
+ */
+
+static pascal OSErr TclOSAActiveProc _ANSI_ARGS_((long refCon));
+static int TclOSACompileCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSADecompileCmd _ANSI_ARGS_((Tcl_Interp * Interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSADeleteCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSAExecuteCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSAInfoCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSALoadCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSARunCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc,
+ char **argv));
+static int tclOSAStoreCmd _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent, int argc, char
+ **argv));
+static void GetRawDataFromDescriptor _ANSI_ARGS_((AEDesc *theDesc,
+ Ptr destPtr, Size destMaxSize, Size *actSize));
+static OSErr GetCStringFromDescriptor _ANSI_ARGS_((
+ AEDesc *sourceDesc, char *resultStr,
+ Size resultMaxSize,Size *resultSize));
+static int Tcl_OSAComponentCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, char **argv));
+static void getSortedHashKeys _ANSI_ARGS_((Tcl_HashTable *theTable,
+ char *pattern, Tcl_DString *theResult));
+static int ASCIICompareProc _ANSI_ARGS_((const void *first,
+ const void *second));
+static int Tcl_OSACmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, char **argv));
+static void tclOSAClose _ANSI_ARGS_((ClientData clientData));
+static void tclOSACloseAll _ANSI_ARGS_((ClientData clientData));
+static tclOSAComponent *tclOSAMakeNewComponent _ANSI_ARGS_((Tcl_Interp *interp,
+ char *cmdName, char *languageName,
+ OSType scriptSubtype, long componentFlags));
+static int prepareScriptData _ANSI_ARGS_((int argc, char **argv,
+ Tcl_DString *scrptData ,AEDesc *scrptDesc));
+static void tclOSAResultFromID _ANSI_ARGS_((Tcl_Interp *interp,
+ ComponentInstance theComponent, OSAID resultID));
+static void tclOSAASError _ANSI_ARGS_((Tcl_Interp * interp,
+ ComponentInstance theComponent, char *scriptSource));
+static int tclOSAGetContextID _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *contextName, OSAID *theContext));
+static void tclOSAAddContext _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *contextName, const OSAID theContext));
+static int tclOSAMakeContext _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *contextName, OSAID *theContext));
+static int tclOSADeleteContext _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *contextName));
+static int tclOSALoad _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *theComponent, char *resourceName,
+ int resourceNumber, char *fileName,OSAID *resultID));
+static int tclOSAStore _ANSI_ARGS_((Tcl_Interp *interp,
+ tclOSAComponent *theComponent, char *resourceName,
+ int resourceNumber, char *fileName,char *scriptName));
+static int tclOSAAddScript _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *scriptName, long modeFlags, OSAID scriptID));
+static int tclOSAGetScriptID _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *scriptName, OSAID *scriptID));
+static tclOSAScript * tclOSAGetScript _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *scriptName));
+static int tclOSADeleteScript _ANSI_ARGS_((tclOSAComponent *theComponent,
+ char *scriptName,char *errMsg));
+
+/*
+ * "export" is a MetroWerks specific pragma. It flags the linker that
+ * any symbols that are defined when this pragma is on will be exported
+ * to shared libraries that link with this library.
+ */
+
+
+#pragma export on
+int Tclapplescript_Init( Tcl_Interp *interp );
+#pragma export reset
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tclapplescript_Init --
+ *
+ * Initializes the the OSA command which opens connections to
+ * OSA components, creates the AppleScript command, which opens an
+ * instance of the AppleScript component,and constructs the table of
+ * available languages.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side Effects:
+ * Opens one connection to the AppleScript component, if
+ * available. Also builds up a table of available OSA languages,
+ * and creates the OSA command.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tclapplescript_Init(
+ Tcl_Interp *interp) /* Tcl interpreter. */
+{
+ char *errMsg = NULL;
+ OSErr myErr = noErr;
+ Boolean gotAppleScript = false;
+ Boolean GotOneOSALanguage = false;
+ ComponentDescription compDescr = {
+ kOSAComponentType,
+ (OSType) 0,
+ (OSType) 0,
+ (long) 0,
+ (long) 0
+ }, *foundComp;
+ Component curComponent = (Component) 0;
+ ComponentInstance curOpenComponent;
+ Tcl_HashTable *ComponentTable;
+ Tcl_HashTable *LanguagesTable;
+ Tcl_HashEntry *hashEntry;
+ int newPtr;
+ AEDesc componentName = { typeNull, NULL };
+ char nameStr[32];
+ Size nameLen;
+ long appleScriptFlags;
+
+ /*
+ * Here We Will Get The Available Osa Languages, Since They Can Only Be
+ * Registered At Startup... If You Dynamically Load Components, This
+ * Will Fail, But This Is Not A Common Thing To Do.
+ */
+
+ LanguagesTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
+
+ if (LanguagesTable == NULL) {
+ panic("Memory Error Allocating Languages Hash Table");
+ }
+
+ Tcl_SetAssocData(interp, "OSAScript_LangTable", NULL, LanguagesTable);
+ Tcl_InitHashTable(LanguagesTable, TCL_STRING_KEYS);
+
+
+ while ((curComponent = FindNextComponent(curComponent, &compDescr)) != 0) {
+ int nbytes = sizeof(ComponentDescription);
+ foundComp = (ComponentDescription *)
+ ckalloc(sizeof(ComponentDescription));
+ myErr = GetComponentInfo(curComponent, foundComp, NULL, NULL, NULL);
+ if (foundComp->componentSubType ==
+ kOSAGenericScriptingComponentSubtype) {
+ /* Skip the generic component */
+ ckfree((char *) foundComp);
+ } else {
+ GotOneOSALanguage = true;
+
+ /*
+ * This is gross: looks like I have to open the component just
+ * to get its name!!! GetComponentInfo is supposed to return
+ * the name, but AppleScript always returns an empty string.
+ */
+
+ curOpenComponent = OpenComponent(curComponent);
+ if (curOpenComponent == NULL) {
+ Tcl_AppendResult(interp,"Error opening component",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ myErr = OSAScriptingComponentName(curOpenComponent,&componentName);
+ if (myErr == noErr) {
+ myErr = GetCStringFromDescriptor(&componentName,
+ nameStr, 31, &nameLen);
+ AEDisposeDesc(&componentName);
+ }
+ CloseComponent(curOpenComponent);
+
+ if (myErr == noErr) {
+ hashEntry = Tcl_CreateHashEntry(LanguagesTable,
+ nameStr, &newPtr);
+ Tcl_SetHashValue(hashEntry, (ClientData) foundComp);
+ } else {
+ Tcl_AppendResult(interp,"Error getting componentName.",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Make sure AppleScript is loaded, otherwise we will
+ * not bother to make the AppleScript command.
+ */
+ if (foundComp->componentSubType == kAppleScriptSubtype) {
+ appleScriptFlags = foundComp->componentFlags;
+ gotAppleScript = true;
+ }
+ }
+ }
+
+ /*
+ * Create the OSA command.
+ */
+
+ if (!GotOneOSALanguage) {
+ Tcl_AppendResult(interp,"Could not find any OSA languages",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Create the Component Assoc Data & put it in the interpreter.
+ */
+
+ ComponentTable = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
+
+ if (ComponentTable == NULL) {
+ panic("Memory Error Allocating Hash Table");
+ }
+
+ Tcl_SetAssocData(interp, "OSAScript_CompTable", NULL, ComponentTable);
+
+ Tcl_InitHashTable(ComponentTable, TCL_STRING_KEYS);
+
+ /*
+ * The OSA command is not currently supported.
+ Tcl_CreateCommand(interp, "OSA", Tcl_OSACmd, (ClientData) NULL,
+ (Tcl_CmdDeleteProc *) NULL);
+ */
+
+ /*
+ * Open up one AppleScript component, with a default context
+ * and tie it to the AppleScript command.
+ * If the user just wants single-threaded AppleScript execution
+ * this should be enough.
+ *
+ */
+
+ if (gotAppleScript) {
+ if (tclOSAMakeNewComponent(interp, "AppleScript",
+ "AppleScript English", kAppleScriptSubtype,
+ appleScriptFlags) == NULL ) {
+ return TCL_ERROR;
+ }
+ }
+
+ return Tcl_PkgProvide(interp, "OSAConnect", "1.0");
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_OSACmd --
+ *
+ * This is the command that provides the interface to the OSA
+ * component manager. The subcommands are: close: close a component,
+ * info: get info on components open, and open: get a new connection
+ * with the Scripting Component
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Depends on the subcommand, see the user documentation
+ * for more details.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_OSACmd(
+ ClientData clientData,
+ Tcl_Interp *interp,
+ int argc,
+ char **argv)
+{
+ static unsigned short componentCmdIndex = 0;
+ char autoName[32];
+ char c;
+ int length;
+ Tcl_HashTable *ComponentTable = NULL;
+
+
+ if (argc == 1) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " option\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ c = *argv[1];
+ length = strlen(argv[1]);
+
+ /*
+ * Query out the Component Table, since most of these commands use it...
+ */
+
+ ComponentTable = (Tcl_HashTable *) Tcl_GetAssocData(interp,
+ "OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
+
+ if (ComponentTable == NULL) {
+ Tcl_AppendResult(interp, "Error, could not get the Component Table",
+ " from the Associated data.", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'c' && strncmp(argv[1],"close",length) == 0) {
+ Tcl_HashEntry *hashEntry;
+ if (argc != 3) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ",argv[1], " componentName\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if ((hashEntry = Tcl_FindHashEntry(ComponentTable,argv[2])) == NULL) {
+ Tcl_AppendResult(interp, "Component \"", argv[2], "\" not found",
+ (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ Tcl_DeleteCommand(interp,argv[2]);
+ return TCL_OK;
+ }
+ } else if (c == 'o' && strncmp(argv[1],"open",length) == 0) {
+ /*
+ * Default language is AppleScript.
+ */
+ OSType scriptSubtype = kAppleScriptSubtype;
+ char *languageName = "AppleScript English";
+ char *errMsg = NULL;
+ ComponentDescription *theCD;
+
+ argv += 2;
+ argc -= 2;
+
+ while (argc > 0 ) {
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+ if (c == 'l' && strcmp(argv[0] + 1, "language") == 0) {
+ if (argc == 1) {
+ Tcl_AppendResult(interp,
+ "Error - no language provided for the -language switch",
+ (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ Tcl_HashEntry *hashEntry;
+ Tcl_HashSearch search;
+ Boolean gotIt = false;
+ Tcl_HashTable *LanguagesTable;
+
+ /*
+ * Look up the language in the languages table
+ * Do a simple strstr match, so AppleScript
+ * will match "AppleScript English"...
+ */
+
+ LanguagesTable = Tcl_GetAssocData(interp,
+ "OSAScript_LangTable",
+ (Tcl_InterpDeleteProc **) NULL);
+
+ for (hashEntry =
+ Tcl_FirstHashEntry(LanguagesTable, &search);
+ hashEntry != NULL;
+ hashEntry = Tcl_NextHashEntry(&search)) {
+ languageName = Tcl_GetHashKey(LanguagesTable,
+ hashEntry);
+ if (strstr(languageName,argv[1]) != NULL) {
+ theCD = (ComponentDescription *)
+ Tcl_GetHashValue(hashEntry);
+ gotIt = true;
+ break;
+ }
+ }
+ if (!gotIt) {
+ Tcl_AppendResult(interp,
+ "Error, could not find the language \"",
+ argv[1],
+ "\" in the list of known languages.",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+ }
+ argc -= 2;
+ argv += 2;
+ } else {
+ Tcl_AppendResult(interp, "Expected a flag, but got ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ sprintf(autoName, "OSAComponent%-d", componentCmdIndex++);
+ if (tclOSAMakeNewComponent(interp, autoName, languageName,
+ theCD->componentSubType, theCD->componentFlags) == NULL ) {
+ return TCL_ERROR;
+ } else {
+ Tcl_SetResult(interp,autoName,TCL_VOLATILE);
+ return TCL_OK;
+ }
+
+ } else if (c == 'i' && strncmp(argv[1],"info",length) == 0) {
+ if (argc == 2) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ", argv[1], " what\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ c = *argv[2];
+ length = strlen(argv[2]);
+
+ if (c == 'c' && strncmp(argv[2], "components", length) == 0) {
+ Tcl_DString theResult;
+
+ Tcl_DStringInit(&theResult);
+
+ if (argc == 3) {
+ getSortedHashKeys(ComponentTable,(char *) NULL, &theResult);
+ } else if (argc == 4) {
+ getSortedHashKeys(ComponentTable, argv[3], &theResult);
+ } else {
+ Tcl_AppendResult(interp, "Error: wrong # of arguments",
+ ", should be \"", argv[0], " ", argv[1], " ",
+ argv[2], " ?pattern?\".", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tcl_DStringResult(interp, &theResult);
+ return TCL_OK;
+ } else if (c == 'l' && strncmp(argv[2],"languages",length) == 0) {
+ Tcl_DString theResult;
+ Tcl_HashTable *LanguagesTable;
+
+ Tcl_DStringInit(&theResult);
+ LanguagesTable = Tcl_GetAssocData(interp,
+ "OSAScript_LangTable", (Tcl_InterpDeleteProc **) NULL);
+
+ if (argc == 3) {
+ getSortedHashKeys(LanguagesTable, (char *) NULL, &theResult);
+ } else if (argc == 4) {
+ getSortedHashKeys(LanguagesTable, argv[3], &theResult);
+ } else {
+ Tcl_AppendResult(interp, "Error: wrong # of arguments",
+ ", should be \"", argv[0], " ", argv[1], " ",
+ argv[2], " ?pattern?\".", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tcl_DStringResult(interp,&theResult);
+ return TCL_OK;
+ } else {
+ Tcl_AppendResult(interp, "Unknown option: ", argv[2],
+ " for OSA info, should be one of",
+ " \"components\" or \"languages\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Unknown option: ", argv[1],
+ ", should be one of \"open\", \"close\" or \"info\".",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_OSAComponentCmd --
+ *
+ * This is the command that provides the interface with an OSA
+ * component. The sub commands are:
+ * - compile ? -context context? scriptData
+ * compiles the script data, returns the ScriptID
+ * - decompile ? -context context? scriptData
+ * decompiles the script data, source code
+ * - execute ?-context context? scriptData
+ * compiles and runs script data
+ * - info what: get component info
+ * - load ?-flags values? fileName
+ * loads & compiles script data from fileName
+ * - run scriptId ?options?
+ * executes the compiled script
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side Effects:
+ * Depends on the subcommand, see the user documentation
+ * for more details.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_OSAComponentCmd(
+ ClientData clientData,
+ Tcl_Interp *interp,
+ int argc,
+ char **argv)
+{
+ int length;
+ char c;
+
+ tclOSAComponent *OSAComponent = (tclOSAComponent *) clientData;
+
+ if (argc == 1) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " option ?arg ...?\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ c = *argv[1];
+ length = strlen(argv[1]);
+ if (c == 'c' && strncmp(argv[1], "compile", length) == 0) {
+ return TclOSACompileCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'l' && strncmp(argv[1], "load", length) == 0) {
+ return tclOSALoadCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'e' && strncmp(argv[1], "execute", length) == 0) {
+ return tclOSAExecuteCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'i' && strncmp(argv[1], "info", length) == 0) {
+ return tclOSAInfoCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'd' && strncmp(argv[1], "decompile", length) == 0) {
+ return tclOSADecompileCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'd' && strncmp(argv[1], "delete", length) == 0) {
+ return tclOSADeleteCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 'r' && strncmp(argv[1], "run", length) == 0) {
+ return tclOSARunCmd(interp, OSAComponent, argc, argv);
+ } else if (c == 's' && strncmp(argv[1], "store", length) == 0) {
+ return tclOSAStoreCmd(interp, OSAComponent, argc, argv);
+ } else {
+ Tcl_AppendResult(interp,"bad option \"", argv[1],
+ "\": should be compile, decompile, delete, ",
+ "execute, info, load, run or store",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclOSACompileCmd --
+ *
+ * This is the compile subcommand for the component command.
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side Effects:
+ * Compiles the script data either into a script or a script
+ * context. Adds the script to the component's script or context
+ * table. Sets interp's result to the name of the new script or
+ * context.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TclOSACompileCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ int tclError = TCL_OK;
+ int augment = 1;
+ int makeContext = 0;
+ char c;
+ char autoName[16];
+ char buffer[32];
+ char *resultName;
+ Boolean makeNewContext = false;
+ Tcl_DString scrptData;
+ AEDesc scrptDesc = { typeNull, NULL };
+ long modeFlags = kOSAModeCanInteract;
+ OSAID resultID = kOSANullScript;
+ OSAID contextID = kOSANullScript;
+ OSAID parentID = kOSANullScript;
+ OSAError osaErr = noErr;
+
+ if (!(OSAComponent->componentFlags && kOSASupportsCompiling)) {
+ Tcl_AppendResult(interp,
+ "OSA component does not support compiling",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * This signals that we should make up a name, which is the
+ * default behavior:
+ */
+
+ autoName[0] = '\0';
+ resultName = NULL;
+
+ if (argc == 2) {
+ numArgs:
+ Tcl_AppendResult(interp,
+ "wrong # args: should be \"", argv[0], " ", argv[1],
+ " ?options? code\"",(char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+
+ /*
+ * Do the argument parsing.
+ */
+
+ while (argc > 0) {
+
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+
+ /*
+ * "--" is the only switch that has no value, stops processing
+ */
+
+ if (c == '-' && *(argv[0] + 2) == '\0') {
+ argv += 1;
+ argc--;
+ break;
+ }
+
+ /*
+ * So we can check here a switch with no value.
+ */
+
+ if (argc == 1) {
+ Tcl_AppendResult(interp,
+ "no value given for switch: ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'c' && strcmp(argv[0] + 1, "context") == 0) {
+ if (Tcl_GetBoolean(interp, argv[1], &makeContext) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else if (c == 'a' && strcmp(argv[0] + 1, "augment") == 0) {
+ /*
+ * Augment the current context which implies making a context.
+ */
+
+ if (Tcl_GetBoolean(interp, argv[1], &augment) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ makeContext = 1;
+ } else if (c == 'n' && strcmp(argv[0] + 1, "name") == 0) {
+ resultName = argv[1];
+ } else if (c == 'p' && strcmp(argv[0] + 1,"parent") == 0) {
+ /*
+ * Since this implies we are compiling into a context,
+ * set makeContext here
+ */
+ if (tclOSAGetContextID(OSAComponent,
+ argv[1], &parentID) != TCL_OK) {
+ Tcl_AppendResult(interp, "context not found \"",
+ argv[1], "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ makeContext = 1;
+ } else {
+ Tcl_AppendResult(interp, "bad option \"", argv[0],
+ "\": should be -augment, -context, -name or -parent",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ argv += 2;
+ argc -= 2;
+
+ } else {
+ break;
+ }
+ }
+
+ /*
+ * Make sure we have some data left...
+ */
+ if (argc == 0) {
+ goto numArgs;
+ }
+
+ /*
+ * Now if we are making a context, see if it is a new one...
+ * There are three options here:
+ * 1) There was no name provided, so we autoName it
+ * 2) There was a name, then check and see if it already exists
+ * a) If yes, then makeNewContext is false
+ * b) Otherwise we are making a new context
+ */
+
+ if (makeContext) {
+ modeFlags |= kOSAModeCompileIntoContext;
+ if (resultName == NULL) {
+ /*
+ * Auto name the new context.
+ */
+ resultName = autoName;
+ resultID = kOSANullScript;
+ makeNewContext = true;
+ } else if (tclOSAGetContextID(OSAComponent,
+ resultName, &resultID) == TCL_OK) {
+ makeNewContext = false;
+ } else {
+ makeNewContext = true;
+ resultID = kOSANullScript;
+ }
+
+ /*
+ * Deal with the augment now...
+ */
+ if (augment && !makeNewContext) {
+ modeFlags |= kOSAModeAugmentContext;
+ }
+ }
+
+ /*
+ * Ok, now we have the options, so we can compile the script data.
+ */
+
+ if (prepareScriptData(argc, argv, &scrptData, &scrptDesc) == TCL_ERROR) {
+ Tcl_DStringResult(interp, &scrptData);
+ AEDisposeDesc(&scrptDesc);
+ return TCL_ERROR;
+ }
+
+ /*
+ * If we want to use a parent context, we have to make the context
+ * by hand. Note, parentID is only specified when you make a new context.
+ */
+
+ if (parentID != kOSANullScript && makeNewContext) {
+ AEDesc contextDesc = { typeNull, NULL };
+
+ osaErr = OSAMakeContext(OSAComponent->theComponent,
+ &contextDesc, parentID, &resultID);
+ modeFlags |= kOSAModeAugmentContext;
+ }
+
+ osaErr = OSACompile(OSAComponent->theComponent, &scrptDesc,
+ modeFlags, &resultID);
+ if (osaErr == noErr) {
+
+ if (makeContext) {
+ /*
+ * For the compiled context to be active, you need to run
+ * the code that is in the context.
+ */
+ OSAID activateID;
+
+ osaErr = OSAExecute(OSAComponent->theComponent, resultID,
+ resultID, kOSAModeCanInteract, &activateID);
+ OSADispose(OSAComponent->theComponent, activateID);
+
+ if (osaErr == noErr) {
+ if (makeNewContext) {
+ /*
+ * If we have compiled into a context,
+ * this is added to the context table
+ */
+
+ tclOSAAddContext(OSAComponent, resultName, resultID);
+ }
+
+ Tcl_SetResult(interp, resultName, TCL_VOLATILE);
+ tclError = TCL_OK;
+ }
+ } else {
+ /*
+ * For a script, we return the script name.
+ */
+ tclOSAAddScript(OSAComponent, resultName, modeFlags, resultID);
+ Tcl_SetResult(interp, resultName, TCL_VOLATILE);
+ tclError = TCL_OK;
+ }
+ }
+
+ /*
+ * This catches the error either from the original compile,
+ * or from the execute in case makeContext == true
+ */
+
+ if (osaErr == errOSAScriptError) {
+ OSADispose(OSAComponent->theComponent, resultID);
+ tclOSAASError(interp, OSAComponent->theComponent,
+ Tcl_DStringValue(&scrptData));
+ tclError = TCL_ERROR;
+ } else if (osaErr != noErr) {
+ sprintf(buffer, "Error #%-6d compiling script", osaErr);
+ Tcl_AppendResult(interp, buffer, (char *) NULL);
+ tclError = TCL_ERROR;
+ }
+
+ Tcl_DStringFree(&scrptData);
+ AEDisposeDesc(&scrptDesc);
+
+ return tclError;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSADecompileCmd --
+ *
+ * This implements the Decompile subcommand of the component command
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side Effects:
+ * Decompiles the script, and sets interp's result to the
+ * decompiled script data.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSADecompileCmd(
+ Tcl_Interp * interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ AEDesc resultingSourceData = { typeChar, NULL };
+ OSAID scriptID;
+ Boolean isContext;
+ long result;
+ OSErr sysErr = noErr;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ",argv[1], " scriptName \"", (char *) NULL );
+ return TCL_ERROR;
+ }
+
+ if (!(OSAComponent->componentFlags && kOSASupportsGetSource)) {
+ Tcl_AppendResult(interp,
+ "Error, this component does not support get source",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (tclOSAGetScriptID(OSAComponent, argv[2], &scriptID) == TCL_OK) {
+ isContext = false;
+ } else if (tclOSAGetContextID(OSAComponent, argv[2], &scriptID)
+ == TCL_OK ) {
+ isContext = true;
+ } else {
+ Tcl_AppendResult(interp, "Could not find script \"",
+ argv[2], "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ OSAGetScriptInfo(OSAComponent->theComponent, scriptID,
+ kOSACanGetSource, &result);
+
+ sysErr = OSAGetSource(OSAComponent->theComponent,
+ scriptID, typeChar, &resultingSourceData);
+
+ if (sysErr == noErr) {
+ Tcl_DString theResult;
+ Tcl_DStringInit(&theResult);
+
+ Tcl_DStringAppend(&theResult, *resultingSourceData.dataHandle,
+ GetHandleSize(resultingSourceData.dataHandle));
+ Tcl_DStringResult(interp, &theResult);
+ AEDisposeDesc(&resultingSourceData);
+ return TCL_OK;
+ } else {
+ Tcl_AppendResult(interp, "Error getting source data", (char *) NULL);
+ AEDisposeDesc(&resultingSourceData);
+ return TCL_ERROR;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSADeleteCmd --
+ *
+ * This implements the Delete subcommand of the Component command.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side Effects:
+ * Deletes a script from the script list of the given component.
+ * Removes all references to the script, and frees the memory
+ * associated with it.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSADeleteCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ char c,*errMsg = NULL;
+ int length;
+
+ if (argc < 4) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ", argv[1], " what scriptName", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ c = *argv[2];
+ length = strlen(argv[2]);
+ if (c == 'c' && strncmp(argv[2], "context", length) == 0) {
+ if (strcmp(argv[3], "global") == 0) {
+ Tcl_AppendResult(interp, "You cannot delete the global context",
+ (char *) NULL);
+ return TCL_ERROR;
+ } else if (tclOSADeleteContext(OSAComponent, argv[3]) != TCL_OK) {
+ Tcl_AppendResult(interp, "Error deleting script \"", argv[2],
+ "\": ", errMsg, (char *) NULL);
+ ckfree(errMsg);
+ return TCL_ERROR;
+ }
+ } else if (c == 's' && strncmp(argv[2], "script", length) == 0) {
+ if (tclOSADeleteScript(OSAComponent, argv[3], errMsg) != TCL_OK) {
+ Tcl_AppendResult(interp, "Error deleting script \"", argv[3],
+ "\": ", errMsg, (char *) NULL);
+ ckfree(errMsg);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp,"Unknown value ", argv[2],
+ " should be one of ",
+ "\"context\" or \"script\".",
+ (char *) NULL );
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAExecuteCmd --
+ *
+ * This implements the execute subcommand of the component command.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Executes the given script data, and sets interp's result to
+ * the OSA component's return value.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAExecuteCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ int tclError = TCL_OK, resID = 128;
+ char c,buffer[32],
+ *contextName = NULL,*scriptName = NULL, *resName = NULL;
+ Boolean makeNewContext = false,makeContext = false;
+ AEDesc scrptDesc = { typeNull, NULL };
+ long modeFlags = kOSAModeCanInteract;
+ OSAID resultID = kOSANullScript,
+ contextID = kOSANullScript,
+ parentID = kOSANullScript;
+ Tcl_DString scrptData;
+ OSAError osaErr = noErr;
+ OSErr sysErr = noErr;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp,
+ "Error, no script data for \"", argv[0],
+ " run\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+
+ /*
+ * Set the context to the global context by default.
+ * Then parse the argument list for switches
+ */
+ tclOSAGetContextID(OSAComponent, "global", &contextID);
+
+ while (argc > 0) {
+
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+
+ /*
+ * "--" is the only switch that has no value.
+ */
+
+ if (c == '-' && *(argv[0] + 2) == '\0') {
+ argv += 1;
+ argc--;
+ break;
+ }
+
+ /*
+ * So we can check here for a switch with no value.
+ */
+
+ if (argc == 1) {
+ Tcl_AppendResult(interp,
+ "Error, no value given for switch ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'c' && strcmp(argv[0] + 1, "context") == 0) {
+ if (tclOSAGetContextID(OSAComponent,
+ argv[1], &contextID) == TCL_OK) {
+ } else {
+ Tcl_AppendResult(interp, "Script context \"",
+ argv[1], "\" not found", (char *) NULL);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Error, invalid switch ", argv[0],
+ " should be \"-context\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+ } else {
+ break;
+ }
+ }
+
+ if (argc == 0) {
+ Tcl_AppendResult(interp, "Error, no script data", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (prepareScriptData(argc, argv, &scrptData, &scrptDesc) == TCL_ERROR) {
+ Tcl_DStringResult(interp, &scrptData);
+ AEDisposeDesc(&scrptDesc);
+ return TCL_ERROR;
+ }
+ /*
+ * Now try to compile and run, but check to make sure the
+ * component supports the one shot deal
+ */
+ if (OSAComponent->componentFlags && kOSASupportsConvenience) {
+ osaErr = OSACompileExecute(OSAComponent->theComponent,
+ &scrptDesc, contextID, modeFlags, &resultID);
+ } else {
+ /*
+ * If not, we have to do this ourselves
+ */
+ if (OSAComponent->componentFlags && kOSASupportsCompiling) {
+ OSAID compiledID = kOSANullScript;
+ osaErr = OSACompile(OSAComponent->theComponent, &scrptDesc,
+ modeFlags, &compiledID);
+ if (osaErr == noErr) {
+ osaErr = OSAExecute(OSAComponent->theComponent, compiledID,
+ contextID, modeFlags, &resultID);
+ }
+ OSADispose(OSAComponent->theComponent, compiledID);
+ } else {
+ /*
+ * The scripting component had better be able to load text data...
+ */
+ OSAID loadedID = kOSANullScript;
+
+ scrptDesc.descriptorType = OSAComponent->languageID;
+ osaErr = OSALoad(OSAComponent->theComponent, &scrptDesc,
+ modeFlags, &loadedID);
+ if (osaErr == noErr) {
+ OSAExecute(OSAComponent->theComponent, loadedID,
+ contextID, modeFlags, &resultID);
+ }
+ OSADispose(OSAComponent->theComponent, loadedID);
+ }
+ }
+ if (osaErr == errOSAScriptError) {
+ tclOSAASError(interp, OSAComponent->theComponent,
+ Tcl_DStringValue(&scrptData));
+ tclError = TCL_ERROR;
+ } else if (osaErr != noErr) {
+ sprintf(buffer, "Error #%-6d compiling script", osaErr);
+ Tcl_AppendResult(interp, buffer, (char *) NULL);
+ tclError = TCL_ERROR;
+ } else {
+ tclOSAResultFromID(interp, OSAComponent->theComponent, resultID);
+ osaErr = OSADispose(OSAComponent->theComponent, resultID);
+ tclError = TCL_OK;
+ }
+
+ Tcl_DStringFree(&scrptData);
+ AEDisposeDesc(&scrptDesc);
+
+ return tclError;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAInfoCmd --
+ *
+ * This implements the Info subcommand of the component command
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Info on scripts and contexts. See the user documentation for details.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+tclOSAInfoCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ char c;
+ int length;
+ Tcl_DString theResult;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ", argv[1], " what \"", (char *) NULL );
+ return TCL_ERROR;
+ }
+
+ c = *argv[2];
+ length = strlen(argv[2]);
+ if (c == 's' && strncmp(argv[2], "scripts", length) == 0) {
+ Tcl_DStringInit(&theResult);
+ if (argc == 3) {
+ getSortedHashKeys(&OSAComponent->scriptTable, (char *) NULL,
+ &theResult);
+ } else if (argc == 4) {
+ getSortedHashKeys(&OSAComponent->scriptTable, argv[3], &theResult);
+ } else {
+ Tcl_AppendResult(interp, "Error: wrong # of arguments,",
+ " should be \"", argv[0], " ", argv[1], " ",
+ argv[2], " ?pattern?", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tcl_DStringResult(interp, &theResult);
+ return TCL_OK;
+ } else if (c == 'c' && strncmp(argv[2], "contexts", length) == 0) {
+ Tcl_DStringInit(&theResult);
+ if (argc == 3) {
+ getSortedHashKeys(&OSAComponent->contextTable, (char *) NULL,
+ &theResult);
+ } else if (argc == 4) {
+ getSortedHashKeys(&OSAComponent->contextTable,
+ argv[3], &theResult);
+ } else {
+ Tcl_AppendResult(interp, "Error: wrong # of arguments for ,",
+ " should be \"", argv[0], " ", argv[1], " ",
+ argv[2], " ?pattern?", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tcl_DStringResult(interp, &theResult);
+ return TCL_OK;
+ } else if (c == 'l' && strncmp(argv[2], "language", length) == 0) {
+ Tcl_SetResult(interp, OSAComponent->languageName, TCL_STATIC);
+ return TCL_OK;
+ } else {
+ Tcl_AppendResult(interp, "Unknown argument \"", argv[2],
+ "\" for \"", argv[0], " info \", should be one of ",
+ "\"scripts\" \"language\", or \"contexts\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSALoadCmd --
+ *
+ * This is the load subcommand for the Component Command
+ *
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Loads script data from the given file, creates a new context
+ * for it, and sets interp's result to the name of the new context.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSALoadCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ int tclError = TCL_OK, resID = 128;
+ char c, autoName[24],
+ *contextName = NULL, *scriptName = NULL, *resName = NULL;
+ Boolean makeNewContext = false, makeContext = false;
+ AEDesc scrptDesc = { typeNull, NULL };
+ long modeFlags = kOSAModeCanInteract;
+ OSAID resultID = kOSANullScript,
+ contextID = kOSANullScript,
+ parentID = kOSANullScript;
+ OSAError osaErr = noErr;
+ OSErr sysErr = noErr;
+ long scptInfo;
+
+ autoName[0] = '\0';
+ scriptName = autoName;
+ contextName = autoName;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp,
+ "Error, no data for \"", argv[0], " ", argv[1],
+ "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+
+ /*
+ * Do the argument parsing.
+ */
+
+ while (argc > 0) {
+
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+
+ /*
+ * "--" is the only switch that has no value.
+ */
+
+ if (c == '-' && *(argv[0] + 2) == '\0') {
+ argv += 1;
+ argc--;
+ break;
+ }
+
+ /*
+ * So we can check here a switch with no value.
+ */
+
+ if (argc == 1) {
+ Tcl_AppendResult(interp, "Error, no value given for switch ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'r' && strcmp(argv[0] + 1, "rsrcname") == 0) {
+ resName = argv[1];
+ } else if (c == 'r' && strcmp(argv[0] + 1, "rsrcid") == 0) {
+ if (Tcl_GetInt(interp, argv[1], &resID) != TCL_OK) {
+ Tcl_AppendResult(interp,
+ "Error getting resource ID", (char *) NULL);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Error, invalid switch ", argv[0],
+ " should be \"--\", \"-rsrcname\" or \"-rsrcid\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+ } else {
+ break;
+ }
+ }
+ /*
+ * Ok, now we have the options, so we can load the resource,
+ */
+ if (argc == 0) {
+ Tcl_AppendResult(interp, "Error, no filename given", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (tclOSALoad(interp, OSAComponent, resName, resID,
+ argv[0], &resultID) != TCL_OK) {
+ Tcl_AppendResult(interp, "Error in load command", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now find out whether we have a script, or a script context.
+ */
+
+ OSAGetScriptInfo(OSAComponent->theComponent, resultID,
+ kOSAScriptIsTypeScriptContext, &scptInfo);
+
+ if (scptInfo) {
+ autoName[0] = '\0';
+ tclOSAAddContext(OSAComponent, autoName, resultID);
+
+ Tcl_SetResult(interp, autoName, TCL_VOLATILE);
+ } else {
+ /*
+ * For a script, we return the script name
+ */
+ autoName[0] = '\0';
+ tclOSAAddScript(OSAComponent, autoName, kOSAModeCanInteract, resultID);
+ Tcl_SetResult(interp, autoName, TCL_VOLATILE);
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSARunCmd --
+ *
+ * This implements the run subcommand of the component command
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Runs the given compiled script, and returns the OSA
+ * component's result.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSARunCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ int tclError = TCL_OK,
+ resID = 128;
+ char c, *contextName = NULL,
+ *scriptName = NULL,
+ *resName = NULL;
+ AEDesc scrptDesc = { typeNull, NULL };
+ long modeFlags = kOSAModeCanInteract;
+ OSAID resultID = kOSANullScript,
+ contextID = kOSANullScript,
+ parentID = kOSANullScript;
+ OSAError osaErr = noErr;
+ OSErr sysErr = noErr;
+ char *componentName = argv[0];
+ OSAID scriptID;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be \"",
+ argv[0], " ", argv[1], " scriptName", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Set the context to the global context for this component,
+ * as a default
+ */
+ if (tclOSAGetContextID(OSAComponent, "global", &contextID) != TCL_OK) {
+ Tcl_AppendResult(interp,
+ "Could not find the global context for component ",
+ OSAComponent->theName, (char *) NULL );
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now parse the argument list for switches
+ */
+ argv += 2;
+ argc -= 2;
+
+ while (argc > 0) {
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+ /*
+ * "--" is the only switch that has no value
+ */
+ if (c == '-' && *(argv[0] + 2) == '\0') {
+ argv += 1;
+ argc--;
+ break;
+ }
+
+ /*
+ * So we can check here for a switch with no value.
+ */
+ if (argc == 1) {
+ Tcl_AppendResult(interp, "Error, no value given for switch ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'c' && strcmp(argv[0] + 1, "context") == 0) {
+ if (argc == 1) {
+ Tcl_AppendResult(interp,
+ "Error - no context provided for the -context switch",
+ (char *) NULL);
+ return TCL_ERROR;
+ } else if (tclOSAGetContextID(OSAComponent,
+ argv[1], &contextID) == TCL_OK) {
+ } else {
+ Tcl_AppendResult(interp, "Script context \"", argv[1],
+ "\" not found", (char *) NULL);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Error, invalid switch ", argv[0],
+ " for ", componentName,
+ " should be \"-context\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ argv += 2;
+ argc -= 2;
+ } else {
+ break;
+ }
+ }
+
+ if (tclOSAGetScriptID(OSAComponent, argv[0], &scriptID) != TCL_OK) {
+ if (tclOSAGetContextID(OSAComponent, argv[0], &scriptID) != TCL_OK) {
+ Tcl_AppendResult(interp, "Could not find script \"",
+ argv[2], "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ sysErr = OSAExecute(OSAComponent->theComponent,
+ scriptID, contextID, modeFlags, &resultID);
+
+ if (sysErr == errOSAScriptError) {
+ tclOSAASError(interp, OSAComponent->theComponent, (char *) NULL);
+ tclError = TCL_ERROR;
+ } else if (sysErr != noErr) {
+ char buffer[32];
+ sprintf(buffer, "Error #%6.6d encountered in run", sysErr);
+ Tcl_SetResult(interp, buffer, TCL_VOLATILE);
+ tclError = TCL_ERROR;
+ } else {
+ tclOSAResultFromID(interp, OSAComponent->theComponent, resultID );
+ }
+ OSADispose(OSAComponent->theComponent, resultID);
+
+ return tclError;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAStoreCmd --
+ *
+ * This implements the store subcommand of the component command
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Runs the given compiled script, and returns the OSA
+ * component's result.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAStoreCmd(
+ Tcl_Interp *interp,
+ tclOSAComponent *OSAComponent,
+ int argc,
+ char **argv)
+{
+ int tclError = TCL_OK, resID = 128;
+ char c, *contextName = NULL, *scriptName = NULL, *resName = NULL;
+ Boolean makeNewContext = false, makeContext = false;
+ AEDesc scrptDesc = { typeNull, NULL };
+ long modeFlags = kOSAModeCanInteract;
+ OSAID resultID = kOSANullScript,
+ contextID = kOSANullScript,
+ parentID = kOSANullScript;
+ OSAError osaErr = noErr;
+ OSErr sysErr = noErr;
+
+ if (argc == 2) {
+ Tcl_AppendResult(interp, "Error, no data for \"", argv[0],
+ " ",argv[1], "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+
+ /*
+ * Do the argument parsing
+ */
+
+ while (argc > 0) {
+ if (*argv[0] == '-') {
+ c = *(argv[0] + 1);
+
+ /*
+ * "--" is the only switch that has no value
+ */
+ if (c == '-' && *(argv[0] + 2) == '\0') {
+ argv += 1;
+ argc--;
+ break;
+ }
+
+ /*
+ * So we can check here a switch with no value.
+ */
+ if (argc == 1) {
+ Tcl_AppendResult(interp,
+ "Error, no value given for switch ",
+ argv[0], (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (c == 'r' && strcmp(argv[0] + 1, "rsrcname") == 0) {
+ resName = argv[1];
+ } else if (c == 'r' && strcmp(argv[0] + 1, "rsrcid") == 0) {
+ if (Tcl_GetInt(interp, argv[1], &resID) != TCL_OK) {
+ Tcl_AppendResult(interp,
+ "Error getting resource ID", (char *) NULL);
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Error, invalid switch ", argv[0],
+ " should be \"--\", \"-rsrcname\" or \"-rsrcid\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ argv += 2;
+ argc -= 2;
+ } else {
+ break;
+ }
+ }
+ /*
+ * Ok, now we have the options, so we can load the resource,
+ */
+ if (argc != 2) {
+ Tcl_AppendResult(interp, "Error, wrong # of arguments, should be ",
+ argv[0], " ", argv[1], "?option flag? scriptName fileName",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (tclOSAStore(interp, OSAComponent, resName, resID,
+ argv[0], argv[1]) != TCL_OK) {
+ Tcl_AppendResult(interp, "Error in load command", (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ Tcl_ResetResult(interp);
+ tclError = TCL_OK;
+ }
+
+ return tclError;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAMakeNewComponent --
+ *
+ * Makes a command cmdName to represent a new connection to the
+ * OSA component with componentSubType scriptSubtype.
+ *
+ * Results:
+ * Returns the tclOSAComponent structure for the connection.
+ *
+ * Side Effects:
+ * Adds a new element to the component table. If there is an
+ * error, then the result of the Tcl interpreter interp is set
+ * to an appropriate error message.
+ *
+ *----------------------------------------------------------------------
+ */
+
+tclOSAComponent *
+tclOSAMakeNewComponent(
+ Tcl_Interp *interp,
+ char *cmdName,
+ char *languageName,
+ OSType scriptSubtype,
+ long componentFlags)
+{
+ char buffer[32];
+ AEDesc resultingName = {typeNull, NULL};
+ AEDesc nullDesc = {typeNull, NULL };
+ OSAID globalContext;
+ char global[] = "global";
+ int nbytes;
+ ComponentDescription requestedComponent = {
+ kOSAComponentType,
+ (OSType) 0,
+ (OSType) 0,
+ (long int) 0,
+ (long int) 0
+ };
+ Tcl_HashTable *ComponentTable;
+ Component foundComponent = NULL;
+ OSAActiveUPP myActiveProcUPP;
+
+ tclOSAComponent *newComponent;
+ Tcl_HashEntry *hashEntry;
+ int newPtr;
+
+ requestedComponent.componentSubType = scriptSubtype;
+ nbytes = sizeof(tclOSAComponent);
+ newComponent = (tclOSAComponent *) ckalloc(sizeof(tclOSAComponent));
+ if (newComponent == NULL) {
+ goto CleanUp;
+ }
+
+ foundComponent = FindNextComponent(0, &requestedComponent);
+ if (foundComponent == 0) {
+ Tcl_AppendResult(interp,
+ "Could not find component of requested type", (char *) NULL);
+ goto CleanUp;
+ }
+
+ newComponent->theComponent = OpenComponent(foundComponent);
+
+ if (newComponent->theComponent == NULL) {
+ Tcl_AppendResult(interp,
+ "Could not open component of the requested type",
+ (char *) NULL);
+ goto CleanUp;
+ }
+
+ newComponent->languageName = (char *) ckalloc(strlen(languageName) + 1);
+ strcpy(newComponent->languageName,languageName);
+
+ newComponent->componentFlags = componentFlags;
+
+ newComponent->theInterp = interp;
+
+ Tcl_InitHashTable(&newComponent->contextTable, TCL_STRING_KEYS);
+ Tcl_InitHashTable(&newComponent->scriptTable, TCL_STRING_KEYS);
+
+ if (tclOSAMakeContext(newComponent, global, &globalContext) != TCL_OK) {
+ sprintf(buffer, "%-6.6d", globalContext);
+ Tcl_AppendResult(interp, "Error ", buffer, " making ", global,
+ " context.", (char *) NULL);
+ goto CleanUp;
+ }
+
+ newComponent->languageID = scriptSubtype;
+
+ newComponent->theName = (char *) ckalloc(strlen(cmdName) + 1 );
+ strcpy(newComponent->theName, cmdName);
+
+ Tcl_CreateCommand(interp, newComponent->theName, Tcl_OSAComponentCmd,
+ (ClientData) newComponent, tclOSAClose);
+
+ /*
+ * Register the new component with the component table
+ */
+
+ ComponentTable = (Tcl_HashTable *) Tcl_GetAssocData(interp,
+ "OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
+
+ if (ComponentTable == NULL) {
+ Tcl_AppendResult(interp, "Error, could not get the Component Table",
+ " from the Associated data.", (char *) NULL);
+ return (tclOSAComponent *) NULL;
+ }
+
+ hashEntry = Tcl_CreateHashEntry(ComponentTable,
+ newComponent->theName, &newPtr);
+ Tcl_SetHashValue(hashEntry, (ClientData) newComponent);
+
+ /*
+ * Set the active proc to call Tcl_DoOneEvent() while idle
+ */
+ if (OSAGetActiveProc(newComponent->theComponent,
+ &newComponent->defActiveProc, &newComponent->defRefCon) != noErr ) {
+ /* TODO -- clean up here... */
+ }
+
+ myActiveProcUPP = NewOSAActiveProc(TclOSAActiveProc);
+ OSASetActiveProc(newComponent->theComponent,
+ myActiveProcUPP, (long) newComponent);
+ return newComponent;
+
+ CleanUp:
+
+ ckfree((char *) newComponent);
+ return (tclOSAComponent *) NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAClose --
+ *
+ * This procedure closes the connection to an OSA component, and
+ * deletes all the script and context data associated with it.
+ * It is the command deletion callback for the component's command.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * Closes the connection, and releases all the script data.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+tclOSAClose(
+ ClientData clientData)
+{
+ tclOSAComponent *theComponent = (tclOSAComponent *) clientData;
+ Tcl_HashEntry *hashEntry;
+ Tcl_HashSearch search;
+ tclOSAScript *theScript;
+ Tcl_HashTable *ComponentTable;
+
+ /*
+ * Delete the context and script tables
+ * the memory for the language name, and
+ * the hash entry.
+ */
+
+ for (hashEntry = Tcl_FirstHashEntry(&theComponent->scriptTable, &search);
+ hashEntry != NULL;
+ hashEntry = Tcl_NextHashEntry(&search)) {
+
+ theScript = (tclOSAScript *) Tcl_GetHashValue(hashEntry);
+ OSADispose(theComponent->theComponent, theScript->scriptID);
+ ckfree((char *) theScript);
+ Tcl_DeleteHashEntry(hashEntry);
+ }
+
+ for (hashEntry = Tcl_FirstHashEntry(&theComponent->contextTable, &search);
+ hashEntry != NULL;
+ hashEntry = Tcl_NextHashEntry(&search)) {
+
+ Tcl_DeleteHashEntry(hashEntry);
+ }
+
+ ckfree(theComponent->languageName);
+ ckfree(theComponent->theName);
+
+ /*
+ * Finally close the component
+ */
+
+ CloseComponent(theComponent->theComponent);
+
+ ComponentTable = (Tcl_HashTable *)
+ Tcl_GetAssocData(theComponent->theInterp,
+ "OSAScript_CompTable", (Tcl_InterpDeleteProc **) NULL);
+
+ if (ComponentTable == NULL) {
+ panic("Error, could not get the Component Table from the Associated data.");
+ }
+
+ hashEntry = Tcl_FindHashEntry(ComponentTable, theComponent->theName);
+ if (hashEntry != NULL) {
+ Tcl_DeleteHashEntry(hashEntry);
+ }
+
+ ckfree((char *) theComponent);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAGetContextID --
+ *
+ * This returns the context ID, given the component name.
+ *
+ * Results:
+ * A context ID
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAGetContextID(
+ tclOSAComponent *theComponent,
+ char *contextName,
+ OSAID *theContext)
+{
+ Tcl_HashEntry *hashEntry;
+ tclOSAContext *contextStruct;
+
+ if ((hashEntry = Tcl_FindHashEntry(&theComponent->contextTable,
+ contextName)) == NULL ) {
+ return TCL_ERROR;
+ } else {
+ contextStruct = (tclOSAContext *) Tcl_GetHashValue(hashEntry);
+ *theContext = contextStruct->contextID;
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAAddContext --
+ *
+ * This adds the context ID, with the name contextName. If the
+ * name is passed in as a NULL string, space is malloc'ed for the
+ * string and a new name is made up, if the string is empty, you
+ * must have allocated enough space ( 24 characters is fine) for
+ * the name, which is made up and passed out.
+ *
+ * Results:
+ * Nothing
+ *
+ * Side effects:
+ * Adds the script context to the component's context table.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+tclOSAAddContext(
+ tclOSAComponent *theComponent,
+ char *contextName,
+ const OSAID theContext)
+{
+ static unsigned short contextIndex = 0;
+ tclOSAContext *contextStruct;
+ Tcl_HashEntry *hashEntry;
+ int newPtr;
+
+ if (contextName == NULL) {
+ contextName = ckalloc(24 * sizeof(char));
+ sprintf(contextName, "OSAContext%d", contextIndex++);
+ } else if (*contextName == '\0') {
+ sprintf(contextName, "OSAContext%d", contextIndex++);
+ }
+
+ hashEntry = Tcl_CreateHashEntry(&theComponent->contextTable,
+ contextName, &newPtr);
+
+ contextStruct = (tclOSAContext *) ckalloc(sizeof(tclOSAContext));
+ contextStruct->contextID = theContext;
+ Tcl_SetHashValue(hashEntry,(ClientData) contextStruct);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSADeleteContext --
+ *
+ * This deletes the context struct, with the name contextName.
+ *
+ * Results:
+ * A normal Tcl result
+ *
+ * Side effects:
+ * Removes the script context to the component's context table,
+ * and deletes the data associated with it.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSADeleteContext(
+ tclOSAComponent *theComponent,
+ char *contextName)
+{
+ Tcl_HashEntry *hashEntry;
+ tclOSAContext *contextStruct;
+
+ hashEntry = Tcl_FindHashEntry(&theComponent->contextTable, contextName);
+ if (hashEntry == NULL) {
+ return TCL_ERROR;
+ }
+ /*
+ * Dispose of the script context data
+ */
+ contextStruct = (tclOSAContext *) Tcl_GetHashValue(hashEntry);
+ OSADispose(theComponent->theComponent,contextStruct->contextID);
+ /*
+ * Then the hash entry
+ */
+ ckfree((char *) contextStruct);
+ Tcl_DeleteHashEntry(hashEntry);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAMakeContext --
+ *
+ * This makes the context with name contextName, and returns the ID.
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side effects:
+ * Makes a new context, adds it to the context table, and returns
+ * the new contextID in the variable theContext.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAMakeContext(
+ tclOSAComponent *theComponent,
+ char *contextName,
+ OSAID *theContext)
+{
+ AEDesc contextNameDesc = {typeNull, NULL};
+ OSAError osaErr = noErr;
+
+ AECreateDesc(typeChar, contextName, strlen(contextName), &contextNameDesc);
+ osaErr = OSAMakeContext(theComponent->theComponent, &contextNameDesc,
+ kOSANullScript, theContext);
+
+ AEDisposeDesc(&contextNameDesc);
+
+ if (osaErr == noErr) {
+ tclOSAAddContext(theComponent, contextName, *theContext);
+ } else {
+ *theContext = (OSAID) osaErr;
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAStore --
+ *
+ * This stores a script resource from the file named in fileName.
+ *
+ * Most of this routine is caged from the Tcl Source, from the
+ * Tcl_MacSourceCmd routine. This is good, since it ensures this
+ * follows the same convention for looking up files as Tcl.
+ *
+ * Returns
+ * A standard Tcl result.
+ *
+ * Side Effects:
+ * The given script data is stored in the file fileName.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+tclOSAStore(
+ Tcl_Interp *interp,
+ tclOSAComponent *theComponent,
+ char *resourceName,
+ int resourceNumber,
+ char *scriptName,
+ char *fileName)
+{
+ Handle resHandle;
+ Str255 rezName;
+ int result = TCL_OK;
+ short saveRef, fileRef = -1;
+ char idStr[64];
+ FSSpec fileSpec;
+ Tcl_DString buffer;
+ char *nativeName;
+ OSErr myErr = noErr;
+ OSAID scriptID;
+ Size scriptSize;
+ AEDesc scriptData;
+
+ /*
+ * First extract the script data
+ */
+
+ if (tclOSAGetScriptID(theComponent, scriptName, &scriptID) != TCL_OK ) {
+ if (tclOSAGetContextID(theComponent, scriptName, &scriptID)
+ != TCL_OK) {
+ Tcl_AppendResult(interp, "Error getting script ",
+ scriptName, (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ myErr = OSAStore(theComponent->theComponent, scriptID,
+ typeOSAGenericStorage, kOSAModeNull, &scriptData);
+ if (myErr != noErr) {
+ sprintf(idStr, "%d", myErr);
+ Tcl_AppendResult(interp, "Error #", idStr,
+ " storing script ", scriptName, (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now try to open the output file
+ */
+
+ saveRef = CurResFile();
+
+ if (fileName != NULL) {
+ OSErr err;
+
+ Tcl_DStringInit(&buffer);
+ nativeName = Tcl_TranslateFileName(interp, fileName, &buffer);
+ if (nativeName == NULL) {
+ return TCL_ERROR;
+ }
+ err = FSpLocationFromPath(strlen(nativeName), nativeName, &fileSpec);
+
+ Tcl_DStringFree(&buffer);
+ if ((err != noErr) && (err != fnfErr)) {
+ Tcl_AppendResult(interp,
+ "Error getting a location for the file: \"",
+ fileName, "\".", NULL);
+ return TCL_ERROR;
+ }
+
+ FSpCreateResFileCompat(&fileSpec,
+ 'WiSH', 'osas', smSystemScript);
+ myErr = ResError();
+
+ if ((myErr != noErr) && (myErr != dupFNErr)) {
+ sprintf(idStr, "%d", myErr);
+ Tcl_AppendResult(interp, "Error #", idStr,
+ " creating new resource file ", fileName, (char *) NULL);
+ result = TCL_ERROR;
+ goto rezEvalCleanUp;
+ }
+
+ fileRef = FSpOpenResFileCompat(&fileSpec, fsRdWrPerm);
+ if (fileRef == -1) {
+ Tcl_AppendResult(interp, "Error reading the file: \"",
+ fileName, "\".", NULL);
+ result = TCL_ERROR;
+ goto rezEvalCleanUp;
+ }
+ UseResFile(fileRef);
+ } else {
+ /*
+ * The default behavior will search through all open resource files.
+ * This may not be the behavior you desire. If you want the behavior
+ * of this call to *only* search the application resource fork, you
+ * must call UseResFile at this point to set it to the application
+ * file. This means you must have already obtained the application's
+ * fileRef when the application started up.
+ */
+ }
+
+ /*
+ * Load the resource by name
+ */
+ if (resourceName != NULL) {
+ strcpy((char *) rezName + 1, resourceName);
+ rezName[0] = strlen(resourceName);
+ resHandle = Get1NamedResource('scpt', rezName);
+ myErr = ResError();
+ if (resHandle == NULL) {
+ /*
+ * These signify either the resource or the resource
+ * type were not found
+ */
+ if (myErr == resNotFound || myErr == noErr) {
+ short uniqueID;
+ while ((uniqueID = Unique1ID('scpt') ) < 128) {}
+ AddResource(scriptData.dataHandle, 'scpt', uniqueID, rezName);
+ WriteResource(resHandle);
+ result = TCL_OK;
+ goto rezEvalCleanUp;
+ } else {
+ /*
+ * This means there was some other error, for now
+ * I just bag out.
+ */
+ sprintf(idStr, "%d", myErr);
+ Tcl_AppendResult(interp, "Error #", idStr,
+ " opening scpt resource named ", resourceName,
+ " in file ", fileName, (char *) NULL);
+ result = TCL_ERROR;
+ goto rezEvalCleanUp;
+ }
+ }
+ /*
+ * Or ID
+ */
+ } else {
+ resHandle = Get1Resource('scpt', resourceNumber);
+ rezName[0] = 0;
+ rezName[1] = '\0';
+ myErr = ResError();
+ if (resHandle == NULL) {
+ /*
+ * These signify either the resource or the resource
+ * type were not found
+ */
+ if (myErr == resNotFound || myErr == noErr) {
+ AddResource(scriptData.dataHandle, 'scpt',
+ resourceNumber, rezName);
+ WriteResource(resHandle);
+ result = TCL_OK;
+ goto rezEvalCleanUp;
+ } else {
+ /*
+ * This means there was some other error, for now
+ * I just bag out */
+ sprintf(idStr, "%d", myErr);
+ Tcl_AppendResult(interp, "Error #", idStr,
+ " opening scpt resource named ", resourceName,
+ " in file ", fileName,(char *) NULL);
+ result = TCL_ERROR;
+ goto rezEvalCleanUp;
+ }
+ }
+ }
+
+ /*
+ * We get to here if the resource exists
+ * we just copy into it...
+ */
+
+ scriptSize = GetHandleSize(scriptData.dataHandle);
+ SetHandleSize(resHandle, scriptSize);
+ HLock(scriptData.dataHandle);
+ HLock(resHandle);
+ BlockMove(*scriptData.dataHandle, *resHandle,scriptSize);
+ HUnlock(scriptData.dataHandle);
+ HUnlock(resHandle);
+ ChangedResource(resHandle);
+ WriteResource(resHandle);
+ result = TCL_OK;
+ goto rezEvalCleanUp;
+
+ rezEvalError:
+ sprintf(idStr, "ID=%d", resourceNumber);
+ Tcl_AppendResult(interp, "The resource \"",
+ (resourceName != NULL ? resourceName : idStr),
+ "\" could not be loaded from ",
+ (fileName != NULL ? fileName : "application"),
+ ".", NULL);
+
+ rezEvalCleanUp:
+ if (fileRef != -1) {
+ CloseResFile(fileRef);
+ }
+
+ UseResFile(saveRef);
+
+ return result;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * tclOSALoad --
+ *
+ * This loads a script resource from the file named in fileName.
+ * Most of this routine is caged from the Tcl Source, from the
+ * Tcl_MacSourceCmd routine. This is good, since it ensures this
+ * follows the same convention for looking up files as Tcl.
+ *
+ * Returns
+ * A standard Tcl result.
+ *
+ * Side Effects:
+ * A new script element is created from the data in the file.
+ * The script ID is passed out in the variable resultID.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+tclOSALoad(
+ Tcl_Interp *interp,
+ tclOSAComponent *theComponent,
+ char *resourceName,
+ int resourceNumber,
+ char *fileName,
+ OSAID *resultID)
+{
+ Handle sourceData;
+ Str255 rezName;
+ int result = TCL_OK;
+ short saveRef, fileRef = -1;
+ char idStr[64];
+ FSSpec fileSpec;
+ Tcl_DString buffer;
+ char *nativeName;
+
+ saveRef = CurResFile();
+
+ if (fileName != NULL) {
+ OSErr err;
+
+ Tcl_DStringInit(&buffer);
+ nativeName = Tcl_TranslateFileName(interp, fileName, &buffer);
+ if (nativeName == NULL) {
+ return TCL_ERROR;
+ }
+ err = FSpLocationFromPath(strlen(nativeName), nativeName, &fileSpec);
+ Tcl_DStringFree(&buffer);
+ if (err != noErr) {
+ Tcl_AppendResult(interp, "Error finding the file: \"",
+ fileName, "\".", NULL);
+ return TCL_ERROR;
+ }
+
+ fileRef = FSpOpenResFileCompat(&fileSpec, fsRdPerm);
+ if (fileRef == -1) {
+ Tcl_AppendResult(interp, "Error reading the file: \"",
+ fileName, "\".", NULL);
+ return TCL_ERROR;
+ }
+ UseResFile(fileRef);
+ } else {
+ /*
+ * The default behavior will search through all open resource files.
+ * This may not be the behavior you desire. If you want the behavior
+ * of this call to *only* search the application resource fork, you
+ * must call UseResFile at this point to set it to the application
+ * file. This means you must have already obtained the application's
+ * fileRef when the application started up.
+ */
+ }
+
+ /*
+ * Load the resource by name or ID
+ */
+ if (resourceName != NULL) {
+ strcpy((char *) rezName + 1, resourceName);
+ rezName[0] = strlen(resourceName);
+ sourceData = GetNamedResource('scpt', rezName);
+ } else {
+ sourceData = GetResource('scpt', (short) resourceNumber);
+ }
+
+ if (sourceData == NULL) {
+ result = TCL_ERROR;
+ } else {
+ AEDesc scriptDesc;
+ OSAError osaErr;
+
+ scriptDesc.descriptorType = typeOSAGenericStorage;
+ scriptDesc.dataHandle = sourceData;
+
+ osaErr = OSALoad(theComponent->theComponent, &scriptDesc,
+ kOSAModeNull, resultID);
+
+ ReleaseResource(sourceData);
+
+ if (osaErr != noErr) {
+ result = TCL_ERROR;
+ goto rezEvalError;
+ }
+
+ goto rezEvalCleanUp;
+ }
+
+ rezEvalError:
+ sprintf(idStr, "ID=%d", resourceNumber);
+ Tcl_AppendResult(interp, "The resource \"",
+ (resourceName != NULL ? resourceName : idStr),
+ "\" could not be loaded from ",
+ (fileName != NULL ? fileName : "application"),
+ ".", NULL);
+
+ rezEvalCleanUp:
+ if (fileRef != -1) {
+ CloseResFile(fileRef);
+ }
+
+ UseResFile(saveRef);
+
+ return result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAGetScriptID --
+ *
+ * This returns the context ID, gibven the component name.
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side effects:
+ * Passes out the script ID in the variable scriptID.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAGetScriptID(
+ tclOSAComponent *theComponent,
+ char *scriptName,
+ OSAID *scriptID)
+{
+ tclOSAScript *theScript;
+
+ theScript = tclOSAGetScript(theComponent, scriptName);
+ if (theScript == NULL) {
+ return TCL_ERROR;
+ }
+
+ *scriptID = theScript->scriptID;
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAAddScript --
+ *
+ * This adds a script to theComponent's script table, with the
+ * given name & ID.
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side effects:
+ * Adds an element to the component's script table.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSAAddScript(
+ tclOSAComponent *theComponent,
+ char *scriptName,
+ long modeFlags,
+ OSAID scriptID)
+{
+ Tcl_HashEntry *hashEntry;
+ int newPtr;
+ static int scriptIndex = 0;
+ tclOSAScript *theScript;
+
+ if (*scriptName == '\0') {
+ sprintf(scriptName, "OSAScript%d", scriptIndex++);
+ }
+
+ hashEntry = Tcl_CreateHashEntry(&theComponent->scriptTable,
+ scriptName, &newPtr);
+ if (newPtr == 0) {
+ theScript = (tclOSAScript *) Tcl_GetHashValue(hashEntry);
+ OSADispose(theComponent->theComponent, theScript->scriptID);
+ } else {
+ theScript = (tclOSAScript *) ckalloc(sizeof(tclOSAScript));
+ if (theScript == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ theScript->scriptID = scriptID;
+ theScript->languageID = theComponent->languageID;
+ theScript->modeFlags = modeFlags;
+
+ Tcl_SetHashValue(hashEntry,(ClientData) theScript);
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAGetScriptID --
+ *
+ * This returns the script structure, given the component and script name.
+ *
+ * Results:
+ * A pointer to the script structure.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+static tclOSAScript *
+tclOSAGetScript(
+ tclOSAComponent *theComponent,
+ char *scriptName)
+{
+ Tcl_HashEntry *hashEntry;
+
+ hashEntry = Tcl_FindHashEntry(&theComponent->scriptTable, scriptName);
+ if (hashEntry == NULL) {
+ return NULL;
+ }
+
+ return (tclOSAScript *) Tcl_GetHashValue(hashEntry);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSADeleteScript --
+ *
+ * This deletes the script given by scriptName.
+ *
+ * Results:
+ * A standard Tcl result
+ *
+ * Side effects:
+ * Deletes the script from the script table, and frees up the
+ * resources associated with it. If there is an error, then
+ * space for the error message is malloc'ed, and passed out in
+ * the variable errMsg.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+tclOSADeleteScript(
+ tclOSAComponent *theComponent,
+ char *scriptName,
+ char *errMsg)
+{
+ Tcl_HashEntry *hashEntry;
+ tclOSAScript *scriptPtr;
+
+ hashEntry = Tcl_FindHashEntry(&theComponent->scriptTable, scriptName);
+ if (hashEntry == NULL) {
+ errMsg = ckalloc(17);
+ strcpy(errMsg,"Script not found");
+ return TCL_ERROR;
+ }
+
+ scriptPtr = (tclOSAScript *) Tcl_GetHashValue(hashEntry);
+ OSADispose(theComponent->theComponent, scriptPtr->scriptID);
+ ckfree((char *) scriptPtr);
+ Tcl_DeleteHashEntry(hashEntry);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclOSAActiveProc --
+ *
+ * This is passed to each component. It is run periodically
+ * during script compilation and script execution. It in turn
+ * calls Tcl_DoOneEvent to process the event queue. We also call
+ * the default Active proc which will let the user cancel the script
+ * by hitting Command-.
+ *
+ * Results:
+ * A standard MacOS system error
+ *
+ * Side effects:
+ * Any Tcl code may run while calling Tcl_DoOneEvent.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal OSErr
+TclOSAActiveProc(
+ long refCon)
+{
+ tclOSAComponent *theComponent = (tclOSAComponent *) refCon;
+
+ Tcl_DoOneEvent(TCL_DONT_WAIT);
+ CallOSAActiveProc(theComponent->defActiveProc, theComponent->defRefCon);
+
+ return noErr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ASCIICompareProc --
+ *
+ * Trivial ascii compare for use with qsort.
+ *
+ * Results:
+ * strcmp of the two input strings
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ASCIICompareProc(const void *first,const void *second)
+{
+ int order;
+
+ char *firstString = *((char **) first);
+ char *secondString = *((char **) second);
+
+ order = strcmp(firstString, secondString);
+
+ return order;
+}
+
+#define REALLOC_INCR 30
+/*
+ *----------------------------------------------------------------------
+ *
+ * getSortedHashKeys --
+ *
+ * returns an alphabetically sorted list of the keys of the hash
+ * theTable which match the string "pattern" in the DString
+ * theResult. pattern == NULL matches all.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * ReInitializes the DString theResult, then copies the names of
+ * the matching keys into the string as list elements.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+getSortedHashKeys(
+ Tcl_HashTable *theTable,
+ char *pattern,
+ Tcl_DString *theResult)
+{
+ Tcl_HashSearch search;
+ Tcl_HashEntry *hPtr;
+ Boolean compare = true;
+ char *keyPtr;
+ static char **resultArgv = NULL;
+ static int totSize = 0;
+ int totElem = 0, i;
+
+ if (pattern == NULL || *pattern == '\0' ||
+ (*pattern == '*' && *(pattern + 1) == '\0')) {
+ compare = false;
+ }
+
+ for (hPtr = Tcl_FirstHashEntry(theTable,&search), totElem = 0;
+ hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
+
+ keyPtr = (char *) Tcl_GetHashKey(theTable, hPtr);
+ if (!compare || Tcl_StringMatch(keyPtr, pattern)) {
+ totElem++;
+ if (totElem >= totSize) {
+ totSize += REALLOC_INCR;
+ resultArgv = (char **) ckrealloc((char *) resultArgv,
+ totSize * sizeof(char *));
+ }
+ resultArgv[totElem - 1] = keyPtr;
+ }
+ }
+
+ Tcl_DStringInit(theResult);
+ if (totElem == 1) {
+ Tcl_DStringAppendElement(theResult, resultArgv[0]);
+ } else if (totElem > 1) {
+ qsort((VOID *) resultArgv, (size_t) totElem, sizeof (char *),
+ ASCIICompareProc);
+
+ for (i = 0; i < totElem; i++) {
+ Tcl_DStringAppendElement(theResult, resultArgv[i]);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * prepareScriptData --
+ *
+ * Massages the input data in the argv array, concating the
+ * elements, with a " " between each, and replacing \n with \r,
+ * and \\n with " ". Puts the result in the the DString scrptData,
+ * and copies the result to the AEdesc scrptDesc.
+ *
+ * Results:
+ * Standard Tcl result
+ *
+ * Side effects:
+ * Creates a new Handle (with AECreateDesc) for the script data.
+ * Stores the script in scrptData, or the error message if there
+ * is an error creating the descriptor.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+prepareScriptData(
+ int argc,
+ char **argv,
+ Tcl_DString *scrptData,
+ AEDesc *scrptDesc)
+{
+ char * ptr;
+ int i;
+ char buffer[7];
+ OSErr sysErr = noErr;
+
+ Tcl_DStringInit(scrptData);
+
+ for (i = 0; i < argc; i++) {
+ Tcl_DStringAppend(scrptData, argv[i], -1);
+ Tcl_DStringAppend(scrptData, " ", 1);
+ }
+
+ /*
+ * First replace the \n's with \r's in the script argument
+ * Also replace "\\n" with " ".
+ */
+
+ for (ptr = scrptData->string; *ptr != '\0'; ptr++) {
+ if (*ptr == '\n') {
+ *ptr = '\r';
+ } else if (*ptr == '\\') {
+ if (*(ptr + 1) == '\n') {
+ *ptr = ' ';
+ *(ptr + 1) = ' ';
+ }
+ }
+ }
+
+ sysErr = AECreateDesc(typeChar, Tcl_DStringValue(scrptData),
+ Tcl_DStringLength(scrptData), scrptDesc);
+
+ if (sysErr != noErr) {
+ sprintf(buffer, "%6d", sysErr);
+ Tcl_DStringFree(scrptData);
+ Tcl_DStringAppend(scrptData, "Error #", 7);
+ Tcl_DStringAppend(scrptData, buffer, -1);
+ Tcl_DStringAppend(scrptData, " creating Script Data Descriptor.", 33);
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAResultFromID --
+ *
+ * Gets a human readable version of the result from the script ID
+ * and returns it in the result of the interpreter interp
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * Sets the result of interp to the human readable version of resultID.
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+tclOSAResultFromID(
+ Tcl_Interp *interp,
+ ComponentInstance theComponent,
+ OSAID resultID )
+{
+ OSErr myErr = noErr;
+ AEDesc resultDesc;
+ Tcl_DString resultStr;
+
+ Tcl_DStringInit(&resultStr);
+
+ myErr = OSADisplay(theComponent, resultID, typeChar,
+ kOSAModeNull, &resultDesc);
+ Tcl_DStringAppend(&resultStr, (char *) *resultDesc.dataHandle,
+ GetHandleSize(resultDesc.dataHandle));
+ Tcl_DStringResult(interp,&resultStr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * tclOSAASError --
+ *
+ * Gets the error message from the AppleScript component, and adds
+ * it to interp's result. If the script data is known, will point
+ * out the offending bit of code. This MUST BE A NULL TERMINATED
+ * C-STRING, not a typeChar.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * Sets the result of interp to error, plus the relevant portion
+ * of the script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+tclOSAASError(
+ Tcl_Interp * interp,
+ ComponentInstance theComponent,
+ char *scriptData )
+{
+ OSErr myErr = noErr;
+ AEDesc errResult,errLimits;
+ Tcl_DString errStr;
+ DescType returnType;
+ Size returnSize;
+ short srcStart,srcEnd;
+ char buffer[16];
+
+ Tcl_DStringInit(&errStr);
+ Tcl_DStringAppend(&errStr, "An AppleScript error was encountered.\n", -1);
+
+ OSAScriptError(theComponent, kOSAErrorNumber,
+ typeShortInteger, &errResult);
+
+ sprintf(buffer, "Error #%-6.6d\n", (short int) **errResult.dataHandle);
+
+ AEDisposeDesc(&errResult);
+
+ Tcl_DStringAppend(&errStr,buffer, 15);
+
+ OSAScriptError(theComponent, kOSAErrorMessage, typeChar, &errResult);
+ Tcl_DStringAppend(&errStr, (char *) *errResult.dataHandle,
+ GetHandleSize(errResult.dataHandle));
+ AEDisposeDesc(&errResult);
+
+ if (scriptData != NULL) {
+ int lowerB, upperB;
+
+ myErr = OSAScriptError(theComponent, kOSAErrorRange,
+ typeOSAErrorRange, &errResult);
+
+ myErr = AECoerceDesc(&errResult, typeAERecord, &errLimits);
+ myErr = AEGetKeyPtr(&errLimits, keyOSASourceStart,
+ typeShortInteger, &returnType, &srcStart,
+ sizeof(short int), &returnSize);
+ myErr = AEGetKeyPtr(&errLimits, keyOSASourceEnd, typeShortInteger,
+ &returnType, &srcEnd, sizeof(short int), &returnSize);
+ AEDisposeDesc(&errResult);
+ AEDisposeDesc(&errLimits);
+
+ Tcl_DStringAppend(&errStr, "\nThe offending bit of code was:\n\t", -1);
+ /*
+ * Get the full line on which the error occured:
+ */
+ for (lowerB = srcStart; lowerB > 0; lowerB--) {
+ if (*(scriptData + lowerB ) == '\r') {
+ lowerB++;
+ break;
+ }
+ }
+
+ for (upperB = srcEnd; *(scriptData + upperB) != '\0'; upperB++) {
+ if (*(scriptData + upperB) == '\r') {
+ break;
+ }
+ }
+
+ Tcl_DStringAppend(&errStr, scriptData+lowerB, srcStart - lowerB);
+ Tcl_DStringAppend(&errStr, "_", 1);
+ Tcl_DStringAppend(&errStr, scriptData+srcStart, upperB - srcStart);
+ }
+
+ Tcl_DStringResult(interp,&errStr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetRawDataFromDescriptor --
+ *
+ * Get the data from a descriptor.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+GetRawDataFromDescriptor(
+ AEDesc *theDesc,
+ Ptr destPtr,
+ Size destMaxSize,
+ Size *actSize)
+ {
+ Size copySize;
+
+ if (theDesc->dataHandle) {
+ HLock((Handle)theDesc->dataHandle);
+ *actSize = GetHandleSize((Handle)theDesc->dataHandle);
+ copySize = *actSize < destMaxSize ? *actSize : destMaxSize;
+ BlockMove(*theDesc->dataHandle, destPtr, copySize);
+ HUnlock((Handle)theDesc->dataHandle);
+ } else {
+ *actSize = 0;
+ }
+
+ }
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetRawDataFromDescriptor --
+ *
+ * Get the data from a descriptor. Assume it's a C string.
+ *
+ * Results:
+ * None
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OSErr
+GetCStringFromDescriptor(
+ AEDesc *sourceDesc,
+ char *resultStr,
+ Size resultMaxSize,
+ Size *resultSize)
+{
+ OSErr err;
+ AEDesc resultDesc;
+
+ resultDesc.dataHandle = nil;
+
+ err = AECoerceDesc(sourceDesc, typeChar, &resultDesc);
+
+ if (!err) {
+ GetRawDataFromDescriptor(&resultDesc, (Ptr) resultStr,
+ resultMaxSize - 1, resultSize);
+ resultStr[*resultSize] = 0;
+ } else {
+ err = errAECoercionFail;
+ }
+
+ if (resultDesc.dataHandle) {
+ AEDisposeDesc(&resultDesc);
+ }
+
+ return err;
+}
diff --git a/mac/tclMacOSA.exp b/mac/tclMacOSA.exp
new file mode 100644
index 0000000..4cde512
--- /dev/null
+++ b/mac/tclMacOSA.exp
@@ -0,0 +1 @@
+Tclapplescript_Init
diff --git a/mac/tclMacOSA.r b/mac/tclMacOSA.r
new file mode 100644
index 0000000..7975a19
--- /dev/null
+++ b/mac/tclMacOSA.r
@@ -0,0 +1,76 @@
+/*
+ * tkMacOSA.r --
+ *
+ * This file creates resources used by the AppleScript package.
+ *
+ * Copyright (c) 1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacOSA.r 1.6 97/11/20 18:40:02
+ */
+
+#include <Types.r>
+#include <SysTypes.r>
+
+/*
+ * The folowing include and defines help construct
+ * the version string for Tcl.
+ */
+
+#define SCRIPT_MAJOR_VERSION 1 /* Major number */
+#define SCRIPT_MINOR_VERSION 0 /* Minor number */
+#define SCRIPT_RELEASE_SERIAL 2 /* Really minor number! */
+#define RELEASE_LEVEL alpha /* alpha, beta, or final */
+#define SCRIPT_VERSION "1.0"
+#define SCRIPT_PATCH_LEVEL "1.0a2"
+#define FINAL 0 /* Change to 1 if final version. */
+
+#if FINAL
+# define MINOR_VERSION (SCRIPT_MINOR_VERSION * 16) + SCRIPT_RELEASE_SERIAL
+#else
+# define MINOR_VERSION SCRIPT_MINOR_VERSION * 16
+#endif
+
+#define RELEASE_CODE 0x00
+
+resource 'vers' (1) {
+ SCRIPT_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ SCRIPT_PATCH_LEVEL,
+ SCRIPT_PATCH_LEVEL ", by Jim Ingham & Ray Johnson © Sun Microsystems"
+};
+
+resource 'vers' (2) {
+ SCRIPT_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ SCRIPT_PATCH_LEVEL,
+ "Tclapplescript " SCRIPT_PATCH_LEVEL " © 1996-1997"
+};
+
+/*
+ * The -16397 string will be displayed by Finder when a user
+ * tries to open the shared library. The string should
+ * give the user a little detail about the library's capabilities
+ * and enough information to install the library in the correct location.
+ * A similar string should be placed in all shared libraries.
+ */
+resource 'STR ' (-16397, purgeable) {
+ "TclAppleScript Library\n\n"
+ "This library provides the ability to run AppleScript "
+ " commands from Tcl/Tk programs. To work properly, it "
+ "should be placed in the ÔTool Command LanguageÕ folder "
+ "within the Extensions folder."
+};
+
+
+/*
+ * We now load the Tk library into the resource fork of the library.
+ */
+
+data 'TEXT' (4000,"pkgIndex",purgeable, preload) {
+ "# Tcl package index file, version 1.0\n"
+ "package ifneeded Tclapplescript 1.0 [list tclPkgSetup $dir Tclapplescript 1.0 {{Tclapplescript"
+ ".shlb load AppleScript}}]\n"
+};
diff --git a/mac/tclMacPanic.c b/mac/tclMacPanic.c
new file mode 100644
index 0000000..13219d8
--- /dev/null
+++ b/mac/tclMacPanic.c
@@ -0,0 +1,235 @@
+/*
+ * tclMacPanic.c --
+ *
+ * Source code for the "panic" library procedure used in "Simple Shell";
+ * other Mac applications will probably override this with a more robust
+ * application-specific panic procedure.
+ *
+ * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
+ * Copyright (c) 1995-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacPanic.c 1.14 97/11/20 18:41:06
+ */
+
+
+#include <Events.h>
+#include <Controls.h>
+#include <Windows.h>
+#include <TextEdit.h>
+#include <Fonts.h>
+#include <Dialogs.h>
+#include <Icons.h>
+#include <Sound.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "tclInt.h"
+
+/*
+ * constants for panic dialog
+ */
+#define PANICHEIGHT 150 /* Height of dialog */
+#define PANICWIDTH 350 /* Width of dialog */
+#define PANIC_BUTTON_RECT {125, 260, 145, 335} /* Rect for button. */
+#define PANIC_ICON_RECT {10, 20, 42, 52} /* Rect for icon. */
+#define PANIC_TEXT_RECT {10, 65, 140, 330} /* Rect for text. */
+#define ENTERCODE (0x03)
+#define RETURNCODE (0x0D)
+
+/*
+ * The panicProc variable contains a pointer to an application
+ * specific panic procedure.
+ */
+
+void (*panicProc) _ANSI_ARGS_(TCL_VARARGS(char *,format)) = NULL;
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_SetPanicProc --
+ *
+ * Replace the default panic behavior with the specified functiion.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Sets the panicProc variable.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_SetPanicProc(proc)
+ void (*proc) _ANSI_ARGS_(TCL_VARARGS(char *,format));
+{
+ panicProc = proc;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * MacPanic --
+ *
+ * Displays panic info..
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Sets the panicProc variable.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+MacPanic(
+ char *msg) /* Text to show in panic dialog. */
+{
+ WindowRef macWinPtr, foundWinPtr;
+ Rect macRect;
+ Rect buttonRect = PANIC_BUTTON_RECT;
+ Rect iconRect = PANIC_ICON_RECT;
+ Rect textRect = PANIC_TEXT_RECT;
+ ControlHandle okButtonHandle;
+ EventRecord event;
+ Handle stopIconHandle;
+ int part;
+ Boolean done = false;
+
+
+ /*
+ * Put up an alert without using the Resource Manager (there may
+ * be no resources to load). Use the Window and Control Managers instead.
+ * We want the window centered on the main monitor. The following
+ * should be tested with multiple monitors. Look and see if there is a way
+ * not using qd.screenBits.
+ */
+
+ macRect.top = (qd.screenBits.bounds.top + qd.screenBits.bounds.bottom)
+ / 2 - (PANICHEIGHT / 2);
+ macRect.bottom = (qd.screenBits.bounds.top + qd.screenBits.bounds.bottom)
+ / 2 + (PANICHEIGHT / 2);
+ macRect.left = (qd.screenBits.bounds.left + qd.screenBits.bounds.right)
+ / 2 - (PANICWIDTH / 2);
+ macRect.right = (qd.screenBits.bounds.left + qd.screenBits.bounds.right)
+ / 2 + (PANICWIDTH / 2);
+
+ macWinPtr = NewWindow(NULL, &macRect, "\p", true, dBoxProc, (WindowRef) -1,
+ false, 0);
+ if (macWinPtr == NULL) {
+ goto exitNow;
+ }
+
+ okButtonHandle = NewControl(macWinPtr, &buttonRect, "\pOK", true,
+ 0, 0, 1, pushButProc, 0);
+ if (okButtonHandle == NULL) {
+ CloseWindow(macWinPtr);
+ goto exitNow;
+ }
+
+ SelectWindow(macWinPtr);
+ SetCursor(&qd.arrow);
+ stopIconHandle = GetIcon(kStopIcon);
+
+ while (!done) {
+ if (WaitNextEvent(mDownMask | keyDownMask | updateMask,
+ &event, 0, NULL)) {
+ switch(event.what) {
+ case mouseDown:
+ part = FindWindow(event.where, &foundWinPtr);
+
+ if ((foundWinPtr != macWinPtr) || (part != inContent)) {
+ SysBeep(1);
+ } else {
+ SetPortWindowPort(macWinPtr);
+ GlobalToLocal(&event.where);
+ part = FindControl(event.where, macWinPtr,
+ &okButtonHandle);
+
+ if ((inButton == part) &&
+ (TrackControl(okButtonHandle,
+ event.where, NULL))) {
+ done = true;
+ }
+ }
+ break;
+ case keyDown:
+ switch (event.message & charCodeMask) {
+ case ENTERCODE:
+ case RETURNCODE:
+ HiliteControl(okButtonHandle, 1);
+ HiliteControl(okButtonHandle, 0);
+ done = true;
+ }
+ break;
+ case updateEvt:
+ SetPortWindowPort(macWinPtr);
+ TextFont(systemFont);
+
+ BeginUpdate(macWinPtr);
+ if (stopIconHandle != NULL) {
+ PlotIcon(&iconRect, stopIconHandle);
+ }
+ TextBox(msg, strlen(msg), &textRect, teFlushDefault);
+ DrawControls(macWinPtr);
+ EndUpdate(macWinPtr);
+ }
+ }
+ }
+
+ CloseWindow(macWinPtr);
+
+ exitNow:
+#ifdef TCL_DEBUG
+ Debugger();
+#else
+ abort();
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * panic --
+ *
+ * Print an error message and kill the process.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The process dies, entering the debugger if possible.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#pragma ignore_oldstyle on
+void
+panic(char * format, ...)
+{
+ va_list varg;
+ char errorText[256];
+
+ if (panicProc != NULL) {
+ va_start(varg, format);
+
+ (void) (*panicProc)(format, varg);
+
+ va_end(varg);
+ } else {
+ va_start(varg, format);
+
+ vsprintf(errorText, format, varg);
+
+ va_end(varg);
+
+ MacPanic(errorText);
+ }
+
+}
+#pragma ignore_oldstyle reset
diff --git a/mac/tclMacPort.h b/mac/tclMacPort.h
new file mode 100644
index 0000000..366b7a0
--- /dev/null
+++ b/mac/tclMacPort.h
@@ -0,0 +1,263 @@
+/*
+ * tclMacPort.h --
+ *
+ * This header file handles porting issues that occur because of
+ * differences between the Mac and Unix. It should be the only
+ * file that contains #ifdefs to handle different flavors of OS.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacPort.h 1.75 97/08/11 10:18:07
+ */
+
+#ifndef _MACPORT
+#define _MACPORT
+
+#ifndef _TCL
+#include "tcl.h"
+#endif
+
+#include "tclErrno.h"
+#include <float.h>
+
+/* Includes */
+#ifdef THINK_C
+ /*
+ * The Symantic C code has not been tested
+ * and probably will not work.
+ */
+# include <pascal.h>
+# include <posix.h>
+# include <string.h>
+# include <fcntl.h>
+# include <pwd.h>
+# include <sys/param.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <unistd.h>
+#elif defined(__MWERKS__)
+# include <time.h>
+# include <unistd.h>
+/*
+ * The following definitions are usually found if fcntl.h.
+ * However, MetroWerks has screwed that file up a couple of times
+ * and all we need are the defines.
+ */
+#define O_RDWR 0x0 /* open the file in read/write mode */
+#define O_RDONLY 0x1 /* open the file in read only mode */
+#define O_WRONLY 0x2 /* open the file in write only mode */
+#define O_APPEND 0x0100 /* open the file in append mode */
+#define O_CREAT 0x0200 /* create the file if it doesn't exist */
+#define O_EXCL 0x0400 /* if the file exists don't create it again */
+#define O_TRUNC 0x0800 /* truncate the file after opening it */
+
+/*
+ * MetroWerks stat.h file is rather weak. The defines
+ * after the include are needed to fill in the missing
+ * defines.
+ */
+# include <stat.h>
+# ifndef S_IFIFO
+# define S_IFIFO 0x0100
+# endif
+# ifndef S_IFBLK
+# define S_IFBLK 0x0600
+# endif
+# ifndef S_ISLNK
+# define S_ISLNK(m) (((m)&(S_IFMT)) == (S_IFLNK))
+# endif
+# ifndef S_ISSOCK
+# define S_ISSOCK(m) (((m)&(S_IFMT)) == (S_IFSOCK))
+# endif
+# ifndef S_IRWXU
+# define S_IRWXU 00007 /* read, write, execute: owner */
+# define S_IRUSR 00004 /* read permission: owner */
+# define S_IWUSR 00002 /* write permission: owner */
+# define S_IXUSR 00001 /* execute permission: owner */
+# define S_IRWXG 00007 /* read, write, execute: group */
+# define S_IRGRP 00004 /* read permission: group */
+# define S_IWGRP 00002 /* write permission: group */
+# define S_IXGRP 00001 /* execute permission: group */
+# define S_IRWXO 00007 /* read, write, execute: other */
+# define S_IROTH 00004 /* read permission: other */
+# define S_IWOTH 00002 /* write permission: other */
+# define S_IXOTH 00001 /* execute permission: other */
+# endif
+
+# define isatty(arg) 1
+
+/*
+ * Defines used by access function. This function is provided
+ * by Mac Tcl as the function TclMacAccess.
+ */
+
+# define F_OK 0 /* test for existence of file */
+# define X_OK 0x01 /* test for execute or search permission */
+# define W_OK 0x02 /* test for write permission */
+# define R_OK 0x04 /* test for read permission */
+
+#endif
+
+/*
+ * waitpid doesn't work on a Mac - the following makes
+ * Tcl compile without errors. These would normally
+ * be defined in sys/wait.h on UNIX systems.
+ */
+
+#define WNOHANG 1
+#define WIFSTOPPED(stat) (1)
+#define WIFSIGNALED(stat) (1)
+#define WIFEXITED(stat) (1)
+#define WIFSTOPSIG(stat) (1)
+#define WIFTERMSIG(stat) (1)
+#define WIFEXITSTATUS(stat) (1)
+#define WEXITSTATUS(stat) (1)
+#define WTERMSIG(status) (1)
+#define WSTOPSIG(status) (1)
+
+/*
+ * Define "NBBY" (number of bits per byte) if it's not already defined.
+ */
+
+#ifndef NBBY
+# define NBBY 8
+#endif
+
+/*
+ * These functions always return dummy values on Mac.
+ */
+#ifndef geteuid
+# define geteuid() 1
+#endif
+#ifndef getpid
+# define getpid() -1
+#endif
+
+#define NO_SYS_ERRLIST
+#define WAIT_STATUS_TYPE int
+
+/*
+ * Make sure that MAXPATHLEN is defined.
+ */
+
+#ifndef MAXPATHLEN
+# ifdef PATH_MAX
+# define MAXPATHLEN PATH_MAX
+# else
+# define MAXPATHLEN 2048
+# endif
+#endif
+
+/*
+ * The following functions are declared in tclInt.h but don't do anything
+ * on Macintosh systems.
+ */
+
+#define TclSetSystemEnv(a,b)
+
+/*
+ * Many signals are not supported on the Mac and are thus not defined in
+ * <signal.h>. They are defined here so that Tcl will compile with less
+ * modification.
+ */
+
+#ifndef SIGQUIT
+#define SIGQUIT 300
+#endif
+
+#ifndef SIGPIPE
+#define SIGPIPE 13
+#endif
+
+#ifndef SIGHUP
+#define SIGHUP 100
+#endif
+
+extern char **environ;
+
+/*
+ * Prototypes needed for compatability
+ */
+
+EXTERN int TclMacCreateEnv _ANSI_ARGS_((void));
+EXTERN int strncasecmp _ANSI_ARGS_((CONST char *s1,
+ CONST char *s2, size_t n));
+
+/*
+ * The following declarations belong in tclInt.h, but depend on platform
+ * specific types (e.g. struct tm).
+ */
+
+EXTERN struct tm * TclpGetDate _ANSI_ARGS_((const time_t *tp,
+ int useGMT));
+EXTERN size_t TclStrftime _ANSI_ARGS_((char *s, size_t maxsize,
+ const char *format, const struct tm *t));
+
+#define tzset()
+#define TclpGetPid(pid) ((unsigned long) (pid))
+
+/*
+ * The following prototypes and defines replace the Macintosh version
+ * of the POSIX functions "stat" and "access". The various compilier
+ * vendors don't implement this function well nor consistantly.
+ */
+EXTERN int TclMacStat _ANSI_ARGS_((char *path, struct stat *buf));
+#define stat(path, bufPtr) TclMacStat(path, bufPtr)
+#define lstat(path, bufPtr) TclMacStat(path, bufPtr)
+EXTERN int TclMacAccess _ANSI_ARGS_((const char *filename, int mode));
+#define access(path, mode) TclMacAccess(path, mode)
+EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((const char *path,
+ const char *mode));
+#define fopen(path, mode) TclMacFOpenHack(path, mode)
+EXTERN int TclMacReadlink _ANSI_ARGS_((char *path, char *buf, int size));
+#define readlink(fileName, buffer, size) TclMacReadlink(fileName, buffer, size)
+#ifdef TCL_TEST
+#define chmod(path, mode) TclMacChmod(path, mode)
+EXTERN int TclMacChmod(char *path, int mode);
+#endif
+
+/*
+ * Defines for Tcl internal commands that aren't really needed on
+ * the Macintosh. They all act as no-ops.
+ */
+#define TclCreateCommandChannel(out, in, err, num, pidPtr) NULL
+#define TclClosePipeFile(x)
+
+/*
+ * These definitions force putenv & company to use the version
+ * supplied with Tcl.
+ */
+#ifndef putenv
+# define unsetenv TclUnsetEnv
+# define putenv Tcl_PutEnv
+# define setenv TclSetEnv
+void TclSetEnv(CONST char *name, CONST char *value);
+int Tcl_PutEnv(CONST char *string);
+void TclUnsetEnv(CONST char *name);
+#endif
+
+/*
+ * The default platform eol translation on Mac is TCL_TRANSLATE_CR:
+ */
+
+#define TCL_PLATFORM_TRANSLATION TCL_TRANSLATE_CR
+
+/*
+ * Declare dynamic loading extension macro.
+ */
+
+#define TCL_SHLIB_EXT ".shlb"
+
+/*
+ * The following define should really be in tclInt.h, but tclInt.h does
+ * not include tclPort.h, which includes the "struct stat" definition.
+ */
+
+EXTERN int TclpSameFile _ANSI_ARGS_((char *file1, char *file2,
+ struct stat *sourceStatBufPtr,
+ struct stat *destStatBufPtr)) ;
+
+#endif /* _MACPORT */
diff --git a/mac/tclMacProjects.sit.hqx b/mac/tclMacProjects.sit.hqx
new file mode 100644
index 0000000..212d433
--- /dev/null
+++ b/mac/tclMacProjects.sit.hqx
@@ -0,0 +1,3157 @@
+(This file must be converted with BinHex 4.0)
+:%R4ME%eKBe"bEfTPBh4c,R0TG!"6594%8dP8)3#3!`*39!#3"(@,8dP8)3!"!!*
+39(*-BA8#!*!%&J!!)#!1G'0X6@&M8(*[DQ9MG(-!N"'MU!#3!p%"J!*L!hF!N!-
+(!*!2KJ!!!J$rN!3$!+df8!b`K1qP!*!&$&1Y!*!&!Nr1rpIrq`#3"Tfh!!d23Np
+"Ae4ME&0SC@aXFbkj!*!3IPF!N"%@!!![#`#3!aErN!4069"b3eG*43%!VllJ3l#
+%lG3!N!8"UPS!N!BZ&3!!BV3!N!CrmJB!kh(#A3JIG)6GpKBPYieXKYrQ8hkaMLE
+2)i``3VPN(l19QGqQFLURPpb,r$jfDiCR+Y1h[AU8HjYe2GZ%fbAKC*maF[YXB%F
+fiB4h$Q+EeE(YNAeq4RKQ6ik6jdrB(K#fb6EGK'GQN[fkMr#1l)'%Aa6Sm!Hd!Uc
+(,MplhDIbmcBMqmKY`XNQ[mNQQp`QYmPqm6`+X(jR$I)kXr20JH`FYFpciANj@0J
+qHrCjA@cKTPY[DfFPffaV(5[GCPSA[r)k[Nc-M"I2kc+rXc-[-ehXq"@rHXqV-c1
+q[#i$hR@m%H6,HjhIQBfd33-6!![JV-[VE0LJAfZcVENK)pbHl$MCj"D6,3#Fi$X
+!,pp"&AbrC)a*ihr%T$kb!IprEXa,,d6mQK31`CGT409+r&q&#hr%Q*-8VhcFQ)j
+ZM3YTI2[ZD-qhqQ2K-hFm)5TG$R*qFQTGkT!!p,P2pDBMCFE(kfPI'8ra)p3E(rP
+Hmf&MhM$1RdjK8X*Cf0Zec*pZfI@Pc%(Qd!5!+Pc(I!*cG2rd+(2)P+aIb4Im[6h
+U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Resource.c
new file mode 100644
index 0000000..db06571
--- /dev/null
+++ b/mac/tclMacResource.c
@@ -0,0 +1,2165 @@
+/*
+ * tclMacResource.c --
+ *
+ * This file contains several commands that manipulate or use
+ * Macintosh resources. Included are extensions to the "source"
+ * command, the mac specific "beep" and "resource" commands, and
+ * administration for open resource file references.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacResource.c 1.35 97/11/24 15:03:58
+ */
+
+#include <Errors.h>
+#include <FSpCompat.h>
+#include <Processes.h>
+#include <Resources.h>
+#include <Sound.h>
+#include <Strings.h>
+#include <Traps.h>
+#include <LowMem.h>
+
+#include "FullPath.h"
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclMac.h"
+#include "tclMacInt.h"
+#include "tclMacPort.h"
+
+/*
+ * This flag tells the RegisterResource function to insert the
+ * resource into the tail of the resource fork list. Needed only
+ * Resource_Init.
+ */
+
+#define TCL_RESOURCE_INSERT_TAIL 1
+/*
+ * 2 is taken by TCL_RESOURCE_DONT_CLOSE
+ * which is the only public flag to TclMacRegisterResourceFork.
+ */
+
+#define TCL_RESOURCE_CHECK_IF_OPEN 4
+
+/*
+ * Pass this in the mode parameter of SetSoundVolume to determine
+ * which volume to set.
+ */
+
+enum WhichVolume {
+ SYS_BEEP_VOLUME, /* This sets the volume for SysBeep calls */
+ DEFAULT_SND_VOLUME, /* This one for SndPlay calls */
+ RESET_VOLUME /* And this undoes the last call to SetSoundVolume */
+};
+
+/*
+ * Hash table to track open resource files.
+ */
+
+typedef struct OpenResourceFork {
+ short fileRef;
+ int flags;
+} OpenResourceFork;
+
+
+
+static Tcl_HashTable nameTable; /* Id to process number mapping. */
+static Tcl_HashTable resourceTable; /* Process number to id mapping. */
+static Tcl_Obj *resourceForkList; /* Ordered list of resource forks */
+static int appResourceIndex; /* This is the index of the application*
+ * in the list of resource forks */
+static int newId = 0; /* Id source. */
+static int initialized = 0; /* 0 means static structures haven't
+ * been initialized yet. */
+static int osTypeInit = 0; /* 0 means Tcl object of osType hasn't
+ * been initialized yet. */
+/*
+ * Prototypes for procedures defined later in this file:
+ */
+
+static void DupOSTypeInternalRep _ANSI_ARGS_((Tcl_Obj *srcPtr,
+ Tcl_Obj *copyPtr));
+static void ResourceInit _ANSI_ARGS_((void));
+static void BuildResourceForkList _ANSI_ARGS_((void));
+static int SetOSTypeFromAny _ANSI_ARGS_((Tcl_Interp *interp,
+ Tcl_Obj *objPtr));
+static void UpdateStringOfOSType _ANSI_ARGS_((Tcl_Obj *objPtr));
+static OpenResourceFork* GetRsrcRefFromObj _ANSI_ARGS_((Tcl_Obj *objPtr,
+ int okayOnReadOnly, const char *operation,
+ Tcl_Obj *resultPtr));
+
+static void SetSoundVolume(int volume, enum WhichVolume mode);
+
+/*
+ * The structures below defines the Tcl object type defined in this file by
+ * means of procedures that can be invoked by generic object code.
+ */
+
+static Tcl_ObjType osType = {
+ "ostype", /* name */
+ (Tcl_FreeInternalRepProc *) NULL, /* freeIntRepProc */
+ DupOSTypeInternalRep, /* dupIntRepProc */
+ UpdateStringOfOSType, /* updateStringProc */
+ SetOSTypeFromAny /* setFromAnyProc */
+};
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_ResourceObjCmd --
+ *
+ * This procedure is invoked to process the "resource" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_ResourceObjCmd(
+ ClientData clientData, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *CONST objv[]) /* Argument values. */
+{
+ Tcl_Obj *resultPtr, *objPtr;
+ int index, result;
+ long fileRef, rsrcId;
+ FSSpec fileSpec;
+ Tcl_DString buffer;
+ char *nativeName;
+ char *stringPtr;
+ char errbuf[16];
+ OpenResourceFork *resourceRef;
+ Handle resource = NULL;
+ OSErr err;
+ int count, i, limitSearch = false, length;
+ short id, saveRef, resInfo;
+ Str255 theName;
+ OSType rezType;
+ int gotInt, releaseIt = 0, force;
+ char *resourceId = NULL;
+ long size;
+ char macPermision;
+ int mode;
+
+ static char *switches[] = {"close", "delete" ,"files", "list",
+ "open", "read", "types", "write", (char *) NULL
+ };
+
+ enum {
+ RESOURCE_CLOSE, RESOURCE_DELETE, RESOURCE_FILES, RESOURCE_LIST,
+ RESOURCE_OPEN, RESOURCE_READ, RESOURCE_TYPES, RESOURCE_WRITE
+ };
+
+ static char *writeSwitches[] = {
+ "-id", "-name", "-file", "-force", (char *) NULL
+ };
+
+ enum {
+ RESOURCE_WRITE_ID, RESOURCE_WRITE_NAME,
+ RESOURCE_WRITE_FILE, RESOURCE_FORCE
+ };
+
+ static char *deleteSwitches[] = {"-id", "-name", "-file", (char *) NULL};
+
+ enum {RESOURCE_DELETE_ID, RESOURCE_DELETE_NAME, RESOURCE_DELETE_FILE};
+
+ resultPtr = Tcl_GetObjResult(interp);
+
+ if (objc < 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetIndexFromObj(interp, objv[1], switches, "option", 0, &index)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (!initialized) {
+ ResourceInit();
+ }
+ result = TCL_OK;
+
+ switch (index) {
+ case RESOURCE_CLOSE:
+ if (objc != 3) {
+ Tcl_WrongNumArgs(interp, 2, objv, "resourceRef");
+ return TCL_ERROR;
+ }
+ stringPtr = Tcl_GetStringFromObj(objv[2], &length);
+ fileRef = TclMacUnRegisterResourceFork(stringPtr, resultPtr);
+
+ if (fileRef >= 0) {
+ CloseResFile((short) fileRef);
+ return TCL_OK;
+ } else {
+ return TCL_ERROR;
+ }
+ case RESOURCE_DELETE:
+ if (!((objc >= 3) && (objc <= 9) && ((objc % 2) == 1))) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "?-id resourceId? ?-name resourceName? ?-file \
+resourceRef? resourceType");
+ return TCL_ERROR;
+ }
+
+ i = 2;
+ fileRef = -1;
+ gotInt = false;
+ resourceId = NULL;
+ limitSearch = false;
+
+ while (i < (objc - 2)) {
+ if (Tcl_GetIndexFromObj(interp, objv[i], deleteSwitches,
+ "option", 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ switch (index) {
+ case RESOURCE_DELETE_ID:
+ if (Tcl_GetLongFromObj(interp, objv[i+1], &rsrcId)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ gotInt = true;
+ break;
+ case RESOURCE_DELETE_NAME:
+ resourceId = Tcl_GetStringFromObj(objv[i+1], &length);
+ if (length > 255) {
+ Tcl_AppendStringsToObj(resultPtr,"-name argument ",
+ "too long, must be < 255 characters",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ strcpy((char *) theName, resourceId);
+ resourceId = (char *) theName;
+ c2pstr(resourceId);
+ break;
+ case RESOURCE_DELETE_FILE:
+ resourceRef = GetRsrcRefFromObj(objv[i+1], 0,
+ "delete from", resultPtr);
+ if (resourceRef == NULL) {
+ return TCL_ERROR;
+ }
+ limitSearch = true;
+ break;
+ }
+ i += 2;
+ }
+
+ if ((resourceId == NULL) && !gotInt) {
+ Tcl_AppendStringsToObj(resultPtr,"you must specify either ",
+ "\"-id\" or \"-name\" or both ",
+ "to \"resource delete\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetOSTypeFromObj(interp, objv[i], &rezType) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (limitSearch) {
+ saveRef = CurResFile();
+ UseResFile((short) resourceRef->fileRef);
+ }
+
+ SetResLoad(false);
+
+ if (gotInt == true) {
+ if (limitSearch) {
+ resource = Get1Resource(rezType, rsrcId);
+ } else {
+ resource = GetResource(rezType, rsrcId);
+ }
+ err = ResError();
+
+ if (err == resNotFound || resource == NULL) {
+ Tcl_AppendStringsToObj(resultPtr, "resource not found",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ } else if (err != noErr) {
+ char buffer[16];
+
+ sprintf(buffer, "%12d", err);
+ Tcl_AppendStringsToObj(resultPtr, "resource error #",
+ buffer, "occured while trying to find resource",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ }
+ }
+
+ if (resourceId != NULL) {
+ Handle tmpResource;
+ if (limitSearch) {
+ tmpResource = Get1NamedResource(rezType,
+ (StringPtr) resourceId);
+ } else {
+ tmpResource = GetNamedResource(rezType,
+ (StringPtr) resourceId);
+ }
+ err = ResError();
+
+ if (err == resNotFound || tmpResource == NULL) {
+ Tcl_AppendStringsToObj(resultPtr, "resource not found",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ } else if (err != noErr) {
+ char buffer[16];
+
+ sprintf(buffer, "%12d", err);
+ Tcl_AppendStringsToObj(resultPtr, "resource error #",
+ buffer, "occured while trying to find resource",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ }
+
+ if (gotInt) {
+ if (resource != tmpResource) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "\"-id\" and \"-name\" ",
+ "values do not point to the same resource",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ }
+ } else {
+ resource = tmpResource;
+ }
+ }
+
+ resInfo = GetResAttrs(resource);
+
+ if ((resInfo & resProtected) == resProtected) {
+ Tcl_AppendStringsToObj(resultPtr, "resource ",
+ "cannot be deleted: it is protected.",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ } else if ((resInfo & resSysHeap) == resSysHeap) {
+ Tcl_AppendStringsToObj(resultPtr, "resource",
+ "cannot be deleted: it is in the system heap.",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto deleteDone;
+ }
+
+ /*
+ * Find the resource file, if it was not specified,
+ * so we can flush the changes now. Perhaps this is
+ * a little paranoid, but better safe than sorry.
+ */
+
+ RemoveResource(resource);
+
+ if (!limitSearch) {
+ UpdateResFile(HomeResFile(resource));
+ } else {
+ UpdateResFile(resourceRef->fileRef);
+ }
+
+
+ deleteDone:
+
+ SetResLoad(true);
+ if (limitSearch) {
+ UseResFile(saveRef);
+ }
+ return result;
+
+ case RESOURCE_FILES:
+ if ((objc < 2) || (objc > 3)) {
+ Tcl_SetStringObj(resultPtr,
+ "wrong # args: should be \"resource files \
+?resourceId?\"", -1);
+ return TCL_ERROR;
+ }
+
+ if (objc == 2) {
+ stringPtr = Tcl_GetStringFromObj(resourceForkList, &length);
+ Tcl_SetStringObj(resultPtr, stringPtr, length);
+ } else {
+ FCBPBRec fileRec;
+ Handle pathHandle;
+ short pathLength;
+ Str255 fileName;
+
+ if (strcmp(Tcl_GetStringFromObj(objv[2], NULL), "ROM Map")
+ == 0) {
+ Tcl_SetStringObj(resultPtr,"no file path for ROM Map", -1);
+ return TCL_ERROR;
+ }
+
+ resourceRef = GetRsrcRefFromObj(objv[2], 1, "files", resultPtr);
+ if (resourceRef == NULL) {
+ return TCL_ERROR;
+ }
+
+ fileRec.ioCompletion = NULL;
+ fileRec.ioFCBIndx = 0;
+ fileRec.ioNamePtr = fileName;
+ fileRec.ioVRefNum = 0;
+ fileRec.ioRefNum = resourceRef->fileRef;
+ err = PBGetFCBInfo(&fileRec, false);
+ if (err != noErr) {
+ Tcl_SetStringObj(resultPtr,
+ "could not get FCB for resource file", -1);
+ return TCL_ERROR;
+ }
+
+ err = GetFullPath(fileRec.ioFCBVRefNum, fileRec.ioFCBParID,
+ fileRec.ioNamePtr, &pathLength, &pathHandle);
+ if ( err != noErr) {
+ Tcl_SetStringObj(resultPtr,
+ "could not get file path from token", -1);
+ return TCL_ERROR;
+ }
+
+ HLock(pathHandle);
+ Tcl_SetStringObj(resultPtr,*pathHandle,pathLength);
+ HUnlock(pathHandle);
+ DisposeHandle(pathHandle);
+ }
+ return TCL_OK;
+ case RESOURCE_LIST:
+ if (!((objc == 3) || (objc == 4))) {
+ Tcl_WrongNumArgs(interp, 2, objv, "resourceType ?resourceRef?");
+ return TCL_ERROR;
+ }
+ if (Tcl_GetOSTypeFromObj(interp, objv[2], &rezType) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (objc == 4) {
+ resourceRef = GetRsrcRefFromObj(objv[3], 1,
+ "list", resultPtr);
+ if (resourceRef == NULL) {
+ return TCL_ERROR;
+ }
+
+ saveRef = CurResFile();
+ UseResFile((short) resourceRef->fileRef);
+ limitSearch = true;
+ }
+
+ Tcl_ResetResult(interp);
+ if (limitSearch) {
+ count = Count1Resources(rezType);
+ } else {
+ count = CountResources(rezType);
+ }
+ SetResLoad(false);
+ for (i = 1; i <= count; i++) {
+ if (limitSearch) {
+ resource = Get1IndResource(rezType, i);
+ } else {
+ resource = GetIndResource(rezType, i);
+ }
+ if (resource != NULL) {
+ GetResInfo(resource, &id, (ResType *) &rezType, theName);
+ if (theName[0] != 0) {
+ objPtr = Tcl_NewStringObj((char *) theName + 1,
+ theName[0]);
+ } else {
+ objPtr = Tcl_NewIntObj(id);
+ }
+ ReleaseResource(resource);
+ result = Tcl_ListObjAppendElement(interp, resultPtr,
+ objPtr);
+ if (result != TCL_OK) {
+ Tcl_DecrRefCount(objPtr);
+ break;
+ }
+ }
+ }
+ SetResLoad(true);
+
+ if (limitSearch) {
+ UseResFile(saveRef);
+ }
+
+ return TCL_OK;
+ case RESOURCE_OPEN:
+ if (!((objc == 3) || (objc == 4))) {
+ Tcl_WrongNumArgs(interp, 2, objv, "fileName ?permissions?");
+ return TCL_ERROR;
+ }
+ stringPtr = Tcl_GetStringFromObj(objv[2], &length);
+ nativeName = Tcl_TranslateFileName(interp, stringPtr, &buffer);
+ if (nativeName == NULL) {
+ return TCL_ERROR;
+ }
+ err = FSpLocationFromPath(strlen(nativeName), nativeName,
+ &fileSpec) ;
+ Tcl_DStringFree(&buffer);
+ if (!((err == noErr) || (err == fnfErr))) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "invalid path", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Get permissions for the file. We really only understand
+ * read-only and shared-read-write. If no permissions are
+ * given we default to read only.
+ */
+
+ if (objc == 4) {
+ stringPtr = Tcl_GetStringFromObj(objv[3], &length);
+ mode = TclGetOpenMode(interp, stringPtr, &index);
+ if (mode == -1) {
+ /* TODO: TclGetOpenMode doesn't work with Obj commands. */
+ return TCL_ERROR;
+ }
+ switch (mode & (O_RDONLY | O_WRONLY | O_RDWR)) {
+ case O_RDONLY:
+ macPermision = fsRdPerm;
+ break;
+ case O_WRONLY:
+ case O_RDWR:
+ macPermision = fsRdWrShPerm;
+ break;
+ default:
+ panic("Tcl_ResourceObjCmd: invalid mode value");
+ break;
+ }
+ } else {
+ macPermision = fsRdPerm;
+ }
+
+ /*
+ * Don't load in any of the resources in the file, this could
+ * cause problems if you open a file that has CODE resources...
+ */
+
+ SetResLoad(false);
+ fileRef = (long) FSpOpenResFileCompat(&fileSpec, macPermision);
+ SetResLoad(true);
+
+ if (fileRef == -1) {
+ err = ResError();
+ if (((err == fnfErr) || (err == eofErr)) &&
+ (macPermision == fsRdWrShPerm)) {
+ /*
+ * No resource fork existed for this file. Since we are
+ * opening it for writing we will create the resource fork
+ * now.
+ */
+
+ HCreateResFile(fileSpec.vRefNum, fileSpec.parID,
+ fileSpec.name);
+ fileRef = (long) FSpOpenResFileCompat(&fileSpec,
+ macPermision);
+ if (fileRef == -1) {
+ goto openError;
+ }
+ } else if (err == fnfErr) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "file does not exist", (char *) NULL);
+ return TCL_ERROR;
+ } else if (err == eofErr) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "file does not contain resource fork", (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ openError:
+ Tcl_AppendStringsToObj(resultPtr,
+ "error opening resource file", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ /*
+ * The FspOpenResFile function does not set the ResFileAttrs.
+ * Even if you open the file read only, the mapReadOnly
+ * attribute is not set. This means we can't detect writes to a
+ * read only resource fork until the write fails, which is bogus.
+ * So set it here...
+ */
+
+ if (macPermision == fsRdPerm) {
+ SetResFileAttrs(fileRef, mapReadOnly);
+ }
+
+ Tcl_SetStringObj(resultPtr, "", 0);
+ if (TclMacRegisterResourceFork(fileRef, resultPtr,
+ TCL_RESOURCE_CHECK_IF_OPEN) != TCL_OK) {
+ CloseResFile(fileRef);
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+ case RESOURCE_READ:
+ if (!((objc == 4) || (objc == 5))) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "resourceType resourceId ?resourceRef?");
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetOSTypeFromObj(interp, objv[2], &rezType) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetLongFromObj((Tcl_Interp *) NULL, objv[3], &rsrcId)
+ != TCL_OK) {
+ resourceId = Tcl_GetStringFromObj(objv[3], &length);
+ }
+
+ if (objc == 5) {
+ stringPtr = Tcl_GetStringFromObj(objv[4], &length);
+ } else {
+ stringPtr = NULL;
+ }
+
+ resource = Tcl_MacFindResource(interp, rezType, resourceId,
+ rsrcId, stringPtr, &releaseIt);
+
+ if (resource != NULL) {
+ size = GetResourceSizeOnDisk(resource);
+ Tcl_SetStringObj(resultPtr, *resource, size);
+
+ /*
+ * Don't release the resource unless WE loaded it...
+ */
+
+ if (releaseIt) {
+ ReleaseResource(resource);
+ }
+ return TCL_OK;
+ } else {
+ Tcl_AppendStringsToObj(resultPtr, "could not load resource",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ case RESOURCE_TYPES:
+ if (!((objc == 2) || (objc == 3))) {
+ Tcl_WrongNumArgs(interp, 2, objv, "?resourceRef?");
+ return TCL_ERROR;
+ }
+
+ if (objc == 3) {
+ resourceRef = GetRsrcRefFromObj(objv[2], 1,
+ "get types of", resultPtr);
+ if (resourceRef == NULL) {
+ return TCL_ERROR;
+ }
+
+ saveRef = CurResFile();
+ UseResFile((short) resourceRef->fileRef);
+ limitSearch = true;
+ }
+
+ if (limitSearch) {
+ count = Count1Types();
+ } else {
+ count = CountTypes();
+ }
+ for (i = 1; i <= count; i++) {
+ if (limitSearch) {
+ Get1IndType((ResType *) &rezType, i);
+ } else {
+ GetIndType((ResType *) &rezType, i);
+ }
+ objPtr = Tcl_NewOSTypeObj(rezType);
+ result = Tcl_ListObjAppendElement(interp, resultPtr, objPtr);
+ if (result != TCL_OK) {
+ Tcl_DecrRefCount(objPtr);
+ break;
+ }
+ }
+
+ if (limitSearch) {
+ UseResFile(saveRef);
+ }
+
+ return result;
+ case RESOURCE_WRITE:
+ if ((objc < 4) || (objc > 11)) {
+ Tcl_WrongNumArgs(interp, 2, objv,
+ "?-id resourceId? ?-name resourceName? ?-file resourceRef?\
+ ?-force? resourceType data");
+ return TCL_ERROR;
+ }
+
+ i = 2;
+ gotInt = false;
+ resourceId = NULL;
+ limitSearch = false;
+ force = 0;
+
+ while (i < (objc - 2)) {
+ if (Tcl_GetIndexFromObj(interp, objv[i], writeSwitches,
+ "switch", 0, &index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ switch (index) {
+ case RESOURCE_WRITE_ID:
+ if (Tcl_GetLongFromObj(interp, objv[i+1], &rsrcId)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ gotInt = true;
+ i += 2;
+ break;
+ case RESOURCE_WRITE_NAME:
+ resourceId = Tcl_GetStringFromObj(objv[i+1], &length);
+ strcpy((char *) theName, resourceId);
+ resourceId = (char *) theName;
+ c2pstr(resourceId);
+ i += 2;
+ break;
+ case RESOURCE_WRITE_FILE:
+ resourceRef = GetRsrcRefFromObj(objv[i+1], 0,
+ "write to", resultPtr);
+ if (resourceRef == NULL) {
+ return TCL_ERROR;
+ }
+ limitSearch = true;
+ i += 2;
+ break;
+ case RESOURCE_FORCE:
+ force = 1;
+ i += 1;
+ break;
+ }
+ }
+ if (Tcl_GetOSTypeFromObj(interp, objv[i], &rezType) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ stringPtr = Tcl_GetStringFromObj(objv[i+1], &length);
+
+ if (gotInt == false) {
+ rsrcId = UniqueID(rezType);
+ }
+ if (resourceId == NULL) {
+ resourceId = (char *) "\p";
+ }
+ if (limitSearch) {
+ saveRef = CurResFile();
+ UseResFile((short) resourceRef->fileRef);
+ }
+
+ /*
+ * If we are adding the resource by number, then we must make sure
+ * there is not already a resource of that number. We are not going
+ * load it here, since we want to detect whether we loaded it or
+ * not. Remember that releasing some resources in particular menu
+ * related ones, can be fatal.
+ */
+
+ if (gotInt == true) {
+ SetResLoad(false);
+ resource = Get1Resource(rezType,rsrcId);
+ SetResLoad(true);
+ }
+
+ if (resource == NULL) {
+ /*
+ * We get into this branch either if there was not already a
+ * resource of this type & id, or the id was not specified.
+ */
+
+ resource = NewHandle(length);
+ if (resource == NULL) {
+ resource = NewHandleSys(length);
+ if (resource == NULL) {
+ panic("could not allocate memory to write resource");
+ }
+ }
+ HLock(resource);
+ memcpy(*resource, stringPtr, length);
+ HUnlock(resource);
+ AddResource(resource, rezType, (short) rsrcId,
+ (StringPtr) resourceId);
+ releaseIt = 1;
+ } else {
+ /*
+ * We got here because there was a resource of this type
+ * & ID in the file.
+ */
+
+ if (*resource == NULL) {
+ releaseIt = 1;
+ } else {
+ releaseIt = 0;
+ }
+
+ if (!force) {
+ /*
+ *We only overwrite extant resources
+ * when the -force flag has been set.
+ */
+
+ sprintf(errbuf,"%d", rsrcId);
+
+ Tcl_AppendStringsToObj(resultPtr, "the resource ",
+ errbuf, " already exists, use \"-force\"",
+ " to overwrite it.", (char *) NULL);
+
+ result = TCL_ERROR;
+ goto writeDone;
+ } else if (GetResAttrs(resource) & resProtected) {
+ /*
+ *
+ * Next, check to see if it is protected...
+ */
+
+ sprintf(errbuf,"%d", rsrcId);
+ Tcl_AppendStringsToObj(resultPtr,
+ "could not write resource id ",
+ errbuf, " of type ",
+ Tcl_GetStringFromObj(objv[i],&length),
+ ", it was protected.",(char *) NULL);
+ result = TCL_ERROR;
+ goto writeDone;
+ } else {
+ /*
+ * Be careful, the resource might already be in memory
+ * if something else loaded it.
+ */
+
+ if (*resource == 0) {
+ LoadResource(resource);
+ err = ResError();
+ if (err != noErr) {
+ sprintf(errbuf,"%d", rsrcId);
+ Tcl_AppendStringsToObj(resultPtr,
+ "error loading resource ",
+ errbuf, " of type ",
+ Tcl_GetStringFromObj(objv[i],&length),
+ " to overwrite it", (char *) NULL);
+ goto writeDone;
+ }
+ }
+
+ SetHandleSize(resource, length);
+ if ( MemError() != noErr ) {
+ panic("could not allocate memory to write resource");
+ }
+
+ HLock(resource);
+ memcpy(*resource, stringPtr, length);
+ HUnlock(resource);
+
+ ChangedResource(resource);
+
+ /*
+ * We also may have changed the name...
+ */
+
+ SetResInfo(resource, rsrcId, (StringPtr) resourceId);
+ }
+ }
+
+ err = ResError();
+ if (err != noErr) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "error adding resource to resource map",
+ (char *) NULL);
+ result = TCL_ERROR;
+ goto writeDone;
+ }
+
+ WriteResource(resource);
+ err = ResError();
+ if (err != noErr) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "error writing resource to disk",
+ (char *) NULL);
+ result = TCL_ERROR;
+ }
+
+ writeDone:
+
+ if (releaseIt) {
+ ReleaseResource(resource);
+ err = ResError();
+ if (err != noErr) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "error releasing resource",
+ (char *) NULL);
+ result = TCL_ERROR;
+ }
+ }
+
+ if (limitSearch) {
+ UseResFile(saveRef);
+ }
+
+ return result;
+ default:
+ panic("Tcl_GetIndexFromObject returned unrecognized option");
+ return TCL_ERROR; /* Should never be reached. */
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_MacSourceObjCmd --
+ *
+ * This procedure is invoked to process the "source" Tcl command.
+ * See the user documentation for details on what it does. In
+ * addition, it supports sourceing from the resource fork of
+ * type 'TEXT'.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_MacSourceObjCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *CONST objv[]) /* Argument objects. */
+{
+ char *errNum = "wrong # args: ";
+ char *errBad = "bad argument: ";
+ char *errStr;
+ char *fileName = NULL, *rsrcName = NULL;
+ long rsrcID = -1;
+ char *string;
+ int length;
+
+ if (objc < 2 || objc > 4) {
+ errStr = errNum;
+ goto sourceFmtErr;
+ }
+
+ if (objc == 2) {
+ string = TclGetStringFromObj(objv[1], &length);
+ return Tcl_EvalFile(interp, string);
+ }
+
+ /*
+ * The following code supports a few older forms of this command
+ * for backward compatability.
+ */
+ string = TclGetStringFromObj(objv[1], &length);
+ if (!strcmp(string, "-rsrc") || !strcmp(string, "-rsrcname")) {
+ rsrcName = TclGetStringFromObj(objv[2], &length);
+ } else if (!strcmp(string, "-rsrcid")) {
+ if (Tcl_GetLongFromObj(interp, objv[2], &rsrcID) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ errStr = errBad;
+ goto sourceFmtErr;
+ }
+
+ if (objc == 4) {
+ fileName = TclGetStringFromObj(objv[3], &length);
+ }
+ return Tcl_MacEvalResource(interp, rsrcName, rsrcID, fileName);
+
+ sourceFmtErr:
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), errStr, "should be \"",
+ Tcl_GetStringFromObj(objv[0], (int *) NULL),
+ " fileName\" or \"",
+ Tcl_GetStringFromObj(objv[0], (int *) NULL),
+ " -rsrc name ?fileName?\" or \"",
+ Tcl_GetStringFromObj(objv[0], (int *) NULL),
+ " -rsrcid id ?fileName?\"", (char *) NULL);
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_BeepObjCmd --
+ *
+ * This procedure makes the beep sound.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Makes a beep.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_BeepObjCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *CONST objv[]) /* Argument values. */
+{
+ Tcl_Obj *resultPtr, *objPtr;
+ Handle sound;
+ Str255 sndName;
+ int volume = -1, length;
+ char * sndArg = NULL;
+
+ resultPtr = Tcl_GetObjResult(interp);
+ if (objc == 1) {
+ SysBeep(1);
+ return TCL_OK;
+ } else if (objc == 2) {
+ if (!strcmp(Tcl_GetStringFromObj(objv[1], &length), "-list")) {
+ int count, i;
+ short id;
+ Str255 theName;
+ ResType rezType;
+
+ count = CountResources('snd ');
+ for (i = 1; i <= count; i++) {
+ sound = GetIndResource('snd ', i);
+ if (sound != NULL) {
+ GetResInfo(sound, &id, &rezType, theName);
+ if (theName[0] == 0) {
+ continue;
+ }
+ objPtr = Tcl_NewStringObj((char *) theName + 1,
+ theName[0]);
+ Tcl_ListObjAppendElement(interp, resultPtr, objPtr);
+ }
+ }
+ return TCL_OK;
+ } else {
+ sndArg = Tcl_GetStringFromObj(objv[1], &length);
+ }
+ } else if (objc == 3) {
+ if (!strcmp(Tcl_GetStringFromObj(objv[1], &length), "-volume")) {
+ Tcl_GetIntFromObj(interp, objv[2], &volume);
+ } else {
+ goto beepUsage;
+ }
+ } else if (objc == 4) {
+ if (!strcmp(Tcl_GetStringFromObj(objv[1], &length), "-volume")) {
+ Tcl_GetIntFromObj(interp, objv[2], &volume);
+ sndArg = Tcl_GetStringFromObj(objv[3], &length);
+ } else {
+ goto beepUsage;
+ }
+ } else {
+ goto beepUsage;
+ }
+
+ /*
+ * Play the sound
+ */
+ if (sndArg == NULL) {
+ /*
+ * Set Volume for SysBeep
+ */
+
+ if (volume >= 0) {
+ SetSoundVolume(volume, SYS_BEEP_VOLUME);
+ }
+ SysBeep(1);
+
+ /*
+ * Reset Volume
+ */
+
+ if (volume >= 0) {
+ SetSoundVolume(0, RESET_VOLUME);
+ }
+ } else {
+ strcpy((char *) sndName + 1, sndArg);
+ sndName[0] = length;
+ sound = GetNamedResource('snd ', sndName);
+ if (sound != NULL) {
+ /*
+ * Set Volume for Default Output device
+ */
+
+ if (volume >= 0) {
+ SetSoundVolume(volume, DEFAULT_SND_VOLUME);
+ }
+
+ SndPlay(NULL, (SndListHandle) sound, false);
+
+ /*
+ * Reset Volume
+ */
+
+ if (volume >= 0) {
+ SetSoundVolume(0, RESET_VOLUME);
+ }
+ } else {
+ Tcl_AppendStringsToObj(resultPtr, " \"", sndArg,
+ "\" is not a valid sound. (Try ",
+ Tcl_GetStringFromObj(objv[0], (int *) NULL),
+ " -list)", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ return TCL_OK;
+
+ beepUsage:
+ Tcl_WrongNumArgs(interp, 1, objv, "[-volume num] [-list | sndName]?");
+ return TCL_ERROR;
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * SetSoundVolume --
+ *
+ * Set the volume for either the SysBeep or the SndPlay call depending
+ * on the value of mode (SYS_BEEP_VOLUME or DEFAULT_SND_VOLUME
+ * respectively.
+ *
+ * It also stores the last channel set, and the old value of its
+ * VOLUME. If you call SetSoundVolume with a mode of RESET_VOLUME,
+ * it will undo the last setting. The volume parameter is
+ * ignored in this case.
+ *
+ * Side Effects:
+ * Sets the System Volume
+ *
+ * Results:
+ * None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+SetSoundVolume(
+ int volume, /* This is the new volume */
+ enum WhichVolume mode) /* This flag says which volume to
+ * set: SysBeep, SndPlay, or instructs us
+ * to reset the volume */
+{
+ static int hasSM3 = -1;
+ static enum WhichVolume oldMode;
+ static long oldVolume = -1;
+
+ /*
+ * The volume setting calls only work if we have SoundManager
+ * 3.0 or higher. So we check that here.
+ */
+
+ if (hasSM3 == -1) {
+ if (GetToolboxTrapAddress(_SoundDispatch)
+ != GetToolboxTrapAddress(_Unimplemented)) {
+ NumVersion SMVers = SndSoundManagerVersion();
+ if (SMVers.majorRev > 2) {
+ hasSM3 = 1;
+ } else {
+ hasSM3 = 0;
+ }
+ } else {
+ /*
+ * If the SoundDispatch trap is not present, then
+ * we don't have the SoundManager at all.
+ */
+
+ hasSM3 = 0;
+ }
+ }
+
+ /*
+ * If we don't have Sound Manager 3.0, we can't set the sound volume.
+ * We will just ignore the request rather than raising an error.
+ */
+
+ if (!hasSM3) {
+ return;
+ }
+
+ switch (mode) {
+ case SYS_BEEP_VOLUME:
+ GetSysBeepVolume(&oldVolume);
+ SetSysBeepVolume(volume);
+ oldMode = SYS_BEEP_VOLUME;
+ break;
+ case DEFAULT_SND_VOLUME:
+ GetDefaultOutputVolume(&oldVolume);
+ SetDefaultOutputVolume(volume);
+ oldMode = DEFAULT_SND_VOLUME;
+ break;
+ case RESET_VOLUME:
+ /*
+ * If oldVolume is -1 someone has made a programming error
+ * and called reset before setting the volume. This is benign
+ * however, so we will just exit.
+ */
+
+ if (oldVolume != -1) {
+ if (oldMode == SYS_BEEP_VOLUME) {
+ SetSysBeepVolume(oldVolume);
+ } else if (oldMode == DEFAULT_SND_VOLUME) {
+ SetDefaultOutputVolume(oldVolume);
+ }
+ }
+ oldVolume = -1;
+ }
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Tcl_MacEvalResource --
+ *
+ * Used to extend the source command. Sources Tcl code from a Text
+ * resource. Currently only sources the resouce by name file ID may be
+ * supported at a later date.
+ *
+ * Side Effects:
+ * Depends on the Tcl code in the resource.
+ *
+ * Results:
+ * Returns a Tcl result.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+int
+Tcl_MacEvalResource(
+ Tcl_Interp *interp, /* Interpreter in which to process file. */
+ 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.
+ NULL if application resource. */
+{
+ Handle sourceText;
+ Str255 rezName;
+ char msg[200];
+ int result;
+ short saveRef, fileRef = -1;
+ char idStr[64];
+ FSSpec fileSpec;
+ Tcl_DString buffer;
+ char *nativeName;
+
+ saveRef = CurResFile();
+
+ if (fileName != NULL) {
+ OSErr err;
+
+ nativeName = Tcl_TranslateFileName(interp, fileName, &buffer);
+ if (nativeName == NULL) {
+ return TCL_ERROR;
+ }
+ err = FSpLocationFromPath(strlen(nativeName), nativeName, &fileSpec);
+ Tcl_DStringFree(&buffer);
+ if (err != noErr) {
+ Tcl_AppendResult(interp, "Error finding the file: \"",
+ fileName, "\".", NULL);
+ return TCL_ERROR;
+ }
+
+ fileRef = FSpOpenResFileCompat(&fileSpec, fsRdPerm);
+ if (fileRef == -1) {
+ Tcl_AppendResult(interp, "Error reading the file: \"",
+ fileName, "\".", NULL);
+ return TCL_ERROR;
+ }
+
+ UseResFile(fileRef);
+ } else {
+ /*
+ * The default behavior will search through all open resource files.
+ * This may not be the behavior you desire. If you want the behavior
+ * of this call to *only* search the application resource fork, you
+ * must call UseResFile at this point to set it to the application
+ * file. This means you must have already obtained the application's
+ * fileRef when the application started up.
+ */
+ }
+
+ /*
+ * Load the resource by name or ID
+ */
+ if (resourceName != NULL) {
+ strcpy((char *) rezName + 1, resourceName);
+ rezName[0] = strlen(resourceName);
+ sourceText = GetNamedResource('TEXT', rezName);
+ } else {
+ sourceText = GetResource('TEXT', (short) resourceNumber);
+ }
+
+ if (sourceText == NULL) {
+ result = TCL_ERROR;
+ } else {
+ char *sourceStr = NULL;
+
+ HLock(sourceText);
+ sourceStr = Tcl_MacConvertTextResource(sourceText);
+ HUnlock(sourceText);
+ ReleaseResource(sourceText);
+
+ /*
+ * We now evaluate the Tcl source
+ */
+ result = Tcl_Eval(interp, sourceStr);
+ ckfree(sourceStr);
+ if (result == TCL_RETURN) {
+ result = TCL_OK;
+ } else if (result == TCL_ERROR) {
+ sprintf(msg, "\n (rsrc \"%.150s\" line %d)", resourceName,
+ interp->errorLine);
+ Tcl_AddErrorInfo(interp, msg);
+ }
+
+ goto rezEvalCleanUp;
+ }
+
+ rezEvalError:
+ sprintf(idStr, "ID=%d", resourceNumber);
+ Tcl_AppendResult(interp, "The resource \"",
+ (resourceName != NULL ? resourceName : idStr),
+ "\" could not be loaded from ",
+ (fileName != NULL ? fileName : "application"),
+ ".", NULL);
+
+ rezEvalCleanUp:
+ if (fileRef != -1) {
+ CloseResFile(fileRef);
+ }
+
+ UseResFile(saveRef);
+
+ return result;
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Tcl_MacConvertTextResource --
+ *
+ * Converts a TEXT resource into a Tcl suitable string.
+ *
+ * Side Effects:
+ * Mallocs the returned memory, converts '\r' to '\n', and appends a NULL.
+ *
+ * Results:
+ * A new malloced string.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+char *
+Tcl_MacConvertTextResource(
+ Handle resource) /* Handle to TEXT resource. */
+{
+ int i, size;
+ char *resultStr;
+
+ size = GetResourceSizeOnDisk(resource);
+
+ resultStr = ckalloc(size + 1);
+
+ for (i=0; i<size; i++) {
+ if ((*resource)[i] == '\r') {
+ resultStr[i] = '\n';
+ } else {
+ resultStr[i] = (*resource)[i];
+ }
+ }
+
+ resultStr[size] = '\0';
+
+ return resultStr;
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * Tcl_MacFindResource --
+ *
+ * Higher level interface for loading resources.
+ *
+ * Side Effects:
+ * Attempts to load a resource.
+ *
+ * Results:
+ * A handle on success.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+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,
+ * NULL if number should be used. */
+ int resourceNumber, /* Resource id of source. */
+ char *resFileRef, /* Registered resource file reference,
+ * NULL if searching all open resource files. */
+ int *releaseIt) /* Should we release this resource when done. */
+{
+ Tcl_HashEntry *nameHashPtr;
+ OpenResourceFork *resourceRef;
+ int limitSearch = false;
+ short saveRef;
+ Handle resource;
+
+ if (resFileRef != NULL) {
+ nameHashPtr = Tcl_FindHashEntry(&nameTable, resFileRef);
+ if (nameHashPtr == NULL) {
+ Tcl_AppendResult(interp, "invalid resource file reference \"",
+ resFileRef, "\"", (char *) NULL);
+ return NULL;
+ }
+ resourceRef = (OpenResourceFork *) Tcl_GetHashValue(nameHashPtr);
+ saveRef = CurResFile();
+ UseResFile((short) resourceRef->fileRef);
+ limitSearch = true;
+ }
+
+ /*
+ * Some system resources (for example system resources) should not
+ * be released. So we set autoload to false, and try to get the resource.
+ * If the Master Pointer of the returned handle is null, then resource was
+ * not in memory, and it is safe to release it. Otherwise, it is not.
+ */
+
+ SetResLoad(false);
+
+ if (resourceName == NULL) {
+ if (limitSearch) {
+ resource = Get1Resource(resourceType, resourceNumber);
+ } else {
+ resource = GetResource(resourceType, resourceNumber);
+ }
+ } else {
+ c2pstr(resourceName);
+ if (limitSearch) {
+ resource = Get1NamedResource(resourceType,
+ (StringPtr) resourceName);
+ } else {
+ resource = GetNamedResource(resourceType,
+ (StringPtr) resourceName);
+ }
+ p2cstr((StringPtr) resourceName);
+ }
+
+ if (*resource == NULL) {
+ *releaseIt = 1;
+ LoadResource(resource);
+ } else {
+ *releaseIt = 0;
+ }
+
+ SetResLoad(true);
+
+
+ if (limitSearch) {
+ UseResFile(saveRef);
+ }
+
+ return resource;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ResourceInit --
+ *
+ * Initialize the structures used for resource management.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Read the code.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ResourceInit()
+{
+
+ initialized = 1;
+ Tcl_InitHashTable(&nameTable, TCL_STRING_KEYS);
+ Tcl_InitHashTable(&resourceTable, TCL_ONE_WORD_KEYS);
+ resourceForkList = Tcl_NewObj();
+ Tcl_IncrRefCount(resourceForkList);
+
+ BuildResourceForkList();
+
+}
+/***/
+
+/*Tcl_RegisterObjType(typePtr) */
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_NewOSTypeObj --
+ *
+ * This procedure is used to create a new resource name type object.
+ *
+ * Results:
+ * The newly created object is returned. This object will have a NULL
+ * string representation. The returned object has ref count 0.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Obj *
+Tcl_NewOSTypeObj(
+ OSType newOSType) /* Int used to initialize the new object. */
+{
+ register Tcl_Obj *objPtr;
+
+ if (!osTypeInit) {
+ osTypeInit = 1;
+ Tcl_RegisterObjType(&osType);
+ }
+
+ objPtr = Tcl_NewObj();
+ objPtr->bytes = NULL;
+ objPtr->internalRep.longValue = newOSType;
+ objPtr->typePtr = &osType;
+ return objPtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_SetOSTypeObj --
+ *
+ * Modify an object to be a resource type and to have the
+ * specified long value.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The object's old string rep, if any, is freed. Also, any old
+ * internal rep is freed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tcl_SetOSTypeObj(
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ OSType newOSType) /* Integer used to set object's value. */
+{
+ register Tcl_ObjType *oldTypePtr = objPtr->typePtr;
+
+ if (!osTypeInit) {
+ osTypeInit = 1;
+ Tcl_RegisterObjType(&osType);
+ }
+
+ Tcl_InvalidateStringRep(objPtr);
+ if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
+ oldTypePtr->freeIntRepProc(objPtr);
+ }
+
+ objPtr->internalRep.longValue = newOSType;
+ objPtr->typePtr = &osType;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_GetOSTypeFromObj --
+ *
+ * Attempt to return an int from the Tcl object "objPtr". If the object
+ * is not already an int, an attempt will be made to convert it to one.
+ *
+ * Results:
+ * The return value is a standard Tcl object result. If an error occurs
+ * during conversion, an error message is left in interp->objResult
+ * unless "interp" is NULL.
+ *
+ * Side effects:
+ * If the object is not already an int, the conversion will free
+ * any old internal representation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_GetOSTypeFromObj(
+ Tcl_Interp *interp, /* Used for error reporting if not NULL. */
+ Tcl_Obj *objPtr, /* The object from which to get a int. */
+ OSType *osTypePtr) /* Place to store resulting int. */
+{
+ register int result;
+
+ if (!osTypeInit) {
+ osTypeInit = 1;
+ Tcl_RegisterObjType(&osType);
+ }
+
+ if (objPtr->typePtr == &osType) {
+ *osTypePtr = objPtr->internalRep.longValue;
+ return TCL_OK;
+ }
+
+ result = SetOSTypeFromAny(interp, objPtr);
+ if (result == TCL_OK) {
+ *osTypePtr = objPtr->internalRep.longValue;
+ }
+ return result;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DupOSTypeInternalRep --
+ *
+ * Initialize the internal representation of an int Tcl_Obj to a
+ * copy of the internal representation of an existing int object.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * "copyPtr"s internal rep is set to the integer corresponding to
+ * "srcPtr"s internal rep.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+DupOSTypeInternalRep(
+ Tcl_Obj *srcPtr, /* Object with internal rep to copy. */
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. */
+{
+ copyPtr->internalRep.longValue = srcPtr->internalRep.longValue;
+ copyPtr->typePtr = &osType;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SetOSTypeFromAny --
+ *
+ * Attempt to generate an integer internal form for the Tcl object
+ * "objPtr".
+ *
+ * Results:
+ * The return value is a standard object Tcl result. If an error occurs
+ * during conversion, an error message is left in interp->objResult
+ * unless "interp" is NULL.
+ *
+ * Side effects:
+ * If no error occurs, an int is stored as "objPtr"s internal
+ * representation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SetOSTypeFromAny(
+ Tcl_Interp *interp, /* Used for error reporting if not NULL. */
+ Tcl_Obj *objPtr) /* The object to convert. */
+{
+ Tcl_ObjType *oldTypePtr = objPtr->typePtr;
+ char *string;
+ int length;
+ long newOSType;
+
+ /*
+ * Get the string representation. Make it up-to-date if necessary.
+ */
+
+ string = TclGetStringFromObj(objPtr, &length);
+
+ if (length != 4) {
+ if (interp != NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
+ "expected Macintosh OS type but got \"", string, "\"",
+ (char *) NULL);
+ }
+ return TCL_ERROR;
+ }
+ newOSType = *((long *) string);
+
+ /*
+ * The conversion to resource type succeeded. Free the old internalRep
+ * before setting the new one.
+ */
+
+ if ((oldTypePtr != NULL) && (oldTypePtr->freeIntRepProc != NULL)) {
+ oldTypePtr->freeIntRepProc(objPtr);
+ }
+
+ objPtr->internalRep.longValue = newOSType;
+ objPtr->typePtr = &osType;
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * UpdateStringOfOSType --
+ *
+ * Update the string representation for an resource type object.
+ * Note: This procedure does not free an existing old string rep
+ * so storage will be lost if this has not already been done.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The object's string is set to a valid string that results from
+ * the int-to-string conversion.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+UpdateStringOfOSType(
+ register Tcl_Obj *objPtr) /* Int object whose string rep to update. */
+{
+ objPtr->bytes = ckalloc(5);
+ sprintf(objPtr->bytes, "%-4.4s", &(objPtr->internalRep.longValue));
+ objPtr->length = 4;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetRsrcRefFromObj --
+ *
+ * Given a String object containing a resource file token, return
+ * the OpenResourceFork structure that it represents, or NULL if
+ * the token cannot be found. If okayOnReadOnly is false, it will
+ * also check whether the token corresponds to a read-only file,
+ * and return NULL if it is.
+ *
+ * Results:
+ * A pointer to an OpenResourceFork structure, or NULL.
+ *
+ * Side effects:
+ * An error message may be left in resultPtr.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OpenResourceFork *
+GetRsrcRefFromObj(
+ register Tcl_Obj *objPtr, /* String obj containing file token */
+ int okayOnReadOnly, /* Whether this operation is okay for a *
+ * read only file. */
+ const char *operation, /* String containing the operation we *
+ * were trying to perform, used for errors */
+ Tcl_Obj *resultPtr) /* Tcl_Obj to contain error message */
+{
+ char *stringPtr;
+ Tcl_HashEntry *nameHashPtr;
+ OpenResourceFork *resourceRef;
+ int length;
+ OSErr err;
+
+ stringPtr = Tcl_GetStringFromObj(objPtr, &length);
+ nameHashPtr = Tcl_FindHashEntry(&nameTable, stringPtr);
+ if (nameHashPtr == NULL) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "invalid resource file reference \"",
+ stringPtr, "\"", (char *) NULL);
+ return NULL;
+ }
+
+ resourceRef = (OpenResourceFork *) Tcl_GetHashValue(nameHashPtr);
+
+ if (!okayOnReadOnly) {
+ err = GetResFileAttrs((short) resourceRef->fileRef);
+ if (err & mapReadOnly) {
+ Tcl_AppendStringsToObj(resultPtr, "cannot ", operation,
+ " resource file \"",
+ stringPtr, "\", it was opened read only",
+ (char *) NULL);
+ return NULL;
+ }
+ }
+ return resourceRef;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacRegisterResourceFork --
+ *
+ * Register an open resource fork in the table of open resources
+ * managed by the procedures in this file. If the resource file
+ * is already registered with the table, then no new token is made.
+ *
+ * The bahavior is controlled by the value of tokenPtr, and of the
+ * flags variable. For tokenPtr, the possibilities are:
+ * - NULL: The new token is auto-generated, but not returned.
+ * - The string value of tokenPtr is the empty string: Then
+ * the new token is auto-generated, and returned in tokenPtr
+ * - tokenPtr has a value: The string value will be used for the token,
+ * unless it is already in use, in which case a new token will
+ * be generated, and returned in tokenPtr.
+ *
+ * For the flags variable: it can be one of:
+ * - TCL_RESOURCE__INSERT_TAIL: The element is inserted at the
+ * end of the list of open resources. Used only in Resource_Init.
+ * - TCL_RESOURCE_DONT_CLOSE: The resource close command will not close
+ * this resource.
+ * - TCL_RESOURCE_CHECK_IF_OPEN: This will check to see if this file's
+ * resource fork is already opened by this Tcl shell, and return
+ * an error without registering the resource fork.
+ *
+ * Results:
+ * Standard Tcl Result
+ *
+ * Side effects:
+ * An entry is added to the resource name table.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclMacRegisterResourceFork(
+ short fileRef, /* File ref for an open resource fork. */
+ Tcl_Obj *tokenPtr, /* A Tcl Object to which to write the *
+ * new token */
+ int flags) /* 1 means insert at the head of the resource
+ * fork list, 0 means at the tail */
+
+{
+ Tcl_HashEntry *resourceHashPtr;
+ Tcl_HashEntry *nameHashPtr;
+ OpenResourceFork *resourceRef;
+ int new;
+ char *resourceId = NULL;
+
+ if (!initialized) {
+ ResourceInit();
+ }
+
+ /*
+ * If we were asked to, check that this file has not been opened
+ * already.
+ */
+
+ if (flags & TCL_RESOURCE_CHECK_IF_OPEN) {
+ Tcl_HashSearch search;
+ short oldFileRef;
+ FCBPBRec newFileRec, oldFileRec;
+ OSErr err;
+
+ oldFileRec.ioCompletion = NULL;
+ oldFileRec.ioFCBIndx = 0;
+ oldFileRec.ioNamePtr = NULL;
+
+ newFileRec.ioCompletion = NULL;
+ newFileRec.ioFCBIndx = 0;
+ newFileRec.ioNamePtr = NULL;
+ newFileRec.ioVRefNum = 0;
+ newFileRec.ioRefNum = fileRef;
+ err = PBGetFCBInfo(&newFileRec, false);
+
+
+ resourceHashPtr = Tcl_FirstHashEntry(&resourceTable, &search);
+ while (resourceHashPtr != NULL) {
+
+ oldFileRef = (short) Tcl_GetHashKey(&resourceTable,
+ resourceHashPtr);
+
+
+ oldFileRec.ioVRefNum = 0;
+ oldFileRec.ioRefNum = oldFileRef;
+ err = PBGetFCBInfo(&oldFileRec, false);
+
+ /*
+ * err might not be noErr either because the file has closed
+ * out from under us somehow, which is bad but we're not going
+ * to fix it here, OR because it is the ROM MAP, which has a
+ * fileRef, but can't be gotten to by PBGetFCBInfo.
+ */
+
+ if ((oldFileRef == fileRef) ||
+ ((err == noErr)
+ && (newFileRec.ioFCBVRefNum == oldFileRec.ioFCBVRefNum)
+ && (newFileRec.ioFCBFlNm == oldFileRec.ioFCBFlNm))) {
+
+ resourceId = (char *) Tcl_GetHashValue(resourceHashPtr);
+ Tcl_SetStringObj(tokenPtr, resourceId, -1);
+ return TCL_OK;
+ }
+
+ resourceHashPtr = Tcl_NextHashEntry(&search);
+ }
+
+
+ }
+
+ resourceHashPtr = Tcl_CreateHashEntry(&resourceTable,
+ (char *) fileRef, &new);
+ if (!new) {
+ if (tokenPtr != NULL) {
+ resourceId = (char *) Tcl_GetHashValue(resourceHashPtr);
+ Tcl_SetStringObj(tokenPtr, resourceId, -1);
+ }
+ return TCL_OK;
+ }
+
+
+ /*
+ * If we were passed in a result pointer which is not an empty
+ * string, attempt to use that as the key. If the key already
+ * exists, silently fall back on resource%d...
+ */
+
+ if (tokenPtr != NULL) {
+ char *tokenVal;
+ int length;
+ tokenVal = (char *) Tcl_GetStringFromObj(tokenPtr, &length);
+ if (length > 0) {
+ nameHashPtr = Tcl_FindHashEntry(&nameTable, tokenVal);
+ if (nameHashPtr == NULL) {
+ resourceId = ckalloc(length + 1);
+ memcpy(resourceId, tokenVal, length);
+ resourceId[length] = '\0';
+ }
+ }
+ }
+
+ if (resourceId == NULL) {
+ resourceId = (char *) ckalloc(15);
+ sprintf(resourceId, "resource%d", newId);
+ }
+
+ Tcl_SetHashValue(resourceHashPtr, resourceId);
+ newId++;
+
+ nameHashPtr = Tcl_CreateHashEntry(&nameTable, resourceId, &new);
+ if (!new) {
+ panic("resource id has repeated itself");
+ }
+
+ resourceRef = (OpenResourceFork *) ckalloc(sizeof(OpenResourceFork));
+ resourceRef->fileRef = fileRef;
+ resourceRef->flags = flags;
+
+ Tcl_SetHashValue(nameHashPtr, (ClientData) resourceRef);
+ if (tokenPtr != NULL) {
+ Tcl_SetStringObj(tokenPtr, resourceId, -1);
+ }
+
+ if (flags & TCL_RESOURCE_INSERT_TAIL) {
+ Tcl_ListObjAppendElement(NULL, resourceForkList, tokenPtr);
+ } else {
+ Tcl_ListObjReplace(NULL, resourceForkList, 0, 0, 1, &tokenPtr);
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclMacUnRegisterResourceFork --
+ *
+ * Removes the entry for an open resource fork from the table of
+ * open resources managed by the procedures in this file.
+ * If resultPtr is not NULL, it will be used for error reporting.
+ *
+ * Results:
+ * The fileRef for this token, or -1 if an error occured.
+ *
+ * Side effects:
+ * An entry is removed from the resource name table.
+ *
+ *----------------------------------------------------------------------
+ */
+
+short
+TclMacUnRegisterResourceFork(
+ char *tokenPtr,
+ Tcl_Obj *resultPtr)
+
+{
+ Tcl_HashEntry *resourceHashPtr;
+ Tcl_HashEntry *nameHashPtr;
+ OpenResourceFork *resourceRef;
+ char *resourceId = NULL;
+ short fileRef;
+ char *bytes;
+ int i, match, index, listLen, length, elemLen;
+ Tcl_Obj **elemPtrs;
+
+
+ nameHashPtr = Tcl_FindHashEntry(&nameTable, tokenPtr);
+ if (nameHashPtr == NULL) {
+ if (resultPtr != NULL) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "invalid resource file reference \"",
+ tokenPtr, "\"", (char *) NULL);
+ }
+ return -1;
+ }
+
+ resourceRef = (OpenResourceFork *) Tcl_GetHashValue(nameHashPtr);
+ fileRef = resourceRef->fileRef;
+
+ if ( resourceRef->flags & TCL_RESOURCE_DONT_CLOSE ) {
+ if (resultPtr != NULL) {
+ Tcl_AppendStringsToObj(resultPtr,
+ "can't close \"", tokenPtr, "\" resource file",
+ (char *) NULL);
+ }
+ return -1;
+ }
+
+ Tcl_DeleteHashEntry(nameHashPtr);
+ ckfree((char *) resourceRef);
+
+
+ /*
+ * Now remove the resource from the resourceForkList object
+ */
+
+ Tcl_ListObjGetElements(NULL, resourceForkList, &listLen, &elemPtrs);
+
+
+ index = -1;
+ length = strlen(tokenPtr);
+
+ for (i = 0; i < listLen; i++) {
+ match = 0;
+ bytes = Tcl_GetStringFromObj(elemPtrs[i], &elemLen);
+ if (length == elemLen) {
+ match = (memcmp(bytes, tokenPtr,
+ (size_t) length) == 0);
+ }
+ if (match) {
+ index = i;
+ break;
+ }
+ }
+ if (!match) {
+ panic("the resource Fork List is out of synch!");
+ }
+
+ Tcl_ListObjReplace(NULL, resourceForkList, index, 1, 0, NULL);
+
+ resourceHashPtr = Tcl_FindHashEntry(&resourceTable, (char *) fileRef);
+
+ if (resourceHashPtr == NULL) {
+ panic("Resource & Name tables are out of synch in resource command.");
+ }
+ ckfree(Tcl_GetHashValue(resourceHashPtr));
+ Tcl_DeleteHashEntry(resourceHashPtr);
+
+ return fileRef;
+
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * BuildResourceForkList --
+ *
+ * Traverses the list of open resource forks, and builds the
+ * list of resources forks. Also creates a resource token for any that
+ * are opened but not registered with our resource system.
+ * This is based on code from Apple DTS.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The list of resource forks is updated.
+ * The resource name table may be augmented.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+BuildResourceForkList()
+{
+ Handle currentMapHandle, mSysMapHandle;
+ Ptr tempPtr;
+ FCBPBRec fileRec;
+ char fileName[256];
+ char appName[62];
+ Tcl_Obj *nameObj;
+ OSErr err;
+ ProcessSerialNumber psn;
+ ProcessInfoRec info;
+ FSSpec fileSpec;
+
+ /*
+ * Get the application name, so we can substitute
+ * the token "application" for the application's resource.
+ */
+
+ GetCurrentProcess(&psn);
+ info.processInfoLength = sizeof(ProcessInfoRec);
+ info.processName = (StringPtr) &appName;
+ info.processAppSpec = &fileSpec;
+ GetProcessInformation(&psn, &info);
+ p2cstr((StringPtr) appName);
+
+
+ fileRec.ioCompletion = NULL;
+ fileRec.ioVRefNum = 0;
+ fileRec.ioFCBIndx = 0;
+ fileRec.ioNamePtr = (StringPtr) &fileName;
+
+
+ currentMapHandle = LMGetTopMapHndl();
+ mSysMapHandle = LMGetSysMapHndl();
+
+ while (1) {
+ /*
+ * Now do the ones opened after the application.
+ */
+
+ nameObj = Tcl_NewObj();
+
+ tempPtr = *currentMapHandle;
+
+ fileRec.ioRefNum = *((short *) (tempPtr + 20));
+ err = PBGetFCBInfo(&fileRec, false);
+
+ if (err != noErr) {
+ /*
+ * The ROM resource map does not correspond to an opened file...
+ */
+ Tcl_SetStringObj(nameObj, "ROM Map", -1);
+ } else {
+ p2cstr((StringPtr) fileName);
+ if (strcmp(fileName,(char *) appName) == 0) {
+ Tcl_SetStringObj(nameObj, "application", -1);
+ } else {
+ Tcl_SetStringObj(nameObj, fileName, -1);
+ }
+ c2pstr(fileName);
+ }
+
+ TclMacRegisterResourceFork(fileRec.ioRefNum, nameObj,
+ TCL_RESOURCE_DONT_CLOSE | TCL_RESOURCE_INSERT_TAIL);
+
+ if (currentMapHandle == mSysMapHandle) {
+ break;
+ }
+
+ currentMapHandle = *((Handle *) (tempPtr + 16));
+ }
+}
diff --git a/mac/tclMacResource.r b/mac/tclMacResource.r
new file mode 100644
index 0000000..a25d476
--- /dev/null
+++ b/mac/tclMacResource.r
@@ -0,0 +1,92 @@
+/*
+ * tclMacResource.r --
+ *
+ * This file creates resources for use in a simple shell.
+ * This is designed to be an example of using the Tcl libraries
+ * statically in a Macintosh Application. For an example of
+ * of using the dynamic libraries look at tclMacApplication.r.
+ *
+ * Copyright (c) 1993-94 Lockheed Missle & Space Company
+ * Copyright (c) 1994-97 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacResource.r 1.19 97/09/23 12:51:41
+ */
+
+#include <Types.r>
+#include <SysTypes.r>
+
+/*
+ * The folowing include and defines help construct
+ * the version string for Tcl.
+ */
+
+#define RESOURCE_INCLUDED
+#include "tcl.h"
+
+#if (TCL_RELEASE_LEVEL == 0)
+# define RELEASE_LEVEL alpha
+#elif (TCL_RELEASE_LEVEL == 1)
+# define RELEASE_LEVEL beta
+#elif (TCL_RELEASE_LEVEL == 2)
+# define RELEASE_LEVEL final
+#endif
+
+#if (TCL_RELEASE_LEVEL == 2)
+# define MINOR_VERSION (TCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
+#else
+# define MINOR_VERSION TCL_MINOR_VERSION * 16
+#endif
+
+resource 'vers' (1) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ TCL_PATCH_LEVEL ", by Ray Johnson © Sun Microsystems"
+};
+
+resource 'vers' (2) {
+ TCL_MAJOR_VERSION, MINOR_VERSION,
+ RELEASE_LEVEL, 0x00, verUS,
+ TCL_PATCH_LEVEL,
+ "Simple Tcl Shell " TCL_PATCH_LEVEL " © 1996"
+};
+
+
+/*
+ * The mechanisim below loads Tcl source into the resource fork of the
+ * application. The example below creates a TEXT resource named
+ * "Init" from the file "init.tcl". This allows applications to use
+ * Tcl to define the behavior of the application without having to
+ * require some predetermined file structure - all needed Tcl "files"
+ * are located within the application. To source a file for the
+ * resource fork the source command has been modified to support
+ * sourcing from resources. In the below case "source -rsrc {Init}"
+ * will load the TEXT resource named "Init".
+ */
+
+read 'TEXT' (0, "Init", purgeable, preload) "::library:init.tcl";
+read 'TEXT' (1, "History", purgeable,preload) "::library:history.tcl";
+read 'TEXT' (2, "Word", purgeable,preload) "::library:word.tcl";
+
+/*
+ * The following resource is used when creating the 'env' variable in
+ * the Macintosh environment. The creation mechanisim looks for the
+ * 'STR#' resource named "Tcl Environment Variables" rather than a
+ * specific resource number. (In other words, feel free to change the
+ * resource id if it conflicts with your application.) Each string in
+ * the resource must be of the form "KEYWORD=SOME STRING". See Tcl
+ * documentation for futher information about the env variable.
+ *
+ * A good example of something you may want to set is: "TCL_LIBRARY=My
+ * disk:etc."
+ */
+
+resource 'STR#' (128, "Tcl Environment Variables") {
+ { "SCHEDULE_NAME=Agent Controller Schedule",
+ "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler"
+ };
+};
+
diff --git a/mac/tclMacShLib.exp b/mac/tclMacShLib.exp
new file mode 100644
index 0000000..8936114
--- /dev/null
+++ b/mac/tclMacShLib.exp
@@ -0,0 +1,1069 @@
+AddrToName
+AddrToStr
+BuildAFPVolMountInfo
+BumpDate
+ChangeCreatorType
+ChangeFDFlags
+CheckObjectLock
+CheckVolLock
+ClearHasBeenInited
+ClearHasCustomIcon
+ClearIsInvisible
+ClearIsStationery
+ClearNameLocked
+CloseResolver
+ConfigureMemory
+CopyDirectoryAccess
+CopyFileMgrAttributes
+CopyFork
+CreateFileIDRef
+DTCopyComment
+DTGetIcon
+DTOpen
+DTSetComment
+DeleteDirectory
+DeleteDirectoryContents
+DeleteFileIDRef
+DetermineVRefNum
+DirectoryCopy
+EnumCache
+##EnvStr
+ExchangeFiles
+FSMakeFSSpecCompat
+FSReadNoCache
+FSWriteNoCache
+FSWriteVerify
+FSpBumpDate
+FSpCatMoveCompat
+FSpChangeCreatorType
+FSpChangeFDFlags
+FSpCheckObjectLock
+FSpClearHasBeenInited
+FSpClearHasCustomIcon
+FSpClearIsInvisible
+FSpClearIsStationery
+FSpClearNameLocked
+FSpCopyDirectoryAccess
+FSpCopyFile
+FSpCopyFileMgrAttributes
+FSpCreateCompat
+FSpCreateFileIDRef
+FSpCreateMinimum
+FSpCreateResFileCompat
+FSpDTCopyComment
+FSpDTSetComment
+FSpDeleteCompat
+FSpDirCreateCompat
+FSpDirectoryCopy
+FSpExchangeFilesCompat
+FSpFileCopy
+FSpFilteredDirectoryCopy
+FSpFindFolder
+FSpGetDInfo
+FSpGetDefaultDir
+FSpGetDirAccess
+FSpGetDirectoryID
+FSpGetFInfoCompat
+FSpGetFLockCompat
+FSpGetFileLocation
+FSpGetFileSize
+FSpGetForeignPrivs
+FSpGetFullPath
+FSpGetIOACUser
+FSpLocationFromFullPath
+FSpLocationFromPath
+FSpMoveRename
+FSpMoveRenameCompat
+FSpOpenAware
+FSpOpenDFCompat
+FSpOpenRFAware
+FSpOpenRFCompat
+FSpOpenResFileCompat
+FSpPathFromLocation
+FSpRenameCompat
+FSpResolveFileIDRef
+FSpRstFLockCompat
+FSpSetDInfo
+FSpSetDefaultDir
+FSpSetDirAccess
+FSpSetFInfoCompat
+FSpSetFLockCompat
+FSpSetForeignPrivs
+FSpSetHasCustomIcon
+FSpSetIsInvisible
+FSpSetIsStationery
+FSpSetNameLocked
+FSpShare
+FSpUnshare
+FileCopy
+FilteredDirectoryCopy
+FindDrive
+FlushFile
+FreeAllMemory
+GetCPanelFolder
+GetCatInfoNoName
+GetDInfo
+GetDirItems
+GetDirName
+GetDirectoryID
+GetDiskBlocks
+GetDriverName
+GetFileLocation
+GetFileSize
+GetFilenameFromPathname
+GetForeignPrivs
+GetFullPath
+GetGlobalMouse
+GetIOACUser
+GetObjectLocation
+GetParentID
+GetSystemFolder
+GetTempBuffer
+GetTrapType
+GetUGEntries
+GetUGEntry
+GetVolMountInfo
+GetVolMountInfoSize
+GetVolumeInfoNoName
+HCopyFile
+HCreateMinimum
+HGetDirAccess
+HGetLogInInfo
+HGetVInfo
+HGetVolParms
+HInfo
+HMapID
+HMapName
+HMoveRename
+HMoveRenameCompat
+HOpenAware
+HOpenRFAware
+hypotd
+HSetDirAccess
+InstallConsole
+LocationFromFullPath
+LockRange
+MXInfo
+NumToolboxTraps
+OnLine
+OpenOurRF
+OpenResolver
+PBXGetVolInfoSync
+ReadCharsFromConsole
+RemoveConsole
+ResolveFileIDRef
+RestoreDefault
+RetrieveAFPVolMountInfo
+SIOUXBigRect
+SIOUXCantSaveAlert
+SIOUXDoAboutBox
+SIOUXDoContentClick
+SIOUXDoEditClear
+SIOUXDoEditCopy
+SIOUXDoEditCut
+SIOUXDoEditPaste
+SIOUXDoEditSelectAll
+SIOUXDoMenuChoice
+SIOUXDoPageSetup
+SIOUXDoPrintText
+SIOUXDoSaveText
+SIOUXDragRect
+SIOUXDrawGrowBox
+SIOUXHandleOneEvent
+SIOUXIsAppWindow
+SIOUXMyGrowWindow
+SIOUXQuitting
+SIOUXSetTitle
+SIOUXSettings
+SIOUXSetupMenus
+SIOUXSetupTextWindow
+SIOUXState
+SIOUXTextWindow
+SIOUXUpdateMenuItems
+SIOUXUpdateScrollbar
+SIOUXUpdateStatusLine
+SIOUXUpdateWindow
+SIOUXUseWaitNextEvent
+SIOUXYesNoCancelAlert
+SIOUXisinrange
+SIOUXselstart
+SearchFolderForDNRP
+SetDInfo
+SetDefault
+SetForeignPrivs
+SetHasCustomIcon
+SetIsInvisible
+SetIsStationery
+SetNameLocked
+Share
+StrToAddr
+TclAllocateFreeObjects
+TclChdir
+TclCleanupByteCode
+TclCleanupCommand
+TclCompileBreakCmd
+TclCompileCatchCmd
+TclCompileContinueCmd
+TclCompileDollarVar
+TclCompileExpr
+TclCompileExprCmd
+TclCompileForCmd
+TclCompileForeachCmd
+TclCompileIfCmd
+TclCompileIncrCmd
+TclCompileQuotes
+TclCompileSetCmd
+TclCompileString
+TclCompileWhileCmd
+TclCopyAndCollapse
+TclCopyChannel
+TclCreateAuxData
+TclCreateExecEnv
+TclDate_TclDates
+TclDate_TclDatev
+TclDateact
+TclDatechar
+TclDatechk
+TclDatedebug
+TclDatedef
+TclDateerrflag
+TclDateexca
+TclDatelval
+TclDatenerrs
+TclDatepact
+TclDateparse
+TclDatepgo
+TclDateps
+TclDatepv
+TclDater1
+TclDater2
+TclDates
+TclDatestate
+TclDatetmp
+TclDatev
+TclDateval
+TclDeleteCompiledLocalVars
+TclDeleteExecEnv
+TclDeleteVars
+TclDoGlob
+TclEmitForwardJump
+TclExecuteByteCode
+TclExpandCodeArray
+TclExpandJumpFixupArray
+TclExpandParseValue
+TclExprFloatError
+TclFileAttrsCmd
+TclFileCopyCmd
+TclFileDeleteCmd
+TclFileMakeDirsCmd
+TclFileRenameCmd
+TclFindElement
+TclFindProc
+TclFixupForwardJump
+TclFormatInt
+TclFreeCompileEnv
+TclFreeJumpFixupArray
+TclFreeObj
+TclFreePackageInfo
+TclGetCwd
+TclGetDate
+TclGetDefaultStdChannel
+TclGetElementOfIndexedArray
+TclGetEnv
+TclGetExceptionRangeForPc
+TclGetExtension
+TclGetFrame
+TclGetIndexedScalar
+TclGetIntForIndex
+TclGetLoadedPackages
+TclGetLong
+TclGetNamespaceForQualName
+TclGetOpenMode
+TclGetOriginalCommand
+TclGetRegError
+TclGetSrcInfoForPc
+TclGetUserHome
+TclGlobalInvoke
+TclGuessPackageName
+TclHasSockets
+TclHideUnsafeCommands
+TclInExit
+TclIncrElementOfIndexedArray
+TclIncrIndexedScalar
+TclIncrVar2
+TclInitByteCodeObj
+TclInitCompileEnv
+TclInitJumpFixupArray
+TclInitNamespaces
+TclInterpInit
+TclInvoke
+TclInvokeObjectCommand
+TclInvokeStringCommand
+TclIsProc
+TclLoadFile
+TclLooksLikeInt
+TclLookupVar
+TclMacAccess
+TclMacCreateEnv
+TclMacExitHandler
+TclMacFOpenHack
+TclMacInitExitToShell
+TclMacInstallExitToShellPatch
+TclMacOSErrorToPosixError
+TclMacReadlink
+TclMacRemoveTimer
+TclMacStartTimer
+TclMacStat
+TclMacTimerExpired
+TclMatchFiles
+TclNeedSpace
+TclObjIndexForString
+TclObjInterpProc
+TclObjInvoke
+TclObjInvokeGlobal
+TclParseBraces
+TclParseNestedCmd
+TclParseQuotes
+TclPlatformExit
+TclPlatformInit
+TclPreventAliasLoop
+TclPrintByteCodeObj
+TclPrintInstruction
+TclPrintSource
+TclRegComp
+TclRegError
+TclRegExec
+TclRenameCommand
+TclResetShadowedCmdRefs
+TclServiceIdle
+TclSetElementOfIndexedArray
+TclSetEnv
+TclSetIndexedScalar
+TclSetupEnv
+TclSockGetPort
+TclTeardownNamespace
+TclTestChannelCmd
+TclTestChannelEventCmd
+TclUnsetEnv
+TclUpdateReturnInfo
+TclWordEnd
+Tcl_AddErrorInfo
+Tcl_AddObjErrorInfo
+Tcl_AfterCmd
+Tcl_Alloc
+Tcl_AllowExceptions
+Tcl_AppendAllObjTypes
+Tcl_AppendElement
+Tcl_AppendObjCmd
+Tcl_AppendResult
+Tcl_AppendStringsToObj
+Tcl_AppendToObj
+Tcl_ArrayObjCmd
+Tcl_AsyncCreate
+Tcl_AsyncDelete
+Tcl_AsyncInvoke
+Tcl_AsyncMark
+Tcl_AsyncReady
+Tcl_BackgroundError
+Tcl_Backslash
+Tcl_BeepObjCmd
+Tcl_BinaryObjCmd
+Tcl_BreakCmd
+Tcl_CallWhenDeleted
+Tcl_CancelIdleCall
+Tcl_CaseObjCmd
+Tcl_CatchObjCmd
+Tcl_ClockObjCmd
+Tcl_Close
+Tcl_CommandComplete
+Tcl_Concat
+Tcl_ConcatObj
+Tcl_ConcatObjCmd
+Tcl_ContinueCmd
+Tcl_ConvertCountedElement
+Tcl_ConvertElement
+Tcl_ConvertToType
+Tcl_CreateAlias
+Tcl_CreateAliasObj
+Tcl_CreateChannel
+Tcl_CreateChannelHandler
+Tcl_CreateCloseHandler
+Tcl_CreateCommand
+Tcl_CreateEventSource
+Tcl_CreateExitHandler
+Tcl_CreateInterp
+Tcl_CreateMathFunc
+Tcl_CreateNamespace
+Tcl_CreateObjCommand
+Tcl_CreateSlave
+Tcl_CreateTimerHandler
+Tcl_CreateTrace
+Tcl_DStringAppend
+Tcl_DStringAppendElement
+Tcl_DStringEndSublist
+Tcl_DStringFree
+Tcl_DStringGetResult
+Tcl_DStringInit
+Tcl_DStringResult
+Tcl_DStringSetLength
+Tcl_DStringStartSublist
+Tcl_DbCkalloc
+Tcl_DbCkfree
+Tcl_DbCkrealloc
+Tcl_DbDecrRefCount
+Tcl_DbIsShared
+Tcl_DbIncrRefCount
+Tcl_DbNewBooleanObj
+Tcl_DbNewDoubleObj
+Tcl_DbNewListObj
+Tcl_DbNewLongObj
+Tcl_DbNewObj
+Tcl_DbNewStringObj
+Tcl_DeleteAssocData
+Tcl_DeleteChannelHandler
+Tcl_DeleteCloseHandler
+Tcl_DeleteCommand
+Tcl_DeleteCommandFromToken
+Tcl_DeleteEventSource
+Tcl_DeleteEvents
+Tcl_DeleteExitHandler
+Tcl_DeleteHashEntry
+Tcl_DeleteHashTable
+Tcl_DeleteInterp
+Tcl_DeleteNamespace
+Tcl_DeleteTimerHandler
+Tcl_DeleteTrace
+Tcl_DoOneEvent
+Tcl_DoWhenIdle
+Tcl_DontCallWhenDeleted
+Tcl_DumpActiveMemory
+Tcl_DuplicateObj
+Tcl_EchoCmd
+Tcl_Eof
+Tcl_ErrnoId
+Tcl_ErrnoMsg
+Tcl_ErrorObjCmd
+Tcl_Eval
+Tcl_EvalFile
+Tcl_EvalObj
+Tcl_EvalObjCmd
+Tcl_EventuallyFree
+Tcl_ExecCmd
+Tcl_Exit
+Tcl_ExitObjCmd
+Tcl_ExposeCommand
+Tcl_ExprBoolean
+Tcl_ExprBooleanObj
+Tcl_ExprDouble
+Tcl_ExprDoubleObj
+Tcl_ExprLong
+Tcl_ExprLongObj
+Tcl_ExprObjCmd
+Tcl_ExprString
+Tcl_FconfigureCmd
+Tcl_FcopyObjCmd
+Tcl_FileEventCmd
+Tcl_FileObjCmd
+Tcl_Finalize
+Tcl_FindCommand
+Tcl_FindExecutable
+Tcl_FindNamespace
+Tcl_FindNamespaceVar
+Tcl_FirstHashEntry
+Tcl_Flush
+Tcl_FlushObjCmd
+Tcl_ForCmd
+Tcl_ForeachObjCmd
+Tcl_ForgetImport
+Tcl_FormatCmd
+Tcl_Free
+Tcl_FreeResult
+Tcl_GetAlias
+Tcl_GetAliasObj
+Tcl_GetAssocData
+Tcl_GetBoolean
+Tcl_GetBooleanFromObj
+Tcl_GetChannel
+Tcl_GetChannelBufferSize
+Tcl_GetChannelHandle
+Tcl_GetChannelInstanceData
+Tcl_GetChannelMode
+Tcl_GetChannelName
+Tcl_GetChannelOption
+Tcl_GetChannelType
+Tcl_GetCommandFromObj
+Tcl_GetCommandFullName
+Tcl_GetCommandInfo
+Tcl_GetCommandName
+Tcl_GetCurrentNamespace
+Tcl_GetDouble
+Tcl_GetDoubleFromObj
+Tcl_GetErrno
+Tcl_GetGlobalNamespace
+Tcl_GetHostName
+Tcl_GetIndexFromObj
+Tcl_GetInt
+Tcl_GetIntFromObj
+Tcl_GetInterpPath
+Tcl_GetLongFromObj
+Tcl_GetMaster
+Tcl_GetOSTypeFromObj
+Tcl_GetObjResult
+Tcl_GetObjType
+Tcl_GetPathType
+Tcl_GetServiceMode
+Tcl_GetSlave
+Tcl_GetStdChannel
+Tcl_GetStringFromObj
+Tcl_GetStringResult
+Tcl_GetVar
+Tcl_GetVar2
+Tcl_GetVariableFullName
+Tcl_Gets
+Tcl_GetsObj
+Tcl_GetsObjCmd
+Tcl_GlobCmd
+Tcl_GlobalEval
+Tcl_GlobalEvalObj
+Tcl_GlobalObjCmd
+Tcl_HashStats
+Tcl_HideCommand
+Tcl_HistoryCmd
+Tcl_IfCmd
+Tcl_Import
+Tcl_IncrCmd
+Tcl_InfoObjCmd
+Tcl_Init
+Tcl_InitHashTable
+Tcl_InitMemory
+Tcl_InputBlocked
+Tcl_InputBuffered
+Tcl_InterpDeleted
+Tcl_InterpObjCmd
+Tcl_IsSafe
+Tcl_JoinObjCmd
+Tcl_JoinPath
+Tcl_LappendObjCmd
+Tcl_LindexObjCmd
+Tcl_LinkVar
+Tcl_LinsertObjCmd
+Tcl_ListObjAppendElement
+Tcl_ListObjAppendList
+Tcl_ListObjCmd
+Tcl_ListObjGetElements
+Tcl_ListObjIndex
+Tcl_ListObjLength
+Tcl_ListObjReplace
+Tcl_LlengthObjCmd
+Tcl_LoadCmd
+Tcl_LrangeObjCmd
+Tcl_LreplaceObjCmd
+Tcl_LsCmd
+Tcl_LsearchObjCmd
+Tcl_LsortObjCmd
+Tcl_MacConvertTextResource
+Tcl_MacEvalResource
+Tcl_MacFindResource
+Tcl_MacSetEventProc
+Tcl_MacSourceObjCmd
+Tcl_Main
+Tcl_MakeSafe
+Tcl_MakeTcpClientChannel
+Tcl_Merge
+Tcl_NamespaceObjCmd
+Tcl_NewBooleanObj
+Tcl_NewDoubleObj
+Tcl_NewIntObj
+Tcl_NewListObj
+Tcl_NewLongObj
+Tcl_NewOSTypeObj
+Tcl_NewObj
+Tcl_NewStringObj
+Tcl_NextHashEntry
+Tcl_NotifyChannel
+Tcl_ObjGetVar2
+Tcl_ObjSetVar2
+Tcl_OpenCmd
+Tcl_OpenFileChannel
+Tcl_OpenTcpClient
+Tcl_OpenTcpServer
+Tcl_PackageCmd
+Tcl_ParseVar
+Tcl_PidObjCmd
+Tcl_PkgProvide
+Tcl_PkgRequire
+Tcl_PopCallFrame
+Tcl_PosixError
+Tcl_Preserve
+Tcl_PrintDouble
+Tcl_ProcObjCmd
+Tcl_PushCallFrame
+Tcl_PutEnv
+Tcl_PutsObjCmd
+Tcl_PwdCmd
+Tcl_QueueEvent
+Tcl_Read
+Tcl_ReadObjCmd
+Tcl_Realloc
+Tcl_RecordAndEval
+Tcl_RegExpCompile
+Tcl_RegExpExec
+Tcl_RegExpMatch
+Tcl_RegExpRange
+Tcl_RegexpCmd
+Tcl_RegisterChannel
+Tcl_RegisterObjType
+Tcl_RegsubCmd
+Tcl_Release
+Tcl_RenameObjCmd
+Tcl_ResetResult
+Tcl_ResourceObjCmd
+Tcl_ReturnObjCmd
+Tcl_ScanCmd
+Tcl_ScanCountedElement
+Tcl_ScanElement
+Tcl_Seek
+Tcl_SeekCmd
+Tcl_ServiceAll
+Tcl_ServiceEvent
+Tcl_SetAssocData
+Tcl_SetBooleanObj
+Tcl_SetChannelBufferSize
+Tcl_SetChannelOption
+Tcl_SetCmd
+Tcl_SetCommandInfo
+Tcl_SetDoubleObj
+Tcl_SetErrno
+Tcl_SetErrorCode
+Tcl_SetIntObj
+Tcl_SetListObj
+Tcl_SetLongObj
+Tcl_SetMaxBlockTime
+Tcl_SetOSTypeObj
+Tcl_SetObjErrorCode
+Tcl_SetObjLength
+Tcl_SetObjResult
+Tcl_SetPanicProc
+Tcl_SetRecursionLimit
+Tcl_SetResult
+Tcl_SetServiceMode
+Tcl_SetStdChannel
+Tcl_SetStringObj
+Tcl_SetTimer
+Tcl_SetVar
+Tcl_SetVar2
+Tcl_SignalId
+Tcl_SignalMsg
+Tcl_Sleep
+Tcl_SocketCmd
+Tcl_SourceObjCmd
+Tcl_SourceRCFile
+Tcl_SplitList
+Tcl_SplitPath
+Tcl_StaticPackage
+Tcl_StringMatch
+Tcl_StringObjCmd
+Tcl_SubstCmd
+Tcl_SwitchObjCmd
+Tcl_Tell
+Tcl_TellCmd
+Tcl_TimeObjCmd
+Tcl_TraceCmd
+Tcl_TraceVar
+Tcl_TraceVar2
+Tcl_TranslateFileName
+Tcl_Ungets
+Tcl_UnlinkVar
+Tcl_UnregisterChannel
+Tcl_UnsetObjCmd
+Tcl_UnsetVar
+Tcl_UnsetVar2
+Tcl_UntraceVar
+Tcl_UntraceVar2
+Tcl_UpVar
+Tcl_UpVar2
+Tcl_UpdateCmd
+Tcl_UpdateLinkedVar
+Tcl_UplevelObjCmd
+Tcl_UpvarObjCmd
+Tcl_ValidateAllMemory
+Tcl_VarEval
+Tcl_VarTraceInfo
+Tcl_VarTraceInfo2
+Tcl_VariableObjCmd
+Tcl_VwaitCmd
+Tcl_WaitForEvent
+Tcl_WaitPid
+Tcl_WhileCmd
+Tcl_Write
+Tcl_WrongNumArgs
+TclpAlloc
+TclpCopyDirectory
+TclpCopyFile
+TclpCreateDirectory
+TclpDeleteFile
+TclpFree
+TclpGetClicks
+TclpGetDate
+TclpGetSeconds
+TclpGetTime
+TclpGetTimeZone
+TclpListVolumes
+TclpRealloc
+TclpRemoveDirectory
+TclpRenameFile
+TrapExists
+TruncPString
+UnlockRange
+UnmountAndEject
+Unshare
+VolumeMount
+WriteCharsToConsole
+XGetVInfo
+_Ctype
+_Stderr
+_Stoul
+abort
+abs
+acosf
+appMemory
+asctime
+asinf
+atan
+atan2
+atan2_d_dd
+atan2_d_pdpd
+atan2_r_prpr
+atan2_r_rr
+atan2f
+atan_d_d
+atan_d_pd
+atan_r_pr
+atan_r_r
+atanf
+atexit
+atof
+atoi
+atol
+bsearch
+builtinFuncTable
+calloc
+ccommand
+ceilf
+chdir
+clearerr
+clock
+close
+closeUPP
+completeUPP
+cos
+cos_d_d
+cos_d_pd
+cos_r_pr
+cos_r_r
+cosf
+coshf
+creat
+ctime
+cuserid
+difftime
+div
+environ
+errno
+exec
+exit
+exp
+exp_d_d
+exp_d_pd
+exp_r_pr
+exp_r_r
+expf
+fabsf
+fclose
+fcntl
+fdopen
+feof
+ferror
+fflush
+fgetc
+fgetpos
+fgets
+fileno
+floorf
+fmodf
+fopen
+fprintf
+fputc
+fputs
+fread
+free
+freopen
+frexpf
+fscanf
+fseek
+fsetpos
+fstat
+ftell
+fwrite
+getStdChannelsProc
+getc
+getchar
+getcwd
+getenv
+getlogin
+gets
+gmtime
+instructionTable
+isalnum
+isalpha
+isatty
+iscntrl
+isdigit
+isgraph
+islower
+isprint
+ispunct
+isspace
+isupper
+isxdigit
+labs
+ldexpf
+ldiv
+localeconv
+localtime
+log
+log10
+log10_d_d
+log10_d_pd
+log10f
+log_d_d
+log_d_pd
+logf
+longjmp
+lseek
+malloc
+mblen
+mbstowcs
+mbtowc
+memchr
+memcmp
+memcpy
+memmove
+memset
+mkdir
+mktime
+open
+panic
+panicProc
+perror
+pow
+power_d_dd
+powf
+printf
+putc
+putchar
+puts
+qsort
+raise
+rand
+read
+realloc
+remove
+rename
+resultUPP
+rewind
+rmdir
+scanf
+setbuf
+setlocale
+setvbuf
+signal
+sin
+sin_d_d
+sin_d_pd
+sin_r_pr
+sin_r_r
+sinf
+sinhf
+sleep
+sprintf
+sqrt
+sqrt_d_d
+sqrt_d_pd
+sqrt_r_pr
+sqrt_r_r
+sqrtf
+srand
+sscanf
+stat
+strcasecmp
+strcat
+strchr
+strcmp
+strcoll
+strcpy
+strcspn
+strerror
+strftime
+strlen
+strncasecmp
+strncat
+strncmp
+strncpy
+strpbrk
+strrchr
+strspn
+strstr
+strtod
+strtok
+strtol
+strtoul
+strxfrm
+system
+systemMemory
+tanf
+tanhf
+tclBooleanType
+tclByteCodeType
+tclCmdNameType
+tclDoubleType
+tclDummyLinkVarPtr
+tclExecutableName
+tclFreeObjList
+tclIndexType
+tclIntType
+tclListType
+tclMemDumpFileName
+tclNsNameType
+tclPlatform
+tclStringType
+tclTraceCompile
+tclTraceExec
+tclTypeTable
+tcl_MathInProgress
+tclpFileAttrProcs
+tclpFileAttrStrings
+tell
+time
+tmpfile
+tmpnam
+tolower
+toupper
+ttyname
+uname
+ungetc
+unlink
+utime
+utimes
+vfprintf
+vprintf
+vsprintf
+wcstombs
+wctob
+wctomb
+write
+#DTGetAPPL
+#DTGetComment
+#FSpDTGetAPPL
+#FSpDTGetComment
+#TclMacInitializeFragment
+#TclMacTerminateFragment
+#_Aldata
+#_Assert
+#_Atcount
+#_Atfuns
+#_Clocale
+#_Closreg
+#_Costate
+#_Daysto
+#_Dbl
+#_Defloc
+#_Environ
+#_Environ1
+#_Fgpos
+#_Files
+#_Flt
+#_Fopen
+#_Foprep
+#_Fread
+#_Freeloc
+#_Frprep
+#_Fspos
+#_Fwprep
+#_Fwrite
+#_Genld
+#_Gentime
+#_Getdst
+#_Getfld
+#_Getfloat
+#_Getint
+#_Getloc
+#_Getmem
+#_Getstr
+#_Gettime
+#_Getzone
+#_Isdst
+#_Ldbl
+#_Ldtob
+#_Litob
+#_Locale
+#_Locsum
+#_Loctab
+#_Locterm
+#_Locvar
+#_MWERKS_Atcount
+#_MWERKS_Atfuns
+#_Makeloc
+#_Makestab
+#_Makewct
+#_Mbcurmax
+#_Mbstate
+#_Mbtowc
+#_Nnl
+#_PJP_C_Copyright
+#_Printf
+#_Putfld
+#_Putstr
+#_Puttxt
+#_Randseed
+#_Readloc
+#_Scanf
+#_Setloc
+#_Skip
+#_Stdin
+#_Stdout
+#_Stod
+#_Stof
+#_Stoflt
+#_Stold
+#_Strerror
+#_Strftime
+#_Strxfrm
+#_Times
+#_Tolower
+#_Toupper
+#_Ttotm
+#_WCostate
+#_Wcstate
+#_Wctob
+#_Wctomb
+#_Wctrans
+#_Wctype
+#__CheckForSystem7
+#__RemoveConsoleHandler__
+#__aborting
+#__ctopstring
+#__cvt_fp2unsigned
+#__getcreator
+#__gettype
+#__initialize
+#__myraise
+#__ptmf_null
+#__ptr_glue
+#__system7present
+#__terminate
+#__ttyname
+#_atexit
+#_exit
+#_fcreator
+#_ftype
diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c
new file mode 100644
index 0000000..fe276f1
--- /dev/null
+++ b/mac/tclMacSock.c
@@ -0,0 +1,2615 @@
+/*
+ * tclMacSock.c
+ *
+ * Channel drivers for Macintosh sockets.
+ *
+ * Copyright (c) 1996-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacSock.c 1.59 97/10/09 18:24:42
+ */
+
+#include "tclInt.h"
+#include "tclPort.h"
+#include "tclMacInt.h"
+#include <AddressXlation.h>
+#include <Aliases.h>
+#undef Status
+#include <Devices.h>
+#include <Errors.h>
+#include <Events.h>
+#include <Files.h>
+#include <Gestalt.h>
+#include <MacTCP.h>
+#include <Processes.h>
+#include <Strings.h>
+
+/*
+ * The following variable is used to tell whether this module has been
+ * initialized.
+ */
+
+static int initialized = 0;
+
+/*
+ * If debugging is on we may drop into the debugger to handle certain cases
+ * that are not supposed to happen. Otherwise, we change ignore the error
+ * and most code should handle such errors ok.
+ */
+
+#ifndef TCL_DEBUG
+ #define Debugger()
+#endif
+
+/*
+ * The preferred buffer size for Macintosh channels.
+ */
+
+#define CHANNEL_BUF_SIZE 8192
+
+/*
+ * Port information structure. Used to match service names
+ * to a Tcp/Ip port number.
+ */
+
+typedef struct {
+ char *name; /* Name of service. */
+ int port; /* Port number. */
+} PortInfo;
+
+/*
+ * This structure describes per-instance state of a tcp based channel.
+ */
+
+typedef struct TcpState {
+ TCPiopb pb; /* Parameter block used by this stream.
+ * This must be in the first position. */
+ ProcessSerialNumber psn; /* PSN used to wake up process. */
+ StreamPtr tcpStream; /* Macintosh tcp stream pointer. */
+ int port; /* The port we are connected to. */
+ int flags; /* Bit field comprised of the flags
+ * described below. */
+ int checkMask; /* OR'ed combination of TCL_READABLE and
+ * TCL_WRITABLE as set by an asynchronous
+ * event handler. */
+ int watchMask; /* OR'ed combination of TCL_READABLE and
+ * TCL_WRITABLE as set by Tcl_WatchFile. */
+ Tcl_TcpAcceptProc *acceptProc; /* Proc to call on accept. */
+ ClientData acceptProcData; /* The data for the accept proc. */
+ wdsEntry dataSegment[2]; /* List of buffers to be written async. */
+ rdsEntry rdsarray[5+1]; /* Array used when cleaning out recieve
+ * buffers on a closing socket. */
+ Tcl_Channel channel; /* Channel associated with this socket. */
+ struct TcpState *nextPtr; /* The next socket on the global socket
+ * list. */
+} TcpState;
+
+/*
+ * This structure is used by domain name resolver callback.
+ */
+
+typedef struct DNRState {
+ struct hostInfo hostInfo; /* Data structure used by DNR functions. */
+ int done; /* Flag to determine when we are done. */
+ ProcessSerialNumber psn; /* Process to wake up when we are done. */
+} DNRState;
+
+/*
+ * The following macros may be used to set the flags field of
+ * a TcpState structure.
+ */
+
+#define TCP_ASYNC_SOCKET (1<<0) /* The socket is in async mode. */
+#define TCP_ASYNC_CONNECT (1<<1) /* The socket is trying to connect. */
+#define TCP_CONNECTED (1<<2) /* The socket is connected. */
+#define TCP_PENDING (1<<3) /* A SocketEvent is on the queue. */
+#define TCP_LISTENING (1<<4) /* This socket is listening for
+ * a connection. */
+#define TCP_LISTEN_CONNECT (1<<5) /* Someone has connect to the
+ * listening port. */
+#define TCP_REMOTE_CLOSED (1<<6) /* The remote side has closed
+ * the connection. */
+#define TCP_RELEASE (1<<7) /* The socket may now be released. */
+#define TCP_WRITING (1<<8) /* A background write is in progress. */
+#define TCP_SERVER_ZOMBIE (1<<9) /* The server can no longer accept connects. */
+
+/*
+ * The following structure is what is added to the Tcl event queue when
+ * a socket event occurs.
+ */
+
+typedef struct SocketEvent {
+ Tcl_Event header; /* Information that is standard for
+ * all events. */
+ TcpState *statePtr; /* Socket descriptor that is ready. */
+ StreamPtr tcpStream; /* Low level Macintosh stream. */
+} SocketEvent;
+
+/*
+ * Static routines for this file:
+ */
+
+static pascal void CleanUpExitProc _ANSI_ARGS_((void));
+static void ClearZombieSockets _ANSI_ARGS_((void));
+static void CloseCompletionRoutine _ANSI_ARGS_((TCPiopb *pb));
+static TcpState * CreateSocket _ANSI_ARGS_((Tcl_Interp *interp,
+ int port, char *host, char *myAddr, int myPort,
+ int server, int async));
+static pascal void DNRCompletionRoutine _ANSI_ARGS_((
+ struct hostInfo *hostinfoPtr,
+ DNRState *dnrStatePtr));
+static void FreeSocketInfo _ANSI_ARGS_((TcpState *statePtr));
+static long GetBufferSize _ANSI_ARGS_((void));
+static OSErr GetHostFromString _ANSI_ARGS_((char *name,
+ ip_addr *address));
+static OSErr GetLocalAddress _ANSI_ARGS_((unsigned long *addr));
+static void IOCompletionRoutine _ANSI_ARGS_((TCPiopb *pb));
+static void InitMacTCPParamBlock _ANSI_ARGS_((TCPiopb *pBlock,
+ int csCode));
+static void InitSockets _ANSI_ARGS_((void));
+static TcpState * NewSocketInfo _ANSI_ARGS_((StreamPtr stream));
+static OSErr ResolveAddress _ANSI_ARGS_((ip_addr tcpAddress,
+ Tcl_DString *dsPtr));
+static void SocketCheckProc _ANSI_ARGS_((ClientData clientData,
+ int flags));
+static int SocketEventProc _ANSI_ARGS_((Tcl_Event *evPtr,
+ int flags));
+static void SocketExitHandler _ANSI_ARGS_((ClientData clientData));
+static void SocketFreeProc _ANSI_ARGS_((ClientData clientData));
+static int SocketReady _ANSI_ARGS_((TcpState *statePtr));
+static void SocketSetupProc _ANSI_ARGS_((ClientData clientData,
+ int flags));
+static void TcpAccept _ANSI_ARGS_((TcpState *statePtr));
+static int TcpBlockMode _ANSI_ARGS_((ClientData instanceData, int mode));
+static int TcpClose _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp));
+static int TcpGetHandle _ANSI_ARGS_((ClientData instanceData,
+ int direction, ClientData *handlePtr));
+static int TcpGetOptionProc _ANSI_ARGS_((ClientData instanceData,
+ Tcl_Interp *interp, char *optionName,
+ Tcl_DString *dsPtr));
+static int TcpInput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toRead, int *errorCodePtr));
+static int TcpOutput _ANSI_ARGS_((ClientData instanceData,
+ char *buf, int toWrite, int *errorCodePtr));
+static void TcpWatch _ANSI_ARGS_((ClientData instanceData,
+ int mask));
+static int WaitForSocketEvent _ANSI_ARGS_((TcpState *infoPtr,
+ int mask, int *errorCodePtr));
+
+/*
+ * This structure describes the channel type structure for TCP socket
+ * based IO:
+ */
+
+static Tcl_ChannelType tcpChannelType = {
+ "tcp", /* Type name. */
+ TcpBlockMode, /* Set blocking or
+ * non-blocking mode.*/
+ TcpClose, /* Close proc. */
+ TcpInput, /* Input proc. */
+ TcpOutput, /* Output proc. */
+ NULL, /* Seek proc. */
+ NULL, /* Set option proc. */
+ TcpGetOptionProc, /* Get option proc. */
+ TcpWatch, /* Initialize notifier. */
+ TcpGetHandle /* Get handles out of channel. */
+};
+
+/*
+ * Universal Procedure Pointers (UPP) for various callback
+ * routines used by MacTcp code.
+ */
+
+ResultUPP resultUPP = NULL;
+TCPIOCompletionUPP completeUPP = NULL;
+TCPIOCompletionUPP closeUPP = NULL;
+
+/*
+ * Built-in commands, and the procedures associated with them:
+ */
+
+static PortInfo portServices[] = {
+ {"echo", 7},
+ {"discard", 9},
+ {"systat", 11},
+ {"daytime", 13},
+ {"netstat", 15},
+ {"chargen", 19},
+ {"ftp-data", 20},
+ {"ftp", 21},
+ {"telnet", 23},
+ {"telneto", 24},
+ {"smtp", 25},
+ {"time", 37},
+ {"whois", 43},
+ {"domain", 53},
+ {"gopher", 70},
+ {"finger", 79},
+ {"hostnames", 101},
+ {"sunrpc", 111},
+ {"nntp", 119},
+ {"exec", 512},
+ {"login", 513},
+ {"shell", 514},
+ {"printer", 515},
+ {"courier", 530},
+ {"uucp", 540},
+ {NULL, 0},
+};
+
+/*
+ * Every open socket has an entry on the following list.
+ */
+
+static TcpState *socketList = NULL;
+
+/*
+ * Globals for holding information about OS support for sockets.
+ */
+
+static int socketsTestInited = false;
+static int hasSockets = false;
+static short driverRefNum = 0;
+static int socketNumber = 0;
+static int socketBufferSize = CHANNEL_BUF_SIZE;
+static ProcessSerialNumber applicationPSN;
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * InitSockets --
+ *
+ * Load the MacTCP driver and open the name resolver. We also
+ * create several UPP's used by our code. Lastly, we install
+ * a patch to ExitToShell to clean up socket connections if
+ * we are about to exit.
+ *
+ * Results:
+ * 1 if successful, 0 on failure.
+ *
+ * Side effects:
+ * Creates a new event source, loads the MacTCP driver,
+ * registers an exit to shell callback.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define gestaltMacTCPVersion 'mtcp'
+static void
+InitSockets()
+{
+ ParamBlockRec pb;
+ OSErr err;
+ long response;
+
+ initialized = 1;
+ Tcl_CreateExitHandler(SocketExitHandler, (ClientData) NULL);
+
+ if (Gestalt(gestaltMacTCPVersion, &response) == noErr) {
+ hasSockets = true;
+ } else {
+ hasSockets = false;
+ }
+
+ if (!hasSockets) {
+ return;
+ }
+
+ /*
+ * Load MacTcp driver and name server resolver.
+ */
+
+
+ pb.ioParam.ioCompletion = 0L;
+ pb.ioParam.ioNamePtr = "\p.IPP";
+ pb.ioParam.ioPermssn = fsCurPerm;
+ err = PBOpenSync(&pb);
+ if (err != noErr) {
+ hasSockets = 0;
+ return;
+ }
+ driverRefNum = pb.ioParam.ioRefNum;
+
+ socketBufferSize = GetBufferSize();
+ err = OpenResolver(NULL);
+ if (err != noErr) {
+ hasSockets = 0;
+ return;
+ }
+
+ GetCurrentProcess(&applicationPSN);
+ /*
+ * Create UPP's for various callback routines.
+ */
+
+ resultUPP = NewResultProc(DNRCompletionRoutine);
+ completeUPP = NewTCPIOCompletionProc(IOCompletionRoutine);
+ closeUPP = NewTCPIOCompletionProc(CloseCompletionRoutine);
+
+ /*
+ * Install an ExitToShell patch. We use this patch instead
+ * of the Tcl exit mechanism because we need to ensure that
+ * these routines are cleaned up even if we crash or are forced
+ * to quit. There are some circumstances when the Tcl exit
+ * handlers may not fire.
+ */
+
+ TclMacInstallExitToShellPatch(CleanUpExitProc);
+
+ Tcl_CreateEventSource(SocketSetupProc, SocketCheckProc, NULL);
+
+ initialized = 1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketExitHandler --
+ *
+ * Callback invoked during exit clean up to deinitialize the
+ * socket module.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SocketExitHandler(
+ ClientData clientData) /* Not used. */
+{
+ if (hasSockets) {
+ Tcl_DeleteEventSource(SocketSetupProc, SocketCheckProc, NULL);
+ /* CleanUpExitProc();
+ TclMacDeleteExitToShellPatch(CleanUpExitProc); */
+ }
+ initialized = 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclHasSockets --
+ *
+ * This function determines whether sockets are available on the
+ * current system and returns an error in interp if they are not.
+ * Note that interp may be NULL.
+ *
+ * Results:
+ * Returns TCL_OK if the system supports sockets, or TCL_ERROR with
+ * an error in interp.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclHasSockets(
+ Tcl_Interp *interp) /* Interp for error messages. */
+{
+ if (!initialized) {
+ InitSockets();
+ }
+
+ if (hasSockets) {
+ return TCL_OK;
+ }
+ if (interp != NULL) {
+ Tcl_AppendResult(interp, "sockets are not available on this system",
+ NULL);
+ }
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketSetupProc --
+ *
+ * This procedure is invoked before Tcl_DoOneEvent blocks waiting
+ * for an event.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Adjusts the block time if needed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SocketSetupProc(
+ ClientData data, /* Not used. */
+ int flags) /* Event flags as passed to Tcl_DoOneEvent. */
+{
+ TcpState *statePtr;
+ Tcl_Time blockTime = { 0, 0 };
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return;
+ }
+
+ /*
+ * Check to see if there is a ready socket. If so, poll.
+ */
+
+ for (statePtr = socketList; statePtr != NULL;
+ statePtr = statePtr->nextPtr) {
+ if (statePtr->flags & TCP_RELEASE) {
+ continue;
+ }
+ if (SocketReady(statePtr)) {
+ Tcl_SetMaxBlockTime(&blockTime);
+ break;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketCheckProc --
+ *
+ * This procedure is called by Tcl_DoOneEvent to check the socket
+ * event source for events.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * May queue an event.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SocketCheckProc(
+ ClientData data, /* Not used. */
+ int flags) /* Event flags as passed to Tcl_DoOneEvent. */
+{
+ TcpState *statePtr;
+ SocketEvent *evPtr;
+ TcpState dummyState;
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return;
+ }
+
+ /*
+ * Queue events for any ready sockets that don't already have events
+ * queued (caused by persistent states that won't generate WinSock
+ * events).
+ */
+
+ for (statePtr = socketList; statePtr != NULL;
+ statePtr = statePtr->nextPtr) {
+ /*
+ * Check to see if this socket is dead and needs to be cleaned
+ * up. We use a dummy statePtr whose only valid field is the
+ * nextPtr to allow the loop to continue even if the element
+ * is deleted.
+ */
+
+ if (statePtr->flags & TCP_RELEASE) {
+ if (!(statePtr->flags & TCP_PENDING)) {
+ dummyState.nextPtr = statePtr->nextPtr;
+ SocketFreeProc(statePtr);
+ statePtr = &dummyState;
+ }
+ continue;
+ }
+
+ if (!(statePtr->flags & TCP_PENDING) && SocketReady(statePtr)) {
+ statePtr->flags |= TCP_PENDING;
+ evPtr = (SocketEvent *) ckalloc(sizeof(SocketEvent));
+ evPtr->header.proc = SocketEventProc;
+ evPtr->statePtr = statePtr;
+ evPtr->tcpStream = statePtr->tcpStream;
+ Tcl_QueueEvent((Tcl_Event *) evPtr, TCL_QUEUE_TAIL);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketReady --
+ *
+ * This function checks the current state of a socket to see
+ * if any interesting conditions are present.
+ *
+ * Results:
+ * Returns 1 if an event that someone is watching is present, else
+ * returns 0.
+ *
+ * Side effects:
+ * Updates the checkMask for the socket to reflect any newly
+ * detected events.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SocketReady(
+ TcpState *statePtr)
+{
+ TCPiopb statusPB;
+ int foundSomething = 0;
+ int didStatus = 0;
+ int amount;
+ OSErr err;
+
+ if (statePtr->flags & TCP_LISTEN_CONNECT) {
+ foundSomething = 1;
+ statePtr->checkMask |= TCL_READABLE;
+ }
+ if (statePtr->watchMask & TCL_READABLE) {
+ if (statePtr->checkMask & TCL_READABLE) {
+ foundSomething = 1;
+ } else if (statePtr->flags & TCP_CONNECTED) {
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = statePtr->tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ didStatus = 1;
+
+ /*
+ * We make the fchannel readable if 1) we get an error,
+ * 2) there is more data available, or 3) we detect
+ * that a close from the remote connection has arrived.
+ */
+
+ if ((err != noErr) ||
+ (statusPB.csParam.status.amtUnreadData > 0) ||
+ (statusPB.csParam.status.connectionState == 14)) {
+ statePtr->checkMask |= TCL_READABLE;
+ foundSomething = 1;
+ }
+ }
+ }
+ if (statePtr->watchMask & TCL_WRITABLE) {
+ if (statePtr->checkMask & TCL_WRITABLE) {
+ foundSomething = 1;
+ } else if (statePtr->flags & TCP_CONNECTED) {
+ if (!didStatus) {
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = statePtr->tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ }
+
+ /*
+ * If there is an error or there if there is room to
+ * send more data we make the channel writeable.
+ */
+
+ amount = statusPB.csParam.status.sendWindow -
+ statusPB.csParam.status.amtUnackedData;
+ if ((err != noErr) || (amount > 0)) {
+ statePtr->checkMask |= TCL_WRITABLE;
+ foundSomething = 1;
+ }
+ }
+ }
+ return foundSomething;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * InitMacTCPParamBlock--
+ *
+ * Initialize a MacTCP parameter block.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Initializes the parameter block.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+InitMacTCPParamBlock(
+ TCPiopb *pBlock, /* Tcp parmeter block. */
+ int csCode) /* Tcp operation code. */
+{
+ memset(pBlock, 0, sizeof(TCPiopb));
+ pBlock->ioResult = 1;
+ pBlock->ioCRefNum = driverRefNum;
+ pBlock->csCode = (short) csCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpBlockMode --
+ *
+ * Set blocking or non-blocking mode on channel.
+ *
+ * Results:
+ * 0 if successful, errno when failed.
+ *
+ * Side effects:
+ * Sets the device into blocking or non-blocking mode.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TcpBlockMode(
+ ClientData instanceData, /* Channel state. */
+ int mode) /* The mode to set. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+
+ if (mode == TCL_MODE_BLOCKING) {
+ statePtr->flags &= ~TCP_ASYNC_SOCKET;
+ } else {
+ statePtr->flags |= TCP_ASYNC_SOCKET;
+ }
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpClose --
+ *
+ * Close the socket.
+ *
+ * Results:
+ * 0 if successful, the value of errno if failed.
+ *
+ * Side effects:
+ * Closes the socket.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TcpClose(
+ ClientData instanceData, /* The socket to close. */
+ Tcl_Interp *interp) /* Interp for error messages. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+ StreamPtr tcpStream;
+ TCPiopb closePB;
+ OSErr err;
+
+ tcpStream = statePtr->tcpStream;
+ statePtr->flags &= ~TCP_CONNECTED;
+
+ /*
+ * If this is a server socket we can't use the statePtr
+ * param block because it is in use. However, we can
+ * close syncronously.
+ */
+
+ if ((statePtr->flags & TCP_LISTENING) ||
+ (statePtr->flags & TCP_LISTEN_CONNECT)) {
+ InitMacTCPParamBlock(&closePB, TCPClose);
+ closePB.tcpStream = tcpStream;
+ closePB.ioCompletion = NULL;
+ err = PBControlSync((ParmBlkPtr) &closePB);
+ if (err != noErr) {
+ Debugger();
+ panic("error closing server socket");
+ }
+ statePtr->flags |= TCP_RELEASE;
+
+ /*
+ * Server sockets are closed sync. Therefor, we know it is OK to
+ * release the socket now.
+ */
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPRelease);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ err = PBControlSync((ParmBlkPtr) &statePtr->pb);
+ if (err != noErr) {
+ panic("error releasing server socket");
+ }
+
+ /*
+ * Free the buffer space used by the socket and the
+ * actual socket state data structure.
+ */
+
+ ckfree((char *) statePtr->pb.csParam.create.rcvBuff);
+ FreeSocketInfo(statePtr);
+ return 0;
+ }
+
+ /*
+ * If this socket is in the midddle on async connect we can just
+ * abort the connect and release the stream right now.
+ */
+
+ if (statePtr->flags & TCP_ASYNC_CONNECT) {
+ InitMacTCPParamBlock(&closePB, TCPClose);
+ closePB.tcpStream = tcpStream;
+ closePB.ioCompletion = NULL;
+ err = PBControlSync((ParmBlkPtr) &closePB);
+ if (err != noErr) {
+ panic("error closing async connect socket");
+ }
+ statePtr->flags |= TCP_RELEASE;
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPRelease);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ err = PBControlSync((ParmBlkPtr) &statePtr->pb);
+ if (err != noErr) {
+ panic("error releasing async connect socket");
+ }
+
+ /*
+ * Free the buffer space used by the socket and the
+ * actual socket state data structure.
+ */
+
+ ckfree((char *) statePtr->pb.csParam.create.rcvBuff);
+ FreeSocketInfo(statePtr);
+ return 0;
+ }
+
+ /*
+ * Client sockets:
+ * If a background write is in progress, don't close
+ * the socket yet. The completion routine for the
+ * write will take care of it.
+ */
+
+ if (!(statePtr->flags & TCP_WRITING)) {
+ InitMacTCPParamBlock(&statePtr->pb, TCPClose);
+ statePtr->pb.tcpStream = tcpStream;
+ statePtr->pb.ioCompletion = closeUPP;
+ statePtr->pb.csParam.close.userDataPtr = (Ptr) statePtr;
+ err = PBControlAsync((ParmBlkPtr) &statePtr->pb);
+ if (err != noErr) {
+ Debugger();
+ statePtr->flags |= TCP_RELEASE;
+ /* return 0; */
+ }
+ }
+
+ SocketFreeProc(instanceData);
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CloseCompletionRoutine --
+ *
+ * Handles the close protocol for a Tcp socket. This will do
+ * a series of calls to release all data currently buffered for
+ * the socket. This is important to do to as it allows the remote
+ * connection to recieve and issue it's own close on the socket.
+ * Note that this function is running at interupt time and can't
+ * allocate memory or do much else except set state.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The buffers for the socket are flushed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+CloseCompletionRoutine(
+ TCPiopb *pbPtr) /* Tcp parameter block. */
+{
+ TcpState *statePtr;
+ OSErr err;
+
+ if (pbPtr->csCode == TCPClose) {
+ statePtr = (TcpState *) (pbPtr->csParam.close.userDataPtr);
+ } else {
+ statePtr = (TcpState *) (pbPtr->csParam.receive.userDataPtr);
+ }
+
+ /*
+ * It's very bad if the statePtr is nNULL - we should probably panic...
+ */
+
+ if (statePtr == NULL) {
+ Debugger();
+ return;
+ }
+
+ WakeUpProcess(&statePtr->psn);
+
+ /*
+ * If there is an error we assume the remote side has already
+ * close. We are done closing as soon as we decide that the
+ * remote connection has closed.
+ */
+
+ if (pbPtr->ioResult != noErr) {
+ statePtr->flags |= TCP_RELEASE;
+ return;
+ }
+ if (statePtr->flags & TCP_REMOTE_CLOSED) {
+ statePtr->flags |= TCP_RELEASE;
+ return;
+ }
+
+ /*
+ * If we just did a recieve we need to return the buffers.
+ * Otherwise, attempt to recieve more data until we recieve an
+ * error (usually because we have no more data).
+ */
+
+ if (statePtr->pb.csCode == TCPNoCopyRcv) {
+ InitMacTCPParamBlock(&statePtr->pb, TCPRcvBfrReturn);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ statePtr->pb.ioCompletion = closeUPP;
+ statePtr->pb.csParam.receive.rdsPtr = (Ptr) statePtr->rdsarray;
+ statePtr->pb.csParam.receive.userDataPtr = (Ptr) statePtr;
+ err = PBControlAsync((ParmBlkPtr) &statePtr->pb);
+ } else {
+ InitMacTCPParamBlock(&statePtr->pb, TCPNoCopyRcv);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ statePtr->pb.ioCompletion = closeUPP;
+ statePtr->pb.csParam.receive.commandTimeoutValue = 1;
+ statePtr->pb.csParam.receive.rdsPtr = (Ptr) statePtr->rdsarray;
+ statePtr->pb.csParam.receive.rdsLength = 5;
+ statePtr->pb.csParam.receive.userDataPtr = (Ptr) statePtr;
+ err = PBControlAsync((ParmBlkPtr) &statePtr->pb);
+ }
+
+ if (err != noErr) {
+ statePtr->flags |= TCP_RELEASE;
+ }
+}
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketFreeProc --
+ *
+ * This callback is invoked in order to delete
+ * the notifier data associated with a file handle.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Removes the SocketInfo from the global socket list.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SocketFreeProc(
+ ClientData clientData) /* Channel state. */
+{
+ TcpState *statePtr = (TcpState *) clientData;
+ OSErr err;
+ TCPiopb statusPB;
+
+ /*
+ * Get the status of this connection. We need to do a
+ * few tests to see if it's OK to release the stream now.
+ */
+
+ if (!(statePtr->flags & TCP_RELEASE)) {
+ return;
+ }
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = statePtr->tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ if ((statusPB.csParam.status.connectionState == 0) ||
+ (statusPB.csParam.status.connectionState == 2)) {
+ /*
+ * If the conection state is 0 then this was a client
+ * connection and it's closed. If it is 2 then this a
+ * server client and we may release it. If it isn't
+ * one of those values then we return and we'll try to
+ * clean up later.
+ */
+
+ } else {
+ return;
+ }
+
+ /*
+ * The Close request is made async. We know it's
+ * OK to release the socket when the TCP_RELEASE flag
+ * gets set.
+ */
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPRelease);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ err = PBControlSync((ParmBlkPtr) &statePtr->pb);
+ if (err != noErr) {
+ Debugger(); /* Ignoreing leaves stranded stream. Is there an
+ alternative? */
+ }
+
+ /*
+ * Free the buffer space used by the socket and the
+ * actual socket state data structure.
+ */
+
+ ckfree((char *) statePtr->pb.csParam.create.rcvBuff);
+ FreeSocketInfo(statePtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpInput --
+ *
+ * Reads input from the IO channel into the buffer given. Returns
+ * count of how many bytes were actually read, and an error
+ * indication.
+ *
+ * Results:
+ * A count of how many bytes were read is returned. A value of -1
+ * implies an error occured. A value of zero means we have reached
+ * the end of data (EOF).
+ *
+ * Side effects:
+ * Reads input from the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TcpInput(
+ ClientData instanceData, /* Channel state. */
+ char *buf, /* Where to store data read. */
+ int bufSize, /* How much space is available
+ * in the buffer? */
+ int *errorCodePtr) /* Where to store error code. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+ StreamPtr tcpStream;
+ OSErr err;
+ TCPiopb statusPB;
+ int toRead, dataAvail;
+
+ *errorCodePtr = 0;
+ errno = 0;
+ tcpStream = statePtr->tcpStream;
+
+ if (bufSize == 0) {
+ return 0;
+ }
+ toRead = bufSize;
+
+ /*
+ * First check to see if EOF was already detected, to prevent
+ * calling the socket stack after the first time EOF is detected.
+ */
+
+ if (statePtr->flags & TCP_REMOTE_CLOSED) {
+ return 0;
+ }
+
+ /*
+ * If an asynchronous connect is in progress, attempt to wait for it
+ * to complete before reading.
+ */
+
+ if ((statePtr->flags & TCP_ASYNC_CONNECT)
+ && ! WaitForSocketEvent(statePtr, TCL_READABLE, errorCodePtr)) {
+ return -1;
+ }
+
+ /*
+ * No EOF, and it is connected, so try to read more from the socket.
+ * If the socket is blocking, we keep trying until there is data
+ * available or the socket is closed.
+ */
+
+ while (1) {
+
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ if (err != noErr) {
+ Debugger();
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return 0; /* EOF */
+ }
+ dataAvail = statusPB.csParam.status.amtUnreadData;
+ if (dataAvail < bufSize) {
+ toRead = dataAvail;
+ } else {
+ toRead = bufSize;
+ }
+ if (toRead != 0) {
+ /*
+ * Try to read the data.
+ */
+
+ InitMacTCPParamBlock(&statusPB, TCPRcv);
+ statusPB.tcpStream = tcpStream;
+ statusPB.csParam.receive.rcvBuff = buf;
+ statusPB.csParam.receive.rcvBuffLen = toRead;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+
+ statePtr->checkMask &= ~TCL_READABLE;
+ switch (err) {
+ case noErr:
+ /*
+ * The channel remains readable only if this read succeds
+ * and we had more data then the size of the buffer we were
+ * trying to fill. Use the info from the call to status to
+ * determine this.
+ */
+
+ if (dataAvail > bufSize) {
+ statePtr->checkMask |= TCL_READABLE;
+ }
+ return statusPB.csParam.receive.rcvBuffLen;
+ case connectionClosing:
+ *errorCodePtr = errno = ESHUTDOWN;
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return 0;
+ case connectionDoesntExist:
+ case connectionTerminated:
+ *errorCodePtr = errno = ENOTCONN;
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return 0;
+ case invalidStreamPtr:
+ default:
+ *errorCodePtr = EINVAL;
+ return -1;
+ }
+ }
+
+ /*
+ * No data is available, so check the connection state to
+ * see why this is the case.
+ */
+
+ if (statusPB.csParam.status.connectionState == 14) {
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return 0;
+ }
+ if (statusPB.csParam.status.connectionState != 8) {
+ Debugger();
+ }
+ statePtr->checkMask &= ~TCL_READABLE;
+ if (statePtr->flags & TCP_ASYNC_SOCKET) {
+ *errorCodePtr = EWOULDBLOCK;
+ return -1;
+ }
+
+ /*
+ * In the blocking case, wait until the file becomes readable
+ * or closed and try again.
+ */
+
+ if (!WaitForSocketEvent(statePtr, TCL_READABLE, errorCodePtr)) {
+ return -1;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpGetHandle --
+ *
+ * Called from Tcl_GetChannelFile to retrieve handles from inside
+ * a file based channel.
+ *
+ * Results:
+ * The appropriate handle or NULL if not present.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TcpGetHandle(
+ ClientData instanceData, /* The file state. */
+ int direction, /* Which handle to retrieve? */
+ ClientData *handlePtr)
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+
+ *handlePtr = (ClientData) statePtr->tcpStream;
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpOutput--
+ *
+ * Writes the given output on the IO channel. Returns count of how
+ * many characters were actually written, and an error indication.
+ *
+ * Results:
+ * A count of how many characters were written is returned and an
+ * error indication is returned in an output argument.
+ *
+ * Side effects:
+ * Writes output on the actual channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TcpOutput(
+ ClientData instanceData, /* Channel state. */
+ char *buf, /* The data buffer. */
+ int toWrite, /* How many bytes to write? */
+ int *errorCodePtr) /* Where to store error code. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+ StreamPtr tcpStream;
+ OSErr err;
+ int amount;
+ TCPiopb statusPB;
+
+ *errorCodePtr = 0;
+ tcpStream = statePtr->tcpStream;
+
+ /*
+ * If an asynchronous connect is in progress, attempt to wait for it
+ * to complete before writing.
+ */
+
+ if ((statePtr->flags & TCP_ASYNC_CONNECT)
+ && ! WaitForSocketEvent(statePtr, TCL_WRITABLE, errorCodePtr)) {
+ return -1;
+ }
+
+ /*
+ * Loop until we have written some data, or an error occurs.
+ */
+
+ while (1) {
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ if ((err == connectionDoesntExist) || ((err == noErr) &&
+ (statusPB.csParam.status.connectionState == 14))) {
+ /*
+ * The remote connection is gone away. Report an error
+ * and don't write anything.
+ */
+
+ *errorCodePtr = errno = EPIPE;
+ return -1;
+ } else if (err != noErr) {
+ return -1;
+ }
+ amount = statusPB.csParam.status.sendWindow
+ - statusPB.csParam.status.amtUnackedData;
+
+ /*
+ * Attempt to write the data to the socket if a background
+ * write isn't in progress and there is room in the output buffers.
+ */
+
+ if (!(statePtr->flags & TCP_WRITING) && amount > 0) {
+ if (toWrite < amount) {
+ amount = toWrite;
+ }
+ statePtr->dataSegment[0].length = amount;
+ statePtr->dataSegment[0].ptr = buf;
+ statePtr->dataSegment[1].length = 0;
+ InitMacTCPParamBlock(&statePtr->pb, TCPSend);
+ statePtr->pb.ioCompletion = completeUPP;
+ statePtr->pb.tcpStream = tcpStream;
+ statePtr->pb.csParam.send.wdsPtr = (Ptr) statePtr->dataSegment;
+ statePtr->pb.csParam.send.pushFlag = 1;
+ statePtr->pb.csParam.send.userDataPtr = (Ptr) statePtr;
+ statePtr->flags |= TCP_WRITING;
+ err = PBControlAsync((ParmBlkPtr) &(statePtr->pb));
+ switch (err) {
+ case noErr:
+ return amount;
+ case connectionClosing:
+ *errorCodePtr = errno = ESHUTDOWN;
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return -1;
+ case connectionDoesntExist:
+ case connectionTerminated:
+ *errorCodePtr = errno = ENOTCONN;
+ statePtr->flags |= TCP_REMOTE_CLOSED;
+ return -1;
+ case invalidStreamPtr:
+ default:
+ return -1;
+ }
+
+ }
+
+ /*
+ * The socket wasn't writable. In the non-blocking case, return
+ * immediately, otherwise wait until the file becomes writable
+ * or closed and try again.
+ */
+
+ if (statePtr->flags & TCP_ASYNC_SOCKET) {
+ statePtr->checkMask &= ~TCL_WRITABLE;
+ *errorCodePtr = EWOULDBLOCK;
+ return -1;
+ } else if (!WaitForSocketEvent(statePtr, TCL_WRITABLE, errorCodePtr)) {
+ return -1;
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpGetOptionProc --
+ *
+ * Computes an option value for a TCP socket based channel, or a
+ * list of all options and their values.
+ *
+ * Note: This code is based on code contributed by John Haxby.
+ *
+ * Results:
+ * A standard Tcl result. The value of the specified option or a
+ * list of all options and their values is returned in the
+ * supplied DString.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+TcpGetOptionProc(
+ ClientData instanceData, /* Socket state. */
+ Tcl_Interp *interp, /* For error reporting - can be NULL.*/
+ char *optionName, /* Name of the option to
+ * retrieve the value for, or
+ * NULL to get all options and
+ * their values. */
+ Tcl_DString *dsPtr) /* Where to store the computed
+ * value; initialized by caller. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+ int doPeerName = false, doSockName = false, doAll = false;
+ ip_addr tcpAddress;
+ char buffer[128];
+ OSErr err;
+ Tcl_DString dString;
+ TCPiopb statusPB;
+ int errorCode;
+
+ /*
+ * If an asynchronous connect is in progress, attempt to wait for it
+ * to complete before accessing the socket state.
+ */
+
+ if ((statePtr->flags & TCP_ASYNC_CONNECT)
+ && ! WaitForSocketEvent(statePtr, TCL_WRITABLE, &errorCode)) {
+ if (interp) {
+ /*
+ * fix the error message.
+ */
+
+ Tcl_AppendResult(interp, "connect is in progress and can't wait",
+ NULL);
+ }
+ return TCL_ERROR;
+ }
+
+ /*
+ * Determine which options we need to do. Do all of them
+ * if optionName is NULL.
+ */
+
+ if (optionName == (char *) NULL || optionName[0] == '\0') {
+ doAll = true;
+ } else {
+ if (!strcmp(optionName, "-peername")) {
+ doPeerName = true;
+ } else if (!strcmp(optionName, "-sockname")) {
+ doSockName = true;
+ } else {
+ return Tcl_BadChannelOption(interp, optionName,
+ "peername sockname");
+ }
+ }
+
+ /*
+ * Get status on the stream. Make sure to use a new pb struct because
+ * the struct in the statePtr may be part of an asyncronous call.
+ */
+
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = statePtr->tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ if ((err == connectionDoesntExist) ||
+ ((err == noErr) && (statusPB.csParam.status.connectionState == 14))) {
+ /*
+ * The socket was probably closed on the other side of the connection.
+ */
+
+ if (interp) {
+ Tcl_AppendResult(interp, "can't access socket info: ",
+ "connection reset by peer", NULL);
+ }
+ return TCL_ERROR;
+ } else if (err != noErr) {
+ if (interp) {
+ Tcl_AppendResult(interp, "unknown socket error", NULL);
+ }
+ Debugger();
+ return TCL_ERROR;
+ }
+
+
+ /*
+ * Get the sockname for the socket.
+ */
+
+ Tcl_DStringInit(&dString);
+ if (doAll || doSockName) {
+ if (doAll) {
+ Tcl_DStringAppendElement(dsPtr, "-sockname");
+ Tcl_DStringStartSublist(dsPtr);
+ }
+ tcpAddress = statusPB.csParam.status.localHost;
+ sprintf(buffer, "%d.%d.%d.%d", tcpAddress>>24,
+ tcpAddress>>16 & 0xff, tcpAddress>>8 & 0xff,
+ tcpAddress & 0xff);
+ Tcl_DStringAppendElement(dsPtr, buffer);
+ if (ResolveAddress(tcpAddress, &dString) == noErr) {
+ Tcl_DStringAppendElement(dsPtr, dString.string);
+ } else {
+ Tcl_DStringAppendElement(dsPtr, "<unknown>");
+ }
+ sprintf(buffer, "%d", statusPB.csParam.status.localPort);
+ Tcl_DStringAppendElement(dsPtr, buffer);
+ if (doAll) {
+ Tcl_DStringEndSublist(dsPtr);
+ }
+ }
+
+ /*
+ * Get the peername for the socket.
+ */
+
+ if ((doAll || doPeerName) && (statePtr->flags & TCP_CONNECTED)) {
+ if (doAll) {
+ Tcl_DStringAppendElement(dsPtr, "-peername");
+ Tcl_DStringStartSublist(dsPtr);
+ }
+ tcpAddress = statusPB.csParam.status.remoteHost;
+ sprintf(buffer, "%d.%d.%d.%d", tcpAddress>>24,
+ tcpAddress>>16 & 0xff, tcpAddress>>8 & 0xff,
+ tcpAddress & 0xff);
+ Tcl_DStringAppendElement(dsPtr, buffer);
+ Tcl_DStringSetLength(&dString, 0);
+ if (ResolveAddress(tcpAddress, &dString) == noErr) {
+ Tcl_DStringAppendElement(dsPtr, dString.string);
+ } else {
+ Tcl_DStringAppendElement(dsPtr, "<unknown>");
+ }
+ sprintf(buffer, "%d", statusPB.csParam.status.remotePort);
+ Tcl_DStringAppendElement(dsPtr, buffer);
+ if (doAll) {
+ Tcl_DStringEndSublist(dsPtr);
+ }
+ }
+
+ Tcl_DStringFree(&dString);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpWatch --
+ *
+ * Initialize the notifier to watch this channel.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Sets the watchMask for the channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+TcpWatch(instanceData, mask)
+ ClientData instanceData; /* The file state. */
+ int mask; /* Events of interest; an OR-ed
+ * combination of TCL_READABLE,
+ * TCL_WRITABLE and TCL_EXCEPTION. */
+{
+ TcpState *statePtr = (TcpState *) instanceData;
+
+ statePtr->watchMask = mask;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * NewSocketInfo --
+ *
+ * This function allocates and initializes a new SocketInfo
+ * structure.
+ *
+ * Results:
+ * Returns a newly allocated SocketInfo.
+ *
+ * Side effects:
+ * Adds the socket to the global socket list, allocates memory.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static TcpState *
+NewSocketInfo(
+ StreamPtr tcpStream)
+{
+ TcpState *statePtr;
+
+ statePtr = (TcpState *) ckalloc((unsigned) sizeof(TcpState));
+ statePtr->tcpStream = tcpStream;
+ statePtr->psn = applicationPSN;
+ statePtr->flags = 0;
+ statePtr->checkMask = 0;
+ statePtr->watchMask = 0;
+ statePtr->acceptProc = (Tcl_TcpAcceptProc *) NULL;
+ statePtr->acceptProcData = (ClientData) NULL;
+ statePtr->nextPtr = socketList;
+ socketList = statePtr;
+ return statePtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FreeSocketInfo --
+ *
+ * This function deallocates a SocketInfo structure that is no
+ * longer needed.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Removes the socket from the global socket list, frees memory.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+FreeSocketInfo(
+ TcpState *statePtr) /* The state pointer to free. */
+{
+ if (statePtr == socketList) {
+ socketList = statePtr->nextPtr;
+ } else {
+ TcpState *p;
+ for (p = socketList; p != NULL; p = p->nextPtr) {
+ if (p->nextPtr == statePtr) {
+ p->nextPtr = statePtr->nextPtr;
+ break;
+ }
+ }
+ }
+ ckfree((char *) statePtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_MakeTcpClientChannel --
+ *
+ * Creates a Tcl_Channel from an existing client TCP socket.
+ *
+ * Results:
+ * The Tcl_Channel wrapped around the preexisting TCP socket.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+Tcl_MakeTcpClientChannel(
+ ClientData sock) /* The socket to wrap up into a channel. */
+{
+ TcpState *statePtr;
+ char channelName[20];
+
+ if (TclHasSockets(NULL) != TCL_OK) {
+ return NULL;
+ }
+
+ statePtr = NewSocketInfo((StreamPtr) sock);
+ /* TODO: do we need to set the port??? */
+
+ sprintf(channelName, "sock%d", socketNumber++);
+
+ statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
+ (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE));
+ Tcl_SetChannelBufferSize(statePtr->channel, socketBufferSize);
+ Tcl_SetChannelOption(NULL, statePtr->channel, "-translation", "auto crlf");
+ return statePtr->channel;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CreateSocket --
+ *
+ * This function opens a new socket and initializes the
+ * SocketInfo structure.
+ *
+ * Results:
+ * Returns a new SocketInfo, or NULL with an error in interp.
+ *
+ * Side effects:
+ * Adds a new socket to the socketList.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static TcpState *
+CreateSocket(
+ Tcl_Interp *interp, /* For error reporting; can be NULL. */
+ int port, /* Port number to open. */
+ char *host, /* Name of host on which to open port. */
+ char *myaddr, /* Optional client-side address */
+ int myport, /* Optional client-side port */
+ int server, /* 1 if socket should be a server socket,
+ * else 0 for a client socket. */
+ int async) /* 1 create async, 0 do sync. */
+{
+ ip_addr macAddr;
+ OSErr err;
+ TCPiopb pb;
+ StreamPtr tcpStream;
+ TcpState *statePtr;
+ char * buffer;
+
+ /*
+ * Figure out the ip address from the host string.
+ */
+
+ if (host == NULL) {
+ err = GetLocalAddress(&macAddr);
+ } else {
+ err = GetHostFromString(host, &macAddr);
+ }
+ if (err != noErr) {
+ Tcl_SetErrno(EHOSTUNREACH);
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open socket: ",
+ Tcl_PosixError(interp), (char *) NULL);
+ }
+ return (TcpState *) NULL;
+ }
+
+ /*
+ * Create a MacTCP stream and create the state used for socket
+ * transactions from here on out.
+ */
+
+ ClearZombieSockets();
+ buffer = ckalloc(socketBufferSize);
+ InitMacTCPParamBlock(&pb, TCPCreate);
+ pb.csParam.create.rcvBuff = buffer;
+ pb.csParam.create.rcvBuffLen = socketBufferSize;
+ err = PBControlSync((ParmBlkPtr) &pb);
+ if (err != noErr) {
+ Tcl_SetErrno(0); /* TODO: set to ENOSR - maybe?*/
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open socket: ",
+ Tcl_PosixError(interp), (char *) NULL);
+ }
+ return (TcpState *) NULL;
+ }
+
+ tcpStream = pb.tcpStream;
+ statePtr = NewSocketInfo(tcpStream);
+ statePtr->port = port;
+
+ if (server) {
+ /*
+ * Set up server connection.
+ */
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPPassiveOpen);
+ statePtr->pb.tcpStream = tcpStream;
+ statePtr->pb.csParam.open.localPort = statePtr->port;
+ statePtr->pb.ioCompletion = completeUPP;
+ statePtr->pb.csParam.open.userDataPtr = (Ptr) statePtr;
+ statePtr->flags |= TCP_LISTENING;
+ err = PBControlAsync((ParmBlkPtr) &(statePtr->pb));
+
+ /*
+ * If this is a server on port 0 then we need to wait until
+ * the dynamic port allocation is made by the MacTcp driver.
+ */
+
+ if (statePtr->port == 0) {
+ EventRecord dummy;
+
+ while (statePtr->pb.csParam.open.localPort == 0) {
+ WaitNextEvent(0, &dummy, 1, NULL);
+ if (statePtr->pb.ioResult != 0) {
+ break;
+ }
+ }
+ statePtr->port = statePtr->pb.csParam.open.localPort;
+ }
+ Tcl_SetErrno(EINPROGRESS);
+ } else {
+ /*
+ * Attempt to connect. The connect may fail at present with an
+ * EINPROGRESS but at a later time it will complete. The caller
+ * will set up a file handler on the socket if she is interested in
+ * being informed when the connect completes.
+ */
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPActiveOpen);
+ statePtr->pb.tcpStream = tcpStream;
+ statePtr->pb.csParam.open.remoteHost = macAddr;
+ statePtr->pb.csParam.open.remotePort = port;
+ statePtr->pb.csParam.open.localHost = 0;
+ statePtr->pb.csParam.open.localPort = myport;
+ statePtr->pb.csParam.open.userDataPtr = (Ptr) statePtr;
+ statePtr->pb.ioCompletion = completeUPP;
+ if (async) {
+ statePtr->flags |= TCP_ASYNC_CONNECT;
+ err = PBControlAsync((ParmBlkPtr) &(statePtr->pb));
+ Tcl_SetErrno(EINPROGRESS);
+ } else {
+ err = PBControlSync((ParmBlkPtr) &(statePtr->pb));
+ }
+ }
+
+ switch (err) {
+ case noErr:
+ if (!async) {
+ statePtr->flags |= TCP_CONNECTED;
+ }
+ return statePtr;
+ case duplicateSocket:
+ Tcl_SetErrno(EADDRINUSE);
+ break;
+ case openFailed:
+ case connectionTerminated:
+ Tcl_SetErrno(ECONNREFUSED);
+ break;
+ case invalidStreamPtr:
+ case connectionExists:
+ default:
+ /*
+ * These cases should never occur. However, we will fail
+ * gracefully and hope Tcl can resume. The alternative is to panic
+ * which is probably a bit drastic.
+ */
+
+ Debugger();
+ Tcl_SetErrno(err);
+ }
+
+ /*
+ * We had error during the connection. Release the stream
+ * and file handle. Also report to the interp.
+ */
+
+ pb.ioCRefNum = driverRefNum;
+ pb.csCode = TCPRelease;
+ pb.tcpStream = tcpStream;
+ pb.ioCompletion = NULL;
+ err = PBControlSync((ParmBlkPtr) &pb);
+
+ if (interp != (Tcl_Interp *) NULL) {
+ Tcl_AppendResult(interp, "couldn't open socket: ",
+ Tcl_PosixError(interp), (char *) NULL);
+ }
+
+ ckfree(buffer);
+ FreeSocketInfo(statePtr);
+ return (TcpState *) NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_OpenTcpClient --
+ *
+ * Opens a TCP client socket and creates a channel around it.
+ *
+ * Results:
+ * The channel or NULL if failed. On failure, the routine also
+ * sets the output argument errorCodePtr to the error code.
+ *
+ * Side effects:
+ * Opens a client socket and creates a new channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+Tcl_OpenTcpClient(
+ Tcl_Interp *interp, /* For error reporting; can be NULL. */
+ int port, /* Port number to open. */
+ char *host, /* Host on which to open port. */
+ char *myaddr, /* Client-side address */
+ int myport, /* Client-side port */
+ int async) /* If nonzero, attempt to do an
+ * asynchronous connect. Otherwise
+ * we do a blocking connect.
+ * - currently ignored */
+{
+ TcpState *statePtr;
+ char channelName[20];
+
+ if (TclHasSockets(interp) != TCL_OK) {
+ return NULL;
+ }
+
+ /*
+ * Create a new client socket and wrap it in a channel.
+ */
+
+ statePtr = CreateSocket(interp, port, host, myaddr, myport, 0, async);
+ if (statePtr == NULL) {
+ return NULL;
+ }
+
+ sprintf(channelName, "sock%d", socketNumber++);
+
+ statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
+ (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE));
+ Tcl_SetChannelBufferSize(statePtr->channel, socketBufferSize);
+ Tcl_SetChannelOption(NULL, statePtr->channel, "-translation", "auto crlf");
+ return statePtr->channel;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_OpenTcpServer --
+ *
+ * Opens a TCP server socket and creates a channel around it.
+ *
+ * Results:
+ * The channel or NULL if failed.
+ *
+ * Side effects:
+ * Opens a server socket and creates a new channel.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Channel
+Tcl_OpenTcpServer(
+ Tcl_Interp *interp, /* For error reporting - may be
+ * NULL. */
+ int port, /* Port number to open. */
+ char *host, /* Name of local host. */
+ Tcl_TcpAcceptProc *acceptProc, /* Callback for accepting connections
+ * from new clients. */
+ ClientData acceptProcData) /* Data for the callback. */
+{
+ TcpState *statePtr;
+ char channelName[20];
+
+ if (TclHasSockets(interp) != TCL_OK) {
+ return NULL;
+ }
+
+ /*
+ * Create a new client socket and wrap it in a channel.
+ */
+
+ statePtr = CreateSocket(interp, port, host, NULL, 0, 1, 1);
+ if (statePtr == NULL) {
+ return NULL;
+ }
+
+ statePtr->acceptProc = acceptProc;
+ statePtr->acceptProcData = acceptProcData;
+
+ sprintf(channelName, "sock%d", socketNumber++);
+
+ statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
+ (ClientData) statePtr, 0);
+ Tcl_SetChannelBufferSize(statePtr->channel, socketBufferSize);
+ Tcl_SetChannelOption(NULL, statePtr->channel, "-translation", "auto crlf");
+ return statePtr->channel;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SocketEventProc --
+ *
+ * This procedure is called by Tcl_ServiceEvent when a socket event
+ * reaches the front of the event queue. This procedure is
+ * responsible for notifying the generic channel code.
+ *
+ * Results:
+ * Returns 1 if the event was handled, meaning it should be removed
+ * from the queue. Returns 0 if the event was not handled, meaning
+ * it should stay on the queue. The only time the event isn't
+ * handled is if the TCL_FILE_EVENTS flag bit isn't set.
+ *
+ * Side effects:
+ * Whatever the channel callback procedures do.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SocketEventProc(
+ Tcl_Event *evPtr, /* Event to service. */
+ int flags) /* Flags that indicate what events to
+ * handle, such as TCL_FILE_EVENTS. */
+{
+ TcpState *statePtr;
+ SocketEvent *eventPtr = (SocketEvent *) evPtr;
+ int mask = 0;
+
+ if (!(flags & TCL_FILE_EVENTS)) {
+ return 0;
+ }
+
+ /*
+ * Find the specified socket on the socket list.
+ */
+
+ for (statePtr = socketList; statePtr != NULL;
+ statePtr = statePtr->nextPtr) {
+ if ((statePtr == eventPtr->statePtr) &&
+ (statePtr->tcpStream == eventPtr->tcpStream)) {
+ break;
+ }
+ }
+
+ /*
+ * Discard events that have gone stale.
+ */
+
+ if (!statePtr) {
+ return 1;
+ }
+ statePtr->flags &= ~(TCP_PENDING);
+ if (statePtr->flags & TCP_RELEASE) {
+ SocketFreeProc(statePtr);
+ return 1;
+ }
+
+
+ /*
+ * Handle connection requests directly.
+ */
+
+ if (statePtr->flags & TCP_LISTEN_CONNECT) {
+ if (statePtr->checkMask & TCL_READABLE) {
+ TcpAccept(statePtr);
+ }
+ return 1;
+ }
+
+ /*
+ * Mask off unwanted events then notify the channel.
+ */
+
+ mask = statePtr->checkMask & statePtr->watchMask;
+ if (mask) {
+ Tcl_NotifyChannel(statePtr->channel, mask);
+ }
+ return 1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WaitForSocketEvent --
+ *
+ * Waits until one of the specified events occurs on a socket.
+ *
+ * Results:
+ * Returns 1 on success or 0 on failure, with an error code in
+ * errorCodePtr.
+ *
+ * Side effects:
+ * Processes socket events off the system queue.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+WaitForSocketEvent(
+ TcpState *statePtr, /* Information about this socket. */
+ int mask, /* Events to look for. */
+ int *errorCodePtr) /* Where to store errors? */
+{
+ OSErr err;
+ TCPiopb statusPB;
+ EventRecord dummy;
+
+ /*
+ * Loop until we get the specified condition, unless the socket is
+ * asynchronous.
+ */
+
+ do {
+ statusPB.ioCRefNum = driverRefNum;
+ statusPB.tcpStream = statePtr->tcpStream;
+ statusPB.csCode = TCPStatus;
+ err = PBControlSync((ParmBlkPtr) &statusPB);
+ if (err != noErr) {
+ statePtr->checkMask |= (TCL_READABLE | TCL_WRITABLE);
+ return 1;
+ }
+ statePtr->checkMask = 0;
+ if (statusPB.csParam.status.amtUnreadData > 0) {
+ statePtr->checkMask |= TCL_READABLE;
+ }
+ if (!(statePtr->flags & TCP_WRITING)
+ && (statusPB.csParam.status.sendWindow -
+ statusPB.csParam.status.amtUnackedData) > 0) {
+ statePtr->flags &= ~(TCP_ASYNC_CONNECT);
+ statePtr->checkMask |= TCL_WRITABLE;
+ }
+ if (mask & statePtr->checkMask) {
+ return 1;
+ }
+
+ /*
+ * Call the system to let other applications run while we
+ * are waiting for this event to occur.
+ */
+
+ WaitNextEvent(0, &dummy, 1, NULL);
+ } while (!(statePtr->flags & TCP_ASYNC_SOCKET));
+ *errorCodePtr = EWOULDBLOCK;
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TcpAccept --
+ * Accept a TCP socket connection. This is called by the event
+ * loop, and it in turns calls any registered callbacks for this
+ * channel.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Evals the Tcl script associated with the server socket.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+TcpAccept(
+ TcpState *statePtr)
+{
+ TcpState *newStatePtr;
+ StreamPtr tcpStream;
+ char remoteHostname[255];
+ OSErr err;
+ ip_addr remoteAddress;
+ long remotePort;
+ char channelName[20];
+
+ statePtr->flags &= ~TCP_LISTEN_CONNECT;
+ statePtr->checkMask &= ~TCL_READABLE;
+
+ /*
+ * Transfer sever stream to new connection.
+ */
+
+ tcpStream = statePtr->tcpStream;
+ newStatePtr = NewSocketInfo(tcpStream);
+ newStatePtr->tcpStream = tcpStream;
+ sprintf(channelName, "sock%d", socketNumber++);
+
+
+ newStatePtr->flags |= TCP_CONNECTED;
+ newStatePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
+ (ClientData) newStatePtr, (TCL_READABLE | TCL_WRITABLE));
+ Tcl_SetChannelBufferSize(newStatePtr->channel, socketBufferSize);
+ Tcl_SetChannelOption(NULL, newStatePtr->channel, "-translation",
+ "auto crlf");
+
+ remoteAddress = statePtr->pb.csParam.open.remoteHost;
+ remotePort = statePtr->pb.csParam.open.remotePort;
+
+ /*
+ * Reopen passive connect. Make new tcpStream the server.
+ */
+
+ ClearZombieSockets();
+ InitMacTCPParamBlock(&statePtr->pb, TCPCreate);
+ statePtr->pb.csParam.create.rcvBuff = ckalloc(socketBufferSize);
+ statePtr->pb.csParam.create.rcvBuffLen = socketBufferSize;
+ err = PBControlSync((ParmBlkPtr) &statePtr->pb);
+ if (err != noErr) {
+ /*
+ * Hmmm... We can't reopen the server. We'll go ahead
+ * an continue - but we are kind of broken now...
+ */
+ Debugger();
+ statePtr->tcpStream = -1;
+ statePtr->flags |= TCP_SERVER_ZOMBIE;
+ }
+
+ tcpStream = statePtr->tcpStream = statePtr->pb.tcpStream;
+
+ InitMacTCPParamBlock(&statePtr->pb, TCPPassiveOpen);
+ statePtr->pb.tcpStream = tcpStream;
+ statePtr->pb.csParam.open.localHost = 0;
+ statePtr->pb.csParam.open.localPort = statePtr->port;
+ statePtr->pb.ioCompletion = completeUPP;
+ statePtr->pb.csParam.open.userDataPtr = (Ptr) statePtr;
+ statePtr->flags |= TCP_LISTENING;
+ err = PBControlAsync((ParmBlkPtr) &(statePtr->pb));
+ /*
+ * TODO: deal with case where we can't recreate server socket...
+ */
+
+ /*
+ * Finally we run the accept procedure. We must do this last to make
+ * sure we are in a nice clean state. This Tcl code can do anything
+ * including closing the server or client sockets we've just delt with.
+ */
+
+ if (statePtr->acceptProc != NULL) {
+ sprintf(remoteHostname, "%d.%d.%d.%d", remoteAddress>>24,
+ remoteAddress>>16 & 0xff, remoteAddress>>8 & 0xff,
+ remoteAddress & 0xff);
+
+ (statePtr->acceptProc)(statePtr->acceptProcData, newStatePtr->channel,
+ remoteHostname, remotePort);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_GetHostName --
+ *
+ * Returns the name of the local host.
+ *
+ * Results:
+ * A string containing the network name for this machine, or
+ * an empty string if we can't figure out the name. The caller
+ * must not modify or free this string.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+char *
+Tcl_GetHostName()
+{
+ static int hostnameInited = 0;
+ static char hostname[255];
+ ip_addr ourAddress;
+ Tcl_DString dString;
+ OSErr err;
+
+ if (hostnameInited) {
+ return hostname;
+ }
+
+ if (TclHasSockets(NULL) == TCL_OK) {
+ err = GetLocalAddress(&ourAddress);
+ if (err == noErr) {
+ /*
+ * Search for the doman name and return it if found. Otherwise,
+ * just print the IP number to a string and return that.
+ */
+
+ Tcl_DStringInit(&dString);
+ err = ResolveAddress(ourAddress, &dString);
+ if (err == noErr) {
+ strcpy(hostname, dString.string);
+ } else {
+ sprintf(hostname, "%d.%d.%d.%d", ourAddress>>24, ourAddress>>16 & 0xff,
+ ourAddress>>8 & 0xff, ourAddress & 0xff);
+ }
+ Tcl_DStringFree(&dString);
+
+ hostnameInited = 1;
+ return hostname;
+ }
+ }
+
+ hostname[0] = '\0';
+ hostnameInited = 1;
+ return hostname;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ResolveAddress --
+ *
+ * This function is used to resolve an ip address to it's full
+ * domain name address.
+ *
+ * Results:
+ * An os err value.
+ *
+ * Side effects:
+ * Treats client data as int we set to true.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OSErr
+ResolveAddress(
+ ip_addr tcpAddress, /* Address to resolve. */
+ Tcl_DString *dsPtr) /* Returned address in string. */
+{
+ int i;
+ EventRecord dummy;
+ DNRState dnrState;
+ OSErr err;
+
+ /*
+ * Call AddrToName to resolve our ip address to our domain name.
+ * The call is async, so we must wait for a callback to tell us
+ * when to continue.
+ */
+
+ for (i = 0; i < NUM_ALT_ADDRS; i++) {
+ dnrState.hostInfo.addr[i] = 0;
+ }
+ dnrState.done = 0;
+ GetCurrentProcess(&(dnrState.psn));
+ err = AddrToName(tcpAddress, &dnrState.hostInfo, resultUPP, (Ptr) &dnrState);
+ if (err == cacheFault) {
+ while (!dnrState.done) {
+ WaitNextEvent(0, &dummy, 1, NULL);
+ }
+ }
+
+ /*
+ * If there is no error in finding the domain name we set the
+ * result into the dynamic string. We also work around a bug in
+ * MacTcp where an extranious '.' may be found at the end of the name.
+ */
+
+ if (dnrState.hostInfo.rtnCode == noErr) {
+ i = strlen(dnrState.hostInfo.cname) - 1;
+ if (dnrState.hostInfo.cname[i] == '.') {
+ dnrState.hostInfo.cname[i] = '\0';
+ }
+ Tcl_DStringAppend(dsPtr, dnrState.hostInfo.cname, -1);
+ }
+
+ return dnrState.hostInfo.rtnCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DNRCompletionRoutine --
+ *
+ * This function is called when the Domain Name Server is done
+ * seviceing our request. It just sets a flag that we can poll
+ * in functions like Tcl_GetHostName to let them know to continue.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Treats client data as int we set to true.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal void
+DNRCompletionRoutine(
+ struct hostInfo *hostinfoPtr, /* Host infor struct. */
+ DNRState *dnrStatePtr) /* Completetion state. */
+{
+ dnrStatePtr->done = true;
+ WakeUpProcess(&(dnrStatePtr->psn));
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CleanUpExitProc --
+ *
+ * This procedure is invoked as an exit handler when ExitToShell
+ * is called. It aborts any lingering socket connections. This
+ * must be called or the Mac OS will more than likely crash.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static pascal void
+CleanUpExitProc()
+{
+ TCPiopb exitPB;
+ TcpState *statePtr;
+
+ while (socketList != NULL) {
+ statePtr = socketList;
+ socketList = statePtr->nextPtr;
+
+ /*
+ * Close and Release the connection.
+ */
+
+ exitPB.ioCRefNum = driverRefNum;
+ exitPB.csCode = TCPClose;
+ exitPB.tcpStream = statePtr->tcpStream;
+ exitPB.csParam.close.ulpTimeoutValue = 60 /* seconds */;
+ exitPB.csParam.close.ulpTimeoutAction = 1 /* 1:abort 0:report */;
+ exitPB.csParam.close.validityFlags = timeoutValue | timeoutAction;
+ exitPB.ioCompletion = NULL;
+ PBControlSync((ParmBlkPtr) &exitPB);
+
+ exitPB.ioCRefNum = driverRefNum;
+ exitPB.csCode = TCPRelease;
+ exitPB.tcpStream = statePtr->tcpStream;
+ exitPB.ioCompletion = NULL;
+ PBControlSync((ParmBlkPtr) &exitPB);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetHostFromString --
+ *
+ * Looks up the passed in domain name in the domain resolver. It
+ * can accept strings of two types: 1) the ip number in string
+ * format, or 2) the domain name.
+ *
+ * Results:
+ * We return a ip address or 0 if there was an error or the
+ * domain does not exist.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OSErr
+GetHostFromString(
+ char *name, /* Host in string form. */
+ ip_addr *address) /* Returned IP address. */
+{
+ OSErr err;
+ int i;
+ EventRecord dummy;
+ DNRState dnrState;
+
+ if (TclHasSockets(NULL) != TCL_OK) {
+ return 0;
+ }
+
+ /*
+ * Call StrToAddr to get the ip number for the passed in domain
+ * name. The call is async, so we must wait for a callback to
+ * tell us when to continue.
+ */
+
+ for (i = 0; i < NUM_ALT_ADDRS; i++) {
+ dnrState.hostInfo.addr[i] = 0;
+ }
+ dnrState.done = 0;
+ GetCurrentProcess(&(dnrState.psn));
+ err = StrToAddr(name, &dnrState.hostInfo, resultUPP, (Ptr) &dnrState);
+ if (err == cacheFault) {
+ while (!dnrState.done) {
+ WaitNextEvent(0, &dummy, 1, NULL);
+ }
+ }
+
+ /*
+ * For some reason MacTcp may return a cachFault a second time via
+ * the hostinfo block. This seems to be a bug in MacTcp. In this case
+ * we run StrToAddr again - which seems to then work just fine.
+ */
+
+ if (dnrState.hostInfo.rtnCode == cacheFault) {
+ dnrState.done = 0;
+ err = StrToAddr(name, &dnrState.hostInfo, resultUPP, (Ptr) &dnrState);
+ if (err == cacheFault) {
+ while (!dnrState.done) {
+ WaitNextEvent(0, &dummy, 1, NULL);
+ }
+ }
+ }
+
+ if (dnrState.hostInfo.rtnCode == noErr) {
+ *address = dnrState.hostInfo.addr[0];
+ }
+
+ return dnrState.hostInfo.rtnCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * IOCompletionRoutine --
+ *
+ * This function is called when an asynchronous socket operation
+ * completes. Since this routine runs as an interrupt handler,
+ * it will simply set state to tell the notifier that this socket
+ * is now ready for action. Note that this function is running at
+ * interupt time and can't allocate memory or do much else except
+ * set state.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Sets some state in the socket state. May also wake the process
+ * if we are not currently running.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+IOCompletionRoutine(
+ TCPiopb *pbPtr) /* Tcp parameter block. */
+{
+ TcpState *statePtr;
+
+ if (pbPtr->csCode == TCPSend) {
+ statePtr = (TcpState *) pbPtr->csParam.send.userDataPtr;
+ } else {
+ statePtr = (TcpState *) pbPtr->csParam.open.userDataPtr;
+ }
+
+ /*
+ * Always wake the process in case it's in WaitNextEvent.
+ * If an error has a occured - just return. We will deal
+ * with the problem later.
+ */
+
+ WakeUpProcess(&statePtr->psn);
+ if (pbPtr->ioResult != noErr) {
+ return;
+ }
+
+ if (statePtr->flags & TCP_ASYNC_CONNECT) {
+ statePtr->flags &= ~TCP_ASYNC_CONNECT;
+ statePtr->flags |= TCP_CONNECTED;
+ statePtr->checkMask |= TCL_READABLE & TCL_WRITABLE;
+ } else if (statePtr->flags & TCP_LISTENING) {
+ if (statePtr->port == 0) {
+ Debugger();
+ }
+ statePtr->flags &= ~TCP_LISTENING;
+ statePtr->flags |= TCP_LISTEN_CONNECT;
+ statePtr->checkMask |= TCL_READABLE;
+ } else if (statePtr->flags & TCP_WRITING) {
+ statePtr->flags &= ~TCP_WRITING;
+ statePtr->checkMask |= TCL_WRITABLE;
+ if (!(statePtr->flags & TCP_CONNECTED)) {
+ InitMacTCPParamBlock(&statePtr->pb, TCPClose);
+ statePtr->pb.tcpStream = statePtr->tcpStream;
+ statePtr->pb.ioCompletion = closeUPP;
+ statePtr->pb.csParam.close.userDataPtr = (Ptr) statePtr;
+ if (PBControlAsync((ParmBlkPtr) &statePtr->pb) != noErr) {
+ statePtr->flags |= TCP_RELEASE;
+ }
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetLocalAddress --
+ *
+ * Get the IP address for this machine. The result is cached so
+ * the result is returned quickly after the first call.
+ *
+ * Results:
+ * Macintosh error code.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static OSErr
+GetLocalAddress(
+ unsigned long *addr) /* Returns host IP address. */
+{
+ struct GetAddrParamBlock pBlock;
+ OSErr err = noErr;
+ static unsigned long localAddress = 0;
+
+ if (localAddress == 0) {
+ memset(&pBlock, 0, sizeof(pBlock));
+ pBlock.ioResult = 1;
+ pBlock.csCode = ipctlGetAddr;
+ pBlock.ioCRefNum = driverRefNum;
+ err = PBControlSync((ParmBlkPtr) &pBlock);
+
+ if (err != noErr) {
+ return err;
+ }
+ localAddress = pBlock.ourAddress;
+ }
+
+ *addr = localAddress;
+ return noErr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetBufferSize --
+ *
+ * Get the appropiate buffer size for our machine & network. This
+ * value will be used by the rest of Tcl & the MacTcp driver for
+ * the size of its buffers. If out method for determining the
+ * optimal buffer size fails for any reason - we return a
+ * reasonable default.
+ *
+ * Results:
+ * Size of optimal buffer in bytes.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static long
+GetBufferSize()
+{
+ UDPiopb iopb;
+ OSErr err = noErr;
+ long bufferSize;
+
+ memset(&iopb, 0, sizeof(iopb));
+ err = GetLocalAddress(&iopb.csParam.mtu.remoteHost);
+ if (err != noErr) {
+ return CHANNEL_BUF_SIZE;
+ }
+ iopb.ioCRefNum = driverRefNum;
+ iopb.csCode = UDPMaxMTUSize;
+ err = PBControlSync((ParmBlkPtr)&iopb);
+ if (err != noErr) {
+ return CHANNEL_BUF_SIZE;
+ }
+ bufferSize = (iopb.csParam.mtu.mtuSize * 4) + 1024;
+ if (bufferSize < CHANNEL_BUF_SIZE) {
+ bufferSize = CHANNEL_BUF_SIZE;
+ }
+ return bufferSize;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclSockGetPort --
+ *
+ * Maps from a string, which could be a service name, to a port.
+ * Used by socket creation code to get port numbers and resolve
+ * registered service names to port numbers.
+ *
+ * Results:
+ * A standard Tcl result. On success, the port number is
+ * returned in portPtr. On failure, an error message is left in
+ * interp->result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclSockGetPort(
+ Tcl_Interp *interp, /* Interp for error messages. */
+ char *string, /* Integer or service name */
+ char *proto, /* "tcp" or "udp", typically -
+ * ignored on Mac - assumed to be tcp */
+ int *portPtr) /* Return port number */
+{
+ PortInfo *portInfoPtr = NULL;
+
+ if (Tcl_GetInt(interp, string, portPtr) == TCL_OK) {
+ if (*portPtr > 0xFFFF) {
+ Tcl_AppendResult(interp, "couldn't open socket: port number too high",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ if (*portPtr < 0) {
+ Tcl_AppendResult(interp, "couldn't open socket: negative port number",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+ }
+ for (portInfoPtr = portServices; portInfoPtr->name != NULL; portInfoPtr++) {
+ if (!strcmp(portInfoPtr->name, string)) {
+ break;
+ }
+ }
+ if (portInfoPtr != NULL && portInfoPtr->name != NULL) {
+ *portPtr = portInfoPtr->port;
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ClearZombieSockets --
+ *
+ * This procedure looks through the socket list and removes the
+ * first stream it finds that is ready for release. This procedure
+ * should be called before we ever try to create new Tcp streams
+ * to ensure we can least allocate one stream.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Tcp streams may be released.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ClearZombieSockets()
+{
+ TcpState *statePtr;
+
+ for (statePtr = socketList; statePtr != NULL;
+ statePtr = statePtr->nextPtr) {
+ if (statePtr->flags & TCP_RELEASE) {
+ SocketFreeProc(statePtr);
+ return;
+ }
+ }
+}
diff --git a/mac/tclMacTest.c b/mac/tclMacTest.c
new file mode 100644
index 0000000..2452ca1
--- /dev/null
+++ b/mac/tclMacTest.c
@@ -0,0 +1,242 @@
+/*
+ * tclMacTest.c --
+ *
+ * Contains commands for platform specific tests for
+ * the Macintosh platform.
+ *
+ * Copyright (c) 1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacTest.c 1.9 97/09/09 16:36:37
+ */
+
+#define TCL_TEST
+
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include "tclMacPort.h"
+#include "Files.h"
+#include <Errors.h>
+#include <Resources.h>
+#include <Script.h>
+#include <Strings.h>
+#include <FSpCompat.h>
+
+/*
+ * Forward declarations of procedures defined later in this file:
+ */
+
+int TclplatformtestInit _ANSI_ARGS_((Tcl_Interp *interp));
+static int DebuggerCmd _ANSI_ARGS_((ClientData dummy,
+ Tcl_Interp *interp, int argc, char **argv));
+static int WriteTextResource _ANSI_ARGS_((ClientData dummy,
+ Tcl_Interp *interp, int argc, char **argv));
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclplatformtestInit --
+ *
+ * Defines commands that test platform specific functionality for
+ * Unix platforms.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Defines new commands.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclplatformtestInit(
+ Tcl_Interp *interp) /* Interpreter to add commands to. */
+{
+ /*
+ * Add commands for platform specific tests on MacOS here.
+ */
+
+ Tcl_CreateCommand(interp, "debugger", DebuggerCmd,
+ (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateCommand(interp, "testWriteTextResource", WriteTextResource,
+ (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DebuggerCmd --
+ *
+ * This procedure simply calls the low level debugger.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+DebuggerCmd(
+ ClientData clientData, /* Not used. */
+ Tcl_Interp *interp, /* Not used. */
+ int argc, /* Not used. */
+ char **argv) /* Not used. */
+{
+ Debugger();
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WriteTextResource --
+ *
+ * This procedure will write a text resource out to the
+ * application or a given file. The format for this command is
+ * textwriteresource
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+WriteTextResource(
+ ClientData clientData, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ char **argv) /* Argument strings. */
+{
+ char *errNum = "wrong # args: ";
+ char *errBad = "bad argument: ";
+ char *errStr;
+ char *fileName = NULL, *rsrcName = NULL;
+ char *data = NULL;
+ int rsrcID = -1, i, protectIt = 0;
+ short fileRef = -1;
+ OSErr err;
+ Handle dataHandle;
+ Str255 resourceName;
+ FSSpec fileSpec;
+
+ /*
+ * Process the arguments.
+ */
+ for (i = 1 ; i < argc ; i++) {
+ if (!strcmp(argv[i], "-rsrc")) {
+ rsrcName = argv[i + 1];
+ i++;
+ } else if (!strcmp(argv[i], "-rsrcid")) {
+ rsrcID = atoi(argv[i + 1]);
+ i++;
+ } else if (!strcmp(argv[i], "-file")) {
+ fileName = argv[i + 1];
+ i++;
+ } else if (!strcmp(argv[i], "-protected")) {
+ protectIt = 1;
+ } else {
+ data = argv[i];
+ }
+ }
+
+ if ((rsrcName == NULL && rsrcID < 0) ||
+ (fileName == NULL) || (data == NULL)) {
+ errStr = errBad;
+ goto sourceFmtErr;
+ }
+
+ /*
+ * Open the resource file.
+ */
+ err = FSpLocationFromPath(strlen(fileName), fileName, &fileSpec);
+ if (!(err == noErr || err == fnfErr)) {
+ Tcl_AppendResult(interp, "couldn't validate file name", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (err == fnfErr) {
+ FSpCreateResFile(&fileSpec, 'WIsH', 'rsrc', smSystemScript);
+ }
+ fileRef = FSpOpenResFile(&fileSpec, fsRdWrPerm);
+ if (fileRef == -1) {
+ Tcl_AppendResult(interp, "couldn't open resource file", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ UseResFile(fileRef);
+
+ /*
+ * Prepare data needed to create resource.
+ */
+ if (rsrcID < 0) {
+ rsrcID = UniqueID('TEXT');
+ }
+
+ strcpy((char *) resourceName, rsrcName);
+ c2pstr((char *) resourceName);
+
+ dataHandle = NewHandle(strlen(data) + 1);
+ HLock(dataHandle);
+ strcpy(*dataHandle, data);
+ HUnlock(dataHandle);
+
+ /*
+ * Add the resource to the file and close it.
+ */
+ AddResource(dataHandle, 'TEXT', rsrcID, resourceName);
+
+ UpdateResFile(fileRef);
+ if (protectIt) {
+ SetResAttrs(Get1Resource('TEXT', rsrcID), resProtected);
+ }
+
+ CloseResFile(fileRef);
+ return TCL_OK;
+
+ sourceFmtErr:
+ Tcl_AppendResult(interp, errStr, "error in \"", argv[0], "\"",
+ (char *) NULL);
+ return TCL_ERROR;
+}
+
+int
+TclMacChmod(
+ char *path,
+ int mode)
+{
+ HParamBlockRec hpb;
+ OSErr err;
+
+ c2pstr(path);
+ hpb.fileParam.ioNamePtr = (unsigned char *) path;
+ hpb.fileParam.ioVRefNum = 0;
+ hpb.fileParam.ioDirID = 0;
+
+ if (mode & 0200) {
+ err = PBHRstFLockSync(&hpb);
+ } else {
+ err = PBHSetFLockSync(&hpb);
+ }
+ p2cstr((unsigned char *) path);
+
+ if (err != noErr) {
+ errno = TclMacOSErrorToPosixError(err);
+ return -1;
+ }
+
+ return 0;
+}
+
diff --git a/mac/tclMacTime.c b/mac/tclMacTime.c
new file mode 100644
index 0000000..e5b6a1f
--- /dev/null
+++ b/mac/tclMacTime.c
@@ -0,0 +1,312 @@
+/*
+ * tclMacTime.c --
+ *
+ * Contains Macintosh specific versions of Tcl functions that
+ * obtain time values from the operating system.
+ *
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacTime.c 1.19 97/06/27 13:07:10
+ */
+
+#include "tclInt.h"
+#include "tclPort.h"
+#include <OSUtils.h>
+#include <Timer.h>
+#include <time.h>
+
+/*
+ * Static variables used by the TclpGetTime function.
+ */
+
+static int initalized = false;
+static unsigned long baseSeconds;
+static UnsignedWide microOffset;
+
+/*
+ * Prototypes for procedures that are private to this file:
+ */
+
+static void SubtractUnsignedWide _ANSI_ARGS_((UnsignedWide *x,
+ UnsignedWide *y, UnsignedWide *result));
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * TclpGetSeconds --
+ *
+ * This procedure returns the number of seconds from the epoch. On
+ * the Macintosh the epoch is Midnight Jan 1, 1904. Unfortunatly,
+ * the Macintosh doesn't tie the epoch to a particular time zone. For
+ * Tcl we tie the epoch to GMT. This makes the time zone date parsing
+ * code work. The epoch for Mac-Tcl is: Midnight Jan 1, 1904 GMT.
+ *
+ * Results:
+ * Number of seconds from the epoch in GMT.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+unsigned long
+TclpGetSeconds()
+{
+ unsigned long seconds;
+ MachineLocation loc;
+ long int offset;
+
+ ReadLocation(&loc);
+ offset = loc.u.gmtDelta & 0x00ffffff;
+ if (offset & 0x00800000) {
+ offset = offset | 0xff000000;
+ }
+
+ if (ReadDateTime(&seconds) == noErr) {
+ return (seconds - offset);
+ } else {
+ panic("Can't get time.");
+ return 0;
+ }
+}
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * TclpGetClicks --
+ *
+ * This procedure returns a value that represents the highest resolution
+ * clock available on the system. There are no garantees on what the
+ * resolution will be. In Tcl we will call this value a "click". The
+ * start time is also system dependant.
+ *
+ * Results:
+ * Number of clicks from some start time.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+unsigned long
+TclpGetClicks()
+{
+ UnsignedWide micros;
+
+ Microseconds(&micros);
+ return micros.lo;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpGetTimeZone --
+ *
+ * Get the current time zone.
+ *
+ * Results:
+ * The return value is the local time zone, measured in
+ * minutes away from GMT (-ve for east, +ve for west).
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclpGetTimeZone (
+ unsigned long currentTime) /* Ignored on Mac. */
+{
+ MachineLocation loc;
+ long int offset;
+
+ ReadLocation(&loc);
+ offset = loc.u.gmtDelta & 0x00ffffff;
+ if (offset & 0x00700000) {
+ offset |= 0xff000000;
+ }
+
+ /*
+ * Convert the Mac offset from seconds to minutes and
+ * add an hour if we have daylight savings time.
+ */
+ offset = -offset;
+ offset /= 60;
+ if (loc.u.dlsDelta < 0) {
+ offset += 60;
+ }
+
+ return offset;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpGetTime --
+ *
+ * Gets the current system time in seconds and microseconds
+ * since the beginning of the epoch: 00:00 UCT, January 1, 1970.
+ *
+ * Results:
+ * Returns the current time (in the local timezone) in timePtr.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclpGetTime(
+ Tcl_Time *timePtr) /* Location to store time information. */
+{
+ UnsignedWide micro;
+#ifndef NO_LONG_LONG
+ long long *microPtr;
+#endif
+
+ if (initalized == false) {
+ MachineLocation loc;
+ long int offset;
+
+ ReadLocation(&loc);
+ offset = loc.u.gmtDelta & 0x00ffffff;
+ if (offset & 0x00800000) {
+ offset = offset | 0xff000000;
+ }
+ if (ReadDateTime(&baseSeconds) != noErr) {
+ /*
+ * This should never happen!
+ */
+ return;
+ }
+ /*
+ * Remove the local offset that ReadDateTime() adds.
+ */
+ baseSeconds -= offset;
+ Microseconds(&microOffset);
+ initalized = true;
+ }
+
+ Microseconds(&micro);
+
+#ifndef NO_LONG_LONG
+ microPtr = (long long *) &micro;
+ *microPtr -= *((long long *) &microOffset);
+ timePtr->sec = baseSeconds + (*microPtr / 1000000);
+ timePtr->usec = *microPtr % 1000000;
+#else
+ SubtractUnsignedWide(&micro, &microOffset, &micro);
+
+ /*
+ * This lovely computation is equal to: base + (micro / 1000000)
+ * For the .hi part the ratio of 0x100000000 / 1000000 has been
+ * reduced to avoid overflow. This computation certainly has
+ * problems as the .hi part gets large. However, your application
+ * would have to run for a long time to make that happen.
+ */
+
+ timePtr->sec = baseSeconds + (micro.lo / 1000000) +
+ (long) (micro.hi * ((double) 33554432.0 / 15625.0));
+ timePtr->usec = micro.lo % 1000000;
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclpGetDate --
+ *
+ * Converts raw seconds to a struct tm data structure. The
+ * returned time will be for Greenwich Mean Time if the useGMT flag
+ * is set. Otherwise, the returned time will be for the local
+ * time zone. This function is meant to be used as a replacement
+ * for localtime and gmtime which is broken on most ANSI libs
+ * on the Macintosh.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The passed in struct tm data structure is modified.
+ *
+ *----------------------------------------------------------------------
+ */
+
+struct tm *
+TclpGetDate(
+ const time_t *tp, /* Time struct to fill. */
+ int useGMT) /* True if date should reflect GNT time. */
+{
+ DateTimeRec dtr;
+ MachineLocation loc;
+ long int offset;
+ static struct tm statictime;
+ static const short monthday[12] =
+ {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
+
+ ReadLocation(&loc);
+
+ if (useGMT) {
+ SecondsToDate(*tp, &dtr);
+ } else {
+ offset = loc.u.gmtDelta & 0x00ffffff;
+ if (offset & 0x00700000) {
+ offset |= 0xff000000;
+ }
+
+ SecondsToDate(*tp + offset, &dtr);
+ }
+
+ statictime.tm_sec = dtr.second;
+ statictime.tm_min = dtr.minute;
+ statictime.tm_hour = dtr.hour;
+ statictime.tm_mday = dtr.day;
+ statictime.tm_mon = dtr.month - 1;
+ statictime.tm_year = dtr.year - 1900;
+ statictime.tm_wday = dtr.dayOfWeek - 1;
+ statictime.tm_yday = monthday[statictime.tm_mon]
+ + statictime.tm_mday - 1;
+ if (1 < statictime.tm_mon && !(statictime.tm_year & 3)) {
+ ++statictime.tm_yday;
+ }
+ statictime.tm_isdst = loc.u.dlsDelta;
+ return(&statictime);
+}
+
+#ifdef NO_LONG_LONG
+/*
+ *----------------------------------------------------------------------
+ *
+ * SubtractUnsignedWide --
+ *
+ * Subtracts one UnsignedWide value from another.
+ *
+ * Results:
+ * The subtracted value.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+SubtractUnsignedWide(
+ UnsignedWide *x, /* Ptr to wide int. */
+ UnsignedWide *y, /* Ptr to wide int. */
+ UnsignedWide *result) /* Ptr to result. */
+{
+ result->hi = x->hi - y->hi;
+ if (x->lo < y->lo) {
+ result->hi--;
+ }
+ result->lo = x->lo - y->lo;
+}
+#endif
diff --git a/mac/tclMacUnix.c b/mac/tclMacUnix.c
new file mode 100644
index 0000000..e820fc0
--- /dev/null
+++ b/mac/tclMacUnix.c
@@ -0,0 +1,464 @@
+/*
+ * tclMacUnix.c --
+ *
+ * This file contains routines to implement several features
+ * available to the Unix implementation, but that require
+ * extra work to do on a Macintosh. These include routines
+ * Unix Tcl normally hands off to the Unix OS.
+ *
+ * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
+ * Copyright (c) 1994-1996 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacUnix.c 1.56 96/12/12 19:38:08
+ */
+
+#include <Files.h>
+#include <Strings.h>
+#include <TextUtils.h>
+#include <Finder.h>
+#include <FSpCompat.h>
+#include <Aliases.h>
+#include <Errors.h>
+
+#include "tclInt.h"
+#include "tclMacInt.h"
+
+/*
+ * The following two Includes are from the More Files package
+ */
+#include "FileCopy.h"
+#include "MoreFiles.h"
+#include "MoreFilesExtras.h"
+
+/*
+ * The following may not be defined in some versions of
+ * MPW header files.
+ */
+#ifndef kIsInvisible
+#define kIsInvisible 0x4000
+#endif
+#ifndef kIsAlias
+#define kIsAlias 0x8000
+#endif
+
+/*
+ * Missing error codes
+ */
+#define usageErr 500
+#define noSourceErr 501
+#define isDirErr 502
+
+/*
+ * Static functions in this file.
+ */
+
+static int GlobArgs _ANSI_ARGS_((Tcl_Interp *interp,
+ int *argc, char ***argv));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GlobArgs --
+ *
+ * The following function was taken from Peter Keleher's Alpha
+ * Editor. *argc should only count the end arguments that should
+ * be globed. argv should be incremented to point to the first
+ * arg to be globed.
+ *
+ * Results:
+ * Returns 'true' if it worked & memory was allocated, else 'false'.
+ *
+ * Side effects:
+ * argv will be alloced, the call will need to release the memory
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+GlobArgs(
+ Tcl_Interp *interp, /* Tcl interpreter. */
+ int *argc, /* Number of arguments. */
+ char ***argv) /* Argument strings. */
+{
+ int res, len;
+ char *list;
+
+ /*
+ * Places the globbed args all into 'interp->result' as a list.
+ */
+ res = Tcl_GlobCmd(NULL, interp, *argc + 1, *argv - 1);
+ if (res != TCL_OK) {
+ return false;
+ }
+ len = strlen(interp->result);
+ list = (char *) ckalloc(len + 1);
+ strcpy(list, interp->result);
+ Tcl_ResetResult(interp);
+
+ res = Tcl_SplitList(interp, list, argc, argv);
+ ckfree((char *) list);
+ if (res != TCL_OK) {
+ return false;
+ }
+ return true;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_EchoCmd --
+ *
+ * Implements the TCL echo command:
+ * echo ?str ...?
+ *
+ * Results:
+ * Always returns TCL_OK.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_EchoCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ char **argv) /* Argument strings. */
+{
+ Tcl_Channel chan;
+ int mode, result, i;
+
+ chan = Tcl_GetChannel(interp, "stdout", &mode);
+ if (chan == (Tcl_Channel) NULL) {
+ return TCL_ERROR;
+ }
+ for (i = 1; i < argc; i++) {
+ result = Tcl_Write(chan, argv[i], -1);
+ if (result < 0) {
+ Tcl_AppendResult(interp, "echo: ", Tcl_GetChannelName(chan),
+ ": ", Tcl_PosixError(interp), (char *) NULL);
+ return TCL_ERROR;
+ }
+ if (i < (argc - 1)) {
+ Tcl_Write(chan, " ", -1);
+ }
+ }
+ Tcl_Write(chan, "\n", -1);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_LsCmd --
+ *
+ * This procedure is invoked to process the "ls" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+int
+Tcl_LsCmd(
+ ClientData dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int argc, /* Number of arguments. */
+ char **argv) /* Argument strings. */
+{
+#define STRING_LENGTH 80
+#define CR '\n'
+ int i, j;
+ int fieldLength, len = 0, maxLen = 0, perLine;
+ char **origArgv = argv;
+ OSErr err;
+ CInfoPBRec paramBlock;
+ HFileInfo *hpb = (HFileInfo *)&paramBlock;
+ DirInfo *dpb = (DirInfo *)&paramBlock;
+ char theFile[256];
+ char theLine[STRING_LENGTH + 2];
+ int fFlag = false, pFlag = false, aFlag = false, lFlag = false,
+ cFlag = false, hFlag = false;
+
+ /*
+ * Process command flags. End if argument doesn't start
+ * with a dash or is a dash by itself. The remaining arguments
+ * should be files.
+ */
+ for (i = 1; i < argc; i++) {
+ if (argv[i][0] != '-') {
+ break;
+ }
+
+ if (!strcmp(argv[i], "-")) {
+ i++;
+ break;
+ }
+
+ for (j = 1 ; argv[i][j] ; ++j) {
+ switch(argv[i][j]) {
+ case 'a':
+ case 'A':
+ aFlag = true;
+ break;
+ case '1':
+ cFlag = false;
+ break;
+ case 'C':
+ cFlag = true;
+ break;
+ case 'F':
+ fFlag = true;
+ break;
+ case 'H':
+ hFlag = true;
+ break;
+ case 'p':
+ pFlag = true;
+ break;
+ case 'l':
+ pFlag = false;
+ lFlag = true;
+ break;
+ default:
+ Tcl_AppendResult(interp, "error - unknown flag ",
+ "usage: ls -apCFHl1 ?files? ", NULL);
+ return TCL_ERROR;
+ }
+ }
+ }
+
+ argv += i;
+ argc -= i;
+
+ /*
+ * No file specifications means we search for all files.
+ * Glob will be doing most of the work.
+ */
+ if (!argc) {
+ argc = 1;
+ argv = origArgv;
+ strcpy(argv[0], "*");
+ }
+
+ if (!GlobArgs(interp, &argc, &argv)) {
+ Tcl_ResetResult(interp);
+ return TCL_ERROR;
+ }
+
+ /*
+ * There are two major methods for listing files: the long
+ * method and the normal method.
+ */
+ if (lFlag) {
+ char creator[5], type[5], time[16], date[16];
+ char lineTag;
+ long size;
+ unsigned short flags;
+
+ /*
+ * Print the header for long listing.
+ */
+ if (hFlag) {
+ sprintf(theLine, "T %7s %8s %8s %4s %4s %6s %s",
+ "Size", "ModTime", "ModDate",
+ "CRTR", "TYPE", "Flags", "Name");
+ Tcl_AppendResult(interp, theLine, "\n", NULL);
+ Tcl_AppendResult(interp,
+ "-------------------------------------------------------------\n",
+ NULL);
+ }
+
+ for (i = 0; i < argc; i++) {
+ strcpy(theFile, argv[i]);
+
+ c2pstr(theFile);
+ hpb->ioCompletion = NULL;
+ hpb->ioVRefNum = 0;
+ hpb->ioFDirIndex = 0;
+ hpb->ioNamePtr = (StringPtr) theFile;
+ hpb->ioDirID = 0L;
+ err = PBGetCatInfoSync(&paramBlock);
+ p2cstr((StringPtr) theFile);
+
+ if (hpb->ioFlAttrib & 16) {
+ /*
+ * For directories use zero as the size, use no Creator
+ * type, and use 'DIR ' as the file type.
+ */
+ if ((aFlag == false) && (dpb->ioDrUsrWds.frFlags & 0x1000)) {
+ continue;
+ }
+ lineTag = 'D';
+ size = 0;
+ IUTimeString(dpb->ioDrMdDat, false, (unsigned char *)time);
+ p2cstr((StringPtr)time);
+ IUDateString(dpb->ioDrMdDat, shortDate, (unsigned char *)date);
+ p2cstr((StringPtr)date);
+ strcpy(creator, " ");
+ strcpy(type, "DIR ");
+ flags = dpb->ioDrUsrWds.frFlags;
+ if (fFlag || pFlag) {
+ strcat(theFile, ":");
+ }
+ } else {
+ /*
+ * All information for files should be printed. This
+ * includes size, modtime, moddate, creator type, file
+ * type, flags, anf file name.
+ */
+ if ((aFlag == false) &&
+ (hpb->ioFlFndrInfo.fdFlags & kIsInvisible)) {
+ continue;
+ }
+ lineTag = 'F';
+ size = hpb->ioFlLgLen + hpb->ioFlRLgLen;
+ IUTimeString(hpb->ioFlMdDat, false, (unsigned char *)time);
+ p2cstr((StringPtr)time);
+ IUDateString(hpb->ioFlMdDat, shortDate, (unsigned char *)date);
+ p2cstr((StringPtr)date);
+ strncpy(creator, (char *) &hpb->ioFlFndrInfo.fdCreator, 4);
+ creator[4] = 0;
+ strncpy(type, (char *) &hpb->ioFlFndrInfo.fdType, 4);
+ type[4] = 0;
+ flags = hpb->ioFlFndrInfo.fdFlags;
+ if (fFlag) {
+ if (hpb->ioFlFndrInfo.fdFlags & kIsAlias) {
+ strcat(theFile, "@");
+ } else if (hpb->ioFlFndrInfo.fdType == 'APPL') {
+ strcat(theFile, "*");
+ }
+ }
+ }
+
+ sprintf(theLine, "%c %7ld %8s %8s %-4.4s %-4.4s 0x%4.4X %s",
+ lineTag, size, time, date, creator, type, flags, theFile);
+
+ Tcl_AppendResult(interp, theLine, "\n", NULL);
+
+ }
+
+ if ((interp->result != NULL) && (*(interp->result) != '\0')) {
+ int slen = strlen(interp->result);
+ if (interp->result[slen - 1] == '\n') {
+ interp->result[slen - 1] = '\0';
+ }
+ }
+ } else {
+ /*
+ * Not in long format. We only print files names. If the
+ * -C flag is set we need to print in multiple coloumns.
+ */
+ int argCount, linePos;
+ Boolean needNewLine = false;
+
+ /*
+ * Fiend the field length: the length each string printed
+ * to the terminal will be.
+ */
+ if (!cFlag) {
+ perLine = 1;
+ fieldLength = STRING_LENGTH;
+ } else {
+ for (i = 0; i < argc; i++) {
+ len = strlen(argv[i]);
+ if (len > maxLen) {
+ maxLen = len;
+ }
+ }
+ fieldLength = maxLen + 3;
+ perLine = STRING_LENGTH / fieldLength;
+ }
+
+ argCount = 0;
+ linePos = 0;
+ memset(theLine, ' ', STRING_LENGTH);
+ while (argCount < argc) {
+ strcpy(theFile, argv[argCount]);
+
+ c2pstr(theFile);
+ hpb->ioCompletion = NULL;
+ hpb->ioVRefNum = 0;
+ hpb->ioFDirIndex = 0;
+ hpb->ioNamePtr = (StringPtr) theFile;
+ hpb->ioDirID = 0L;
+ err = PBGetCatInfoSync(&paramBlock);
+ p2cstr((StringPtr) theFile);
+
+ if (hpb->ioFlAttrib & 16) {
+ /*
+ * Directory. If -a show hidden files. If -f or -p
+ * denote that this is a directory.
+ */
+ if ((aFlag == false) && (dpb->ioDrUsrWds.frFlags & 0x1000)) {
+ argCount++;
+ continue;
+ }
+ if (fFlag || pFlag) {
+ strcat(theFile, ":");
+ }
+ } else {
+ /*
+ * File: If -a show hidden files, if -f show links
+ * (aliases) and executables (APPLs).
+ */
+ if ((aFlag == false) &&
+ (hpb->ioFlFndrInfo.fdFlags & kIsInvisible)) {
+ argCount++;
+ continue;
+ }
+ if (fFlag) {
+ if (hpb->ioFlFndrInfo.fdFlags & kIsAlias) {
+ strcat(theFile, "@");
+ } else if (hpb->ioFlFndrInfo.fdType == 'APPL') {
+ strcat(theFile, "*");
+ }
+ }
+ }
+
+ /*
+ * Print the item, taking into account multi-
+ * coloum output.
+ */
+ strncpy(theLine + (linePos * fieldLength), theFile,
+ strlen(theFile));
+ linePos++;
+
+ if (linePos == perLine) {
+ theLine[STRING_LENGTH] = '\0';
+ if (needNewLine) {
+ Tcl_AppendResult(interp, "\n", theLine, NULL);
+ } else {
+ Tcl_AppendResult(interp, theLine, NULL);
+ needNewLine = true;
+ }
+ linePos = 0;
+ memset(theLine, ' ', STRING_LENGTH);
+ }
+
+ argCount++;
+ }
+
+ if (linePos != 0) {
+ theLine[STRING_LENGTH] = '\0';
+ if (needNewLine) {
+ Tcl_AppendResult(interp, "\n", theLine, NULL);
+ } else {
+ Tcl_AppendResult(interp, theLine, NULL);
+ }
+ }
+ }
+
+ ckfree((char *) argv);
+
+ return TCL_OK;
+}
diff --git a/mac/tclMacUtil.c b/mac/tclMacUtil.c
new file mode 100644
index 0000000..254cfb8
--- /dev/null
+++ b/mac/tclMacUtil.c
@@ -0,0 +1,441 @@
+/*
+ * tclMacUtil.c --
+ *
+ * This contains utility functions used to help with
+ * implementing Macintosh specific portions of the Tcl port.
+ *
+ * Copyright (c) 1993-1994 Lockheed Missle & Space Company, AI Center
+ * Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * SCCS: @(#) tclMacUtil.c 1.53 97/07/30 16:46:16
+ */
+
+#include "tcl.h"
+#include "tclInt.h"
+#include "tclMacInt.h"
+#include "tclMath.h"
+#include "tclMacPort.h"
+
+#include <Aliases.h>
+#include <Errors.h>
+#include <Files.h>
+#include <Folders.h>
+#include <FSpCompat.h>
+#include <Strings.h>
+#include <TextUtils.h>
+#include <MoreFilesExtras.h>
+
+/*
+ * The following two Includes are from the More Files package.
+ */
+#include <FileCopy.h>
+#include <MoreFiles.h>
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * hypotd --
+ *
+ * The standard math function hypot is not supported by Think C.
+ * It is included here so everything works. It is supported by
+ * CodeWarrior Pro 1, but the 68K version does not support doubles.
+ * So we hack it in.
+ *
+ * Results:
+ * Result of computation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+#if defined(THINK_C) || defined(__MWERKS__)
+double hypotd(double x, double y);
+
+double
+hypotd(
+ double x, /* X value */
+ double y) /* Y value */
+{
+ double sum;
+
+ sum = x*x + y*y;
+ return sqrt(sum);
+}
+#endif
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FSpGetDefaultDir --
+ *
+ * This function gets the current default directory.
+ *
+ * Results:
+ * The provided FSSpec is changed to point to the "default"
+ * directory. The function returns what ever errors
+ * FSMakeFSSpecCompat may encounter.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+FSpGetDefaultDir(
+ FSSpecPtr dirSpec) /* On return the default directory. */
+{
+ OSErr err;
+ short vRefNum = 0;
+ long int dirID = 0;
+
+ err = HGetVol(NULL, &vRefNum, &dirID);
+
+ if (err == noErr) {
+ err = FSMakeFSSpecCompat(vRefNum, dirID, (ConstStr255Param) NULL,
+ dirSpec);
+ }
+
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FSpSetDefaultDir --
+ *
+ * This function sets the default directory to the directory
+ * pointed to by the provided FSSpec.
+ *
+ * Results:
+ * The function returns what ever errors HSetVol may encounter.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+FSpSetDefaultDir(
+ FSSpecPtr dirSpec) /* The new default directory. */
+{
+ OSErr err;
+
+ /*
+ * The following special case is needed to work around a bug
+ * in the Macintosh OS. (Acutally PC Exchange.)
+ */
+
+ if (dirSpec->parID == fsRtParID) {
+ err = HSetVol(NULL, dirSpec->vRefNum, fsRtDirID);
+ } else {
+ err = HSetVol(dirSpec->name, dirSpec->vRefNum, dirSpec->parID);
+ }
+
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FSpFindFolder --
+ *
+ * This function is a version of the FindFolder function that
+ * returns the result as a FSSpec rather than a vRefNum and dirID.
+ *
+ * Results:
+ * Results will be simaler to that of the FindFolder function.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+OSErr
+FSpFindFolder(
+ short vRefNum, /* Volume reference number. */
+ OSType folderType, /* Folder type taken by FindFolder. */
+ Boolean createFolder, /* Should we create it if non-existant. */
+ FSSpec *spec) /* Pointer to resulting directory. */
+{
+ short foundVRefNum;
+ long foundDirID;
+ OSErr err;
+
+ err = FindFolder(vRefNum, folderType, createFolder,
+ &foundVRefNum, &foundDirID);
+ if (err != noErr) {
+ return err;
+ }
+
+ err = FSMakeFSSpecCompat(foundVRefNum, foundDirID, "\p", spec);
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FSpLocationFromPath --
+ *
+ * This function obtains an FSSpec for a given macintosh path.
+ * Unlike the More Files function FSpLocationFromFullPath, this
+ * function will also accept partial paths and resolve any aliases
+ * along the path.
+ *
+ * Results:
+ * OSErr code.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+FSpLocationFromPath(
+ int length, /* Length of path. */
+ char *path, /* The path to convert. */
+ FSSpecPtr fileSpecPtr) /* On return the spec for the path. */
+{
+ Str255 fileName;
+ OSErr err;
+ short vRefNum;
+ long dirID;
+ int pos, cur;
+ Boolean isDirectory;
+ Boolean wasAlias;
+
+ /*
+ * Check to see if this is a full path. If partial
+ * we assume that path starts with the current working
+ * directory. (Ie. volume & dir = 0)
+ */
+ vRefNum = 0;
+ dirID = 0;
+ cur = 0;
+ if (length == 0) {
+ return fnfErr;
+ }
+ if (path[cur] == ':') {
+ cur++;
+ if (cur >= length) {
+ /*
+ * If path = ":", just return current directory.
+ */
+ FSMakeFSSpecCompat(0, 0, NULL, fileSpecPtr);
+ return noErr;
+ }
+ } else {
+ while (path[cur] != ':' && cur < length) {
+ cur++;
+ }
+ if (cur > 255) {
+ return bdNamErr;
+ }
+ if (cur < length) {
+ /*
+ * This is a full path
+ */
+ cur++;
+ strncpy((char *) fileName + 1, path, cur);
+ fileName[0] = cur;
+ err = FSMakeFSSpecCompat(0, 0, fileName, fileSpecPtr);
+ if (err != noErr) return err;
+ FSpGetDirectoryID(fileSpecPtr, &dirID, &isDirectory);
+ vRefNum = fileSpecPtr->vRefNum;
+ } else {
+ cur = 0;
+ }
+ }
+
+ isDirectory = 1;
+ while (cur < length) {
+ if (!isDirectory) {
+ return dirNFErr;
+ }
+ pos = cur;
+ while (path[pos] != ':' && pos < length) {
+ pos++;
+ }
+ if (pos == cur) {
+ /* Move up one dir */
+ /* cur++; */
+ strcpy((char *) fileName + 1, "::");
+ fileName[0] = 2;
+ } else if (pos - cur > 255) {
+ return bdNamErr;
+ } else {
+ strncpy((char *) fileName + 1, &path[cur], pos - cur);
+ fileName[0] = pos - cur;
+ }
+ err = FSMakeFSSpecCompat(vRefNum, dirID, fileName, fileSpecPtr);
+ if (err != noErr) return err;
+ err = ResolveAliasFile(fileSpecPtr, true, &isDirectory, &wasAlias);
+ if (err != noErr) return err;
+ FSpGetDirectoryID(fileSpecPtr, &dirID, &isDirectory);
+ vRefNum = fileSpecPtr->vRefNum;
+ cur = pos;
+ if (path[cur] == ':') {
+ cur++;
+ }
+ }
+
+ return noErr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FSpPathFromLocation --
+ *
+ * This function obtains a full path name for a given macintosh
+ * FSSpec. Unlike the More Files function FSpGetFullPath, this
+ * function will return a C string in the Handle. It also will
+ * create paths for FSSpec that do not yet exist.
+ *
+ * Results:
+ * OSErr code.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+OSErr
+FSpPathFromLocation(
+ FSSpec *spec, /* The location we want a path for. */
+ int *length, /* Length of the resulting path. */
+ Handle *fullPath) /* Handle to path. */
+{
+ OSErr err;
+ FSSpec tempSpec;
+ CInfoPBRec pb;
+
+ *fullPath = NULL;
+
+ /*
+ * Make a copy of the input FSSpec that can be modified.
+ */
+ BlockMoveData(spec, &tempSpec, sizeof(FSSpec));
+
+ if (tempSpec.parID == fsRtParID) {
+ /*
+ * The object is a volume. Add a colon to make it a full
+ * pathname. Allocate a handle for it and we are done.
+ */
+ tempSpec.name[0] += 2;
+ tempSpec.name[tempSpec.name[0] - 1] = ':';
+ tempSpec.name[tempSpec.name[0]] = '\0';
+
+ err = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);
+ } else {
+ /*
+ * The object isn't a volume. Is the object a file or a directory?
+ */
+ pb.dirInfo.ioNamePtr = tempSpec.name;
+ pb.dirInfo.ioVRefNum = tempSpec.vRefNum;
+ pb.dirInfo.ioDrDirID = tempSpec.parID;
+ pb.dirInfo.ioFDirIndex = 0;
+ err = PBGetCatInfoSync(&pb);
+
+ if ((err == noErr) || (err == fnfErr)) {
+ /*
+ * If the file doesn't currently exist we start over. If the
+ * directory exists everything will work just fine. Otherwise we
+ * will just fail later. If the object is a directory, append a
+ * colon so full pathname ends with colon.
+ */
+ if (err == fnfErr) {
+ BlockMoveData(spec, &tempSpec, sizeof(FSSpec));
+ } else if ( (pb.hFileInfo.ioFlAttrib & ioDirMask) != 0 ) {
+ tempSpec.name[0] += 1;
+ tempSpec.name[tempSpec.name[0]] = ':';
+ }
+
+ /*
+ * Create a new Handle for the object - make it a C string.
+ */
+ tempSpec.name[0] += 1;
+ tempSpec.name[tempSpec.name[0]] = '\0';
+ err = PtrToHand(&tempSpec.name[1], fullPath, tempSpec.name[0]);
+ if (err == noErr) {
+ /*
+ * Get the ancestor directory names - loop until we have an
+ * error or find the root directory.
+ */
+ pb.dirInfo.ioNamePtr = tempSpec.name;
+ pb.dirInfo.ioVRefNum = tempSpec.vRefNum;
+ pb.dirInfo.ioDrParID = tempSpec.parID;
+ do {
+ pb.dirInfo.ioFDirIndex = -1;
+ pb.dirInfo.ioDrDirID = pb.dirInfo.ioDrParID;
+ err = PBGetCatInfoSync(&pb);
+ if (err == noErr) {
+ /*
+ * Append colon to directory name and add
+ * directory name to beginning of fullPath.
+ */
+ ++tempSpec.name[0];
+ tempSpec.name[tempSpec.name[0]] = ':';
+
+ (void) Munger(*fullPath, 0, NULL, 0, &tempSpec.name[1],
+ tempSpec.name[0]);
+ err = MemError();
+ }
+ } while ( (err == noErr) &&
+ (pb.dirInfo.ioDrDirID != fsRtDirID) );
+ }
+ }
+ }
+
+ /*
+ * On error Dispose the handle, set it to NULL & return the err.
+ * Otherwise, set the length & return.
+ */
+ if (err == noErr) {
+ *length = GetHandleSize(*fullPath) - 1;
+ } else {
+ if ( *fullPath != NULL ) {
+ DisposeHandle(*fullPath);
+ }
+ *fullPath = NULL;
+ *length = 0;
+ }
+
+ return err;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * GetGlobalMouse --
+ *
+ * This procedure obtains the current mouse position in global
+ * coordinates.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+GetGlobalMouse(
+ Point *mouse) /* Mouse position. */
+{
+ EventRecord event;
+
+ OSEventAvail(0, &event);
+ *mouse = event.where;
+}