summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog16
-rw-r--r--doc/DString.318
-rw-r--r--doc/Environment.312
-rw-r--r--doc/Eval.36
-rw-r--r--doc/ExprLong.322
-rw-r--r--doc/ExprLongObj.34
-rw-r--r--doc/GetInt.338
-rw-r--r--doc/GetOpnFl.310
-rw-r--r--doc/ParseCmd.340
-rw-r--r--doc/RegExp.339
-rw-r--r--doc/SetResult.343
-rw-r--r--doc/StrMatch.38
-rw-r--r--doc/Utf.349
-rw-r--r--generic/tcl.decls76
-rw-r--r--generic/tclBasic.c46
-rw-r--r--generic/tclDecls.h145
-rw-r--r--generic/tclEnv.c10
-rw-r--r--generic/tclGet.c50
-rw-r--r--generic/tclParse.c70
-rw-r--r--generic/tclParseExpr.c22
-rw-r--r--generic/tclRegexp.c47
-rw-r--r--generic/tclResult.c28
-rw-r--r--generic/tclUtf.c322
-rw-r--r--generic/tclUtil.c76
-rw-r--r--unix/tclUnixChan.c16
25 files changed, 617 insertions, 596 deletions
diff --git a/ChangeLog b/ChangeLog
index 76777c6..3595517 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,24 @@
+2005-05-03 Don Porter <dgp@users.sourceforge.net>
+
+ * doc/DString.3: Eliminated use of identifier "string" in Tcl's
+ * doc/Environment.3: public C API to avoid conflict/confusion with
+ * doc/Eval.3: the std::string of C++.
+ * doc/ExprLong.3, doc/ExprLongObj.3, doc/GetInt.3, doc/GetOpnFl.3:
+ * doc/ParseCmd.3, doc/RegExp.3, doc/SetResult.3, doc/StrMatch.3:
+ * doc/Utf.3, generic/tcl.decls, generic/tclBasic.c, generic/tclEnv.c:
+ * generic/tclGet.c, generic/tclParse.c, generic/tclParseExpr.c:
+ * generic/tclRegexp.c, generic/tclResult.c, generic/tclUtf.c:
+ * generic/tclUtil.c, unix/tclUnixChan.c:
+
+ * generic/tclDecls.h: `make genstubs`
+
2005-05-02 Don Porter <dgp@users.sourceforge.net>
* generic/tcl.decls:
* generic/tclBasic.c: Simplified implementation of Tcl_ExprString.
* tests/expr-old.test:
- * generic/tclDecls.h: `make gentstubs`
+ * generic/tclDecls.h: `make genstubs`
2005-04-30 Daniel Steffen <das@users.sourceforge.net>
diff --git a/doc/DString.3 b/doc/DString.3
index e5d5e33..5caa3ee 100644
--- a/doc/DString.3
+++ b/doc/DString.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: DString.3,v 1.11 2004/10/07 15:15:36 dkf Exp $
+'\" RCS: @(#) $Id: DString.3,v 1.12 2005/05/03 18:07:41 dgp Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
@@ -19,10 +19,10 @@ Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSu
\fBTcl_DStringInit\fR(\fIdsPtr\fR)
.sp
char *
-\fBTcl_DStringAppend\fR(\fIdsPtr, string, length\fR)
+\fBTcl_DStringAppend\fR(\fIdsPtr, bytes, length\fR)
.sp
char *
-\fBTcl_DStringAppendElement\fR(\fIdsPtr, string\fR)
+\fBTcl_DStringAppendElement\fR(\fIdsPtr, element\fR)
.sp
\fBTcl_DStringStartSublist\fR(\fIdsPtr\fR)
.sp
@@ -47,10 +47,12 @@ char *
.AS Tcl_DString newLength in/out
.AP Tcl_DString *dsPtr in/out
Pointer to structure that is used to manage a dynamic string.
-.AP "const char" *string in
-Pointer to characters to add to dynamic string.
+.AP "const char" *bytes in
+Pointer to characters to append to dynamic string.
+.AP "const char" *element in
+Pointer to characters to append as list element to dynamic string.
.AP int length in
-Number of characters from string to add to dynamic string. If -1,
+Number of bytes from \fIbytes\fR to add to dynamic string. If -1,
add all characters up to null terminating character.
.AP int newLength in
New length for dynamic string, not including null terminating
@@ -77,7 +79,7 @@ string.
.PP
\fBTcl_DStringAppend\fR adds new information to a dynamic string,
allocating more memory for the string if needed.
-If \fIlength\fR is less than zero then everything in \fIstring\fR
+If \fIlength\fR is less than zero then everything in \fIbytes\fR
is appended to the dynamic string; otherwise \fIlength\fR
specifies the number of bytes to append.
\fBTcl_DStringAppend\fR returns a pointer to the characters of
@@ -86,7 +88,7 @@ the new string. The string can also be retrieved from the
.PP
\fBTcl_DStringAppendElement\fR is similar to \fBTcl_DStringAppend\fR
except that it doesn't take a \fIlength\fR argument (it appends
-all of \fIstring\fR) and it converts the string to a proper list element
+all of \fIelement\fR) and it converts the string to a proper list element
before appending.
\fBTcl_DStringAppendElement\fR adds a separator space before the
new list element unless the new list element is the first in a
diff --git a/doc/Environment.3 b/doc/Environment.3
index 93df3c2..e11f32d 100644
--- a/doc/Environment.3
+++ b/doc/Environment.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: Environment.3,v 1.4 2004/10/07 15:15:37 dkf Exp $
+'\" RCS: @(#) $Id: Environment.3,v 1.5 2005/05/03 18:07:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_PutEnv 3 "7.5" Tcl "Tcl Library Procedures"
@@ -16,12 +16,12 @@ Tcl_PutEnv \- procedures to manipulate the environment
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_PutEnv\fR(\fIstring\fR)
+\fBTcl_PutEnv\fR(\fIassignment\fR)
.SH ARGUMENTS
-.AS "const char" *string
-.AP "const char" *string in
-Info about environment variable in the form NAME=value. The string is
-in native format.
+.AS "const char" *assignment
+.AP "const char" *assignnment in
+Info about environment variable in the format NAME=value.
+The \fIassignment\fR argument is in the system encoding.
.BE
.SH DESCRIPTION
diff --git a/doc/Eval.3 b/doc/Eval.3
index 55a3f3f..f83b9da 100644
--- a/doc/Eval.3
+++ b/doc/Eval.3
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Eval.3,v 1.19 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: Eval.3,v 1.20 2005/05/03 18:07:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_Eval 3 8.1 Tcl "Tcl Library Procedures"
@@ -39,7 +39,7 @@ int
\fBTcl_GlobalEvalObj\fR(\fIinterp, objPtr\fR)
.sp
int
-\fBTcl_VarEval\fR(\fIinterp, string, string, ... \fB(char *) NULL\fR)
+\fBTcl_VarEval\fR(\fIinterp, part, part, ... \fB(char *) NULL\fR)
.sp
int
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
@@ -67,7 +67,7 @@ null terminating character. If \-1, then all characters up to the
first null byte are used.
.AP "const char" *script in
Points to first byte of script to execute (null-terminated and UTF-8).
-.AP char *string in
+.AP char *part in
String forming part of a Tcl script.
.AP va_list argList in
An argument list which must have been initialized using
diff --git a/doc/ExprLong.3 b/doc/ExprLong.3
index bb00edf..9199dd7 100644
--- a/doc/ExprLong.3
+++ b/doc/ExprLong.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: ExprLong.3,v 1.9 2004/10/07 16:05:13 dkf Exp $
+'\" RCS: @(#) $Id: ExprLong.3,v 1.10 2005/05/03 18:07:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_ExprLong 3 7.0 Tcl "Tcl Library Procedures"
@@ -17,21 +17,21 @@ Tcl_ExprLong, Tcl_ExprDouble, Tcl_ExprBoolean, Tcl_ExprString \- evaluate an exp
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_ExprLong\fR(\fIinterp, string, longPtr\fR)
+\fBTcl_ExprLong\fR(\fIinterp, expr, longPtr\fR)
.sp
int
-\fBTcl_ExprDouble\fR(\fIinterp, string, doublePtr\fR)
+\fBTcl_ExprDouble\fR(\fIinterp, expr, doublePtr\fR)
.sp
int
-\fBTcl_ExprBoolean\fR(\fIinterp, string, booleanPtr\fR)
+\fBTcl_ExprBoolean\fR(\fIinterp, expr, booleanPtr\fR)
.sp
int
-\fBTcl_ExprString\fR(\fIinterp, string\fR)
+\fBTcl_ExprString\fR(\fIinterp, expr\fR)
.SH ARGUMENTS
.AS Tcl_Interp *booleanPtr out
.AP Tcl_Interp *interp in
-Interpreter in whose context to evaluate \fIstring\fR or \fIobjPtr\fR.
-.AP "const char" *string in
+Interpreter in whose context to evaluate \fIexpr\fR.
+.AP "const char" *expr in
Expression to be evaluated.
.AP long *longPtr out
Pointer to location in which to store the integer value of the
@@ -47,7 +47,7 @@ expression.
.SH DESCRIPTION
.PP
These four procedures all evaluate the expression
-given by the \fIstring\fR argument
+given by the \fIexpr\fR argument
and return the result in one of four different forms.
The expression can have any of the forms accepted by the \fBexpr\fR command.
Note that these procedures have been largely replaced by the
@@ -96,12 +96,6 @@ such as ``yes'' or ``no'', or else an error occurs.
.PP
\fBTcl_ExprString\fR returns the value of the expression as a
string stored in the interpreter's result.
-If the expression's actual value is an integer
-then \fBTcl_ExprString\fR converts it to a string using \fBsprintf\fR
-with a ``%d'' converter.
-If the expression's actual value is a floating-point
-number, then \fBTcl_ExprString\fR calls \fBTcl_PrintDouble\fR
-to convert it to a string.
.SH "SEE ALSO"
Tcl_ExprLongObj, Tcl_ExprDoubleObj, Tcl_ExprBooleanObj, Tcl_ExprObj
diff --git a/doc/ExprLongObj.3 b/doc/ExprLongObj.3
index 5892b4c..b7a2caa 100644
--- a/doc/ExprLongObj.3
+++ b/doc/ExprLongObj.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: ExprLongObj.3,v 1.3 2001/09/03 09:38:50 dkf Exp $
+'\" RCS: @(#) $Id: ExprLongObj.3,v 1.4 2005/05/03 18:07:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_ExprLongObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -29,7 +29,7 @@ int
.SH ARGUMENTS
.AS Tcl_Interp **resultPtrPtr out
.AP Tcl_Interp *interp in
-Interpreter in whose context to evaluate \fIstring\fR or \fIobjPtr\fR.
+Interpreter in whose context to evaluate \fIobjPtr\fR.
.AP Tcl_Obj *objPtr in
Pointer to an object containing the expression to evaluate.
.AP long *longPtr out
diff --git a/doc/GetInt.3 b/doc/GetInt.3
index 573a596..e33eac6 100644
--- a/doc/GetInt.3
+++ b/doc/GetInt.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: GetInt.3,v 1.8 2005/04/21 14:23:48 dgp Exp $
+'\" RCS: @(#) $Id: GetInt.3,v 1.9 2005/05/03 18:07:42 dgp Exp $
'\"
.so man.macros
.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures"
@@ -17,51 +17,51 @@ Tcl_GetInt, Tcl_GetDouble, Tcl_GetBoolean \- convert from string to integer, dou
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_GetInt\fR(\fIinterp, str, intPtr\fR)
+\fBTcl_GetInt\fR(\fIinterp, src, intPtr\fR)
.sp
int
-\fBTcl_GetDouble\fR(\fIinterp, str, doublePtr\fR)
+\fBTcl_GetDouble\fR(\fIinterp, src, doublePtr\fR)
.sp
int
-\fBTcl_GetBoolean\fR(\fIinterp, str, boolPtr\fR)
+\fBTcl_GetBoolean\fR(\fIinterp, src, boolPtr\fR)
.SH ARGUMENTS
.AS Tcl_Interp *doublePtr out
.AP Tcl_Interp *interp in
Interpreter to use for error reporting.
-.AP "const char" *str in
+.AP "const char" *src in
Textual value to be converted.
.AP int *intPtr out
-Points to place to store integer value converted from \fIstr\fR.
+Points to place to store integer value converted from \fIsrc\fR.
.AP double *doublePtr out
Points to place to store double-precision floating-point
-value converted from \fIstr\fR.
+value converted from \fIsrc\fR.
.AP int *boolPtr out
-Points to place to store boolean value (0 or 1) converted from \fIstr\fR.
+Points to place to store boolean value (0 or 1) converted from \fIsrc\fR.
.BE
.SH DESCRIPTION
.PP
These procedures convert from strings to integers or double-precision
floating-point values or booleans (represented as 0- or 1-valued
-integers). Each of the procedures takes a \fIstr\fR argument,
+integers). Each of the procedures takes a \fIsrc\fR argument,
converts it to an internal form of a particular type, and stores
the converted value at the location indicated by the procedure's
third argument. If all goes well, each of the procedures returns
-\fBTCL_OK\fR. If \fIstr\fR doesn't have the proper syntax for the
+\fBTCL_OK\fR. If \fIsrc\fR doesn't have the proper syntax for the
desired type then \fBTCL_ERROR\fR is returned, an error message is left
in the interpreter's result, and nothing is stored at *\fIintPtr\fR
or *\fIdoublePtr\fR or *\fIboolPtr\fR.
.PP
-\fBTcl_GetInt\fR expects \fIstr\fR to consist of a collection
+\fBTcl_GetInt\fR expects \fIsrc\fR to consist of a collection
of integer digits, optionally signed and optionally preceded by
-white space. If the first two characters of \fIstr\fR
+white space. If the first two characters of \fIsrc\fR
after the optional white space and sign are ``0x''
-then \fIstr\fR is expected to be in hexadecimal form; otherwise,
-if the first such character is ``0'' then \fIstr\fR
-is expected to be in octal form; otherwise, \fIstr\fR is
+then \fIsrc\fR is expected to be in hexadecimal form; otherwise,
+if the first such character is ``0'' then \fIsrc\fR
+is expected to be in octal form; otherwise, \fIsrc\fR is
expected to be in decimal form.
.PP
-\fBTcl_GetDouble\fR expects \fIstr\fR to consist of a floating-point
+\fBTcl_GetDouble\fR expects \fIsrc\fR to consist of a floating-point
number, which is: white space; a sign; a sequence of digits; a
decimal point; a sequence of digits; the letter ``e''; a
signed decimal exponent ; and more white space.
@@ -70,11 +70,11 @@ the digits either before or after the decimal point must be present
and if the ``e'' is present then it must be followed by the
exponent number.
.PP
-\fBTcl_GetBoolean\fR expects \fIstr\fR to specify a boolean
-value. If \fIstr\fR is any of \fB0\fR, \fBfalse\fR,
+\fBTcl_GetBoolean\fR expects \fIsrc\fR to specify a boolean
+value. If \fIsrc\fR is any of \fB0\fR, \fBfalse\fR,
\fBno\fR, or \fBoff\fR, then \fBTcl_GetBoolean\fR stores a zero
value at \fI*boolPtr\fR.
-If \fIstr\fR is any of \fB1\fR, \fBtrue\fR, \fByes\fR, or \fBon\fR,
+If \fIsrc\fR is any of \fB1\fR, \fBtrue\fR, \fByes\fR, or \fBon\fR,
then 1 is stored at \fI*boolPtr\fR.
Any of these values may be abbreviated, and upper-case spellings
are also acceptable.
diff --git a/doc/GetOpnFl.3 b/doc/GetOpnFl.3
index 16c6262..5982460 100644
--- a/doc/GetOpnFl.3
+++ b/doc/GetOpnFl.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: GetOpnFl.3,v 1.9 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: GetOpnFl.3,v 1.10 2005/05/03 18:07:42 dgp Exp $
.so man.macros
.TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures"
.BS
@@ -15,13 +15,13 @@ Tcl_GetOpenFile \- Return a FILE* for a channel registered in the given interpre
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_GetOpenFile\fR(\fIinterp, string, write, checkUsage, filePtr\fR)
+\fBTcl_GetOpenFile\fR(\fIinterp, chanID, write, checkUsage, filePtr\fR)
.sp
.SH ARGUMENTS
.AS Tcl_Interp checkUsage out
.AP Tcl_Interp *interp in
Tcl interpreter from which file handle is to be obtained.
-.AP "const char" *string in
+.AP "const char" *chanID in
String identifying channel, such as \fBstdin\fR or \fBfile4\fR.
.AP int write in
Non-zero means the file will be used for writing, zero means it will
@@ -31,7 +31,7 @@ If non-zero, then an error will be generated if the file wasn't opened
for the access indicated by \fIwrite\fR.
.AP ClientData *filePtr out
Points to word in which to store pointer to FILE structure for
-the file given by \fIstring\fR.
+the file given by \fIchanID\fR.
.BE
.SH DESCRIPTION
@@ -46,7 +46,7 @@ In some cases, such as a channel that connects to a pipeline of
subprocesses, different FILE pointers will be returned for reading
and writing.
\fBTcl_GetOpenFile\fR normally returns \fBTCL_OK\fR.
-If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIstring\fR didn't
+If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIchanID\fR didn't
make any sense or \fIcheckUsage\fR was set and the file wasn't opened
for the access specified by \fIwrite\fR) then \fBTCL_ERROR\fR is returned
and the interpreter's result will contain an error message.
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 4162a4f..9265cae 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.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: ParseCmd.3,v 1.19 2005/04/06 20:55:21 dkf Exp $
+'\" RCS: @(#) $Id: ParseCmd.3,v 1.20 2005/05/03 18:07:43 dgp Exp $
'\"
.so man.macros
.TH Tcl_ParseCommand 3 8.3 Tcl "Tcl Library Procedures"
@@ -16,22 +16,22 @@ Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_Par
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_ParseCommand\fR(\fIinterp, string, numBytes, nested, parsePtr\fR)
+\fBTcl_ParseCommand\fR(\fIinterp, start, numBytes, nested, parsePtr\fR)
.sp
int
-\fBTcl_ParseExpr\fR(\fIinterp, string, numBytes, parsePtr\fR)
+\fBTcl_ParseExpr\fR(\fIinterp, start, numBytes, parsePtr\fR)
.sp
int
-\fBTcl_ParseBraces\fR(\fIinterp, string, numBytes, parsePtr, append, termPtr\fR)
+\fBTcl_ParseBraces\fR(\fIinterp, start, numBytes, parsePtr, append, termPtr\fR)
.sp
int
-\fBTcl_ParseQuotedString\fR(\fIinterp, string, numBytes, parsePtr, append, termPtr\fR)
+\fBTcl_ParseQuotedString\fR(\fIinterp, start, numBytes, parsePtr, append, termPtr\fR)
.sp
int
-\fBTcl_ParseVarName\fR(\fIinterp, string, numBytes, parsePtr, append\fR)
+\fBTcl_ParseVarName\fR(\fIinterp, start, numBytes, parsePtr, append\fR)
.sp
const char *
-\fBTcl_ParseVar\fR(\fIinterp, string, termPtr\fR)
+\fBTcl_ParseVar\fR(\fIinterp, start, termPtr\fR)
.sp
\fBTcl_FreeParse\fR(\fIusedParsePtr\fR)
.sp
@@ -49,12 +49,12 @@ if NULL, then no error messages are left after errors.
For \fBTcl_EvalTokens\fR and \fBTcl_EvalTokensStandard\fR,
determines the context for evaluating the
script and also is used for error reporting; must not be NULL.
-.AP "const char" *string in
+.AP "const char" *start in
Pointer to first character in string to parse.
.AP int numBytes in
-Number of bytes in \fIstring\fR, not including any terminating null
+Number of bytes in string to parse, not including any terminating null
character. If less than 0 then the script consists of all characters
-in \fIstring\fR up to the first null character.
+following \fIstart\fR up to the first null character.
.AP int nested in
Non-zero means that the script is part of a command substitution so an
unquoted close bracket should be treated as a command terminator. If zero,
@@ -120,8 +120,8 @@ result, and no information is left at \fI*parsePtr\fR.
\fBTcl_ParseBraces\fR parses a string or command argument
enclosed in braces such as
\fB{hello}\fR or \fB{string \\t with \\t tabs}\fR
-from the beginning of its argument \fIstring\fR.
-The first character of \fIstring\fR must be \fB{\fR.
+from the beginning of its argument \fIstart\fR.
+The first character of \fIstart\fR must be \fB{\fR.
If the braced string was parsed successfully,
\fBTcl_ParseBraces\fR returns \fBTCL_OK\fR,
fills in the structure pointed to by \fIparsePtr\fR
@@ -136,8 +136,8 @@ and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseQuotedString\fR parses a double-quoted string such as
\fB"sum is [expr $a+$b]"\fR
-from the beginning of the argument \fIstring\fR.
-The first character of \fIstring\fR must be \fB"\fR.
+from the beginning of the argument \fIstart\fR.
+The first character of \fIstart\fR must be \fB"\fR.
If the double-quoted string was parsed successfully,
\fBTcl_ParseQuotedString\fR returns \fBTCL_OK\fR,
fills in the structure pointed to by \fIparsePtr\fR
@@ -152,8 +152,8 @@ and no information is left at \fI*parsePtr\fR or \fI*termPtr\fR.
.PP
\fBTcl_ParseVarName\fR parses 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.
+\fIstart\fR argument.
+The first character of \fIstart\fR must be \fB$\fR.
If a variable name was parsed successfully, \fBTcl_ParseVarName\fR
returns \fBTCL_OK\fR and fills in the structure pointed to by
\fIparsePtr\fR with information about the structure of the variable name
@@ -163,8 +163,8 @@ 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
+or \fB$x([expr $index + 1])\fR from the beginning of its \fIstart\fR
+argument. The first character of \fIstart\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
@@ -431,7 +431,7 @@ Tcl_Parse structure depends on the contents of the quoted string.
It will consist of one or more \fBTCL_TOKEN_TEXT\fR, \fBTCL_TOKEN_BS\fR,
\fBTCL_TOKEN_COMMAND\fR, and \fBTCL_TOKEN_VARIABLE\fR sub-tokens.
The array always contains at least one token;
-for example, if the argument \fIstring\fR is empty,
+for example, if the argument \fIstart\fR is empty,
the array returned consists of a single \fBTCL_TOKEN_TEXT\fR token
with a zero \fIsize\fR field.
Only the token information in the Tcl_Parse structure
@@ -452,7 +452,7 @@ the \fIcommentStart\fR, \fIcommentSize\fR,
.PP
All of the character pointers in the
Tcl_Parse and Tcl_Token structures refer
-to characters in the \fIstring\fR argument passed to
+to characters in the \fIstart\fR argument passed to
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR.
.PP
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index 85ff80e..ce4c7d9 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -6,7 +6,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.3,v 1.21 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: RegExp.3,v 1.22 2005/05/03 18:07:43 dgp Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
@@ -18,16 +18,16 @@ Tcl_RegExpMatch, Tcl_RegExpCompile, Tcl_RegExpExec, Tcl_RegExpRange, Tcl_GetRegE
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_RegExpMatchObj\fR(\fIinterp\fR, \fIstrObj\fR, \fIpatObj\fR)
+\fBTcl_RegExpMatchObj\fR(\fIinterp\fR, \fItextObj\fR, \fIpatObj\fR)
.sp
int
-\fBTcl_RegExpMatch\fR(\fIinterp\fR, \fIstring\fR, \fIpattern\fR)
+\fBTcl_RegExpMatch\fR(\fIinterp\fR, \fItext\fR, \fIpattern\fR)
.sp
Tcl_RegExp
\fBTcl_RegExpCompile\fR(\fIinterp\fR, \fIpattern\fR)
.sp
int
-\fBTcl_RegExpExec\fR(\fIinterp\fR, \fIregexp\fR, \fIstring\fR, \fIstart\fR)
+\fBTcl_RegExpExec\fR(\fIinterp\fR, \fIregexp\fR, \fItext\fR, \fIstart\fR)
.sp
void
\fBTcl_RegExpRange\fR(\fIregexp\fR, \fIindex\fR, \fIstartPtr\fR, \fIendPtr\fR)
@@ -36,7 +36,7 @@ Tcl_RegExp
\fBTcl_GetRegExpFromObj\fR(\fIinterp\fR, \fIpatObj\fR, \fIcflags\fR)
.sp
int
-\fBTcl_RegExpExecObj\fR(\fIinterp\fR, \fIregexp\fR, \fIobjPtr\fR, \fIoffset\fR, \fInmatches\fR, \fIeflags\fR)
+\fBTcl_RegExpExecObj\fR(\fIinterp\fR, \fIregexp\fR, \fItextObj\fR, \fIoffset\fR, \fInmatches\fR, \fIeflags\fR)
.sp
void
\fBTcl_RegExpGetInfo\fR(\fIregexp\fR, \fIinfoPtr\fR)
@@ -46,24 +46,24 @@ void
.AP Tcl_Interp *interp in
Tcl interpreter to use for error reporting. The interpreter may be
NULL if no error reporting is desired.
-.AP Tcl_Obj *strObj in/out
-Refers to the object from which to get the string to search. The
+.AP Tcl_Obj *textObj in/out
+Refers to the object from which to get the text to search. The
internal representation of the object may be converted to a form that
can be efficiently searched.
.AP Tcl_Obj *patObj in/out
Refers to the object from which to get a regular expression. The
compiled regular expression is cached in the object.
-.AP char *string in
-String to check for a match with a regular expression.
+.AP char *text in
+Text to search for a match with a regular expression.
.AP "const char" *pattern in
String in the form of a regular expression pattern.
.AP Tcl_RegExp regexp in
Compiled regular expression. Must have been returned previously
by \fBTcl_GetRegExpFromObj\fR or \fBTcl_RegExpCompile\fR.
.AP char *start in
-If \fIstring\fR is just a portion of some other string, this argument
+If \fItext\fR is just a portion of some other string, this argument
identifies the beginning of the larger string.
-If it isn't the same as \fIstring\fR, then no \fB^\fR matches
+If it isn't the same as \fItext\fR, then no \fB^\fR matches
will be allowed.
.AP int index in
Specifies which range is desired: 0 means the range of the entire
@@ -77,11 +77,8 @@ The address of the character just after the last one in the range
is stored here, or NULL if there is no such range.
.AP int cflags in
OR-ed combination of compilation flags. See below for more information.
-.AP Tcl_Obj *objPtr in/out
-An object which contains the string to check for a match with a
-regular expression.
.AP int offset in
-The character offset into the string where matching should begin.
+The character offset into the text where matching should begin.
The value of the offset has no impact on \fB^\fR matches. This
behavior is controlled by \fIeflags\fR.
.AP int nmatches in
@@ -111,7 +108,7 @@ If an error occurs in the matching process (e.g. \fIpattern\fR
is not a valid regular expression) then \fBTcl_RegExpMatch\fR
returns \-1 and leaves an error message in the interpreter result.
\fBTcl_RegExpMatchObj\fR is similar to \fBTcl_RegExpMatch\fR except it
-operates on the Tcl objects \fIstrObj\fR and \fIpatObj\fR instead of
+operates on the Tcl objects \fItextObj\fR and \fIpatObj\fR instead of
UTF strings.
\fBTcl_RegExpMatchObj\fR is generally more efficient than
\fBTcl_RegExpMatch\fR, so it is the preferred interface.
@@ -130,7 +127,7 @@ up to the next call to \fBTcl_RegExpCompile\fR; it is not safe to
retain these values for long periods of time.
.PP
\fBTcl_RegExpExec\fR executes the regular expression pattern matcher.
-It returns 1 if \fIstring\fR contains a range of characters that
+It returns 1 if \fItext\fR contains a range of characters that
match \fIregexp\fR, 0 if no match is found, and
\-1 if an error occurs.
In the case of an error, \fBTcl_RegExpExec\fR leaves an error
@@ -139,14 +136,14 @@ When searching a string for multiple matches of a pattern,
it is important to distinguish between the start of the original
string and the start of the current search.
For example, when searching for the second occurrence of a
-match, the \fIstring\fR argument might point to the character
+match, the \fItext\fR argument might point to the character
just after the first match; however, it is important for the
pattern matcher to know that this is not the start of the entire string,
so that it doesn't allow \fB^\fR atoms in the pattern to match.
The \fIstart\fR argument provides this information by pointing
-to the start of the overall string containing \fIstring\fR.
-\fIStart\fR will be less than or equal to \fIstring\fR; if it
-is less than \fIstring\fR then no \fB^\fR matches will be allowed.
+to the start of the overall string containing \fItext\fR.
+\fIStart\fR will be less than or equal to \fItext\fR; if it
+is less than \fItext\fR then no \fB^\fR matches will be allowed.
.PP
\fBTcl_RegExpRange\fR may be invoked after \fBTcl_RegExpExec\fR
returns; it provides detailed information about what ranges of
diff --git a/doc/SetResult.3 b/doc/SetResult.3
index c43cb4c..70812d0 100644
--- a/doc/SetResult.3
+++ b/doc/SetResult.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: SetResult.3,v 1.11 2004/10/07 15:15:48 dkf Exp $
+'\" RCS: @(#) $Id: SetResult.3,v 1.12 2005/05/03 18:07:43 dgp Exp $
'\"
.so man.macros
.TH Tcl_SetResult 3 8.0 Tcl "Tcl Library Procedures"
@@ -21,16 +21,16 @@ Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_Appe
Tcl_Obj *
\fBTcl_GetObjResult\fR(\fIinterp\fR)
.sp
-\fBTcl_SetResult\fR(\fIinterp, string, freeProc\fR)
+\fBTcl_SetResult\fR(\fIinterp, result, freeProc\fR)
.sp
const char *
\fBTcl_GetStringResult\fR(\fIinterp\fR)
.sp
-\fBTcl_AppendResult\fR(\fIinterp, string, string, ... , \fB(char *) NULL\fR)
+\fBTcl_AppendResult\fR(\fIinterp, result, result, ... , \fB(char *) NULL\fR)
.sp
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
.sp
-\fBTcl_AppendElement\fR(\fIinterp, string\fR)
+\fBTcl_AppendElement\fR(\fIinterp, element\fR)
.sp
\fBTcl_ResetResult\fR(\fIinterp\fR)
.sp
@@ -41,12 +41,15 @@ const char *
Interpreter whose result is to be modified or read.
.AP Tcl_Obj *objPtr in
Object value to become result for \fIinterp\fR.
-.AP char *string in
+.AP char *result in
String value to become result for \fIinterp\fR or to be
appended to the existing result.
+.AP char *element in
+String value to append as a list element
+to the existing result of \fIinterp\fR.
.AP Tcl_FreeProc *freeProc in
Address of procedure to call to release storage at
-\fIstring\fR, or \fBTCL_STATIC\fR, \fBTCL_DYNAMIC\fR, or
+\fIresult\fR, or \fBTCL_STATIC\fR, \fBTCL_DYNAMIC\fR, or
\fBTCL_VOLATILE\fR.
.AP va_list argList in
An argument list which must have been initialized using
@@ -87,17 +90,17 @@ they should use \fBTcl_IncrRefCount\fR to increment its reference count
in order to keep it from being freed too early or accidentally changed.
.PP
\fBTcl_SetResult\fR
-arranges for \fIstring\fR to be the result for the current Tcl
+arranges for \fIresult\fR to be the result for the current Tcl
command in \fIinterp\fR, replacing any existing result.
The \fIfreeProc\fR argument specifies how to manage the storage
-for the \fIstring\fR argument;
+for the \fIresult\fR argument;
it is discussed in the section
\fBTHE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT\fR below.
-If \fIstring\fR is \fBNULL\fR, then \fIfreeProc\fR is ignored
+If \fIresult\fR is \fBNULL\fR, then \fIfreeProc\fR is ignored
and \fBTcl_SetResult\fR
re-initializes \fIinterp\fR's result to point to an empty string.
.PP
-\fBTcl_GetStringResult\fR returns the result for \fIinterp\fR as an string.
+\fBTcl_GetStringResult\fR returns the result for \fIinterp\fR as a string.
If the result was set to an object by a \fBTcl_SetObjResult\fR call,
the object form will be converted to a string and returned.
If the object's string representation contains null bytes,
@@ -118,12 +121,12 @@ and the result is left as a empty string.
and \fBTcl_SetErrorCode\fR.
.PP
\fBTcl_AppendResult\fR makes it easy to build up Tcl results in pieces.
-It takes each of its \fIstring\fR arguments and appends them in order
+It takes each of its \fIresult\fR arguments and appends them in order
to the current result associated with \fIinterp\fR.
If the result is in its initialized empty state (e.g. a command procedure
was just invoked or \fBTcl_ResetResult\fR was just called),
then \fBTcl_AppendResult\fR sets the result to the concatenation of
-its \fIstring\fR arguments.
+its \fIresult\fR arguments.
\fBTcl_AppendResult\fR may be called repeatedly as additional pieces
of the result are produced.
\fBTcl_AppendResult\fR takes care of all the
@@ -132,7 +135,7 @@ result, such as allocating a larger result area if necessary.
It also manages conversion to and from the \fIresult\fR field of the
\fIinterp\fR so as to handle backward-compatability with old-style
extensions.
-Any number of \fIstring\fR arguments may be passed in a single
+Any number of \fIresult\fR arguments may be passed in a single
call; the last argument in the list must be a NULL pointer.
.PP
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
@@ -148,12 +151,12 @@ can be significantly more efficient.
.PP
\fBTcl_AppendElement\fR is similar to \fBTcl_AppendResult\fR in
that it allows results to be built up in pieces.
-However, \fBTcl_AppendElement\fR takes only a single \fIstring\fR
+However, \fBTcl_AppendElement\fR takes only a single \fIelement\fR
argument and it appends that argument to the current result
as a proper Tcl list element.
\fBTcl_AppendElement\fR adds backslashes or braces if necessary
to ensure that \fIinterp\fR's result can be parsed as a list and that
-\fIstring\fR will be extracted as a single element.
+\fIelement\fR will be extracted as a single element.
Under normal conditions, \fBTcl_AppendElement\fR will add a space
character to \fIinterp\fR's result just before adding the new
list element, so that the list elements in the result are properly
@@ -185,21 +188,21 @@ and write the result using \fBTcl_SetObjResult\fR or \fBTcl_SetResult\fR.
.SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT"
.PP
\fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how
-the Tcl system is to manage the storage for the \fIstring\fR argument.
+the Tcl system is to manage the storage for the \fIresult\fR argument.
If \fBTcl_SetResult\fR or \fBTcl_SetObjResult\fR are called
at a time when \fIinterp\fR holds a string result,
they do whatever is necessary to dispose of the old string result
(see the \fBTcl_Interp\fR manual entry for details on this).
.PP
-If \fIfreeProc\fR is \fBTCL_STATIC\fR it means that \fIstring\fR
+If \fIfreeProc\fR is \fBTCL_STATIC\fR it means that \fIresult\fR
refers to an area of static storage that is guaranteed not to be
modified until at least the next call to \fBTcl_Eval\fR.
If \fIfreeProc\fR
-is \fBTCL_DYNAMIC\fR it means that \fIstring\fR was allocated with a call
+is \fBTCL_DYNAMIC\fR it means that \fIresult\fR was allocated with a call
to \fBTcl_Alloc\fR and is now the property of the Tcl system.
\fBTcl_SetResult\fR will arrange for the string's storage to be
released by calling \fBTcl_Free\fR when it is no longer needed.
-If \fIfreeProc\fR is \fBTCL_VOLATILE\fR it means that \fIstring\fR
+If \fIfreeProc\fR is \fBTCL_VOLATILE\fR it means that \fIresult\fR
points to an area of memory that is likely to be overwritten when
\fBTcl_SetResult\fR returns (e.g. it points to something in a stack frame).
In this case \fBTcl_SetResult\fR will make a copy of the string in
@@ -217,7 +220,7 @@ result that match the type \fBTcl_FreeProc\fR:
typedef void Tcl_FreeProc(char *\fIblockPtr\fR);
.CE
When \fIfreeProc\fR is called, its \fIblockPtr\fR will be set to
-the value of \fIstring\fR passed to \fBTcl_SetResult\fR.
+the value of \fIresult\fR passed to \fBTcl_SetResult\fR.
.SH "SEE ALSO"
Tcl_AddErrorInfo, Tcl_CreateObjCommand, Tcl_SetErrorCode, Tcl_Interp
diff --git a/doc/StrMatch.3 b/doc/StrMatch.3
index 1bf767e..75fa308 100644
--- a/doc/StrMatch.3
+++ b/doc/StrMatch.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: StrMatch.3,v 1.7 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: StrMatch.3,v 1.8 2005/05/03 18:07:44 dgp Exp $
'\"
.so man.macros
.TH Tcl_StringMatch 3 8.1 Tcl "Tcl Library Procedures"
@@ -17,13 +17,13 @@ Tcl_StringMatch, Tcl_StringCaseMatch \- test whether a string matches a pattern
\fB#include <tcl.h>\fR
.sp
int
-\fBTcl_StringMatch\fR(\fIstring\fR, \fIpattern\fR)
+\fBTcl_StringMatch\fR(\fIstr\fR, \fIpattern\fR)
.sp
int
-\fBTcl_StringCaseMatch\fR(\fIstring\fR, \fIpattern\fR, \fInocase\fR)
+\fBTcl_StringCaseMatch\fR(\fIstr\fR, \fIpattern\fR, \fInocase\fR)
.SH ARGUMENTS
.AS "const char" *pattern
-.AP "const char" *string in
+.AP "const char" *str in
String to test.
.AP "const char" *pattern in
Pattern to match against string. May contain special
diff --git a/doc/Utf.3 b/doc/Utf.3
index e93e110..512ec96 100644
--- a/doc/Utf.3
+++ b/doc/Utf.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: Utf.3,v 1.21 2005/04/06 20:55:22 dkf Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.22 2005/05/03 18:07:44 dgp Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -24,34 +24,34 @@ int
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
.sp
char *
-\fBTcl_UniCharToUtfDString\fR(\fIuniStr, numChars, dstPtr\fR)
+\fBTcl_UniCharToUtfDString\fR(\fIuniStr, uniLength, dsPtr\fR)
.sp
Tcl_UniChar *
-\fBTcl_UtfToUniCharDString\fR(\fIsrc, len, dstPtr\fR)
+\fBTcl_UtfToUniCharDString\fR(\fIsrc, length, dsPtr\fR)
.sp
int
\fBTcl_UniCharLen\fR(\fIuniStr\fR)
.sp
int
-\fBTcl_UniCharNcmp\fR(\fIuniStr, uniStr, num\fR)
+\fBTcl_UniCharNcmp\fR(\fIucs, uct, numChars\fR)
.sp
int
-\fBTcl_UniCharNcasecmp\fR(\fIuniStr, uniStr, num\fR)
+\fBTcl_UniCharNcasecmp\fR(\fIucs, uct, numChars\fR)
.sp
int
\fBTcl_UniCharCaseMatch\fR(\fIuniStr, uniPattern, nocase\fR)
.sp
int
-\fBTcl_UtfNcmp\fR(\fIsrc, src, num\fR)
+\fBTcl_UtfNcmp\fR(\fIcs, ct, numChars\fR)
.sp
int
-\fBTcl_UtfNcasecmp\fR(\fIsrc, src, num\fR)
+\fBTcl_UtfNcasecmp\fR(\fIcs, ct, numChars\fR)
.sp
int
-\fBTcl_UtfCharComplete\fR(\fIsrc, len\fR)
+\fBTcl_UtfCharComplete\fR(\fIsrc, length\fR)
.sp
int
-\fBTcl_NumUtfChars\fR(\fIsrc, len\fR)
+\fBTcl_NumUtfChars\fR(\fIsrc, length\fR)
.sp
const char *
\fBTcl_UtfFindFirst\fR(\fIsrc, ch\fR)
@@ -84,19 +84,27 @@ 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 char" *cs in
+Pointer to a UTF-8 string.
+.AP "const char" *ct in
+Pointer to a UTF-8 string.
.AP "const Tcl_UniChar" *uniStr in
A null-terminated Unicode string.
+.AP "const Tcl_UniChar" *ucs in
+A null-terminated Unicode string.
+.AP "const Tcl_UniChar" *uct in
+A null-terminated Unicode string.
.AP "const Tcl_UniChar" *uniPattern in
A null-terminated Unicode string.
-.AP int len in
+.AP int length 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
+.AP int uniLength in
The length of the Unicode string in characters. Must be greater than or
equal to 0.
-.AP "Tcl_DString" *dstPtr in/out
+.AP "Tcl_DString" *dsPtr in/out
A pointer to a previously initialized \fBTcl_DString\fR.
-.AP "unsigned long" num in
+.AP "unsigned long" numChars in
The number of characters to compare.
.AP "const char" *start in
Pointer to the beginning of a UTF-8 string.
@@ -140,15 +148,16 @@ byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and
.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.
+You must specify \fIuniLength\fR, 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 converts 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
+In the argument \fIlength\fR, you may either specify the length of
+the given UTF-8 string in bytes 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
@@ -161,7 +170,7 @@ the number of Unicode characters (not bytes) in that string.
\fBTcl_UniCharNcmp\fR and \fBTcl_UniCharNcasecmp\fR correspond to
\fBstrncmp\fR and \fBstrncasecmp\fR, respectively, for Unicode characters.
They accept two null-terminated Unicode strings and the number of characters
-to compare. Both strings are assumed to be at least \fIlen\fR characters
+to compare. Both strings are assumed to be at least \fInumChars\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
@@ -175,7 +184,7 @@ be case sensitive and returns whether the string matches the pattern.
.PP
\fBTcl_UtfNcmp\fR corresponds to \fBstrncmp\fR for UTF-8 strings. It
accepts two null-terminated UTF-8 strings and the number of characters
-to compare. (Both strings are assumed to be at least \fIlen\fR
+to compare. (Both strings are assumed to be at least \fInumChars\fR
characters long.) \fBTcl_UtfNcmp\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
@@ -188,7 +197,7 @@ differences in case when comparing upper, lower or title case
characters.
.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
+of \fIlength\fR bytes is long enough to be decoded by
\fBTcl_UtfToUniChar\fR, or 0 otherwise. This function does not guarantee
that the UTF-8 string is properly formed. This routine is used by
procedures that are operating on a byte at a time and need to know if a
@@ -196,7 +205,7 @@ full Tcl_UniChar has been seen.
.PP
\fBTcl_NumUtfChars\fR corresponds to \fBstrlen\fR for UTF-8 strings. It
returns the number of Tcl_UniChars that are represented by the UTF-8 string
-\fIsrc\fR. The length of the source string is \fIlen\fR bytes. If the
+\fIsrc\fR. The length of the source string is \fIlength\fR bytes. If the
length is negative, all bytes up to the first null byte are used.
.PP
\fBTcl_UtfFindFirst\fR corresponds to \fBstrchr\fR for UTF-8 strings. It
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 05fe8f9..4ad45ab 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -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: tcl.decls,v 1.109 2005/05/02 21:45:58 dgp Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.110 2005/05/03 18:07:44 dgp Exp $
library tcl
@@ -136,7 +136,7 @@ declare 30 generic {
void TclFreeObj(Tcl_Obj *objPtr)
}
declare 31 generic {
- int Tcl_GetBoolean(Tcl_Interp *interp, CONST char *str, int *boolPtr)
+ int Tcl_GetBoolean(Tcl_Interp *interp, CONST char *src, int *boolPtr)
}
declare 32 generic {
int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
@@ -146,7 +146,7 @@ declare 33 generic {
unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr)
}
declare 34 generic {
- int Tcl_GetDouble(Tcl_Interp *interp, CONST char *str, double *doublePtr)
+ int Tcl_GetDouble(Tcl_Interp *interp, CONST char *src, double *doublePtr)
}
declare 35 generic {
int Tcl_GetDoubleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
@@ -157,7 +157,7 @@ declare 36 generic {
CONST84 char **tablePtr, CONST char *msg, int flags, int *indexPtr)
}
declare 37 generic {
- int Tcl_GetInt(Tcl_Interp *interp, CONST char *str, int *intPtr)
+ int Tcl_GetInt(Tcl_Interp *interp, CONST char *src, int *intPtr)
}
declare 38 generic {
int Tcl_GetIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr)
@@ -261,7 +261,7 @@ declare 68 generic {
void Tcl_AllowExceptions(Tcl_Interp *interp)
}
declare 69 generic {
- void Tcl_AppendElement(Tcl_Interp *interp, CONST char *string)
+ void Tcl_AppendElement(Tcl_Interp *interp, CONST char *element)
}
declare 70 generic {
void Tcl_AppendResult(Tcl_Interp *interp, ...)
@@ -431,10 +431,10 @@ declare 116 generic {
void Tcl_DoWhenIdle(Tcl_IdleProc *proc, ClientData clientData)
}
declare 117 generic {
- char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *str, int length)
+ char * Tcl_DStringAppend(Tcl_DString *dsPtr, CONST char *bytes, int length)
}
declare 118 generic {
- char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, CONST char *string)
+ char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, CONST char *element)
}
declare 119 generic {
void Tcl_DStringEndSublist(Tcl_DString *dsPtr)
@@ -467,7 +467,7 @@ declare 128 generic {
CONST84_RETURN char * Tcl_ErrnoMsg(int err)
}
declare 129 generic {
- int Tcl_Eval(Tcl_Interp *interp, CONST char *string)
+ int Tcl_Eval(Tcl_Interp *interp, CONST char *script)
}
# This is obsolete, use Tcl_FSEvalFile
declare 130 generic {
@@ -487,19 +487,19 @@ declare 134 generic {
CONST char *cmdName)
}
declare 135 generic {
- int Tcl_ExprBoolean(Tcl_Interp *interp, CONST char *str, int *ptr)
+ int Tcl_ExprBoolean(Tcl_Interp *interp, CONST char *expr, int *ptr)
}
declare 136 generic {
int Tcl_ExprBooleanObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *ptr)
}
declare 137 generic {
- int Tcl_ExprDouble(Tcl_Interp *interp, CONST char *str, double *ptr)
+ int Tcl_ExprDouble(Tcl_Interp *interp, CONST char *expr, double *ptr)
}
declare 138 generic {
int Tcl_ExprDoubleObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *ptr)
}
declare 139 generic {
- int Tcl_ExprLong(Tcl_Interp *interp, CONST char *str, long *ptr)
+ int Tcl_ExprLong(Tcl_Interp *interp, CONST char *expr, long *ptr)
}
declare 140 generic {
int Tcl_ExprLongObj(Tcl_Interp *interp, Tcl_Obj *objPtr, long *ptr)
@@ -509,7 +509,7 @@ declare 141 generic {
Tcl_Obj **resultPtrPtr)
}
declare 142 generic {
- int Tcl_ExprString(Tcl_Interp *interp, CONST char *exprString)
+ int Tcl_ExprString(Tcl_Interp *interp, CONST char *expr)
}
declare 143 generic {
void Tcl_Finalize(void)
@@ -599,7 +599,7 @@ declare 166 generic {
# generic interface, so we inlcude it here for compatibility reasons.
declare 167 unix {
- int Tcl_GetOpenFile(Tcl_Interp *interp, CONST char *str, int forWriting,
+ int Tcl_GetOpenFile(Tcl_Interp *interp, CONST char *chanID, int forWriting,
int checkUsage, ClientData *filePtr)
}
# Obsolete. Should now use Tcl_FSGetPathType which is objectified
@@ -727,7 +727,7 @@ declare 202 generic {
void Tcl_PrintDouble(Tcl_Interp *interp, double value, char *dst)
}
declare 203 generic {
- int Tcl_PutEnv(CONST char *string)
+ int Tcl_PutEnv(CONST char *assignment)
}
declare 204 generic {
CONST84_RETURN char * Tcl_PosixError(Tcl_Interp *interp)
@@ -754,14 +754,14 @@ declare 211 generic {
void Tcl_RegisterObjType(Tcl_ObjType *typePtr)
}
declare 212 generic {
- Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, CONST char *string)
+ Tcl_RegExp Tcl_RegExpCompile(Tcl_Interp *interp, CONST char *pattern)
}
declare 213 generic {
int Tcl_RegExpExec(Tcl_Interp *interp, Tcl_RegExp regexp,
- CONST char *str, CONST char *start)
+ CONST char *text, CONST char *start)
}
declare 214 generic {
- int Tcl_RegExpMatch(Tcl_Interp *interp, CONST char *str,
+ int Tcl_RegExpMatch(Tcl_Interp *interp, CONST char *text,
CONST char *pattern)
}
declare 215 generic {
@@ -821,7 +821,7 @@ declare 231 generic {
int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth)
}
declare 232 generic {
- void Tcl_SetResult(Tcl_Interp *interp, char *str,
+ void Tcl_SetResult(Tcl_Interp *interp, char *result,
Tcl_FreeProc *freeProc)
}
declare 233 generic {
@@ -956,7 +956,7 @@ declare 269 generic {
CONST84_RETURN char * Tcl_HashStats(Tcl_HashTable *tablePtr)
}
declare 270 generic {
- CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, CONST char *str,
+ CONST84_RETURN char * Tcl_ParseVar(Tcl_Interp *interp, CONST char *start,
CONST84 char **termPtr)
}
declare 271 generic {
@@ -1120,7 +1120,7 @@ declare 311 generic {
Tcl_Time *timePtr)
}
declare 312 generic {
- int Tcl_NumUtfChars(CONST char *src, int len)
+ int Tcl_NumUtfChars(CONST char *src, int length)
}
declare 313 generic {
int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead,
@@ -1165,7 +1165,7 @@ declare 325 generic {
CONST84_RETURN char * Tcl_UtfAtIndex(CONST char *src, int index)
}
declare 326 generic {
- int Tcl_UtfCharComplete(CONST char *src, int len)
+ int Tcl_UtfCharComplete(CONST char *src, int length)
}
declare 327 generic {
int Tcl_UtfBackslash(CONST char *src, int *readPtr, char *dst)
@@ -1247,18 +1247,18 @@ declare 351 generic {
int Tcl_UniCharIsWordChar(int ch)
}
declare 352 generic {
- int Tcl_UniCharLen(CONST Tcl_UniChar *str)
+ int Tcl_UniCharLen(CONST Tcl_UniChar *uniStr)
}
declare 353 generic {
- int Tcl_UniCharNcmp(CONST Tcl_UniChar *cs, CONST Tcl_UniChar *ct,
- unsigned long n)
+ int Tcl_UniCharNcmp(CONST Tcl_UniChar *ucs, CONST Tcl_UniChar *uct,
+ unsigned long numChars)
}
declare 354 generic {
- char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *string,
- int numChars, Tcl_DString *dsPtr)
+ char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *uniStr,
+ int uniLength, Tcl_DString *dsPtr)
}
declare 355 generic {
- Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *string,
+ Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *src,
int length, Tcl_DString *dsPtr)
}
declare 356 generic {
@@ -1278,24 +1278,24 @@ declare 359 generic {
CONST char *command, int length)
}
declare 360 generic {
- int Tcl_ParseBraces(Tcl_Interp *interp, CONST char *string, int numBytes,
+ int Tcl_ParseBraces(Tcl_Interp *interp, CONST char *start, int numBytes,
Tcl_Parse *parsePtr, int append, CONST84 char **termPtr)
}
declare 361 generic {
- int Tcl_ParseCommand(Tcl_Interp *interp, CONST char *string, int numBytes,
+ int Tcl_ParseCommand(Tcl_Interp *interp, CONST char *start, int numBytes,
int nested, Tcl_Parse *parsePtr)
}
declare 362 generic {
- int Tcl_ParseExpr(Tcl_Interp *interp, CONST char *string, int numBytes,
+ int Tcl_ParseExpr(Tcl_Interp *interp, CONST char *start, int numBytes,
Tcl_Parse *parsePtr)
}
declare 363 generic {
- int Tcl_ParseQuotedString(Tcl_Interp *interp, CONST char *string,
+ int Tcl_ParseQuotedString(Tcl_Interp *interp, CONST char *start,
int numBytes, Tcl_Parse *parsePtr, int append,
CONST84 char **termPtr)
}
declare 364 generic {
- int Tcl_ParseVarName(Tcl_Interp *interp, CONST char *string, int numBytes,
+ int Tcl_ParseVarName(Tcl_Interp *interp, CONST char *start, int numBytes,
Tcl_Parse *parsePtr, int append)
}
# These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir,
@@ -1335,7 +1335,7 @@ declare 375 generic {
}
declare 376 generic {
int Tcl_RegExpExecObj(Tcl_Interp *interp, Tcl_RegExp regexp,
- Tcl_Obj *objPtr, int offset, int nmatches, int flags)
+ Tcl_Obj *textObj, int offset, int nmatches, int flags)
}
declare 377 generic {
void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr)
@@ -1364,7 +1364,7 @@ declare 384 generic {
int length)
}
declare 385 generic {
- int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *stringObj,
+ int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *textObj,
Tcl_Obj *patternObj)
}
declare 386 generic {
@@ -1479,12 +1479,12 @@ declare 418 generic {
}
declare 419 generic {
- int Tcl_UniCharNcasecmp(CONST Tcl_UniChar *cs, CONST Tcl_UniChar *ct,
- unsigned long n)
+ int Tcl_UniCharNcasecmp(CONST Tcl_UniChar *ucs, CONST Tcl_UniChar *uct,
+ unsigned long numChars)
}
declare 420 generic {
- int Tcl_UniCharCaseMatch(CONST Tcl_UniChar *ustr,
- CONST Tcl_UniChar *pattern, int nocase)
+ int Tcl_UniCharCaseMatch(CONST Tcl_UniChar *uniStr,
+ CONST Tcl_UniChar *uniPattern, int nocase)
}
declare 421 generic {
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d216d2d..376fe25 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.148 2005/05/02 21:45:59 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.149 2005/05/03 18:07:45 dgp Exp $
*/
#include "tclInt.h"
@@ -3645,12 +3645,12 @@ Tcl_EvalEx(interp, script, numBytes, flags)
*/
int
-Tcl_Eval(interp, string)
+Tcl_Eval(interp, script)
Tcl_Interp *interp; /* Token for command interpreter (returned
* by previous call to Tcl_CreateInterp). */
- CONST char *string; /* Pointer to TCL command to execute. */
+ CONST char *script; /* Pointer to TCL command to execute. */
{
- int code = Tcl_EvalEx(interp, string, -1, 0);
+ int code = Tcl_EvalEx(interp, script, -1, 0);
/*
* For backwards compatibility with old C code that predates the
@@ -3886,19 +3886,19 @@ ProcessUnexpectedResult(interp, returnCode)
*/
int
-Tcl_ExprLong(interp, string, ptr)
+Tcl_ExprLong(interp, exprstring, ptr)
Tcl_Interp *interp; /* Context in which to evaluate the
* expression. */
- CONST char *string; /* Expression to evaluate. */
+ CONST char *exprstring; /* Expression to evaluate. */
long *ptr; /* Where to store result. */
{
register Tcl_Obj *exprPtr;
Tcl_Obj *resultPtr;
- int length = strlen(string);
+ int length = strlen(exprstring);
int result = TCL_OK;
if (length > 0) {
- exprPtr = Tcl_NewStringObj(string, length);
+ exprPtr = Tcl_NewStringObj(exprstring, length);
Tcl_IncrRefCount(exprPtr);
result = Tcl_ExprObj(interp, exprPtr, &resultPtr);
if (result == TCL_OK) {
@@ -3954,19 +3954,19 @@ Tcl_ExprLong(interp, string, ptr)
}
int
-Tcl_ExprDouble(interp, string, ptr)
+Tcl_ExprDouble(interp, exprstring, ptr)
Tcl_Interp *interp; /* Context in which to evaluate the
* expression. */
- CONST char *string; /* Expression to evaluate. */
+ CONST char *exprstring; /* Expression to evaluate. */
double *ptr; /* Where to store result. */
{
register Tcl_Obj *exprPtr;
Tcl_Obj *resultPtr;
- int length = strlen(string);
+ int length = strlen(exprstring);
int result = TCL_OK;
if (length > 0) {
- exprPtr = Tcl_NewStringObj(string, length);
+ exprPtr = Tcl_NewStringObj(exprstring, length);
Tcl_IncrRefCount(exprPtr);
result = Tcl_ExprObj(interp, exprPtr, &resultPtr);
if (result == TCL_OK) {
@@ -4022,19 +4022,19 @@ Tcl_ExprDouble(interp, string, ptr)
}
int
-Tcl_ExprBoolean(interp, string, ptr)
+Tcl_ExprBoolean(interp, exprstring, ptr)
Tcl_Interp *interp; /* Context in which to evaluate the
* expression. */
- CONST char *string; /* Expression to evaluate. */
+ CONST char *exprstring; /* Expression to evaluate. */
int *ptr; /* Where to store 0/1 result. */
{
register Tcl_Obj *exprPtr;
Tcl_Obj *resultPtr;
- int length = strlen(string);
+ int length = strlen(exprstring);
int result = TCL_OK;
if (length > 0) {
- exprPtr = Tcl_NewStringObj(string, length);
+ exprPtr = Tcl_NewStringObj(exprstring, length);
Tcl_IncrRefCount(exprPtr);
result = Tcl_ExprObj(interp, exprPtr, &resultPtr);
if (result == TCL_OK) {
@@ -4321,20 +4321,20 @@ TclObjInvoke(interp, objc, objv, flags)
*/
int
-Tcl_ExprString(interp, exprString)
+Tcl_ExprString(interp, expr)
Tcl_Interp *interp; /* Context in which to evaluate the
* expression. */
- CONST char *exprString; /* Expression to evaluate. */
+ CONST char *expr; /* Expression to evaluate. */
{
int code = TCL_OK;
- if (exprString[0] == '\0') {
+ if (expr[0] == '\0') {
/* An empty string. Just set the interpreter's result to 0. */
Tcl_SetResult(interp, "0", TCL_VOLATILE);
} else {
- Tcl_Obj *resultPtr, *exprPtr = Tcl_NewStringObj(exprString, -1);
- Tcl_IncrRefCount(exprPtr);
- code = Tcl_ExprObj(interp, exprPtr, &resultPtr);
- Tcl_DecrRefCount(exprPtr);
+ Tcl_Obj *resultPtr, *exprObj = Tcl_NewStringObj(expr, -1);
+ Tcl_IncrRefCount(exprObj);
+ code = Tcl_ExprObj(interp, exprObj, &resultPtr);
+ Tcl_DecrRefCount(exprObj);
if (code == TCL_OK) {
Tcl_SetObjResult(interp, resultPtr);
Tcl_DecrRefCount(resultPtr);
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 6fe3188..0ec588f 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.111 2005/05/02 21:45:59 dgp Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.112 2005/05/03 18:07:47 dgp Exp $
*/
#ifndef _TCLDECLS
@@ -227,7 +227,7 @@ EXTERN void TclFreeObj _ANSI_ARGS_((Tcl_Obj * objPtr));
#define Tcl_GetBoolean_TCL_DECLARED
/* 31 */
EXTERN int Tcl_GetBoolean _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, int * boolPtr));
+ CONST char * src, int * boolPtr));
#endif
#ifndef Tcl_GetBooleanFromObj_TCL_DECLARED
#define Tcl_GetBooleanFromObj_TCL_DECLARED
@@ -246,7 +246,7 @@ EXTERN unsigned char * Tcl_GetByteArrayFromObj _ANSI_ARGS_((
#define Tcl_GetDouble_TCL_DECLARED
/* 34 */
EXTERN int Tcl_GetDouble _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, double * doublePtr));
+ CONST char * src, double * doublePtr));
#endif
#ifndef Tcl_GetDoubleFromObj_TCL_DECLARED
#define Tcl_GetDoubleFromObj_TCL_DECLARED
@@ -266,7 +266,7 @@ EXTERN int Tcl_GetIndexFromObj _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_GetInt_TCL_DECLARED
/* 37 */
EXTERN int Tcl_GetInt _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, int * intPtr));
+ CONST char * src, int * intPtr));
#endif
#ifndef Tcl_GetIntFromObj_TCL_DECLARED
#define Tcl_GetIntFromObj_TCL_DECLARED
@@ -456,7 +456,7 @@ EXTERN void Tcl_AllowExceptions _ANSI_ARGS_((Tcl_Interp * interp));
#define Tcl_AppendElement_TCL_DECLARED
/* 69 */
EXTERN void Tcl_AppendElement _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string));
+ CONST char * element));
#endif
#ifndef Tcl_AppendResult_TCL_DECLARED
#define Tcl_AppendResult_TCL_DECLARED
@@ -772,13 +772,13 @@ EXTERN void Tcl_DoWhenIdle _ANSI_ARGS_((Tcl_IdleProc * proc,
#define Tcl_DStringAppend_TCL_DECLARED
/* 117 */
EXTERN char * Tcl_DStringAppend _ANSI_ARGS_((Tcl_DString * dsPtr,
- CONST char * str, int length));
+ CONST char * bytes, int length));
#endif
#ifndef Tcl_DStringAppendElement_TCL_DECLARED
#define Tcl_DStringAppendElement_TCL_DECLARED
/* 118 */
EXTERN char * Tcl_DStringAppendElement _ANSI_ARGS_((
- Tcl_DString * dsPtr, CONST char * string));
+ Tcl_DString * dsPtr, CONST char * element));
#endif
#ifndef Tcl_DStringEndSublist_TCL_DECLARED
#define Tcl_DStringEndSublist_TCL_DECLARED
@@ -839,7 +839,7 @@ EXTERN CONST84_RETURN char * Tcl_ErrnoMsg _ANSI_ARGS_((int err));
#define Tcl_Eval_TCL_DECLARED
/* 129 */
EXTERN int Tcl_Eval _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string));
+ CONST char * script));
#endif
#ifndef Tcl_EvalFile_TCL_DECLARED
#define Tcl_EvalFile_TCL_DECLARED
@@ -876,7 +876,7 @@ EXTERN int Tcl_ExposeCommand _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ExprBoolean_TCL_DECLARED
/* 135 */
EXTERN int Tcl_ExprBoolean _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, int * ptr));
+ CONST char * expr, int * ptr));
#endif
#ifndef Tcl_ExprBooleanObj_TCL_DECLARED
#define Tcl_ExprBooleanObj_TCL_DECLARED
@@ -888,7 +888,7 @@ EXTERN int Tcl_ExprBooleanObj _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ExprDouble_TCL_DECLARED
/* 137 */
EXTERN int Tcl_ExprDouble _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, double * ptr));
+ CONST char * expr, double * ptr));
#endif
#ifndef Tcl_ExprDoubleObj_TCL_DECLARED
#define Tcl_ExprDoubleObj_TCL_DECLARED
@@ -900,7 +900,7 @@ EXTERN int Tcl_ExprDoubleObj _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ExprLong_TCL_DECLARED
/* 139 */
EXTERN int Tcl_ExprLong _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, long * ptr));
+ CONST char * expr, long * ptr));
#endif
#ifndef Tcl_ExprLongObj_TCL_DECLARED
#define Tcl_ExprLongObj_TCL_DECLARED
@@ -918,7 +918,7 @@ EXTERN int Tcl_ExprObj _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ExprString_TCL_DECLARED
/* 142 */
EXTERN int Tcl_ExprString _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * exprString));
+ CONST char * expr));
#endif
#ifndef Tcl_Finalize_TCL_DECLARED
#define Tcl_Finalize_TCL_DECLARED
@@ -1068,7 +1068,7 @@ EXTERN Tcl_Obj * Tcl_GetObjResult _ANSI_ARGS_((Tcl_Interp * interp));
#define Tcl_GetOpenFile_TCL_DECLARED
/* 167 */
EXTERN int Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, int forWriting,
+ CONST char * chanID, int forWriting,
int checkUsage, ClientData * filePtr));
#endif
#endif /* UNIX */
@@ -1291,7 +1291,7 @@ EXTERN void Tcl_PrintDouble _ANSI_ARGS_((Tcl_Interp * interp,
#ifndef Tcl_PutEnv_TCL_DECLARED
#define Tcl_PutEnv_TCL_DECLARED
/* 203 */
-EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char * string));
+EXTERN int Tcl_PutEnv _ANSI_ARGS_((CONST char * assignment));
#endif
#ifndef Tcl_PosixError_TCL_DECLARED
#define Tcl_PosixError_TCL_DECLARED
@@ -1353,20 +1353,20 @@ EXTERN void Tcl_RegisterObjType _ANSI_ARGS_((
#define Tcl_RegExpCompile_TCL_DECLARED
/* 212 */
EXTERN Tcl_RegExp Tcl_RegExpCompile _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string));
+ CONST char * pattern));
#endif
#ifndef Tcl_RegExpExec_TCL_DECLARED
#define Tcl_RegExpExec_TCL_DECLARED
/* 213 */
EXTERN int Tcl_RegExpExec _ANSI_ARGS_((Tcl_Interp * interp,
- Tcl_RegExp regexp, CONST char * str,
+ Tcl_RegExp regexp, CONST char * text,
CONST char * start));
#endif
#ifndef Tcl_RegExpMatch_TCL_DECLARED
#define Tcl_RegExpMatch_TCL_DECLARED
/* 214 */
EXTERN int Tcl_RegExpMatch _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, CONST char * pattern));
+ CONST char * text, CONST char * pattern));
#endif
#ifndef Tcl_RegExpRange_TCL_DECLARED
#define Tcl_RegExpRange_TCL_DECLARED
@@ -1473,7 +1473,7 @@ EXTERN int Tcl_SetRecursionLimit _ANSI_ARGS_((
#define Tcl_SetResult_TCL_DECLARED
/* 232 */
EXTERN void Tcl_SetResult _ANSI_ARGS_((Tcl_Interp * interp,
- char * str, Tcl_FreeProc * freeProc));
+ char * result, Tcl_FreeProc * freeProc));
#endif
#ifndef Tcl_SetServiceMode_TCL_DECLARED
#define Tcl_SetServiceMode_TCL_DECLARED
@@ -1718,7 +1718,7 @@ EXTERN CONST84_RETURN char * Tcl_HashStats _ANSI_ARGS_((
#define Tcl_ParseVar_TCL_DECLARED
/* 270 */
EXTERN CONST84_RETURN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * str, CONST84 char ** termPtr));
+ CONST char * start, CONST84 char ** termPtr));
#endif
#ifndef Tcl_PkgPresent_TCL_DECLARED
#define Tcl_PkgPresent_TCL_DECLARED
@@ -1970,7 +1970,7 @@ EXTERN void Tcl_ConditionWait _ANSI_ARGS_((
#define Tcl_NumUtfChars_TCL_DECLARED
/* 312 */
EXTERN int Tcl_NumUtfChars _ANSI_ARGS_((CONST char * src,
- int len));
+ int length));
#endif
#ifndef Tcl_ReadChars_TCL_DECLARED
#define Tcl_ReadChars_TCL_DECLARED
@@ -2052,7 +2052,7 @@ EXTERN CONST84_RETURN char * Tcl_UtfAtIndex _ANSI_ARGS_((CONST char * src,
#define Tcl_UtfCharComplete_TCL_DECLARED
/* 326 */
EXTERN int Tcl_UtfCharComplete _ANSI_ARGS_((CONST char * src,
- int len));
+ int length));
#endif
#ifndef Tcl_UtfBackslash_TCL_DECLARED
#define Tcl_UtfBackslash_TCL_DECLARED
@@ -2197,26 +2197,28 @@ EXTERN int Tcl_UniCharIsWordChar _ANSI_ARGS_((int ch));
#ifndef Tcl_UniCharLen_TCL_DECLARED
#define Tcl_UniCharLen_TCL_DECLARED
/* 352 */
-EXTERN int Tcl_UniCharLen _ANSI_ARGS_((CONST Tcl_UniChar * str));
+EXTERN int Tcl_UniCharLen _ANSI_ARGS_((
+ CONST Tcl_UniChar * uniStr));
#endif
#ifndef Tcl_UniCharNcmp_TCL_DECLARED
#define Tcl_UniCharNcmp_TCL_DECLARED
/* 353 */
-EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar * cs,
- CONST Tcl_UniChar * ct, unsigned long n));
+EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((CONST Tcl_UniChar * ucs,
+ CONST Tcl_UniChar * uct,
+ unsigned long numChars));
#endif
#ifndef Tcl_UniCharToUtfDString_TCL_DECLARED
#define Tcl_UniCharToUtfDString_TCL_DECLARED
/* 354 */
EXTERN char * Tcl_UniCharToUtfDString _ANSI_ARGS_((
- CONST Tcl_UniChar * string, int numChars,
+ CONST Tcl_UniChar * uniStr, int uniLength,
Tcl_DString * dsPtr));
#endif
#ifndef Tcl_UtfToUniCharDString_TCL_DECLARED
#define Tcl_UtfToUniCharDString_TCL_DECLARED
/* 355 */
EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString _ANSI_ARGS_((
- CONST char * string, int length,
+ CONST char * src, int length,
Tcl_DString * dsPtr));
#endif
#ifndef Tcl_GetRegExpFromObj_TCL_DECLARED
@@ -2248,7 +2250,7 @@ EXTERN void Tcl_LogCommandInfo _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ParseBraces_TCL_DECLARED
/* 360 */
EXTERN int Tcl_ParseBraces _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string, int numBytes,
+ CONST char * start, int numBytes,
Tcl_Parse * parsePtr, int append,
CONST84 char ** termPtr));
#endif
@@ -2256,21 +2258,21 @@ EXTERN int Tcl_ParseBraces _ANSI_ARGS_((Tcl_Interp * interp,
#define Tcl_ParseCommand_TCL_DECLARED
/* 361 */
EXTERN int Tcl_ParseCommand _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string, int numBytes,
- int nested, Tcl_Parse * parsePtr));
+ CONST char * start, int numBytes, int nested,
+ Tcl_Parse * parsePtr));
#endif
#ifndef Tcl_ParseExpr_TCL_DECLARED
#define Tcl_ParseExpr_TCL_DECLARED
/* 362 */
EXTERN int Tcl_ParseExpr _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string, int numBytes,
+ CONST char * start, int numBytes,
Tcl_Parse * parsePtr));
#endif
#ifndef Tcl_ParseQuotedString_TCL_DECLARED
#define Tcl_ParseQuotedString_TCL_DECLARED
/* 363 */
EXTERN int Tcl_ParseQuotedString _ANSI_ARGS_((
- Tcl_Interp * interp, CONST char * string,
+ Tcl_Interp * interp, CONST char * start,
int numBytes, Tcl_Parse * parsePtr,
int append, CONST84 char ** termPtr));
#endif
@@ -2278,7 +2280,7 @@ EXTERN int Tcl_ParseQuotedString _ANSI_ARGS_((
#define Tcl_ParseVarName_TCL_DECLARED
/* 364 */
EXTERN int Tcl_ParseVarName _ANSI_ARGS_((Tcl_Interp * interp,
- CONST char * string, int numBytes,
+ CONST char * start, int numBytes,
Tcl_Parse * parsePtr, int append));
#endif
#ifndef Tcl_GetCwd_TCL_DECLARED
@@ -2345,7 +2347,7 @@ EXTERN int Tcl_UniCharIsPunct _ANSI_ARGS_((int ch));
#define Tcl_RegExpExecObj_TCL_DECLARED
/* 376 */
EXTERN int Tcl_RegExpExecObj _ANSI_ARGS_((Tcl_Interp * interp,
- Tcl_RegExp regexp, Tcl_Obj * objPtr,
+ Tcl_RegExp regexp, Tcl_Obj * textObj,
int offset, int nmatches, int flags));
#endif
#ifndef Tcl_RegExpGetInfo_TCL_DECLARED
@@ -2398,7 +2400,7 @@ EXTERN void Tcl_AppendUnicodeToObj _ANSI_ARGS_((Tcl_Obj * objPtr,
#define Tcl_RegExpMatchObj_TCL_DECLARED
/* 385 */
EXTERN int Tcl_RegExpMatchObj _ANSI_ARGS_((Tcl_Interp * interp,
- Tcl_Obj * stringObj, Tcl_Obj * patternObj));
+ Tcl_Obj * textObj, Tcl_Obj * patternObj));
#endif
#ifndef Tcl_SetNotifier_TCL_DECLARED
#define Tcl_SetNotifier_TCL_DECLARED
@@ -2597,15 +2599,16 @@ EXTERN int Tcl_IsChannelExisting _ANSI_ARGS_((
#define Tcl_UniCharNcasecmp_TCL_DECLARED
/* 419 */
EXTERN int Tcl_UniCharNcasecmp _ANSI_ARGS_((
- CONST Tcl_UniChar * cs,
- CONST Tcl_UniChar * ct, unsigned long n));
+ CONST Tcl_UniChar * ucs,
+ CONST Tcl_UniChar * uct,
+ unsigned long numChars));
#endif
#ifndef Tcl_UniCharCaseMatch_TCL_DECLARED
#define Tcl_UniCharCaseMatch_TCL_DECLARED
/* 420 */
EXTERN int Tcl_UniCharCaseMatch _ANSI_ARGS_((
- CONST Tcl_UniChar * ustr,
- CONST Tcl_UniChar * pattern, int nocase));
+ CONST Tcl_UniChar * uniStr,
+ CONST Tcl_UniChar * uniPattern, int nocase));
#endif
#ifndef Tcl_FindHashEntry_TCL_DECLARED
#define Tcl_FindHashEntry_TCL_DECLARED
@@ -3510,13 +3513,13 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_DbNewStringObj) _ANSI_ARGS_((CONST char * bytes, int length, CONST char * file, int line)); /* 28 */
Tcl_Obj * (*tcl_DuplicateObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 29 */
void (*tclFreeObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 30 */
- int (*tcl_GetBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * boolPtr)); /* 31 */
+ int (*tcl_GetBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * src, int * boolPtr)); /* 31 */
int (*tcl_GetBooleanFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * boolPtr)); /* 32 */
unsigned char * (*tcl_GetByteArrayFromObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int * lengthPtr)); /* 33 */
- int (*tcl_GetDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * doublePtr)); /* 34 */
+ int (*tcl_GetDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * src, double * doublePtr)); /* 34 */
int (*tcl_GetDoubleFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * doublePtr)); /* 35 */
int (*tcl_GetIndexFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, CONST84 char ** tablePtr, CONST char * msg, int flags, int * indexPtr)); /* 36 */
- int (*tcl_GetInt) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * intPtr)); /* 37 */
+ int (*tcl_GetInt) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * src, int * intPtr)); /* 37 */
int (*tcl_GetIntFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * intPtr)); /* 38 */
int (*tcl_GetLongFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * longPtr)); /* 39 */
Tcl_ObjType * (*tcl_GetObjType) _ANSI_ARGS_((CONST char * typeName)); /* 40 */
@@ -3548,7 +3551,7 @@ typedef struct TclStubs {
void (*tcl_AddErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message)); /* 66 */
void (*tcl_AddObjErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message, int length)); /* 67 */
void (*tcl_AllowExceptions) _ANSI_ARGS_((Tcl_Interp * interp)); /* 68 */
- void (*tcl_AppendElement) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 69 */
+ void (*tcl_AppendElement) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * element)); /* 69 */
void (*tcl_AppendResult) _ANSI_ARGS_(TCL_VARARGS(Tcl_Interp *,interp)); /* 70 */
Tcl_AsyncHandler (*tcl_AsyncCreate) _ANSI_ARGS_((Tcl_AsyncProc * proc, ClientData clientData)); /* 71 */
void (*tcl_AsyncDelete) _ANSI_ARGS_((Tcl_AsyncHandler async)); /* 72 */
@@ -3601,8 +3604,8 @@ typedef struct TclStubs {
void (*tcl_DontCallWhenDeleted) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_InterpDeleteProc * proc, ClientData clientData)); /* 114 */
int (*tcl_DoOneEvent) _ANSI_ARGS_((int flags)); /* 115 */
void (*tcl_DoWhenIdle) _ANSI_ARGS_((Tcl_IdleProc * proc, ClientData clientData)); /* 116 */
- char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * str, int length)); /* 117 */
- char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * string)); /* 118 */
+ char * (*tcl_DStringAppend) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * bytes, int length)); /* 117 */
+ char * (*tcl_DStringAppendElement) _ANSI_ARGS_((Tcl_DString * dsPtr, CONST char * element)); /* 118 */
void (*tcl_DStringEndSublist) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 119 */
void (*tcl_DStringFree) _ANSI_ARGS_((Tcl_DString * dsPtr)); /* 120 */
void (*tcl_DStringGetResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * dsPtr)); /* 121 */
@@ -3613,20 +3616,20 @@ typedef struct TclStubs {
int (*tcl_Eof) _ANSI_ARGS_((Tcl_Channel chan)); /* 126 */
CONST84_RETURN char * (*tcl_ErrnoId) _ANSI_ARGS_((void)); /* 127 */
CONST84_RETURN char * (*tcl_ErrnoMsg) _ANSI_ARGS_((int err)); /* 128 */
- int (*tcl_Eval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 129 */
+ int (*tcl_Eval) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * script)); /* 129 */
int (*tcl_EvalFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * fileName)); /* 130 */
int (*tcl_EvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 131 */
void (*tcl_EventuallyFree) _ANSI_ARGS_((ClientData clientData, Tcl_FreeProc * freeProc)); /* 132 */
void (*tcl_Exit) _ANSI_ARGS_((int status)); /* 133 */
int (*tcl_ExposeCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * hiddenCmdToken, CONST char * cmdName)); /* 134 */
- int (*tcl_ExprBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int * ptr)); /* 135 */
+ int (*tcl_ExprBoolean) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * expr, int * ptr)); /* 135 */
int (*tcl_ExprBooleanObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, int * ptr)); /* 136 */
- int (*tcl_ExprDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, double * ptr)); /* 137 */
+ int (*tcl_ExprDouble) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * expr, double * ptr)); /* 137 */
int (*tcl_ExprDoubleObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, double * ptr)); /* 138 */
- int (*tcl_ExprLong) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, long * ptr)); /* 139 */
+ int (*tcl_ExprLong) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * expr, long * ptr)); /* 139 */
int (*tcl_ExprLongObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, long * ptr)); /* 140 */
int (*tcl_ExprObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_Obj ** resultPtrPtr)); /* 141 */
- int (*tcl_ExprString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * exprString)); /* 142 */
+ int (*tcl_ExprString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * expr)); /* 142 */
void (*tcl_Finalize) _ANSI_ARGS_((void)); /* 143 */
void (*tcl_FindExecutable) _ANSI_ARGS_((CONST char * argv0)); /* 144 */
Tcl_HashEntry * (*tcl_FirstHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr)); /* 145 */
@@ -3652,7 +3655,7 @@ typedef struct TclStubs {
CONST char * (*tcl_GetNameOfExecutable) _ANSI_ARGS_((void)); /* 165 */
Tcl_Obj * (*tcl_GetObjResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 166 */
#if !defined(__WIN32__) /* UNIX */
- int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, int forWriting, int checkUsage, ClientData * filePtr)); /* 167 */
+ int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * chanID, int forWriting, int checkUsage, ClientData * filePtr)); /* 167 */
#endif /* UNIX */
#ifdef __WIN32__
void *reserved167;
@@ -3697,7 +3700,7 @@ typedef struct TclStubs {
Tcl_Channel (*tcl_OpenTcpServer) _ANSI_ARGS_((Tcl_Interp * interp, int port, CONST char * host, Tcl_TcpAcceptProc * acceptProc, ClientData callbackData)); /* 200 */
void (*tcl_Preserve) _ANSI_ARGS_((ClientData data)); /* 201 */
void (*tcl_PrintDouble) _ANSI_ARGS_((Tcl_Interp * interp, double value, char * dst)); /* 202 */
- int (*tcl_PutEnv) _ANSI_ARGS_((CONST char * string)); /* 203 */
+ int (*tcl_PutEnv) _ANSI_ARGS_((CONST char * assignment)); /* 203 */
CONST84_RETURN char * (*tcl_PosixError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 204 */
void (*tcl_QueueEvent) _ANSI_ARGS_((Tcl_Event * evPtr, Tcl_QueuePosition position)); /* 205 */
int (*tcl_Read) _ANSI_ARGS_((Tcl_Channel chan, char * bufPtr, int toRead)); /* 206 */
@@ -3711,9 +3714,9 @@ typedef struct TclStubs {
int (*tcl_RecordAndEvalObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * cmdPtr, int flags)); /* 209 */
void (*tcl_RegisterChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Channel chan)); /* 210 */
void (*tcl_RegisterObjType) _ANSI_ARGS_((Tcl_ObjType * typePtr)); /* 211 */
- Tcl_RegExp (*tcl_RegExpCompile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string)); /* 212 */
- int (*tcl_RegExpExec) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * str, CONST char * start)); /* 213 */
- int (*tcl_RegExpMatch) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, CONST char * pattern)); /* 214 */
+ Tcl_RegExp (*tcl_RegExpCompile) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * pattern)); /* 212 */
+ int (*tcl_RegExpExec) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, CONST char * text, CONST char * start)); /* 213 */
+ int (*tcl_RegExpMatch) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * text, CONST char * pattern)); /* 214 */
void (*tcl_RegExpRange) _ANSI_ARGS_((Tcl_RegExp regexp, int index, CONST84 char ** startPtr, CONST84 char ** endPtr)); /* 215 */
void (*tcl_Release) _ANSI_ARGS_((ClientData clientData)); /* 216 */
void (*tcl_ResetResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 217 */
@@ -3731,7 +3734,7 @@ typedef struct TclStubs {
void (*tcl_SetMaxBlockTime) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 229 */
void (*tcl_SetPanicProc) _ANSI_ARGS_((Tcl_PanicProc * panicProc)); /* 230 */
int (*tcl_SetRecursionLimit) _ANSI_ARGS_((Tcl_Interp * interp, int depth)); /* 231 */
- void (*tcl_SetResult) _ANSI_ARGS_((Tcl_Interp * interp, char * str, Tcl_FreeProc * freeProc)); /* 232 */
+ void (*tcl_SetResult) _ANSI_ARGS_((Tcl_Interp * interp, char * result, Tcl_FreeProc * freeProc)); /* 232 */
int (*tcl_SetServiceMode) _ANSI_ARGS_((int mode)); /* 233 */
void (*tcl_SetObjErrorCode) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * errorObjPtr)); /* 234 */
void (*tcl_SetObjResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * resultObjPtr)); /* 235 */
@@ -3769,7 +3772,7 @@ typedef struct TclStubs {
void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */
void (*tcl_AppendStringsToObjVA) _ANSI_ARGS_((Tcl_Obj * objPtr, va_list argList)); /* 268 */
CONST84_RETURN char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
- CONST84_RETURN char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * str, CONST84 char ** termPtr)); /* 270 */
+ CONST84_RETURN char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, CONST84 char ** termPtr)); /* 270 */
CONST84_RETURN char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 271 */
CONST84_RETURN char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 272 */
int (*tcl_PkgProvide) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version)); /* 273 */
@@ -3811,7 +3814,7 @@ typedef struct TclStubs {
void (*tcl_MutexUnlock) _ANSI_ARGS_((Tcl_Mutex * mutexPtr)); /* 309 */
void (*tcl_ConditionNotify) _ANSI_ARGS_((Tcl_Condition * condPtr)); /* 310 */
void (*tcl_ConditionWait) _ANSI_ARGS_((Tcl_Condition * condPtr, Tcl_Mutex * mutexPtr, Tcl_Time * timePtr)); /* 311 */
- int (*tcl_NumUtfChars) _ANSI_ARGS_((CONST char * src, int len)); /* 312 */
+ int (*tcl_NumUtfChars) _ANSI_ARGS_((CONST char * src, int length)); /* 312 */
int (*tcl_ReadChars) _ANSI_ARGS_((Tcl_Channel channel, Tcl_Obj * objPtr, int charsToRead, int appendFlag)); /* 313 */
void (*tcl_RestoreResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_SavedResult * statePtr)); /* 314 */
void (*tcl_SaveResult) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_SavedResult * statePtr)); /* 315 */
@@ -3825,7 +3828,7 @@ typedef struct TclStubs {
Tcl_UniChar (*tcl_UniCharToUpper) _ANSI_ARGS_((int ch)); /* 323 */
int (*tcl_UniCharToUtf) _ANSI_ARGS_((int ch, char * buf)); /* 324 */
CONST84_RETURN char * (*tcl_UtfAtIndex) _ANSI_ARGS_((CONST char * src, int index)); /* 325 */
- int (*tcl_UtfCharComplete) _ANSI_ARGS_((CONST char * src, int len)); /* 326 */
+ int (*tcl_UtfCharComplete) _ANSI_ARGS_((CONST char * src, int length)); /* 326 */
int (*tcl_UtfBackslash) _ANSI_ARGS_((CONST char * src, int * readPtr, char * dst)); /* 327 */
CONST84_RETURN char * (*tcl_UtfFindFirst) _ANSI_ARGS_((CONST char * src, int ch)); /* 328 */
CONST84_RETURN char * (*tcl_UtfFindLast) _ANSI_ARGS_((CONST char * src, int ch)); /* 329 */
@@ -3851,19 +3854,19 @@ typedef struct TclStubs {
int (*tcl_UniCharIsSpace) _ANSI_ARGS_((int ch)); /* 349 */
int (*tcl_UniCharIsUpper) _ANSI_ARGS_((int ch)); /* 350 */
int (*tcl_UniCharIsWordChar) _ANSI_ARGS_((int ch)); /* 351 */
- int (*tcl_UniCharLen) _ANSI_ARGS_((CONST Tcl_UniChar * str)); /* 352 */
- int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 353 */
- char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */
- Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */
+ int (*tcl_UniCharLen) _ANSI_ARGS_((CONST Tcl_UniChar * uniStr)); /* 352 */
+ int (*tcl_UniCharNcmp) _ANSI_ARGS_((CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars)); /* 353 */
+ char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * uniStr, int uniLength, Tcl_DString * dsPtr)); /* 354 */
+ Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * src, int length, Tcl_DString * dsPtr)); /* 355 */
Tcl_RegExp (*tcl_GetRegExpFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * patObj, int flags)); /* 356 */
Tcl_Obj * (*tcl_EvalTokens) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Token * tokenPtr, int count)); /* 357 */
void (*tcl_FreeParse) _ANSI_ARGS_((Tcl_Parse * parsePtr)); /* 358 */
void (*tcl_LogCommandInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * script, CONST char * command, int length)); /* 359 */
- int (*tcl_ParseBraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 360 */
- int (*tcl_ParseCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, int nested, Tcl_Parse * parsePtr)); /* 361 */
- int (*tcl_ParseExpr) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr)); /* 362 */
- int (*tcl_ParseQuotedString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 363 */
- int (*tcl_ParseVarName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * string, int numBytes, Tcl_Parse * parsePtr, int append)); /* 364 */
+ int (*tcl_ParseBraces) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 360 */
+ int (*tcl_ParseCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, int numBytes, int nested, Tcl_Parse * parsePtr)); /* 361 */
+ int (*tcl_ParseExpr) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr)); /* 362 */
+ int (*tcl_ParseQuotedString) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append, CONST84 char ** termPtr)); /* 363 */
+ int (*tcl_ParseVarName) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * start, int numBytes, Tcl_Parse * parsePtr, int append)); /* 364 */
char * (*tcl_GetCwd) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_DString * cwdPtr)); /* 365 */
int (*tcl_Chdir) _ANSI_ARGS_((CONST char * dirName)); /* 366 */
int (*tcl_Access) _ANSI_ARGS_((CONST char * path, int mode)); /* 367 */
@@ -3875,7 +3878,7 @@ typedef struct TclStubs {
int (*tcl_UniCharIsGraph) _ANSI_ARGS_((int ch)); /* 373 */
int (*tcl_UniCharIsPrint) _ANSI_ARGS_((int ch)); /* 374 */
int (*tcl_UniCharIsPunct) _ANSI_ARGS_((int ch)); /* 375 */
- int (*tcl_RegExpExecObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * objPtr, int offset, int nmatches, int flags)); /* 376 */
+ int (*tcl_RegExpExecObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * textObj, int offset, int nmatches, int flags)); /* 376 */
void (*tcl_RegExpGetInfo) _ANSI_ARGS_((Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr)); /* 377 */
Tcl_Obj * (*tcl_NewUnicodeObj) _ANSI_ARGS_((CONST Tcl_UniChar * unicode, int numChars)); /* 378 */
void (*tcl_SetUnicodeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars)); /* 379 */
@@ -3884,7 +3887,7 @@ typedef struct TclStubs {
Tcl_UniChar * (*tcl_GetUnicode) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 382 */
Tcl_Obj * (*tcl_GetRange) _ANSI_ARGS_((Tcl_Obj * objPtr, int first, int last)); /* 383 */
void (*tcl_AppendUnicodeToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length)); /* 384 */
- int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * stringObj, Tcl_Obj * patternObj)); /* 385 */
+ int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * textObj, Tcl_Obj * patternObj)); /* 385 */
void (*tcl_SetNotifier) _ANSI_ARGS_((Tcl_NotifierProcs * notifierProcPtr)); /* 386 */
Tcl_Mutex * (*tcl_GetAllocMutex) _ANSI_ARGS_((void)); /* 387 */
int (*tcl_GetChannelNames) _ANSI_ARGS_((Tcl_Interp * interp)); /* 388 */
@@ -3918,8 +3921,8 @@ typedef struct TclStubs {
void (*tcl_SpliceChannel) _ANSI_ARGS_((Tcl_Channel channel)); /* 416 */
void (*tcl_ClearChannelHandlers) _ANSI_ARGS_((Tcl_Channel channel)); /* 417 */
int (*tcl_IsChannelExisting) _ANSI_ARGS_((CONST char* channelName)); /* 418 */
- int (*tcl_UniCharNcasecmp) _ANSI_ARGS_((CONST Tcl_UniChar * cs, CONST Tcl_UniChar * ct, unsigned long n)); /* 419 */
- int (*tcl_UniCharCaseMatch) _ANSI_ARGS_((CONST Tcl_UniChar * ustr, CONST Tcl_UniChar * pattern, int nocase)); /* 420 */
+ int (*tcl_UniCharNcasecmp) _ANSI_ARGS_((CONST Tcl_UniChar * ucs, CONST Tcl_UniChar * uct, unsigned long numChars)); /* 419 */
+ int (*tcl_UniCharCaseMatch) _ANSI_ARGS_((CONST Tcl_UniChar * uniStr, CONST Tcl_UniChar * uniPattern, int nocase)); /* 420 */
Tcl_HashEntry * (*tcl_FindHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key)); /* 421 */
Tcl_HashEntry * (*tcl_CreateHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, CONST char * key, int * newPtr)); /* 422 */
void (*tcl_InitCustomHashTable) _ANSI_ARGS_((Tcl_HashTable * tablePtr, int keyType, Tcl_HashKeyType * typePtr)); /* 423 */
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index af7ddcd..e4d7b23 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEnv.c,v 1.22 2004/04/06 22:25:50 dgp Exp $
+ * RCS: @(#) $Id: tclEnv.c,v 1.23 2005/05/03 18:08:17 dgp Exp $
*/
#include "tclInt.h"
@@ -320,15 +320,15 @@ TclSetEnv(name, value)
*/
int
-Tcl_PutEnv(string)
- CONST char *string; /* Info about environment variable in the
+Tcl_PutEnv(assignment)
+ CONST char *assignment; /* Info about environment variable in the
* form NAME=value. (native) */
{
Tcl_DString nameString;
CONST char *name;
char *value;
- if (string == NULL) {
+ if (assignment == NULL) {
return 0;
}
@@ -338,7 +338,7 @@ Tcl_PutEnv(string)
* all of the real work.
*/
- name = Tcl_ExternalToUtfDString(NULL, string, -1, &nameString);
+ name = Tcl_ExternalToUtfDString(NULL, assignment, -1, &nameString);
value = strchr(name, '=');
if ((value != NULL) && (value != name)) {
diff --git a/generic/tclGet.c b/generic/tclGet.c
index bfc3501..1804088 100644
--- a/generic/tclGet.c
+++ b/generic/tclGet.c
@@ -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: tclGet.c,v 1.13 2005/04/22 15:46:57 dgp Exp $
+ * RCS: @(#) $Id: tclGet.c,v 1.14 2005/05/03 18:08:18 dgp Exp $
*/
#include "tclInt.h"
@@ -26,8 +26,8 @@
*
* Results:
* The return value is normally TCL_OK; in this case *intPtr
- * will be set to the integer value equivalent to string. If
- * string is improperly formed then TCL_ERROR is returned and
+ * will be set to the integer value equivalent to src. If
+ * src is improperly formed then TCL_ERROR is returned and
* an error message will be left in the interp's result.
*
* Side effects:
@@ -37,9 +37,9 @@
*/
int
-Tcl_GetInt(interp, str, intPtr)
+Tcl_GetInt(interp, src, intPtr)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
- CONST char *str; /* String containing a (possibly signed)
+ CONST char *src; /* String containing a (possibly signed)
* integer in a form acceptable to strtoul. */
int *intPtr; /* Place to store converted result. */
{
@@ -47,8 +47,8 @@ Tcl_GetInt(interp, str, intPtr)
int code;
obj.refCount = 1;
- obj.bytes = (char *) str;
- obj.length = strlen(str);
+ obj.bytes = (char *) src;
+ obj.length = strlen(src);
obj.typePtr = NULL;
code = Tcl_GetIntFromObj(interp, &obj, intPtr);
@@ -69,8 +69,8 @@ Tcl_GetInt(interp, str, intPtr)
*
* Results:
* The return value is normally TCL_OK; in this case *longPtr
- * will be set to the long integer value equivalent to string. If
- * string is improperly formed then TCL_ERROR is returned and
+ * will be set to the long integer value equivalent to src. If
+ * src is improperly formed then TCL_ERROR is returned and
* an error message will be left in the interp's result if interp
* is non-NULL.
*
@@ -81,10 +81,10 @@ Tcl_GetInt(interp, str, intPtr)
*/
int
-TclGetLong(interp, str, longPtr)
+TclGetLong(interp, src, longPtr)
Tcl_Interp *interp; /* Interpreter used for error reporting
* if not NULL. */
- CONST char *str; /* String containing a (possibly signed)
+ CONST char *src; /* String containing a (possibly signed)
* long integer in a form acceptable to
* strtoul. */
long *longPtr; /* Place to store converted long result. */
@@ -93,8 +93,8 @@ TclGetLong(interp, str, longPtr)
int code;
obj.refCount = 1;
- obj.bytes = (char *) str;
- obj.length = strlen(str);
+ obj.bytes = (char *) src;
+ obj.length = strlen(src);
obj.typePtr = NULL;
code = Tcl_GetLongFromObj(interp, &obj, longPtr);
@@ -114,8 +114,8 @@ TclGetLong(interp, str, longPtr)
*
* Results:
* The return value is normally TCL_OK; in this case *doublePtr
- * will be set to the double-precision value equivalent to string.
- * If string is improperly formed then TCL_ERROR is returned and
+ * will be set to the double-precision value equivalent to src.
+ * If src is improperly formed then TCL_ERROR is returned and
* an error message will be left in the interp's result.
*
* Side effects:
@@ -125,9 +125,9 @@ TclGetLong(interp, str, longPtr)
*/
int
-Tcl_GetDouble(interp, str, doublePtr)
+Tcl_GetDouble(interp, src, doublePtr)
Tcl_Interp *interp; /* Interpreter used for error reporting. */
- CONST char *str; /* String containing a floating-point number
+ CONST char *src; /* String containing a floating-point number
* in a form acceptable to strtod. */
double *doublePtr; /* Place to store converted result. */
{
@@ -135,8 +135,8 @@ Tcl_GetDouble(interp, str, doublePtr)
int code;
obj.refCount = 1;
- obj.bytes = (char *) str;
- obj.length = strlen(str);
+ obj.bytes = (char *) src;
+ obj.length = strlen(src);
obj.typePtr = NULL;
code = Tcl_GetDoubleFromObj(interp, &obj, doublePtr);
@@ -156,8 +156,8 @@ Tcl_GetDouble(interp, str, doublePtr)
*
* Results:
* The return value is normally TCL_OK; in this case *boolPtr
- * will be set to the 0/1 value equivalent to string. If
- * string is improperly formed then TCL_ERROR is returned and
+ * will be set to the 0/1 value equivalent to src. If
+ * src is improperly formed then TCL_ERROR is returned and
* an error message will be left in the interp's result.
*
* Side effects:
@@ -167,9 +167,9 @@ Tcl_GetDouble(interp, str, doublePtr)
*/
int
-Tcl_GetBoolean(interp, str, boolPtr)
+Tcl_GetBoolean(interp, src, boolPtr)
Tcl_Interp *interp; /* Interpreter used for error reporting. */
- CONST char *str; /* String containing a boolean number
+ CONST char *src; /* String containing a boolean number
* specified either as 1/0 or true/false or
* yes/no. */
int *boolPtr; /* Place to store converted result, which
@@ -179,8 +179,8 @@ Tcl_GetBoolean(interp, str, boolPtr)
int code;
obj.refCount = 1;
- obj.bytes = (char *) str;
- obj.length = strlen(str);
+ obj.bytes = (char *) src;
+ obj.length = strlen(src);
obj.typePtr = NULL;
code = Tcl_ConvertToType(interp, &obj, &tclBooleanType);
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 10eabdd..9700f93 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -13,7 +13,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.40 2005/03/18 15:51:00 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.41 2005/05/03 18:08:18 dgp Exp $
*/
#include "tclInt.h"
@@ -243,11 +243,11 @@ TclParseInit(interp, string, numBytes, parsePtr)
*/
int
-Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
+Tcl_ParseCommand(interp, start, numBytes, nested, parsePtr)
Tcl_Interp *interp; /* Interpreter to use for error reporting;
* if NULL, then no error message is
* provided. */
- CONST char *string; /* First character of string containing
+ CONST char *start; /* First character of string containing
* one or more Tcl commands. */
register int numBytes; /* Total number of bytes in string. If < 0,
* the script consists of all bytes up to
@@ -273,16 +273,16 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
* point to char after terminating one. */
int scanned;
- if ((string == NULL) && (numBytes>0)) {
+ if ((start == NULL) && (numBytes>0)) {
if (interp != NULL) {
Tcl_SetResult(interp, "can't parse a NULL pointer", TCL_STATIC);
}
return TCL_ERROR;
}
if (numBytes < 0) {
- numBytes = strlen(string);
+ numBytes = strlen(start);
}
- TclParseInit(interp, string, numBytes, parsePtr);
+ TclParseInit(interp, start, numBytes, parsePtr);
parsePtr->commentStart = NULL;
parsePtr->commentSize = 0;
parsePtr->commandStart = NULL;
@@ -298,8 +298,8 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
* command.
*/
- scanned = ParseComment(string, numBytes, parsePtr);
- src = (string + scanned); numBytes -= scanned;
+ scanned = ParseComment(start, numBytes, parsePtr);
+ src = (start + scanned); numBytes -= scanned;
if (numBytes == 0) {
if (nested) {
parsePtr->incomplete = nested;
@@ -1148,12 +1148,12 @@ TclExpandTokenArray(parsePtr)
*/
int
-Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
+Tcl_ParseVarName(interp, start, numBytes, parsePtr, append)
Tcl_Interp *interp; /* Interpreter to use for error reporting;
* if NULL, then no error message is
* provided. */
- CONST char *string; /* String containing variable name. First
- * character must be "$". */
+ CONST char *start; /* Start of variable substitution string.
+ * First character must be "$". */
register int numBytes; /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to the
* first null character. */
@@ -1171,15 +1171,15 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
Tcl_UniChar ch;
unsigned array;
- if ((numBytes == 0) || (string == NULL)) {
+ if ((numBytes == 0) || (start == NULL)) {
return TCL_ERROR;
}
if (numBytes < 0) {
- numBytes = strlen(string);
+ numBytes = strlen(start);
}
if (!append) {
- TclParseInit(interp, string, numBytes, parsePtr);
+ TclParseInit(interp, start, numBytes, parsePtr);
}
/*
@@ -1188,7 +1188,7 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
* there is one.
*/
- src = string;
+ src = start;
if ((parsePtr->numTokens + 2) > parsePtr->tokensAvailable) {
TclExpandTokenArray(parsePtr);
}
@@ -1354,9 +1354,9 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
*/
CONST char *
-Tcl_ParseVar(interp, string, termPtr)
+Tcl_ParseVar(interp, start, termPtr)
Tcl_Interp *interp; /* Context for looking up variable. */
- register CONST char *string; /* String containing variable name.
+ register CONST char *start; /* Start of variable substitution.
* First character must be "$". */
CONST char **termPtr; /* If non-NULL, points to word to fill
* in with character just after last
@@ -1367,12 +1367,12 @@ Tcl_ParseVar(interp, string, termPtr)
register Tcl_Obj *objPtr;
int code;
- if (Tcl_ParseVarName(interp, string, -1, &parse, 0) != TCL_OK) {
+ if (Tcl_ParseVarName(interp, start, -1, &parse, 0) != TCL_OK) {
return NULL;
}
if (termPtr != NULL) {
- *termPtr = string + parse.tokenPtr->size;
+ *termPtr = start + parse.tokenPtr->size;
}
if (parse.numTokens == 1) {
/*
@@ -1436,12 +1436,12 @@ Tcl_ParseVar(interp, string, termPtr)
*/
int
-Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
+Tcl_ParseBraces(interp, start, numBytes, parsePtr, append, termPtr)
Tcl_Interp *interp; /* Interpreter to use for error reporting;
* if NULL, then no error message is
* provided. */
- CONST char *string; /* String containing the string in braces.
- * The first character must be '{'. */
+ CONST char *start; /* Start of string enclosed in braces.
+ * The first character must be {'. */
register int numBytes; /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to
* the first null character. */
@@ -1462,18 +1462,18 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
register CONST char *src;
int startIndex, level, length;
- if ((numBytes == 0) || (string == NULL)) {
+ if ((numBytes == 0) || (start == NULL)) {
return TCL_ERROR;
}
if (numBytes < 0) {
- numBytes = strlen(string);
+ numBytes = strlen(start);
}
if (!append) {
- TclParseInit(interp, string, numBytes, parsePtr);
+ TclParseInit(interp, start, numBytes, parsePtr);
}
- src = string;
+ src = start;
startIndex = parsePtr->numTokens;
if (parsePtr->numTokens == parsePtr->tokensAvailable) {
@@ -1494,7 +1494,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
register int openBrace = 0;
parsePtr->errorType = TCL_PARSE_MISSING_BRACE;
- parsePtr->term = string;
+ parsePtr->term = start;
parsePtr->incomplete = 1;
if (interp == NULL) {
/*
@@ -1514,7 +1514,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
* by a '<whitespace>#' on the same line.
*/
- for (; src > string; src--) {
+ for (; src > start; src--) {
switch (*src) {
case '{':
openBrace = 1;
@@ -1640,11 +1640,11 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
*/
int
-Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr)
+Tcl_ParseQuotedString(interp, start, numBytes, parsePtr, append, termPtr)
Tcl_Interp *interp; /* Interpreter to use for error reporting;
* if NULL, then no error message is
* provided. */
- CONST char *string; /* String containing the quoted string.
+ CONST char *start; /* Start of the quoted string.
* The first character must be '"'. */
register int numBytes; /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to
@@ -1661,18 +1661,18 @@ Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr)
* after the quoted string's terminating
* close-quote if the parse succeeds. */
{
- if ((numBytes == 0) || (string == NULL)) {
+ if ((numBytes == 0) || (start == NULL)) {
return TCL_ERROR;
}
if (numBytes < 0) {
- numBytes = strlen(string);
+ numBytes = strlen(start);
}
if (!append) {
- TclParseInit(interp, string, numBytes, parsePtr);
+ TclParseInit(interp, start, numBytes, parsePtr);
}
- if (TCL_OK != ParseTokens(string+1, numBytes-1, TYPE_QUOTE,
+ if (TCL_OK != ParseTokens(start+1, numBytes-1, TYPE_QUOTE,
TCL_SUBST_ALL, parsePtr)) {
goto error;
}
@@ -1681,7 +1681,7 @@ Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr)
Tcl_SetResult(parsePtr->interp, "missing \"", TCL_STATIC);
}
parsePtr->errorType = TCL_PARSE_MISSING_QUOTE;
- parsePtr->term = string;
+ parsePtr->term = start;
parsePtr->incomplete = 1;
goto error;
}
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c
index 2a1c151..61860f6 100644
--- a/generic/tclParseExpr.c
+++ b/generic/tclParseExpr.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParseExpr.c,v 1.23 2004/10/08 15:39:55 dkf Exp $
+ * RCS: @(#) $Id: tclParseExpr.c,v 1.24 2005/05/03 18:08:19 dgp Exp $
*/
#include "tclInt.h"
@@ -205,7 +205,7 @@ static void PrependSubExprTokens _ANSI_ARGS_((CONST char *op,
* Given a string, this procedure parses the first Tcl expression
* in the string and returns information about the structure of
* the expression. This procedure is the top-level interface to the
- * the expression parsing module. No more that numBytes bytes will
+ * the expression parsing module. No more than numBytes bytes will
* be scanned.
*
* Results:
@@ -226,9 +226,9 @@ static void PrependSubExprTokens _ANSI_ARGS_((CONST char *op,
*/
int
-Tcl_ParseExpr(interp, string, numBytes, parsePtr)
+Tcl_ParseExpr(interp, start, numBytes, parsePtr)
Tcl_Interp *interp; /* Used for error reporting. */
- CONST char *string; /* The source string to parse. */
+ CONST char *start; /* Start of source string to parse. */
int numBytes; /* Number of bytes in string. If < 0, the
* string consists of all bytes up to the
* first null character. */
@@ -241,16 +241,16 @@ Tcl_ParseExpr(interp, string, numBytes, parsePtr)
int code;
if (numBytes < 0) {
- numBytes = (string? strlen(string) : 0);
+ numBytes = (start? strlen(start) : 0);
}
#ifdef TCL_COMPILE_DEBUG
if (traceParseExpr) {
fprintf(stderr, "Tcl_ParseExpr: string=\"%.*s\"\n",
- numBytes, string);
+ numBytes, start);
}
#endif /* TCL_COMPILE_DEBUG */
- TclParseInit(interp, string, numBytes, parsePtr);
+ TclParseInit(interp, start, numBytes, parsePtr);
/*
* Initialize the ParseInfo structure that holds state while parsing
@@ -261,10 +261,10 @@ Tcl_ParseExpr(interp, string, numBytes, parsePtr)
info.lexeme = UNKNOWN;
info.start = NULL;
info.size = 0;
- info.next = string;
- info.prevEnd = string;
- info.originalExpr = string;
- info.lastChar = (string + numBytes); /* just after last char of expr */
+ info.next = start;
+ info.prevEnd = start;
+ info.originalExpr = start;
+ info.lastChar = (start + numBytes); /* just after last char of expr */
/*
* Get the first lexeme then parse the expression.
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 1909ed6..25c30dc 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclRegexp.c,v 1.17 2004/09/29 22:23:25 dkf Exp $
+ * RCS: @(#) $Id: tclRegexp.c,v 1.18 2005/05/03 18:08:19 dgp Exp $
*/
#include "tclInt.h"
@@ -137,13 +137,13 @@ Tcl_ObjType tclRegexpType = {
*/
Tcl_RegExp
-Tcl_RegExpCompile(interp, string)
+Tcl_RegExpCompile(interp, pattern)
Tcl_Interp *interp; /* For use in error reporting and
* to access the interp regexp cache. */
- CONST char *string; /* String for which to produce
+ CONST char *pattern; /* String for which to produce
* compiled regular expression. */
{
- return (Tcl_RegExp) CompileRegexp(interp, string, (int) strlen(string),
+ return (Tcl_RegExp) CompileRegexp(interp, pattern, (int) strlen(pattern),
REG_ADVANCED);
}
@@ -169,13 +169,13 @@ Tcl_RegExpCompile(interp, string)
*/
int
-Tcl_RegExpExec(interp, re, string, start)
+Tcl_RegExpExec(interp, re, text, start)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tcl_RegExp re; /* Compiled regular expression; must have
* been returned by previous call to
* Tcl_GetRegExpFromObj. */
- CONST char *string; /* String against which to match re. */
- CONST char *start; /* If string is part of a larger string,
+ CONST char *text; /* Text against which to match re. */
+ CONST char *start; /* If text is part of a larger string,
* this identifies beginning of larger
* string, so that "^" won't match. */
{
@@ -189,7 +189,7 @@ Tcl_RegExpExec(interp, re, string, start)
* then we need to tell the regexp engine not to match "^".
*/
- if (string > start) {
+ if (text > start) {
flags = REG_NOTBOL;
} else {
flags = 0;
@@ -199,7 +199,7 @@ Tcl_RegExpExec(interp, re, string, start)
* Remember the string for use by Tcl_RegExpRange().
*/
- regexp->string = string;
+ regexp->string = text;
regexp->objPtr = NULL;
/*
@@ -207,7 +207,7 @@ Tcl_RegExpExec(interp, re, string, start)
*/
Tcl_DStringInit(&ds);
- ustr = Tcl_UtfToUniCharDString(string, -1, &ds);
+ ustr = Tcl_UtfToUniCharDString(text, -1, &ds);
numChars = Tcl_DStringLength(&ds) / sizeof(Tcl_UniChar);
result = RegExpExecUniChar(interp, re, ustr, numChars,
-1 /* nmatches */, flags);
@@ -385,7 +385,7 @@ TclRegExpRangeUniChar(re, index, startPtr, endPtr)
* Results:
* If an error occurs during the matching operation then -1
* is returned and the interp's result contains an error message.
- * Otherwise the return value is 1 if "string" matches "pattern"
+ * Otherwise the return value is 1 if "text" matches "pattern"
* and 0 otherwise.
*
* Side effects:
@@ -395,11 +395,10 @@ TclRegExpRangeUniChar(re, index, startPtr, endPtr)
*/
int
-Tcl_RegExpMatch(interp, string, pattern)
+Tcl_RegExpMatch(interp, text, pattern)
Tcl_Interp *interp; /* Used for error reporting. May be NULL. */
- CONST char *string; /* String. */
- CONST char *pattern; /* Regular expression to match against
- * string. */
+ CONST char *text; /* Text to search for pattern matches. */
+ CONST char *pattern; /* Regular expression to match against text. */
{
Tcl_RegExp re;
@@ -407,7 +406,7 @@ Tcl_RegExpMatch(interp, string, pattern)
if (re == NULL) {
return -1;
}
- return Tcl_RegExpExec(interp, re, string, string);
+ return Tcl_RegExpExec(interp, re, text, text);
}
/*
@@ -430,12 +429,12 @@ Tcl_RegExpMatch(interp, string, pattern)
*/
int
-Tcl_RegExpExecObj(interp, re, objPtr, offset, nmatches, flags)
+Tcl_RegExpExecObj(interp, re, textObj, offset, nmatches, flags)
Tcl_Interp *interp; /* Interpreter to use for error reporting. */
Tcl_RegExp re; /* Compiled regular expression; must have
* been returned by previous call to
* Tcl_GetRegExpFromObj. */
- Tcl_Obj *objPtr; /* String against which to match re. */
+ Tcl_Obj *textObj; /* Text against which to match re. */
int offset; /* Character index that marks where matching
* should begin. */
int nmatches; /* How many subexpression matches (counting
@@ -452,9 +451,9 @@ Tcl_RegExpExecObj(interp, re, objPtr, offset, nmatches, flags)
*/
regexpPtr->string = NULL;
- regexpPtr->objPtr = objPtr;
+ regexpPtr->objPtr = textObj;
- udata = Tcl_GetUnicodeFromObj(objPtr, &length);
+ udata = Tcl_GetUnicodeFromObj(textObj, &length);
if (offset > length) {
offset = length;
@@ -475,7 +474,7 @@ Tcl_RegExpExecObj(interp, re, objPtr, offset, nmatches, flags)
* Results:
* If an error occurs during the matching operation then -1
* is returned and the interp's result contains an error message.
- * Otherwise the return value is 1 if "string" matches "pattern"
+ * Otherwise the return value is 1 if "text" matches "pattern"
* and 0 otherwise.
*
* Side effects:
@@ -485,9 +484,9 @@ Tcl_RegExpExecObj(interp, re, objPtr, offset, nmatches, flags)
*/
int
-Tcl_RegExpMatchObj(interp, stringObj, patternObj)
+Tcl_RegExpMatchObj(interp, textObj, patternObj)
Tcl_Interp *interp; /* Used for error reporting. May be NULL. */
- Tcl_Obj *stringObj; /* Object containing the String to search. */
+ Tcl_Obj *textObj; /* Object containing the String to search. */
Tcl_Obj *patternObj; /* Regular expression to match against
* string. */
{
@@ -498,7 +497,7 @@ Tcl_RegExpMatchObj(interp, stringObj, patternObj)
if (re == NULL) {
return -1;
}
- return Tcl_RegExpExecObj(interp, re, stringObj, 0 /* offset */,
+ return Tcl_RegExpExecObj(interp, re, textObj, 0 /* offset */,
0 /* nmatches */, 0 /* flags */);
}
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 28f994d..bf00083 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.23 2004/11/23 00:12:57 dkf Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.24 2005/05/03 18:08:20 dgp Exp $
*/
#include "tclInt.h"
@@ -381,23 +381,23 @@ Tcl_DiscardResult(statePtr)
*
* Tcl_SetResult --
*
- * Arrange for "string" to be the Tcl return value.
+ * Arrange for "result" to be the Tcl return value.
*
* Results:
* None.
*
* Side effects:
- * interp->result is left pointing either to "string" (if "copy" is 0)
- * or to a copy of string. Also, the object result is reset.
+ * interp->result is left pointing either to "result"
+ * or to a copy of it. Also, the object result is reset.
*
*----------------------------------------------------------------------
*/
void
-Tcl_SetResult(interp, stringPtr, freeProc)
+Tcl_SetResult(interp, result, freeProc)
Tcl_Interp *interp; /* Interpreter with which to associate the
* return value. */
- register char *stringPtr; /* Value to be returned. If NULL, the
+ register char *result; /* Value to be returned. If NULL, the
* result is set to an empty string. */
Tcl_FreeProc *freeProc; /* Gives information about the string:
* TCL_STATIC, TCL_VOLATILE, or the address
@@ -408,12 +408,12 @@ Tcl_SetResult(interp, stringPtr, freeProc)
register Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
char *oldResult = iPtr->result;
- if (stringPtr == NULL) {
+ if (result == NULL) {
iPtr->resultSpace[0] = 0;
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
} else if (freeProc == TCL_VOLATILE) {
- length = strlen(stringPtr);
+ length = strlen(result);
if (length > TCL_RESULT_SIZE) {
iPtr->result = (char *) ckalloc((unsigned) length+1);
iPtr->freeProc = TCL_DYNAMIC;
@@ -421,9 +421,9 @@ Tcl_SetResult(interp, stringPtr, freeProc)
iPtr->result = iPtr->resultSpace;
iPtr->freeProc = 0;
}
- strcpy(iPtr->result, stringPtr);
+ strcpy(iPtr->result, result);
} else {
- iPtr->result = stringPtr;
+ iPtr->result = result;
iPtr->freeProc = freeProc;
}
@@ -706,10 +706,10 @@ Tcl_AppendResult TCL_VARARGS_DEF(Tcl_Interp *,arg1)
*/
void
-Tcl_AppendElement(interp, stringPtr)
+Tcl_AppendElement(interp, element)
Tcl_Interp *interp; /* Interpreter whose result is to be
* extended. */
- CONST char *stringPtr; /* String to convert to list element and
+ CONST char *element; /* String to convert to list element and
* add to result. */
{
Interp *iPtr = (Interp *) interp;
@@ -729,7 +729,7 @@ Tcl_AppendElement(interp, stringPtr)
* needed to accommodate the list element.
*/
- size = Tcl_ScanElement(stringPtr, &flags) + 1;
+ size = Tcl_ScanElement(element, &flags) + 1;
if ((iPtr->result != iPtr->appendResult)
|| (iPtr->appendResult[iPtr->appendUsed] != 0)
|| ((size + iPtr->appendUsed) >= iPtr->appendAvl)) {
@@ -753,7 +753,7 @@ Tcl_AppendElement(interp, stringPtr)
*/
flags |= TCL_DONT_QUOTE_HASH;
}
- iPtr->appendUsed += Tcl_ConvertElement(stringPtr, dst, flags);
+ iPtr->appendUsed += Tcl_ConvertElement(element, dst, flags);
}
/*
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index f0acdd2..d3ac7e1 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtf.c,v 1.32 2003/10/08 14:24:41 dkf Exp $
+ * RCS: @(#) $Id: tclUtf.c,v 1.33 2005/05/03 18:08:20 dgp Exp $
*/
#include "tclInt.h"
@@ -157,54 +157,54 @@ UtfCount(ch)
*/
INLINE int
-Tcl_UniCharToUtf(ch, str)
+Tcl_UniCharToUtf(ch, buf)
int ch; /* The Tcl_UniChar to be stored in the
* buffer. */
- char *str; /* Buffer in which the UTF-8 representation
+ char *buf; /* Buffer in which the UTF-8 representation
* of the Tcl_UniChar is stored. Buffer must
* be large enough to hold the UTF-8 character
* (at most TCL_UTF_MAX bytes). */
{
if ((ch > 0) && (ch < UNICODE_SELF)) {
- str[0] = (char) ch;
+ buf[0] = (char) ch;
return 1;
}
if (ch <= 0x7FF) {
- str[1] = (char) ((ch | 0x80) & 0xBF);
- str[0] = (char) ((ch >> 6) | 0xC0);
+ buf[1] = (char) ((ch | 0x80) & 0xBF);
+ buf[0] = (char) ((ch >> 6) | 0xC0);
return 2;
}
if (ch <= 0xFFFF) {
three:
- str[2] = (char) ((ch | 0x80) & 0xBF);
- str[1] = (char) (((ch >> 6) | 0x80) & 0xBF);
- str[0] = (char) ((ch >> 12) | 0xE0);
+ buf[2] = (char) ((ch | 0x80) & 0xBF);
+ buf[1] = (char) (((ch >> 6) | 0x80) & 0xBF);
+ buf[0] = (char) ((ch >> 12) | 0xE0);
return 3;
}
#if TCL_UTF_MAX > 3
if (ch <= 0x1FFFFF) {
- str[3] = (char) ((ch | 0x80) & 0xBF);
- str[2] = (char) (((ch >> 6) | 0x80) & 0xBF);
- str[1] = (char) (((ch >> 12) | 0x80) & 0xBF);
- str[0] = (char) ((ch >> 18) | 0xF0);
+ buf[3] = (char) ((ch | 0x80) & 0xBF);
+ buf[2] = (char) (((ch >> 6) | 0x80) & 0xBF);
+ buf[1] = (char) (((ch >> 12) | 0x80) & 0xBF);
+ buf[0] = (char) ((ch >> 18) | 0xF0);
return 4;
}
if (ch <= 0x3FFFFFF) {
- str[4] = (char) ((ch | 0x80) & 0xBF);
- str[3] = (char) (((ch >> 6) | 0x80) & 0xBF);
- str[2] = (char) (((ch >> 12) | 0x80) & 0xBF);
- str[1] = (char) (((ch >> 18) | 0x80) & 0xBF);
- str[0] = (char) ((ch >> 24) | 0xF8);
+ buf[4] = (char) ((ch | 0x80) & 0xBF);
+ buf[3] = (char) (((ch >> 6) | 0x80) & 0xBF);
+ buf[2] = (char) (((ch >> 12) | 0x80) & 0xBF);
+ buf[1] = (char) (((ch >> 18) | 0x80) & 0xBF);
+ buf[0] = (char) ((ch >> 24) | 0xF8);
return 5;
}
if (ch <= 0x7FFFFFFF) {
- str[5] = (char) ((ch | 0x80) & 0xBF);
- str[4] = (char) (((ch >> 6) | 0x80) & 0xBF);
- str[3] = (char) (((ch >> 12) | 0x80) & 0xBF);
- str[2] = (char) (((ch >> 18) | 0x80) & 0xBF);
- str[1] = (char) (((ch >> 24) | 0x80) & 0xBF);
- str[0] = (char) ((ch >> 30) | 0xFC);
+ buf[5] = (char) ((ch | 0x80) & 0xBF);
+ buf[4] = (char) (((ch >> 6) | 0x80) & 0xBF);
+ buf[3] = (char) (((ch >> 12) | 0x80) & 0xBF);
+ buf[2] = (char) (((ch >> 18) | 0x80) & 0xBF);
+ buf[1] = (char) (((ch >> 24) | 0x80) & 0xBF);
+ buf[0] = (char) ((ch >> 30) | 0xFC);
return 6;
}
#endif
@@ -232,9 +232,9 @@ Tcl_UniCharToUtf(ch, str)
*/
char *
-Tcl_UniCharToUtfDString(wString, numChars, dsPtr)
- CONST Tcl_UniChar *wString; /* Unicode string to convert to UTF-8. */
- int numChars; /* Length of Unicode string in Tcl_UniChars
+Tcl_UniCharToUtfDString(uniStr, uniLength, dsPtr)
+ CONST Tcl_UniChar *uniStr; /* Unicode string to convert to UTF-8. */
+ int uniLength; /* Length of Unicode string in Tcl_UniChars
* (must be >= 0). */
Tcl_DString *dsPtr; /* UTF-8 representation of string is
* appended to this previously initialized
@@ -250,12 +250,12 @@ Tcl_UniCharToUtfDString(wString, numChars, dsPtr)
*/
oldLength = Tcl_DStringLength(dsPtr);
- Tcl_DStringSetLength(dsPtr, (oldLength + numChars + 1) * TCL_UTF_MAX);
+ Tcl_DStringSetLength(dsPtr, (oldLength + uniLength + 1) * TCL_UTF_MAX);
string = Tcl_DStringValue(dsPtr) + oldLength;
p = string;
- wEnd = wString + numChars;
- for (w = wString; w < wEnd; ) {
+ wEnd = uniStr + uniLength;
+ for (w = uniStr; w < wEnd; ) {
p += Tcl_UniCharToUtf(*w, p);
w++;
}
@@ -291,8 +291,8 @@ Tcl_UniCharToUtfDString(wString, numChars, dsPtr)
*/
int
-Tcl_UtfToUniChar(str, chPtr)
- register CONST char *str; /* The UTF-8 string. */
+Tcl_UtfToUniChar(src, chPtr)
+ register CONST char *src; /* The UTF-8 string. */
register Tcl_UniChar *chPtr; /* Filled with the Tcl_UniChar represented
* by the UTF-8 string. */
{
@@ -302,7 +302,7 @@ Tcl_UtfToUniChar(str, chPtr)
* Unroll 1 to 3 byte UTF-8 sequences, use loop to handle longer ones.
*/
- byte = *((unsigned char *) str);
+ byte = *((unsigned char *) src);
if (byte < 0xC0) {
/*
* Handles properly formed UTF-8 characters between 0x01 and 0x7F.
@@ -313,12 +313,12 @@ Tcl_UtfToUniChar(str, chPtr)
*chPtr = (Tcl_UniChar) byte;
return 1;
} else if (byte < 0xE0) {
- if ((str[1] & 0xC0) == 0x80) {
+ if ((src[1] & 0xC0) == 0x80) {
/*
* Two-byte-character lead-byte followed by a trail-byte.
*/
- *chPtr = (Tcl_UniChar) (((byte & 0x1F) << 6) | (str[1] & 0x3F));
+ *chPtr = (Tcl_UniChar) (((byte & 0x1F) << 6) | (src[1] & 0x3F));
return 2;
}
/*
@@ -329,13 +329,13 @@ Tcl_UtfToUniChar(str, chPtr)
*chPtr = (Tcl_UniChar) byte;
return 1;
} else if (byte < 0xF0) {
- if (((str[1] & 0xC0) == 0x80) && ((str[2] & 0xC0) == 0x80)) {
+ if (((src[1] & 0xC0) == 0x80) && ((src[2] & 0xC0) == 0x80)) {
/*
* Three-byte-character lead byte followed by two trail bytes.
*/
*chPtr = (Tcl_UniChar) (((byte & 0x0F) << 12)
- | ((str[1] & 0x3F) << 6) | (str[2] & 0x3F));
+ | ((src[1] & 0x3F) << 6) | (src[2] & 0x3F));
return 3;
}
/*
@@ -355,13 +355,13 @@ Tcl_UtfToUniChar(str, chPtr)
if (trail > 0) {
ch = byte & (0x3F >> trail);
do {
- str++;
- if ((*str & 0xC0) != 0x80) {
+ src++;
+ if ((*src & 0xC0) != 0x80) {
*chPtr = byte;
return 1;
}
ch <<= 6;
- ch |= (*str & 0x3F);
+ ch |= (*src & 0x3F);
trail--;
} while (trail > 0);
*chPtr = ch;
@@ -394,8 +394,8 @@ Tcl_UtfToUniChar(str, chPtr)
*/
Tcl_UniChar *
-Tcl_UtfToUniCharDString(string, length, dsPtr)
- CONST char *string; /* UTF-8 string to convert to Unicode. */
+Tcl_UtfToUniCharDString(src, length, dsPtr)
+ CONST char *src; /* UTF-8 string to convert to Unicode. */
int length; /* Length of UTF-8 string in bytes, or -1
* for strlen(). */
Tcl_DString *dsPtr; /* Unicode representation of string is
@@ -407,7 +407,7 @@ Tcl_UtfToUniCharDString(string, length, dsPtr)
int oldLength;
if (length < 0) {
- length = strlen(string);
+ length = strlen(src);
}
/*
@@ -421,8 +421,8 @@ Tcl_UtfToUniCharDString(string, length, dsPtr)
wString = (Tcl_UniChar *) (Tcl_DStringValue(dsPtr) + oldLength);
w = wString;
- end = string + length;
- for (p = string; p < end; ) {
+ end = src + length;
+ for (p = src; p < end; ) {
p += TclUtfToUniChar(p, w);
w++;
}
@@ -453,15 +453,15 @@ Tcl_UtfToUniCharDString(string, length, dsPtr)
*/
int
-Tcl_UtfCharComplete(str, len)
- CONST char *str; /* String to check if first few bytes
+Tcl_UtfCharComplete(src, length)
+ CONST char *src; /* String to check if first few bytes
* contain a complete UTF-8 character. */
- int len; /* Length of above string in bytes. */
+ int length; /* Length of above string in bytes. */
{
int ch;
- ch = *((unsigned char *) str);
- return len >= totalBytes[ch];
+ ch = *((unsigned char *) src);
+ return length >= totalBytes[ch];
}
/*
@@ -483,9 +483,9 @@ Tcl_UtfCharComplete(str, len)
*/
int
-Tcl_NumUtfChars(str, len)
- register CONST char *str; /* The UTF-8 string to measure. */
- int len; /* The length of the string in bytes, or -1
+Tcl_NumUtfChars(src, length)
+ register CONST char *src; /* The UTF-8 string to measure. */
+ int length; /* The length of the string in bytes, or -1
* for strlen(string). */
{
Tcl_UniChar ch;
@@ -500,22 +500,22 @@ Tcl_NumUtfChars(str, len)
*/
i = 0;
- if (len < 0) {
- while (*str != '\0') {
- str += TclUtfToUniChar(str, chPtr);
+ if (length < 0) {
+ while (*src != '\0') {
+ src += TclUtfToUniChar(src, chPtr);
i++;
}
} else {
register int n;
- while (len > 0) {
- if (UCHAR(*str) < 0xC0) {
- len--;
- str++;
+ while (length > 0) {
+ if (UCHAR(*src) < 0xC0) {
+ length--;
+ src++;
} else {
- n = Tcl_UtfToUniChar(str, chPtr);
- len -= n;
- str += n;
+ n = Tcl_UtfToUniChar(src, chPtr);
+ length -= n;
+ src += n;
}
i++;
}
@@ -543,22 +543,22 @@ Tcl_NumUtfChars(str, len)
*---------------------------------------------------------------------------
*/
CONST char *
-Tcl_UtfFindFirst(string, ch)
- CONST char *string; /* The UTF-8 string to be searched. */
+Tcl_UtfFindFirst(src, ch)
+ CONST char *src; /* The UTF-8 string to be searched. */
int ch; /* The Tcl_UniChar to search for. */
{
int len;
Tcl_UniChar find;
while (1) {
- len = TclUtfToUniChar(string, &find);
+ len = TclUtfToUniChar(src, &find);
if (find == ch) {
- return string;
+ return src;
}
- if (*string == '\0') {
+ if (*src == '\0') {
return NULL;
}
- string += len;
+ src += len;
}
}
@@ -583,8 +583,8 @@ Tcl_UtfFindFirst(string, ch)
*/
CONST char *
-Tcl_UtfFindLast(string, ch)
- CONST char *string; /* The UTF-8 string to be searched. */
+Tcl_UtfFindLast(src, ch)
+ CONST char *src; /* The UTF-8 string to be searched. */
int ch; /* The Tcl_UniChar to search for. */
{
int len;
@@ -593,14 +593,14 @@ Tcl_UtfFindLast(string, ch)
last = NULL;
while (1) {
- len = TclUtfToUniChar(string, &find);
+ len = TclUtfToUniChar(src, &find);
if (find == ch) {
- last = string;
+ last = src;
}
- if (*string == '\0') {
+ if (*src == '\0') {
break;
}
- string += len;
+ src += len;
}
return last;
}
@@ -626,12 +626,12 @@ Tcl_UtfFindLast(string, ch)
*/
CONST char *
-Tcl_UtfNext(str)
- CONST char *str; /* The current location in the string. */
+Tcl_UtfNext(src)
+ CONST char *src; /* The current location in the string. */
{
Tcl_UniChar ch;
- return str + TclUtfToUniChar(str, &ch);
+ return src + TclUtfToUniChar(src, &ch);
}
/*
@@ -656,8 +656,8 @@ Tcl_UtfNext(str)
*/
CONST char *
-Tcl_UtfPrev(str, start)
- CONST char *str; /* The current location in the string. */
+Tcl_UtfPrev(src, start)
+ CONST char *src; /* The current location in the string. */
CONST char *start; /* Pointer to the beginning of the
* string, to avoid going backwards too
* far. */
@@ -665,12 +665,12 @@ Tcl_UtfPrev(str, start)
CONST char *look;
int i, byte;
- str--;
- look = str;
+ src--;
+ look = src;
for (i = 0; i < TCL_UTF_MAX; i++) {
if (look < start) {
- if (str < start) {
- str = start;
+ if (src < start) {
+ src = start;
}
break;
}
@@ -683,7 +683,7 @@ Tcl_UtfPrev(str, start)
}
look--;
}
- return str;
+ return src;
}
/*
@@ -1017,8 +1017,8 @@ TclpUtfNcmp2(cs, ct, n)
*
* Tcl_UtfNcmp --
*
- * Compare at most n UTF chars of string cs to string ct. Both cs
- * and ct are assumed to be at least n UTF chars long.
+ * Compare at most numChars UTF chars of string cs to string ct.
+ * Both cs and ct are assumed to be at least numChars UTF chars long.
*
* Results:
* Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
@@ -1030,10 +1030,10 @@ TclpUtfNcmp2(cs, ct, n)
*/
int
-Tcl_UtfNcmp(cs, ct, n)
+Tcl_UtfNcmp(cs, ct, numChars)
CONST char *cs; /* UTF string to compare to ct. */
CONST char *ct; /* UTF string cs is compared to. */
- unsigned long n; /* Number of UTF chars to compare. */
+ unsigned long numChars; /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
/*
@@ -1041,7 +1041,7 @@ Tcl_UtfNcmp(cs, ct, n)
* \u0000 (the pair of bytes 0xc0,0x80) is larger than byte
* representation of \u0001 (the byte 0x01.)
*/
- while (n-- > 0) {
+ while (numChars-- > 0) {
/*
* n must be interpreted as chars, not bytes.
* This should be called only when both strings are of
@@ -1061,8 +1061,8 @@ Tcl_UtfNcmp(cs, ct, n)
*
* Tcl_UtfNcasecmp --
*
- * Compare at most n UTF chars of string cs to string ct case
- * insensitive. Both cs and ct are assumed to be at least n
+ * Compare at most numChars UTF chars of string cs to string ct case
+ * insensitive. Both cs and ct are assumed to be at least numChars
* UTF chars long.
*
* Results:
@@ -1075,13 +1075,13 @@ Tcl_UtfNcmp(cs, ct, n)
*/
int
-Tcl_UtfNcasecmp(cs, ct, n)
+Tcl_UtfNcasecmp(cs, ct, numChars)
CONST char *cs; /* UTF string to compare to ct. */
CONST char *ct; /* UTF string cs is compared to. */
- unsigned long n; /* Number of UTF chars to compare. */
+ unsigned long numChars; /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
- while (n-- > 0) {
+ while (numChars-- > 0) {
/*
* n must be interpreted as chars, not bytes.
* This should be called only when both strings are of
@@ -1212,14 +1212,14 @@ Tcl_UniCharToTitle(ch)
*/
int
-Tcl_UniCharLen(str)
- CONST Tcl_UniChar *str; /* Unicode string to find length of. */
+Tcl_UniCharLen(uniStr)
+ CONST Tcl_UniChar *uniStr; /* Unicode string to find length of. */
{
int len = 0;
- while (*str != '\0') {
+ while (*uniStr != '\0') {
len++;
- str++;
+ uniStr++;
}
return len;
}
@@ -1229,11 +1229,11 @@ Tcl_UniCharLen(str)
*
* Tcl_UniCharNcmp --
*
- * Compare at most n unichars of string cs to string ct. Both cs
- * and ct are assumed to be at least n unichars long.
+ * Compare at most numChars unichars of string ucs to string uct.
+ * Both ucs and uct are assumed to be at least numChars unichars long.
*
* Results:
- * Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
+ * Return <0 if ucs < uct, 0 if ucs == uct, or >0 if ucs > uct.
*
* Side effects:
* None.
@@ -1242,24 +1242,24 @@ Tcl_UniCharLen(str)
*/
int
-Tcl_UniCharNcmp(cs, ct, n)
- CONST Tcl_UniChar *cs; /* Unicode string to compare to ct. */
- CONST Tcl_UniChar *ct; /* Unicode string cs is compared to. */
- unsigned long n; /* Number of unichars to compare. */
+Tcl_UniCharNcmp(ucs, uct, numChars)
+ CONST Tcl_UniChar *ucs; /* Unicode string to compare to uct. */
+ CONST Tcl_UniChar *uct; /* Unicode string ucs is compared to. */
+ unsigned long numChars; /* Number of unichars to compare. */
{
#ifdef WORDS_BIGENDIAN
/*
* We are definitely on a big-endian machine; memcmp() is safe
*/
- return memcmp(cs, ct, n*sizeof(Tcl_UniChar));
+ return memcmp(ucs, uct, numChars*sizeof(Tcl_UniChar));
#else /* !WORDS_BIGENDIAN */
/*
* We can't simply call memcmp() because that is not lexically correct.
*/
- for ( ; n != 0; cs++, ct++, n--) {
- if (*cs != *ct) {
- return (*cs - *ct);
+ for ( ; numChars != 0; ucs++, uct++, numChars--) {
+ if (*ucs != *uct) {
+ return (*ucs - *uct);
}
}
return 0;
@@ -1271,12 +1271,12 @@ Tcl_UniCharNcmp(cs, ct, n)
*
* Tcl_UniCharNcasecmp --
*
- * Compare at most n unichars of string cs to string ct case
- * insensitive. Both cs and ct are assumed to be at least n
+ * Compare at most numChars unichars of string ucs to string uct case
+ * insensitive. Both ucs and uct are assumed to be at least numChars
* unichars long.
*
* Results:
- * Return <0 if cs < ct, 0 if cs == ct, or >0 if cs > ct.
+ * Return <0 if ucs < uct, 0 if ucs == uct, or >0 if ucs > uct.
*
* Side effects:
* None.
@@ -1285,15 +1285,15 @@ Tcl_UniCharNcmp(cs, ct, n)
*/
int
-Tcl_UniCharNcasecmp(cs, ct, n)
- CONST Tcl_UniChar *cs; /* Unicode string to compare to ct. */
- CONST Tcl_UniChar *ct; /* Unicode string cs is compared to. */
- unsigned long n; /* Number of unichars to compare. */
+Tcl_UniCharNcasecmp(ucs, uct, numChars)
+ CONST Tcl_UniChar *ucs; /* Unicode string to compare to uct. */
+ CONST Tcl_UniChar *uct; /* Unicode string ucs is compared to. */
+ unsigned long numChars; /* Number of unichars to compare. */
{
- for ( ; n != 0; n--, cs++, ct++) {
- if (*cs != *ct) {
- Tcl_UniChar lcs = Tcl_UniCharToLower(*cs);
- Tcl_UniChar lct = Tcl_UniCharToLower(*ct);
+ for ( ; numChars != 0; numChars--, ucs++, uct++) {
+ if (*ucs != *uct) {
+ Tcl_UniChar lcs = Tcl_UniCharToLower(*ucs);
+ Tcl_UniChar lct = Tcl_UniCharToLower(*uct);
if (lcs != lct) {
return (lcs - lct);
}
@@ -1602,16 +1602,16 @@ Tcl_UniCharIsWordChar(ch)
*/
int
-Tcl_UniCharCaseMatch(string, pattern, nocase)
- CONST Tcl_UniChar *string; /* Unicode String. */
- CONST Tcl_UniChar *pattern; /* Pattern, which may contain special
- * characters. */
+Tcl_UniCharCaseMatch(uniStr, uniPattern, nocase)
+ CONST Tcl_UniChar *uniStr; /* Unicode String. */
+ CONST Tcl_UniChar *uniPattern; /* Pattern, which may contain special
+ * characters. */
int nocase; /* 0 for case sensitive, 1 for insensitive */
{
Tcl_UniChar ch1, p;
while (1) {
- p = *pattern;
+ p = *uniPattern;
/*
* See if we're at the end of both the pattern and the string. If
@@ -1620,9 +1620,9 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
*/
if (p == 0) {
- return (*string == 0);
+ return (*uniStr == 0);
}
- if ((*string == 0) && (p != '*')) {
+ if ((*uniStr == 0) && (p != '*')) {
return 0;
}
@@ -1638,8 +1638,8 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
/*
* Skip all successive *'s in the pattern
*/
- while (*(++pattern) == '*') {}
- p = *pattern;
+ while (*(++uniPattern) == '*') {}
+ p = *uniPattern;
if (p == 0) {
return 1;
}
@@ -1654,21 +1654,21 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
*/
if ((p != '[') && (p != '?') && (p != '\\')) {
if (nocase) {
- while (*string && (p != *string)
- && (p != Tcl_UniCharToLower(*string))) {
- string++;
+ while (*uniStr && (p != *uniStr)
+ && (p != Tcl_UniCharToLower(*uniStr))) {
+ uniStr++;
}
} else {
- while (*string && (p != *string)) { string++; }
+ while (*uniStr && (p != *uniStr)) { uniStr++; }
}
}
- if (Tcl_UniCharCaseMatch(string, pattern, nocase)) {
+ if (Tcl_UniCharCaseMatch(uniStr, uniPattern, nocase)) {
return 1;
}
- if (*string == 0) {
+ if (*uniStr == 0) {
return 0;
}
- string++;
+ uniStr++;
}
}
@@ -1678,8 +1678,8 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
*/
if (p == '?') {
- pattern++;
- string++;
+ uniPattern++;
+ uniStr++;
continue;
}
@@ -1692,23 +1692,23 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
if (p == '[') {
Tcl_UniChar startChar, endChar;
- pattern++;
- ch1 = (nocase ? Tcl_UniCharToLower(*string) : *string);
- string++;
+ uniPattern++;
+ ch1 = (nocase ? Tcl_UniCharToLower(*uniStr) : *uniStr);
+ uniStr++;
while (1) {
- if ((*pattern == ']') || (*pattern == 0)) {
+ if ((*uniPattern == ']') || (*uniPattern == 0)) {
return 0;
}
- startChar = (nocase ? Tcl_UniCharToLower(*pattern) : *pattern);
- pattern++;
- if (*pattern == '-') {
- pattern++;
- if (*pattern == 0) {
+ startChar = (nocase ? Tcl_UniCharToLower(*uniPattern) : *uniPattern);
+ uniPattern++;
+ if (*uniPattern == '-') {
+ uniPattern++;
+ if (*uniPattern == 0) {
return 0;
}
- endChar = (nocase ? Tcl_UniCharToLower(*pattern)
- : *pattern);
- pattern++;
+ endChar = (nocase ? Tcl_UniCharToLower(*uniPattern)
+ : *uniPattern);
+ uniPattern++;
if (((startChar <= ch1) && (ch1 <= endChar))
|| ((endChar <= ch1) && (ch1 <= startChar))) {
/*
@@ -1720,14 +1720,14 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
break;
}
}
- while (*pattern != ']') {
- if (*pattern == 0) {
- pattern--;
+ while (*uniPattern != ']') {
+ if (*uniPattern == 0) {
+ uniPattern--;
break;
}
- pattern++;
+ uniPattern++;
}
- pattern++;
+ uniPattern++;
continue;
}
@@ -1737,7 +1737,7 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
*/
if (p == '\\') {
- if (*(++pattern) == '\0') {
+ if (*(++uniPattern) == '\0') {
return 0;
}
}
@@ -1748,14 +1748,14 @@ Tcl_UniCharCaseMatch(string, pattern, nocase)
*/
if (nocase) {
- if (Tcl_UniCharToLower(*string) != Tcl_UniCharToLower(*pattern)) {
+ if (Tcl_UniCharToLower(*uniStr) != Tcl_UniCharToLower(*uniPattern)) {
return 0;
}
- } else if (*string != *pattern) {
+ } else if (*uniStr != *uniPattern) {
return 0;
}
- string++;
- pattern++;
+ uniStr++;
+ uniPattern++;
}
}
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 1541216..c658988 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -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: tclUtil.c,v 1.56 2005/04/29 20:49:44 dgp Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.57 2005/05/03 18:08:21 dgp Exp $
*/
#include "tclInt.h"
@@ -1177,12 +1177,12 @@ Tcl_ConcatObj(objc, objv)
*/
int
-Tcl_StringMatch(string, pattern)
- CONST char *string; /* String. */
+Tcl_StringMatch(str, pattern)
+ CONST char *str; /* String. */
CONST char *pattern; /* Pattern, which may contain special
* characters. */
{
- return Tcl_StringCaseMatch(string, pattern, 0);
+ return Tcl_StringCaseMatch(str, pattern, 0);
}
/*
@@ -1206,8 +1206,8 @@ Tcl_StringMatch(string, pattern)
*/
int
-Tcl_StringCaseMatch(string, pattern, nocase)
- CONST char *string; /* String. */
+Tcl_StringCaseMatch(str, pattern, nocase)
+ CONST char *str; /* String. */
CONST char *pattern; /* Pattern, which may contain special
* characters. */
int nocase; /* 0 for case sensitive, 1 for insensitive */
@@ -1226,9 +1226,9 @@ Tcl_StringCaseMatch(string, pattern, nocase)
*/
if (p == '\0') {
- return (*string == '\0');
+ return (*str == '\0');
}
- if ((*string == '\0') && (p != '*')) {
+ if ((*str == '\0') && (p != '*')) {
return 0;
}
@@ -1268,12 +1268,12 @@ Tcl_StringCaseMatch(string, pattern, nocase)
*/
if ((p != '[') && (p != '?') && (p != '\\')) {
if (nocase) {
- while (*string) {
- charLen = TclUtfToUniChar(string, &ch1);
+ while (*str) {
+ charLen = TclUtfToUniChar(str, &ch1);
if (ch2==ch1 || ch2==Tcl_UniCharToLower(ch1)) {
break;
}
- string += charLen;
+ str += charLen;
}
} else {
/*
@@ -1281,22 +1281,22 @@ Tcl_StringCaseMatch(string, pattern, nocase)
* shorter, as the number of bytes you want to
* compare each time is non-constant.
*/
- while (*string) {
- charLen = TclUtfToUniChar(string, &ch1);
+ while (*str) {
+ charLen = TclUtfToUniChar(str, &ch1);
if (ch2 == ch1) {
break;
}
- string += charLen;
+ str += charLen;
}
}
}
- if (Tcl_StringCaseMatch(string, pattern, nocase)) {
+ if (Tcl_StringCaseMatch(str, pattern, nocase)) {
return 1;
}
- if (*string == '\0') {
+ if (*str == '\0') {
return 0;
}
- string += TclUtfToUniChar(string, &ch1);
+ str += TclUtfToUniChar(str, &ch1);
}
}
@@ -1307,7 +1307,7 @@ Tcl_StringCaseMatch(string, pattern, nocase)
if (p == '?') {
pattern++;
- string += TclUtfToUniChar(string, &ch1);
+ str += TclUtfToUniChar(str, &ch1);
continue;
}
@@ -1321,12 +1321,12 @@ Tcl_StringCaseMatch(string, pattern, nocase)
Tcl_UniChar startChar, endChar;
pattern++;
- if (UCHAR(*string) < 0x80) {
+ if (UCHAR(*str) < 0x80) {
ch1 = (Tcl_UniChar)
- (nocase ? tolower(UCHAR(*string)) : UCHAR(*string));
- string++;
+ (nocase ? tolower(UCHAR(*str)) : UCHAR(*str));
+ str++;
} else {
- string += Tcl_UtfToUniChar(string, &ch1);
+ str += Tcl_UtfToUniChar(str, &ch1);
if (nocase) {
ch1 = Tcl_UniCharToLower(ch1);
}
@@ -1401,7 +1401,7 @@ Tcl_StringCaseMatch(string, pattern, nocase)
* bytes of each string match.
*/
- string += TclUtfToUniChar(string, &ch1);
+ str += TclUtfToUniChar(str, &ch1);
pattern += TclUtfToUniChar(pattern, &ch2);
if (nocase) {
if (Tcl_UniCharToLower(ch1) != Tcl_UniCharToLower(ch2)) {
@@ -1483,13 +1483,13 @@ Tcl_DStringInit(dsPtr)
*
* Tcl_DStringAppend --
*
- * Append more characters to the current value of a dynamic string.
+ * Append more bytes to the current value of a dynamic string.
*
* Results:
* The return value is a pointer to the dynamic string's new value.
*
* Side effects:
- * Length bytes from string (or all of string if length is less
+ * Length bytes from "bytes" (or all of "bytes" if length is less
* than zero) are added to the current value of the string. Memory
* gets reallocated if needed to accomodate the string's new size.
*
@@ -1497,12 +1497,12 @@ Tcl_DStringInit(dsPtr)
*/
char *
-Tcl_DStringAppend(dsPtr, string, length)
+Tcl_DStringAppend(dsPtr, bytes, length)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
- CONST char *string; /* String to append. If length is -1 then
+ CONST char *bytes; /* String to append. If length is -1 then
* this must be null-terminated. */
- int length; /* Number of characters from string to
- * append. If < 0, then append all of string,
+ int length; /* Number of bytes from "bytes" to
+ * append. If < 0, then append all of bytes,
* up to null at end. */
{
int newSize;
@@ -1510,7 +1510,7 @@ Tcl_DStringAppend(dsPtr, string, length)
CONST char *end;
if (length < 0) {
- length = strlen(string);
+ length = strlen(bytes);
}
newSize = length + dsPtr->length;
@@ -1540,9 +1540,9 @@ Tcl_DStringAppend(dsPtr, string, length)
* one.
*/
- for (dst = dsPtr->string + dsPtr->length, end = string+length;
- string < end; string++, dst++) {
- *dst = *string;
+ for (dst = dsPtr->string + dsPtr->length, end = bytes+length;
+ bytes < end; bytes++, dst++) {
+ *dst = *bytes;
}
*dst = '\0';
dsPtr->length += length;
@@ -1568,16 +1568,16 @@ Tcl_DStringAppend(dsPtr, string, length)
*/
char *
-Tcl_DStringAppendElement(dsPtr, string)
+Tcl_DStringAppendElement(dsPtr, element)
Tcl_DString *dsPtr; /* Structure describing dynamic string. */
- CONST char *string; /* String to append. Must be
+ CONST char *element; /* String to append. Must be
* null-terminated. */
{
int newSize, flags, strSize;
char *dst;
- strSize = ((string == NULL) ? 0 : strlen(string));
- newSize = Tcl_ScanCountedElement(string, strSize, &flags)
+ strSize = ((element== NULL) ? 0 : strlen(element));
+ newSize = Tcl_ScanCountedElement(element, strSize, &flags)
+ dsPtr->length + 1;
/*
@@ -1621,7 +1621,7 @@ Tcl_DStringAppendElement(dsPtr, string)
*/
flags |= TCL_DONT_QUOTE_HASH;
}
- dsPtr->length += Tcl_ConvertCountedElement(string, strSize, dst, flags);
+ dsPtr->length += Tcl_ConvertCountedElement(element, strSize, dst, flags);
return dsPtr->string;
}
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 6d3bd12..57a12d0 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.54 2005/01/27 00:23:31 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.55 2005/05/03 18:08:23 dgp Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -3033,9 +3033,9 @@ TclpGetDefaultStdChannel(type)
*/
int
-Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
+Tcl_GetOpenFile(interp, chanID, forWriting, checkUsage, filePtr)
Tcl_Interp *interp; /* Interpreter in which to find file. */
- CONST char *string; /* String that identifies file. */
+ CONST char *chanID; /* String that identifies file. */
int forWriting; /* 1 means the file is going to be used
* for writing, 0 means for reading. */
int checkUsage; /* 1 means verify that the file was opened
@@ -3052,17 +3052,17 @@ Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
int fd;
FILE *f;
- chan = Tcl_GetChannel(interp, string, &chanMode);
+ chan = Tcl_GetChannel(interp, chanID, &chanMode);
if (chan == (Tcl_Channel) NULL) {
return TCL_ERROR;
}
if ((forWriting) && ((chanMode & TCL_WRITABLE) == 0)) {
Tcl_AppendResult(interp,
- "\"", string, "\" wasn't opened for writing", (char *) NULL);
+ "\"", chanID, "\" wasn't opened for writing", (char *) NULL);
return TCL_ERROR;
} else if ((!(forWriting)) && ((chanMode & TCL_READABLE) == 0)) {
Tcl_AppendResult(interp,
- "\"", string, "\" wasn't opened for reading", (char *) NULL);
+ "\"", chanID, "\" wasn't opened for reading", (char *) NULL);
return TCL_ERROR;
}
@@ -3092,7 +3092,7 @@ Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
f = fdopen(fd, (forWriting ? "w" : "r"));
if (f == NULL) {
- Tcl_AppendResult(interp, "cannot get a FILE * for \"", string,
+ Tcl_AppendResult(interp, "cannot get a FILE * for \"", chanID,
"\"", (char *) NULL);
return TCL_ERROR;
}
@@ -3101,7 +3101,7 @@ Tcl_GetOpenFile(interp, string, forWriting, checkUsage, filePtr)
}
}
- Tcl_AppendResult(interp, "\"", string,
+ Tcl_AppendResult(interp, "\"", chanID,
"\" cannot be used to get a FILE *", (char *) NULL);
return TCL_ERROR;
}