summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--changes20
-rw-r--r--doc/Access.337
-rw-r--r--doc/Encoding.364
-rw-r--r--doc/InitStubs.391
-rw-r--r--doc/Notifier.3131
-rw-r--r--doc/OpenFileChnl.34
-rw-r--r--doc/Thread.365
-rw-r--r--doc/Utf.357
-rw-r--r--doc/msgcat.n15
-rw-r--r--doc/regexp.n140
-rw-r--r--generic/tclDecls.h8
-rw-r--r--generic/tclIntDecls.h8
-rw-r--r--generic/tclIntPlatDecls.h8
-rw-r--r--generic/tclParse.c31
-rw-r--r--generic/tclPlatDecls.h8
-rw-r--r--tests/env.test4
-rw-r--r--tests/parse.test6
-rw-r--r--tools/README13
-rw-r--r--tools/configure.in5
-rw-r--r--tools/encoding/README8
-rw-r--r--tools/genStubs.tcl6
-rw-r--r--tools/genWinImage.tcl30
-rw-r--r--tools/tcl.wse.in56
-rw-r--r--tools/tclSplash.bmpbin162030 -> 162030 bytes
-rw-r--r--unix/configure.in4
-rw-r--r--win/tcl.rc8
-rw-r--r--win/tcl16.rc6
-rw-r--r--win/tclsh.rc8
29 files changed, 592 insertions, 265 deletions
diff --git a/ChangeLog b/ChangeLog
index 0280939..70eaa88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+1999-04-30 <stanton@scriptics.com>
+
+ * Merged changes from 8.1.0 branch:
+
+ * generic/tclParse.c: Fixed memory leak in CommandComplete.
+
+ * generic/tclPlatDecls.h:
+ * generic/tclIntPlatDecls.h:
+ * generic/tclIntDecls.h:
+ * generic/tclDecls.h:
+ * tools/genStubs.tcl: Added 'extern "C" {}' block around the stub
+ table pointer declaration so the stub library can be used from
+ C++. [Bug: 1934]
+
+ * Lots of documentation and other release engineering fixes.
+
1999-04-28 <stanton@scriptics.com>
* mac/tclMacResource.c:
diff --git a/changes b/changes
index 7ee8d72..013c421 100644
--- a/changes
+++ b/changes
@@ -1,6 +1,6 @@
Recent user-visible changes to Tcl:
-RCS: @(#) $Id: changes,v 1.43 1999/04/16 00:46:29 stanton Exp $
+RCS: @(#) $Id: changes,v 1.44 1999/04/30 22:44:59 stanton Exp $
1. No more [command1] [command2] construct for grouping multiple
commands on a single command line.
@@ -4304,6 +4304,22 @@ created. (surles)
that now does a case insensitive string comparison on Windows, and not
on UNIX. (surles)
-
--------------- Released 8.1b3, April 6, 1999 ----------------------
+4/9/99 (bug fix) Fixed notifier deadlock situation when the pipe used
+to talk back notifier thread is filled with data. Found as a result of the
+focus.test for Tk hanging. (redman)
+
+4/13/99 (bug fix) Fixed bug where socket -async combined with
+fileevent for writing did not work under Windows NT. (redman)
+
+4/13/99 (encoding fix) Restored the double byte definition of GB2312
+and added the EUC-CN encoding. EUC-CN is a variant of GB2312 that
+shifts the characters into bytes with the high bit set and includes
+ASCII as a subset. (stanton)
+
+4/27/99 (bug fix) Added 'extern "C" {}' block around the stub table
+pointer declaration so the stub library can be used from C++. (stanton)
+
+--------------- Released 8.1 final, April 29, 1999 ----------------------
+
diff --git a/doc/Access.3 b/doc/Access.3
index a561e3e..bdbbea3 100644
--- a/doc/Access.3
+++ b/doc/Access.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: Access.3,v 1.1 1999/04/17 01:36:32 hershey Exp $
+'\" RCS: @(#) $Id: Access.3,v 1.2 1999/04/30 22:45:00 stanton Exp $
'\"
.so man.macros
.TH Tcl_Access 3 8.1 Tcl "Tcl Library Procedures"
@@ -16,20 +16,20 @@ Tcl_Access, Tcl_Stat \- check file permissions and other attributes
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_Access\fR(\fpath\fR, \fImode\fR)
+\fBTcl_Access\fR(\fIpath\fR, \fImode\fR)
.sp
int
-\fBTcl_Stat\fR(\fIpath\fR, \fIbufPtr\fR)
+\fBTcl_Stat\fR(\fIpath\fR, \fIstatPtr\fR)
.SH ARGUMENTS
-.AS struct stat *bufPtr
-.AP CONST char *path in
+.AS stat *statPtr in
+.AP char *path in
Native name of the file to check the attributes of.
.AP int mode in
Mask consisting of one or more of R_OK, W_OK, X_OK and F_OK. R_OK,
W_OK and X_OK request checking whether the file exists and has read,
write and execute permissions, respectively. F_OK just requests
checking for the existence of the file.
-.AP struct stat *bufPtr out
+.AP stat *statPtr out
The structure that contains the result.
.BE
@@ -40,10 +40,8 @@ rather than calling system level functions \fBaccess\fR and \fBstat\fR
directly. First, the Windows implementation of both functions fixes
some bugs in the system level calls. Second, both \fBTcl_Access\fR
and \fBTcl_Stat\fR (as well as \fBTcl_OpenFileChannelProc\fR) hook
-into a linked list of functions, the first of which checks for the
-existence of \fBpath\fR in a Zip file rather than on disc. The
-hooking behavior is necessary for applications wrapped with TclPro
-Wrapper.
+into a linked list of functions. This allows the possibity to reroute
+file access to alternative media or access methods.
.PP
\fBTcl_Access\fR checks whether the process would be allowed to read,
write or test for existence of the file (or other file system object)
@@ -55,10 +53,19 @@ On success (all requested permissions granted), zero is returned. On
error (at least one bit in mode asked for a permission that is denied,
or some other error occurred), -1 is returned.
.PP
-\fBTcl_Stat\fR returns the stat structure with information about the
-specified file. You do not need any access rights to the file to get
-this information but you need search rights to all directories named
-in the path leading to the file.
+\fBTcl_Stat\fR fills the stat structure \fIstatPtr\fR with information
+about the specified file. You do not need any access rights to the
+file to get this information but you need search rights to all
+directories named in the path leading to the file. The stat structure
+includes info regarding device, inode (always 0 on Windows),
+priviledge mode, nlink (always 1 on Windows), user id (always 0 on
+Windows), group id (always 0 on Windows), rdev (same as device on
+Windows), size, last access time, last modification time, and creation
+time.
+.PP
+If \fIpath\fR exists, \fBTcl_Stat\fR returns 0 and the stat structure
+is filled with data. Otherwise, -1 is returned, and no stat info is
+given.
.SH KEYWORDS
-statc access
+stat access
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index e9329dd..8d1262b 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -4,17 +4,18 @@
'\" 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.2 1999/04/16 00:46:31 stanton Exp $
+'\" RCS: @(#) $Id: Encoding.3,v 1.3 1999/04/30 22:45:00 stanton Exp $
'\"
.so man.macros
.TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_ExternalToUtfDString, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternal, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetDefaultEncodingDir, Tcl_SetDefaultEncodingDir \- procedures for creating and using encodings.
-
-
-
-
+Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_ExternalToUtfDString,
+Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternal,
+Tcl_WinTCharToUtf, Tcl_WinUtfToTChar,
+Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNames,
+Tcl_CreateEncoding, Tcl_GetDefaultEncodingDir,
+Tcl_SetDefaultEncodingDir \- procedures for creating and using encodings.
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -40,6 +41,12 @@ int
dstCharsPtr\fR)
.sp
char *
+\fBTcl_WinTCharToUtf\fR(\fItsrc, srcLen, dstPtr\fR)
+.sp
+TCHAR *
+\fBTcl_WinUtfToTChar\fR(\fIsrc, srcLen, dstPtr\fR)
+.sp
+char *
\fBTcl_GetEncodingName\fR(\fIencoding\fR)
.sp
int
@@ -50,7 +57,6 @@ void
.sp
Tcl_Encoding
\fBTcl_CreateEncoding\fR(\fItypePtr\fR)
-
.sp
char *
\fBTcl_GetDefaultEncodingDir\fR(\fIvoid\fR)
@@ -72,10 +78,12 @@ NULL, the current system encoding is used.
.AP "CONST char" *src in
For the \fBTcl_ExternalToUtf\fR functions, an array of bytes in the
specified encoding that are to be converted to UTF-8. For the
-\fBTcl_UtfToExternal\fR functions, an array of UTF-8 characters to be
-converted to the specified encoding.
+\fBTcl_UtfToExternal\fR and \fBTcl_WinUtfToTChar\fR functions, an array of
+UTF-8 characters to be converted to the specified encoding.
+.AP "CONST TCHAR" *tsrc in
+An array of Windows TCHAR characters to convert to UTF-8.
.AP int srcLen in
-Length of \fIsrc\fR in bytes. If the length is negative, the
+Length of \fIsrc\fR or \fItsrc\fR in bytes. If the length is negative, the
encoding-specific length of the string is used.
.AP Tcl_DString *dstPtr out
Pointer to an uninitialized or free \fBTcl_DString\fR in which the converted
@@ -223,7 +231,41 @@ is filled with the corresponding number of bytes that were stored in
\fIdst\fR. The return values are the same as the return values for
\fBTcl_ExternalToUtf\fR.
.PP
-\fBTcl_GetEncodingName\fR is roughly the inverse of \fBTk_GetEncoding\fR.
+\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),
+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
+convention, in Windows a TCHAR is a character in the ANSI code page
+on Windows 95 and a Unicode character on Windows NT.
+.PP
+If you planned to use the same "char" based interfaces on both Windows
+95 and Windows NT, you could use \fBTcl_UtfToExternal\fR and
+\fBTcl_ExternalToUtf\fR (or their \fBTcl_DString\fR equivalents) with an
+encoding of NULL (the current system encoding). On the other hand,
+if you planned to use the Unicode interface when running on Windows NT
+and the "char" interfaces when running on Windows 95, you would have
+to perform the following type of test over and over in your program
+(as represented in psuedo-code):
+.CS
+if (running NT) {
+ encoding <- Tcl_GetEncoding("unicode");
+ nativeBuffer <- Tcl_UtfToExternal(encoding, utfBuffer);
+ Tcl_FreeEncoding(encoding);
+} else {
+ nativeBuffer <- Tcl_UtfToExternal(NULL, utfBuffer);
+.CE
+\fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR automatically
+handle this test and use the proper encoding based on the current
+operating system. \fBTcl_WinUtfToTChar\fR returns a pointer to
+a TCHAR string, and \fBTcl_WinTCharToUtf\fR expects a TCHAR string
+pointer as the \fIsrc\fR string. Otherwise, these functions
+behave identically to \fBTcl_UtfToExternalDString\fR and
+\fBTcl_ExternalToUtfDString\fR.
+.PP
+\fBTcl_GetEncodingName\fR is roughly the inverse of \fBTcl_GetEncoding\fR.
Given an \fIencoding\fR, the return value is the \fIname\fR argument that
was used to create the encoding. The string returned by
\fBTcl_GetEncodingName\fR is only guaranteed to persist until the
diff --git a/doc/InitStubs.3 b/doc/InitStubs.3
new file mode 100644
index 0000000..266a955
--- /dev/null
+++ b/doc/InitStubs.3
@@ -0,0 +1,91 @@
+'\"
+'\" Copyright (c) 1999 Scriptics Corportation
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+'\" RCS: @(#) $Id: InitStubs.3,v 1.2 1999/04/30 22:45:00 stanton Exp $
+'\"
+.so man.macros
+.TH Tcl_InitStubs 3 8.1 Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_InitStubs \- initialize the Tcl stubs mechanism
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+char *
+\fBTcl_InitStubs\fR(\fIinterp, version, exact\fR)
+.SH ARGUMENTS
+.AS Tcl_Interp *interp in
+.AP Tcl_Interp *interp in
+Tcl interpreter handle.
+.AP char *version in
+A version string consisting of one or more decimal numbers
+separated by dots.
+.AP int exact in
+Non-zero means that only the particular version specified by
+\fIversion\fR is acceptable.
+Zero means that versions newer than \fIversion\fR are also
+acceptable as long as they have the same major version number
+as \fIversion\fR.
+.BE
+.SH INTRODUCTION
+.PP
+The Tcl stubs mechanism defines a way to dynamically bind
+extensions to a particular Tcl implementation at run time.
+This provides two significant benefits to Tcl users:
+.IP 1) 5
+Extensions that use the stubs mechanism can be loaded into
+multiple versions of Tcl without being recompiled or
+relinked.
+.IP 2) 5
+Extensions that use the stubs mechanism can be dynamically
+loaded into statically-linked Tcl applications.
+.PP
+The stubs mechanism accomplishes this by exporting function tables
+that define an interface to the Tcl API. The extension then accesses
+the Tcl API through offsets into the function table, so there are no
+direct references to any of the Tcl library's symbols. This
+redirection is transparent to the extension, so an extension writer
+can continue to use all public Tcl functions as documented.
+.PP
+The stubs mechanism requires no changes to applications incorporating
+Tcl interpreters. Only developers creating C-based Tcl extensions
+need to take steps to use the stubs mechanism with their extensions.
+.PP
+Enabling the stubs mechanism for an extension requires the following
+steps:
+.IP 1) 5
+Call \fBTcl_InitStubs\fR in the extension before calling any other
+Tcl functions.
+.IP 2) 5
+Define the USE_TCL_STUBS symbol. Typically, you would include the
+-DUSE_TCL_STUBS flag when compiling the extension.
+.IP 3) 5
+Link the extension with the Tcl stubs library instead of the standard
+Tcl library. On Unix platforms, the library name is
+\fIlibtclstub8.1.a\fR; on Windows platforms, the library name is
+\fItclstub81.lib\fR.
+.PP
+If the extension also requires the Tk API, it must also call
+\fBTk_InitStubs\fR to initialize the Tk stubs interface and link
+with the Tk stubs libraries. See the \fBTk_InitStubs\fR page for
+more information.
+.SH DESCRIPTION
+\fBTcl_InitStubs\fR attempts to initialize the stub table pointers
+and ensure that the correct version of Tcl is loaded. In addition
+to an interpreter handle, it accepts as arguments a version number
+and a Boolean flag indicating whether the extension requires
+an exact version match or not. If \fIexact\fR is 0, then the
+extension is indicating that newer versions of Tcl are acceptable
+as long as they have the same major version number as \fIversion\fR;
+non-zero means that only the specified \fIversion\fR is acceptable.
+\fBTcl_InitStubs\fR returns a string containing the actual version
+of Tcl satisfying the request, or NULL if the Tcl version is not
+acceptable, does not support stubs, or any other error condition occurred.
+.SH "SEE ALSO"
+\fBTk_InitStubs\fR
+.SH KEYWORDS
+stubs
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index fd1adfd..a6c9280 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -1,47 +1,59 @@
'\"
+'\" Copyright (c) 1998-1999 Scriptics Corporation
'\" Copyright (c) 1995-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Notifier.3,v 1.4 1999/04/21 21:50:22 rjohnson Exp $
+'\" RCS: @(#) $Id: Notifier.3,v 1.5 1999/04/30 22:45:00 stanton Exp $
'\"
.so man.macros
-.TH Notifier 3 8.0 Tcl "Tcl Library Procedures"
+.TH Notifier 3 8.1 Tcl "Tcl Library Procedures"
.BS
-.VS
.SH NAME
-Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEvent, Tcl_DeleteEvents, Tcl_WaitForEvent, Tcl_SetTimer, Tcl_ServiceAll, Tcl_ServiceEvent, Tcl_GetServiceMode, Tcl_SetServiceMode \- the event queue and notifier interfaces
-
+Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEvent, Tcl_ThreadQueueEvent, Tcl_ThreadAlert, Tcl_GetCurrentThread, Tcl_DeleteEvents, Tcl_InitNotifier, Tcl_FinalizeNotifier, Tcl_WaitForEvent, Tcl_AlertNotifier, Tcl_SetTimer, Tcl_ServiceAll, Tcl_ServiceEvent, Tcl_GetServiceMode, Tcl_SetServiceMode \- the event queue and notifier interfaces
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
-\fBTcl_CreateEventSource\fR(\fIsetupProc, checkProc, clientData\fB)\fR
+void
+\fBTcl_CreateEventSource\fR(\fIsetupProc, checkProc, clientData\fR)
.sp
-\fBTcl_DeleteEventSource\fR(\fIsetupProc, checkProc, clientData\fB)\fR
+void
+\fBTcl_DeleteEventSource\fR(\fIsetupProc, checkProc, clientData\fR)
.sp
-\fBTcl_SetMaxBlockTime\fR(\fItimePtr\fB)\fR
+void
+\fBTcl_SetMaxBlockTime\fR(\fItimePtr\fR)
.sp
+void
\fBTcl_QueueEvent\fR(\fIevPtr, position\fR)
+.VS 8.1
.sp
+void
\fBTcl_ThreadQueueEvent\fR(\fIthreadId, evPtr, position\fR)
-.VS
.sp
-\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
+void
+\fBTcl_ThreadAlert\fR(\fIthreadId, clientData\fR)
.sp
-int
-\fBTcl_WaitForEvent\fR(\fItimePtr\fR)
+Tcl_ThreadId
+\fBTcl_GetCurrentThread\fR()
+.sp
+void
+\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
.sp
ClientData
\fBTcl_InitNotifier\fR()
.sp
+void
\fBTcl_FinalizeNotifier\fR(\fIclientData\fR)
.sp
-\fBTcl_AlertNotifier\fR(\fIclientData\fR)
+int
+\fBTcl_WaitForEvent\fR(\fItimePtr\fR)
.sp
-\fBTcl_ThreadAlert\fR(\fIthreadId\fR)
+void
+\fBTcl_AlertNotifier\fR(\fIclientData\fR)
.sp
+void
\fBTcl_SetTimer\fR(\fItimePtr\fR)
.sp
int
@@ -59,7 +71,6 @@ int
.SH ARGUMENTS
.AS Tcl_EventDeleteProc milliseconds
-.AS Tcl_EventSetupProc *setupProc
.AP Tcl_EventSetupProc *setupProc in
Procedure to invoke to prepare for event wait in \fBTcl_DoOneEvent\fR.
.AP Tcl_EventCheckProc *checkProc in
@@ -81,12 +92,14 @@ have been allocated by the caller using \fBTcl_Alloc\fR or \fBckalloc\fR.
.AP Tcl_QueuePosition position in
Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR,
\fBTCL_QUEUE_HEAD\fR, or \fBTCL_QUEUE_MARK\fR.
+.AP Tcl_ThreadId threadId in
+A unique identifier for a thread.
+.AP Tcl_EventDeleteProc *deleteProc in
+Procedure to invoke for each queued event in \fBTcl_DeleteEvents\fR.
.AP int flags in
What types of events to service. These flags are the same as those
passed to \fBTcl_DoOneEvent\fR.
-.AP Tcl_EventDeleteProc *deleteProc in
-Procedure to invoke for each queued event in \fBTcl_DeleteEvents\fR.
-.VS
+.VS 8.1
.AP int mode in
Inidicates whether events should be serviced by \fBTcl_ServiceAll\fR.
Must be one of \fBTCL_SERVICE_NONE\fR or \fBTCL_SERVICE_ALL\fR.
@@ -95,13 +108,11 @@ Must be one of \fBTCL_SERVICE_NONE\fR or \fBTCL_SERVICE_ALL\fR.
.SH INTRODUCTION
.PP
-.VS
The interfaces described here are used to customize the Tcl event
loop. The two most common customizations are to add new sources of
events and to merge Tcl's event loop with some other event loop, such
as one provided by an application in which Tcl is embedded. Each of
these tasks is described in a separate section below.
-.VE
.PP
The procedures in this manual entry are the building blocks out of which
the Tcl event notifier is constructed. The event notifier is the lowest
@@ -119,20 +130,24 @@ higher-level software that they have occurred. The procedures
and \fBTcl_SetMaxBlockTime\fR, \fBTcl_QueueEvent\fR, and
\fBTcl_DeleteEvents\fR are used primarily by event sources.
.IP [2]
-The event queue: there is a single queue for the whole application,
+The event queue: for non-threaded applications,
+there is a single queue for the whole application,
containing events that have been detected but not yet serviced. Event
sources place events onto the queue so that they may be processed in
order at appropriate times during the event loop. The event queue
guarantees a fair discipline of event handling, so that no event
source can starve the others. It also allows events to be saved for
servicing at a future time.
-.VS
+.VS 8.1
+Threaded applications work in a
+similar manner, except that there is a separate event queue for
+each thread containing a Tcl interpreter.
\fBTcl_QueueEvent\fR is used (primarily
by event sources) to add events to the event queue and
\fBTcl_DeleteEvents\fR is used to remove events from the queue without
-processing them. See the manual entry for \fBThread\fR for a
-description of the \fBTcl_ThreadQueueEvent\fR procedure.
-
+processing them. In a threaded application, \fBTcl_QueueEvent\fR adds
+an event to the current thread's queue, and \fBTcl_ThreadQueueEvent\fR
+adds an event to a queue in a specific thread.
.IP [3]
The event loop: in order to detect and process events, the application
enters a loop that waits for events to occur, places them on the event
@@ -146,7 +161,9 @@ to be retargeted either for a new platform or to use an external event
loop (such as the Motif event loop, when Tcl is embedded in a Motif
application). The procedures \fBTcl_WaitForEvent\fR and
\fBTcl_SetTimer\fR are normally implemented by Tcl, but may be
-replaced with new versions to retarget the notifier (the \fBTcl_Sleep\fR,
+replaced with new versions to retarget the notifier (the
+\fBTcl_InitNotifier\fR, \fBTcl_AlertNotifier\fR,
+\fBTcl_FinalizeNotifier\fR, \fBTcl_Sleep\fR,
\fBTcl_CreateFileHandler\fR, and \fBTcl_DeleteFileHandler\fR must
also be replaced; see CREATING A NEW NOTIFIER below for details).
The procedures \fBTcl_ServiceAll\fR, \fBTcl_ServiceEvent\fR,
@@ -165,7 +182,7 @@ things:
.IP [1]
Check the event queue to see if it contains any events that can
be serviced. If so, service the first possible event, remove it
-.VS
+.VS 8.1
from the queue, and return. It does this by calling
\fBTcl_ServiceEvent\fR and passing in the \fIflags\fR argument.
.VE
@@ -173,7 +190,7 @@ from the queue, and return. It does this by calling
Prepare to block for an event. To do this, \fBTcl_DoOneEvent\fR
invokes a \fIsetup procedure\fR in each event source.
The event source will perform event-source specific initialization and
-.VS
+.VS 8.1
possibly call \fBTcl_SetMaxBlockTime\fR to limit how long
.VE
\fBTcl_WaitForEvent\fR will block if no new events occur.
@@ -241,7 +258,7 @@ request notification with a Windows event. For timer-driven event
sources such as timer events or any polled event, the event source
can call \fBTcl_SetMaxBlockTime\fR to force the application to wake
up after a specified time even if no events have occurred.
-.VS
+.VS 8.1
If no event source calls \fBTcl_SetMaxBlockTime\fR
then \fBTcl_WaitForEvent\fR will wait as long as necessary for an
event to occur; otherwise, it will only wait as long as the shortest
@@ -265,7 +282,7 @@ typedef struct Tcl_Time {
.CE
The \fIusec\fR field should be less than 1000000.
.PP
-.VS
+.VS 8.1
Information provided to \fBTcl_SetMaxBlockTime\fR
is only used for the next call to \fBTcl_WaitForEvent\fR; it is
discarded after \fBTcl_WaitForEvent\fR returns.
@@ -274,7 +291,7 @@ The next time an event wait is done each of the event sources'
setup procedures will be called again, and they can specify new
information for that event wait.
.PP
-.VS
+.VS 8.1
If the application uses an external event loop rather than
\fBTcl_DoOneEvent\fR, the event sources may need to call
\fBTcl_SetMaxBlockTime\fR at other times. For example, if a new event
@@ -348,7 +365,7 @@ events at the front of the queue, such as a series of
Enter and Leave events synthesized during a grab or ungrab operation
in Tk.
.PP
-.VS
+.VS 8.1
When it is time to handle an event from the queue (steps 1 and 4
above) \fBTcl_ServiceEvent\fR will invoke the \fIproc\fR specified
.VE
@@ -363,7 +380,7 @@ The first argument to \fIproc\fR is a pointer to the event, which will
be the same as the first argument to the \fBTcl_QueueEvent\fR call that
added the event to the queue.
The second argument to \fIproc\fR is the \fIflags\fR argument for the
-.VS
+.VS 8.1
current call to \fBTcl_ServiceEvent\fR; this is used by the event source
.VE
to return immediately if its events are not relevant.
@@ -374,7 +391,7 @@ Once the event source has finished handling the event it returns 1
to indicate that the event can be removed from the queue.
If for some reason the event source decides that the event cannot
be handled at this time, it may return 0 to indicate that the event
-.VS
+.VS 8.1
should be deferred for processing later; in this case \fBTcl_ServiceEvent\fR
.VE
will go on to the next event in the queue and attempt to service it.
@@ -387,7 +404,7 @@ Another example of deferring events happens in Tk if
\fBTk_RestrictEvents\fR has been invoked to defer certain kinds
of window events.
.PP
-.VS
+.VS 8.1
When \fIproc\fR returns 1, \fBTcl_ServiceEvent\fR will remove the
event from the event queue and free its storage.
Note that the storage for an event must be allocated by
@@ -395,6 +412,21 @@ the event source (using \fBTcl_Alloc\fR or the Tcl macro \fBckalloc\fR)
before calling \fBTcl_QueueEvent\fR, but it
will be freed by \fBTcl_ServiceEvent\fR, not by the event source.
.PP
+Threaded applications work in a
+similar manner, except that there is a separate event queue for
+each thread containing a Tcl interpreter.
+Calling \fBTcl_QueueEvent\fR in a multithreaded application adds
+an event to the current thread's queue.
+To add an event to another thread's queue, use \fBTcl_ThreadQueueEvent\fR.
+\fBTcl_ThreadQueueEvent\fR accepts as an argument a Tcl_ThreadId argument,
+which uniquely identifies a thread in a Tcl application. To obtain the
+Tcl_ThreadID for the current thread, use the \fBTcl_GetCurrentThread\fR
+procedure. (A thread would then need to pass this identifier to other
+threads for those threads to be able to add events to its queue.)
+After adding an event to another thread's queue, you then typically
+need to call \fBTcl_ThreadAlert\fR to "wake up" that thread's notifier to
+alert it to the new event.
+.PP
\fBTcl_DeleteEvents\fR can be used to explicitly remove one or more
events from the event queue. \fBTcl_DeleteEvents\fR calls \fIproc\fR
for each event in the queue, deleting those for with the procedure
@@ -409,13 +441,18 @@ The \fIclientData\fR argument will be the same as the \fIclientData\fR
argument to \fBTcl_DeleteEvents\fR; it is typically used to point to
private information managed by the event source. The \fIevPtr\fR will
point to the next event in the queue.
+.PP
+\fBTcl_DeleteEventSource\fR deletes an event source. The \fIsetupProc\fR,
+\fIcheckProc\fR, and \fIclientData\fR arguments must exactly match those
+provided to the \fBTcl_CreateEventSource\fR for the event source to be deleted.
+If no such source exists, \fBTcl_DeleteEventSource\fR has no effect.
.VE
.SH "CREATING A NEW NOTIFIER"
.PP
The notifier consists of all the procedures described in this manual
entry, plus \fBTcl_DoOneEvent\fR and \fBTcl_Sleep\fR, which are
-.VS
+.VS 8.1
available on all platforms, and \fBTcl_CreateFileHandler\fR and
\fBTcl_DeleteFileHandler\fR, which are Unix-specific. Most of these
procedures are generic, in that they are the same for all notifiers.
@@ -427,6 +464,12 @@ support a new platform or to integrate Tcl with an
application-specific event loop, you must write new versions of these
procedures.
.PP
+\fBTcl_InitNotifier\fR initializes the notifier state and returns
+a handle to the notifier state. Tcl calls this
+procedure when intializing a Tcl interpreter. Similarly,
+\fBTcl_FinalizeNotifier\fR shuts down the notifier, and is
+called by \Tcl_Finalize\fR when shutting down a Tcl interpreter.
+.PP
\fBTcl_WaitForEvent\fR is the lowest-level procedure in the notifier;
it is responsible for waiting for an ``interesting'' event to occur or
for a given time to elapse. Before \fBTcl_WaitForEvent\fR is invoked,
@@ -462,6 +505,11 @@ under Unix it happens when \fBTcl_WaitForEvent\fR would have waited
forever because there were no active event sources and the timeout was
infinite.
.PP
+\fBTcl_AlertNotifier\fR is used in multithreaded applications to allow
+any thread to "wake up" the notifier to alert it to new events on its
+queue. \fBTcl_AlertNotifier\fR requires as an argument the notifier
+handle returned by \fBTcl_InitNotifier\fR.
+.PP
If the notifier will be used with an external event loop, then it must
also support the \fBTcl_SetTimer\fR interface. \fBTcl_SetTimer\fR is
invoked by \fBTcl_SetMaxBlockTime\fR whenever the maximum blocking
@@ -476,10 +524,11 @@ notifier will only be used from \fBTcl_DoOneEvent\fR, then
On Unix systems, the file event source also needs support from the
notifier. The file event source consists of the
\fBTcl_CreateFileHandler\fR and \fBTcl_DeleteFileHandler\fR
-procedures, which are described elsewhere.
+procedures, which are described in the \fBTcl_CreateFileHandler\fR
+manual page.
.PP
The \fBTcl_Sleep\fR and \fBTcl_DoOneEvent\fR interfaces are described
-elsewhere.
+in their respective manual pages.
.PP
The easiest way to create a new notifier is to look at the code
for an existing notifier, such as the files \fBunix/tclUnixNotfy.c\fR
@@ -546,6 +595,8 @@ mode, which should be restored when the recursive loop exits.
\fBTcl_GetServiceMode\fR returns the current value of the service
mode.
.VE
-
+.SH "SEE ALSO"
+\fBTcl_CreateFileHandler\fR, \fBTcl_DeleteFileHandler\fR, \fBTcl_Sleep\fR,
+\fBTcl_DoOneEvent\fR, \fBThreads.3\fR
.SH KEYWORDS
-event, notifier, event queue, event sources, file events, timer, idle, service mode
+event, notifier, event queue, event sources, file events, timer, idle, service mode, threads
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index e9205e3..51be74b 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -4,13 +4,13 @@
'\" 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.3 1999/04/16 00:46:32 stanton Exp $
+'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.4 1999/04/30 22:45:00 stanton Exp $
.so man.macros
.TH Tcl_OpenFileChannel 3 8.1 Tcl "Tcl Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
-Tcl_OpenFileChannel, Tcl_OpenCommandChannel, Tcl_MakeFileChannel, Tcl_GetChannel, Tcl_RegisterChannel, Tcl_UnregisterChannel, Tcl_Close, Tcl_ReadChars, Tcl_Read, Tcl_GetsObj, Tcl_Gets, Tcl_WriteObj, Tcl_WriteChars, Tcl_Write, Tcl_Flush, Tcl_Seek, Tcl_Tell, Tcl_GetChannelOption, Tcl_SetChannelOption, Tcl_Eof, Tcl_InputBlocked, Tcl_InputBuffered, \- buffered I/O facilities using channels
+Tcl_OpenFileChannel, Tcl_OpenCommandChannel, Tcl_MakeFileChannel, Tcl_GetChannel, Tcl_RegisterChannel, Tcl_UnregisterChannel, Tcl_Close, Tcl_ReadChars, Tcl_Read, Tcl_GetsObj, Tcl_Gets, Tcl_WriteObj, Tcl_WriteChars, Tcl_Write, Tcl_Flush, Tcl_Seek, Tcl_Tell, Tcl_GetChannelOption, Tcl_SetChannelOption, Tcl_Eof, Tcl_InputBlocked, Tcl_InputBuffered \- buffered I/O facilities using channels
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
diff --git a/doc/Thread.3 b/doc/Thread.3
index b5321c4..8a4c566 100644
--- a/doc/Thread.3
+++ b/doc/Thread.3
@@ -1,16 +1,17 @@
'\"
+'\" Copyright (c) 1999 Scriptics Corporation
'\" Copyright (c) 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: Thread.3,v 1.4 1999/04/21 21:50:22 rjohnson Exp $
+'\" RCS: @(#) $Id: Thread.3,v 1.5 1999/04/30 22:45:00 stanton Exp $
'\"
.so man.macros
-.TH Tcl_ConditionNotify 3 "8.1" Tcl "Tcl Library Procedures"
+.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock \- thread synchronization support.
+Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock \- Tcl thread support.
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -21,10 +22,7 @@ void
void
\fBTcl_ConditionWait\fR(\fIcondPtr, mutexPtr, timePtr\fR)
.sp
-Tcl_ThreadId
-\fBTcl_GetCurrentThread\fR()
-.sp
-VOID *
+Void *
\fBTcl_GetThreadData\fR(\fIkeyPtr, size\fR)
.sp
void
@@ -32,10 +30,6 @@ void
.sp
void
\fBTcl_MutexUnlock\fR(\fImutexPtr\fR)
-.sp
-\fBTcl_ThreadAlert\fR(\fIthreadId\fR)
-.sp
-\fBTcl_ThreadQueueEvent\fR(\fIthreadId, evPtr, position\fR)
.SH ARGUMENTS
.AS Tcl_ThreadDataKey *keyPtr
.AP Tcl_Condition *condPtr in
@@ -54,9 +48,42 @@ The size of the thread local storage block. This amount of data
is allocated and initialized to zero the first time each thread
calls \fBTcl_GetThreadData\fR.
.BE
-
-.SH DESCRIPTION
+.SH INTRODUCTION
+Beginning with the 8.1 release, the Tcl core is thread safe, which
+allows you to incorporate Tcl into multithreaded applications without
+customizing the Tcl core. To enable Tcl multithreading support,
+you must include the \fB--enable-threads\fR option to \fBconfigure\fR
+when you configure and compile your Tcl core.
+.PP
+An important contstraint of the Tcl threads implementation is that
+\fIonly the thread that created a Tcl interpreter can use that
+interpreter\fR. In other words, multiple threads can not access
+the same Tcl interpreter. (However, as was the case in previous
+releases, a single thread can safely create and use multiple
+interpreters.)
+.PP
+Tcl provides no special API for creating
+threads. When writing multithreaded applications incorporating Tcl,
+use the standard POSIX threads APIs on Unix systems and the standard
+Win32 threads APIs on Windows systems.
.PP
+Tcl does provide \fBTcl_ExitThread\fR and \fBTcl_FinalizeThread\fR
+for terminating threads and invoking optional per-thread exit
+handlers. See the \fBTcl_Exit\fR page for more information on these
+procedures.
+.PP
+Tcl provides \fBTcl_ThreadQueueEvent\fR and \fBTcl_ThreadAlert\fR
+for handling event queueing in multithreaded applications. See
+the \fBNotifier\fR manual page for more information on these procedures.
+.PP
+In this release, the Tcl language itself provides no support for
+creating multithreaded scripts (for example, scripts that could spawn
+a Tcl interpreter in a separate thread). If you need to add this
+feature at this time, see the \fItclThreadTest.c\fR
+file in the Tcl source distribution for an experimental implementation
+of a Tcl "Thread" package implementing thread creation and management
+commands at the script level.
+.SH DESCRIPTION
A mutex is a lock that is used to serialize all threads through a piece
of code by calling \fBTcl_MutexLock\fR and \fBTcl_MutexUnlock\fR.
If one thread holds a mutex, any other thread calling \fBTcl_MutexLock\fR will
@@ -84,13 +111,6 @@ The caller of \fBTcl_ConditionWait\fR should be prepared for spurious
notifications by calling \fBTcl_ConditionWait\fR within a while loop
that tests some invariant.
.PP
-The \fBTcl_GetCurrentThread\fR call returns the thread Id of the
-thread in which the call is made. The thread Id can be used in calls
-to \fBTcl_ThreadQueueEvent\fR and \fBTcl_ThreadAlert\fR. These
-procedures are essentially mutex-protected vesions of
-\fBTcl_AlertNotifier\fR and \fBTcl_QueueEvent\fR, respectively. See
-the manual entry for \fBNotifier\fR for more details.
-.PP
The \fBTcl_GetThreadData\fR call returns a pointer to a block of
thread-private data. Its argument is a key that is shared by all threads
and a size for the block of storage. The storage is automatically
@@ -98,7 +118,6 @@ allocated and initialized to all zeros the first time each thread asks for it.
The storage is automatically deallocated by \fBTcl_FinalizeThread\fR.
.SH INITIALIZATION
.PP
-.PP
All of these synchronization objects are self initializing.
They are implemented as opaque pointers that should be NULL
upon first use.
@@ -110,5 +129,9 @@ The API to create threads is not finalized at this time.
There are private facilities to create threads that contain a new
Tcl interpreter, and to send scripts among threads.
Dive into tclThreadTest.c and tclThread.c for examples.
+.SH "SEE ALSO"
+Tcl_GetCurrentThread, Tcl_ThreadQueueEvent, Tcl_ThreadAlert,
+Tcl_ExitThread, Tcl_FinalizeThread,
+Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler
.SH KEYWORDS
thread, mutex, condition variable, thread local storage
diff --git a/doc/Utf.3 b/doc/Utf.3
index f68a6cb..12756bc 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -4,13 +4,13 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.2 1999/04/16 00:46:34 stanton Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.3 1999/04/30 22:45:01 stanton Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UtfCharComplete, Tcl_NumUtfChars, Tcl_UtfFindFirst, Tcl_UtfFindLast, Tcl_UtfNext, Tcl_UtfPrev, Tcl_UniCharAtIndex, Tcl_UtfAtIndex, Tcl_UtfBackslash \- routines for manipulating UTF-8 strings.
+Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UniCharToUtfDString, Tcl_UtfToUniCharDString, Tcl_UniCharLen, Tcl_UniCharNcmp, Tcl_UtfCharComplete, Tcl_NumUtfChars, Tcl_UtfFindFirst, Tcl_UtfFindLast, Tcl_UtfNext, Tcl_UtfPrev, Tcl_UniCharAtIndex, Tcl_UtfAtIndex, Tcl_UtfBackslash \- routines for manipulating UTF-8 strings.
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -23,6 +23,18 @@ int
int
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
.sp
+char *
+\fBTcl_UniCharToUtfDString\fR(\fIuniStr, numChars, dstPtr\fR)
+.sp
+Tcl_UniChar *
+\fBTcl_UtfToUniCharDString\fR(\fIsrc, len, dstPtr\fR)
+.sp
+int
+\fBTcl_UniCharLen\fR(\fIuniStr\fR)
+.sp
+int
+\fBTcl_UniCharNcmp\fR(\fIuniStr, uniStr, num\fR)
+.sp
int
\fBTcl_UtfCharComplete\fR(\fIsrc, len\fR)
.sp
@@ -50,7 +62,7 @@ char *
int
\fBTcl_UtfBackslash\fR(\fIsrc, readPtr, dst\fR)
.SH ARGUMENTS
-.AS "CONST char" *chPtr out
+.AS "CONST Tcl_UniChar" numChars in/out
.AP char *buf out
Buffer in which the UTF-8 representation of the Tcl_UniChar is stored. At most
TCL_UTF_MAX bytes are stored in the buffer.
@@ -60,9 +72,18 @@ The Tcl_UniChar to be converted or examined.
Filled with the Tcl_UniChar represented by the head of the UTF-8 string.
.AP "CONST char" *src in
Pointer to a UTF-8 string.
+.AP "CONST Tcl_UniChar" *uniStr in
+A NULL-terminated Unicode string.
.AP int len in
The length of the UTF-8 string in bytes (not UTF-8 characters). If
negative, all bytes up to the first null byte are used.
+.AP int numChars in
+The length of the Unicode string in characters. Must be greater than or
+equal to 0.
+.AP "Tcl_DString" *dstPtr in/out
+A pointer to a previously-initialized \fBTcl_DString\fR.
+.AP size_t n in
+The number of Unicode characters to compare in \fBTcl_UniCharNcmp\fR.
.AP "CONST char" *start in
Pointer to the beginning of a UTF-8 string.
.AP int index in
@@ -100,6 +121,36 @@ not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first
byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and
0x00ff and return 1.
.PP
+\fBTcl_UniCharToUtfDString\fR converts the given Unicode string
+to UTF-8, storing the result in a previously-initialized \fBTcl_DString\fR.
+You must specify the length of the given Unicode string.
+The return value is a pointer to the UTF-8 representation of the
+Unicode string. Storage for the return value is appended to the
+end of the \fBTcl_DString\fR.
+.PP
+\fBTcl_UtfToUniCharDString\fR coverts the given UTF-8 string to Unicode,
+storing the result in the previously-initialized \fBTcl_Dstring\fR.
+you may either specify the length of the given UTF-8 string or "-1",
+in which case \fBTcl_UtfToUniCharDString\fR uses \fBstrlen\fR to
+calculate the length. The return value is a pointer to the Unicode
+representation of the UTF-8 string. Storage for the return value
+is appended to the end of the \fBTcl_DString\fR. The Unicode string
+is terminated with a Unicode NULL character.
+.PP
+\fBTcl_UniCharLen\fR corresponds to \fBstrlen\fR for Unicode
+characters. It accepts a NULL-terminated Unicode string and returns
+the number of Unicode characters (not bytes) in that string.
+.PP
+\fBTcl_UniCharNcmp\fR corresponds to \fBstrncmp\fR for Unicode
+characters. It accepts two NULL-terminated Unicode strings
+and the number of characters to compare. (Both strings are
+assumed to be at least \fIlen\fR characters long.)
+\fBTcl_UniCharNcmp\fR compares the two strings character-by-character
+according to the Unicode character ordering. It returns an integer
+greater than, equal to,
+or less than 0 if the first string is greater than, equal to, or
+less than the second string respectively.
+.PP
\fBTcl_UtfCharComplete\fR returns 1 if the source UTF-8 string \fIsrc\fR
of length \fIlen\fR bytes is long enough to be decoded by
\fBTcl_UtfToUniChar\fR, or 0 otherwise. This function does not guarantee
diff --git a/doc/msgcat.n b/doc/msgcat.n
index e04d2a6..0ddd7ce 100644
--- a/doc/msgcat.n
+++ b/doc/msgcat.n
@@ -13,7 +13,7 @@
.SH NAME
msgcat \- Tcl message catalog
.SH SYNOPSIS
-\fB::msgcat::mc src-string\fR
+\fB::msgcat::mc \fIsrc-string\fR
.sp
\fB::msgcat::mclocale \fR?\fInewLocale\fR?
.sp
@@ -43,7 +43,7 @@ wishes to be enabled for multi-lingual applications.
.SH COMMANDS
.TP
-\fB::msgcat::mc src-string\fR
+\fB::msgcat::mc \fIsrc-string\fR
Returns a translation of \fIsrc-string\fR according to the
user's current locale. If no translation string
exists, \fB::msgcat::mcunknown\fR is called and the string
@@ -58,8 +58,9 @@ later simply by defining new message catalog entries.
.TP
\fB::msgcat::mclocale \fR?\fInewLocale\fR?
This function sets the locale to \fInewLocale\fR. If \fInewLocale\fR
-is omitted, the current locale is returned, otherwise the new locale
-is returned. The initial locale defaults to the locale specified in
+is omitted, the current locale is returned, otherwise the current locale
+is set to \fInewLocale\fR.
+The initial locale defaults to the locale specified in
the user's environment. See \fBLOCALE AND SUBLOCALE SPECIFICATION\fR
below for a description of the locale string format.
.TP
@@ -81,7 +82,7 @@ and were loaded is returned.
Sets the translation for \fIsrc-string\fR to \fItranslate-string\fR
in the specified \fIlocale\fR. If \fItranslate-string\fR is not
specified, \fIsrc-string\fR is used for both. The function
-return \fItranslate-string\fR.
+returns \fItranslate-string\fR.
.TP
\fB::msgcat::mcunknown \fIlocale src-string\fR
This routine is called by \fB::msgcat::mc\fR in the case when
@@ -89,9 +90,9 @@ a translation for \fIsrc-string\fR is not defined in the
current locale. The default action is to return
\fIsrc-string\fR. This procedure can be redefined by the
application, for example to log error messages for each unknown
-string. The \fB::msgcat::mcunknown\fB procedure is invoked at the
+string. The \fB::msgcat::mcunknown\fR procedure is invoked at the
same stack context as the call to \fB::msgcat::mc\fR. The return vaue
-of \fB::msgcat::mcunknown\fB is used as the return vaue for the call
+of \fB::msgcat::mcunknown\fR is used as the return vaue for the call
to \fB::msgcat::mc\fR.
.SH "LOCALE AND SUBLOCALE SPECIFICATION"
diff --git a/doc/regexp.n b/doc/regexp.n
index 0d08dcf..e19ae65 100644
--- a/doc/regexp.n
+++ b/doc/regexp.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: regexp.n,v 1.3 1999/04/16 00:46:35 stanton Exp $
+'\" RCS: @(#) $Id: regexp.n,v 1.4 1999/04/30 22:45:01 stanton Exp $
'\"
.so man.macros
.TH regexp n 8.1 Tcl "Tcl Built-In Commands"
@@ -204,8 +204,7 @@ see ESCAPES below
.TP
\fB{\fR
when followed by a character other than a digit,
-matches the character
-`\fB{\fR';
+matches the left-brace character `\fB{\fR';
when followed by a digit, it is the beginning of a
\fIbound\fR (see above)
.TP
@@ -239,20 +238,16 @@ where no substring matching \fIre\fR begins
The lookahead constraints may not contain back references (see later),
and all parentheses within them are considered non-capturing.
.PP
-An RE may not end with
-`\fB\e\fR'.
+An RE may not end with `\fB\e\fR'.
.SH "BRACKET EXPRESSIONS"
-A \fIbracket expression\fR is a list of characters enclosed in
-`\fB[\|]\fR'.
+A \fIbracket expression\fR is a list of characters enclosed in `\fB[\|]\fR'.
It normally matches any single character from the list (but see below).
-If the list begins with
-`\fB^\fR',
+If the list begins with `\fB^\fR',
it matches any single character
(but see below) \fInot\fR from the rest of the list.
.PP
-If two characters in the list are separated by
-`\fB\-\fR',
+If two characters in the list are separated by `\fB\-\fR',
this is shorthand
for the full \fIrange\fR of characters between those two (inclusive) in the
collating sequence,
@@ -279,20 +274,16 @@ and
to make it a collating element (see below).
Alternatively,
make it the first character
-(following a possible
-`\fB^\fR'),
-or (AREs only) precede it with
-`\fB\e\fR'.
-Alternatively, for
-`\fB\-\fR',
+(following a possible `\fB^\fR'),
+or (AREs only) precede it with `\fB\e\fR'.
+Alternatively, for `\fB\-\fR',
make it the last character,
or the second endpoint of a range.
To use a literal
\fB\-\fR
as the first endpoint of a range,
make it a collating element
-or (AREs only) precede it with
-`\fB\e\fR'.
+or (AREs only) precede it with `\fB\e\fR'.
With the exception of these, some combinations using
\fB[\fR
(see next
@@ -324,12 +315,10 @@ multi-character collating element,
then the RE
\fB[[.ch.]]*c\fR
matches the first five characters
-of
-`\fBchchcc\fR',
+of `\fBchchcc\fR',
and the RE
\fB[^c]b\fR
-matches all of
-`\fBchb\fR'.
+matches all of `\fBchb\fR'.
.PP
Within a bracket expression, a collating element enclosed in
\fB[=\fR
@@ -338,20 +327,15 @@ and
is an equivalence class, standing for the sequences of characters
of all collating elements equivalent to that one, including itself.
(If there are no other equivalent collating elements,
-the treatment is as if the enclosing delimiters were
-`\fB[.\fR'\&
-and
-`\fB.]\fR'.)
+the treatment is as if the enclosing delimiters were `\fB[.\fR'\&
+and `\fB.]\fR'.)
For example, if
\fBo\fR
and
\fB\o'o^'\fR
are the members of an equivalence class,
-then
-`\fB[[=o=]]\fR',
-`\fB[[=\o'o^'=]]\fR',
-and
-`\fB[o\o'o^']\fR'\&
+then `\fB[[=o=]]\fR', `\fB[[=\o'o^'=]]\fR',
+and `\fB[o\o'o^']\fR'\&
are all synonymous.
An equivalence class may not be an endpoint
of a range.
@@ -448,8 +432,7 @@ and whose other bits are all zero
.TP
\fB\ee\fR
the character whose collating-sequence name
-is
-`\fBESC\fR',
+is `\fBESC\fR',
or failing that, the character with octal value 033
.TP
\fB\ef\fR
@@ -513,13 +496,9 @@ the character whose octal value is
\fB0\fIxyz\fR
.RE
.PP
-Hexadecimal digits are
-`\fB0\fR'-`\fB9\fR',
-`\fBa\fR'-`\fBf\fR',
-and
-`\fBA\fR'-`\fBF\fR'.
-Octal digits are
-`\fB0\fR'-`\fB7\fR'.
+Hexadecimal digits are `\fB0\fR'-`\fB9\fR', `\fBa\fR'-`\fBf\fR',
+and `\fBA\fR'-`\fBF\fR'.
+Octal digits are `\fB0\fR'-`\fB7\fR'.
.PP
The character-entry escapes are always taken as ordinary characters.
For example,
@@ -532,8 +511,7 @@ but
does not terminate a bracket expression.
Beware, however, that some applications (e.g., C compilers) interpret
such sequences themselves before the regular-expression package
-gets to see them, which may require doubling (quadrupling, etc.) the
-`\fB\e\fR'.
+gets to see them, which may require doubling (quadrupling, etc.) the `\fB\e\fR'.
.PP
Class-shorthand escapes (AREs only) provide shorthands for certain commonly-used
character classes:
@@ -560,17 +538,11 @@ character classes:
(note underscore)
.RE
.PP
-Within bracket expressions,
-`\fB\ed\fR',
-`\fB\es\fR',
-and
-`\fB\ew\fR'\&
+Within bracket expressions, `\fB\ed\fR', `\fB\es\fR',
+and `\fB\ew\fR'\&
lose their outer brackets,
-and
-`\fB\eD\fR',
-`\fB\eS\fR',
-and
-`\fB\eW\fR'\&
+and `\fB\eD\fR', `\fB\eS\fR',
+and `\fB\eW\fR'\&
are illegal.
.PP
A constraint escape (AREs only) is a constraint,
@@ -580,8 +552,7 @@ written as an escape:
.TP 6
\fB\eA\fR
matches only at the beginning of the string
-(see MATCHING, below, for how this differs from
-`\fB^\fR')
+(see MATCHING, below, for how this differs from `\fB^\fR')
.TP
\fB\em\fR
matches only at the beginning of a word
@@ -597,8 +568,7 @@ matches only at a point which is not the beginning or end of a word
.TP
\fB\eZ\fR
matches only at the end of the string
-(see MATCHING, below, for how this differs from
-`\fB$\fR')
+(see MATCHING, below, for how this differs from `\fB$\fR')
.TP
\fB\e\fIm\fR
(where
@@ -632,8 +602,7 @@ matches
\fBbb\fR
or
\fBcc\fR
-but not
-`\fBbc\fR'.
+but not `\fBbc\fR'.
The subexpression must entirely precede the back reference in the RE.
Subexpressions are numbered in the order of their leading parentheses.
Non-capturing parentheses do not define subexpressions.
@@ -655,11 +624,9 @@ forms and miscellaneous syntactic facilities available.
Normally the flavor of RE being used is specified by
application-dependent means.
However, this can be overridden by a \fIdirector\fR.
-If an RE of any flavor begins with
-`\fB***:\fR',
+If an RE of any flavor begins with `\fB***:\fR',
the rest of the RE is an ARE.
-If an RE of any flavor begins with
-`\fB***=\fR',
+If an RE of any flavor begins with `\fB***=\fR',
the rest of the RE is taken to be a literal string,
with all characters considered ordinary characters.
.PP
@@ -750,17 +717,14 @@ if at all, is application-specific;
expanded syntax is primarily a scripting facility.
.PP
Finally, in an ARE,
-outside bracket expressions, the sequence
-`\fB(?#\fIttt\fB)\fR'
+outside bracket expressions, the sequence `\fB(?#\fIttt\fB)\fR'
(where
\fIttt\fR
-is any text not containing a
-`\fB)\fR')
+is any text not containing a `\fB)\fR')
is a comment,
completely ignored.
Again, this is not allowed between the characters of
-multi-character symbols like
-`\fB(?:\fR'.
+multi-character symbols like `\fB(?:\fR'.
Such comments are more a historical artifact than a useful facility,
and their use is deprecated;
use the expanded syntax instead.
@@ -825,11 +789,9 @@ Match lengths are measured in characters, not collating elements.
An empty string is considered longer than no match at all.
For example,
\fBbb*\fR
-matches the three middle characters of
-`\fBabbbc\fR',
+matches the three middle characters of `\fBabbbc\fR',
\fB(week|wee)(night|knights)\fR
-matches all ten characters of
-`\fBweeknights\fR',
+matches all ten characters of `\fBweeknights\fR',
when
\fB(.*).*\fR
is matched against
@@ -851,8 +813,7 @@ ordinary character outside a bracket expression, it is effectively
transformed into a bracket expression containing both cases,
so that
\fBx\fR
-becomes
-`\fB[xX]\fR'.
+becomes `\fB[xX]\fR'.
When it appears inside a bracket expression, all case counterparts
of it are added to the bracket expression, so that
\fB[x]\fR
@@ -860,8 +821,7 @@ becomes
\fB[xX]\fR
and
\fB[^x]\fR
-becomes
-`\fB[^xX]\fR'.
+becomes `\fB[^xX]\fR'.
.PP
If newline-sensitive matching is specified,
\fB.\fR
@@ -889,8 +849,7 @@ this affects
and bracket expressions
as with newline-sensitive matching, but not
\fB^\fR
-and
-`\fB$\fR'.
+and `\fB$\fR'.
.PP
If inverse partial newline-sensitive matching is specified,
this affects
@@ -923,9 +882,7 @@ syntax for both BREs and EREs.
.PP
Many of the ARE extensions are borrowed from Perl, but some have
been changed to clean them up, and a few Perl extensions are not present.
-Incompatibilities of note include
-`\fB\eb\fR',
-`\fB\eB\fR',
+Incompatibilities of note include `\fB\eb\fR', `\fB\eB\fR',
the lack of special treatment for a trailing newline,
the addition of complemented bracket expressions to the things
affected by newline-sensitive matching,
@@ -965,14 +922,12 @@ will not look like a valid bound.
.PP
In AREs,
\fB\e\fR
-remains a special character within
-`\fB[\|]\fR',
+remains a special character within `\fB[\|]\fR',
so a literal
\fB\e\fR
within
\fB[\|]\fR
-must be written
-`\fB\e\e\fR'.
+must be written `\fB\e\e\fR'.
\fB\e\e\fR
also gives a literal
\fB\e\fR
@@ -993,17 +948,14 @@ find a match which was \fInot\fR the longest/shortest will need rewriting.)
.RE
.SH "BASIC REGULAR EXPRESSIONS"
-BREs differ from EREs in several respects.
-`\fB|\fR',
-`\fB+\fR',
+BREs differ from EREs in several respects. `\fB|\fR', `\fB+\fR',
and
\fB?\fR
are ordinary characters and there is no equivalent
for their functionality.
The delimiters for bounds are
\fB\e{\fR
-and
-`\fB\e}\fR',
+and `\fB\e}\fR',
with
\fB{\fR
and
@@ -1011,8 +963,7 @@ and
by themselves ordinary characters.
The parentheses for nested subexpressions are
\fB\e(\fR
-and
-`\fB\e)\fR',
+and `\fB\e)\fR',
with
\fB(\fR
and
@@ -1028,8 +979,7 @@ and
\fB*\fR
is an ordinary character if it appears at the beginning of the
RE or the beginning of a parenthesized subexpression
-(after a possible leading
-`\fB^\fR').
+(after a possible leading `\fB^\fR').
Finally,
single-digit back references are available,
and
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index cb40ff3..5a2a70c 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.9 1999/04/21 21:50:25 rjohnson Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.10 1999/04/30 22:45:01 stanton Exp $
*/
#ifndef _TCLDECLS
@@ -1529,7 +1529,13 @@ typedef struct TclStubs {
int (*tcl_Stat) _ANSI_ARGS_((CONST char * path, struct stat * bufPtr)); /* 368 */
} TclStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclStubs *tclStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 61edee0..c9529ed 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.8 1999/04/22 22:57:07 stanton Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.9 1999/04/30 22:45:01 stanton Exp $
*/
#ifndef _TCLINTDECLS
@@ -608,7 +608,13 @@ typedef struct TclIntStubs {
void (*tclHideLiteral) _ANSI_ARGS_((Tcl_Interp * interp, struct CompileEnv * envPtr, int index)); /* 144 */
} TclIntStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclIntStubs *tclIntStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 628a03b..1a03db0 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.5 1999/04/16 00:46:48 stanton Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.6 1999/04/30 22:45:02 stanton Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -268,7 +268,13 @@ typedef struct TclIntPlatStubs {
#endif /* MAC_TCL */
} TclIntPlatStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclIntPlatStubs *tclIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 0792e6e..647965a 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.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: tclParse.c,v 1.5 1999/04/21 21:50:27 rjohnson Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.6 1999/04/30 22:45:02 stanton Exp $
*/
#include "tclInt.h"
@@ -483,10 +483,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
error:
string[numBytes] = (char) savedChar;
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
if (parsePtr->commandStart == NULL) {
parsePtr->commandStart = string;
}
@@ -1743,10 +1740,7 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -1985,10 +1979,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -2079,10 +2070,7 @@ Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -2113,6 +2101,7 @@ CommandComplete(script, length)
{
Tcl_Parse parse;
char *p, *end;
+ int result;
p = script;
end = p + length;
@@ -2122,11 +2111,15 @@ CommandComplete(script, length)
if (*p == 0) {
break;
}
+ Tcl_FreeParse(&parse);
}
if (parse.incomplete) {
- return 0;
+ result = 0;
+ } else {
+ result = 1;
}
- return 1;
+ Tcl_FreeParse(&parse);
+ return result;
}
/*
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index 214020d..08f8b0f 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.4 1999/04/16 00:46:51 stanton Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.5 1999/04/30 22:45:02 stanton Exp $
*/
#ifndef _TCLPLATDECLS
@@ -80,7 +80,13 @@ typedef struct TclPlatStubs {
#endif /* MAC_TCL */
} TclPlatStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclPlatStubs *tclPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/tests/env.test b/tests/env.test
index 27656e4..543a939 100644
--- a/tests/env.test
+++ b/tests/env.test
@@ -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: env.test,v 1.4 1999/04/16 00:47:26 stanton Exp $
+# RCS: @(#) $Id: env.test,v 1.5 1999/04/30 22:45:02 stanton Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -173,7 +173,7 @@ test env-4.5 {unsetting international environment variables} {execCommandExists}
test env-5.0 {corner cases - set a value, it should exist} {} {
set temp [lindex [array names env] end]
- set x env($temp)
+ set x $env($temp)
set env($temp) a
set result [set env($temp)]
set env($temp) $x
diff --git a/tests/parse.test b/tests/parse.test
index 1f36063..ccedc77 100644
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -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: parse.test,v 1.3 1999/04/16 00:47:31 stanton Exp $
+# RCS: @(#) $Id: parse.test,v 1.4 1999/04/30 22:45:03 stanton Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -723,6 +723,10 @@ test parse-15.56 {CommandComplete procedure} {
test parse-15.57 {CommandComplete procedure} {
info complete "# Comment should be complete command"
} 1
+test parse-15.58 {CommandComplete procedure, memory leaks} {
+ info complete "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22"
+} 1
+
# cleanup
catch {unset a}
diff --git a/tools/README b/tools/README
index 1caf63c..9161214 100644
--- a/tools/README
+++ b/tools/README
@@ -2,9 +2,18 @@
This directory contains unsupported tools that are used
during the release engineering process.
+Generating HTML files.
+The tcl8.1-tk8.1-man-html.tcl script from Robert Critchlow
+generates a nice set of HTML with good cross references.
+Use it like
+ tclsh8.0 tcl8.1-tk8.1-man-html.tcl --htmldir=/tmp/tcl8.1
+This script is very picky about the organization of man pages,
+effectively acting as a style enforcer.
+
Generating Windows Help Files:
-1) On UNIX, (after autoconf and configure), do
- make winhelp
+1) Build tcl in the ../unix directory
+2) On UNIX, (after autoconf and configure), do
+ make
this converts the Nroff to RTF files.
2) On Windows, convert the RTF to a Help doc, do
nmake helpfile
diff --git a/tools/configure.in b/tools/configure.in
index 147b99e..a48d6d7 100644
--- a/tools/configure.in
+++ b/tools/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 to configure the
dnl Makefile in this directory.
AC_INIT(man2tcl.c)
-# RCS: @(#) $Id: configure.in,v 1.5 1999/04/16 00:47:38 stanton Exp $
+# RCS: @(#) $Id: configure.in,v 1.6 1999/04/30 22:45:03 stanton Exp $
# Recover information that Tcl computed with its configure script.
@@ -30,5 +30,4 @@ AC_SUBST(TCL_PATCH_LEVEL)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_BIN_DIR)
-AC_OUTPUT(Makefile)
-AC_OUTPUT(tcl.hpj)
+AC_OUTPUT(Makefile tcl.hpj)
diff --git a/tools/encoding/README b/tools/encoding/README
index 65b0a91..0713f4e 100644
--- a/tools/encoding/README
+++ b/tools/encoding/README
@@ -1,5 +1,5 @@
-Use "make" to compile all the encoding files (*.txt,*.esc) into the format
-that Tcl can use (*.enc). It is the caller's responsibility to move the
-generated .enc files to the appropriate place (the $TCL_LIBRARY/encoding
-directory).
+On Unix, use "make" to compile all the encoding files (*.txt,*.esc)
+into the format that Tcl can use (*.enc). It is the caller's
+responsibility to move the generated .enc files to the appropriate
+place (the $TCL_LIBRARY/encoding directory).
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index 6ac76fc..e4bc088 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.4 1999/04/24 01:46:53 stanton Exp $
+# RCS: @(#) $Id: genStubs.tcl,v 1.5 1999/04/30 22:45:03 stanton Exp $
namespace eval genStubs {
# libraryName --
@@ -717,7 +717,9 @@ proc genStubs::emitHeader {name} {
append text "} ${capName}Stubs;\n"
- append text "\nextern ${capName}Stubs *${name}StubsPtr;\n"
+ append text "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n"
+ append text "extern ${capName}Stubs *${name}StubsPtr;\n"
+ append text "#ifdef __cplusplus\n}\n#endif\n"
emitMacros $name text
diff --git a/tools/genWinImage.tcl b/tools/genWinImage.tcl
index b5fc051..cecca62 100644
--- a/tools/genWinImage.tcl
+++ b/tools/genWinImage.tcl
@@ -5,7 +5,7 @@
# Copyright (c) 1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: genWinImage.tcl,v 1.2 1999/04/16 00:47:39 stanton Exp $
+# RCS: @(#) $Id: genWinImage.tcl,v 1.3 1999/04/30 22:45:03 stanton Exp $
# This file is insensitive to the directory from which it is invoked.
@@ -69,6 +69,27 @@ proc genWinImage::init {} {
[clock format [clock seconds] -format "%Y%m%d-%H:%M"] --\n\n"
}
+# genWinImage::makeTextFile --
+#
+# Convert the input file into a CRLF terminated text file.
+#
+# Arguments:
+# infile The input file to convert.
+# outfile The location where the text file should be stored.
+#
+# Results:
+# None.
+
+proc genWinImage::makeTextFile {infile outfile} {
+ set f [open $infile r]
+ set text [read $f]
+ close $f
+ set f [open $outfile w]
+ fconfigure $f -translation crlf
+ puts -nonewline $f $text
+ close $f
+}
+
# genWinImage::generateInstallers --
#
# Perform substitutions on the pro.wse.in file and then
@@ -103,6 +124,13 @@ proc genWinImage::generateInstallers {} {
puts $f $s
close $f
+ # Ensure the text files are CRLF terminated
+
+ makeTextFile [file join $tclBuildDir win/README.binary] \
+ [file join $tclBuildDir win/readme.txt]
+ makeTextFile [file join $tclBuildDir license.terms] \
+ [file join $tclBuildDir license.txt]
+
set wise32ProgFilePath [file native [file join $__WISE__ wise32.exe]]
# Run the Wise installer to create the Windows install images.
diff --git a/tools/tcl.wse.in b/tools/tcl.wse.in
index 2be334f..43a6581 100644
--- a/tools/tcl.wse.in
+++ b/tools/tcl.wse.in
@@ -46,7 +46,7 @@ item: Set Variable
end
item: Set Variable
Variable=PATCHLEVEL
- Value=8.1b3
+ Value=8.1
end
item: Set Variable
Variable=APPTITLE
@@ -945,12 +945,12 @@ item: Check Disk Space
Component=COMPONENTS
end
item: Install File
- Source=${__TCLBASEDIR__}\license.terms
+ Source=${__TCLBASEDIR__}\license.txt
Destination=%MAINDIR%\license.txt
Flags=0000000000000010
end
item: Install File
- Source=${__TCLBASEDIR__}\win\Readme.binary
+ Source=${__TCLBASEDIR__}\win\Readme.txt
Destination=%MAINDIR%\Readme.txt
Flags=0000000000000010
end
@@ -1062,16 +1062,6 @@ item: Install File
Flags=0000000010000010
end
item: Install File
- Source=${__TCLBASEDIR__}\library\encoding\ksc5601.enc
- Destination=%MAINDIR%\lib\tcl%VER%\encoding\ksc5601.enc
- Flags=0000000010000010
-end
-item: Install File
- Source=${__TCLBASEDIR__}\library\encoding\euc-kr.enc
- Destination=%MAINDIR%\lib\tcl%VER%\encoding\euc-kr.enc
- Flags=0000000010000010
-end
-item: Install File
Source=${__TCLBASEDIR__}\library\encoding\symbol.enc
Destination=%MAINDIR%\lib\tcl%VER%\encoding\symbol.enc
Flags=0000000000000010
@@ -1142,6 +1132,16 @@ item: Install File
Flags=0000000000000010
end
item: Install File
+ Source=${__TCLBASEDIR__}\library\encoding\ksc5601.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\ksc5601.enc
+ Flags=0000000010000010
+end
+item: Install File
+ Source=${__TCLBASEDIR__}\library\encoding\koi8-r.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\ksc5601.enc
+ Flags=0000000010000010
+end
+item: Install File
Source=${__TCLBASEDIR__}\library\encoding\jis0212.enc
Destination=%MAINDIR%\lib\tcl%VER%\encoding\jis0212.enc
Flags=0000000000000010
@@ -1232,11 +1232,21 @@ item: Install File
Flags=0000000000000010
end
item: Install File
+ Source=${__TCLBASEDIR__}\library\encoding\euc-cn.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\euc-cn.enc
+ Flags=0000000010000010
+end
+item: Install File
Source=${__TCLBASEDIR__}\library\encoding\euc-jp.enc
Destination=%MAINDIR%\lib\tcl%VER%\encoding\euc-jp.enc
Flags=0000000000000010
end
item: Install File
+ Source=${__TCLBASEDIR__}\library\encoding\euc-kr.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\euc-kr.enc
+ Flags=0000000010000010
+end
+item: Install File
Source=${__TCLBASEDIR__}\library\encoding\dingbats.enc
Destination=%MAINDIR%\lib\tcl%VER%\encoding\dingbats.enc
Flags=0000000000000010
@@ -1387,13 +1397,13 @@ item: Install File
Flags=0000000000000010
end
item: Install File
- Source=${__TCLBASEDIR__}\library\encoding\big5.enc
- Destination=%MAINDIR%\lib\tcl%VER%\encoding\big5.enc
+ Source=${__TCLBASEDIR__}\library\encoding\ascii.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\ascii.enc
Flags=0000000000000010
end
item: Install File
- Source=${__TCLBASEDIR__}\library\encoding\ascii.enc
- Destination=%MAINDIR%\lib\tcl%VER%\encoding\ascii.enc
+ Source=${__TCLBASEDIR__}\library\encoding\big5.enc
+ Destination=%MAINDIR%\lib\tcl%VER%\encoding\big5.enc
Flags=0000000000000010
end
item: Install File
@@ -1705,7 +1715,7 @@ item: Install File
end
item: Install File
Source=${__TKBASEDIR__}\library\demos\twind.tcl
- Destination=%MAINDIR%\lib\tk%VER%\demos\twind.tcl
+ Destination=%MAINDIR%\lib\tk%VER%\demos\twin\released.tcl
Flags=0000000000000010
end
item: Install File
@@ -2298,13 +2308,19 @@ item: Custom Dialog Set
Text Italian=Premere il pulsante Fine per uscire dall'installazione.
end
item: Checkbox
- Rectangle=88 156 245 170
+ Rectangle=88 143 245 157
Variable=TO_SCRIPTICS
Enabled Color=00000000000000001111111111111111
Create Flags=01010000000000010000000000000011
- Text=Take me to learn more about Tcl/Tk %VER%
+ Text=Show me important information about
Text=
end
+ item: Static
+ Rectangle=99 156 245 170
+ Enabled Color=00000000000000001111111111111111
+ Create Flags=01010000000000000000000000000000
+ Text=Tcl/Tk %VER% and TclPro
+ end
end
end
item: End Block
diff --git a/tools/tclSplash.bmp b/tools/tclSplash.bmp
index 2636c41..19e3c4a 100644
--- a/tools/tclSplash.bmp
+++ b/tools/tclSplash.bmp
Binary files differ
diff --git a/unix/configure.in b/unix/configure.in
index ab8e791..2458ca9 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -2,12 +2,12 @@ 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.33 1999/04/24 01:46:54 stanton Exp $
+# RCS: @(#) $Id: configure.in,v 1.34 1999/04/30 22:45:05 stanton Exp $
TCL_VERSION=8.1
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=1
-TCL_PATCH_LEVEL=0
+TCL_PATCH_LEVEL=
VERSION=${TCL_VERSION}
if test "${prefix}" = "NONE"; then
diff --git a/win/tcl.rc b/win/tcl.rc
index 49f9316..56cf8ec 100644
--- a/win/tcl.rc
+++ b/win/tcl.rc
@@ -1,8 +1,10 @@
-// RCS: @(#) $Id: tcl.rc,v 1.3 1999/04/16 00:48:07 stanton Exp $
+// RCS: @(#) $Id: tcl.rc,v 1.4 1999/04/30 22:45:05 stanton Exp $
//
// Version
//
+#define VS_VERSION_INFO 1
+
#define RESOURCE_INCLUDED
#include <tcl.h>
@@ -23,9 +25,9 @@ BEGIN
BEGIN
VALUE "FileDescription", "Tcl DLL\0"
VALUE "OriginalFilename", "tcl" STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) ".dll\0"
- VALUE "CompanyName", "Sun Microsystems, Inc\0"
+ VALUE "CompanyName", "Scriptics Corporation\0"
VALUE "FileVersion", TCL_PATCH_LEVEL
- VALUE "LegalCopyright", "Copyright (c) 1995-1997\0"
+ VALUE "LegalCopyright", "Copyright (c) 1999 by Scriptics Corporation\0"
VALUE "ProductName", "Tcl " TCL_VERSION " for Windows\0"
VALUE "ProductVersion", TCL_PATCH_LEVEL
END
diff --git a/win/tcl16.rc b/win/tcl16.rc
index 5c44d95..02c9b24 100644
--- a/win/tcl16.rc
+++ b/win/tcl16.rc
@@ -1,4 +1,4 @@
-// RCS: @(#) $Id: tcl16.rc,v 1.2 1998/09/14 18:40:19 stanton Exp $
+// RCS: @(#) $Id: tcl16.rc,v 1.3 1999/04/30 22:45:05 stanton Exp $
//
// Version
//
@@ -21,9 +21,9 @@ BEGIN
BEGIN
VALUE "FileDescription", "Tcl16 DLL, 16-bit thunking module\0"
VALUE "OriginalFilename", "tcl16" STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) ".dll\0"
- VALUE "CompanyName", "Sun Microsystems, Inc\0"
+ VALUE "CompanyName", "Scriptics Corporation\0"
VALUE "FileVersion", TCL_PATCH_LEVEL
- VALUE "LegalCopyright", "Copyright \251 1995-1996\0"
+ VALUE "LegalCopyright", "Copyright \251 1999 by Scriptics Corporation\0"
VALUE "ProductName", "Tcl " TCL_VERSION " for Windows\0"
VALUE "ProductVersion", TCL_PATCH_LEVEL
END
diff --git a/win/tclsh.rc b/win/tclsh.rc
index 44a3f35..201a6bc 100644
--- a/win/tclsh.rc
+++ b/win/tclsh.rc
@@ -1,8 +1,10 @@
-// RCS: @(#) $Id: tclsh.rc,v 1.3 1999/04/16 00:48:10 stanton Exp $
+// RCS: @(#) $Id: tclsh.rc,v 1.4 1999/04/30 22:45:05 stanton Exp $
//
// Version
//
+#define VS_VERSION_INFO 1
+
#define RESOURCE_INCLUDED
#include <tcl.h>
@@ -23,9 +25,9 @@ BEGIN
BEGIN
VALUE "FileDescription", "Tclsh Application\0"
VALUE "OriginalFilename", "tclsh" STRINGIFY(TCL_MAJOR_VERSION) STRINGIFY(TCL_MINOR_VERSION) ".exe\0"
- VALUE "CompanyName", "Sun Microsystems, Inc\0"
+ VALUE "CompanyName", "Scriptics Corporation\0"
VALUE "FileVersion", TCL_PATCH_LEVEL
- VALUE "LegalCopyright", "Copyright (c) 1995-1996\0"
+ VALUE "LegalCopyright", "Copyright (c) 1999 by Scriptics Corporation\0"
VALUE "ProductName", "Tcl " TCL_VERSION " for Windows\0"
VALUE "ProductVersion", TCL_PATCH_LEVEL
END