diff options
author | hobbs <hobbs@noemail.net> | 2001-04-04 21:22:16 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-04-04 21:22:16 (GMT) |
commit | 6b748565746b65d4c9472b3e586b3b32fb5e1d8e (patch) | |
tree | 7149049c2fa3659f3eb9841e1b5ddb5081685820 /mac | |
parent | a276b3e2a401a4492a57332648594b02eeb475e6 (diff) | |
download | tcl-6b748565746b65d4c9472b3e586b3b32fb5e1d8e.zip tcl-6b748565746b65d4c9472b3e586b3b32fb5e1d8e.tar.gz tcl-6b748565746b65d4c9472b3e586b3b32fb5e1d8e.tar.bz2 |
* generic/tcl.h: addition of ConditionalMacros.h and use of
DLLIMPORT and DLLEXPORT.
* generic/tclIntPlatDecls.h:
* generic/tclInt.decls:
* generic/tclMain.c:
* generic/tclStubInit.c:
* generic/tclThreadTest.c: NewThread -> NewTestThread
* mac/MW_TclAppleScriptHeader.pch:
* mac/MW_TclHeader.pch:
* mac/MW_TclTestHeader.pch:
* mac/tclMac.h:
* mac/tclMacAppInit.c:
* mac/tclMacApplication.r:
* mac/tclMacChan.c: cast for *BlockMode
* mac/tclMacCommonPch.h:
* mac/tclMacFCmd.c:
* mac/tclMacInt.h:
* mac/tclMacLibrary.c:
* mac/tclMacLibrary.r:
* mac/tclMacMath.h:
* mac/tclMacNotify.c:
* mac/tclMacOSA.c:
* mac/tclMacOSA.r:
* mac/tclMacPanic.c:
* mac/tclMacPort.h:
* mac/tclMacResource.r:
* mac/tclMacSock.c: cast for *BlockMode
* mac/tclMacThrd.c:
* mac/tclMacUnix.c:
* mac/tclMacUtil.c: changed mac declarations to use Tcl ending,
fixed copyrights, updated headers, fixed comments, updated
resource files. Mac builds are now meant to be build with
MetroWerks CW 6.
FossilOrigin-Name: 7003b57ecaa2317b4f6286e3d6a5c58ca919a194
Diffstat (limited to 'mac')
-rw-r--r-- | mac/MW_TclAppleScriptHeader.pch | 13 | ||||
-rw-r--r-- | mac/MW_TclHeader.pch | 20 | ||||
-rwxr-xr-x | mac/MW_TclTestHeader.pch | 26 | ||||
-rw-r--r-- | mac/tclMac.h | 12 | ||||
-rw-r--r-- | mac/tclMacAppInit.c | 4 | ||||
-rw-r--r-- | mac/tclMacApplication.r | 8 | ||||
-rw-r--r-- | mac/tclMacChan.c | 6 | ||||
-rwxr-xr-x | mac/tclMacCommonPch.h | 23 | ||||
-rw-r--r-- | mac/tclMacFCmd.c | 4 | ||||
-rw-r--r-- | mac/tclMacInt.h | 24 | ||||
-rw-r--r-- | mac/tclMacLibrary.c | 11 | ||||
-rw-r--r-- | mac/tclMacLibrary.r | 10 | ||||
-rw-r--r-- | mac/tclMacMath.h | 4 | ||||
-rw-r--r-- | mac/tclMacNotify.c | 8 | ||||
-rw-r--r-- | mac/tclMacOSA.c | 8 | ||||
-rw-r--r-- | mac/tclMacOSA.r | 22 | ||||
-rw-r--r-- | mac/tclMacPanic.c | 7 | ||||
-rw-r--r-- | mac/tclMacPort.h | 23 | ||||
-rw-r--r-- | mac/tclMacResource.r | 37 | ||||
-rw-r--r-- | mac/tclMacSock.c | 4 | ||||
-rw-r--r-- | mac/tclMacThrd.c | 2 | ||||
-rw-r--r-- | mac/tclMacUnix.c | 4 | ||||
-rw-r--r-- | mac/tclMacUtil.c | 26 |
23 files changed, 142 insertions, 164 deletions
diff --git a/mac/MW_TclAppleScriptHeader.pch b/mac/MW_TclAppleScriptHeader.pch index 84b09fc..c924906 100644 --- a/mac/MW_TclAppleScriptHeader.pch +++ b/mac/MW_TclAppleScriptHeader.pch @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclAppleScriptHeader.pch,v 1.4 1999/05/11 07:11:46 jingham Exp $ + * RCS: @(#) $Id: MW_TclAppleScriptHeader.pch,v 1.4.12.1 2001/04/04 21:22:18 hobbs Exp $ */ /* @@ -33,15 +33,4 @@ #include "tclMacCommonPch.h" -/* #define TCL_REGISTER_LIBRARY 1 */ #define USE_TCL_STUBS - -/* - * 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 index 5253291..55fd75a 100644 --- a/mac/MW_TclHeader.pch +++ b/mac/MW_TclHeader.pch @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclHeader.pch,v 1.7 1999/05/11 07:11:48 jingham Exp $ + * RCS: @(#) $Id: MW_TclHeader.pch,v 1.7.12.1 2001/04/04 21:22:18 hobbs Exp $ */ /* @@ -30,20 +30,4 @@ #pragma precompile_target "MW_TclHeader68K" #endif -#include "tclMacCommonPch.h" - -/* - * 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" -#include "MoreFiles.h" -#include "MoreFilesExtras.h" - -#pragma export reset - +#include "MW_TclHeaderCommon.h" diff --git a/mac/MW_TclTestHeader.pch b/mac/MW_TclTestHeader.pch index ba588bb..41f0351 100755 --- a/mac/MW_TclTestHeader.pch +++ b/mac/MW_TclTestHeader.pch @@ -1,5 +1,5 @@ /* - * MW_TclHeader.pch -- + * MW_TclTestHeader.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 @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: MW_TclTestHeader.pch,v 1.1 2000/02/10 08:39:11 jingham Exp $ + * RCS: @(#) $Id: MW_TclTestHeader.pch,v 1.1.2.1 2001/04/04 21:22:18 hobbs Exp $ */ /* @@ -30,24 +30,12 @@ #pragma precompile_target "MW_TclTestHeader68K" #endif -#define TCL_DEBUG 1 - -/*#define TCL_THREADS 1*/ - -#include "tclMacCommonPch.h" +#define BUILD_tcl 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. - */ +#define STATIC_BUILD 1 -#pragma export on -#include "tcl.h" -#include "tclMac.h" -#include "tclInt.h" -#include "MoreFiles.h" -#include "MoreFilesExtras.h" +#define TCL_DEBUG 1 -#pragma export reset +#define TCL_THREADS 1 +#include "MW_TclHeaderCommon.h" diff --git a/mac/tclMac.h b/mac/tclMac.h index a051cc8..951dc47 100644 --- a/mac/tclMac.h +++ b/mac/tclMac.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMac.h,v 1.4 1999/03/10 05:52:51 stanton Exp $ + * RCS: @(#) $Id: tclMac.h,v 1.4.14.1 2001/04/04 21:22:18 hobbs Exp $ */ #ifndef _TCLMAC @@ -21,18 +21,8 @@ #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)); #include "tclPlatDecls.h" -#pragma export reset - #endif /* _TCLMAC */ diff --git a/mac/tclMacAppInit.c b/mac/tclMacAppInit.c index c4e4746..57f210c 100644 --- a/mac/tclMacAppInit.c +++ b/mac/tclMacAppInit.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacAppInit.c,v 1.5 1999/04/16 00:47:19 stanton Exp $ + * RCS: @(#) $Id: tclMacAppInit.c,v 1.5.12.1 2001/04/04 21:22:18 hobbs Exp $ */ #include "tcl.h" @@ -22,7 +22,7 @@ # include <console.h> #elif defined(__MWERKS__) # include <SIOUX.h> -short InstallConsole _ANSI_ARGS_((short fd)); +EXTERN short InstallConsole _ANSI_ARGS_((short fd)); #endif #ifdef TCL_TEST diff --git a/mac/tclMacApplication.r b/mac/tclMacApplication.r index f69b3b6..3b287e3 100644 --- a/mac/tclMacApplication.r +++ b/mac/tclMacApplication.r @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacApplication.r,v 1.3 1999/08/16 00:09:09 jingham Exp $ + * RCS: @(#) $Id: tclMacApplication.r,v 1.3.2.1 2001/04/04 21:22:18 hobbs Exp $ */ #include <Types.r> @@ -42,21 +42,21 @@ resource 'vers' (1) { TCL_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, TCL_PATCH_LEVEL, - TCL_PATCH_LEVEL ", by Ray Johnson & Jim Ingham Scriptics Inc" + TCL_PATCH_LEVEL ", by Ray Johnson & Jim Ingham" "\n" " 2000 Ajuba Solutions" }; resource 'vers' (2) { TCL_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, TCL_PATCH_LEVEL, - "Tcl Shell " TCL_PATCH_LEVEL " 1996-1997 Sun Microsystems, 1998-1999 Scriptics Inc" + "Tcl Shell " TCL_PATCH_LEVEL " 1993-2000" }; #define TCL_APP_CREATOR 'Tcl ' type TCL_APP_CREATOR as 'STR '; resource TCL_APP_CREATOR (0, purgeable) { - "Tcl Shell " TCL_PATCH_LEVEL " 1996-1999" + "Tcl Shell " TCL_PATCH_LEVEL " 1993-2000" }; /* diff --git a/mac/tclMacChan.c b/mac/tclMacChan.c index 2fbac8f..838d8dc 100644 --- a/mac/tclMacChan.c +++ b/mac/tclMacChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacChan.c,v 1.6 1999/04/16 00:47:19 stanton Exp $ + * RCS: @(#) $Id: tclMacChan.c,v 1.6.12.1 2001/04/04 21:22:19 hobbs Exp $ */ #include "tclInt.h" @@ -136,7 +136,7 @@ static int StdReady _ANSI_ARGS_((ClientData instanceData, static Tcl_ChannelType consoleChannelType = { "file", /* Type name. */ - StdIOBlockMode, /* Set blocking/nonblocking mode.*/ + (Tcl_ChannelTypeVersion)StdIOBlockMode, /* Set blocking/nonblocking mode.*/ StdIOClose, /* Close proc. */ StdIOInput, /* Input proc. */ StdIOOutput, /* Output proc. */ @@ -153,7 +153,7 @@ static Tcl_ChannelType consoleChannelType = { static Tcl_ChannelType fileChannelType = { "file", /* Type name. */ - FileBlockMode, /* Set blocking or + (Tcl_ChannelTypeVersion)FileBlockMode, /* Set blocking or * non-blocking mode.*/ FileClose, /* Close proc. */ FileInput, /* Input proc. */ diff --git a/mac/tclMacCommonPch.h b/mac/tclMacCommonPch.h index b06a494..c310340 100755 --- a/mac/tclMacCommonPch.h +++ b/mac/tclMacCommonPch.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacCommonPch.h,v 1.2 1998/11/11 07:46:04 jingham Exp $ + * RCS: @(#) $Id: tclMacCommonPch.h,v 1.2.22.1 2001/04/04 21:22:19 hobbs Exp $ */ #if !__option(enumsalwaysint) @@ -50,17 +50,6 @@ /* -* 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. */ @@ -75,14 +64,8 @@ #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. +* for Metrowerks Pro 6 MSL */ - -#define OLDROUTINENAMES 1 +#include <UseDLLPrefix.h> diff --git a/mac/tclMacFCmd.c b/mac/tclMacFCmd.c index a83011d..fc208b4 100644 --- a/mac/tclMacFCmd.c +++ b/mac/tclMacFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacFCmd.c,v 1.7 1999/10/15 04:47:03 jingham Exp $ + * RCS: @(#) $Id: tclMacFCmd.c,v 1.7.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #include "tclInt.h" @@ -748,7 +748,7 @@ DoCopyDirectory( err = FSpDirCreateCompat(&tmpDirSpec, smSystemScript, &tmpDirID); } if (err == noErr) { - err = FSpDirectoryCopy(&srcFileSpec, &tmpDirSpec, NULL, 0, true, + err = FSpDirectoryCopy(&srcFileSpec, &tmpDirSpec, NULL, NULL, 0, true, CopyErrHandler); } diff --git a/mac/tclMacInt.h b/mac/tclMacInt.h index 77d274c..ee10e37 100644 --- a/mac/tclMacInt.h +++ b/mac/tclMacInt.h @@ -8,24 +8,22 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacInt.h,v 1.6 1999/08/16 00:09:18 jingham Exp $ + * RCS: @(#) $Id: tclMacInt.h,v 1.6.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #ifndef _TCLMACINT #define _TCLMACINT -#ifndef _TCL -# include "tcl.h" +#ifndef _TCLINT +#include "tclInt.h" #endif -#ifndef _TCLMAC -# include "tclMac.h" +#ifndef _TCLPORT +#include "tclPort.h" #endif #include <Events.h> #include <Files.h> -#pragma export on - /* * Defines to control stack behavior. * @@ -46,6 +44,11 @@ #define TCL_MAC_STACK_THRESHOLD 16384 +#ifdef BUILD_tcl +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLEXPORT +#endif + /* * This flag is passed to TclMacRegisterResourceFork * by a file (usually a library) whose resource fork @@ -65,10 +68,9 @@ EXTERN char * TclMacGetFontEncoding _ANSI_ARGS_((int fontId)); EXTERN int TclMacHaveThreads(void); -#include "tclPort.h" -#include "tclPlatDecls.h" +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLIMPORT + #include "tclIntPlatDecls.h" -#pragma export reset - #endif /* _TCLMACINT */ diff --git a/mac/tclMacLibrary.c b/mac/tclMacLibrary.c index 989329f..486fc79 100644 --- a/mac/tclMacLibrary.c +++ b/mac/tclMacLibrary.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacLibrary.c,v 1.4 2000/02/10 09:59:10 jingham Exp $ + * RCS: @(#) $Id: tclMacLibrary.c,v 1.4.2.1 2001/04/04 21:22:19 hobbs Exp $ */ /* @@ -26,6 +26,15 @@ #include <Strings.h> #include "tclMacInt.h" +#if defined(TCL_REGISTER_LIBRARY) && defined(USE_TCL_STUBS) +#error "Can't use TCL_REGISTER_LIBRARY and USE_TCL_STUBS at the same time!" +/* + * Can't register a library with Tcl when using stubs in the current + * implementation, since Tcl_InitStubs hasn't been called yet + * when OpenLibraryResource is executing. + */ +#endif + /* * These function are not currently defined in any header file. The * only place they should be used is in the Initialization and diff --git a/mac/tclMacLibrary.r b/mac/tclMacLibrary.r index c526f17..018e61b 100644 --- a/mac/tclMacLibrary.r +++ b/mac/tclMacLibrary.r @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacLibrary.r,v 1.4 1999/08/16 00:09:22 jingham Exp $ + * RCS: @(#) $Id: tclMacLibrary.r,v 1.4.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #include <Types.r> @@ -42,14 +42,14 @@ resource 'vers' (1) { TCL_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, TCL_PATCH_LEVEL, - TCL_PATCH_LEVEL ", by Ray Johnson & Jim Ingham Scriptics Inc." + TCL_PATCH_LEVEL ", by Ray Johnson & Jim Ingham" "\n" " 2000 Ajuba Solutions" }; resource 'vers' (2) { TCL_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, TCL_PATCH_LEVEL, - "Tcl Library " TCL_PATCH_LEVEL " 1996-1997 Sun Microsystems, 1998-1999 Scriptics Inc." + "Tcl Library " TCL_PATCH_LEVEL " 1993-2000" }; /* @@ -96,7 +96,7 @@ resource 'FREF' (TCL_LIBRARY_RESOURCES, purgeable) type TCL_CREATOR as 'STR '; resource TCL_CREATOR (0, purgeable) { - "Tcl Library " TCL_PATCH_LEVEL " 1996-1999" + "Tcl Library " TCL_PATCH_LEVEL " 1993-2000" }; /* @@ -125,7 +125,7 @@ resource 'kind' (TCL_LIBRARY_RESOURCES, "Tcl kind", purgeable) { 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 " + "To work properly, it should be placed in the Tool Command Language folder " "within the Extensions folder." }; diff --git a/mac/tclMacMath.h b/mac/tclMacMath.h index 14af9a8..8f31ed2 100644 --- a/mac/tclMacMath.h +++ b/mac/tclMacMath.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacMath.h,v 1.2 1998/09/14 18:40:05 stanton Exp $ + * RCS: @(#) $Id: tclMacMath.h,v 1.2.18.1 2001/04/04 21:22:19 hobbs Exp $ */ #ifndef _TCLMACMATH @@ -135,7 +135,7 @@ #endif #endif -#if (defined(THINK_C) || defined(__MWERKS__)) +#if (defined(THINK_C)) #pragma export on double hypotd(double x, double y); #define hypot hypotd diff --git a/mac/tclMacNotify.c b/mac/tclMacNotify.c index 93820ba..ce70c95 100644 --- a/mac/tclMacNotify.c +++ b/mac/tclMacNotify.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacNotify.c,v 1.6 1999/08/10 04:21:40 jingham Exp $ + * RCS: @(#) $Id: tclMacNotify.c,v 1.6.10.1 2001/04/04 21:22:19 hobbs Exp $ */ #include "tclInt.h" @@ -266,7 +266,7 @@ HandleMacEvents(void) * system event queue unless we call WaitNextEvent. */ - GetGlobalMouse(¤tMouse); + GetGlobalMouseTcl(¤tMouse); if ((notifier.eventProcPtr != NULL) && !EqualPt(currentMouse, notifier.lastMousePosition)) { notifier.lastMousePosition = currentMouse; @@ -296,7 +296,7 @@ HandleMacEvents(void) */ while (needsUpdate || (GetEvQHdr()->qHead != NULL)) { - GetGlobalMouse(¤tMouse); + GetGlobalMouseTcl(¤tMouse); SetRect(&mouseRect, currentMouse.h, currentMouse.v, currentMouse.h + 1, currentMouse.v + 1); RectRgn(notifier.utilityRgn, &mouseRect); @@ -481,7 +481,7 @@ Tcl_WaitForEvent( * the current mouse position. */ - GetGlobalMouse(¤tMouse); + GetGlobalMouseTcl(¤tMouse); SetRect(&mouseRect, currentMouse.h, currentMouse.v, currentMouse.h + 1, currentMouse.v + 1); RectRgn(notifier.utilityRgn, &mouseRect); diff --git a/mac/tclMacOSA.c b/mac/tclMacOSA.c index 5036a8e..cd540e6 100644 --- a/mac/tclMacOSA.c +++ b/mac/tclMacOSA.c @@ -12,7 +12,7 @@ * See the file "License Terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSA.c,v 1.6 1999/12/21 23:58:13 hobbs Exp $ + * RCS: @(#) $Id: tclMacOSA.c,v 1.6.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #define MAC_TCL @@ -2120,7 +2120,7 @@ tclOSAStore( return TCL_ERROR; } - FSpCreateResFileCompat(&fileSpec, + FSpCreateResFileCompatTcl(&fileSpec, 'WiSH', 'osas', smSystemScript); myErr = ResError(); @@ -2132,7 +2132,7 @@ tclOSAStore( goto rezEvalCleanUp; } - fileRef = FSpOpenResFileCompat(&fileSpec, fsRdWrPerm); + fileRef = FSpOpenResFileCompatTcl(&fileSpec, fsRdWrPerm); if (fileRef == -1) { Tcl_AppendResult(interp, "Error reading the file: \"", fileName, "\".", NULL); @@ -2307,7 +2307,7 @@ tclOSALoad( return TCL_ERROR; } - fileRef = FSpOpenResFileCompat(&fileSpec, fsRdPerm); + fileRef = FSpOpenResFileCompatTcl(&fileSpec, fsRdPerm); if (fileRef == -1) { Tcl_AppendResult(interp, "Error reading the file: \"", fileName, "\".", NULL); diff --git a/mac/tclMacOSA.r b/mac/tclMacOSA.r index 7343764..dc7fc5f 100644 --- a/mac/tclMacOSA.r +++ b/mac/tclMacOSA.r @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacOSA.r,v 1.3 1999/08/16 00:09:26 jingham Exp $ + * RCS: @(#) $Id: tclMacOSA.r,v 1.3.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #include <Types.r> @@ -20,12 +20,12 @@ */ #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. */ +#define SCRIPT_MINOR_VERSION 1 /* Minor number */ +#define SCRIPT_RELEASE_SERIAL 0 /* Really minor number! */ +#define RELEASE_LEVEL final /* alpha, beta, or final */ +#define SCRIPT_VERSION "1.1" +#define SCRIPT_PATCH_LEVEL "1.1.0" +#define FINAL 1 /* Change to 1 if final version. */ #if FINAL # define MINOR_VERSION (SCRIPT_MINOR_VERSION * 16) + SCRIPT_RELEASE_SERIAL @@ -39,14 +39,14 @@ resource 'vers' (1) { SCRIPT_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, SCRIPT_PATCH_LEVEL, - SCRIPT_PATCH_LEVEL ", by Jim Ingham Cygnus Solutions" + SCRIPT_PATCH_LEVEL ", by Jim Ingham Cygnus Solutions" "\n" " 2000 Ajuba Solutions" }; resource 'vers' (2) { SCRIPT_MAJOR_VERSION, MINOR_VERSION, RELEASE_LEVEL, 0x00, verUS, SCRIPT_PATCH_LEVEL, - "Tclapplescript " SCRIPT_PATCH_LEVEL " 1996-1999" + "Tclapplescript " SCRIPT_PATCH_LEVEL " 1996-2000" }; /* @@ -60,7 +60,7 @@ 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 " + "should be placed in the Tool Command Language folder " "within the Extensions folder." }; @@ -71,6 +71,6 @@ resource 'STR ' (-16397, purgeable) { 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" + "package ifneeded Tclapplescript 1.1 [list tclPkgSetup $dir Tclapplescript 1.1 {{Tclapplescript" ".shlb load AppleScript}}]\n" }; diff --git a/mac/tclMacPanic.c b/mac/tclMacPanic.c index 081c856..e131046 100644 --- a/mac/tclMacPanic.c +++ b/mac/tclMacPanic.c @@ -11,12 +11,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacPanic.c,v 1.2 1998/09/14 18:40:05 stanton Exp $ + * RCS: @(#) $Id: tclMacPanic.c,v 1.2.18.1 2001/04/04 21:22:19 hobbs Exp $ */ #include <Events.h> #include <Controls.h> +#include <ControlDefinitions.h> #include <Windows.h> #include <TextEdit.h> #include <Fonts.h> @@ -151,7 +152,7 @@ MacPanic( part = FindControl(event.where, macWinPtr, &okButtonHandle); - if ((inButton == part) && + if ((kControlButtonPart == part) && (TrackControl(okButtonHandle, event.where, NULL))) { done = true; @@ -175,7 +176,7 @@ MacPanic( if (stopIconHandle != NULL) { PlotIcon(&iconRect, stopIconHandle); } - TextBox(msg, strlen(msg), &textRect, teFlushDefault); + TETextBox(msg, strlen(msg), &textRect, teFlushDefault); DrawControls(macWinPtr); EndUpdate(macWinPtr); } diff --git a/mac/tclMacPort.h b/mac/tclMacPort.h index c69063e..22451a8 100644 --- a/mac/tclMacPort.h +++ b/mac/tclMacPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacPort.h,v 1.10 1999/12/08 03:50:04 hobbs Exp $ + * RCS: @(#) $Id: tclMacPort.h,v 1.10.2.1 2001/04/04 21:22:19 hobbs Exp $ */ @@ -55,7 +55,7 @@ * However, MetroWerks has screwed that file up a couple of times * and all we need are the defines. */ - +#ifndef _FCNTL # 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 */ @@ -63,7 +63,7 @@ # 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 */ - +#endif /* * MetroWerks stat.h file is rather weak. The defines * after the include are needed to fill in the missing @@ -98,6 +98,7 @@ # define S_IXOTH 00001 /* execute permission: other */ # endif +#if __MSL__ < 0x6000 # define isatty(arg) 1 /* @@ -109,6 +110,7 @@ # 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 #endif /* __MWERKS__ */ @@ -148,6 +150,11 @@ #define WTERMSIG(status) (1) #define WSTOPSIG(status) (1) +#ifdef BUILD_tcl +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLEXPORT +#endif + /* * Make sure that MAXPATHLEN is defined. */ @@ -285,9 +292,11 @@ typedef int TclpMutex; #endif /* TCL_THREADS */ typedef pascal void (*ExitToShellProcPtr)(void); -#include "tclMac.h" -#include "tclMacInt.h" -/* #include "tclPlatDecls.h" - #include "tclIntPlatDecls.h" */ + +#include "tclMac.h" // contains #include "tclPlatDecls.h" +#include "tclIntPlatDecls.h" + +# undef TCL_STORAGE_CLASS +# define TCL_STORAGE_CLASS DLLIMPORT #endif /* _MACPORT */ diff --git a/mac/tclMacResource.r b/mac/tclMacResource.r index acfae99..80b2dda 100644 --- a/mac/tclMacResource.r +++ b/mac/tclMacResource.r @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacResource.r,v 1.4 1999/08/16 00:09:30 jingham Exp $ + * RCS: @(#) $Id: tclMacResource.r,v 1.4.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #include <Types.r> @@ -40,20 +40,6 @@ # 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 & Jim Ingham Scriptics Inc." -}; - -resource 'vers' (2) { - TCL_MAJOR_VERSION, MINOR_VERSION, - RELEASE_LEVEL, 0x00, verUS, - TCL_PATCH_LEVEL, - "Simple Tcl Shell " TCL_PATCH_LEVEL " 1996 - 1999" -}; - /* * The mechanisim below loads Tcl source into the resource fork of the @@ -83,8 +69,27 @@ resource 'vers' (2) { */ resource 'STR#' (128, "Tcl Environment Variables") { - { "SCHEDULE_NAME=Agent Controller Schedule", + { + /* + "SCHEDULE_NAME=Agent Controller Schedule", "SCHEDULE_PATH=Lozoya:System Folder:Tcl Lib:Tcl-Scheduler" + */ }; }; +data 'alis' (1000, "Library Folder") { + $"0000 0000 00BA 0002 0001 012F 0000 0000" /* ........../.... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 985C FB00 4244 0000 0000" /* ......\.BD.... */ + $"0002 1328 5375 7070 6F72 7420 4C69 6272" /* ...(Support Libr */ + $"6172 6965 7329 0000 0000 0000 0000 0000" /* aries).......... */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ + $"0000 0076 8504 B617 A796 003D 0027 025B" /* ...v...=.'.[ */ + $"01E4 0001 0001 0000 0000 0000 0000 0000" /* ............... */ + $"0000 0000 0000 0000 0001 2F00 0002 0015" /* ........../..... */ + $"2F3A 2853 7570 706F 7274 204C 6962 7261" /* /:(Support Libra */ + $"7269 6573 2900 FFFF 0000" /* ries)... */ +}; + + diff --git a/mac/tclMacSock.c b/mac/tclMacSock.c index 4878411..679f6d2 100644 --- a/mac/tclMacSock.c +++ b/mac/tclMacSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacSock.c,v 1.7.2.1 2001/04/04 14:47:17 dgp Exp $ + * RCS: @(#) $Id: tclMacSock.c,v 1.7.2.2 2001/04/04 21:22:19 hobbs Exp $ */ #include "tclInt.h" @@ -196,7 +196,7 @@ pascal void NotifyRoutine ( static Tcl_ChannelType tcpChannelType = { "tcp", /* Type name. */ - TcpBlockMode, /* Set blocking or + (Tcl_ChannelTypeVersion)TcpBlockMode, /* Set blocking or * non-blocking mode.*/ TcpClose, /* Close proc. */ TcpInput, /* Input proc. */ diff --git a/mac/tclMacThrd.c b/mac/tclMacThrd.c index eb58865..8daac36 100644 --- a/mac/tclMacThrd.c +++ b/mac/tclMacThrd.c @@ -124,7 +124,7 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags) #if TARGET_CPU_68K && TARGET_RT_MAC_CFM { ThreadEntryProcPtr entryProc; - entryProc = NewThreadEntryProc(proc); + entryProc = NewThreadEntryUPP(proc); NewThread(kCooperativeThread, entryProc, (void *) clientData, stackSize, kCreateIfNeeded, NULL, (ThreadID *) idPtr); diff --git a/mac/tclMacUnix.c b/mac/tclMacUnix.c index 483780c..b7cd86e 100644 --- a/mac/tclMacUnix.c +++ b/mac/tclMacUnix.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacUnix.c,v 1.3 1999/04/16 00:47:22 stanton Exp $ + * RCS: @(#) $Id: tclMacUnix.c,v 1.3.12.1 2001/04/04 21:22:19 hobbs Exp $ */ #include <Files.h> @@ -206,7 +206,7 @@ Tcl_LsObjCmd( resultObjPtr = Tcl_GetObjResult(interp); Tcl_IncrRefCount(resultObjPtr); - if (Tcl_ListObjGetElements(interp, resultObjPtr, &objc, &objv) != TCL_OK) { + if (Tcl_ListObjGetElements(interp, resultObjPtr, &objc, (Tcl_Obj ***)&objv) != TCL_OK) { Tcl_DecrRefCount(resultObjPtr); return TCL_ERROR; } diff --git a/mac/tclMacUtil.c b/mac/tclMacUtil.c index 51759ef..44f7259 100644 --- a/mac/tclMacUtil.c +++ b/mac/tclMacUtil.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclMacUtil.c,v 1.4 2000/04/17 01:52:56 jingham Exp $ + * RCS: @(#) $Id: tclMacUtil.c,v 1.4.2.1 2001/04/04 21:22:19 hobbs Exp $ */ #include "tcl.h" @@ -53,7 +53,7 @@ *---------------------------------------------------------------------- */ -#if defined(THINK_C) || defined(__MWERKS__) +#if defined(THINK_C) double hypotd(double x, double y); double @@ -420,7 +420,7 @@ FSpPathFromLocation( /* *---------------------------------------------------------------------- * - * GetGlobalMouse -- + * GetGlobalMouseTcl -- * * This procedure obtains the current mouse position in global * coordinates. @@ -435,7 +435,7 @@ FSpPathFromLocation( */ void -GetGlobalMouse( +GetGlobalMouseTcl( Point *mouse) /* Mouse position. */ { EventRecord event; @@ -443,3 +443,21 @@ GetGlobalMouse( OSEventAvail(0, &event); *mouse = event.where; } + +pascal OSErr FSpGetDirectoryIDTcl (CONST FSSpec * spec, + long * theDirID, Boolean * isDirectory) +{ + return(FSpGetDirectoryID(spec, theDirID, isDirectory)); +} + +pascal short FSpOpenResFileCompatTcl (CONST FSSpec * spec, SignedByte permission) +{ + return(FSpOpenResFileCompat(spec,permission)); +} + +pascal void FSpCreateResFileCompatTcl ( + CONST FSSpec * spec, OSType creator, + OSType fileType, ScriptCode scriptTag) +{ + FSpCreateResFileCompat (spec,creator,fileType,scriptTag); +} |