diff options
author | das <das> | 2004-03-17 18:14:11 (GMT) |
---|---|---|
committer | das <das> | 2004-03-17 18:14:11 (GMT) |
commit | 0205867a3dad7204c57477b6c38c52b981af36e1 (patch) | |
tree | b40c5ed765d71e7cb68ba178c3f3a098638c9987 /generic | |
parent | b07cf17d9c57bb355e84b17470235902854c7d40 (diff) | |
download | tcl-0205867a3dad7204c57477b6c38c52b981af36e1.zip tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.gz tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.bz2 |
Removed support for Mac OS Classic platform [Patch 918142]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/README | 6 | ||||
-rw-r--r-- | generic/tcl.decls | 51 | ||||
-rw-r--r-- | generic/tcl.h | 50 | ||||
-rw-r--r-- | generic/tclAlloc.c | 4 | ||||
-rw-r--r-- | generic/tclBasic.c | 17 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 11 | ||||
-rw-r--r-- | generic/tclDate.c | 12 | ||||
-rw-r--r-- | generic/tclDecls.h | 56 | ||||
-rw-r--r-- | generic/tclFCmd.c | 4 | ||||
-rw-r--r-- | generic/tclFileName.c | 579 | ||||
-rw-r--r-- | generic/tclGetDate.y | 14 | ||||
-rw-r--r-- | generic/tclIOCmd.c | 18 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 35 | ||||
-rw-r--r-- | generic/tclInitScript.h | 3 | ||||
-rw-r--r-- | generic/tclInt.decls | 113 | ||||
-rw-r--r-- | generic/tclInt.h | 26 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 29 | ||||
-rw-r--r-- | generic/tclIntPlatDecls.h | 300 | ||||
-rw-r--r-- | generic/tclMain.c | 6 | ||||
-rw-r--r-- | generic/tclMath.h | 15 | ||||
-rw-r--r-- | generic/tclNotify.c | 4 | ||||
-rw-r--r-- | generic/tclPathObj.c | 89 | ||||
-rw-r--r-- | generic/tclPlatDecls.h | 110 | ||||
-rw-r--r-- | generic/tclPort.h | 8 | ||||
-rw-r--r-- | generic/tclStubInit.c | 91 | ||||
-rw-r--r-- | generic/tclTest.c | 13 | ||||
-rw-r--r-- | generic/tclThreadJoin.c | 10 |
27 files changed, 120 insertions, 1554 deletions
diff --git a/generic/README b/generic/README index 209ba44..0faffb9 100644 --- a/generic/README +++ b/generic/README @@ -1,5 +1,5 @@ This directory contains Tcl source files that work on all the platforms -where Tcl runs (e.g. UNIX, PCs, and Macintoshes). Platform-specific -sources are in the directories ../unix, ../win, and ../mac. +where Tcl runs (e.g. UNIX, PCs, and MacOSX). Platform-specific +sources are in the directories ../unix, ../win, and ../macosx. -RCS: @(#) $Id: README,v 1.2 1998/09/14 18:39:56 stanton Exp $ +RCS: @(#) $Id: README,v 1.3 2004/03/17 18:14:12 das Exp $ diff --git a/generic/tcl.decls b/generic/tcl.decls index 886354c..c2dec83 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -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: tcl.decls,v 1.102 2004/01/21 19:59:33 vincentdarley Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.103 2004/03/17 18:14:12 das Exp $ library tcl @@ -1880,55 +1880,6 @@ declare 1 win { } ################## -# Mac declarations - -# This is needed by the shells to handle Macintosh events. - -declare 0 mac { - void Tcl_MacSetEventProc(Tcl_MacConvertEventPtr procPtr) -} - -# These routines are useful for handling using scripts from resources -# in the application shell - -declare 1 mac { - char * Tcl_MacConvertTextResource(Handle resource) -} -declare 2 mac { - int Tcl_MacEvalResource(Tcl_Interp *interp, CONST char *resourceName, - int resourceNumber, CONST char *fileName) -} -declare 3 mac { - Handle Tcl_MacFindResource(Tcl_Interp *interp, long resourceType, - CONST char *resourceName, int resourceNumber, - CONST char *resFileRef, int * releaseIt) -} - -# These routines support the new OSType object type (i.e. the packed 4 -# character type and creator codes). - -declare 4 mac { - int Tcl_GetOSTypeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - OSType *osTypePtr) -} -declare 5 mac { - void Tcl_SetOSTypeObj(Tcl_Obj *objPtr, OSType osType) -} -declare 6 mac { - Tcl_Obj * Tcl_NewOSTypeObj(OSType osType) -} - -# 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. - -declare 7 mac { - int strncasecmp(CONST char *s1, CONST char *s2, size_t n) -} -declare 8 mac { - int strcasecmp(CONST char *s1, CONST char *s2) -} - -################## # Mac OS X declarations # diff --git a/generic/tcl.h b/generic/tcl.h index 7277349..3c0c099 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -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: tcl.h,v 1.173 2004/03/08 01:53:20 davygrvy Exp $ + * RCS: @(#) $Id: tcl.h,v 1.174 2004/03/17 18:14:12 das Exp $ */ #ifndef _TCL @@ -45,7 +45,6 @@ extern "C" { * win/tcl.m4 (not patchlevel) * win/makefile.bc (not patchlevel) 2 LOC * README (sections 0 and 2) - * mac/README (2 LOC, not patchlevel) * macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 2 LOC * win/README.binary (sections 0-4) * win/README (not patchlevel) (sections 0 and 2) @@ -90,23 +89,6 @@ extern "C" { #endif /* __WIN32__ */ /* - * The following definitions set up the proper options for Macintosh - * compilers. We use this method because there is no autoconf equivalent. - */ - -#ifdef MAC_TCL -#include <ConditionalMacros.h> -# ifndef USE_TCLALLOC -# define USE_TCLALLOC 1 -# endif -# ifndef NO_STRERROR -# define NO_STRERROR 1 -# endif -# define INLINE -#endif - - -/* * Utility macros: STRINGIFY takes an argument and wraps it in "" (double * quotation marks), JOIN joins two arguments. */ @@ -121,9 +103,8 @@ extern "C" { /* * A special definition used to allow this header file to be included - * from windows or mac resource files so that they can obtain version - * information. RC_INVOKED is defined by default by the windows RC tool - * and manually set for macintosh. + * from windows resource files so that they can obtain version + * information. RC_INVOKED is defined by default by the windows RC tool. * * Resource compilers don't like all the C stuff, like typedefs and * procedure declarations, that occur below, so block them out. @@ -196,7 +177,7 @@ extern "C" { # define DLLIMPORT # define DLLEXPORT #else -# if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) || (defined(MAC_TCL) && FUNCTION_DECLSPEC) +# if (defined(__WIN32__) && (defined(_MSC_VER) || (__BORLANDC__ >= 0x0550) || defined(__LCC__) || defined(__WATCOMC__) || (defined(__GNUC__) && defined(__declspec)))) # define DLLIMPORT __declspec(dllimport) # define DLLEXPORT __declspec(dllexport) # else @@ -497,9 +478,7 @@ typedef struct Tcl_Dict_ *Tcl_Dict; * 'Tcl_CreateThread' and will be called as the main fuction of * the new thread created by that call. */ -#ifdef MAC_TCL -typedef pascal void *(Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); -#elif defined __WIN32__ +#if defined __WIN32__ typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); #else typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); @@ -511,10 +490,7 @@ typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); * differences when writing a Tcl_ThreadCreateProc. See the NewThread * function in generic/tclThreadTest.c for it's usage. */ -#ifdef MAC_TCL -# define Tcl_ThreadCreateType pascal void * -# define TCL_THREAD_CREATE_RETURN return NULL -#elif defined __WIN32__ +#if defined __WIN32__ # define Tcl_ThreadCreateType unsigned __stdcall # define TCL_THREAD_CREATE_RETURN return 0 #else @@ -1402,7 +1378,6 @@ typedef enum { * The following structure keeps is used to hold a time value, either as * an absolute time (the number of seconds from the epoch) or as an * elapsed time. On Unix systems the epoch is Midnight Jan 1, 1970 GMT. - * On Macintosh systems the epoch is Midnight Jan 1, 1904 GMT. */ typedef struct Tcl_Time { long sec; /* Seconds. */ @@ -2317,20 +2292,7 @@ EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp, * accessible via the stubs table. */ -/* - * tclPlatDecls.h can't be included here on the Mac, as we need - * Mac specific headers to define the Mac types used in this file, - * but these Mac haders conflict with a number of tk types - * and thus can't be included in the globally read tcl.h - * This header was originally added here as a fix for bug 5241 - * (stub link error for symbols in TclPlatStubs table), as a work- - * around for the bug on the mac, tclMac.h is included immediately - * after tcl.h in the tcl precompiled header (with DLLEXPORT set). - */ - -#if !defined(MAC_TCL) #include "tclPlatDecls.h" -#endif /* * Public functions that are not accessible via the stubs table. diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index b99b188..f4be2ad 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.17 2003/12/24 04:18:18 davygrvy Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.18 2004/03/17 18:14:13 das Exp $ */ /* @@ -40,7 +40,7 @@ * We should really make use of AC_CHECK_TYPE(caddr_t) * here, but it can wait until Tcl uses config.h properly. */ -#if defined(MAC_TCL) || defined(_MSC_VER) || defined(__MINGW32__) || defined(__BORLANDC__) +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__BORLANDC__) typedef unsigned long caddr_t; #endif diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7c5e460..02710d2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.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: tclBasic.c,v 1.97 2004/02/24 22:58:46 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.98 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" @@ -226,25 +226,10 @@ static CmdInfo builtInCmds[] = { (CompileProc *) NULL, 1}, {"vwait", (Tcl_CmdProc *) NULL, Tcl_VwaitObjCmd, (CompileProc *) NULL, 1}, - -#ifdef MAC_TCL - {"beep", (Tcl_CmdProc *) NULL, Tcl_BeepObjCmd, - (CompileProc *) NULL, 0}, - {"echo", Tcl_EchoCmd, (Tcl_ObjCmdProc *) NULL, - (CompileProc *) NULL, 0}, - {"ls", (Tcl_CmdProc *) NULL, Tcl_LsObjCmd, - (CompileProc *) NULL, 0}, - {"resource", (Tcl_CmdProc *) NULL, Tcl_ResourceObjCmd, - (CompileProc *) NULL, 1}, - {"source", (Tcl_CmdProc *) NULL, Tcl_MacSourceObjCmd, - (CompileProc *) NULL, 0}, -#else {"exec", (Tcl_CmdProc *) NULL, Tcl_ExecObjCmd, (CompileProc *) NULL, 0}, {"source", (Tcl_CmdProc *) NULL, Tcl_SourceObjCmd, (CompileProc *) NULL, 0}, -#endif /* MAC_TCL */ - #endif /* TCL_GENERIC_ONLY */ {NULL, (Tcl_CmdProc *) NULL, (Tcl_ObjCmdProc *) NULL, (CompileProc *) NULL, 0} diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index b9ddd58..ddb36ba 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.42 2004/03/09 12:59:04 vincentdarley Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.43 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" @@ -822,7 +822,7 @@ Tcl_ExprObjCmd(dummy, interp, objc, objv) * This procedure is invoked to process the "file" Tcl command. * See the user documentation for details on what it does. * PLEASE NOTE THAT THIS FAILS WITH FILENAMES AND PATHS WITH - * EMBEDDED NULLS, WHICH COULD THEORETICALLY HAPPEN ON A MAC. + * EMBEDDED NULLS. * With the object-based Tcl_FS APIs, the above NOTE may no * longer be true. In any case this assertion should be tested. * @@ -1237,11 +1237,11 @@ Tcl_FileObjCmd(dummy, interp, objc, objv) value = 0; if (GetStatBuf(NULL, objv[2], Tcl_FSStat, &buf) == TCL_OK) { /* - * For Windows and Macintosh, there are no user ids + * For Windows, there are no user ids * associated with a file, so we always return 1. */ -#if (defined(__WIN32__) || defined(MAC_TCL)) +#if defined(__WIN32__) value = 1; #else value = (geteuid() == buf.st_uid); @@ -1326,9 +1326,6 @@ Tcl_FileObjCmd(dummy, interp, objc, objv) case TCL_PLATFORM_WINDOWS: separator = "\\"; break; - case TCL_PLATFORM_MAC: - separator = ":"; - break; } Tcl_SetObjResult(interp, Tcl_NewStringObj(separator,1)); } else { diff --git a/generic/tclDate.c b/generic/tclDate.c index 3110f9e..8b2c379 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -16,15 +16,9 @@ #include "tclInt.h" #include "tclPort.h" -#if defined(MAC_TCL) && !defined(TCL_MAC_USE_MSL_EPOCH) -# define EPOCH 1904 -# define START_OF_TIME 1904 -# define END_OF_TIME 2039 -#else -# define EPOCH 1970 -# define START_OF_TIME 1902 -# define END_OF_TIME 2037 -#endif +#define EPOCH 1970 +#define START_OF_TIME 1902 +#define END_OF_TIME 2037 /* * The offset of tm_year of struct tm returned by localtime, gmtime, etc. diff --git a/generic/tclDecls.h b/generic/tclDecls.h index dba4689..b05e5a7 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.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: tclDecls.h,v 1.101 2004/01/21 19:59:33 vincentdarley Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.102 2004/03/17 18:14:13 das Exp $ */ #ifndef _TCLDECLS @@ -81,7 +81,7 @@ EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char * ptr, unsigned int size, CONST char * file, int line)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_CreateFileHandler_TCL_DECLARED #define Tcl_CreateFileHandler_TCL_DECLARED /* 9 */ @@ -89,7 +89,7 @@ EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); #endif #endif /* UNIX */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_DeleteFileHandler_TCL_DECLARED #define Tcl_DeleteFileHandler_TCL_DECLARED /* 10 */ @@ -710,7 +710,7 @@ EXTERN void Tcl_DeleteHashTable _ANSI_ARGS_(( /* 110 */ EXTERN void Tcl_DeleteInterp _ANSI_ARGS_((Tcl_Interp * interp)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_DetachPids_TCL_DECLARED #define Tcl_DetachPids_TCL_DECLARED /* 111 */ @@ -1052,7 +1052,7 @@ EXTERN CONST char * Tcl_GetNameOfExecutable _ANSI_ARGS_((void)); /* 166 */ EXTERN Tcl_Obj * Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp * interp)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_GetOpenFile_TCL_DECLARED #define Tcl_GetOpenFile_TCL_DECLARED /* 167 */ @@ -1226,7 +1226,7 @@ EXTERN Tcl_Obj * Tcl_ObjSetVar2 _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_OpenCommandChannel_TCL_DECLARED #define Tcl_OpenCommandChannel_TCL_DECLARED /* 197 */ @@ -1299,7 +1299,7 @@ EXTERN void Tcl_QueueEvent _ANSI_ARGS_((Tcl_Event * evPtr, EXTERN int Tcl_Read _ANSI_ARGS_((Tcl_Channel chan, char * bufPtr, int toRead)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_ReapDetachedProcs_TCL_DECLARED #define Tcl_ReapDetachedProcs_TCL_DECLARED /* 207 */ @@ -3242,24 +3242,18 @@ typedef struct TclStubs { char * (*tcl_DbCkalloc) _ANSI_ARGS_((unsigned int size, CONST char * file, int line)); /* 6 */ int (*tcl_DbCkfree) _ANSI_ARGS_((char * ptr, CONST char * file, int line)); /* 7 */ char * (*tcl_DbCkrealloc) _ANSI_ARGS_((char * ptr, unsigned int size, CONST char * file, int line)); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ void (*tcl_CreateFileHandler) _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ void *reserved9; #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved9; -#endif /* MAC_TCL */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ void (*tcl_DeleteFileHandler) _ANSI_ARGS_((int fd)); /* 10 */ #endif /* UNIX */ #ifdef __WIN32__ void *reserved10; #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved10; -#endif /* MAC_TCL */ void (*tcl_SetTimer) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 11 */ void (*tcl_Sleep) _ANSI_ARGS_((int ms)); /* 12 */ int (*tcl_WaitForEvent) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 13 */ @@ -3360,15 +3354,12 @@ typedef struct TclStubs { void (*tcl_DeleteHashEntry) _ANSI_ARGS_((Tcl_HashEntry * entryPtr)); /* 108 */ void (*tcl_DeleteHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 109 */ void (*tcl_DeleteInterp) _ANSI_ARGS_((Tcl_Interp * interp)); /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ void (*tcl_DetachPids) _ANSI_ARGS_((int numPids, Tcl_Pid * pidPtr)); /* 111 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tcl_DetachPids) _ANSI_ARGS_((int numPids, Tcl_Pid * pidPtr)); /* 111 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved111; -#endif /* MAC_TCL */ void (*tcl_DeleteTimerHandler) _ANSI_ARGS_((Tcl_TimerToken token)); /* 112 */ void (*tcl_DeleteTrace) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Trace trace)); /* 113 */ void (*tcl_DontCallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 114 */ @@ -3424,15 +3415,12 @@ typedef struct TclStubs { Tcl_Interp * (*tcl_GetMaster) _ANSI_ARGS_((Tcl_Interp * interp)); /* 164 */ CONST char * (*tcl_GetNameOfExecutable) _ANSI_ARGS_((void)); /* 165 */ Tcl_Obj * (*tcl_GetObjResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int forWriting, int checkUsage, ClientData * filePtr)); /* 167 */ #endif /* UNIX */ #ifdef __WIN32__ void *reserved167; #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved167; -#endif /* MAC_TCL */ Tcl_PathType (*tcl_GetPathType) _ANSI_ARGS_((CONST char * path)); /* 168 */ int (*tcl_Gets) _ANSI_ARGS_((Tcl_Channel chan, Tcl_DString * dsPtr)); /* 169 */ int (*tcl_GetsObj) _ANSI_ARGS_((Tcl_Channel chan, Tcl_Obj * objPtr)); /* 170 */ @@ -3462,15 +3450,12 @@ typedef struct TclStubs { void (*tcl_NotifyChannel) _ANSI_ARGS_((Tcl_Channel channel, int mask)); /* 194 */ Tcl_Obj * (*tcl_ObjGetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, int flags)); /* 195 */ Tcl_Obj * (*tcl_ObjSetVar2) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * part1Ptr, Tcl_Obj * part2Ptr, Tcl_Obj * newValuePtr, int flags)); /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_Channel (*tcl_OpenCommandChannel) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags)); /* 197 */ #endif /* UNIX */ #ifdef __WIN32__ Tcl_Channel (*tcl_OpenCommandChannel) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST84 char ** argv, int flags)); /* 197 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved197; -#endif /* MAC_TCL */ Tcl_Channel (*tcl_OpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName, CONST char * modeString, int permissions)); /* 198 */ Tcl_Channel (*tcl_OpenTcpClient) _ANSI_ARGS_((Tcl_Interp * interp, int port, CONST char * address, CONST char * myaddr, int myport, int async)); /* 199 */ Tcl_Channel (*tcl_OpenTcpServer) _ANSI_ARGS_((Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData)); /* 200 */ @@ -3480,15 +3465,12 @@ typedef struct TclStubs { CONST84_RETURN char * (*tcl_PosixError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 204 */ void (*tcl_QueueEvent) _ANSI_ARGS_((Tcl_Event * evPtr, Tcl_QueuePosition position)); /* 205 */ int (*tcl_Read) _ANSI_ARGS_((Tcl_Channel chan, char * bufPtr, int toRead)); /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ void (*tcl_ReapDetachedProcs) _ANSI_ARGS_((void)); /* 207 */ #endif /* UNIX */ #ifdef __WIN32__ void (*tcl_ReapDetachedProcs) _ANSI_ARGS_((void)); /* 207 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved207; -#endif /* MAC_TCL */ int (*tcl_RecordAndEval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmd, int flags)); /* 208 */ int (*tcl_RecordAndEvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags)); /* 209 */ void (*tcl_RegisterChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 210 */ @@ -3853,13 +3835,13 @@ extern TclStubs *tclStubsPtr; #define Tcl_DbCkrealloc \ (tclStubsPtr->tcl_DbCkrealloc) /* 8 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_CreateFileHandler #define Tcl_CreateFileHandler \ (tclStubsPtr->tcl_CreateFileHandler) /* 9 */ #endif #endif /* UNIX */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_DeleteFileHandler #define Tcl_DeleteFileHandler \ (tclStubsPtr->tcl_DeleteFileHandler) /* 10 */ @@ -4265,7 +4247,7 @@ extern TclStubs *tclStubsPtr; #define Tcl_DeleteInterp \ (tclStubsPtr->tcl_DeleteInterp) /* 110 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_DetachPids #define Tcl_DetachPids \ (tclStubsPtr->tcl_DetachPids) /* 111 */ @@ -4497,7 +4479,7 @@ extern TclStubs *tclStubsPtr; #define Tcl_GetObjResult \ (tclStubsPtr->tcl_GetObjResult) /* 166 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_GetOpenFile #define Tcl_GetOpenFile \ (tclStubsPtr->tcl_GetOpenFile) /* 167 */ @@ -4616,7 +4598,7 @@ extern TclStubs *tclStubsPtr; #define Tcl_ObjSetVar2 \ (tclStubsPtr->tcl_ObjSetVar2) /* 196 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_OpenCommandChannel #define Tcl_OpenCommandChannel \ (tclStubsPtr->tcl_OpenCommandChannel) /* 197 */ @@ -4664,7 +4646,7 @@ extern TclStubs *tclStubsPtr; #define Tcl_Read \ (tclStubsPtr->tcl_Read) /* 206 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef Tcl_ReapDetachedProcs #define Tcl_ReapDetachedProcs \ (tclStubsPtr->tcl_ReapDetachedProcs) /* 207 */ diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index 8cfcdf7..f58d2c0 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.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: tclFCmd.c,v 1.24 2004/01/29 10:28:20 vincentdarley Exp $ + * RCS: @(#) $Id: tclFCmd.c,v 1.25 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" @@ -533,7 +533,7 @@ CopyRenameOneFile(interp, source, target, copyFlag, force) * permissions, we'll let the actual copy/rename return * an error later. */ -#if !defined(__WIN32__) && !defined(MAC_TCL) +#if !defined(__WIN32__) { Tcl_Obj* perm = Tcl_NewStringObj("u+w",-1); Tcl_IncrRefCount(perm); diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 1ca1d03..563357a 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,58 +10,16 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.49 2004/03/09 12:57:25 vincentdarley Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.50 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" #include "tclPort.h" #include "tclRegexp.h" -/* - * This define is used to activate Tcl's interpretation of Unix-style - * paths (containing forward slashes, '.' and '..') on MacOS. A - * side-effect of this is that some paths become ambiguous. - */ -#define MAC_UNDERSTANDS_UNIX_PATHS - -#ifdef MAC_UNDERSTANDS_UNIX_PATHS -/* - * The following regular expression matches the root portion of a Macintosh - * absolute path. It will match degenerate Unix-style paths, tilde paths, - * Unix-style paths, and Mac paths. The various subexpressions in this - * can be summarised as follows: ^(/..|~user/unix|~user:mac|/unix|mac:dir). - * The subexpression indices which match the root portions, are as follows: - * - * degenerate unix-style: 2 - * unix-tilde: 5 - * mac-tilde: 7 - * unix-style: 9 (or 10 to cut off the irrelevant header). - * mac: 12 - * - */ - -#define MAC_ROOT_PATTERN "^((/+([.][.]?/+)*([.][.]?)?)|(~[^:/]*)(/[^:]*)?|(~[^:]*)(:.*)?|/+([.][.]?/+)*([^:/]+)(/[^:]*)?|([^:]+):.*)$" - -/* - * The following variables are used to hold precompiled regular expressions - * for use in filename matching. - */ - -typedef struct ThreadSpecificData { - int initialized; - Tcl_Obj *macRootPatternPtr; -} ThreadSpecificData; - -static Tcl_ThreadDataKey dataKey; - -static void FileNameCleanup _ANSI_ARGS_((ClientData clientData)); -static void FileNameInit _ANSI_ARGS_((void)); - -#endif - /* * The following variable is set in the TclPlatformInit call to one - * of: TCL_PLATFORM_UNIX, TCL_PLATFORM_MAC, or TCL_PLATFORM_WINDOWS. + * of: TCL_PLATFORM_UNIX or TCL_PLATFORM_WINDOWS. */ TclPlatformType tclPlatform = TCL_PLATFORM_UNIX; @@ -76,68 +34,12 @@ static CONST char * ExtractWinRoot _ANSI_ARGS_((CONST char *path, Tcl_DString *resultPtr, int offset, Tcl_PathType *typePtr)); static int SkipToChar _ANSI_ARGS_((char **stringPtr, int match)); -static Tcl_Obj* SplitMacPath _ANSI_ARGS_((CONST char *path)); static Tcl_Obj* SplitWinPath _ANSI_ARGS_((CONST char *path)); static Tcl_Obj* SplitUnixPath _ANSI_ARGS_((CONST char *path)); static int DoGlob _ANSI_ARGS_((Tcl_Interp *interp, char *separators, Tcl_Obj *pathPtr, int flags, char *pattern, Tcl_GlobTypeData *types)); -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - -/* - *---------------------------------------------------------------------- - * - * FileNameInit -- - * - * This procedure initializes the patterns used by this module. - * - * Results: - * None. - * - * Side effects: - * Compiles the regular expressions. - * - *---------------------------------------------------------------------- - */ - -static void -FileNameInit() -{ - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - if (!tsdPtr->initialized) { - tsdPtr->initialized = 1; - tsdPtr->macRootPatternPtr = Tcl_NewStringObj(MAC_ROOT_PATTERN, -1); - Tcl_CreateThreadExitHandler(FileNameCleanup, NULL); - } -} - -/* - *---------------------------------------------------------------------- - * - * FileNameCleanup -- - * - * This procedure is a Tcl_ExitProc used to clean up the static - * data structures used in this file. - * - * Results: - * None. - * - * Side effects: - * Deallocates storage used by the procedures in this file. - * - *---------------------------------------------------------------------- - */ - -static void -FileNameCleanup(clientData) - ClientData clientData; /* Not used. */ -{ - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - Tcl_DecrRefCount(tsdPtr->macRootPatternPtr); - tsdPtr->initialized = 0; -} -#endif /* *---------------------------------------------------------------------- @@ -406,88 +308,6 @@ TclpGetNativePathType(pathPtr, driveNameLengthPtr, driveNameRef) } break; } - case TCL_PLATFORM_MAC: - if (path[0] == ':') { - type = TCL_PATH_RELATIVE; - } else { -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - ThreadSpecificData *tsdPtr; - Tcl_RegExp re; - - tsdPtr = TCL_TSD_INIT(&dataKey); - - /* - * Since we have eliminated the easy cases, use the - * root pattern to look for the other types. - */ - - FileNameInit(); - re = Tcl_GetRegExpFromObj(NULL, tsdPtr->macRootPatternPtr, - REG_ADVANCED); - - if (!Tcl_RegExpExec(NULL, re, path, path)) { - type = TCL_PATH_RELATIVE; - } else { - CONST char *root, *end; - Tcl_RegExpRange(re, 2, &root, &end); - if (root != NULL) { - type = TCL_PATH_RELATIVE; - } else { - if (driveNameLengthPtr != NULL) { - Tcl_RegExpRange(re, 0, &root, &end); - *driveNameLengthPtr = end - root; - } - if (driveNameRef != NULL) { - if (*root == '/') { - char *c; - int gotColon = 0; - *driveNameRef = Tcl_NewStringObj(root + 1, - end - root -1); - c = Tcl_GetString(*driveNameRef); - while (*c != '\0') { - if (*c == '/') { - gotColon++; - *c = ':'; - } - c++; - } - /* - * If there is no colon, we have just a - * volume name so we must add a colon so - * it is an absolute path. - */ - if (gotColon == 0) { - Tcl_AppendToObj(*driveNameRef, ":", 1); - } else if ((gotColon > 1) && - (*(c-1) == ':')) { - /* We have an extra colon */ - Tcl_SetObjLength(*driveNameRef, - c - Tcl_GetString(*driveNameRef) - 1); - } - } - } - } - } -#else - if (path[0] == '~') { - } else if (path[0] == ':') { - type = TCL_PATH_RELATIVE; - } else { - char *colonPos = strchr(path,':'); - if (colonPos == NULL) { - type = TCL_PATH_RELATIVE; - } else { - } - } - if (type == TCL_PATH_ABSOLUTE) { - if (driveNameLengthPtr != NULL) { - *driveNameLengthPtr = strlen(path); - } - } -#endif - } - break; - case TCL_PLATFORM_WINDOWS: { Tcl_DString ds; CONST char *rootEnd; @@ -553,10 +373,6 @@ TclpNativeSplitPath(pathPtr, lenPtr) case TCL_PLATFORM_WINDOWS: resultPtr = SplitWinPath(Tcl_GetString(pathPtr)); break; - - case TCL_PLATFORM_MAC: - resultPtr = SplitMacPath(Tcl_GetString(pathPtr)); - break; } /* @@ -813,246 +629,6 @@ SplitWinPath(path) } /* - *---------------------------------------------------------------------- - * - * SplitMacPath -- - * - * This routine is used by Tcl_(FS)SplitPath to handle splitting - * Macintosh paths. - * - * Results: - * Returns a newly allocated Tcl list object. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -static Tcl_Obj* -SplitMacPath(path) - CONST char *path; /* Pointer to string containing a path. */ -{ - int isMac = 0; /* 1 if is Mac-style, 0 if Unix-style path. */ - int length; - CONST char *p, *elementStart; - Tcl_Obj *result; -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - Tcl_RegExp re; - int i; - ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -#endif - - result = Tcl_NewObj(); - -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - /* - * Initialize the path name parser for Macintosh path names. - */ - - FileNameInit(); - - /* - * Match the root portion of a Mac path name. - */ - - i = 0; /* Needed only to prevent gcc warnings. */ - - re = Tcl_GetRegExpFromObj(NULL, tsdPtr->macRootPatternPtr, REG_ADVANCED); - - if (Tcl_RegExpExec(NULL, re, path, path) == 1) { - CONST char *start, *end; - Tcl_Obj *nextElt; - - /* - * Treat degenerate absolute paths like / and /../.. as - * Mac relative file names for lack of anything else to do. - */ - - Tcl_RegExpRange(re, 2, &start, &end); - if (start) { - Tcl_Obj *elt = Tcl_NewStringObj(":", 1); - Tcl_RegExpRange(re, 0, &start, &end); - Tcl_AppendToObj(elt, path, end - start); - Tcl_ListObjAppendElement(NULL, result, elt); - return result; - } - - Tcl_RegExpRange(re, 5, &start, &end); - if (start) { - /* - * Unix-style tilde prefixed paths. - */ - - isMac = 0; - i = 5; - } else { - Tcl_RegExpRange(re, 7, &start, &end); - if (start) { - /* - * Mac-style tilde prefixed paths. - */ - - isMac = 1; - i = 7; - } else { - Tcl_RegExpRange(re, 10, &start, &end); - if (start) { - /* - * Normal Unix style paths. - */ - - isMac = 0; - i = 10; - } else { - Tcl_RegExpRange(re, 12, &start, &end); - if (start) { - /* - * Normal Mac style paths. - */ - - isMac = 1; - i = 12; - } - } - } - } - Tcl_RegExpRange(re, i, &start, &end); - length = end - start; - - /* - * Append the element and terminate it with a : - */ - - nextElt = Tcl_NewStringObj(start, length); - Tcl_AppendToObj(nextElt, ":", 1); - Tcl_ListObjAppendElement(NULL, result, nextElt); - p = end; - } else { - isMac = (strchr(path, ':') != NULL); - p = path; - } -#else - if ((path[0] != ':') && (path[0] == '~' || (strchr(path,':') != NULL))) { - CONST char *end; - Tcl_Obj *nextElt; - - isMac = 1; - - end = strchr(path,':'); - if (end == NULL) { - length = strlen(path); - } else { - length = end - path; - } - - /* - * Append the element and terminate it with a : - */ - - nextElt = Tcl_NewStringObj(path, length); - Tcl_AppendToObj(nextElt, ":", 1); - Tcl_ListObjAppendElement(NULL, result, nextElt); - p = path + length; - } else { - isMac = (strchr(path, ':') != NULL); - isMac = 1; - p = path; - } -#endif - - if (isMac) { - - /* - * p is pointing at the first colon in the path. There - * will always be one, since this is a Mac-style path. - * (This is no longer true if MAC_UNDERSTANDS_UNIX_PATHS - * is false, so we must check whether 'p' points to the - * end of the string.) - */ - elementStart = p; - if (*p == ':') { - p++; - } - - while ((p = strchr(p, ':')) != NULL) { - length = p - elementStart; - if (length == 1) { - while (*p == ':') { - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj("::", 2)); - elementStart = p++; - } - } else { - /* - * If this is a simple component, drop the leading colon. - */ - - if ((elementStart[1] != '~') - && (strchr(elementStart+1, '/') == NULL)) { - elementStart++; - length--; - } - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj(elementStart, length)); - elementStart = p++; - } - } - if (elementStart[0] != ':') { - if (elementStart[0] != '\0') { - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj(elementStart, -1)); - } - } else { - if (elementStart[1] != '\0' || elementStart == path) { - if ((elementStart[1] != '~') && (elementStart[1] != '\0') - && (strchr(elementStart+1, '/') == NULL)) { - elementStart++; - } - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj(elementStart, -1)); - } - } - } else { - - /* - * Split on slashes, suppress extra /'s, and convert .. to ::. - */ - - for (;;) { - elementStart = p; - while ((*p != '\0') && (*p != '/')) { - p++; - } - length = p - elementStart; - if (length > 0) { - if ((length == 1) && (elementStart[0] == '.')) { - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj(":", 1)); - } else if ((length == 2) && (elementStart[0] == '.') - && (elementStart[1] == '.')) { - Tcl_ListObjAppendElement(NULL, result, - Tcl_NewStringObj("::", 2)); - } else { - Tcl_Obj *nextElt; - if (*elementStart == '~') { - nextElt = Tcl_NewStringObj(":",1); - Tcl_AppendToObj(nextElt, elementStart, length); - } else { - nextElt = Tcl_NewStringObj(elementStart, length); - } - Tcl_ListObjAppendElement(NULL, result, nextElt); - } - } - if (*p++ == '\0') { - break; - } - } - } - return result; -} - -/* *--------------------------------------------------------------------------- * * Tcl_FSJoinToPath -- @@ -1227,86 +803,6 @@ TclpNativeJoinPath(prefix, joining) length = dest - Tcl_GetString(prefix); Tcl_SetObjLength(prefix, length); break; - - case TCL_PLATFORM_MAC: { - int newLength; - - /* - * Sort out separators. We basically add the object we've - * been given, but we have to make sure that there is - * exactly one separator inbetween (unless the object we're - * adding contains multiple contiguous colons, all of which - * we must add). Also if an object is just ':' we don't - * bother to add it unless it's the very first element. - */ - -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - int adjustedPath = 0; - if ((strchr(p, ':') == NULL) && (strchr(p, '/') != NULL)) { - char *start = p; - adjustedPath = 1; - while (*start != '\0') { - if (*start == '/') { - *start = ':'; - } - start++; - } - } -#endif - if (length > 0) { - if ((p[0] == ':') && (p[1] == '\0')) { - return; - } - if (start[length-1] != ':') { - if (*p != '\0' && *p != ':') { - Tcl_AppendToObj(prefix, ":", 1); - length++; - } - } else if (*p == ':') { - p++; - } - } else { - if (*p != '\0' && *p != ':') { - Tcl_AppendToObj(prefix, ":", 1); - length++; - } - } - - /* - * Append the element - */ - - newLength = strlen(p); - /* - * It may not be good to just do 'Tcl_AppendToObj(prefix, - * p, newLength)' because the object may contain duplicate - * colons which we want to get rid of. - */ - Tcl_AppendToObj(prefix, p, newLength); - - /* Remove spurious trailing single ':' */ - dest = Tcl_GetString(prefix) + length + newLength; - if (*(dest-1) == ':') { - if (dest-1 > Tcl_GetString(prefix)) { - if (*(dest-2) != ':') { - Tcl_SetObjLength(prefix, length + newLength -1); - } - } - } -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - /* Revert the path to what it was */ - if (adjustedPath) { - char *start = joining; - while (*start != '\0') { - if (*start == ':') { - *start = '/'; - } - start++; - } - } -#endif - break; - } } return; } @@ -1465,18 +961,6 @@ TclGetExtension(name) lastSep = strrchr(name, '/'); break; - case TCL_PLATFORM_MAC: -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - if (strchr(name, ':') == NULL) { - lastSep = strrchr(name, '/'); - } else { - lastSep = strrchr(name, ':'); - } -#else - lastSep = strrchr(name, ':'); -#endif - break; - case TCL_PLATFORM_WINDOWS: lastSep = NULL; for (p = name; *p != '\0'; p++) { @@ -1705,9 +1189,6 @@ Tcl_GlobObjCmd(dummy, interp, objc, objv) case TCL_PLATFORM_WINDOWS: separators = "/\\:"; break; - case TCL_PLATFORM_MAC: - separators = ":"; - break; } if (dir == PATH_GENERAL) { int pathlength; @@ -2051,17 +1532,6 @@ TclGlob(interp, pattern, pathPrefix, globFlags, types) case TCL_PLATFORM_WINDOWS: separators = "/\\:"; break; - case TCL_PLATFORM_MAC: -#ifdef MAC_UNDERSTANDS_UNIX_PATHS - if (pathPrefix == NULL) { - separators = (strchr(pattern, ':') == NULL) ? "/" : ":"; - } else { - separators = ":"; - } -#else - separators = ":"; -#endif - break; } if (pathPrefix == NULL) { @@ -2243,15 +1713,6 @@ TclGlob(interp, pattern, pathPrefix, globFlags, types) Tcl_ListObjGetElements(NULL, Tcl_GetObjResult(interp), &objc, &objv); - #ifdef MAC_TCL - /* adjust prefixLen if DoGlob prepended a ':' */ - if ((prefixLen > 0) && (objc > 0) && (pre[0] != ':')) { - CONST char *str = Tcl_GetStringFromObj(objv[0],NULL); - if (str[0] == ':') { - prefixLen++; - } - } - #endif for (i = 0; i< objc; i++) { Tcl_Obj* elt; int len; @@ -2410,14 +1871,11 @@ DoGlob(interp, separators, pathPtr, flags, pattern, types) * Tcl 8.5a0. Simplifications to the calling paths suggest it may * not be necessary any more, since path separators are handled * elsewhere. It is left in place in case new bugs are reported - * (particularly on MacOS) */ #if 0 /* - * Deal with path separators. On the Mac, we have to watch out - * for multiple separators, since they are special in Mac-style - * paths. + * Deal with path separators. */ if (pathPtr == NULL) { /* @@ -2429,31 +1887,6 @@ DoGlob(interp, separators, pathPtr, flags, pattern, types) char lastChar = 0; switch (tclPlatform) { - case TCL_PLATFORM_MAC: - #ifdef MAC_UNDERSTANDS_UNIX_PATHS - if (*separators == '/') { - if (((length == 0) && (count == 0)) - || ((length > 0) && (lastChar != ':'))) { - Tcl_DStringAppend(&append, ":", 1); - } - } else { - #endif - if (count == 0) { - if ((length > 0) && (lastChar != ':')) { - Tcl_DStringAppend(&append, ":", 1); - } - } else { - if (lastChar == ':') { - count--; - } - while (count-- > 0) { - Tcl_DStringAppend(&append, ":", 1); - } - } - #ifdef MAC_UNDERSTANDS_UNIX_PATHS - } - #endif - break; case TCL_PLATFORM_WINDOWS: /* * If this is a drive relative path, add the colon and the @@ -2701,12 +2134,6 @@ DoGlob(interp, separators, pathPtr, flags, pattern, types) } switch (tclPlatform) { - case TCL_PLATFORM_MAC: { - if (strchr(Tcl_DStringValue(&append), ':') == NULL) { - Tcl_DStringAppend(&append, ":", 1); - } - break; - } case TCL_PLATFORM_WINDOWS: { if (length == 0 && (Tcl_DStringLength(&append) == 0)) { if (((*name == '\\') && (name[1] == '/' || name[1] == '\\')) diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index f7f1366..924390e 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -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: tclGetDate.y,v 1.20 2004/03/10 16:01:26 kennykb Exp $ + * RCS: @(#) $Id: tclGetDate.y,v 1.21 2004/03/17 18:14:13 das Exp $ */ %{ @@ -33,15 +33,9 @@ #include "tclInt.h" #include "tclPort.h" -#if defined(MAC_TCL) && !defined(TCL_MAC_USE_MSL_EPOCH) -# define EPOCH 1904 -# define START_OF_TIME 1904 -# define END_OF_TIME 2039 -#else -# define EPOCH 1970 -# define START_OF_TIME 1902 -# define END_OF_TIME 2037 -#endif +#define EPOCH 1970 +#define START_OF_TIME 1902 +#define END_OF_TIME 2037 /* * The offset of tm_year of struct tm returned by localtime, gmtime, etc. diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index 2f9e764..c2c0a40 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.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: tclIOCmd.c,v 1.16 2003/12/24 04:18:20 davygrvy Exp $ + * RCS: @(#) $Id: tclIOCmd.c,v 1.17 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" @@ -709,14 +709,6 @@ Tcl_ExecObjCmd(dummy, interp, objc, objv) int objc; /* Number of arguments. */ Tcl_Obj *CONST objv[]; /* Argument objects. */ { -#ifdef MAC_TCL - - Tcl_AppendResult(interp, "exec not implemented under Mac OS", - (char *)NULL); - return TCL_ERROR; - -#else /* !MAC_TCL */ - /* * This procedure generates an argv array for the string arguments. It * starts out with stack-allocated space but uses dynamically-allocated @@ -857,7 +849,6 @@ Tcl_ExecObjCmd(dummy, interp, objc, objv) Tcl_SetObjResult(interp, resultPtr); return result; -#endif /* !MAC_TCL */ } /* @@ -968,12 +959,6 @@ Tcl_OpenObjCmd(notUsed, interp, objc, objv) if (!pipeline) { chan = Tcl_FSOpenFileChannel(interp, objv[1], modeString, prot); } else { -#ifdef MAC_TCL - Tcl_AppendResult(interp, - "command pipelines not supported on Macintosh OS", - (char *)NULL); - return TCL_ERROR; -#else int mode, seekFlag, cmdObjc; CONST char **cmdArgv; @@ -1003,7 +988,6 @@ Tcl_OpenObjCmd(notUsed, interp, objc, objv) chan = Tcl_OpenCommandChannel(interp, cmdObjc, cmdArgv, flags); } ckfree((char *) cmdArgv); -#endif } if (chan == (Tcl_Channel) NULL) { return TCL_ERROR; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 6e15ab7..a65971f 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,14 +17,11 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.95 2004/01/29 10:28:20 vincentdarley Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.96 2004/03/17 18:14:13 das Exp $ */ #include "tclInt.h" #include "tclPort.h" -#ifdef MAC_TCL -#include "tclMacInt.h" -#endif #ifdef __WIN32__ /* for tclWinProcs->useWide */ #include "tclWinInt.h" @@ -52,7 +49,7 @@ static void FsRecacheFilesystemList(void); /* * These form part of the native filesystem support. They are needed * here because we have a few native filesystem functions (which are - * the same for mac/win/unix) in this file. There is no need to place + * the same for win/unix) in this file. There is no need to place * them in tclInt.h, because they are not (and should not be) used * anywhere else. */ @@ -307,7 +304,7 @@ static Tcl_FSFileAttrsSetProc NativeFileAttrsSet; /* * The only reason these functions are not static is that they - * are either called by code in the native (win/unix/mac) directories + * are either called by code in the native (win/unix) directories * or they are actually implemented in those directories. They * should simply not be called by code outside Tcl's native * filesystem core. i.e. they should be considered 'static' to @@ -1302,7 +1299,7 @@ Tcl_FSData(fsPtr) * Description: * Takes a path specification containing no ../, ./ sequences, * and converts it into a unique path for the given platform. - * On MacOS, Unix, this means the path must be free of + * On Unix, this means the path must be free of * symbolic links/aliases, and on Windows it means we want the * long form, with that long form's case-dependence (which gives * us a unique, case-dependent path). @@ -1319,7 +1316,7 @@ Tcl_FSData(fsPtr) * If the filesystem-specific normalizePathProcs can re-introduce * ../, ./ sequences into the path, then this function will * not return the correct result. This may be possible with - * symbolic links on unix/macos. + * symbolic links on unix. * * Important assumption: if startAt is non-zero, it must point * to a directory separator that we know exists and is already @@ -2141,7 +2138,7 @@ Tcl_FSUtime (pathPtr, tval) * attributes' subcommand, for the native filesystem, for listing * the set of possible attribute strings. This function is part * of Tcl's native filesystem support, and is placed here because - * it is shared by Unix, MacOS and Windows code. + * it is shared by Unix and Windows code. * * Results: * An array of strings @@ -2169,7 +2166,7 @@ NativeFileAttrStrings(pathPtr, objPtrRef) * 'file attributes' subcommand, for the native * filesystem, for 'get' operations. This function is part * of Tcl's native filesystem support, and is placed here - * because it is shared by Unix, MacOS and Windows code. + * because it is shared by Unix and Windows code. * * Results: * Standard Tcl return code. The object placed in objPtrRef @@ -2204,7 +2201,7 @@ NativeFileAttrsGet(interp, index, pathPtr, objPtrRef) * 'file attributes' subcommand, for the native * filesystem, for 'set' operations. This function is part * of Tcl's native filesystem support, and is placed here - * because it is shared by Unix, MacOS and Windows code. + * because it is shared by Unix and Windows code. * * Results: * Standard Tcl return code. @@ -2882,7 +2879,7 @@ TclLoadFile(interp, pathPtr, symc, symbols, procPtrs, FsDivertLoad *tvdlPtr; int retVal; -#if !defined(__WIN32__) && !defined(MAC_TCL) +#if !defined(__WIN32__) /* * Do we need to set appropriate permissions * on the file? This may be required on some @@ -3469,7 +3466,7 @@ TclGetPathType(pathPtr, filesystemPtrPtr, driveNameLengthPtr, driveNameRef) * We want to skip the native filesystem in this loop because * otherwise we won't necessarily pass all the Tcl testsuite -- * this is because some of the tests artificially change the - * current platform (between mac, win, unix) but the list + * current platform (between win, unix) but the list * of volumes we get by calling (*proc) will reflect the current * (real) platform only and this may cause some tests to fail. * In particular, on unix '/' will match the beginning of @@ -3957,7 +3954,7 @@ Tcl_FSGetFileSystemForPath(pathPtr) * * Tcl_FSGetNativePath -- * - * This function is for use by the Win/Unix/MacOS native filesystems, + * This function is for use by the Win/Unix native filesystems, * so that they can easily retrieve the native (char* or TCHAR*) * representation of a path. Other filesystems will probably * want to implement similar functions. They basically act as a @@ -3970,10 +3967,9 @@ Tcl_FSGetFileSystemForPath(pathPtr) * * Note: in the future it might be desireable to have separate * versions of this function with different signatures, for - * example Tcl_FSGetNativeMacPath, Tcl_FSGetNativeUnixPath etc. + * example Tcl_FSGetNativeWinPath, Tcl_FSGetNativeUnixPath etc. * Right now, since native paths are all string based, we use just - * one function. On MacOS we could possibly use an FSSpec or - * FSRef as the native representation. + * one function. * * Results: * NULL or a valid native path. @@ -4155,7 +4151,7 @@ TclNativeDupInternalRep(clientData) len = sizeof(char) + (strlen((CONST char*)clientData) * sizeof(char)); } #else - /* ansi representation when running on Unix/MacOS */ + /* ansi representation when running on Unix */ len = sizeof(char) + (strlen((CONST char*)clientData) * sizeof(char)); #endif @@ -4294,9 +4290,6 @@ NativeFilesystemSeparator(pathPtr) case TCL_PLATFORM_WINDOWS: separator = "\\"; break; - case TCL_PLATFORM_MAC: - separator = ":"; - break; } return Tcl_NewStringObj(separator,1); } diff --git a/generic/tclInitScript.h b/generic/tclInitScript.h index 1165e9f..18b8cb7 100644 --- a/generic/tclInitScript.h +++ b/generic/tclInitScript.h @@ -2,13 +2,12 @@ * tclInitScript.h -- * * This file contains Unix & Windows common init script - * It is not used on the Mac. (the mac init script is in tclMacInit.c) * * Copyright (c) 1998 Sun Microsystems, Inc. * Copyright (c) 1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclInitScript.h,v 1.14 2004/03/09 12:59:05 vincentdarley Exp $ + * RCS: @(#) $Id: tclInitScript.h,v 1.15 2004/03/17 18:14:13 das Exp $ */ /* diff --git a/generic/tclInt.decls b/generic/tclInt.decls index b9dae7e..5262c6d 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -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: tclInt.decls,v 1.68 2004/01/21 19:59:33 vincentdarley Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.69 2004/03/17 18:14:13 das Exp $ library tcl @@ -742,117 +742,6 @@ declare 181 generic { interface tclIntPlat -######################## -# Mac specific internals - -declare 0 mac { - VOID *TclpSysAlloc(long size, int isBin) -} -declare 1 mac { - void TclpSysFree(VOID *ptr) -} -declare 2 mac { - VOID *TclpSysRealloc(VOID *cp, unsigned int size) -} -declare 3 mac { - void TclpExit(int status) -} - -# Prototypes for functions found in the tclMacUtil.c compatability library. - -declare 4 mac { - int FSpGetDefaultDir(FSSpecPtr theSpec) -} -declare 5 mac { - int FSpSetDefaultDir(FSSpecPtr theSpec) -} -declare 6 mac { - OSErr FSpFindFolder(short vRefNum, OSType folderType, - Boolean createFolder, FSSpec *spec) -} -declare 7 mac { - void GetGlobalMouseTcl(Point *mouse) -} - -# 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. - -declare 8 mac { - pascal OSErr FSpGetDirectoryIDTcl(CONST FSSpec *spec, long *theDirID, - Boolean *isDirectory) -} -declare 9 mac { - pascal short FSpOpenResFileCompatTcl(CONST FSSpec *spec, - SignedByte permission) -} -declare 10 mac { - pascal void FSpCreateResFileCompatTcl(CONST FSSpec *spec, OSType creator, - OSType fileType, ScriptCode scriptTag) -} - -# Like the MoreFiles routines these fix problems in the standard -# Mac calls. These routines are from tclMacUtils.h. - -declare 11 mac { - int FSpLocationFromPath(int length, CONST char *path, FSSpecPtr theSpec) -} -declare 12 mac { - OSErr FSpPathFromLocation(FSSpecPtr theSpec, int *length, - Handle *fullPath) -} - -# Prototypes of Mac only internal functions. - -declare 13 mac { - void TclMacExitHandler(void) -} -declare 14 mac { - void TclMacInitExitToShell(int usePatch) -} -declare 15 mac { - OSErr TclMacInstallExitToShellPatch(ExitToShellProcPtr newProc) -} -declare 16 mac { - int TclMacOSErrorToPosixError(int error) -} -declare 17 mac { - void TclMacRemoveTimer(void *timerToken) -} -declare 18 mac { - void *TclMacStartTimer(long ms) -} -declare 19 mac { - int TclMacTimerExpired(void *timerToken) -} -declare 20 mac { - int TclMacRegisterResourceFork(short fileRef, Tcl_Obj *tokenPtr, - int insert) -} -declare 21 mac { - short TclMacUnRegisterResourceFork(char *tokenPtr, Tcl_Obj *resultPtr) -} -declare 22 mac { - int TclMacCreateEnv(void) -} -declare 23 mac { - FILE *TclMacFOpenHack(CONST char *path, CONST char *mode) -} -# Replaced in 8.1 by TclpReadLink: -# declare 24 mac { -# int TclMacReadlink(char *path, char *buf, int size) -# } -declare 24 mac { - char *TclpGetTZName(int isdst) -} -declare 25 mac { - int TclMacChmod(CONST char *path, int mode) -} -# version of FSpLocationFromPath that doesn't resolve the last path component -declare 26 mac { - int FSpLLocationFromPath(int length, CONST char *path, FSSpecPtr theSpec) -} - ############################ # Windows specific internals diff --git a/generic/tclInt.h b/generic/tclInt.h index bd52922..c97d68a 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.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: tclInt.h,v 1.146 2004/03/09 12:59:05 vincentdarley Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.147 2004/03/17 18:14:13 das Exp $ */ #ifndef _TCLINT @@ -1430,9 +1430,8 @@ typedef struct Interp { */ typedef enum { - TCL_PLATFORM_UNIX, /* Any Unix-like OS. */ - TCL_PLATFORM_MAC, /* MacOS. */ - TCL_PLATFORM_WINDOWS /* Any Microsoft Windows OS. */ + TCL_PLATFORM_UNIX = 0, /* Any Unix-like OS. */ + TCL_PLATFORM_WINDOWS = 2 /* Any Microsoft Windows OS. */ } TclPlatformType; /* @@ -2027,25 +2026,6 @@ EXTERN int Tcl_WhileObjCmd _ANSI_ARGS_((ClientData clientData, /* *---------------------------------------------------------------- - * Command procedures found only in the Mac version of the core: - *---------------------------------------------------------------- - */ - -#ifdef MAC_TCL -EXTERN int Tcl_EchoCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int argc, CONST84 char **argv)); -EXTERN int Tcl_LsObjCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); -EXTERN int Tcl_BeepObjCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); -EXTERN int Tcl_MacSourceObjCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); -EXTERN int Tcl_ResourceObjCmd _ANSI_ARGS_((ClientData clientData, - Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])); -#endif - -/* - *---------------------------------------------------------------- * Compilation procedures for commands in the generic core: *---------------------------------------------------------------- */ diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 0d2e455..cc160d2 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.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: tclIntDecls.h,v 1.56 2004/01/21 19:59:33 vincentdarley Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.57 2004/03/17 18:14:13 das Exp $ */ #ifndef _TCLINTDECLS @@ -48,7 +48,7 @@ EXTERN int TclAccessInsertProc _ANSI_ARGS_(( EXTERN void TclAllocateFreeObjects _ANSI_ARGS_((void)); #endif /* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclCleanupChildren_TCL_DECLARED #define TclCleanupChildren_TCL_DECLARED /* 5 */ @@ -84,7 +84,7 @@ EXTERN int TclCopyChannel _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclCreatePipeline_TCL_DECLARED #define TclCreatePipeline_TCL_DECLARED /* 9 */ @@ -502,7 +502,7 @@ EXTERN void TclSetupEnv _ANSI_ARGS_((Tcl_Interp * interp)); EXTERN int TclSockGetPort _ANSI_ARGS_((Tcl_Interp * interp, char * str, char * proto, int * portPtr)); #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclSockMinimumBuffers_TCL_DECLARED #define TclSockMinimumBuffers_TCL_DECLARED /* 104 */ @@ -961,27 +961,21 @@ typedef struct TclIntStubs { int (*tclAccessInsertProc) _ANSI_ARGS_((TclAccessProc_ * proc)); /* 2 */ void (*tclAllocateFreeObjects) _ANSI_ARGS_((void)); /* 3 */ void *reserved4; -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ int (*tclCleanupChildren) _ANSI_ARGS_((Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan)); /* 5 */ #endif /* UNIX */ #ifdef __WIN32__ int (*tclCleanupChildren) _ANSI_ARGS_((Tcl_Interp * interp, int numPids, Tcl_Pid * pidPtr, Tcl_Channel errorChan)); /* 5 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved5; -#endif /* MAC_TCL */ void (*tclCleanupCommand) _ANSI_ARGS_((Command * cmdPtr)); /* 6 */ int (*tclCopyAndCollapse) _ANSI_ARGS_((int count, CONST char * src, char * dst)); /* 7 */ int (*tclCopyChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel inChan, Tcl_Channel outChan, int toRead, Tcl_Obj * cmdPtr)); /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ int (*tclCreatePipeline) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr)); /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ int (*tclCreatePipeline) _ANSI_ARGS_((Tcl_Interp * interp, int argc, CONST char ** argv, Tcl_Pid ** pidArrayPtr, TclFile * inPipePtr, TclFile * outPipePtr, TclFile * errFilePtr)); /* 9 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved9; -#endif /* MAC_TCL */ int (*tclCreateProc) _ANSI_ARGS_((Tcl_Interp * interp, Namespace * nsPtr, CONST char * procName, Tcl_Obj * argsPtr, Tcl_Obj * bodyPtr, Proc ** procPtrPtr)); /* 10 */ void (*tclDeleteCompiledLocalVars) _ANSI_ARGS_((Interp * iPtr, CallFrame * framePtr)); /* 11 */ void (*tclDeleteVars) _ANSI_ARGS_((Interp * iPtr, Tcl_HashTable * tablePtr)); /* 12 */ @@ -1076,15 +1070,12 @@ typedef struct TclIntStubs { char * (*tclSetPreInitScript) _ANSI_ARGS_((char * string)); /* 101 */ void (*tclSetupEnv) _ANSI_ARGS_((Tcl_Interp * interp)); /* 102 */ int (*tclSockGetPort) _ANSI_ARGS_((Tcl_Interp * interp, char * str, char * proto, int * portPtr)); /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ int (*tclSockMinimumBuffers) _ANSI_ARGS_((int sock, int size)); /* 104 */ #endif /* UNIX */ #ifdef __WIN32__ int (*tclSockMinimumBuffers) _ANSI_ARGS_((int sock, int size)); /* 104 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void *reserved104; -#endif /* MAC_TCL */ void *reserved105; int (*tclStatDeleteProc) _ANSI_ARGS_((TclStatProc_ * proc)); /* 106 */ int (*tclStatInsertProc) _ANSI_ARGS_((TclStatProc_ * proc)); /* 107 */ @@ -1192,7 +1183,7 @@ extern TclIntStubs *tclIntStubsPtr; (tclIntStubsPtr->tclAllocateFreeObjects) /* 3 */ #endif /* Slot 4 is reserved */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclCleanupChildren #define TclCleanupChildren \ (tclIntStubsPtr->tclCleanupChildren) /* 5 */ @@ -1216,7 +1207,7 @@ extern TclIntStubs *tclIntStubsPtr; #define TclCopyChannel \ (tclIntStubsPtr->tclCopyChannel) /* 8 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclCreatePipeline #define TclCreatePipeline \ (tclIntStubsPtr->tclCreatePipeline) /* 9 */ @@ -1505,7 +1496,7 @@ extern TclIntStubs *tclIntStubsPtr; #define TclSockGetPort \ (tclIntStubsPtr->tclSockGetPort) /* 103 */ #endif -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclSockMinimumBuffers #define TclSockMinimumBuffers \ (tclIntStubsPtr->tclSockMinimumBuffers) /* 104 */ diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h index 8863e01..0d5bf30 100644 --- a/generic/tclIntPlatDecls.h +++ b/generic/tclIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.21 2003/08/25 21:05:16 dkf Exp $ + * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.22 2004/03/17 18:14:13 das Exp $ */ #ifndef _TCLINTPLATDECLS @@ -27,7 +27,7 @@ * Exported function declarations: */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclGetAndDetachPids_TCL_DECLARED #define TclGetAndDetachPids_TCL_DECLARED /* 0 */ @@ -259,159 +259,6 @@ EXTERN void TclWinFlushDirtyChannels _ANSI_ARGS_((void)); EXTERN void TclWinResetInterfaces _ANSI_ARGS_((void)); #endif #endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TclpSysAlloc_TCL_DECLARED -#define TclpSysAlloc_TCL_DECLARED -/* 0 */ -EXTERN VOID * TclpSysAlloc _ANSI_ARGS_((long size, int isBin)); -#endif -#ifndef TclpSysFree_TCL_DECLARED -#define TclpSysFree_TCL_DECLARED -/* 1 */ -EXTERN void TclpSysFree _ANSI_ARGS_((VOID * ptr)); -#endif -#ifndef TclpSysRealloc_TCL_DECLARED -#define TclpSysRealloc_TCL_DECLARED -/* 2 */ -EXTERN VOID * TclpSysRealloc _ANSI_ARGS_((VOID * cp, - unsigned int size)); -#endif -#ifndef TclpExit_TCL_DECLARED -#define TclpExit_TCL_DECLARED -/* 3 */ -EXTERN void TclpExit _ANSI_ARGS_((int status)); -#endif -#ifndef FSpGetDefaultDir_TCL_DECLARED -#define FSpGetDefaultDir_TCL_DECLARED -/* 4 */ -EXTERN int FSpGetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec)); -#endif -#ifndef FSpSetDefaultDir_TCL_DECLARED -#define FSpSetDefaultDir_TCL_DECLARED -/* 5 */ -EXTERN int FSpSetDefaultDir _ANSI_ARGS_((FSSpecPtr theSpec)); -#endif -#ifndef FSpFindFolder_TCL_DECLARED -#define FSpFindFolder_TCL_DECLARED -/* 6 */ -EXTERN OSErr FSpFindFolder _ANSI_ARGS_((short vRefNum, - OSType folderType, Boolean createFolder, - FSSpec * spec)); -#endif -#ifndef GetGlobalMouseTcl_TCL_DECLARED -#define GetGlobalMouseTcl_TCL_DECLARED -/* 7 */ -EXTERN void GetGlobalMouseTcl _ANSI_ARGS_((Point * mouse)); -#endif -#ifndef FSpGetDirectoryIDTcl_TCL_DECLARED -#define FSpGetDirectoryIDTcl_TCL_DECLARED -/* 8 */ -EXTERN pascal OSErr FSpGetDirectoryIDTcl _ANSI_ARGS_(( - CONST FSSpec * spec, long * theDirID, - Boolean * isDirectory)); -#endif -#ifndef FSpOpenResFileCompatTcl_TCL_DECLARED -#define FSpOpenResFileCompatTcl_TCL_DECLARED -/* 9 */ -EXTERN pascal short FSpOpenResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, SignedByte permission)); -#endif -#ifndef FSpCreateResFileCompatTcl_TCL_DECLARED -#define FSpCreateResFileCompatTcl_TCL_DECLARED -/* 10 */ -EXTERN pascal void FSpCreateResFileCompatTcl _ANSI_ARGS_(( - CONST FSSpec * spec, OSType creator, - OSType fileType, ScriptCode scriptTag)); -#endif -#ifndef FSpLocationFromPath_TCL_DECLARED -#define FSpLocationFromPath_TCL_DECLARED -/* 11 */ -EXTERN int FSpLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); -#endif -#ifndef FSpPathFromLocation_TCL_DECLARED -#define FSpPathFromLocation_TCL_DECLARED -/* 12 */ -EXTERN OSErr FSpPathFromLocation _ANSI_ARGS_((FSSpecPtr theSpec, - int * length, Handle * fullPath)); -#endif -#ifndef TclMacExitHandler_TCL_DECLARED -#define TclMacExitHandler_TCL_DECLARED -/* 13 */ -EXTERN void TclMacExitHandler _ANSI_ARGS_((void)); -#endif -#ifndef TclMacInitExitToShell_TCL_DECLARED -#define TclMacInitExitToShell_TCL_DECLARED -/* 14 */ -EXTERN void TclMacInitExitToShell _ANSI_ARGS_((int usePatch)); -#endif -#ifndef TclMacInstallExitToShellPatch_TCL_DECLARED -#define TclMacInstallExitToShellPatch_TCL_DECLARED -/* 15 */ -EXTERN OSErr TclMacInstallExitToShellPatch _ANSI_ARGS_(( - ExitToShellProcPtr newProc)); -#endif -#ifndef TclMacOSErrorToPosixError_TCL_DECLARED -#define TclMacOSErrorToPosixError_TCL_DECLARED -/* 16 */ -EXTERN int TclMacOSErrorToPosixError _ANSI_ARGS_((int error)); -#endif -#ifndef TclMacRemoveTimer_TCL_DECLARED -#define TclMacRemoveTimer_TCL_DECLARED -/* 17 */ -EXTERN void TclMacRemoveTimer _ANSI_ARGS_((void * timerToken)); -#endif -#ifndef TclMacStartTimer_TCL_DECLARED -#define TclMacStartTimer_TCL_DECLARED -/* 18 */ -EXTERN void * TclMacStartTimer _ANSI_ARGS_((long ms)); -#endif -#ifndef TclMacTimerExpired_TCL_DECLARED -#define TclMacTimerExpired_TCL_DECLARED -/* 19 */ -EXTERN int TclMacTimerExpired _ANSI_ARGS_((void * timerToken)); -#endif -#ifndef TclMacRegisterResourceFork_TCL_DECLARED -#define TclMacRegisterResourceFork_TCL_DECLARED -/* 20 */ -EXTERN int TclMacRegisterResourceFork _ANSI_ARGS_(( - short fileRef, Tcl_Obj * tokenPtr, - int insert)); -#endif -#ifndef TclMacUnRegisterResourceFork_TCL_DECLARED -#define TclMacUnRegisterResourceFork_TCL_DECLARED -/* 21 */ -EXTERN short TclMacUnRegisterResourceFork _ANSI_ARGS_(( - char * tokenPtr, Tcl_Obj * resultPtr)); -#endif -#ifndef TclMacCreateEnv_TCL_DECLARED -#define TclMacCreateEnv_TCL_DECLARED -/* 22 */ -EXTERN int TclMacCreateEnv _ANSI_ARGS_((void)); -#endif -#ifndef TclMacFOpenHack_TCL_DECLARED -#define TclMacFOpenHack_TCL_DECLARED -/* 23 */ -EXTERN FILE * TclMacFOpenHack _ANSI_ARGS_((CONST char * path, - CONST char * mode)); -#endif -#ifndef TclpGetTZName_TCL_DECLARED -#define TclpGetTZName_TCL_DECLARED -/* 24 */ -EXTERN char * TclpGetTZName _ANSI_ARGS_((int isdst)); -#endif -#ifndef TclMacChmod_TCL_DECLARED -#define TclMacChmod_TCL_DECLARED -/* 25 */ -EXTERN int TclMacChmod _ANSI_ARGS_((CONST char * path, int mode)); -#endif -#ifndef FSpLLocationFromPath_TCL_DECLARED -#define FSpLLocationFromPath_TCL_DECLARED -/* 26 */ -EXTERN int FSpLLocationFromPath _ANSI_ARGS_((int length, - CONST char * path, FSSpecPtr theSpec)); -#endif -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL #ifndef TclMacOSXGetFileAttribute_TCL_DECLARED #define TclMacOSXGetFileAttribute_TCL_DECLARED @@ -441,7 +288,7 @@ typedef struct TclIntPlatStubs { int magic; struct TclIntPlatStubHooks *hooks; -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ void (*tclGetAndDetachPids) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 0 */ int (*tclpCloseFile) _ANSI_ARGS_((TclFile file)); /* 1 */ Tcl_Channel (*tclpCreateCommandChannel) _ANSI_ARGS_((TclFile readFile, TclFile writeFile, TclFile errorFile, int numPids, Tcl_Pid * pidPtr)); /* 2 */ @@ -489,35 +336,6 @@ typedef struct TclIntPlatStubs { void (*tclWinFlushDirtyChannels) _ANSI_ARGS_((void)); /* 27 */ void (*tclWinResetInterfaces) _ANSI_ARGS_((void)); /* 28 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 0 */ - void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 1 */ - VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 2 */ - void (*tclpExit) _ANSI_ARGS_((int status)); /* 3 */ - int (*fSpGetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 4 */ - int (*fSpSetDefaultDir) _ANSI_ARGS_((FSSpecPtr theSpec)); /* 5 */ - OSErr (*fSpFindFolder) _ANSI_ARGS_((short vRefNum, OSType folderType, Boolean createFolder, FSSpec * spec)); /* 6 */ - void (*getGlobalMouseTcl) _ANSI_ARGS_((Point * mouse)); /* 7 */ - pascal OSErr (*fSpGetDirectoryIDTcl) _ANSI_ARGS_((CONST FSSpec * spec, long * theDirID, Boolean * isDirectory)); /* 8 */ - pascal short (*fSpOpenResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, SignedByte permission)); /* 9 */ - pascal void (*fSpCreateResFileCompatTcl) _ANSI_ARGS_((CONST FSSpec * spec, OSType creator, OSType fileType, ScriptCode scriptTag)); /* 10 */ - int (*fSpLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 11 */ - OSErr (*fSpPathFromLocation) _ANSI_ARGS_((FSSpecPtr theSpec, int * length, Handle * fullPath)); /* 12 */ - void (*tclMacExitHandler) _ANSI_ARGS_((void)); /* 13 */ - void (*tclMacInitExitToShell) _ANSI_ARGS_((int usePatch)); /* 14 */ - OSErr (*tclMacInstallExitToShellPatch) _ANSI_ARGS_((ExitToShellProcPtr newProc)); /* 15 */ - int (*tclMacOSErrorToPosixError) _ANSI_ARGS_((int error)); /* 16 */ - void (*tclMacRemoveTimer) _ANSI_ARGS_((void * timerToken)); /* 17 */ - void * (*tclMacStartTimer) _ANSI_ARGS_((long ms)); /* 18 */ - int (*tclMacTimerExpired) _ANSI_ARGS_((void * timerToken)); /* 19 */ - int (*tclMacRegisterResourceFork) _ANSI_ARGS_((short fileRef, Tcl_Obj * tokenPtr, int insert)); /* 20 */ - short (*tclMacUnRegisterResourceFork) _ANSI_ARGS_((char * tokenPtr, Tcl_Obj * resultPtr)); /* 21 */ - int (*tclMacCreateEnv) _ANSI_ARGS_((void)); /* 22 */ - FILE * (*tclMacFOpenHack) _ANSI_ARGS_((CONST char * path, CONST char * mode)); /* 23 */ - char * (*tclpGetTZName) _ANSI_ARGS_((int isdst)); /* 24 */ - int (*tclMacChmod) _ANSI_ARGS_((CONST char * path, int mode)); /* 25 */ - int (*fSpLLocationFromPath) _ANSI_ARGS_((int length, CONST char * path, FSSpecPtr theSpec)); /* 26 */ -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL int (*tclMacOSXGetFileAttribute) _ANSI_ARGS_((Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj ** attributePtrPtr)); /* 15 */ int (*tclMacOSXSetFileAttribute) _ANSI_ARGS_((Tcl_Interp * interp, int objIndex, Tcl_Obj * fileName, Tcl_Obj * attributePtr)); /* 16 */ @@ -539,7 +357,7 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; * Inline function declarations: */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ #ifndef TclGetAndDetachPids #define TclGetAndDetachPids \ (tclIntPlatStubsPtr->tclGetAndDetachPids) /* 0 */ @@ -701,116 +519,6 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr; (tclIntPlatStubsPtr->tclWinResetInterfaces) /* 28 */ #endif #endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef TclpSysAlloc -#define TclpSysAlloc \ - (tclIntPlatStubsPtr->tclpSysAlloc) /* 0 */ -#endif -#ifndef TclpSysFree -#define TclpSysFree \ - (tclIntPlatStubsPtr->tclpSysFree) /* 1 */ -#endif -#ifndef TclpSysRealloc -#define TclpSysRealloc \ - (tclIntPlatStubsPtr->tclpSysRealloc) /* 2 */ -#endif -#ifndef TclpExit -#define TclpExit \ - (tclIntPlatStubsPtr->tclpExit) /* 3 */ -#endif -#ifndef FSpGetDefaultDir -#define FSpGetDefaultDir \ - (tclIntPlatStubsPtr->fSpGetDefaultDir) /* 4 */ -#endif -#ifndef FSpSetDefaultDir -#define FSpSetDefaultDir \ - (tclIntPlatStubsPtr->fSpSetDefaultDir) /* 5 */ -#endif -#ifndef FSpFindFolder -#define FSpFindFolder \ - (tclIntPlatStubsPtr->fSpFindFolder) /* 6 */ -#endif -#ifndef GetGlobalMouseTcl -#define GetGlobalMouseTcl \ - (tclIntPlatStubsPtr->getGlobalMouseTcl) /* 7 */ -#endif -#ifndef FSpGetDirectoryIDTcl -#define FSpGetDirectoryIDTcl \ - (tclIntPlatStubsPtr->fSpGetDirectoryIDTcl) /* 8 */ -#endif -#ifndef FSpOpenResFileCompatTcl -#define FSpOpenResFileCompatTcl \ - (tclIntPlatStubsPtr->fSpOpenResFileCompatTcl) /* 9 */ -#endif -#ifndef FSpCreateResFileCompatTcl -#define FSpCreateResFileCompatTcl \ - (tclIntPlatStubsPtr->fSpCreateResFileCompatTcl) /* 10 */ -#endif -#ifndef FSpLocationFromPath -#define FSpLocationFromPath \ - (tclIntPlatStubsPtr->fSpLocationFromPath) /* 11 */ -#endif -#ifndef FSpPathFromLocation -#define FSpPathFromLocation \ - (tclIntPlatStubsPtr->fSpPathFromLocation) /* 12 */ -#endif -#ifndef TclMacExitHandler -#define TclMacExitHandler \ - (tclIntPlatStubsPtr->tclMacExitHandler) /* 13 */ -#endif -#ifndef TclMacInitExitToShell -#define TclMacInitExitToShell \ - (tclIntPlatStubsPtr->tclMacInitExitToShell) /* 14 */ -#endif -#ifndef TclMacInstallExitToShellPatch -#define TclMacInstallExitToShellPatch \ - (tclIntPlatStubsPtr->tclMacInstallExitToShellPatch) /* 15 */ -#endif -#ifndef TclMacOSErrorToPosixError -#define TclMacOSErrorToPosixError \ - (tclIntPlatStubsPtr->tclMacOSErrorToPosixError) /* 16 */ -#endif -#ifndef TclMacRemoveTimer -#define TclMacRemoveTimer \ - (tclIntPlatStubsPtr->tclMacRemoveTimer) /* 17 */ -#endif -#ifndef TclMacStartTimer -#define TclMacStartTimer \ - (tclIntPlatStubsPtr->tclMacStartTimer) /* 18 */ -#endif -#ifndef TclMacTimerExpired -#define TclMacTimerExpired \ - (tclIntPlatStubsPtr->tclMacTimerExpired) /* 19 */ -#endif -#ifndef TclMacRegisterResourceFork -#define TclMacRegisterResourceFork \ - (tclIntPlatStubsPtr->tclMacRegisterResourceFork) /* 20 */ -#endif -#ifndef TclMacUnRegisterResourceFork -#define TclMacUnRegisterResourceFork \ - (tclIntPlatStubsPtr->tclMacUnRegisterResourceFork) /* 21 */ -#endif -#ifndef TclMacCreateEnv -#define TclMacCreateEnv \ - (tclIntPlatStubsPtr->tclMacCreateEnv) /* 22 */ -#endif -#ifndef TclMacFOpenHack -#define TclMacFOpenHack \ - (tclIntPlatStubsPtr->tclMacFOpenHack) /* 23 */ -#endif -#ifndef TclpGetTZName -#define TclpGetTZName \ - (tclIntPlatStubsPtr->tclpGetTZName) /* 24 */ -#endif -#ifndef TclMacChmod -#define TclMacChmod \ - (tclIntPlatStubsPtr->tclMacChmod) /* 25 */ -#endif -#ifndef FSpLLocationFromPath -#define FSpLLocationFromPath \ - (tclIntPlatStubsPtr->fSpLLocationFromPath) /* 26 */ -#endif -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL #ifndef TclMacOSXGetFileAttribute #define TclMacOSXGetFileAttribute \ diff --git a/generic/tclMain.c b/generic/tclMain.c index 1065951..b98a171 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.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: tclMain.c,v 1.21 2003/09/05 21:52:12 dgp Exp $ + * RCS: @(#) $Id: tclMain.c,v 1.22 2004/03/17 18:14:14 das Exp $ */ #include "tcl.h" @@ -25,11 +25,7 @@ * the Tcl source directory to make their own modified versions). */ -#if !defined(MAC_TCL) extern int isatty _ANSI_ARGS_((int fd)); -#else -#include <unistd.h> -#endif static Tcl_Obj *tclStartupScriptPath = NULL; static Tcl_Obj *tclStartupScriptEncoding = NULL; diff --git a/generic/tclMath.h b/generic/tclMath.h index ee1a02e..69c0f9f 100644 --- a/generic/tclMath.h +++ b/generic/tclMath.h @@ -1,27 +1,20 @@ /* * tclMath.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. + * This file used to be necessary on the Macintosh. + * It is only kept for backward compatibility purposes. * * 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. * - * RCS: @(#) $Id: tclMath.h,v 1.2 1998/09/14 18:40:01 stanton Exp $ + * RCS: @(#) $Id: tclMath.h,v 1.3 2004/03/17 18:14:14 das Exp $ */ #ifndef _TCLMATH #define _TCLMATH -#if defined(MAC_TCL) -# include "tclMacMath.h" -#else -# include <math.h> -#endif +#include <math.h> #endif /* _TCLMATH */ diff --git a/generic/tclNotify.c b/generic/tclNotify.c index 3cdb88f..3627af9 100644 --- a/generic/tclNotify.c +++ b/generic/tclNotify.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: tclNotify.c,v 1.12 2004/03/08 01:51:44 davygrvy Exp $ + * RCS: @(#) $Id: tclNotify.c,v 1.13 2004/03/17 18:14:14 das Exp $ */ #include "tclInt.h" @@ -200,7 +200,7 @@ void Tcl_SetNotifier(notifierProcPtr) Tcl_NotifierProcs *notifierProcPtr; { -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ tclStubs.tcl_CreateFileHandler = notifierProcPtr->createFileHandlerProc; tclStubs.tcl_DeleteFileHandler = notifierProcPtr->deleteFileHandlerProc; #endif diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index f7f2132..cd3f9f9 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,14 +10,11 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.24 2004/03/09 12:59:05 vincentdarley Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.25 2004/03/17 18:14:14 das Exp $ */ #include "tclInt.h" #include "tclPort.h" -#ifdef MAC_TCL -#include "tclMacInt.h" -#endif #include "tclFileSystem.h" /* @@ -131,7 +128,7 @@ typedef struct FsPath { * * A normalized path is one which has all '../', './' removed. * Also it is one which is in the 'standard' format for the native - * platform. On MacOS, Unix, this means the path must be free of + * platform. On Unix, this means the path must be free of * symbolic links/aliases, and on Windows it means we want the * long form, with that long form's case-dependence (which gives * us a unique, case-dependent path). @@ -363,7 +360,7 @@ TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr) * platform. For instance, Unix is case-sensitive, so the * path is ok. Windows is case-insensitive, and also has the * weird 'longname/shortname' thing (e.g. C:/Program Files/ and - * C:/Progra~1/ are equivalent). MacOS is case-insensitive. + * C:/Progra~1/ are equivalent). * * Virtual file systems which may be registered may have * other criteria for normalizing a path. @@ -627,8 +624,7 @@ TclPathPart(interp, pathPtr, portion) resultPtr = Tcl_FSJoinPath(splitPtr, splitElements - 1); } else if (splitElements == 0 || (Tcl_FSGetPathType(pathPtr) == TCL_PATH_RELATIVE)) { - resultPtr = Tcl_NewStringObj( - ((tclPlatform == TCL_PLATFORM_MAC) ? ":" : "."), 1); + resultPtr = Tcl_NewStringObj(".", 1); } else { Tcl_ListObjIndex(NULL, splitPtr, 0, &resultPtr); } @@ -755,7 +751,7 @@ Tcl_FSJoinPath(listObj, elements) return elt; } /* - * If it doesn't begin with '.' and is a mac or unix + * If it doesn't begin with '.' and is a unix * path or it a windows path without backslashes, then we * can be very efficient here. (In fact even a windows * path with backslashes can be joined efficiently, but @@ -786,11 +782,6 @@ Tcl_FSJoinPath(listObj, elements) if (res != NULL) Tcl_DecrRefCount(res); return tail; } - } else if (tclPlatform == TCL_PLATFORM_MAC) { - if (strchr(str, '/') == NULL) { - if (res != NULL) Tcl_DecrRefCount(res); - return tail; - } } } } @@ -841,7 +832,7 @@ Tcl_FSJoinPath(listObj, elements) equal = 0; } } - if (equal && (tclPlatform != TCL_PLATFORM_MAC)) { + if (equal) { ptr = strElt; while (*ptr != '\0') { if (*ptr == '/' && (ptr[1] == '/' || ptr[1] == '\0')) { @@ -850,27 +841,6 @@ Tcl_FSJoinPath(listObj, elements) } ptr++; } - } - if (equal && (tclPlatform == TCL_PLATFORM_MAC)) { - /* - * If it contains any colons, then it mustn't contain - * any duplicates. Otherwise, the path is in unix-form - * and is no good. - */ - if (strchr(strElt, ':') != NULL) { - ptr = strElt; - while (*ptr != '\0') { - if (*ptr == ':' && (ptr[1] == ':' || ptr[1] == '\0')) { - equal = 0; - break; - } - ptr++; - } - } else { - equal = 0; - } - } - if (equal) { if (res != NULL) Tcl_DecrRefCount(res); /* * This element is just what we want to return already - @@ -1036,9 +1006,6 @@ IsSeparatorOrNull(ch) case TCL_PLATFORM_UNIX: { return (ch == '/' ? 1 : 0); } - case TCL_PLATFORM_MAC: { - return (ch == ':' ? 1 : 0); - } case TCL_PLATFORM_WINDOWS: { return ((ch == '/' || ch == '\\') ? 1 : 0); } @@ -1059,7 +1026,6 @@ FindSplitPos(path, separator) int count = 0; switch (tclPlatform) { case TCL_PLATFORM_UNIX: - case TCL_PLATFORM_MAC: while (path[count] != 0) { if (path[count] == separator) { return count; @@ -1115,18 +1081,6 @@ TclNewFSPathObj(Tcl_Obj *dirPtr, CONST char *addStrRep, int len) pathPtr = Tcl_NewObj(); fsPathPtr = (FsPath*)ckalloc((unsigned)sizeof(FsPath)); - if (tclPlatform == TCL_PLATFORM_MAC) { - /* - * Mac relative paths may begin with a directory separator ':'. - * If present, we need to skip this ':' because we assume that - * we can join dirPtr and addStrRep by concatenating them as - * strings (and we ensure that dirPtr is terminated by a ':'). - */ - if (addStrRep[0] == ':') { - addStrRep++; - len--; - } - } /* Setup the path */ fsPathPtr->translatedPathPtr = NULL; fsPathPtr->normPathPtr = Tcl_NewStringObj(addStrRep, len); @@ -1251,11 +1205,6 @@ TclFSMakePathRelative(interp, pathPtr, cwdPtr) cwdLen++; } break; - case TCL_PLATFORM_MAC: - if (tempStr[cwdLen-1] != ':') { - cwdLen++; - } - break; } tempStr = Tcl_GetStringFromObj(pathPtr, &len); @@ -1574,12 +1523,6 @@ Tcl_FSGetNormalizedPath(interp, pathPtr) cwdLen++; } break; - case TCL_PLATFORM_MAC: - if (cwdStr[cwdLen-1] != ':') { - Tcl_AppendToObj(copy, ":", 1); - cwdLen++; - } - break; } Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr); /* @@ -1662,12 +1605,6 @@ Tcl_FSGetNormalizedPath(interp, pathPtr) cwdLen++; } break; - case TCL_PLATFORM_MAC: - if (cwdStr[cwdLen-1] != ':') { - Tcl_AppendToObj(copy, ":", 1); - cwdLen++; - } - break; } Tcl_AppendObjToObj(copy, pathPtr); /* @@ -2104,8 +2041,8 @@ SetFsPathFromAny(interp, pathPtr) * We remove any trailing directory separator. * * However, the split/join routines are quite complex, and - * one has to make sure not to break anything on Unix, Win - * or MacOS (fCmd.test, fileName.test and cmdAH.test exercise + * one has to make sure not to break anything on Unix or Win + * (fCmd.test, fileName.test and cmdAH.test exercise * most of the code). */ name = Tcl_GetStringFromObj(pathPtr,&len); @@ -2119,10 +2056,6 @@ SetFsPathFromAny(interp, pathPtr) int split; char separator='/'; - if (tclPlatform==TCL_PLATFORM_MAC) { - if (strchr(name, ':') != NULL) separator = ':'; - } - split = FindSplitPos(name, separator); if (split != len) { /* We have multiple pieces '~user/foo/bar...' */ @@ -2418,12 +2351,6 @@ UpdateStringOfFsPath(pathPtr) } } break; - case TCL_PLATFORM_MAC: - if (cwdStr[cwdLen-1] != ':') { - Tcl_AppendToObj(copy, ":", 1); - cwdLen++; - } - break; } Tcl_AppendObjToObj(copy, fsPathPtr->normPathPtr); pathPtr->bytes = Tcl_GetStringFromObj(copy, &cwdLen); diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index dc99b53..2a5bd84 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.20 2003/08/25 21:05:16 dkf Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.21 2004/03/17 18:14:14 das Exp $ */ #ifndef _TCLPLATDECLS @@ -50,65 +50,6 @@ EXTERN char * Tcl_WinTCharToUtf _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); #endif #endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef Tcl_MacSetEventProc_TCL_DECLARED -#define Tcl_MacSetEventProc_TCL_DECLARED -/* 0 */ -EXTERN void Tcl_MacSetEventProc _ANSI_ARGS_(( - Tcl_MacConvertEventPtr procPtr)); -#endif -#ifndef Tcl_MacConvertTextResource_TCL_DECLARED -#define Tcl_MacConvertTextResource_TCL_DECLARED -/* 1 */ -EXTERN char * Tcl_MacConvertTextResource _ANSI_ARGS_(( - Handle resource)); -#endif -#ifndef Tcl_MacEvalResource_TCL_DECLARED -#define Tcl_MacEvalResource_TCL_DECLARED -/* 2 */ -EXTERN int Tcl_MacEvalResource _ANSI_ARGS_((Tcl_Interp * interp, - CONST char * resourceName, - int resourceNumber, CONST char * fileName)); -#endif -#ifndef Tcl_MacFindResource_TCL_DECLARED -#define Tcl_MacFindResource_TCL_DECLARED -/* 3 */ -EXTERN Handle Tcl_MacFindResource _ANSI_ARGS_((Tcl_Interp * interp, - long resourceType, CONST char * resourceName, - int resourceNumber, CONST char * resFileRef, - int * releaseIt)); -#endif -#ifndef Tcl_GetOSTypeFromObj_TCL_DECLARED -#define Tcl_GetOSTypeFromObj_TCL_DECLARED -/* 4 */ -EXTERN int Tcl_GetOSTypeFromObj _ANSI_ARGS_(( - Tcl_Interp * interp, Tcl_Obj * objPtr, - OSType * osTypePtr)); -#endif -#ifndef Tcl_SetOSTypeObj_TCL_DECLARED -#define Tcl_SetOSTypeObj_TCL_DECLARED -/* 5 */ -EXTERN void Tcl_SetOSTypeObj _ANSI_ARGS_((Tcl_Obj * objPtr, - OSType osType)); -#endif -#ifndef Tcl_NewOSTypeObj_TCL_DECLARED -#define Tcl_NewOSTypeObj_TCL_DECLARED -/* 6 */ -EXTERN Tcl_Obj * Tcl_NewOSTypeObj _ANSI_ARGS_((OSType osType)); -#endif -#ifndef strncasecmp_TCL_DECLARED -#define strncasecmp_TCL_DECLARED -/* 7 */ -EXTERN int strncasecmp _ANSI_ARGS_((CONST char * s1, - CONST char * s2, size_t n)); -#endif -#ifndef strcasecmp_TCL_DECLARED -#define strcasecmp_TCL_DECLARED -/* 8 */ -EXTERN int strcasecmp _ANSI_ARGS_((CONST char * s1, - CONST char * s2)); -#endif -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL #ifndef Tcl_MacOSXOpenBundleResources_TCL_DECLARED #define Tcl_MacOSXOpenBundleResources_TCL_DECLARED @@ -137,17 +78,6 @@ typedef struct TclPlatStubs { TCHAR * (*tcl_WinUtfToTChar) _ANSI_ARGS_((CONST char * str, int len, Tcl_DString * dsPtr)); /* 0 */ char * (*tcl_WinTCharToUtf) _ANSI_ARGS_((CONST TCHAR * str, int len, Tcl_DString * dsPtr)); /* 1 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - void (*tcl_MacSetEventProc) _ANSI_ARGS_((Tcl_MacConvertEventPtr procPtr)); /* 0 */ - char * (*tcl_MacConvertTextResource) _ANSI_ARGS_((Handle resource)); /* 1 */ - int (*tcl_MacEvalResource) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * resourceName, int resourceNumber, CONST char * fileName)); /* 2 */ - Handle (*tcl_MacFindResource) _ANSI_ARGS_((Tcl_Interp * interp, long resourceType, CONST char * resourceName, int resourceNumber, CONST char * resFileRef, int * releaseIt)); /* 3 */ - int (*tcl_GetOSTypeFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, OSType * osTypePtr)); /* 4 */ - void (*tcl_SetOSTypeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, OSType osType)); /* 5 */ - Tcl_Obj * (*tcl_NewOSTypeObj) _ANSI_ARGS_((OSType osType)); /* 6 */ - int (*strncasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2, size_t n)); /* 7 */ - int (*strcasecmp) _ANSI_ARGS_((CONST char * s1, CONST char * s2)); /* 8 */ -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL int (*tcl_MacOSXOpenBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 0 */ int (*tcl_MacOSXOpenVersionedBundleResources) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * bundleName, CONST char * bundleVersion, int hasResourceFile, int maxPathLen, char * libraryPath)); /* 1 */ @@ -178,44 +108,6 @@ extern TclPlatStubs *tclPlatStubsPtr; (tclPlatStubsPtr->tcl_WinTCharToUtf) /* 1 */ #endif #endif /* __WIN32__ */ -#ifdef MAC_TCL -#ifndef Tcl_MacSetEventProc -#define Tcl_MacSetEventProc \ - (tclPlatStubsPtr->tcl_MacSetEventProc) /* 0 */ -#endif -#ifndef Tcl_MacConvertTextResource -#define Tcl_MacConvertTextResource \ - (tclPlatStubsPtr->tcl_MacConvertTextResource) /* 1 */ -#endif -#ifndef Tcl_MacEvalResource -#define Tcl_MacEvalResource \ - (tclPlatStubsPtr->tcl_MacEvalResource) /* 2 */ -#endif -#ifndef Tcl_MacFindResource -#define Tcl_MacFindResource \ - (tclPlatStubsPtr->tcl_MacFindResource) /* 3 */ -#endif -#ifndef Tcl_GetOSTypeFromObj -#define Tcl_GetOSTypeFromObj \ - (tclPlatStubsPtr->tcl_GetOSTypeFromObj) /* 4 */ -#endif -#ifndef Tcl_SetOSTypeObj -#define Tcl_SetOSTypeObj \ - (tclPlatStubsPtr->tcl_SetOSTypeObj) /* 5 */ -#endif -#ifndef Tcl_NewOSTypeObj -#define Tcl_NewOSTypeObj \ - (tclPlatStubsPtr->tcl_NewOSTypeObj) /* 6 */ -#endif -#ifndef strncasecmp -#define strncasecmp \ - (tclPlatStubsPtr->strncasecmp) /* 7 */ -#endif -#ifndef strcasecmp -#define strcasecmp \ - (tclPlatStubsPtr->strcasecmp) /* 8 */ -#endif -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL #ifndef Tcl_MacOSXOpenBundleResources #define Tcl_MacOSXOpenBundleResources \ diff --git a/generic/tclPort.h b/generic/tclPort.h index 2f07167..2f82fa1 100644 --- a/generic/tclPort.h +++ b/generic/tclPort.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: tclPort.h,v 1.7 2003/04/16 23:33:44 dgp Exp $ + * RCS: @(#) $Id: tclPort.h,v 1.8 2004/03/17 18:14:14 das Exp $ */ #ifndef _TCLPORT @@ -21,11 +21,7 @@ #if defined(__WIN32__) # include "../win/tclWinPort.h" #else -# if defined(MAC_TCL) -# include "tclMacPort.h" -# else -# include "../unix/tclUnixPort.h" -# endif +# include "../unix/tclUnixPort.h" #endif #if !defined(LLONG_MIN) diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 098a44c..91be201 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.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: tclStubInit.c,v 1.92 2004/01/21 19:59:33 vincentdarley Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.93 2004/03/17 18:14:14 das Exp $ */ #include "tclInt.h" @@ -46,7 +46,7 @@ Tcl_NotifierProcs tclOriginalNotifier = { Tcl_SetTimer, Tcl_WaitForEvent, -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_CreateFileHandler, Tcl_DeleteFileHandler, #else @@ -75,27 +75,21 @@ TclIntStubs tclIntStubs = { TclAccessInsertProc, /* 2 */ TclAllocateFreeObjects, /* 3 */ NULL, /* 4 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ TclCleanupChildren, /* 5 */ #endif /* UNIX */ #ifdef __WIN32__ TclCleanupChildren, /* 5 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 5 */ -#endif /* MAC_TCL */ TclCleanupCommand, /* 6 */ TclCopyAndCollapse, /* 7 */ TclCopyChannel, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ TclCreatePipeline, /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ TclCreatePipeline, /* 9 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 9 */ -#endif /* MAC_TCL */ TclCreateProc, /* 10 */ TclDeleteCompiledLocalVars, /* 11 */ TclDeleteVars, /* 12 */ @@ -190,15 +184,12 @@ TclIntStubs tclIntStubs = { TclSetPreInitScript, /* 101 */ TclSetupEnv, /* 102 */ TclSockGetPort, /* 103 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ TclSockMinimumBuffers, /* 104 */ #endif /* UNIX */ #ifdef __WIN32__ TclSockMinimumBuffers, /* 104 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 104 */ -#endif /* MAC_TCL */ NULL, /* 105 */ TclStatDeleteProc, /* 106 */ TclStatInsertProc, /* 107 */ @@ -281,7 +272,7 @@ TclIntStubs tclIntStubs = { TclIntPlatStubs tclIntPlatStubs = { TCL_STUB_MAGIC, NULL, -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ TclGetAndDetachPids, /* 0 */ TclpCloseFile, /* 1 */ TclpCreateCommandChannel, /* 2 */ @@ -329,35 +320,6 @@ TclIntPlatStubs tclIntPlatStubs = { TclWinFlushDirtyChannels, /* 27 */ TclWinResetInterfaces, /* 28 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - TclpSysAlloc, /* 0 */ - TclpSysFree, /* 1 */ - TclpSysRealloc, /* 2 */ - TclpExit, /* 3 */ - FSpGetDefaultDir, /* 4 */ - FSpSetDefaultDir, /* 5 */ - FSpFindFolder, /* 6 */ - GetGlobalMouseTcl, /* 7 */ - FSpGetDirectoryIDTcl, /* 8 */ - FSpOpenResFileCompatTcl, /* 9 */ - FSpCreateResFileCompatTcl, /* 10 */ - FSpLocationFromPath, /* 11 */ - FSpPathFromLocation, /* 12 */ - TclMacExitHandler, /* 13 */ - TclMacInitExitToShell, /* 14 */ - TclMacInstallExitToShellPatch, /* 15 */ - TclMacOSErrorToPosixError, /* 16 */ - TclMacRemoveTimer, /* 17 */ - TclMacStartTimer, /* 18 */ - TclMacTimerExpired, /* 19 */ - TclMacRegisterResourceFork, /* 20 */ - TclMacUnRegisterResourceFork, /* 21 */ - TclMacCreateEnv, /* 22 */ - TclMacFOpenHack, /* 23 */ - TclpGetTZName, /* 24 */ - TclMacChmod, /* 25 */ - FSpLLocationFromPath, /* 26 */ -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL TclMacOSXGetFileAttribute, /* 15 */ TclMacOSXSetFileAttribute, /* 16 */ @@ -372,17 +334,6 @@ TclPlatStubs tclPlatStubs = { Tcl_WinUtfToTChar, /* 0 */ Tcl_WinTCharToUtf, /* 1 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - Tcl_MacSetEventProc, /* 0 */ - Tcl_MacConvertTextResource, /* 1 */ - Tcl_MacEvalResource, /* 2 */ - Tcl_MacFindResource, /* 3 */ - Tcl_GetOSTypeFromObj, /* 4 */ - Tcl_SetOSTypeObj, /* 5 */ - Tcl_NewOSTypeObj, /* 6 */ - strncasecmp, /* 7 */ - strcasecmp, /* 8 */ -#endif /* MAC_TCL */ #ifdef MAC_OSX_TCL Tcl_MacOSXOpenBundleResources, /* 0 */ Tcl_MacOSXOpenVersionedBundleResources, /* 1 */ @@ -407,24 +358,18 @@ TclStubs tclStubs = { Tcl_DbCkalloc, /* 6 */ Tcl_DbCkfree, /* 7 */ Tcl_DbCkrealloc, /* 8 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_CreateFileHandler, /* 9 */ #endif /* UNIX */ #ifdef __WIN32__ NULL, /* 9 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 9 */ -#endif /* MAC_TCL */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_DeleteFileHandler, /* 10 */ #endif /* UNIX */ #ifdef __WIN32__ NULL, /* 10 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 10 */ -#endif /* MAC_TCL */ Tcl_SetTimer, /* 11 */ Tcl_Sleep, /* 12 */ Tcl_WaitForEvent, /* 13 */ @@ -525,15 +470,12 @@ TclStubs tclStubs = { Tcl_DeleteHashEntry, /* 108 */ Tcl_DeleteHashTable, /* 109 */ Tcl_DeleteInterp, /* 110 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_DetachPids, /* 111 */ #endif /* UNIX */ #ifdef __WIN32__ Tcl_DetachPids, /* 111 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 111 */ -#endif /* MAC_TCL */ Tcl_DeleteTimerHandler, /* 112 */ Tcl_DeleteTrace, /* 113 */ Tcl_DontCallWhenDeleted, /* 114 */ @@ -589,15 +531,12 @@ TclStubs tclStubs = { Tcl_GetMaster, /* 164 */ Tcl_GetNameOfExecutable, /* 165 */ Tcl_GetObjResult, /* 166 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_GetOpenFile, /* 167 */ #endif /* UNIX */ #ifdef __WIN32__ NULL, /* 167 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 167 */ -#endif /* MAC_TCL */ Tcl_GetPathType, /* 168 */ Tcl_Gets, /* 169 */ Tcl_GetsObj, /* 170 */ @@ -627,15 +566,12 @@ TclStubs tclStubs = { Tcl_NotifyChannel, /* 194 */ Tcl_ObjGetVar2, /* 195 */ Tcl_ObjSetVar2, /* 196 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_OpenCommandChannel, /* 197 */ #endif /* UNIX */ #ifdef __WIN32__ Tcl_OpenCommandChannel, /* 197 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 197 */ -#endif /* MAC_TCL */ Tcl_OpenFileChannel, /* 198 */ Tcl_OpenTcpClient, /* 199 */ Tcl_OpenTcpServer, /* 200 */ @@ -645,15 +581,12 @@ TclStubs tclStubs = { Tcl_PosixError, /* 204 */ Tcl_QueueEvent, /* 205 */ Tcl_Read, /* 206 */ -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ +#if !defined(__WIN32__) /* UNIX */ Tcl_ReapDetachedProcs, /* 207 */ #endif /* UNIX */ #ifdef __WIN32__ Tcl_ReapDetachedProcs, /* 207 */ #endif /* __WIN32__ */ -#ifdef MAC_TCL - NULL, /* 207 */ -#endif /* MAC_TCL */ Tcl_RecordAndEval, /* 208 */ Tcl_RecordAndEvalObj, /* 209 */ Tcl_RegisterChannel, /* 210 */ diff --git a/generic/tclTest.c b/generic/tclTest.c index b0380f6..93e124f 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.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: tclTest.c,v 1.79 2004/03/08 16:34:23 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.80 2004/03/17 18:14:14 das Exp $ */ #define TCL_TEST @@ -3729,13 +3729,11 @@ TestsetplatformCmd(clientData, interp, argc, argv) length = strlen(argv[1]); if (strncmp(argv[1], "unix", length) == 0) { *platform = TCL_PLATFORM_UNIX; - } else if (strncmp(argv[1], "mac", length) == 0) { - *platform = TCL_PLATFORM_MAC; } else if (strncmp(argv[1], "windows", length) == 0) { *platform = TCL_PLATFORM_WINDOWS; } else { Tcl_AppendResult(interp, "unsupported platform: should be one of ", - "unix, mac, or windows", (char *) NULL); + "unix, or windows", (char *) NULL); return TCL_ERROR; } return TCL_OK; @@ -4043,7 +4041,7 @@ TestpanicCmd(dummy, interp, argc, argv) * TestchmodCmd -- * * Implements the "testchmod" cmd. Used when testing "file" - * command. The only attribute used by the Mac and Windows platforms + * command. The only attribute used by the Windows platform * is the user write flag; if this is not set, the file is * made read-only. Otehrwise, the file is made read-write. * @@ -4810,11 +4808,6 @@ static int PretendTclpStat(path, buf) #endif /* TCL_WIDE_INT_IS_LONG */ } -/* Be careful in the compares in these tests, since the Macintosh puts a - * leading : in the beginning of non-absolute paths before passing them - * into the file command procedures. - */ - static int TestStatProc1(path, buf) CONST char *path; diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c index d3afe33..51d320f 100644 --- a/generic/tclThreadJoin.c +++ b/generic/tclThreadJoin.c @@ -2,8 +2,8 @@ * tclThreadJoin.c -- * * This file implements a platform independent emulation layer for - * the handling of joinable threads. The Mac and Windows platforms - * use this code to provide the functionality of joining threads. + * the handling of joinable threads. The Windows platform + * uses this code to provide the functionality of joining threads. * This code is currently not necessary on Unix. * * Copyright (c) 2000 by Scriptics Corporation @@ -11,12 +11,12 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadJoin.c,v 1.4 2002/04/24 20:35:40 hobbs Exp $ + * RCS: @(#) $Id: tclThreadJoin.c,v 1.5 2004/03/17 18:14:14 das Exp $ */ #include "tclInt.h" -#if defined(WIN32) || defined(MAC_TCL) +#if defined(WIN32) /* The information about each joinable thread is remembered in a * structure as defined below. @@ -308,4 +308,4 @@ TclSignalExitThread(id,result) Tcl_MutexUnlock (&threadPtr->threadMutex); } -#endif /* WIN32 || MAC_TCL */ +#endif /* WIN32 */ |