diff options
author | hobbs <hobbs> | 2000-08-07 21:29:36 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-08-07 21:29:36 (GMT) |
commit | 447ba1bd68db8d38d2a447db206f71fd8439bf8e (patch) | |
tree | acdd4d0d5e035cfb95236e939040e0eb01c0cc56 | |
parent | 4772e4fbbcde7aa1bd229575d4f90ff7126a7a4a (diff) | |
download | tcl-447ba1bd68db8d38d2a447db206f71fd8439bf8e.zip tcl-447ba1bd68db8d38d2a447db206f71fd8439bf8e.tar.gz tcl-447ba1bd68db8d38d2a447db206f71fd8439bf8e.tar.bz2 |
* doc/AddErrInfo.3:
* doc/ChnlStack.3:
* doc/Exit.3:
* doc/GetIndex.3:
* doc/Notifier.3:
* doc/Object.3:
* doc/RegExp.3:
* doc/SetResult.3:
* doc/SplitList.3:
* doc/Thread.3: Added missing entries to NAME section.
* doc/AddErrInfo.3:
* doc/CrtObjCmd.3:
* doc/RecEvalObj.3: Changed Tcl_EvalObj to Tcl_EvalObjEx
* doc/library.n: Added entries for auto_qualify and auto_import
[Bug: 1271].
* doc/library.n: Fixed .SH NAME macro to include each function
documented on the page, so that mkLinks will know about the
functions listed there, and so that the Windows help file index
will get set up correctly [Bug: 1898, 5273].
* doc/expr.n: Added documentation for each of the math library
functions that expr supports [Bug: 1054].
* doc/regsub.n: correct regsub docs [Bug: 5346]
* doc/scan.n: minor doc fixes [Bug: 5396]
* doc/RegExp.3: Replaced instances of "Tcl_GetRegExpInfo" with
"Tcl_RegExpGetInfo", the correct name of the function [Bug: 5901].
* doc/package.n: Corrected information about [package forget]
arguments [Bug: 5418].
-rw-r--r-- | doc/AddErrInfo.3 | 12 | ||||
-rw-r--r-- | doc/ChnlStack.3 | 4 | ||||
-rw-r--r-- | doc/CrtObjCmd.3 | 7 | ||||
-rw-r--r-- | doc/Exit.3 | 4 | ||||
-rw-r--r-- | doc/GetIndex.3 | 4 | ||||
-rw-r--r-- | doc/Notifier.3 | 8 | ||||
-rw-r--r-- | doc/Object.3 | 4 | ||||
-rw-r--r-- | doc/RecEvalObj.3 | 10 | ||||
-rw-r--r-- | doc/RegExp.3 | 16 | ||||
-rw-r--r-- | doc/SetResult.3 | 4 | ||||
-rw-r--r-- | doc/SplitList.3 | 4 | ||||
-rw-r--r-- | doc/Thread.3 | 9 | ||||
-rw-r--r-- | doc/expr.n | 98 | ||||
-rw-r--r-- | doc/library.n | 129 | ||||
-rw-r--r-- | doc/package.n | 8 | ||||
-rw-r--r-- | doc/regsub.n | 32 | ||||
-rw-r--r-- | doc/scan.n | 5 |
17 files changed, 233 insertions, 125 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index 24d47fe..4b0fb03 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.4 2000/04/26 17:00:43 ericm Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.4.2.1 2000/08/07 21:29:36 hobbs Exp $ '\" .so man.macros .TH Tcl_AddErrorInfo 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- record information about errors +Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- record information about errors .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -82,8 +82,8 @@ formats for \fBerrorCode\fR. .PP The \fBerrorInfo\fR variable is gradually built up as an error unwinds through the nested operations. -Each time an error code is returned to \fBTcl_EvalObj\fR -(or \fBTcl_Eval\fR, which calls \fBTcl_EvalObj\fR) +Each time an error code is returned to \fBTcl_EvalObjEx\fR +(or \fBTcl_Eval\fR, which calls \fBTcl_EvalObjEx\fR) it calls the procedure \fBTcl_AddObjErrorInfo\fR to add additional text to \fBerrorInfo\fR describing the command that was being executed when the error occurred. @@ -93,7 +93,7 @@ of the activity in progress when the error occurred. .PP It is sometimes useful to add additional information to \fBerrorInfo\fR beyond what can be supplied automatically -by \fBTcl_EvalObj\fR. +by \fBTcl_EvalObjEx\fR. \fBTcl_AddObjErrorInfo\fR may be used for this purpose: its \fImessage\fR and \fIlength\fR arguments describe an additional string to be appended to \fBerrorInfo\fR. @@ -103,7 +103,7 @@ line number on which the error occurred; for Tcl procedures, the procedure name and line number within the procedure are recorded, and so on. The best time to call \fBTcl_AddObjErrorInfo\fR is just after -\fBTcl_EvalObj\fR has returned \fBTCL_ERROR\fR. +\fBTcl_EvalObjEx\fR has returned \fBTCL_ERROR\fR. In calling \fBTcl_AddObjErrorInfo\fR, you may find it useful to use the \fBerrorLine\fR field of the interpreter (see the \fBTcl_Interp\fR manual entry for details). diff --git a/doc/ChnlStack.3 b/doc/ChnlStack.3 index 2d9c2ec..2187b69 100644 --- a/doc/ChnlStack.3 +++ b/doc/ChnlStack.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: ChnlStack.3,v 1.1 1999/07/02 19:51:14 welch Exp $ +'\" RCS: @(#) $Id: ChnlStack.3,v 1.1.10.1 2000/08/07 21:29:37 hobbs Exp $ .so man.macros .TH Tcl_StackChannel 3 8.2 Tcl "Tcl Library Procedures" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME -Tcl_StackChannel, Tcl_UnstackChannel \- stack an I/O channel on top of another, and undo it +Tcl_StackChannel, Tcl_UnstackChannel, Tcl_GetStackedChannel \- stack an I/O channel on top of another, and undo it .SH SYNOPSIS .nf .nf diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3 index 756b970..9567e7c 100644 --- a/doc/CrtObjCmd.3 +++ b/doc/CrtObjCmd.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: CrtObjCmd.3,v 1.3 1999/04/16 00:46:30 stanton Exp $ +'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.3.12.1 2000/08/07 21:29:37 hobbs Exp $ '\" .so man.macros .TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures" @@ -59,7 +59,7 @@ Tcl command. \fBTcl_CreateObjCommand\fR defines a new command in \fIinterp\fR and associates it with procedure \fIproc\fR such that whenever \fIname\fR is -invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObj\fR) +invoked as a Tcl command (e.g., via a call to \fBTcl_EvalObjEx\fR) the Tcl interpreter will call \fIproc\fR to process the command. .PP \fBTcl_CreateObjCommand\fR deletes any existing command @@ -120,7 +120,7 @@ In the case of a \fBTCL_OK\fR return code this gives the result of the command, and in the case of \fBTCL_ERROR\fR this gives an error message. Before invoking a command procedure, -\fBTcl_EvalObj\fR sets interpreter's result to +\fBTcl_EvalObjEx\fR sets interpreter's result to point to an object representing an empty string, so simple commands can return an empty result by doing nothing at all. .PP @@ -252,7 +252,6 @@ The string returned by \fBTcl_GetCommandName\fR is in dynamic memory owned by Tcl and is only guaranteed to retain its value as long as the command isn't deleted or renamed; callers should copy the string if they need to keep it for a long time. -.PP .SH "SEE ALSO" Tcl_CreateCommand, Tcl_ResetResult, Tcl_SetObjResult @@ -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: Exit.3,v 1.3 1999/04/16 00:46:31 stanton Exp $ +'\" RCS: @(#) $Id: Exit.3,v 1.3.12.1 2000/08/07 21:29:37 hobbs Exp $ '\" .so man.macros .TH Tcl_Exit 3 8.1 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_Exit, Tcl_Finalize, Tcl_FinalizeThread, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler \- end the application or thread (and invoke exit handlers) +Tcl_Exit, Tcl_Finalize, Tcl_CreateExitHandler, Tcl_DeleteExitHandler, Tcl_ExitThread, Tcl_FinalizeThread, Tcl_CreateThreadExitHandler, Tcl_DeleteThreadExitHandler \- end the application or thread (and invoke exit handlers) .SH SYNOPSIS .nf \fB#include <tcl.h>\fR diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index 000c5e4..3b904b5 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.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: GetIndex.3,v 1.5 1999/08/13 19:01:04 welch Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.5.8.1 2000/08/07 21:29:37 hobbs Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_GetIndexFromObj \- lookup string in table of keywords +Tcl_GetIndexFromObj, Tcl_GetIndexFromObjStruct \- lookup string in table of keywords .SH SYNOPSIS .nf \fB#include <tcl.h>\fR diff --git a/doc/Notifier.3 b/doc/Notifier.3 index 78edc6a..fab4076 100644 --- a/doc/Notifier.3 +++ b/doc/Notifier.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: Notifier.3,v 1.7 1999/05/06 20:13:22 stanton Exp $ +'\" RCS: @(#) $Id: Notifier.3,v 1.7.12.1 2000/08/07 21:29:37 hobbs Exp $ '\" .so man.macros .TH Notifier 3 8.1 Tcl "Tcl Library Procedures" @@ -337,10 +337,10 @@ must be a structure of type \fBTcl_Event\fR, and the address of this structure is used when communicating between the event source and the rest of the notifier. A \fBTcl_Event\fR has the following definition: .CS -typedef struct Tcl_Event { +typedef struct { Tcl_EventProc *\fIproc\fR; struct Tcl_Event *\fInextPtr\fR; -}; +} Tcl_Event; .CE The event source must fill in the \fIproc\fR field of the event before calling \fBTcl_QueueEvent\fR. @@ -597,6 +597,6 @@ mode. .VE .SH "SEE ALSO" \fBTcl_CreateFileHandler\fR, \fBTcl_DeleteFileHandler\fR, \fBTcl_Sleep\fR, -\fBTcl_DoOneEvent\fR, \fBThreads.3\fR +\fBTcl_DoOneEvent\fR, \fBThread(3)\fR .SH KEYWORDS event, notifier, event queue, event sources, file events, timer, idle, service mode, threads diff --git a/doc/Object.3 b/doc/Object.3 index 42a683f..aaf98cb 100644 --- a/doc/Object.3 +++ b/doc/Object.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: Object.3,v 1.4 1999/08/09 16:30:34 hobbs Exp $ +'\" RCS: @(#) $Id: Object.3,v 1.4.10.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Tcl_Obj 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_NewObj, Tcl_DuplicateObj, Tcl_IncrRefCount, Tcl_DecrRefCount, Tcl_IsShared \- manipulate Tcl objects +Tcl_NewObj, Tcl_DuplicateObj, Tcl_IncrRefCount, Tcl_DecrRefCount, Tcl_IsShared, Tcl_InvalidateStringRep \- manipulate Tcl objects .SH SYNOPSIS .nf \fB#include <tcl.h>\fR diff --git a/doc/RecEvalObj.3 b/doc/RecEvalObj.3 index 6af989f..817e615 100644 --- a/doc/RecEvalObj.3 +++ b/doc/RecEvalObj.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: RecEvalObj.3,v 1.2 1998/09/14 18:39:49 stanton Exp $ +'\" RCS: @(#) $Id: RecEvalObj.3,v 1.2.18.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures" @@ -33,15 +33,15 @@ the command at global level instead of the current stack level. .SH DESCRIPTION .PP \fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event -on the history list and then execute it using \fBTcl_EvalObj\fR +on the history list and then execute it using \fBTcl_EvalObjEx\fR (or \fBTcl_GlobalEvalObj\fR if the TCL_EVAL_GLOBAL bit is set in \fIflags\fR). -It returns a completion code such as TCL_OK just like \fBTcl_EvalObj\fR, +It returns a completion code such as TCL_OK just like \fBTcl_EvalObjEx\fR, as well as a result object containing additional information (a result value or error message) that can be retrieved using \fBTcl_GetObjResult\fR. If you don't want the command recorded on the history list then -you should invoke \fBTcl_EvalObj\fR instead of \fBTcl_RecordAndEvalObj\fR. +you should invoke \fBTcl_EvalObjEx\fR instead of \fBTcl_RecordAndEvalObj\fR. Normally \fBTcl_RecordAndEvalObj\fR is only called with top-level commands typed by the user, since the purpose of history is to allow the user to re-issue recently-invoked commands. @@ -49,7 +49,7 @@ If the \fIflags\fR argument contains the TCL_NO_EVAL bit then the command is recorded without being evaluated. .SH "SEE ALSO" -Tcl_EvalObj, Tcl_GetObjResult +Tcl_EvalObjEx, Tcl_GetObjResult .SH KEYWORDS command, event, execute, history, interpreter, object, record diff --git a/doc/RegExp.3 b/doc/RegExp.3 index 8dbdfe4..657abb5 100644 --- a/doc/RegExp.3 +++ b/doc/RegExp.3 @@ -6,13 +6,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: RegExp.3,v 1.6 1999/12/21 23:57:33 hobbs Exp $ +'\" RCS: @(#) $Id: RegExp.3,v 1.6.2.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegExpFromObj, Tcl_RegExpMatchObj, Tcl_GetRegExpInfo \- Pattern matching with regular expressions +Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegExpFromObj, Tcl_RegExpMatchObj, Tcl_RegExpExecObj, Tcl_RegExpGetInfo \- Pattern matching with regular expressions .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -38,7 +38,7 @@ Tcl_RegExp int \fBTcl_RegExpExecObj\fR(\fIinterp\fR, \fIregexp\fR, \fIobjPtr\fR, \fIoffset\fR, \fInmatches\fR, \fIeflags\fR) .sp -\fBTcl_GetRegExpInfo\fR(\fIregexp\fR, \fIinfoPtr\fR) +\fBTcl_RegExpGetInfo\fR(\fIregexp\fR, \fIinfoPtr\fR) .VE 8.1 .SH ARGUMENTS @@ -99,7 +99,7 @@ OR-ed combination of the values TCL_REG_NOTBOL and TCL_REG_NOTEOL. See below for more information. .AP Tcl_RegExpInfo *infoPtr out The address of the location where information about a previous match -should be stored by \fBTcl_GetRegExpInfo\fR. +should be stored by \fBTcl_RegExpGetInfo\fR. .VE 8.1 .BE @@ -170,7 +170,7 @@ is stored in \fI*firstPtr\fR and \fI*lastPtr\fR. .PP .VS 8.1 \fBTcl_GetRegExpFromObj\fR, \fBTcl_RegExpExecObj\fR, and -\fBTcl_GetRegExpInfo\fR are object interfaces that provide the most +\fBTcl_RegExpGetInfo\fR are object interfaces that provide the most direct control of Henry Spencer's regular expression library. For users that need to modify compilation and execution options directly, it is recommended that you use these interfaces instead of calling the @@ -185,7 +185,7 @@ from the string in the object and assign it to the internal representation of the \fIpatObj\fR. The return value of this function is of type \fBTcl_RegExp\fR. The return value is a token for this compiled form, which can be used in subsequent calls to -\fBTcl_RegExpExecObj\fR or \fBTcl_GetRegExpInfo\fR. If an error +\fBTcl_RegExpExecObj\fR or \fBTcl_RegExpGetInfo\fR. If an error occurs while compiling the regular expression then \fBTcl_GetRegExpFromObj\fR returns NULL and leaves an error message in the interpreter result. The regular expression token can be used as @@ -251,7 +251,7 @@ an empty string before any newline in addition to its normal function. \fBTCL_REG_NOSUB\fR Compile for matching that reports only success or failure, not what was matched. This reduces compile overhead and may improve -performance. Subsequent calls to \fBTcl_GetRegExpInfo\fR or +performance. Subsequent calls to \fBTcl_RegExpGetInfo\fR or \fBTcl_RegExpRange\fR will not report any match information. .TP \fBTCL_REG_CANMATCH\fR @@ -294,7 +294,7 @@ line or the end of the string, so '$' will not match there. Note that this flag has no effect on how `\fB\eZ\fR' matches. .RE .PP -\fBTcl_GetRegExpInfo\fR retrieves information about the last match +\fBTcl_RegExpGetInfo\fR retrieves information about the last match performed with a given regular expression \fIregexp\fR. The \fIinfoPtr\fR argument contains a pointer to a structure that is defined as follows: diff --git a/doc/SetResult.3 b/doc/SetResult.3 index a31c9cd..ba5cbf0 100644 --- a/doc/SetResult.3 +++ b/doc/SetResult.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SetResult.3,v 1.5 2000/04/14 23:01:53 hobbs Exp $ +'\" RCS: @(#) $Id: SetResult.3,v 1.5.2.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult \- manipulate Tcl result +Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_FreeResult \- manipulate Tcl result .SH SYNOPSIS .nf \fB#include <tcl.h>\fR diff --git a/doc/SplitList.3 b/doc/SplitList.3 index 79421fb..efaf040 100644 --- a/doc/SplitList.3 +++ b/doc/SplitList.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: SplitList.3,v 1.3 2000/04/14 23:01:53 hobbs Exp $ +'\" RCS: @(#) $Id: SplitList.3,v 1.3.2.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Tcl_SplitList 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_SplitList, Tcl_Merge, Tcl_ScanElement, Tcl_ConvertElement \- manipulate Tcl lists +Tcl_SplitList, Tcl_Merge, Tcl_ScanElement, Tcl_ConvertElement, Tcl_ScanCountedElement, Tcl_ConvertCountedElement \- manipulate Tcl lists .SH SYNOPSIS .nf \fB#include <tcl.h>\fR diff --git a/doc/Thread.3 b/doc/Thread.3 index 0afcb80..0f4b208 100644 --- a/doc/Thread.3 +++ b/doc/Thread.3 @@ -5,13 +5,13 @@ '\" 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.11 2000/04/25 23:03:53 hobbs Exp $ +'\" RCS: @(#) $Id: Thread.3,v 1.11.2.1 2000/08/07 21:29:38 hobbs Exp $ '\" .so man.macros .TH Threads 3 "8.1" Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize \- Tcl thread support. +Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize, Tcl_CreateThread \- Tcl thread support. .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -59,6 +59,8 @@ calls \fBTcl_GetThreadData\fR. .AP Tcl_ThreadId *idPtr out The refered storage will contain the id of the newly created thread as returned by the operating system. +.AP Tcl_ThreadId id in +Id of the thread waited upon. .AP Tcl_ThreadCreateProc threadProc in This procedure will act as the \fBmain()\fR of the newly created thread. The specified \fIclientData\fR will be its sole argument. @@ -69,6 +71,9 @@ The size of the stack given to the new thread. .AP int flags in Bitmask containing flags allowing the caller to modify behaviour of the new thread. +.AP int *result out +The refered storage is used to place the exit code of the thread +waited upon into it. .BE .SH INTRODUCTION Beginning with the 8.1 release, the Tcl core is thread safe, which @@ -1,14 +1,14 @@ '\" '\" Copyright (c) 1993 The Regents of the University of California. -'\" Copyright (c) 1994-1997 Sun Microsystems, Inc. +'\" Copyright (c) 1994-2000 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: expr.n,v 1.2 1998/09/14 18:39:52 stanton Exp $ +'\" RCS: @(#) $Id: expr.n,v 1.2.18.1 2000/08/07 21:29:39 hobbs Exp $ '\" .so man.macros -.TH expr n 8.0 Tcl "Tcl Built-In Commands" +.TH expr n 8.3 Tcl "Tcl Built-In Commands" .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME @@ -184,30 +184,80 @@ invoking the \fBexpr\fR command. Tcl supports the following mathematical functions in expressions: .DS .ta 3c 6c 9c -\fBacos\fR \fBcos\fR \fBhypot\fR \fBsinh\fR -\fBasin\fR \fBcosh\fR \fBlog\fR \fBsqrt\fR -\fBatan\fR \fBexp\fR \fBlog10\fR \fBtan\fR -\fBatan2\fR \fBfloor\fR \fBpow\fR \fBtanh\fR -\fBceil\fR \fBfmod\fR \fBsin\fR +\fBabs\fR \fBcosh\fR \fBlog\fR \fBsqrt\fR +\fBacos\fR \fBdouble\fR \fBlog10\fR \fBsrand\fR +\fBasin\fR \fBexp\fR \fBpow\fR \fBtan\fR +\fBatan\fR \fBfloor\fR \fBrand\fR \fBtanh\fR +\fBatan2\fR \fBfmod\fR \fBround\fR +\fBceil\fR \fBhypot\fR \fBsin\fR +\fBcos\fR \fBint\fR \fBsinh\fR .DE -Each of these functions invokes the math library function of the same -name; see the manual entries for the library functions for details -on what they do. Tcl also implements the following functions for -conversion between integers and floating-point numbers and the -generation of random numbers: +.PP .TP \fBabs(\fIarg\fB)\fR Returns the absolute value of \fIarg\fR. \fIArg\fR may be either integer or floating-point, and the result is returned in the same form. .TP +\fBacos(\fIarg\fB)\fR +Returns the arc cosine of \fIarg\fR, in the range [0,pi] +radians. \fIArg\fR should be in the range [-1,1]. +.TP +\fBasin(\fIarg\fB)\fR +Returns the arc sine of \fIarg\fR, in the range [-pi/2,pi/2] radians. +\fIArg\fR should be in the range [-1,1]. +.TP +\fBatan(\fIarg\fB)\fR +Returns the arc tangent of \fIarg\fR, in the range [-pi/2,pi/2] radians. +.TP +\fBatan2(\fIx, y\fB)\fR +Returns the arc tangent of \fIy\fR/\fIx\fR, in the range [-pi,pi] +radians. \fIx\fR and \fIy\fR cannot both be 0. +.TP +\fBceil(\fIarg\fB)\fR +Returns the smallest integer value not less than \fIarg\fR. +.TP +\fBcos(\fIarg\fB)\fR +Returns the cosine of \fIarg\fR, measured in radians. +.TP +\fBcosh(\fIarg\fB)\fR +Returns the hyperbolic cosine of \fIarg\fR. If the result would cause +an overflow, an error is returned. +.TP \fBdouble(\fIarg\fB)\fR If \fIarg\fR is a floating value, returns \fIarg\fR, otherwise converts \fIarg\fR to floating and returns the converted value. .TP +\fBexp(\fIarg\fB)\fR +Returns the exponential of \fIarg\fR, defined as e**\fIarg\fR. If the +result would cause an overflow, an error is returned. +.TP +\fBfloor(\fIarg\fB)\fR +Returns the largest integral value not greater than \fIarg\fR. +.TP +\fBfmod(\fIx, y\fB)\fR +Returns the floating-point remainder of the division of \fIx\fR by +\fIy\fR. If \fIy\fR is 0, an error is returned. +.TP +\fBhypot(\fIx, y\fB)\fR +Computes the length of the hypotenuse of a right-angled triangle +(\fIx\fR*\fIx\fR+\fIy\fR*\fIy\fR). +.TP \fBint(\fIarg\fB)\fR If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts \fIarg\fR to integer by truncation and returns the converted value. .TP +\fBlog(\fIarg\fB)\fR +Returns the natural logarithm of \fIarg\fR. \fIArg\fR must be a +positive value. +.TP +\fBlog10(\fIarg\fB)\fR +Returns the base 10 logarithm of \fIarg\fR. \fIArg\fR must be a +positive value. +.TP +\fBpow(\fIx, y\fB)\fR +Computes the value of \fIx\fR raised to the power \fIy\fR. If \fIx\fR +is negative, \fIy\fR must be an integer value. +.TP \fBrand()\fR Returns a floating point number from zero to just less than one or, in mathematical terms, the range [0,1). The seed comes from the @@ -218,10 +268,26 @@ function. If \fIarg\fR is an integer value, returns \fIarg\fR, otherwise converts \fIarg\fR to integer by rounding and returns the converted value. .TP +\fBsin(\fIarg\fB)\fR +Returns the sine of \fIarg\fR, measured in radians. +.TP +\fBsinh(\fIarg\fB)\fR +Returns the hyperbolic sine of \fIarg\fR. If the result would cause +an overflow, an error is returned. +.TP +\fBsqrt(\fIarg\fB)\fR +Returns the square root of \fIarg\fR. \fIArg\fR must be non-negative. +.TP \fBsrand(\fIarg\fB)\fR The \fIarg\fR, which must be an integer, is used to reset the seed for the random number generator. Returns the first random number from that seed. Each interpreter has it's own seed. +.TP +\fBtan(\fIarg\fB)\fR +Returns the tangent of \fIarg\fR, measured in radians. +.TP +\fBtanh(\fIarg\fB)\fR +Returns the hyperbolic tangent of \fIarg\fR. .PP In addition to these predefined functions, applications may define additional functions using \fBTcl_CreateMathFunc\fR(). @@ -282,11 +348,10 @@ the second operand is converted to the string \fB18\fR. Because of Tcl's tendency to treat values as numbers whenever possible, it isn't generally a good idea to use operators like \fB==\fR when you really want string comparison and the values of the -operands could be arbitrary; it's better in these cases to use the -\fBstring compare\fR command instead. +operands could be arbitrary; it's better in these cases to use +the \fBstring\fR command instead. .SH "PERFORMANCE CONSIDERATIONS" -.VS .PP Enclose expressions in braces for the best speed and the smallest storage requirements. @@ -317,7 +382,6 @@ The most expensive code is required for unbraced expressions that contain command substitutions. These expressions must be implemented by generating new code each time the expression is executed. -.VE .SH KEYWORDS arithmetic, boolean, compare, expression, fuzzy comparison diff --git a/doc/library.n b/doc/library.n index 5fde037..a4c9818 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,18 +5,20 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.11 2000/04/15 18:42:56 ericm Exp $ +'\" RCS: @(#) $Id: library.n,v 1.11.2.1 2000/08/07 21:29:39 hobbs Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS .SH NAME -library \- standard library of Tcl procedures +auto_execok, auto_import, auto_load, auto_mkindex, auto_mkindex_old, auto_qualify, auto_reset, tcl_findLibrary, parray, tcl_endOfWord, tcl_startOfNextWord, tcl_startOfPreviousWord, tcl_wordBreakAfter, tcl_wordBreakBefore \- standard library of Tcl procedures .SH SYNOPSIS .nf \fBauto_execok \fIcmd\fR +\fBauto_import \fIpattern\fR \fBauto_load \fIcmd\fR \fBauto_mkindex \fIdir pattern pattern ...\fR \fBauto_mkindex_old \fIdir pattern pattern ...\fR +\fBauto_qualify \fIcommand namespace\fR \fBauto_reset\fR \fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR \fBparray \fIarrayName\fR @@ -73,65 +75,61 @@ remembers information about previous searches in an array named same \fIcmd\fR. The command \fBauto_reset\fR may be used to force \fBauto_execok\fR to forget its cached information. .TP +\fBauto_import \fIpattern\fR +\fBAuto_import\fR is invoked during \fBnamespace import\fR to see if +the imported commands specified by \fIpattern\fR reside in an +autoloaded library. If so, the commands are loaded so that they will +be available to the interpreter for creating the import links. If the +commands do not reside in an autoloaded library, \fBauto_import\fR +does nothing. +.TP \fBauto_load \fIcmd\fR This command attempts to load the definition for a Tcl command named -\fIcmd\fR. -To do this, it searches an \fIauto-load path\fR, which is a list of -one or more directories. -The auto-load path is given by the global variable \fB$auto_path\fR -if it exists. -If there is no \fB$auto_path\fR variable, then the TCLLIBPATH environment -variable is used, if it exists. -Otherwise the auto-load path consists of just the Tcl library directory. -Within each directory in the auto-load path there must be a file -\fBtclIndex\fR that describes one -or more commands defined in that directory -and a script to evaluate to load each of the commands. -The \fBtclIndex\fR file should be generated with the -\fBauto_mkindex\fR command. -If \fIcmd\fR is found in an index file, then the appropriate -script is evaluated to create the command. -The \fBauto_load\fR command returns 1 if \fIcmd\fR was successfully -created. -The command returns 0 if there was no index entry for \fIcmd\fR -or if the script didn't actually define \fIcmd\fR (e.g. because -index information is out of date). -If an error occurs while processing the script, then that error -is returned. -\fBAuto_load\fR only reads the index information once and saves it -in the array \fBauto_index\fR; future calls to \fBauto_load\fR -check for \fIcmd\fR in the array rather than re-reading the index -files. -The cached index information may be deleted with the command -\fBauto_reset\fR. -This will force the next \fBauto_load\fR command to reload the -index database from disk. +\fIcmd\fR. To do this, it searches an \fIauto-load path\fR, which is +a list of one or more directories. The auto-load path is given by the +global variable \fB$auto_path\fR if it exists. If there is no +\fB$auto_path\fR variable, then the TCLLIBPATH environment variable is +used, if it exists. Otherwise the auto-load path consists of just the +Tcl library directory. Within each directory in the auto-load path +there must be a file \fBtclIndex\fR that describes one or more +commands defined in that directory and a script to evaluate to load +each of the commands. The \fBtclIndex\fR file should be generated +with the \fBauto_mkindex\fR command. If \fIcmd\fR is found in an +index file, then the appropriate script is evaluated to create the +command. The \fBauto_load\fR command returns 1 if \fIcmd\fR was +successfully created. The command returns 0 if there was no index +entry for \fIcmd\fR or if the script didn't actually define \fIcmd\fR +(e.g. because index information is out of date). If an error occurs +while processing the script, then that error is returned. +\fBAuto_load\fR only reads the index information once and saves it in +the array \fBauto_index\fR; future calls to \fBauto_load\fR check for +\fIcmd\fR in the array rather than re-reading the index files. The +cached index information may be deleted with the command +\fBauto_reset\fR. This will force the next \fBauto_load\fR command to +reload the index database from disk. .TP \fBauto_mkindex \fIdir pattern pattern ...\fR -Generates an index suitable for use by \fBauto_load\fR. -The command searches \fIdir\fR for all files whose names match -any of the \fIpattern\fR arguments -(matching is done with the \fBglob\fR command), -generates an index of all the Tcl command -procedures defined in all the matching files, and stores the -index information in a file named \fBtclIndex\fR in \fIdir\fR. -If no pattern is given a pattern of \fB*.tcl\fR will be assumed. -For example, the command +Generates an index suitable for use by \fBauto_load\fR. The command +searches \fIdir\fR for all files whose names match any of the +\fIpattern\fR arguments (matching is done with the \fBglob\fR +command), generates an index of all the Tcl command procedures defined +in all the matching files, and stores the index information in a file +named \fBtclIndex\fR in \fIdir\fR. If no pattern is given a pattern of +\fB*.tcl\fR will be assumed. For example, the command .RS .CS \fBauto_mkindex foo *.tcl\fR .CE .LP -will read all the \fB.tcl\fR files in subdirectory \fBfoo\fR -and generate a new index file \fBfoo/tclIndex\fR. +will read all the \fB.tcl\fR files in subdirectory \fBfoo\fR and +generate a new index file \fBfoo/tclIndex\fR. .PP -\fBAuto_mkindex\fR parses the Tcl scripts by sourcing them -into a slave interpreter and monitoring the proc and -namespace commands that are executed. -Extensions can use the (undocumented) -auto_mkindex_parser package to register other commands that -can contribute to the auto_load index. -You will have to read through auto.tcl to see how this works. +\fBAuto_mkindex\fR parses the Tcl scripts by sourcing them into a +slave interpreter and monitoring the proc and namespace commands that +are executed. Extensions can use the (undocumented) +auto_mkindex_parser package to register other commands that can +contribute to the auto_load index. You will have to read through +auto.tcl to see how this works. .PP \fBAuto_mkindex_old\fR parses the Tcl scripts in a relatively unsophisticated way: if any line contains the word \fBproc\fR @@ -147,12 +145,29 @@ code or procedure names with special characters like \fB$\fR, .TP \fBauto_reset\fR Destroys all the information cached by \fBauto_execok\fR and -\fBauto_load\fR. -This information will be re-read from disk the next time it is -needed. -\fBAuto_reset\fR also deletes any procedures listed in the auto-load -index, so that fresh copies of them will be loaded the next time -that they're used. +\fBauto_load\fR. This information will be re-read from disk the next +time it is needed. \fBAuto_reset\fR also deletes any procedures +listed in the auto-load index, so that fresh copies of them will be +loaded the next time that they're used. +.TP +\fBauto_qualify \fIcommand namespace\fR +Computes a list of fully qualified names for \fIcommand\fR. This list +mirrors the path a standard Tcl interpreter follows for command +lookups: first it looks for the command in the current namespace, and +then in the global namespace. Accordingly, if \fIcommand\fR is +relative and \fInamespace\fR is not \fB::\fR, the list returned has +two elements: \fIcommand\fR scoped by \fInamespace\fR, as if it were +a command in the \fInamespace\fR namespace; and \fIcommand\fR as if it +were a command in the global namespace. Otherwise, if either +\fIcommand\fR is absolute (it begins with \fB::\fR), or +\fInamespace\fR is \fB::\fR, the list contains only \fIcommand\fR as +if it were a command in the global namespace. +.RS +.PP +\fBAuto_qualify\fR is used by the auto-loading facilities in Tcl, both +for producing auto-loading indexes such as \fIpkgIndex.tcl\fR, and for +performing the actual auto-loading of functions at runtime. +.RE .TP \fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR This is a standard search procedure for use by extensions during diff --git a/doc/package.n b/doc/package.n index f4d9f84..a8f8a18 100644 --- a/doc/package.n +++ b/doc/package.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: package.n,v 1.3 1999/03/10 05:52:45 stanton Exp $ +'\" RCS: @(#) $Id: package.n,v 1.3.14.1 2000/08/07 21:29:39 hobbs Exp $ '\" .so man.macros .TH package n 7.5 Tcl "Tcl Built-In Commands" @@ -14,7 +14,7 @@ package \- Facilities for package loading and version control .SH SYNOPSIS .nf -\fBpackage forget \fIpackage\fR +\fBpackage forget ?\fIpackage package ...\fR? \fBpackage ifneeded \fIpackage version\fR ?\fIscript\fR? \fBpackage names\fR \fBpackage present \fR?\fB\-exact\fR? \fIpackage \fR?\fIversion\fR? @@ -43,8 +43,8 @@ primarily by system scripts that maintain the package database. The behavior of the \fBpackage\fR command is determined by its first argument. The following forms are permitted: .TP -\fBpackage forget \fIpackage\fR -Removes all information about \fIpackage\fR from this interpreter, +\fBpackage forget ?\fIpackage package ...\fR? +Removes all information about each specified package from this interpreter, including information provided by both \fBpackage ifneeded\fR and \fBpackage provide\fR. .TP diff --git a/doc/regsub.n b/doc/regsub.n index b895bdb..502cb1b 100644 --- a/doc/regsub.n +++ b/doc/regsub.n @@ -1,11 +1,12 @@ '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. +'\" Copyright (c) 2000 Scriptics Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: regsub.n,v 1.4 1999/09/21 04:20:36 hobbs Exp $ +'\" RCS: @(#) $Id: regsub.n,v 1.4.2.1 2000/08/07 21:29:39 hobbs Exp $ '\" .so man.macros .TH regsub n 8.3 Tcl "Tcl Built-In Commands" @@ -55,6 +56,31 @@ matching range is found and substituted. If \fB\-all\fR is specified, then ``&'' and ``\e\fIn\fR'' sequences are handled for each substitution using the information from the corresponding match. +.TP 15 +\fB\-expanded\fR +Enables use of the expanded regular expression syntax where +whitespace and comments are ignored. This is the same as specifying +the \fB(?x)\fR embedded option (see METASYNTAX, below). +.TP 15 +\fB\-line\fR +Enables newline-sensitive matching. By default, newline is a +completely ordinary character with no special meaning. With this +flag, `[^' bracket expressions and `.' never match newline, `^' +matches an empty string after any newline in addition to its normal +function, and `$' matches an empty string before any newline in +addition to its normal function. This flag is equivalent to +specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the +\fB(?n)\fR embedded option (see METASYNTAX, below). +.TP 15 +\fB\-linestop\fR +Changes the behavior of `[^' bracket expressions and `.' so that they +stop at newlines. This is the same as specifying the \fB(?p)\fR +embedded option (see METASYNTAX, below). +.TP 15 +\fB\-lineanchor\fR +Changes the behavior of `^' and `$' (the ``anchors'') so they match the +beginning and end of a line respectively. This is the same as +specifying the \fB(?w)\fR embedded option (see METASYNTAX, below). .TP 10 \fB\-nocase\fR Upper-case characters in \fIstring\fR will be converted to lower-case @@ -66,9 +92,7 @@ by \fIsubSpec\fR use the original unconverted form of \fIstring\fR. Specifies a character index offset into the string to start matching the regular expression at. When using this switch, `^' will not match the beginning of the line, and \\A will still -match the start of the string at \fIindex\fR. If \fB\-indices\fR -is specified, the indices will be indexed starting from the -absolute beginning of the input string. +match the start of the string at \fIindex\fR. \fIindex\fR will be constrained to the bounds of the input string. .VE 8.3 .TP 10 @@ -1,11 +1,12 @@ '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. +'\" Copyright (c) 2000 Scriptics Corporation. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: scan.n,v 1.4.2.1 2000/06/14 01:38:00 hershey Exp $ +'\" RCS: @(#) $Id: scan.n,v 1.4.2.2 2000/08/07 21:29:39 hobbs Exp $ '\" .so man.macros .TH scan n 8.3 Tcl "Tcl Built-In Commands" @@ -14,7 +15,7 @@ .SH NAME scan \- Parse string using conversion specifiers in the style of sscanf .SH SYNOPSIS -\fBscan \fIstring format \fR?\fIvarName ...\fR? +\fBscan \fIstring format \fR?\fIvarName varName ...\fR? .BE .SH INTRODUCTION |