From d6f3ad620713ca2ff8a9b7cb854cdc28aa20ea64 Mon Sep 17 00:00:00 2001 From: stanton Date: Sat, 24 Apr 1999 01:46:51 +0000 Subject: merged 8.1.0 changes into mainline --- ChangeLog | 6 + README | 275 +++++----------------------- generic/tclStubInit.c | 499 +++++++++++++++++++++++++------------------------- mac/README | 132 ++----------- tests/http.test | 30 +-- tests/unixInit.test | 6 +- tools/README | 9 + tools/genStubs.tcl | 37 ++-- unix/README | 8 +- unix/configure.in | 15 +- win/README | 154 ++-------------- win/README.binary | 345 ++++++---------------------------- 12 files changed, 456 insertions(+), 1060 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d34cf1..b75c65a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-04-23 + * generic/tclStubInit.c: + * tools/genStubs.tcl: Changed to avoid the need for forward + declarations in stub initializers. + +1999-04-23 + * library/encoding/koi8-r.enc: * tools/encoding/koi8-r.txt: Added support for the koi8-r Cyrillic encoding. [Bug: 1771] diff --git a/README b/README index f08ef26..0814707 100644 --- a/README +++ b/README @@ -1,27 +1,23 @@ README: Tcl + This is the Tcl 8.1 source distribution. - Tcl is maintained, enhanced, and distributed freely as a - service to the Tcl community by Scriptics Corporation. - -RCS: @(#) $Id: README,v 1.17 1999/04/21 21:50:22 rjohnson Exp $ +RCS: @(#) $Id: README,v 1.18 1999/04/24 01:46:51 stanton Exp $ Contents -------- 1. Introduction 2. Documentation 3. Compiling and installing Tcl - 4. Summary of changes in Tcl 8.1 - 5. Development tools - 6. Tcl newsgroup - 7. Tcl contributed archive - 8. Tcl Resource Center - 9. Mailing lists - 10. Support and bug fixes - 11. Tcl version numbers + 4. Development tools + 5. Tcl newsgroup + 6. Tcl contributed archive + 7. Tcl Resource Center + 8. Mailing lists + 9. Support and Training + 10. Thank You 1. Introduction --------------- - Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl @@ -30,17 +26,11 @@ that run on PCs, Unix, and the Macintosh. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications. -This directory contains the sources and documentation for Tcl. The -information here corresponds to release 8.1.0. +Tcl is maintained, enhanced, and distributed freely as a +service to the Tcl community by Scriptics Corporation. +The official home for Tcl/Tk is on the Scriptics Web site: -Tcl 8.1 includes four major new features: Unicode support (all internal -strings are now stored in UTF-8 form), a new regular expression matcher -which surpass the features of Perl, support for multithreading, and a -new message catalog package. For details on features, -incompatibilities, and potential problems with this release, see the -Tcl/Tk 8.1 Web page at http://www.scriptics.com/software/8.1.html or -refer to the "changes" file in this directory, which contains a -historical record of all changes to Tcl. + http://www.scriptics.com Tcl is a freely available open source package. You can do virtually anything you like with it, such as modifying it, redistributing it, @@ -48,36 +38,23 @@ and selling it either in whole or in part. See the file "license.terms" for complete information. 2. Documentation ----------------- - -The best way to get started with Tcl is to read about Tcl on the -Scriptics Web site at: - - http://www.scriptics.com/scripting - -Another good way to get started with Tcl is to read one of the -introductory books on Tcl: - - Practical Programming in Tcl and Tk, 2nd Edition, by Brent Welch, - Prentice-Hall, 1997, ISBN 0-13-616830-2 - - Tcl and the Tk Toolkit, by John Ousterhout, - Addison-Wesley, 1994, ISBN 0-201-63337-X +--------------- - Exploring Expect, by Don Libes, - O'Reilly and Associates, 1995, ISBN 1-56592-090-2 +Extensive documentation is available at our website. The +home page for this release is + http://www.scriptics.com/software/8.1.html -Other books are listed at -http://www.scriptics.com/resource/doc/books/ +Information about new features in 8.1 can be found at + http://www.scriptics.com/software/whatsnew81.html -There is also an official home for Tcl and Tk on the Scriptics Web site: +Detailed release notes can be found at + http://www.scriptics.com/software/relnotes/tcl8.1 - http://www.scriptics.com +Information about Tcl itself can be found at + http://www.scriptics.com/scripting/ -These Web pages include information about the latest releases, products -related to Tcl and Tk, reports on bug fixes and porting issues, HTML -versions of the manual pages, and pointers to many other Tcl/Tk Web -pages at other sites. Check them out! +There are many Tcl books on the market. Most are listed at + http://www.scriptics.com/resource/doc/books/ 2a. Unix Documentation ---------------------- @@ -103,7 +80,7 @@ using the normal "man" mechanisms, such as ------------------------- The "doc/help" subdirectory in this release contains a complete set of -Windows help files for TclPro. Once you install this Tcl release, a +Windows help files for Tcl. Once you install this Tcl release, a shortcut to the Windows help Tcl documentation will appear in the "Start" menu: @@ -112,116 +89,13 @@ shortcut to the Windows help Tcl documentation will appear in the 3. Compiling and installing Tcl ------------------------------- -This release contains everything you should need to compile and run -Tcl under UNIX, PCs (either Windows NT, Windows 95, or Win 3.1 with -Win32s), and Macintoshes. - -Before trying to compile Tcl you should do the following things: - - (a) Check for a binary release. Pre-compiled binary releases are - available now for PCs, Macintoshes, and several flavors of UNIX. - Binary releases are much easier to install than source releases. - To find out whether a binary release is available for your - platform, check the Scriptics Tcl Resource Center - (http://www.scriptics.com/resource). Also, check in - the FTP directory from which you retrieved the base - distribution. - - (b) Make sure you have the most recent patch release. Look in the - FTP directory from which you retrieved this distribution to see - if it has been updated with patches. Patch releases fix bugs - without changing any features, so you should normally use the - latest patch release for the version of Tcl that you want. - -Once you've done this, change to the "unix" subdirectory if you're -compiling under UNIX, "win" if you're compiling under Windows, or -"mac" if you're compiling on a Macintosh. Then follow the instructions -in the README file in that directory for compiling Tcl, installing it, -and running the test suite. - -4. Summary of changes in Tcl 8.1 --------------------------------- - -Here are the most significant changes in Tcl 8.1. In addition to these -changes, there are several smaller changes and bug fixes. See the file -"changes" for a complete list of all changes. - - 1. Internationalization. Tcl has undergone a major revision to - support international character sets: - - All strings in Tcl are now represented in UTF-8 instead of ASCII, - so that Tcl now supports the full Unicode character set. The - representation of ASCII characters is unchanged (in UTF-8 anything - that looks like an ASCII character is an ASCII character), but - characters with the high-order bit set, such as those in ISO-8859, - are represented with multi-byte sequences, as are all Unicode - characters with values greater than 127. This change does not - affect Tcl scripts but it does affect C code that parses strings. - Tcl automatically translates between UTF-8 and the normal encoding - for the platform during interactions with the system. - - In Tcl scripts the backslash sequence \u can be used to enter - 16-bit Unicode characters. \o and \x generate only 8-bit - characters as before. - - There is a new "encoding" command that allows scripts to determine - what encodings are available as well as to convert strings between - different encodings. The fconfigure command now supports a - -encoding option for specifying the encoding of an open file or - socket. Tcl will automatically translate between the specified - encoding and UTF-8 during I/O. - - There are several new C APIs that support UTF-8 and various - encodings. See the manual entry Utf.3 for procedures that - translate between Unicode and UTF-8 and manipulate UTF-8 strings. - See Encoding.3 for procedures that create new encodings and - translate between encodings. See ToUpper.3 for procedures that - perform case conversions on UTF-8 strings. - - 2. Binary data. Binary data is handled differently in Tcl 8.1 - than in Tcl 8.0. Tcl 8.1 uses the UTF-8 facilities to represent - binary data: the character value zero is represented with a - multi-byte sequence, so that (once again) strings in Tcl 8.1 never - contain null bytes. This means that binary data is now accepted - everywhere in Tcl and Tk (in Tcl 8.0 the support for binary data - was incomplete). If you have C code that needs to manipulate the - bytes of binary data (as opposed to just passing the data through) - you should use a new object type called "byte array". See the - manual entry ByteArrObj.3 for information about procedures such as - Tcl_GetByteArrayFromObj. - - 3. Regular expressions. Tcl 8.1 contains a brand new - implementation of regular expressions from Henry Spencer. The - regular expression syntax has been greatly expanded to include - most of the features in Perl. In addition, the regexp engine - supports Unicode and binary data. See the doc/regexp.n manual - entry for more details. - - 4. Threads. If configured with the --enable-threads flag, Tcl can - now be compiled for use in a multi-threaded application. - Individual threads are allowed to use one or more interpreters as - long as each interpreter (and any slave interpreters) is only - accessed by one thread. Each thread runs its own event loop, and - you can post events to other threads. There are new C APIs for - mutexes, condition variables, and thread local storage. See the - doc/Thread.3 manual entry for more details. Tk 8.1 is not yet - multi-thread safe. There is not yet support for tcl level use of - threading except for a test command. (Compile tcltest and try - testthread.) - - 5. Message catalog. There is a new message catalog package which makes - it easy to localize the strings in a script. See the doc/msgcat.n - manual entry for more details. - - 6. Stubbs library for building extensions. There is now a new - way to build extensions for Tcl. Instead of linking with the - tcl shared library you can now link to a stubs library that gets - built in this release. By linking with the stubs library it - is possible to use dynamically loaded extensions in staticlly - built applications. It will also be possible for some extensions - to work for both Tcl 8.0 & 8.1 with out having to recompile. - -5. Development tools +There are brief notes in the unix/README, win/README, and mac/README +about compiling on these different platforms. There is additional +information about building Tcl from sources at + http://www.scriptics.com/support/howto/compile.html + + +4. TclPro Development tools -------------------- A high quality set of commercial development tools is now available to @@ -231,10 +105,9 @@ and bytecode compiler. Visit the Scriptics Web site at: http://www.scriptics.com/tclpro -for more information on TclPro and for a free 30-day evaluation -download. +for more information on TclPro and for a free evaluation download. -6. Tcl newsgroup +5. Tcl newsgroup ---------------- There is a network news group "comp.lang.tcl" intended for the @@ -242,7 +115,7 @@ exchange of information about Tcl, Tk, and related applications. The newsgroup is a greata place to ask general information questions. For bug reports, please see the "Support and bug fixes" section below. -7. Tcl contributed archive +6. Tcl contributed archive -------------------------- Many people have created exciting packages and applications based on Tcl @@ -253,7 +126,7 @@ in the directory "/pub/tcl". The archive also contains several FAQ ("frequently asked questions") documents that provide solutions to problems that are commonly encountered by TCL newcomers. -8. Tcl Resource Center +7. Tcl Resource Center ---------------------- Visit http://www.scriptics.com/resource/ to see an annotated index of @@ -263,7 +136,7 @@ applications, binary releases, and patches. You can also recommend additional URLs for the resource center using the forms labeled "Add a Resource". -9. Mailing lists +8. Mailing lists ---------------- A couple of Mailing List have been set up to discuss Macintosh or @@ -285,8 +158,8 @@ subscribing put the line: in the body instead (or wintcl). -10. Support and bug fixes -------------------------- +9. Support and Training +------------------------ Scriptics is very interested in receiving bug reports, patches, and suggestions for improvements. We prefer that you send this @@ -302,20 +175,6 @@ on comp.lang.tcl. We strongly recommend that you select this option because someone else who reads comp.lang.tcl may be able to offer a solution. -When reporting bugs, please provide full information about the Tcl/Tk -version and the platform on which you are running Tcl/Tk. Also, -please include a short tclsh script that we can use to reproduce the -bug. Make sure that the script runs with a bare-bones tclsh and -doesn't depend on any extensions or other programs, particularly those -that exist only at your site. Also, please include three additional -pieces of information with the script: - - (a) how do we use the script to make the problem happen (e.g. - what things do we click on, in what order)? - (b) what happens when you do these things (presumably this is - undesirable)? - (c) what did you expect to happen instead? - We will log and follow-up on each bug, although we cannot promise a specific turn-around time. Enhancements may take longer and may not happen at all unless there is widespread support for them (we're @@ -337,59 +196,7 @@ offer Tcl/Tk training: http://www.scriptics.com/resource/commercial/training -11. Tcl version numbers ------------------------ - -You can test the current version of Tcl by examining the -tcl_version and tcl_patchLevel variables. The tcl_patchLevel -variable follows the naming rules outlined below (e.g., 8.0.5). -The tcl_version just has the major.minor numbers in it (e.g., 8.0) - -Each Tcl release is identified by two numbers separated by a dot, e.g. -6.7 or 7.0. If a new release contains changes that are likely to break -existing C code or Tcl scripts then the major release number increments -and the minor number resets to zero: 6.0, 7.0, etc. If a new release -contains only bug fixes and compatible changes, then the minor number -increments without changing the major number, e.g. 7.1, 7.2, etc. If -you have C code or Tcl scripts that work with release X.Y, then they -should also work with any release X.Z as long as Z > Y. - -Alpha and beta releases have an additional suffix of the form a2 or b1. -For example, Tcl 7.0b1 is the first beta release of Tcl version 7.0, -Tcl 7.0b2 is the second beta release, and so on. A beta release is an -initial version of a new release, used to fix bugs and bad features before -declaring the release stable. An alpha release is like a beta release, -except it's likely to need even more work before it's "ready for prime -time". New releases are normally preceded by one or more alpha and beta -releases. We hope that lots of people will try out the alpha and beta -releases and report problems. We'll make new alpha/beta releases to fix -the problems, until eventually there is a beta release that appears to -be stable. Once this occurs we'll make the final release. - -We can't promise to maintain compatibility among alpha and beta releases. -For example, release 7.1b2 may not be backward compatible with 7.1b1, even -though the final 7.1 release will be backward compatible with 7.0. This -allows us to change new features as we find problems during beta testing. -We'll try to minimize incompatibilities between beta releases, but if -a major problem turns up then we'll fix it even if it introduces an -incompatibility. Once the official release is made then there won't -be any more incompatibilities until the next release with a new major -version number. - -(Note: This compatibility is true for Tcl scripts, but historically -the Tcl C APIs have changed enough between releases that you may need -to work a bit to upgrade extensions.) - -Patch releases now have a suffix such as ".4" or ".5". Prior to -version 8.0.3, patch releases had the suffix "p1" or "p2". So, the -8.0 release went to 8.0p1, 8.0p2, 8.0.3, 8.0.4, and 8.0.5. The alphas -and betas continue to use the 'a' and 'b' letters in their -tcl_patchLevel. Patch releases normally contain bug fixes only. A -patch release (e.g Tcl 8.0.5) should be completely compatible with the -base release from which it is derived (e.g. Tcl 8.0), and you should -normally use the highest available patch release. - -12. Thank You +10. Thank You ------------- We'd like to express our thanks to the Tcl community for all the diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index f579c0d..2ac795b 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.11 1999/04/22 22:57:07 stanton Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.12 1999/04/24 01:46:52 stanton Exp $ */ #include "tclInt.h" @@ -40,7 +40,253 @@ /* !BEGIN!: Do not edit below this line. */ -static TclStubHooks tclStubHooks; +TclIntStubs tclIntStubs = { + TCL_STUB_MAGIC, + NULL, + TclAccess, /* 0 */ + TclAccessDeleteProc, /* 1 */ + TclAccessInsertProc, /* 2 */ + TclAllocateFreeObjects, /* 3 */ + NULL, /* 4 */ + TclCleanupChildren, /* 5 */ + TclCleanupCommand, /* 6 */ + TclCopyAndCollapse, /* 7 */ + TclCopyChannel, /* 8 */ + TclCreatePipeline, /* 9 */ + TclCreateProc, /* 10 */ + TclDeleteCompiledLocalVars, /* 11 */ + TclDeleteVars, /* 12 */ + TclDoGlob, /* 13 */ + TclDumpMemoryInfo, /* 14 */ + NULL, /* 15 */ + TclExprFloatError, /* 16 */ + TclFileAttrsCmd, /* 17 */ + TclFileCopyCmd, /* 18 */ + TclFileDeleteCmd, /* 19 */ + TclFileMakeDirsCmd, /* 20 */ + TclFileRenameCmd, /* 21 */ + TclFindElement, /* 22 */ + TclFindProc, /* 23 */ + TclFormatInt, /* 24 */ + TclFreePackageInfo, /* 25 */ + NULL, /* 26 */ + TclGetDate, /* 27 */ + TclpGetDefaultStdChannel, /* 28 */ + TclGetElementOfIndexedArray, /* 29 */ + NULL, /* 30 */ + TclGetExtension, /* 31 */ + TclGetFrame, /* 32 */ + TclGetInterpProc, /* 33 */ + TclGetIntForIndex, /* 34 */ + TclGetIndexedScalar, /* 35 */ + TclGetLong, /* 36 */ + TclGetLoadedPackages, /* 37 */ + TclGetNamespaceForQualName, /* 38 */ + TclGetObjInterpProc, /* 39 */ + TclGetOpenMode, /* 40 */ + TclGetOriginalCommand, /* 41 */ + TclpGetUserHome, /* 42 */ + TclGlobalInvoke, /* 43 */ + TclGuessPackageName, /* 44 */ + TclHideUnsafeCommands, /* 45 */ + TclInExit, /* 46 */ + TclIncrElementOfIndexedArray, /* 47 */ + TclIncrIndexedScalar, /* 48 */ + TclIncrVar2, /* 49 */ + TclInitCompiledLocals, /* 50 */ + TclInterpInit, /* 51 */ + TclInvoke, /* 52 */ + TclInvokeObjectCommand, /* 53 */ + TclInvokeStringCommand, /* 54 */ + TclIsProc, /* 55 */ + NULL, /* 56 */ + NULL, /* 57 */ + TclLookupVar, /* 58 */ + TclpMatchFiles, /* 59 */ + TclNeedSpace, /* 60 */ + TclNewProcBodyObj, /* 61 */ + TclObjCommandComplete, /* 62 */ + TclObjInterpProc, /* 63 */ + TclObjInvoke, /* 64 */ + TclObjInvokeGlobal, /* 65 */ + TclOpenFileChannelDeleteProc, /* 66 */ + TclOpenFileChannelInsertProc, /* 67 */ + TclpAccess, /* 68 */ + TclpAlloc, /* 69 */ + TclpCopyFile, /* 70 */ + TclpCopyDirectory, /* 71 */ + TclpCreateDirectory, /* 72 */ + TclpDeleteFile, /* 73 */ + TclpFree, /* 74 */ + TclpGetClicks, /* 75 */ + TclpGetSeconds, /* 76 */ + TclpGetTime, /* 77 */ + TclpGetTimeZone, /* 78 */ + TclpListVolumes, /* 79 */ + TclpOpenFileChannel, /* 80 */ + TclpRealloc, /* 81 */ + TclpRemoveDirectory, /* 82 */ + TclpRenameFile, /* 83 */ + NULL, /* 84 */ + NULL, /* 85 */ + NULL, /* 86 */ + NULL, /* 87 */ + TclPrecTraceProc, /* 88 */ + TclPreventAliasLoop, /* 89 */ + NULL, /* 90 */ + TclProcCleanupProc, /* 91 */ + TclProcCompileProc, /* 92 */ + TclProcDeleteProc, /* 93 */ + TclProcInterpProc, /* 94 */ + TclpStat, /* 95 */ + TclRenameCommand, /* 96 */ + TclResetShadowedCmdRefs, /* 97 */ + TclServiceIdle, /* 98 */ + TclSetElementOfIndexedArray, /* 99 */ + TclSetIndexedScalar, /* 100 */ + TclSetPreInitScript, /* 101 */ + TclSetupEnv, /* 102 */ + TclSockGetPort, /* 103 */ + TclSockMinimumBuffers, /* 104 */ + TclStat, /* 105 */ + TclStatDeleteProc, /* 106 */ + TclStatInsertProc, /* 107 */ + TclTeardownNamespace, /* 108 */ + TclUpdateReturnInfo, /* 109 */ + NULL, /* 110 */ + Tcl_AddInterpResolvers, /* 111 */ + Tcl_AppendExportList, /* 112 */ + Tcl_CreateNamespace, /* 113 */ + Tcl_DeleteNamespace, /* 114 */ + Tcl_Export, /* 115 */ + Tcl_FindCommand, /* 116 */ + Tcl_FindNamespace, /* 117 */ + Tcl_GetInterpResolvers, /* 118 */ + Tcl_GetNamespaceResolvers, /* 119 */ + Tcl_FindNamespaceVar, /* 120 */ + Tcl_ForgetImport, /* 121 */ + Tcl_GetCommandFromObj, /* 122 */ + Tcl_GetCommandFullName, /* 123 */ + Tcl_GetCurrentNamespace, /* 124 */ + Tcl_GetGlobalNamespace, /* 125 */ + Tcl_GetVariableFullName, /* 126 */ + Tcl_Import, /* 127 */ + Tcl_PopCallFrame, /* 128 */ + Tcl_PushCallFrame, /* 129 */ + Tcl_RemoveInterpResolvers, /* 130 */ + Tcl_SetNamespaceResolvers, /* 131 */ + TclpHasSockets, /* 132 */ + TclpGetDate, /* 133 */ + TclpStrftime, /* 134 */ + TclpCheckStackSpace, /* 135 */ + NULL, /* 136 */ + TclpChdir, /* 137 */ + TclGetEnv, /* 138 */ + TclpLoadFile, /* 139 */ + TclLooksLikeInt, /* 140 */ + TclpGetCwd, /* 141 */ + TclSetByteCodeFromAny, /* 142 */ + TclAddLiteralObj, /* 143 */ + TclHideLiteral, /* 144 */ +}; + +TclIntPlatStubs tclIntPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ + TclGetAndDetachPids, /* 0 */ + TclpCloseFile, /* 1 */ + TclpCreateCommandChannel, /* 2 */ + TclpCreatePipe, /* 3 */ + TclpCreateProcess, /* 4 */ + NULL, /* 5 */ + TclpMakeFile, /* 6 */ + TclpOpenFile, /* 7 */ + TclUnixWaitForFile, /* 8 */ + TclpCreateTempFile, /* 9 */ +#endif /* UNIX */ +#ifdef __WIN32__ + TclWinConvertError, /* 0 */ + TclWinConvertWSAError, /* 1 */ + TclWinGetServByName, /* 2 */ + TclWinGetSockOpt, /* 3 */ + TclWinGetTclInstance, /* 4 */ + NULL, /* 5 */ + TclWinNToHS, /* 6 */ + TclWinSetSockOpt, /* 7 */ + TclpGetPid, /* 8 */ + TclWinGetPlatformId, /* 9 */ + TclWinSynchSpawn, /* 10 */ + TclGetAndDetachPids, /* 11 */ + TclpCloseFile, /* 12 */ + TclpCreateCommandChannel, /* 13 */ + TclpCreatePipe, /* 14 */ + TclpCreateProcess, /* 15 */ + NULL, /* 16 */ + NULL, /* 17 */ + TclpMakeFile, /* 18 */ + TclpOpenFile, /* 19 */ + TclWinAddProcess, /* 20 */ + TclpAsyncMark, /* 21 */ + TclpCreateTempFile, /* 22 */ + TclpGetTZName, /* 23 */ + TclWinNoBackslash, /* 24 */ +#endif /* __WIN32__ */ +#ifdef MAC_TCL + TclpSysAlloc, /* 0 */ + TclpSysFree, /* 1 */ + TclpSysRealloc, /* 2 */ + TclpExit, /* 3 */ + FSpGetDefaultDir, /* 4 */ + FSpSetDefaultDir, /* 5 */ + FSpFindFolder, /* 6 */ + GetGlobalMouse, /* 7 */ + FSpGetDirectoryID, /* 8 */ + FSpOpenResFileCompat, /* 9 */ + FSpCreateResFileCompat, /* 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 */ + NULL, /* 24 */ + TclMacChmod, /* 25 */ +#endif /* MAC_TCL */ +}; + +TclPlatStubs tclPlatStubs = { + TCL_STUB_MAGIC, + NULL, +#ifdef __WIN32__ + 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 */ +}; + +static TclStubHooks tclStubHooks = { + &tclPlatStubs, + &tclIntStubs, + &tclIntPlatStubs +}; TclStubs tclStubs = { TCL_STUB_MAGIC, @@ -440,253 +686,4 @@ TclStubs tclStubs = { Tcl_Stat, /* 368 */ }; -TclIntStubs tclIntStubs = { - TCL_STUB_MAGIC, - NULL, - TclAccess, /* 0 */ - TclAccessDeleteProc, /* 1 */ - TclAccessInsertProc, /* 2 */ - TclAllocateFreeObjects, /* 3 */ - NULL, /* 4 */ - TclCleanupChildren, /* 5 */ - TclCleanupCommand, /* 6 */ - TclCopyAndCollapse, /* 7 */ - TclCopyChannel, /* 8 */ - TclCreatePipeline, /* 9 */ - TclCreateProc, /* 10 */ - TclDeleteCompiledLocalVars, /* 11 */ - TclDeleteVars, /* 12 */ - TclDoGlob, /* 13 */ - TclDumpMemoryInfo, /* 14 */ - NULL, /* 15 */ - TclExprFloatError, /* 16 */ - TclFileAttrsCmd, /* 17 */ - TclFileCopyCmd, /* 18 */ - TclFileDeleteCmd, /* 19 */ - TclFileMakeDirsCmd, /* 20 */ - TclFileRenameCmd, /* 21 */ - TclFindElement, /* 22 */ - TclFindProc, /* 23 */ - TclFormatInt, /* 24 */ - TclFreePackageInfo, /* 25 */ - NULL, /* 26 */ - TclGetDate, /* 27 */ - TclpGetDefaultStdChannel, /* 28 */ - TclGetElementOfIndexedArray, /* 29 */ - NULL, /* 30 */ - TclGetExtension, /* 31 */ - TclGetFrame, /* 32 */ - TclGetInterpProc, /* 33 */ - TclGetIntForIndex, /* 34 */ - TclGetIndexedScalar, /* 35 */ - TclGetLong, /* 36 */ - TclGetLoadedPackages, /* 37 */ - TclGetNamespaceForQualName, /* 38 */ - TclGetObjInterpProc, /* 39 */ - TclGetOpenMode, /* 40 */ - TclGetOriginalCommand, /* 41 */ - TclpGetUserHome, /* 42 */ - TclGlobalInvoke, /* 43 */ - TclGuessPackageName, /* 44 */ - TclHideUnsafeCommands, /* 45 */ - TclInExit, /* 46 */ - TclIncrElementOfIndexedArray, /* 47 */ - TclIncrIndexedScalar, /* 48 */ - TclIncrVar2, /* 49 */ - TclInitCompiledLocals, /* 50 */ - TclInterpInit, /* 51 */ - TclInvoke, /* 52 */ - TclInvokeObjectCommand, /* 53 */ - TclInvokeStringCommand, /* 54 */ - TclIsProc, /* 55 */ - NULL, /* 56 */ - NULL, /* 57 */ - TclLookupVar, /* 58 */ - TclpMatchFiles, /* 59 */ - TclNeedSpace, /* 60 */ - TclNewProcBodyObj, /* 61 */ - TclObjCommandComplete, /* 62 */ - TclObjInterpProc, /* 63 */ - TclObjInvoke, /* 64 */ - TclObjInvokeGlobal, /* 65 */ - TclOpenFileChannelDeleteProc, /* 66 */ - TclOpenFileChannelInsertProc, /* 67 */ - TclpAccess, /* 68 */ - TclpAlloc, /* 69 */ - TclpCopyFile, /* 70 */ - TclpCopyDirectory, /* 71 */ - TclpCreateDirectory, /* 72 */ - TclpDeleteFile, /* 73 */ - TclpFree, /* 74 */ - TclpGetClicks, /* 75 */ - TclpGetSeconds, /* 76 */ - TclpGetTime, /* 77 */ - TclpGetTimeZone, /* 78 */ - TclpListVolumes, /* 79 */ - TclpOpenFileChannel, /* 80 */ - TclpRealloc, /* 81 */ - TclpRemoveDirectory, /* 82 */ - TclpRenameFile, /* 83 */ - NULL, /* 84 */ - NULL, /* 85 */ - NULL, /* 86 */ - NULL, /* 87 */ - TclPrecTraceProc, /* 88 */ - TclPreventAliasLoop, /* 89 */ - NULL, /* 90 */ - TclProcCleanupProc, /* 91 */ - TclProcCompileProc, /* 92 */ - TclProcDeleteProc, /* 93 */ - TclProcInterpProc, /* 94 */ - TclpStat, /* 95 */ - TclRenameCommand, /* 96 */ - TclResetShadowedCmdRefs, /* 97 */ - TclServiceIdle, /* 98 */ - TclSetElementOfIndexedArray, /* 99 */ - TclSetIndexedScalar, /* 100 */ - TclSetPreInitScript, /* 101 */ - TclSetupEnv, /* 102 */ - TclSockGetPort, /* 103 */ - TclSockMinimumBuffers, /* 104 */ - TclStat, /* 105 */ - TclStatDeleteProc, /* 106 */ - TclStatInsertProc, /* 107 */ - TclTeardownNamespace, /* 108 */ - TclUpdateReturnInfo, /* 109 */ - NULL, /* 110 */ - Tcl_AddInterpResolvers, /* 111 */ - Tcl_AppendExportList, /* 112 */ - Tcl_CreateNamespace, /* 113 */ - Tcl_DeleteNamespace, /* 114 */ - Tcl_Export, /* 115 */ - Tcl_FindCommand, /* 116 */ - Tcl_FindNamespace, /* 117 */ - Tcl_GetInterpResolvers, /* 118 */ - Tcl_GetNamespaceResolvers, /* 119 */ - Tcl_FindNamespaceVar, /* 120 */ - Tcl_ForgetImport, /* 121 */ - Tcl_GetCommandFromObj, /* 122 */ - Tcl_GetCommandFullName, /* 123 */ - Tcl_GetCurrentNamespace, /* 124 */ - Tcl_GetGlobalNamespace, /* 125 */ - Tcl_GetVariableFullName, /* 126 */ - Tcl_Import, /* 127 */ - Tcl_PopCallFrame, /* 128 */ - Tcl_PushCallFrame, /* 129 */ - Tcl_RemoveInterpResolvers, /* 130 */ - Tcl_SetNamespaceResolvers, /* 131 */ - TclpHasSockets, /* 132 */ - TclpGetDate, /* 133 */ - TclpStrftime, /* 134 */ - TclpCheckStackSpace, /* 135 */ - NULL, /* 136 */ - TclpChdir, /* 137 */ - TclGetEnv, /* 138 */ - TclpLoadFile, /* 139 */ - TclLooksLikeInt, /* 140 */ - TclpGetCwd, /* 141 */ - TclSetByteCodeFromAny, /* 142 */ - TclAddLiteralObj, /* 143 */ - TclHideLiteral, /* 144 */ -}; - -TclIntPlatStubs tclIntPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */ - TclGetAndDetachPids, /* 0 */ - TclpCloseFile, /* 1 */ - TclpCreateCommandChannel, /* 2 */ - TclpCreatePipe, /* 3 */ - TclpCreateProcess, /* 4 */ - NULL, /* 5 */ - TclpMakeFile, /* 6 */ - TclpOpenFile, /* 7 */ - TclUnixWaitForFile, /* 8 */ - TclpCreateTempFile, /* 9 */ -#endif /* UNIX */ -#ifdef __WIN32__ - TclWinConvertError, /* 0 */ - TclWinConvertWSAError, /* 1 */ - TclWinGetServByName, /* 2 */ - TclWinGetSockOpt, /* 3 */ - TclWinGetTclInstance, /* 4 */ - NULL, /* 5 */ - TclWinNToHS, /* 6 */ - TclWinSetSockOpt, /* 7 */ - TclpGetPid, /* 8 */ - TclWinGetPlatformId, /* 9 */ - TclWinSynchSpawn, /* 10 */ - TclGetAndDetachPids, /* 11 */ - TclpCloseFile, /* 12 */ - TclpCreateCommandChannel, /* 13 */ - TclpCreatePipe, /* 14 */ - TclpCreateProcess, /* 15 */ - NULL, /* 16 */ - NULL, /* 17 */ - TclpMakeFile, /* 18 */ - TclpOpenFile, /* 19 */ - TclWinAddProcess, /* 20 */ - TclpAsyncMark, /* 21 */ - TclpCreateTempFile, /* 22 */ - TclpGetTZName, /* 23 */ - TclWinNoBackslash, /* 24 */ -#endif /* __WIN32__ */ -#ifdef MAC_TCL - TclpSysAlloc, /* 0 */ - TclpSysFree, /* 1 */ - TclpSysRealloc, /* 2 */ - TclpExit, /* 3 */ - FSpGetDefaultDir, /* 4 */ - FSpSetDefaultDir, /* 5 */ - FSpFindFolder, /* 6 */ - GetGlobalMouse, /* 7 */ - FSpGetDirectoryID, /* 8 */ - FSpOpenResFileCompat, /* 9 */ - FSpCreateResFileCompat, /* 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 */ - NULL, /* 24 */ - TclMacChmod, /* 25 */ -#endif /* MAC_TCL */ -}; - -TclPlatStubs tclPlatStubs = { - TCL_STUB_MAGIC, - NULL, -#ifdef __WIN32__ - 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 */ -}; - -static TclStubHooks tclStubHooks = { - &tclPlatStubs, - &tclIntStubs, - &tclIntPlatStubs -}; - - /* !END!: Do not edit above this line. */ diff --git a/mac/README b/mac/README index 8f05bbc..4d379e3 100644 --- a/mac/README +++ b/mac/README @@ -1,4 +1,4 @@ -Tcl 8.1b2 for Macintosh +Tcl 8.1 for Macintosh by Ray Johnson Scriptics Corporation @@ -8,76 +8,30 @@ Jim Ingham Cygnus Solutions jingham@cygnus.com -RCS: @(#) $Id: README,v 1.6 1999/04/16 00:47:19 stanton Exp $ +RCS: @(#) $Id: README,v 1.7 1999/04/24 01:46:53 stanton Exp $ 1. Introduction --------------- This is the README file for the Macintosh version of the Tcl -scripting language. The file consists of information specific -to the Macintosh version of Tcl. For more general information -please read the README file in the main Tcl directory. +scripting language. The home page for the Macintosh releases is + http://www.scriptics.com/mac/ -2. What's new? --------------- +A summary of what's new in this release is at + http://www.scriptics.com/software/whatsnew81.html -Internationalization! This is the first Tcl release that features -can handle international characters. +A summary of Macintosh-specific features is at + http://www.scriptics.com/mac/features.html -On the Macintosh, the System Encoding is taken from the script of the -Finder Font as set in the Views control panel, or in the Finder -Preferences in OS8.0. -See the main Tcl README for other features new to Tcl 8. - -3. Mac specific features ------------------------- - -There are several features or enhancements in Tcl that are unique to -the Macintosh version of Tcl. Here is a list of those features and -pointers to where you can find more information about the feature. - -* The "resource" command allows you manipulate Macintosh resources. - A complete man page is available for this command. - -* The Mac version of the "source" command has an option to source from - a Macintosh resource. Check the man page from the source command - for details. - -* The only command NOT available on the Mac is the exec command. - However, we include a Mac only package called Tclapplescript that - provides access to Mac's AppleScript system. This command is still - under design & construction. Documentatin can be found in the "HTML - Docs:tcl8.1" folder in a file called "AppleScript.html". - -* The env variable on the Macintosh works rather differently than on - Windows or UNIX platforms. Check out the tclvars man page for - details. - -* The command "file volumes" returns the available volumes on your - Macintosh. Check out the file command for details. - -* The command "file attributes" has the Mac specific options of - -creator and -type which allow you to query and set the Macintosh - creator and type codes for Mac files. See file man page for details. - -* We have added a template for creating a Background-only Tcl application. - So you can use Tcl as a faceless server process. For more details, see - the file background.doc. - -If you are writing cross platform code but would still like to use -some of these Mac specific commands, please remember to use the -tcl_platform variable to special case your code. - - -4. The Distribution +2. The Distribution ------------------- Macintosh Tcl is distributed in three different forms. This should make it easier to only download what you need. The packages are as follows: -mactk8.1b2.sea.hqx +mactk8.1.sea.hqx This distribution is a "binary" only release. It contains an installer program that will install a 68k, PowerPC, or Fat @@ -85,41 +39,25 @@ mactk8.1b2.sea.hqx it installs the Tcl & Tk libraries in the Extensions folder inside your System Folder. -mactcltk-full-8.1b2.sea.hqx +mactcltk-full-8.1.sea.hqx This release contains the full release of Tcl and Tk for the Macintosh plus the More Files packages which Macintosh Tcl and Tk rely on. -mactcl-source-8.1b2.sea.hqx +mactcl-source-8.1.sea.hqx This release contains the complete source for Tcl 8.1. In addition, Metrowerks CodeWarrior libraries and project files are included. However, you must already have the More Files package to compile this code. -5. Documentation ----------------- - The "html" subdirectory contains reference documentation in in the HTML format. You may also find these pages at: http://www.scriptics.com/man/tcl8.1/contents.html -Other documentation and sample Tcl scripts can be found at -the Tcl archive site: - - ftp://ftp.neosoft.com/tcl/ - -and the Tcl resource center: - - http://www.scriptics.com/resource/ - -The internet news group comp.lang.tcl is also a valuable -source of information about Tcl. A mailing list is also -available (see below). - -6. Compiling Tcl +3. Compiling Tcl ---------------- In order to compile Macintosh Tcl you must have the @@ -129,46 +67,10 @@ following items: Mac Tcl 8.1 (source) More Files 1.4.3 -There are two sets of project files included with the package. The ones -we use for the release are for CodeWarrior Pro 3, and are not compatible -with CodeWarrior Gold release 11 and earlier. We have included the files -for earlier versions of CodeWarrior in the folder tcl8.1:mac:CW11 Projects, -but they are unsupported, and a little out of date. - -As of Tcl8.0p2, the code will also build under CW Pro 2. The only -change that needs to be made is that float.mac.c should be replaced by -float.c in the MacTcl MSL project file. - -However, there seems to be a bug in the CFM68K Linker in CW Pro 2, -which renders the CFM68K Version under CW Pro 2 very unstable. I am -working with MetroWerks to resolve this issue. The PPC version is -fine, as is the Traditional 68K Shell. But if you need to use the -CFM68K, then you must stay with CW Pro 1 for now. - -The project files included with the Mac Tcl source should work -fine. The only thing you may need to update are the access paths. -Unfortunantly, it's somewhat common for the project files to become -slightly corrupted. The most common problem is that the "Prefix file" -found in the "C/C++ Preference" panel is incorrect. This should be -set to MW_TclHeaderPPC, MW_TclHeader68K or MW_TclHeaderCFM68K. - -To build the fat version of TclShell, open the project file "TclShells.¼", -select the "TclShell" target, and build. All of the associated binaries will -be built automoatically. There are also targets for building static 68K -and Power PC builds, for building a CFM 68K build, and for building a -shared library Power PC only build. - -Special notes: - -* There is a small bug in More Files 1.4.3. Also you should not use - MoreFiles 1.4.4 - 1.4.6. Look in the file named morefiles.doc for - more details. - -* You may not have the libmoto library which will cause a compile - error. You don't REALLY need it - it can be removed. Look at the - file libmoto.doc for more details. - -* Check out the file bugs.doc for information about known bugs. +The included project files should work fine. However, for +current release notes please check this page: + + http://www.scriptics.com/support/howto/compile.html#mac If you have comments or Bug reports send them to: Jim Ingham diff --git a/tests/http.test b/tests/http.test index 752e3a2..099b962 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.4 1999/04/16 00:47:28 stanton Exp $ +# RCS: @(#) $Id: http.test,v 1.5 1999/04/24 01:46:53 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -36,7 +36,16 @@ if {[catch {package require http 2.0}]} { set port 8010 set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null" -set httpdFile [file join $::tcltest::testsDir httpd] +# Ensure httpd file exists + +set origFile [file join $::tcltest::testsDir httpd] +set newFile [file join $::tcltest::workingDir httpd] +if {![file exists $newFile]} { + file copy $origFile $newFile + set removeHttpd 1 +} +set httpdFile [file join $::tcltest::workingDir httpd] + if {[info commands testthread] == "testthread" && [file exists $httpdFile]} { set httpthread [testthread create " source $httpdFile @@ -299,17 +308,10 @@ if {[info exists httpthread]} { } else { close $listen } -::tcltest::cleanupTests -return - - - - - - - - - - +if {[info exist removeHttpd]} { + remove $httpdFile +} +::tcltest::cleanupTests +return diff --git a/tests/unixInit.test b/tests/unixInit.test index 7ed56b7..84fcdb0 100644 --- a/tests/unixInit.test +++ b/tests/unixInit.test @@ -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: unixInit.test,v 1.4 1999/04/21 21:50:31 rjohnson Exp $ +# RCS: @(#) $Id: unixInit.test,v 1.5 1999/04/24 01:46:53 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -90,7 +90,7 @@ test unixInit-2.1 {TclpInitLibraryPath: value of installLib, developLib} \ set x {} lappend x [string compare [lindex $path 0] $prefix/$installLib] - lappend x [string compare [lindex $path 1] [file dirname $prefix]/$developLib] + lappend x [string compare [lindex $path 4] [file dirname $prefix]/$developLib] set x } {0 0} test unixInit-2.2 {TclpInitLibraryPath: TCL_LIBRARY} {unixOnly installedTcl} { @@ -139,7 +139,7 @@ test unixInit-2.6 {TclpInitLibraryPath: executable relative} \ set x [lrange [getlibpath /tmp/sparkly/bin/tcltest] 0 1] file delete -force /tmp/sparkly set x -} [list /tmp/sparkly/lib/tcl[info tclversion] /tmp/tcl[info tclversion]/library] +} [list /tmp/sparkly/lib/tcl[info tclversion] /tmp/lib/tcl[info tclversion]] test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} \ {emptyTest unixOnly} { # would need test command to get defaultLibDir and compare it to diff --git a/tools/README b/tools/README index 67cac12..1caf63c 100644 --- a/tools/README +++ b/tools/README @@ -2,3 +2,12 @@ This directory contains unsupported tools that are used during the release engineering process. +Generating Windows Help Files: +1) On UNIX, (after autoconf and configure), do + make winhelp + this converts the Nroff to RTF files. +2) On Windows, convert the RTF to a Help doc, do + nmake helpfile + +Generating Windows binary distribution. +Update and compile the WYSE tcl.wse configuration. diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl index 159565d..6ac76fc 100644 --- a/tools/genStubs.tcl +++ b/tools/genStubs.tcl @@ -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: genStubs.tcl,v 1.3 1999/04/16 00:47:39 stanton Exp $ +# RCS: @(#) $Id: genStubs.tcl,v 1.4 1999/04/24 01:46:53 stanton Exp $ namespace eval genStubs { # libraryName -- @@ -766,7 +766,13 @@ proc genStubs::emitInit {name textVar} { append capName [string range $name 1 end] if {[info exists hooks($name)]} { - append text "\nstatic ${capName}StubHooks ${name}StubHooks;\n" + append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n" + set sep " " + foreach sub $hooks($name) { + append text $sep "&${sub}Stubs" + set sep ",\n " + } + append text "\n\};\n" } append text "\n${capName}Stubs ${name}Stubs = \{\n" append text " TCL_STUB_MAGIC,\n" @@ -799,22 +805,23 @@ proc genStubs::emitInits {} { variable libraryName variable interfaces + # Assuming that dependencies only go one level deep, we need to emit + # all of the leaves first to avoid needing forward declarations. + + set leaves {} + set roots {} foreach name [lsort [array names interfaces]] { + if {[info exists hooks($name)]} { + lappend roots $name + } else { + lappend leaves $name + } + } + foreach name $leaves { emitInit $name text } - - - foreach name [array names hooks] { - set capName [string toupper [string index $name 0]] - append capName [string range $name 1 end] - - append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n" - set sep " " - foreach sub $hooks($name) { - append text $sep "&${sub}Stubs" - set sep ",\n " - } - append text "\n\};\n\n" + foreach name $roots { + emitInit $name text } rewriteFile [file join $outDir ${libraryName}StubInit.c] $text diff --git a/unix/README b/unix/README index 77e931e..117edc8 100644 --- a/unix/README +++ b/unix/README @@ -1,9 +1,15 @@ +Tcl UNIX README +--------------- + This is the directory where you configure, compile, test, and install UNIX versions of Tcl. This directory also contains source files for Tcl that are specific to UNIX. Some of the files in this directory are used on the PC or Mac platform too, but they all depend on UNIX (POSIX/ANSI C) interfaces and some of them only make sense under UNIX. +Updated forms of the information found in this file is available at: + http://www.scriptics.com/support/howto/compile.html#unix + The rest of this file contains instructions on how to do this. The release should compile and run either "out of the box" or with trivial changes on any UNIX-like system that approximates POSIX, BSD, or System @@ -12,7 +18,7 @@ SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for a PC running Windows, see the README file in the directory ../win. To compile for a Macintosh, see the README file in the directory ../mac. -RCS: @(#) $Id: README,v 1.4 1999/04/16 00:48:03 stanton Exp $ +RCS: @(#) $Id: README,v 1.5 1999/04/24 01:46:54 stanton Exp $ How To Compile And Install Tcl: ------------------------------- diff --git a/unix/configure.in b/unix/configure.in index 711863f..ab8e791 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -2,7 +2,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. AC_INIT(../generic/tcl.h) -# RCS: @(#) $Id: configure.in,v 1.32 1999/04/21 21:50:33 rjohnson Exp $ +# RCS: @(#) $Id: configure.in,v 1.33 1999/04/24 01:46:54 stanton Exp $ TCL_VERSION=8.1 TCL_MAJOR_VERSION=8 @@ -907,7 +907,7 @@ case $system in LD_FLAGS="-Wl,-Bexport" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-*|OpenBSD-*) + NetBSD-*|FreeBSD-[12].*|OpenBSD-*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ SHLIB_CFLAGS="-fpic" @@ -935,6 +935,17 @@ case $system in TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots + ;; + FreeBSD-*) + # FreeBSD 3.* and greater have ELF. + SHLIB_CFLAGS="-fpic" + SHLIB_LD="ld -Bshareable -x" + SHLIB_LD_LIBS="" + SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" + LD_FLAGS="" + LD_SEARCH_FLAGS="" ;; NEXTSTEP-*) SHLIB_CFLAGS="" diff --git a/win/README b/win/README index 5a42354..bad9d8f 100644 --- a/win/README +++ b/win/README @@ -4,32 +4,19 @@ by Scott Stanton Scriptics Corporation scott.stanton@scriptics.com -RCS: @(#) $Id: README,v 1.10 1999/04/16 00:48:06 stanton Exp $ +RCS: @(#) $Id: README,v 1.11 1999/04/24 01:46:54 stanton Exp $ 1. Introduction --------------- This is the directory where you configure and compile the Windows version of Tcl. This directory also contains source files for Tcl -that are specific to Microsoft Windows. The rest of this file -contains information specific to the Windows version of Tcl. +that are specific to Microsoft Windows. -2. Distribution notes ---------------------- +The information in this file is maintained on the web at: + http://www.scriptics.com/support/howto/compile.html#win -Tcl 8.1 for Windows is distributed in binary form in addition to the -common source release. The binary distribution is a self-extracting -archive with a built-in installation script. - -Look for the binary release in the same location as the source release -(ftp.scriptics.com:/pub/tcl or any of the mirror sites). For most users, -the binary release will be much easier to install and use. You only -need the source release if you plan to modify the core of Tcl, or if -you need to compile with a different compiler. With the addition of -the dynamic loading interface, it is no longer necessary to have the -source distribution in order to build and use extensions. - -3. Compiling Tcl +2. Compiling Tcl ---------------- In order to compile Tcl for Windows, you need the following items: @@ -38,15 +25,13 @@ In order to compile Tcl for Windows, you need the following items: Visual C++ 2.x/4.x/5.x -In practice, the 8.1.a2 release is built with Visual C++ 5.0 +In practice, the 8.1 release is built with Visual C++ 5.0 -In the "win" subdirectory of the source release, you will find two -files called "makefile.bc" and "makefile.vc". These are the makefiles -for the Borland and Visual C++ compilers respectively. You should -copy the appropriate one to "makefile" and update the paths at the -top of the file to reflect your system configuration. Now you can use -"make" (or "nmake" for VC++) to build the tcl libraries and the tclsh -executable. +In the "win" subdirectory of the source release, you will find +"makefile.vc". This is the makefile Visual C++ compiler. You should +update the paths at the top of the file to reflect your system +configuration. Now you can use "make" (or "nmake" for VC++) to build +the tcl libraries and the tclsh executable. In order to use the binaries generated by these makefiles, you will need to place the Tcl script library files someplace where Tcl can @@ -69,120 +54,21 @@ directory containing tclsh81.exe. Note: Tcl no longer provides support for Win32s. -4. Building Extensions ----------------------- - -With the Windows compilers you have to worry about how you export symbols -from DLLs. tcl.h defines a few macros to help solve this problem: -EXTERN - all Tcl_ function prototypes use this macro, which implies - they are exported. You'll see this used in tcl.h and tk.h. - You should use this in your exported procedures. - However, this is not the whole story. -TCL_STORAGE_CLASS - this is really an import/export flag, depending on if you are - importing symbols from a DLL (i.e., a user of the DLL), or if - you are exporting symbols from the DLL (i.e., you are building it.) - The EXTERN macro includes TCL_STORAGE_CLASS. - TCL_STORAGE_CLASS is defined to be either DLLIMPORT or DLLEXPORT as - described below. -STATIC_BUILD - define this if you are *not* building a DLL - (e.g., a main program) -DLL_BUILD - define this if you *are* building a DLL -DLLIMPORT - If STATIC_BUILD is defined, this becomes nothing. - (On UNIX, DLLIMPORT is defined to be empty) - Otherwise, this this expands to __declspec(dllimport) -DLLEXPORT - If STATIC_BUILD is defined, this becomes nothing. - (On UNIX, DLLEXPORT is defined to be empty) - Otherwise, this this expands to __declspec(dllexport) - -EXPORT(type, func) - For the Borland compiler, you need to export functions differently. - The DLLEXPORT macro is empty, and instead you need to use - EXPORT because they had a different order. Your declaration will - look like - EXTERN EXPORT(int, Foo_Init)(Tcl_Interp *interp); -We have not defined EXPORT anywhere. You can paste this into your C file: -#ifndef STATIC_BUILD -#if defined(_MSC_VER) -# define EXPORT(a,b) __declspec(dllexport) a b -# define DllEntryPoint DllMain -#else -# if defined(__BORLANDC__) -# define EXPORT(a,b) a _export b -# else -# define EXPORT(a,b) a b -# endif -#endif -#endif - - -How to use these: - -Assume your extension is named Foo. In its Makefile, define -BUILD_Foo so that you know you are building Foo and not using it. -Then, in your main header file, foo.h, conditionally define -EXPORT to be either DLLIMPORT or DLLEXPORT based on the -presense of BUILD_Foo, like this: - -#ifndef _FOO -#define _FOO -#include "tcl.h" -/* Additional includes go here */ -/* - * if the BUILD_foo macro is defined, the assumption is that we are - * building the dynamic library. - */ -#ifdef BUILD_Foo -# undef TCL_STORAGE_CLASS -# define TCL_STORAGE_CLASS DLLEXPORT -#endif -/* - * Function prototypes for this module. - */ -EXTERN int Foo_Init _ANSI_ARGS_((Tcl_Interp *interp)); -EXTERN int Foo_SafeInit _ANSI_ARGS_((Tcl_Interp *interp)); -/* Additional prototypes go here */ -/* - * end of foo.h - * reset TCL_STORAGE_CLASS to DLLIMPORT. - */ -# undef TCL_STORAGE_CLASS -# define TCL_STORAGE_CLASS DLLIMPORT -#endif /* _FOO */ - -In your C file, put EXTERN before then functions you need to export. -If you use Borland, you'll need to use the old EXPORT macro, too. - -5. Test suite +For more information about Compiling Tcl on Windows, please see + http://www.scriptics.com/support/howto/compile.html#win + +This page includes a lengthy discussion of compiler macros necessary +when compiling Tcl extensions that will be dynamically loaded. + +3. Test suite ------------- This distribution contains an extensive test suite for Tcl. Some of the tests are timing dependent and will fail from time to time. If a test is failing consistently, please send us a bug report with as much -detail as you can manage. +detail as you can manage. Please use the form at + http://www.scriptics.com/support/bugForm.html In order to run the test suite, you build the "test" target using the appropriate makefile for your compiler. - -6. Known Bugs -------------- - -Here is the current list of known bugs/missing features for the -Windows version of Tcl: - -- Clock command fails to handle daylight savings time boundaries for - things like "last week". -- Background processes aren't properly detached on NT. -- File events only work on sockets and pipes. -- Files/console/serial ports don't support nonblocking I/O. -- Environment variables containing international characters aren't - imported correctly. - -If you have comments or bug reports for the Windows version of Tcl, -please use the form at: - -http://www.scriptics.com/support/bugForm.html - -If you have comments or bug reports for the Windows version of Tk, -please direct them to the comp.lang.tcl newsgroup or the -wintcl@tclconsortium.org mailing list. diff --git a/win/README.binary b/win/README.binary index 8a181f3..64d2fa0 100644 --- a/win/README.binary +++ b/win/README.binary @@ -1,40 +1,47 @@ Tcl/Tk 8.1 for Windows, Binary Distribution -RCS: @(#) $Id: README.binary,v 1.5 1999/04/21 21:50:33 rjohnson Exp $ +RCS: @(#) $Id: README.binary,v 1.6 1999/04/24 01:46:54 stanton Exp $ 1. Introduction --------------- This directory contains the binary distribution of Tcl/Tk 8.1.0 for Windows. It was compiled with Microsoft Visual C++ 5.0 using Win32 -API, so that it will run under Windows NT and Windows 95. The -information here corresponds to the first release of 8.1. +API, so that it will run under Windows NT, Windows 95, and Windows 98. + +Tcl provides a powerful platform for creating integration applications +that tie together diverse applications, protocols, devices, and +frameworks. When paired with the Tk toolkit, Tcl provides the fastest +and most powerful way to create GUI applications that run on PCs, Unix, +and the Macintosh. Tcl can also be used for a variety of web-related +tasks and for creating powerful command languages for applications. + +Tcl is maintained, enhanced, and distributed freely as a service to the +Tcl community by Scriptics Corporation. 2. Documentation ---------------- -The best way to get started with Tcl is to read one of the introductory -books on Tcl: +The official home for Tcl and Tk on the Web is at: + http://www.scriptics.com + +The home page for the Tcl/Tk 8.1 release is + http://www.scriptics.com/software/8.1.html - Practical Programming in Tcl and Tk, 2nd Edition, by Brent Welch, - Prentice-Hall, 1997, ISBN 0-13-616830-2 +Information about new features in Tcl/Tk 8.1 can be found at + http://www.scriptics.com/software/whatsnew81.html - Tcl and the Tk Toolkit, by John Ousterhout, - Addison-Wesley, 1994, ISBN 0-201-63337-X +Detailed release notes can be found at + http://www.scriptics.com/software/relnotes/tcl8.1 - Exploring Expect, by Don Libes, - O'Reilly and Associates, 1995, ISBN 1-56592-090-2 +Information about Tcl itself can be found at + http://www.scriptics.com/scripting/ -Other books are listed at -http://www.scriptics.com/resource/doc/books/ -http://www.tclconsortium.org/resources/books.html +There are many Tcl books on the market. Most are listed at + http://www.scriptics.com/resource/doc/books/ -There is also an official home for Tcl and Tk on the Web: - http://www.scriptics.com -These Web pages include information about the latest releases, products -related to Tcl and Tk, reports on bug fixes and porting issues, HTML -versions of the manual pages, and pointers to many other Tcl/Tk Web -pages at other sites. Check them out! +There are notes about compiling Tcl at + http://www.scriptics.com/support/howto/compile.html 3. Installation --------------- @@ -49,213 +56,33 @@ We are no longer supporting use of Tcl with 16-bit versions of Windows. Microsoft has completely dropped support of the Win32s subsystem. -4. Summary of changes in Tcl 8.1 --------------------------------- -The most important changes in Tcl 8.1 are summarized below. See -the README and changes files in the distribution -for more complete information on what has changed, including both feature -changes and bug fixes. - -Internationalization. Tcl has undergone a major -revision to support international character sets: - - -All strings in Tcl are now represented in UTF-8 instead of ASCII, so -that Tcl now supports the full Unicode character set. -The representation of ASCII characters is unchanged (in UTF-8 anything -that looks like an ASCII character is an ASCII character), but -characters with the high-order bit set, such as those in ISO-8859, -are represented with multi-byte sequences, as are all Unicode -characters with values greater than 127. This change does not affect -Tcl scripts but it does affect C code that parses strings. -Tcl automatically translates between UTF-8 and the normal encoding for -the platform during interactions with the system. - -In Tcl scripts the backslash sequence \u can be used to enter -16-bit Unicode characters. \o and \x generate -only 8-bit characters as before. - -The fconfigure command now supports a -encoding -option for specifying the encoding of an open file or socket. Tcl will -automatically translate between the specified encoding and UTF-8 during -I/O. See the directory library/encoding to find out what encodings are -supported (eventually there will be an encoding command -that makes this information more accessible). - -There are several new C APIs that support UTF-8 and various encodings. -See the manual entry Utf.3 for procedures that -translate between Unicode and UTF-8 and manipulate UTF-8 strings. -See Encoding.3 for procedures that create new encodings and -translate between encodings. See ToUpper.3 for procedures -that perform case conversions on UTF-8 strings. - -Binary data. Binary data is handled differently in Tcl 8.1 than in -Tcl 8.0. Tcl 8.1 uses the UTF-8 facilities to represent binary data: -the character value zero is represented with a multi-byte sequence, so -that (once again) strings in Tcl 8.1 never contain null bytes. This -means that binary data is now accepted everywhere in Tcl and Tk (in -Tcl 8.0 the support for binary data was incomplete). If you have C -code that needs to manipulate the bytes of binary data (as opposed to -just passing the data through) you should use a new object type called -"byte array". See the manual entry ByteArrObj.3 for information about -procedures such as Tcl_GetByteArrayFromObj. - -New regular expressions. Tcl 8.1 contains a brand new implementation -of regular expressions from Henry Spencer. This new version supports -almost all of the Perl extensions and it also handles UTF-8 and binary -data. - -Multi-Threading. Tcl 8.1 is multi-thread safe. Each thread can -contain several Tcl interpreters, but a given interpreter can not be -accessed from more than one thread. Each thread runs its own event -loop, and you can post events to other threads. There is not yet -support for tcl level use of threading except for a test -command. (Compile tcltest and try testthread.) Tk 8.1 is not yet -multi-thread safe, and may never be due to limitations of Xlib. - - -What's new in Tk 8.1 - -The most important changes in Tk 8.1 are summarized below. See the -README and changes files in the distribution for more complete -information on what has changed, including both feature changes and -bug fixes. - -1. Internationalization. Tk has undergone a major overhaul to support -the new internationalization features of Tcl. The font package has -been rewritten to support arbitrary Unicode characters; when you -specify a particular font such as "Times 12" Tk may actually use -additional fonts to display Unicode characters that don't exist in the -font you chose. Tk guarantees to find a way to display any Unicode -character regardless of the font you selected, as long as there is -some font in the system that contains the Unicode character. The -input method support in Tk has also been modified to support full -Unicode characters. - -2. Send/DDE support. The send command now works on Windows platforms. -It is implemented using DDE and there is a new dde command that allows -Tk applications to use DDE to communicate with other Windows -applications. send still doesn't work on the Macintosh. - -3. Configuration options. There is a new library of C procedures for -manipulating widget configuration options using Tcl_Objs instead of -strings. This should eventually make Tk much more efficient. Label, -button, checkbutton, radiobutton, and menu widgets have been modified -to use the new library. See SetOptions.3 for information on the new C -APIs. - -4. More Tcl_Obj support. Several additional C library procedures have -been added to support Tcl_Objs. See the manual entries 3DBorder.3, -GetAnchor.3, GetBitmap.3, GetColor.3, GetCursor.3, GetFont.3, -GetJustify.3, and GetPixels.3. - -Incompatibilities - -Although the 8.1 releases involve substantial changes to the -implementation of Tcl and Tk, the changes should introduce few -if any compatibility problems for Tcl scripts or extensions. Here -are the compatibility problems that we know of: - -The changes to the regular expression package required a few minor -syntax changes in order to support all the new features: - -- Backslash inside brackets is an escape whereas before it was a - literal character. To specify a literal \ in brackets you must - write \\. - -- Some escapes, such as \d, \s, and \w, now mean special things in a - bracket expression. Other escapes , such as \D, \S, \W, \A and \Z, - are illegal. - -- A { followed by a digit will no longer match those two characters. - Instead, it will start a bound. Such sequences should be rare and - will often result in an error because the following characters will - not look like a valid bound. - -- Backslash followed by an alphanumeric character is either an escape - or an error. Several of the new escapes were treated as literal - characters in earlier versions of Tcl. - -- The matching order has changed slightly. Here is an explanation - from Henry Spencer: - - Both the old package and the new package find the match that starts - earliest in the string. Where things get tricky is when there is more - than one possible match starting at that point, different in either - length or internal details (that is, which subexpressions match where). - - The old package examines possible matches in a complex but well-defined - order, and simply reports the first one it finds. The new package - examines all possible matches simultaneously, and reports the longest. - For example, (week|wee)(night|knights) matches all of "weeknights". - - When two possible matches are of the same length, priority is decided - based on getting the longest possible matches for early subexpressions, - with later subexpressions accepting whatever they can get. This means - that either (wee|week)(kly|ly) or (week*)(k?ly) matches "weekly" as - week-ly, not wee-kly. More subtly, when .*|a.c matches "abc", the .* - matches the whole string and the a.c doesn't even get a chance to - participate. - - When non-greedy quantifiers are used, things get more complicated. If - all quantifiers in a regular expression are non-greedy, the exact same - rules apply except with "longest" replaced by "shortest" everywhere. - When greedy and non-greedy quantifiers are mixed, it's complicated and - difficult to explain. - -Known Problems With These Releases - -Both the internationalization support and the new regular expression -package are large, complicated, and young, which means there are -likely to be lots of bugs. We need your help in finding and fixing -problems. This is particularly important for internationalization, -since we don't have the right equipment or knowledge to test -under very many conditions. Here are some of the most glaring bugs -or missing features that we know of: - -- We haven't been able to test input methods in Tk under Unix to be - sure that the full Unicode character set is being substituted - properly in %A substitutions. This means that it probably doesn't - work. We have been able to test under Windows and the Macintosh. - -- In Tk, PostScript generation does not work correctly for characters - outside the ASCII subset. - -- The threading for Tcl is brand new so there are likely to be bugs, - although it is based on early work done by Richard Hipp. We have - done some testing on a multiprocessor Solaris machine, but none on - Windows or other flavors of UNIX on a multiprocessor. - -6. Known Bugs/Missing Features ------------------------------- - -- Clock command fails to handle daylight savings time boundaries for - things like "last week". -- Background processes aren't properly detached on NT. -- File events only work on sockets and pipes. -- Files/console/serial ports don't support nonblocking I/O. -- There is no support for custom cursors/application icons. The core - set of X cursors is supported, although you cannot change their color. -- Stippling of arcs isn't implemented yet. -- Some "wm" functions don't map to Windows and aren't implemented; - others should map, but just aren't implemented. The worst offenders - are the icon manipulation routines. -- Color management on some displays doesn't work properly resulting in - Tk switching to monochrome mode. -- Tk seems to fail to draw anything on some Matrox Millenium cards. -- Printing does not work for images (e.g. GIF) on a canvas. -- Tk_dialog appears in the upper left corner. This is a symptom of a - larger problem with "wm geometry" when applied to unmapped or - iconified windows. -- PPM images are using the wrong translation mode for writing to - files, resulting in CR/LF terminated PPM files. -- Tk crashes if the display depth changes while it is running. Tk - also doesn't consistently track changes in the system colors. - -There may be more that we don't know about, so be sure to submit bug -reports when you run into problems. If you have comments or bug -reports for the Windows version of Tcl, please use our on-line bug -form at: +4. Linking against the binary release +-------------------------------------- + +In order to link your applications against the .dll files shipped with +this release, you will need to use the appropriate .lib file for your +compiler. In the lib directory of the installation directory, there +are library files for the Microsoft Visual C++ compiler: + + tcl81.lib + tk81.lib + +5. Building dynamically loadable extensions +-------------------------------------------- + +Please refer to the example dynamically loadable extension provided on +our ftp site: + + ftp://ftp.scriptics.com/pub/tcl/misc/example.zip + +This archive contains a template that you can use for building +extensions that will be loadable on Unix, Windows, and Macintosh +systems. + +6. Reporting Bugs +----------------- +If you have comments or bug reports for the Windows version of Tcl, +please use our on-line bug form at: http://www.scriptics.com/support/bugForm.html @@ -320,68 +147,4 @@ subscribing put the line: in the body instead (or wintcl). -11. Tcl version numbers ----------------------- - -Each Tcl release is identified by two numbers separated by a dot, e.g. -6.7 or 7.0. If a new release contains changes that are likely to break -existing C code or Tcl scripts then the major release number increments -and the minor number resets to zero: 6.0, 7.0, etc. If a new release -contains only bug fixes and compatible changes, then the minor number -increments without changing the major number, e.g. 7.1, 7.2, etc. If -you have C code or Tcl scripts that work with release X.Y, then they -should also work with any release X.Z as long as Z > Y. - -Alpha and beta releases have an additional suffix of the form b1 or b1. -For example, Tcl 7.0b1 is the first beta release of Tcl version 7.0, -Tcl 7.0b2 is the second beta release, and so on. A beta release is an -initial version of a new release, used to fix bugs and bad features before -declaring the release stable. An alpha release is like a beta release, -except it's likely to need even more work before it's "ready for prime -time". New releases are normally preceded by one or more alpha and beta -releases. We hope that lots of people will try out the alpha and beta -releases and report problems. We'll make new alpha/beta releases to fix -the problems, until eventually there is a beta release that appears to -be stable. Once this occurs we'll make the final release. - -We can't promise to maintain compatibility among alpha and beta releases. -For example, release 7.1b2 may not be backward compatible with 7.1b1, even -though the final 7.1 release will be backward compatible with 7.0. This -allows us to change new features as we find problems during beta testing. -We'll try to minimize incompatibilities between beta releases, but if -a major problem turns up then we'll fix it even if it introduces an -incompatibility. Once the official release is made then there won't -be any more incompatibilities until the next release with a new major -version number. - -Patch releases have a suffix such as p1 or p2. These releases contain -bug fixes only. A patch release (e.g Tcl 7.6p2) should be completely -compatible with the base release from which it is derived (e.g. Tcl -7.6), and you should normally use the highest available patch release. - -As of 8.0.3, the patch releases use a second . instead of 'p'. So, the -8.0 release went to 8.0p1, 8.0p2, and 8.0.3. The alphas and betas will -still use the 'a' and 'b' letters in their tcl_patchLevel. - -12. Linking against the binary release --------------------------------------- - -In order to link your applications against the .dll files shipped with -this release, you will need to use the appropriate .lib file for your -compiler. In the lib directory of the installation directory, there -are library files for the Microsoft Visual C++ compiler: - - tcl81.lib - tk81.lib - -13. Building dynamically loadable extensions --------------------------------------------- - -Please refer to the example dynamically loadable extension provided on -our ftp site: - - ftp://ftp.scriptics.com/pub/tcl/misc/example.zip -This archive contains a template that you can use for building -extensions that will be loadable on Unix, Windows, and Macintosh -systems. -- cgit v0.12