summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-04-24 23:52:40 (GMT)
committerericm <ericm>2000-04-24 23:52:40 (GMT)
commitb4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2 (patch)
treeb1e94254846affa409d1d99d84fe9b8982895452
parente38c8fdd49d388071ea563f8a0a8fada898eefd9 (diff)
downloadtcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.zip
tcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.tar.gz
tcl-b4522af1fcae31bff2fa2c4aa8a8d15e030fa8e2.tar.bz2
* unix/mkLinks:
* doc/ParseCmd.3: Added documentation for Tcl_ParseVar [Bug: 1828].
-rw-r--r--ChangeLog10
-rw-r--r--doc/ParseCmd.324
-rw-r--r--unix/mkLinks4
3 files changed, 32 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 5315917..2cd9998 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-24 Eric Melski <ericm@scriptics.com>
+
+ * unix/mkLinks:
+ * doc/ParseCmd.3: Added documentation for Tcl_ParseVar [Bug: 1828].
+
2000-04-24 Jeff Hobbs <hobbs@scriptics.com>
* unix/tclUnixNotfy.c (Tcl_FinalizeNotifier, NotifierThreadProc):
@@ -158,6 +163,11 @@
* doc/dde.n: corrected dde poke docs. [Bug: 4991]
+2000-04-11 Eric Melski <ericm@scriptics.com>
+
+ * win/tclWinPipe.c: Added "CONST" keyword to declaration of char
+ *native in TclpCreateTempFile, to supress compiler warnings.
+
2000-04-10 Brent Welch <welch@scriptics.com>
* generic/tcl.h: Fixed Tcl_CreateThread declaration.
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 61759bb..4e9e81b 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.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: ParseCmd.3,v 1.3 1999/08/21 19:40:47 hobbs Exp $
+'\" RCS: @(#) $Id: ParseCmd.3,v 1.4 2000/04/24 23:53:03 ericm Exp $
'\"
.so man.macros
-.TH Tcl_ParseCommand 3 8.1 Tcl "Tcl Library Procedures"
+.TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures"
.BS
.SH NAME
-Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_FreeParse, Tcl_EvalTokens \- parse Tcl scripts and expressions
+Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokens \- parse Tcl scripts and expressions
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -30,6 +30,9 @@ int
int
\fBTcl_ParseVarName\fR(\fIinterp, string, numBytes, parsePtr, append\fR)
.sp
+char *
+\fBTcl_ParseVar\fR(\fIinterp, string, termPtr\fR)
+.sp
\fBTcl_FreeParse\fR(\fIusedParsePtr\fR)
.sp
Tcl_Obj *
@@ -66,9 +69,10 @@ is ignored, unless \fIappend\fR is non-zero in a call to
or \fBTcl_ParseVarName\fR.
.AP char **termPtr out
If not NULL, points to a location where
-\fBTcl_ParseBraces\fR and \fBTcl_ParseQuotedString\fR
-will store a pointer to the character
-just after the terminating close-brace or close-quote (respectively)
+\fBTcl_ParseBraces\fR, \fBTcl_ParseQuotedString\fR, and
+\fBTcl_ParseVar\fR will store a pointer to the character
+just after the terminating character (the close-brace, the last
+character of the variable name, or the close-quote (respectively))
if the parse was successful.
.AP Tcl_Parse *usedParsePtr in
Points to structure that was filled in by a previous call to
@@ -154,6 +158,14 @@ occurrs while parsing the command then \fBTCL_ERROR\fR is returned, an
error message is left in \fIinterp\fR's result (if \fIinterp\fR isn't
NULL), and no information is left at \fI*parsePtr\fR.
.PP
+\fBTcl_ParseVar\fR parse a Tcl variable reference such as \fB$abc\fR
+or \fB$x([expr $index + 1])\fR from the beginning of its \fIstring\fR
+argument. The first character of \fIstring\fR must be \fB$\fR. If
+the variable name is parsed successfully, \fBTcl_ParseVar\fR returns a
+pointer to the string value of the variable. If an error occurs while
+parsing, then NULL is returned and an error message is left in
+\fIinterp\fR's result.
+.PP
The information left at \fI*parsePtr\fR
by \fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR
diff --git a/unix/mkLinks b/unix/mkLinks
index a16bdcb..d9d9287 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -859,6 +859,10 @@ if test -r ParseCmd.3; then
rm -f Tcl_ParseVarName.3
ln ParseCmd.3 Tcl_ParseVarName.3
fi
+if test -r ParseCmd.3; then
+ rm -f Tcl_ParseVar.3
+ ln ParseCmd.3 Tcl_ParseVar.3
+fi
if test -r PkgRequire.3; then
rm -f Tcl_PkgProvide.3
ln PkgRequire.3 Tcl_PkgProvide.3