summaryrefslogtreecommitdiffstats
path: root/src/H5FDlog.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-09 14:34:57 (GMT)
commit15b28ad04ab6894cfd308d7855798b6ed82305bc (patch)
tree88a13218bf1113befc1670e131335bc15d8b7a7d /src/H5FDlog.c
parentee6036e0321ecbb5c4b87fa4fd01942360fbbd18 (diff)
downloadhdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.zip
hdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.tar.gz
hdf5-15b28ad04ab6894cfd308d7855798b6ed82305bc.tar.bz2
[svn-r13125] Description:
Add extra protection for sanity checks, when assertions are enabled. Tested on: Linux/32 2.6 (chicago)
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r--src/H5FDlog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index c317355..06212e8 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -1161,8 +1161,10 @@ H5FD_log_write(H5FD_t *_file, H5FD_mem_t type, hid_t UNUSED dxpl_id, haddr_t add
assert(buf);
/* Verify that we are writing out the type of data we allocated in this location */
- assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[addr] || (H5FD_mem_t)file->flavor[addr]==H5FD_MEM_DEFAULT);
- assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[(addr+size)-1] || (H5FD_mem_t)file->flavor[(addr+size)-1]==H5FD_MEM_DEFAULT);
+ if(file->flavor) {
+ assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[addr] || (H5FD_mem_t)file->flavor[addr]==H5FD_MEM_DEFAULT);
+ assert(type==H5FD_MEM_DEFAULT || type==(H5FD_mem_t)file->flavor[(addr+size)-1] || (H5FD_mem_t)file->flavor[(addr+size)-1]==H5FD_MEM_DEFAULT);
+ } /* end if */
/* Check for overflow conditions */
if (HADDR_UNDEF==addr)
different platforms. There is additional information about building Tcl from sources at diff --git a/compat/string.h b/compat/string.h index 37e5140..c2ecd0b 100644 --- a/compat/string.h +++ b/compat/string.h @@ -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: string.h,v 1.4 2000/07/18 18:16:17 ericm Exp $ + * RCS: @(#) $Id: string.h,v 1.5 2004/03/17 18:14:12 das Exp $ */ #ifndef _STRING @@ -24,9 +24,7 @@ * it exists everywhere) */ -#ifndef MAC_TCL #include -#endif extern char * memchr _ANSI_ARGS_((CONST VOID *s, int c, size_t n)); extern int memcmp _ANSI_ARGS_((CONST VOID *s1, CONST VOID *s2, diff --git a/doc/Encoding.3 b/doc/Encoding.3 index 7d505aa..126bb89 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Encoding.3,v 1.13 2003/07/18 16:56:41 dgp Exp $ +'\" RCS: @(#) $Id: Encoding.3,v 1.14 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures" @@ -230,7 +230,7 @@ is filled with the corresponding number of bytes that were stored in \fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR are Windows-only convenience functions for converting between UTF-8 and Windows strings. On Windows 95 -(as with the Macintosh and Unix operating systems), +(as with the Unix operating system), all strings exchanged between Tcl and the operating system are "char" based. On Windows NT, some strings exchanged between Tcl and the operating system are "char" oriented while others are in Unicode. By diff --git a/doc/FileSystem.3 b/doc/FileSystem.3 index f431e1a..e5ee844 100644 --- a/doc/FileSystem.3 +++ b/doc/FileSystem.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: FileSystem.3,v 1.39 2004/03/09 12:59:04 vincentdarley Exp $ +'\" RCS: @(#) $Id: FileSystem.3,v 1.40 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH Filesystem 3 8.4 Tcl "Tcl Library Procedures" @@ -237,7 +237,7 @@ The elements to join to the given base path. There are several reasons for calling the \fBTcl_FS...\fR functions rather than calling system level functions like \fBaccess\fR and \fBstat\fR directly. First, they will work cross-platform, so an -extension which calls them should work unmodified on Unix, MacOS and +extension which calls them should work unmodified on Unix and Windows. Second, the Windows implementation of some of these functions fixes some bugs in the system level calls. Third, these function calls deal with any 'Utf to platform-native' path conversions which may be @@ -599,12 +599,12 @@ efficient way of creating the appropriate path object type. The resulting object is a pure 'path' object, which will only receive a Utf-8 string representation if that is required by some Tcl code. .PP -\fBTcl_FSGetNativePath\fR is for use by the Win/Unix/MacOS native +\fBTcl_FSGetNativePath\fR is for use by the Win/Unix native filesystems, so that they can easily retrieve the native (char* or TCHAR*) representation of a path. This function is a convenience wrapper around \fBTcl_FSGetInternalRep\fR, and assumes the native representation is string-based. It may be desirable in the future to -have non-string-based native representations (for example, on MacOS, a +have non-string-based native representations (for example, on MacOSX, a representation using a fileSpec of FSRef structure would probably be more efficient). On Windows a full Unicode representation would allow for paths of unlimited length. Currently the representation is simply a diff --git a/doc/Init.3 b/doc/Init.3 index 8066fd3..c375f67 100644 --- a/doc/Init.3 +++ b/doc/Init.3 @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: Init.3,v 1.1 2000/04/28 00:47:48 ericm Exp $ +'\" RCS: @(#) $Id: Init.3,v 1.2 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH Tcl_Init 3 8.0 Tcl "Tcl Library Procedures" @@ -24,9 +24,7 @@ Interpreter to initialize. .PP \fBTcl_Init\fR is a helper procedure that finds and \fBsource\fR's the \fBinit.tcl\fR script, which should exist somewhere on the Tcl library -path. On Macintosh systems, it additionally checks for an \fBInit\fR -resource and sources the contents of that resource if \fBinit.tcl\fR -cannot be found. +path. .PP \fBTcl_Init\fR is typically called from \fBTcl_AppInit\fR procedures. diff --git a/doc/Macintosh.3 b/doc/Macintosh.3 deleted file mode 100644 index 8bedd30..0000000 --- a/doc/Macintosh.3 +++ /dev/null @@ -1,111 +0,0 @@ -'\" -'\" Copyright (c) 1997-1998 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: Macintosh.3,v 1.5 2003/07/18 16:56:41 dgp Exp $ -'\" -.so man.macros -.TH Tcl_MacSetEventProc 3 "8.1" Tcl "Tcl Library Procedures" -.BS -.SH NAME -Tcl_MacSetEventProc, Tcl_MacConvertTextResource, Tcl_MacEvalResource, Tcl_MacFindResource, Tcl_GetOSTypeFromObj, Tcl_SetOSTypeObj, Tcl_NewOSTypeObj \- procedures to handle Macintosh resources and other Macintosh specifics -.SH SYNOPSIS -.nf -\fB#include \fR -.sp -int -\fBTcl_MacEvalResource\fR(\fIinterp, resourceName, resourceNumber, fileName\fR) -.sp -char* -\fBTcl_MacConvertTextResource\fR(\fIresource\fR) -.sp -Handle -\fBTcl_MacFindResource\fR(\fIinterp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt\fR) -.sp -Tcl_Obj* -\fBTcl_NewOSTypeObj\fR(\fInewOSType\fR) -.sp -void -\fBTcl_SetOSTypeObj\fR(\fIobjPtr, newOSType\fR) -.sp -int -\fBTcl_GetOSTypeFromObj\fR(\fIinterp, objPtr, osTypePtr\fR) -.sp -void -\fBTcl_MacSetEventProc\fR(\fIprocPtr\fR) -.SH ARGUMENTS -.AP Tcl_Interp *interp in -Interpreter to use for error reporting, or NULL if no error reporting is -desired. -.AP "CONST char" *resourceName in -Name of TEXT resource to source, NULL if number should be used. -.AP int resourceNumber in -Resource id of source. -.AP "CONST char" *fileName in -Name of file to process. NULL if application resource. -.AP Handle resource in -Handle to TEXT resource. -.AP long resourceType in -Type of resource to load. -.AP "CONST char" *resFileRef in -Registered resource file reference, NULL if searching all open resource files. -.AP int *releaseIt out -Should we release this resource when done. -.AP int newOSType in -Int used to initialize the new object or set the object's value. -.AP Tcl_Obj *objPtr in -Object whose internal representation is to be set or retrieved. -.AP osTypePtr out -Place to store the resulting integer. -.AP Tcl_MacConvertEventPtr procPtr in -Reference to the new function to handle all incoming Mac events. - -.BE -.SH INTRODUCTION -.PP -The described routines are used to implement the Macintosh specific -\fBresource\fR command and the Mac specific notifier.. They manipulate -or use Macintosh resources and provide administration for open -resource file references. - -.SH DESCRIPTION -.PP -\fBTcl_MacEvalResource\fR extends the \fBsource\fR command to -Macintosh resources. It sources Tcl code from a Text resource. -Currently only sources the resource by name, file IDs may be supported -at a later date. -.PP -\fBTcl_MacConvertTextResource\fR converts a TEXT resource into a Tcl -suitable string. It mallocs the returned memory, converts ``\\r'' to -``\\n'', and appends a null. The caller has the responsibility for -freeing the memory. -.PP -\fBTcl_MacFindResource\fR provides a higher level interface for -loading resources. It is used by \fBresource read\fR. -.PP -\fBTcl_NewOSTypeObj\fR is used to create a new resource name type -object. The object type is "ostype". -.PP -\fBTcl_SetOSTypeObj\fR modifies an object to be a resource type and to -have the specified long value. -.PP -\fBTcl_GetOSTypeFromObj\fR attempts to return an int from the Tcl -object "objPtr". If the object is not already an int, an attempt will -be made to convert it to one. -.PP -\fBTcl_MacSetEventProc\fR sets the event handling procedure for the -application. This function will be passed all incoming Mac events. -This function usually controls the console or some other entity like -Tk. - -.SH RESOURCE TYPES -.PP -Resource types are 4-byte values used by the macintosh resource -facility to tag parts of the resource fork in a file so that the OS -knows how to handle them. As all 4 bytes are restricted to printable -characters such a type can be interpreted as a 4 character string too. - -.SH KEYWORDS -macintosh, mac, resource, notifier diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3 index b2f1fed..cd44b0f 100644 --- a/doc/OpenFileChnl.3 +++ b/doc/OpenFileChnl.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.22 2003/10/07 15:26:07 dgp Exp $ +'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.23 2004/03/17 18:14:12 das Exp $ .so man.macros .TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures" .BS @@ -668,8 +668,7 @@ call. On Windows platforms, the handle is a file \fBHANDLE\fR when the channel was created with \fBTcl_OpenFileChannel\fR, \fBTcl_OpenCommandChannel\fR, or \fBTcl_MakeFileChannel\fR. Other channel types may return a different type of handle on Windows -platforms. On the Macintosh platform, the handle is a file reference -number as returned from \fBHOpenDF\fR. +platforms. .SH "SEE ALSO" DString(3), fconfigure(n), filename(n), fopen(3), Tcl_CreateChannel(3) diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3 index c2ca531..1da560d 100644 --- a/doc/OpenTcp.3 +++ b/doc/OpenTcp.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenTcp.3,v 1.4 2002/01/23 20:46:01 dgp Exp $ +'\" RCS: @(#) $Id: OpenTcp.3,v 1.5 2004/03/17 18:14:12 das Exp $ .so man.macros .TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures" .BS @@ -168,8 +168,7 @@ replacement for the standard channel. .PP On Unix platforms, the socket handle is a Unix file descriptor as returned by the \fBsocket\fR system call. On the Windows platform, the -socket handle is a \fBSOCKET\fR as defined in the WinSock API. On the -Macintosh platform, the socket handle is a \fBStreamPtr\fR. +socket handle is a \fBSOCKET\fR as defined in the WinSock API. .VE .SH "SEE ALSO" diff --git a/doc/SourceRCFile.3 b/doc/SourceRCFile.3 index 625b301..a904fd7 100644 --- a/doc/SourceRCFile.3 +++ b/doc/SourceRCFile.3 @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: SourceRCFile.3,v 1.1 2000/04/25 00:28:06 ericm Exp $ +'\" RCS: @(#) $Id: SourceRCFile.3,v 1.2 2004/03/17 18:14:12 das Exp $ '\" '\" .so man.macros @@ -29,10 +29,6 @@ sourced is obtained from the global variable \fBtcl_rcFileName\fR in the interpreter given by \fIinterp\fR. If this variable is not defined, or if the file it indicates cannot be found, no action is taken. -.PP -On the Macintosh, after sourcing the rc file, this function will -additionally source the TEXT resource indicated by the global variable -\fBtcl_rcRsrcName\fR in \fIinterp\fR. .SH KEYWORDS application-specific initialization, main program, rc file diff --git a/doc/Thread.3 b/doc/Thread.3 index f65c6e3..7f4f3fe 100644 --- a/doc/Thread.3 +++ b/doc/Thread.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Thread.3,v 1.14 2002/07/01 18:24:39 jenglish Exp $ +'\" RCS: @(#) $Id: Thread.3,v 1.15 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH Threads 3 "8.1" Tcl "Tcl Library Procedures" @@ -107,9 +107,9 @@ marked thread to exit and join it. .PP Restrictions: On some unix systems the pthread-library does not contain the functionality to specify the stacksize of a thread. The -specified value for the stacksize is ignored on these systems. Both -Windows and Macintosh currently do not support joinable threads. This -flag value is therefore ignored on these platforms. +specified value for the stacksize is ignored on these systems. +Windows currently does not support joinable threads. This +flag value is therefore ignored on this platform. .VE .PP Tcl does provide \fBTcl_ExitThread\fR and \fBTcl_FinalizeThread\fR diff --git a/doc/clock.n b/doc/clock.n index cd36b62..d00b4fc 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -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: clock.n,v 1.14 2004/03/03 23:58:14 hobbs Exp $ +'\" RCS: @(#) $Id: clock.n,v 1.15 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH clock n 8.4 Tcl "Tcl Built-In Commands" @@ -83,7 +83,7 @@ Full month name. .VS 8.4 .IP \fB%c\fR Locale specific date and time. The format for date and time -in the default "C" locale on Unix/Mac is "%a %b %d %H:%M:%S %Y". +in the default "C" locale on Unix is "%a %b %d %H:%M:%S %Y". On Windows, this value is the locale specific long date and time, as specified in the Regional Options control panel settings. .IP \fB%C\fR @@ -158,12 +158,12 @@ Week of year (00 - 52), Monday is the first day of the week. .VS 8.4 .IP \fB%x\fR Locale specific date format. The format for a date in the default "C" -locale for Unix/Mac is "%m/%d/%y". +locale for Unix is "%m/%d/%y". On Windows, this value is the locale specific short date format, as specified in the Regional Options control panel settings. .IP \fB%X\fR Locale specific 24-hour time format. The format for a -24-hour time in the default "C" locale for Unix/Mac is "%H:%M:%S". +24-hour time in the default "C" locale for Unix is "%H:%M:%S". On Windows, this value is the locale specific time format, as specified in the Regional Options control panel settings. .VE 8.4 diff --git a/doc/exec.n b/doc/exec.n index f61db59..53eee8e 100644 --- a/doc/exec.n +++ b/doc/exec.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: exec.n,v 1.6 2002/04/23 19:06:10 hobbs Exp $ +'\" RCS: @(#) $Id: exec.n,v 1.7 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH exec n 7.6 Tcl "Tcl Built-In Commands" @@ -316,9 +316,6 @@ output may fail, hang Tcl, or even hang the system if their own private console window is not available to them. .RE .TP -\fBMacintosh\fR -The \fBexec\fR command is not implemented and does not exist under Macintosh. -.TP \fBUnix\fR\0\0\0\0\0\0\0 The \fBexec\fR command is fully functional and works as described. diff --git a/doc/fconfigure.n b/doc/fconfigure.n index f8db0fc..12609f5 100644 --- a/doc/fconfigure.n +++ b/doc/fconfigure.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fconfigure.n,v 1.8 2003/04/18 00:28:14 dkf Exp $ +'\" RCS: @(#) $Id: fconfigure.n,v 1.9 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH fconfigure n 8.3 Tcl "Tcl Built-In Commands" @@ -153,10 +153,9 @@ newline (\fBcrlf\fP) as the end of line representation. The end of line representation can even change from line-to-line, and all cases are translated to a newline. As the output translation mode, \fBauto\fR chooses a platform specific representation; for sockets on all platforms -Tcl chooses \fBcrlf\fR, for all Unix flavors, it chooses \fBlf\fR, for the -Macintosh platform it chooses \fBcr\fR and for the various flavors of -Windows it chooses \fBcrlf\fR. The default setting for -\fB\-translation\fR is \fBauto\fR for both input and output. +Tcl chooses \fBcrlf\fR, for all Unix flavors, it chooses \fBlf\fR, and +for the various flavors of Windows it chooses \fBcrlf\fR. The default +setting for \fB\-translation\fR is \fBauto\fR for both input and output. .TP \fBbinary\fR . @@ -172,7 +171,7 @@ The end of a line in the underlying file or device is represented by a single carriage return character. As the input translation mode, \fBcr\fP mode converts carriage returns to newline characters. As the output translation mode, \fBcr\fP mode translates newline characters to -carriage returns. This mode is typically used on Macintosh platforms. +carriage returns. .TP \fBcrlf\fR . diff --git a/doc/file.n b/doc/file.n index 4e2a1b4..c8e64d8 100644 --- a/doc/file.n +++ b/doc/file.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: file.n,v 1.31 2004/03/16 10:48:46 dkf Exp $ +'\" RCS: @(#) $Id: file.n,v 1.32 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH file n 8.3 Tcl "Tcl Built-In Commands" @@ -73,12 +73,10 @@ path element is replaced with its short (8.3) version of the name. This attribute cannot be set. \fB-system\fR gives or sets or clears the value of the system attribute of the file. .PP -On Mac OS 9, Mac OS X and Darwin, \fB-creator\fR gives or sets the +On Mac OS X and Darwin, \fB-creator\fR gives or sets the Finder creator type of the file. \fB-hidden\fR gives or sets or clears the hidden attribute of the file. \fB-readonly\fR gives or sets or -clears the readonly attribute of the file. Note that on Mac OS 9, -directories can only be locked if File Sharing is turned on. \fB-type\fR -gives or sets the Finder file type for the file. \fB-rsrclength\fR gives +clears the readonly attribute of the file. \fB-rsrclength\fR gives the length of the resource fork of the file, this attribute can only be set to the value 0, which results in the resource fork being stripped off the file. @@ -136,9 +134,9 @@ a \fB\-\fR. \fBfile dirname \fIname\fR Returns a name comprised of all of the path components in \fIname\fR excluding the last element. If \fIname\fR is a relative file name and -only contains one path element, then returns ``\fB.\fR'' (or ``\fB:\fR'' -on the Macintosh). If \fIname\fR refers to a root directory, then the -root directory is returned. For example, +only contains one path element, then returns ``\fB.\fR''. If \fIname\fR +refers to a root directory, then the root directory is returned. For +example, .RS .CS \fBfile dirname c:/\fR @@ -196,7 +194,7 @@ returns \fB/foo/bar\fR. .PP Note that any of the names can contain separators, and that the result is always canonical for the current platform: \fB/\fR for Unix and -Windows, and \fB:\fR for Macintosh. +Windows. .RE .TP \fBfile link ?\fI-linktype\fR? \fIlinkName\fR ?\fItarget\fR? @@ -233,8 +231,8 @@ to absolute form. When creating links on filesystems that either do not support any links, or do not support the specific type requested, an error message will be returned. In particular Windows 95, 98 and ME do not support any links at present, but most Unix platforms support both -symbolic and hard links (the latter for files only), MacOS supports -symbolic links and Windows NT/2000/XP (on NTFS drives) support symbolic +symbolic and hard links (the latter for files only) and Windows +NT/2000/XP (on NTFS drives) support symbolic directory links and hard file links. .TP \fBfile lstat \fIname varName\fR @@ -268,7 +266,7 @@ or set then an error is generated. . Returns the platform-specific name of the file. This is useful if the filename is needed to pass to a platform-specific call, such as exec -under Windows or AppleScript on the Macintosh. +under Windows. .TP \fBfile normalize \fIname\fR . @@ -277,7 +275,7 @@ Returns a unique normalised path representation for the file-system object (file, directory, link, etc), whose string value can be used as a unique identifier for it. A normalized path is an absolute path which has all '../', './' removed. Also it is one which is in the ``standard'' -format for the native platform. On MacOS, Unix, this means the segments +format for the native platform. On Unix, this means the segments leading up to the path must be free of symbolic links/aliases (but the very last path component may be a symbolic link), and on Windows it also means we want the long form with that form's case-dependence (which @@ -416,11 +414,8 @@ Returns a string giving the type of file \fIname\fR, which will be one of \fBfile volumes\fR . Returns the absolute paths to the volumes mounted on the system, as a -proper Tcl list. On the Macintosh, this will be a list of the mounted -drives, both local and network. N.B. if two drives have the same name, -they will both appear on the volume list, but there is currently no way, -from Tcl, to access any but the first of these drives. On UNIX, the -command will always return "/", since all filesystems are locally mounted. +proper Tcl list. On UNIX, the command will always return "/", since all +filesystems are locally mounted. On Windows, it will return a list of the available local drives (e.g. {a:/ c:/}). .TP diff --git a/doc/filename.n b/doc/filename.n index 931845a..ef217e6 100644 --- a/doc/filename.n +++ b/doc/filename.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: filename.n,v 1.11 2004/03/09 12:59:04 vincentdarley Exp $ +'\" RCS: @(#) $Id: filename.n,v 1.12 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH filename n 7.5 Tcl "Tcl Built-In Commands" @@ -44,61 +44,6 @@ type of a given path. The rules for native names depend on the value reported in the Tcl array element \fBtcl_platform(platform)\fR: .TP 10 -\fBmac\fR -On Apple Macintosh Classic systems (i.e. with MacOS 9.x or older), Tcl -supports two forms of path names. The normal Mac style names use colons -as path separators. Paths may be relative or absolute, and file names -may contain any character other than colon. A leading colon causes the -rest of the path to be interpreted relative to the current directory. -If a path contains a colon that is not at the beginning, then the path -is interpreted as an absolute path. Sequences of two or more colons -anywhere in the path are used to construct relative paths where \fB::\fR -refers to the parent of the current directory, \fB:::\fR refers to the -parent of the parent, and so forth. -.RS -.PP -In addition to Macintosh style names, Tcl also supports a subset of -Unix-like names. If a path contains no colons, then it is interpreted -like a Unix path. Slash is used as the path separator. The file name -\fB\&.\fR refers to the current directory, and \fB\&..\fR refers to the -parent of the current directory. However, some names like \fB/\fR or -\fB/..\fR have no mapping, and are interpreted as Macintosh names. In -general, commands that generate file names will return Macintosh style -names, but commands that accept file names will take both Macintosh -and Unix-style names. -.PP -The following examples illustrate various forms of path names: -.TP 15 -\fB:\fR -Relative path to the current folder. -.TP 15 -\fBMyFile\fR -Relative path to a file named \fBMyFile\fR in the current folder. -.TP 15 -\fBMyDisk:MyFile\fR -Absolute path to a file named \fBMyFile\fR on the device named \fBMyDisk\fR. -.TP 15 -\fB:MyDir:MyFile\fR -Relative path to a file name \fBMyFile\fR in a folder named -\fBMyDir\fR in the current folder. -.TP 15 -\fB::MyFile\fR -Relative path to a file named \fBMyFile\fR in the folder above the -current folder. -.TP 15 -\fB:::MyFile\fR -Relative path to a file named \fBMyFile\fR in the folder two levels above the -current folder. -.TP 15 -\fB/MyDisk/MyFile\fR -Absolute path to a file named \fBMyFile\fR on the device named -\fBMyDisk\fR. -.TP 15 -\fB\&../MyFile\fR -Relative path to a file named \fBMyFile\fR in the folder above the -current folder. -.RE -.TP \fBunix\fR On Unix and Apple MacOS X platforms, Tcl uses path names where the components are separated by slashes. Path names may be relative or @@ -185,11 +130,10 @@ the tilde and the next separator are taken as a user name, which is used to retrieve the user's home directory for substitution. This works on Unix, MacOS X and Windows (except very old releases). .PP -The Classic Macintosh (OS 9 and older) platform and old Windows -platforms do not support tilde substitution when a user name follows the -tilde. On these platforms, attempts to use a tilde followed by a user -name will generate an error that the user does not exist when Tcl -attempts to interpret that part of the path or otherwise access the +Old Windows platforms do not support tilde substitution when a user name +follows the tilde. On these platforms, attempts to use a tilde followed +by a user name will generate an error that the user does not exist when +Tcl attempts to interpret that part of the path or otherwise access the file. The behaviour of these paths when not trying to interpret them is the same as on Unix. File names that have a tilde without a user name will be correctly substituted using the \fB$HOME\fR environment @@ -203,7 +147,7 @@ the character sets allowed on different devices may differ, so scripts should choose file names that do not contain special characters like: \fB<>:?"/\e|\fR. The safest approach is to use names consisting of alphanumeric characters only. Care should be taken with filenames -which contain spaces (common on Windows and MacOS systems) and +which contain spaces (common on Windows systems) and filenames where the backslash is the directory separator (Windows native path names). Also Windows 3.1 only supports file names with a root of no more than 8 characters and an extension of no diff --git a/doc/glob.n b/doc/glob.n index e4df23d..c645f8a 100644 --- a/doc/glob.n +++ b/doc/glob.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: glob.n,v 1.13 2003/12/12 17:02:13 vincentdarley Exp $ +'\" RCS: @(#) $Id: glob.n,v 1.14 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH glob n 8.3 Tcl "Tcl Built-In Commands" @@ -184,13 +184,6 @@ interpreted as a wildcard character. One solution to this problem is to use the Unix style forward slash as a path separator. Windows style paths can be converted to Unix style paths with the command \fBfile join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4). -.TP -\fBMacintosh\fR -. -When using the options, \fB\-directory\fR, \fB\-join\fR or \fB\-path\fR, glob -assumes the directory separator for the entire pattern is the standard -``:''. When not using these options, glob examines each pattern argument -and uses ``/'' unless the pattern contains a ``:''. .SH "SEE ALSO" file(n) diff --git a/doc/open.n b/doc/open.n index 0e82382..d564d77 100644 --- a/doc/open.n +++ b/doc/open.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: open.n,v 1.18 2004/02/28 15:45:53 vincentdarley Exp $ +'\" RCS: @(#) $Id: open.n,v 1.19 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH open n 8.3 Tcl "Tcl Built-In Commands" @@ -371,12 +371,6 @@ application, no data will be sent to the command pipeline's standard output until the pipe is actually closed. This problem occurs because 16-bit DOS applications are run synchronously, as described above. .TP -\fBMacintosh\fR -Opening a serial port is not currently implemented under Macintosh. -.sp -Opening a command pipeline is not supported under Macintosh, since -applications do not support the concept of standard input or output. -.TP \fBUnix\fR\0\0\0\0\0\0\0 Valid values for \fIfileName\fR to open a serial port are generally of the form \fB/dev/tty\fIX\fR, where \fIX\fR is \fBa\fR or \fBb\fR, but the name diff --git a/doc/puts.n b/doc/puts.n index 9a4cbdd..0eea91b 100644 --- a/doc/puts.n +++ b/doc/puts.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: puts.n,v 1.5 2001/09/14 19:20:40 andreas_kupries Exp $ +'\" RCS: @(#) $Id: puts.n,v 1.6 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH puts n 7.5 Tcl "Tcl Built-In Commands" @@ -39,8 +39,7 @@ Newline characters in the output are translated by \fBputs\fR to platform-specific end-of-line sequences according to the current value of the \fB\-translation\fR option for the channel (for example, on PCs newlines are normally replaced with carriage-return-linefeed -sequences; on Macintoshes newlines are normally replaced with -carriage-returns). +sequences. See the \fBfconfigure\fR manual entry for a discussion on ways in which \fBfconfigure\fR will alter output. .PP diff --git a/doc/resource.n b/doc/resource.n deleted file mode 100644 index 8be83da..0000000 --- a/doc/resource.n +++ /dev/null @@ -1,155 +0,0 @@ -'\" -'\" 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: resource.n,v 1.7 2002/07/01 18:24:39 jenglish Exp $ -'\" -.so man.macros -.TH resource n 8.0 Tcl "Tcl Built-In Commands" -.BS -'\" Note: do not modify the .SH NAME line immediately below! -.SH NAME -resource \- Manipulate Macintosh resources -.SH SYNOPSIS -\fBresource \fIoption\fR ?\fIarg arg ...\fR? -.BE - -.SH DESCRIPTION -.PP -The \fBresource\fR command provides some generic operations for -dealing with Macintosh resources. This command is only supported on -the Macintosh platform. Each Macintosh file consists of two -\fIforks\fR: a \fIdata\fR fork and a \fIresource\fR fork. You use the -normal open, puts, close, etc. commands to manipulate the data fork. -You must use this command, however, to interact with the resource -fork. \fIOption\fR indicates what resource command to perform. Any -unique abbreviation for \fIoption\fR is acceptable. The valid options -are: -.TP -\fBresource close \fIrsrcRef\fR -Closes the given resource reference (obtained from \fBresource -open\fR). Resources from that resource file will no longer be -available. -.TP -\fBresource delete\fR ?\fIoptions\fR? \fIresourceType\fR -This command will delete the resource specified by \fIoptions\fR and -type \fIresourceType\fR (see RESOURCE TYPES below). The options -give you several ways to specify the resource to be deleted. -.RS -.TP -\fB\-id\fR \fIresourceId\fR -If the \fB-id\fR option is given the id \fIresourceId\fR (see RESOURCE -IDS below) is used to specify the resource to be deleted. The id must -be a number - to specify a name use the \fB\-name\fR option. -.TP -\fB\-name\fR \fIresourceName\fR -If \fB-name\fR is specified, the resource named -\fIresourceName\fR will be deleted. If the \fB-id\fR is also -provided, then there must be a resource with BOTH this name and -this id. If no name is provided, then the id will be used regardless -of the name of the actual resource. -.TP -\fB\-file\fR \fIresourceRef\fR -If the \fB-file\fR option is specified then the resource will be -deleted from the file pointed to by \fIresourceRef\fR. Otherwise the -first resource with the given \fIresourceName\fR and or -\fIresourceId\fR which is found on the resource file path will be -deleted. To inspect the file path, use the \fIresource files\fR command. -.RE -.TP -\fBresource files ?\fIresourceRef\fR? -If \fIresourceRef\fRis not provided, this command returns a Tcl list -of the resource references for all the currently open resource files. -The list is in the normal Macintosh search order for resources. If -\fIresourceRef\fR is specified, the command will -return the path to the file whose resource fork is represented by that -token. -.TP -\fBresource list \fIresourceType\fR ?\fIresourceRef\fR? -List all of the resources ids of type \fIresourceType\fR (see RESOURCE -TYPES below). If \fIresourceRef\fR is specified then the command will -limit the search to that particular resource file. Otherwise, all -resource files currently opened by the application will be searched. -A Tcl list of either the resource name's or resource id's of the found -resources will be returned. See the RESOURCE IDS section below for -more details about what a resource id is. -.TP -\fBresource open \fIfileName\fR ?\fIaccess\fR? -Open the resource for the file \fIfileName\fR. Standard file access -permissions may also be specified (see the manual entry for \fBopen\fR -for details). A resource reference (\fIresourceRef\fR) is returned -that can be used by the other resource commands. An error can occur -if the file doesn't exist or the file does not have a resource fork. -However, if you open the file with write permissions the file and/or -resource fork will be created instead of generating an error. -.TP -\fBresource read \fIresourceType\fR \fIresourceId\fR ?\fIresourceRef\fR? -Read the entire resource of type \fIresourceType\fR (see RESOURCE -TYPES below) and the name or id of \fIresourceId\fR (see RESOURCE IDS -below) into memory and return the result. If \fIresourceRef\fR is -specified we limit our search to that resource file, otherwise we -search all open resource forks in the application. It is important to -note that most Macintosh resource use a binary format and the data -returned from this command may have embedded NULLs or other non-ASCII -data. -.TP -\fBresource types ?\fIresourceRef\fR? -This command returns a Tcl list of all resource types (see RESOURCE -TYPES below) found in the resource file pointed to by -\fIresourceRef\fR. If \fIresourceRef\fR is not specified it will -return all the resource types found in every resource file currently -opened by the application. -.TP -\fBresource write\fR ?\fIoptions\fR? \fIresourceType\fR \fIdata\fR -This command will write the passed in \fIdata\fR as a new resource of -type \fIresourceType\fR (see RESOURCE TYPES below). Several options -are available that describe where and how the resource is stored. -.RS -.TP -\fB\-id\fR \fIresourceId\fR -If the \fB-id\fR option is given the id \fIresourceId\fR (see RESOURCE -IDS below) is used for the new resource, otherwise a unique id will be -generated that will not conflict with any existing resource. However, -the id must be a number - to specify a name use the \fB\-name\fR option. -.TP -\fB\-name\fR \fIresourceName\fR -If \fB-name\fR is specified the resource will be named -\fIresourceName\fR, otherwise it will have the empty string as the -name. -.TP -\fB\-file\fR \fIresourceRef\fR -If the \fB-file\fR option is specified then the resource will be -written in the file pointed to by \fIresourceRef\fR, otherwise the -most recently open resource will be used. -.TP -\fB\-force\fR -If the target resource already exists, then by default Tcl will not -overwrite it, but raise an error instead. Use the -force flag to -force overwriting the extant resource. -.RE - -.SH "RESOURCE TYPES" -Resource types are defined as a four character string that is then -mapped to an underlying id. For example, \fBTEXT\fR refers to the -Macintosh resource type for text. The type \fBSTR#\fR is a list of -counted strings. All Macintosh resources must be of some type. See -Macintosh documentation for a more complete list of resource types -that are commonly used. - -.SH "RESOURCE IDS" -For this command the notion of a resource id actually refers to two -ideas in Macintosh resources. Every place you can use a resource Id -you can use either the resource name or a resource number. Names are -always searched or returned in preference to numbers. For example, -the \fBresource list\fR command will return names if they exist or -numbers if the name is NULL. - -.SH "PORTABILITY ISSUES" -The resource command is only available on Macintosh. - -.SH "SEE ALSO" -open(n) - -.SH KEYWORDS -open, resource diff --git a/doc/safe.n b/doc/safe.n index 38bc360..7825921 100644 --- a/doc/safe.n +++ b/doc/safe.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: safe.n,v 1.4 2002/07/01 18:24:39 jenglish Exp $ +'\" RCS: @(#) $Id: safe.n,v 1.5 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH "Safe Tcl" n 8.0 Tcl "Tcl Built-In Commands" @@ -290,8 +290,7 @@ for the \fBsource\fR and \fBload\fR aliases provided to the slave are path in the form of \fB[file join \fR\fItoken filename\fR\fB]\fR (ie, when using the native file path formats: \fItoken\fR\fB/\fR\fIfilename\fR -on Unix, \fItoken\fR\fB\\\fIfilename\fR on Windows, -and \fItoken\fR\fB:\fR\fIfilename\fR on the Mac), +on Unix and \fItoken\fR\fB\\\fIfilename\fR on Windows), where \fItoken\fR is representing one of the directories of the \fIaccessPath\fR list and \fIfilename\fR is one file in that directory (no sub directories access are allowed). diff --git a/doc/source.n b/doc/source.n index ffc04ab..8f78404 100644 --- a/doc/source.n +++ b/doc/source.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: source.n,v 1.6 2003/09/05 21:52:11 dgp Exp $ +'\" RCS: @(#) $Id: source.n,v 1.7 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH source n "" Tcl "Tcl Built-In Commands" @@ -50,14 +50,6 @@ The \fB-encoding\fR option is used to specify the encoding of the data stored in \fIfileName\fR. When the \fB-encoding\fR option is omitted, the system encoding is assumed. .VE 8.5 -.PP -The \fI\-rsrc\fR and \fI\-rsrcid\fR forms of this command are only -available on Macintosh computers. These versions of the command -allow you to source a script from a \fBTEXT\fR resource. You may specify -what \fBTEXT\fR resource to source by either name or id. By default Tcl -searches all open resource files, which include the current -application and any loaded C extensions. Alternatively, you may -specify the \fIfileName\fR where the \fBTEXT\fR resource can be found. .SH "SEE ALSO" file(n), cd(n), encoding(n) diff --git a/doc/tclvars.n b/doc/tclvars.n index 5318f98..bacd39c 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: tclvars.n,v 1.14 2004/02/06 00:01:25 davygrvy Exp $ +'\" RCS: @(#) $Id: tclvars.n,v 1.15 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH tclvars n 8.0 Tcl "Tcl Built-In Commands" @@ -49,64 +49,6 @@ It should be noted that relying on an existing and empty environment variable won't work on windows and is discouraged for cross-platform usage. .VE .RE -.RS -On the Macintosh, the environment variable is constructed by Tcl as no -global environment variable exists. The environment variables that -are created for Tcl include: -.TP -\fBLOGIN\fR -This holds the Chooser name of the Macintosh. -.TP -\fBUSER\fR -This also holds the Chooser name of the Macintosh. -.TP -\fBSYS_FOLDER\fR -The path to the system directory. -.TP -\fBAPPLE_M_FOLDER\fR -The path to the Apple Menu directory. -.TP -\fBCP_FOLDER\fR -The path to the control panels directory. -.TP -\fBDESK_FOLDER\fR -The path to the desk top directory. -.TP -\fBEXT_FOLDER\fR -The path to the system extensions directory. -.TP -\fBPREF_FOLDER\fR -The path to the preferences directory. -.TP -\fBPRINT_MON_FOLDER\fR -The path to the print monitor directory. -.TP -\fBSHARED_TRASH_FOLDER\fR -The path to the network trash directory. -.TP -\fBTRASH_FOLDER\fR -The path to the trash directory. -.TP -\fBSTART_UP_FOLDER\fR -The path to the start up directory. -.TP -\fBHOME\fR -The path to the application's default directory. -.PP -You can also create your own environment variables for the Macintosh. -A file named \fITcl Environment Variables\fR may be placed in the -preferences folder in the Mac system folder. Each line of this file -should be of the form \fIVAR_NAME=var_data\fR. -.PP -The last alternative is to place environment variables in a 'STR#' -resource named \fITcl Environment Variables\fR of the application. This -is considered a little more ``Mac like'' than a Unix style Environment -Variable file. Each entry in the 'STR#' resource has the same format -as above. The source code file \fItclMacEnv.c\fR contains the -implementation of the env mechanisms. This file contains many -#define's that allow customization of the env mechanisms to fit your -applications needs. -.RE .TP \fBerrorCode\fR After an error has occurred, this variable will be set to hold @@ -270,7 +212,7 @@ is the value returned by \fBuname -m\fR. .TP \fBos\fR The name of the operating system running on this machine, -such as \fBWindows 95\fR, \fBWindows NT\fR, \fBMacOS\fR, or \fBSunOS\fR. +such as \fBWindows 95\fR, \fBWindows NT\fR, or \fBSunOS\fR. On UNIX machines, this is the value returned by \fBuname -s\fR. On Windows 95 and Windows 98, the value returned will be \fBWindows 95\fR to provide better backwards compatibility to Windows 95; to @@ -283,7 +225,7 @@ Windows 95, the version will be 4.0; on Windows 98, the version will be 4.10. .TP \fBplatform\fR -Either \fBwindows\fR, \fBmacintosh\fR, or \fBunix\fR. This identifies the +Either \fBwindows\fR, or \fBunix\fR. This identifies the general operating environment of the machine. .TP \fBthreaded\fR @@ -294,7 +236,7 @@ was compiled with threads enabled. This identifies the current user based on the login information available on the platform. This comes from the USER or LOGNAME environment variable on Unix, -and the value from GetUserName on Windows and Macintosh. +and the value from GetUserName on Windows. .TP \fBwordSize\fR .VS 8.4 @@ -330,15 +272,6 @@ of this file and \fBsource\fR it if it exists. For example, for \fBwish\fR the variable is set to \fB~/.wishrc\fR for Unix and \fB~/wishrc.tcl\fR for Windows. .TP -\fBtcl_rcRsrcName\fR -This variable is only used on Macintosh systems. The variable is used -during initialization to indicate the name of a user-specific -\fBTEXT\fR resource located in the application or extension resource -forks. If it is set by application-specific initialization, then the -Tcl startup code will check for the existence of this resource and -\fBsource\fR it if it exists. For example, the Macintosh \fBwish\fR -application has the variable is set to \fBtclshrc\fR. -.TP \fBtcl_traceCompile\fR The value of this variable can be set to control how much tracing information diff --git a/doc/unload.n b/doc/unload.n index 711e328..916c565 100644 --- a/doc/unload.n +++ b/doc/unload.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: unload.n,v 1.2 2004/03/03 23:58:14 hobbs Exp $ +'\" RCS: @(#) $Id: unload.n,v 1.3 2004/03/17 18:14:12 das Exp $ '\" .so man.macros .TH unload n 8.5 Tcl "Tcl Built-In Commands" @@ -128,10 +128,6 @@ module name \fBlast\fR. Not all unix operating systems support library unloading. Under such an operating system \fBunload\fR returns an error (unless -nocomplain has been specified). -.TP -\fBMacintosh\fR\0\0\0\0\0 -. - .SH BUGS .PP 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 -# 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 -#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 -#endif +#include #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 @@