summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurles <surles>1999-04-13 00:01:57 (GMT)
committersurles <surles>1999-04-13 00:01:57 (GMT)
commit8154c5ccc5a356564c0bc608e9d84d753c2d81ee (patch)
tree9819c295fee1ceb052095325ece999dcb08b65c1
parente7b2c1f8d38c0581ee9d0ceae511c2a8aeeca9ce (diff)
downloadtcl-8154c5ccc5a356564c0bc608e9d84d753c2d81ee.zip
tcl-8154c5ccc5a356564c0bc608e9d84d753c2d81ee.tar.gz
tcl-8154c5ccc5a356564c0bc608e9d84d753c2d81ee.tar.bz2
Doc bug fixes: Docs about APIs that dont exist were removed.
Added example to catch that demos compile errors
-rw-r--r--doc/CrtChannel.319
-rw-r--r--doc/CrtObjCmd.34
-rw-r--r--doc/Encoding.312
-rw-r--r--doc/Object.34
-rw-r--r--doc/SetRecLmt.34
-rw-r--r--doc/catch.n26
6 files changed, 39 insertions, 30 deletions
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index 1d284ef..07e0596 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.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: CrtChannel.3,v 1.1.2.2 1998/09/24 23:58:20 stanton Exp $
+'\" RCS: @(#) $Id: CrtChannel.3,v 1.1.2.3 1999/04/13 00:01:57 surles Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.0 Tcl "Tcl Library Procedures"
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
-Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetDefaultTranslation, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption \- procedures for creating and manipulating channels
+Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption \- procedures for creating and manipulating channels
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -33,11 +33,6 @@ int
.VE
.sp
int
-\fBTcl_GetChannelFlags\fR(\fIchannel\fR)
-.sp
-\fBTcl_SetDefaultTranslation\fR(\fIchannel, transMode\fR)
-.sp
-int
\fBTcl_GetChannelBufferSize\fR(\fIchannel\fR)
.sp
\fBTcl_SetChannelBufferSize\fR(\fIchannel, size\fR)
@@ -170,13 +165,7 @@ for each driver to determine what type of handle is returned.
and \fBTCL_WRITABLE\fR, indicating whether the channel is open for input
and output.
.PP
-\fBTcl_SetDefaultTranslation\fR sets the default end of line translation
-mode. This mode will be installed as the translation mode for the channel
-if an attempt is made to output on the channel while it is still in
-\fBTCL_TRANSLATE_AUTO\fR mode. For a description of end of line translation
-modes, see the manual entry for \fBfconfigure\fR.
-.PP
-\fBTcl_GetChannelBufferSize\fR returns the size, in bytes, of buffers
+ \fBTcl_GetChannelBufferSize\fR returns the size, in bytes, of buffers
allocated to store input or output in \fIchan\fR. If the value was not set
by a previous call to \fBTcl_SetChannelBufferSize\fR, described below, then
the default value of 4096 is returned.
@@ -414,7 +403,7 @@ typedef int Tcl_DriverSeekProc(
.PP
The \fIinstanceData\fR argument is the same as the value given to
\fBTcl_CreateChannel\fR when this channel was created. \fIOffset\fR and
-\fIseekMode\fR have the same meaning as for the \fBTcl_SeekChannel\fR
+\fIseekMode\fR have the same meaning as for the \fBTcl_Seek\fR
procedure (described in the manual entry for \fBTcl_OpenFileChannel\fR).
.PP
The \fIerrorCodePtr\fR argument points to an integer variable provided by
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index a75dc22..45d35ea 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.1.2.2 1998/09/24 23:58:22 stanton Exp $
+'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.1.2.3 1999/04/13 00:01:57 surles Exp $
'\"
.so man.macros
.TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures"
@@ -103,7 +103,7 @@ cause memory to be lost and the runtime stack to be corrupted. The
compilers to report any such attempted assignment as an error. However,
it is acceptable to modify the internal representation of any individual
object argument. For instance, the user may call
-\fBTcl_GetIntFromObject\fR on \fIobjv\fR[\fB2\fR] to obtain the integer
+\fBTcl_GetIntFromObj\fR on \fIobjv\fR[\fB2\fR] to obtain the integer
representation of that object; that call may change the type of the object
that \fIobjv\fR[\fB2\fR] points at, but will not change where
\fIobjv\fR[\fB2\fR] points.
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index 2aa3509..72a004a 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -4,13 +4,17 @@
'\" 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.1.2.4 1999/03/12 23:47:00 surles Exp $
+'\" RCS: @(#) $Id: Encoding.3,v 1.1.2.5 1999/04/13 00:01:57 surles 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 \- procedures for creating and using encodings.
+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.
+
+
+
+
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -238,13 +242,13 @@ TCL_OK.
\fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list
consisting of the names of all the encodings that are currently defined
or can be dynamically loaded, searching the encoding path specified by
-\fBTcl_SetEncodingPath\fR. This procedure does not ensure that the
+\fBTcl_SetDefaultEncodingDir\fR. This procedure does not ensure that the
dynamically-loadable encoding files contain valid data, but merely that they
exist.
.PP
\fBTcl_CreateEncoding\fR defines a new encoding and registers the C
procedures that are called back to convert between the encoding and
-UTF-8. Encodings created by \fBTcl_CreateEncodingType\fR are thereafter
+UTF-8. Encodings created by \fBTcl_CreateEncoding\fR are thereafter
visible in the database used by \fBTcl_GetEncoding\fR. Just as with the
\fBTcl_GetEncoding\fR procedure, the return value is a token that
represents the encoding and can be used in subsequent calls to other
diff --git a/doc/Object.3 b/doc/Object.3
index b537638..5193a8b 100644
--- a/doc/Object.3
+++ b/doc/Object.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: Object.3,v 1.1.2.2 1998/09/24 23:58:25 stanton Exp $
+'\" RCS: @(#) $Id: Object.3,v 1.1.2.3 1999/04/13 00:01:58 surles Exp $
'\"
.so man.macros
.TH Tcl_Obj 3 8.0 Tcl "Tcl Library Procedures"
@@ -209,7 +209,7 @@ free any storage associated with the old string representation.
Objects usually remain one type over their life,
but occasionally an object must be converted from one type to another.
For example, a C program might build up a string in an object
-with repeated calls to \fBTcl_StringObjAppend\fR,
+with repeated calls to \fBTcl_ObjAppend\fR,
and then call \fBTcl_ListObjIndex\fR to extract a list element from
the object.
The same object holding the same string value
diff --git a/doc/SetRecLmt.3 b/doc/SetRecLmt.3
index a1f7ed0..0157a62 100644
--- a/doc/SetRecLmt.3
+++ b/doc/SetRecLmt.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: SetRecLmt.3,v 1.1.2.1 1998/09/24 23:58:26 stanton Exp $
+'\" RCS: @(#) $Id: SetRecLmt.3,v 1.1.2.2 1999/04/13 00:01:59 surles Exp $
'\"
.so man.macros
.TH Tcl_SetRecursionLimit 3 7.0 Tcl "Tcl Library Procedures"
@@ -41,7 +41,7 @@ allowable nesting depth for an interpreter.
The \fIdepth\fR argument specifies a new limit for \fIinterp\fR,
and \fBTcl_SetRecursionLimit\fR returns the old limit.
To read out the old limit without modifying it, invoke
-\fBTcl_SetRecursionDepth\fR with \fIdepth\fR equal to 0.
+\fBTcl_SetRecursionLimit\fR with \fIdepth\fR equal to 0.
.PP
The \fBTcl_SetRecursionLimit\fR only sets the size of the Tcl
call stack: it cannot by itself prevent stack overflows on the
diff --git a/doc/catch.n b/doc/catch.n
index 3883b84..6869fab 100644
--- a/doc/catch.n
+++ b/doc/catch.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: catch.n,v 1.1.2.2 1998/11/09 22:52:44 stanton Exp $
+'\" RCS: @(#) $Id: catch.n,v 1.1.2.3 1999/04/13 00:01:59 surles Exp $
'\"
.so man.macros
.TH catch n "8.0" Tcl "Tcl Built-In Commands"
@@ -34,12 +34,17 @@ If \fIscript\fR does not raise an error, \fBcatch\fR will return 0
(TCL_OK) and set the variable to the value returned from \fIscript\fR.
.PP
Note that \fBcatch\fR catches all exceptions, including those
-generated by \fBbreak\fR and \fBcontinue\fR as well as errors.
+generated by \fBbreak\fR and \fBcontinue\fR as well as errors. The
+only errors that are not caught are syntax errors found when the
+script is compiled. This is because the catch command only catches
+errors during runtime. When the catch statement is compiled, the
+script is compiled as well and any syntax errors will generate a Tcl
+error.
-.SH EXAMPLE
+.SH EXAMPLES
-\fBcatch\fR may be used in an \fBif\fR to branch based on the success
-of a script.
+The \fBcatch\fR command may be used in an \fBif\fR to branch based on
+the success of a script.
.DS
.CS
@@ -49,6 +54,17 @@ if { [catch {open $someFile w} fid] } {
}
.CE
.DE
+The \fBcatch\fR command will not catch compiled syntax errors. The
+first time proc \fBfoo\fR is called, the body will be compiled and a
+Tcl error will be generated.
+
+.DS
+.CS
+proc foo {} {
+ catch {expr {1 +- }}
+}
+.CE
+.DE
.SH KEYWORDS
catch, error