summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-02 07:53:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-04-02 07:53:52 (GMT)
commitc5eb2bd7b35e0434b2c63979daf26864ebf5ec0b (patch)
treeb37148eddc3360b03f17c3f0ab137dc1e9e77686
parent111a6e4bac3278ef0ddc805732230768dfcf4df3 (diff)
parent27027cc682f4bdbf40ee66671cb0576e6c65e1da (diff)
downloadtcl-c5eb2bd7b35e0434b2c63979daf26864ebf5ec0b.zip
tcl-c5eb2bd7b35e0434b2c63979daf26864ebf5ec0b.tar.gz
tcl-c5eb2bd7b35e0434b2c63979daf26864ebf5ec0b.tar.bz2
Merge trunk
-rw-r--r--.fossil-settings/ignore-glob2
-rw-r--r--.travis.yml43
-rw-r--r--doc/Tcl.n8
-rw-r--r--doc/ToUpper.36
-rw-r--r--doc/Utf.37
-rw-r--r--doc/array.n2
-rw-r--r--doc/cookiejar.n2
-rw-r--r--doc/define.n2
-rw-r--r--doc/expr.n3
-rw-r--r--doc/info.n384
-rw-r--r--doc/mathop.n9
-rw-r--r--doc/zipfs.n5
-rw-r--r--generic/regc_locale.c30
-rw-r--r--generic/tcl.decls7
-rw-r--r--generic/tclAssembly.c2
-rw-r--r--generic/tclBasic.c23
-rw-r--r--generic/tclCmdAH.c6
-rw-r--r--generic/tclCmdMZ.c14
-rw-r--r--generic/tclCompCmdsSZ.c2
-rw-r--r--generic/tclCompExpr.c2
-rw-r--r--generic/tclCompile.c23
-rw-r--r--generic/tclCompile.h2
-rw-r--r--generic/tclDecls.h9
-rw-r--r--generic/tclExecute.c8
-rw-r--r--generic/tclIO.c6
-rw-r--r--generic/tclParse.c4
-rw-r--r--generic/tclPkg.c6
-rw-r--r--generic/tclProcess.c4
-rw-r--r--generic/tclResult.c2
-rw-r--r--generic/tclScan.c2
-rw-r--r--generic/tclStringObj.c2
-rw-r--r--generic/tclStubInit.c10
-rw-r--r--generic/tclTest.c24
-rw-r--r--generic/tclTestObj.c26
-rw-r--r--generic/tclTestProcBodyObj.c6
-rw-r--r--generic/tclThreadAlloc.c26
-rw-r--r--generic/tclTomMath.h17
-rw-r--r--generic/tclTomMathDecls.h5
-rw-r--r--generic/tclTrace.c12
-rw-r--r--generic/tclUniData.c2
-rw-r--r--generic/tclUtf.c12
-rw-r--r--generic/tclUtil.c27
-rw-r--r--generic/tclZipfs.c2
-rw-r--r--generic/tclZlib.c10
-rw-r--r--library/tzdata/America/Metlakatla3
-rw-r--r--library/tzdata/Asia/Gaza52
-rw-r--r--library/tzdata/Asia/Hebron52
-rw-r--r--library/tzdata/Asia/Jerusalem4
-rw-r--r--library/tzdata/Etc/UCT6
-rw-r--r--library/tzdata/UCT6
-rw-r--r--libtommath/bn_mp_get_bit.c12
-rw-r--r--libtommath/bn_mp_get_int.c19
-rw-r--r--libtommath/tommath.h29
-rw-r--r--libtommath/tommath_private.h11
-rw-r--r--macosx/Tcl.xcode/project.pbxproj4
-rw-r--r--macosx/Tcl.xcodeproj/project.pbxproj4
-rw-r--r--macosx/tclMacOSXFCmd.c10
-rw-r--r--tests-perf/clock.perf.tcl14
-rw-r--r--tests-perf/test-performance.tcl10
-rw-r--r--tests-perf/timer-event.perf.tcl16
-rw-r--r--tests/cmdMZ.test7
-rw-r--r--tests/compExpr-old.test1
-rw-r--r--tests/expr-old.test1
-rw-r--r--tests/expr.test43
-rw-r--r--tests/obj.test28
-rw-r--r--tests/utf.test6
-rwxr-xr-xtools/tcltk-man2html.tcl51
-rw-r--r--unix/Makefile.in13
-rw-r--r--unix/tclUnixCompat.c2
-rw-r--r--unix/tclUnixFCmd.c22
-rw-r--r--win/Makefile.in1
-rw-r--r--win/makefile.vc1
-rw-r--r--win/tclWinFCmd.c2
73 files changed, 548 insertions, 688 deletions
diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob
index 9bfacde..cd6e689 100644
--- a/.fossil-settings/ignore-glob
+++ b/.fossil-settings/ignore-glob
@@ -26,9 +26,11 @@ libtommath/bn.ilg
libtommath/bn.ind
libtommath/pretty.build
libtommath/tommath.src
+libtommath/*.log
libtommath/*.pdf
libtommath/*.pl
libtommath/*.sh
+libtommath/doc/*
libtommath/tombc/*
libtommath/pre_gen/*
libtommath/pics/*
diff --git a/.travis.yml b/.travis.yml
index e1751c4..3770e07 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -92,6 +92,18 @@ matrix:
- g++-7
env:
- BUILD_DIR=unix
+ - CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
+ - os: linux
+ dist: xenial
+ compiler: gcc-7
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - g++-7
+ env:
+ - BUILD_DIR=unix
- CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
- os: osx
osx_image: xcode8
@@ -164,6 +176,22 @@ matrix:
- wine
env:
- BUILD_DIR=win
+ - CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=3"
+ - NO_DIRECT_TEST=1
+ - os: linux
+ dist: xenial
+ compiler: i686-w64-mingw32-gcc
+ addons:
+ apt:
+ packages:
+ - gcc-mingw-w64-base
+ - binutils-mingw-w64-i686
+ - gcc-mingw-w64-i686
+ - gcc-mingw-w64
+ - gcc-multilib
+ - wine
+ env:
+ - BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_NO_DEPRECATED=1"
- NO_DIRECT_TEST=1
# Test with mingw-w64 (64 bit)
@@ -210,6 +238,21 @@ matrix:
- wine
env:
- BUILD_DIR=win
+ - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
+ - NO_DIRECT_TEST=1
+ - os: linux
+ dist: xenial
+ compiler: x86_64-w64-mingw32-gcc
+ addons:
+ apt:
+ packages:
+ - gcc-mingw-w64-base
+ - binutils-mingw-w64-x86-64
+ - gcc-mingw-w64-x86-64
+ - gcc-mingw-w64
+ - wine
+ env:
+ - BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
- NO_DIRECT_TEST=1
before_install:
diff --git a/doc/Tcl.n b/doc/Tcl.n
index fc3b477..0eb51b9 100644
--- a/doc/Tcl.n
+++ b/doc/Tcl.n
@@ -28,10 +28,10 @@ First, the Tcl interpreter breaks the command into \fIwords\fR
and performs substitutions as described below.
These substitutions are performed in the same way for all
commands.
-Secondly, the first word is used to locate a command procedure to
-carry out the command, then all of the words of the command are
-passed to the command procedure.
-The command procedure is free to interpret each of its words
+Secondly, the first word is used to locate a routine to
+carry out the command, and the remaining words of the command are
+passed to that routine.
+The routine is free to interpret each of its words
in any way it likes, such as an integer, variable name, list,
or Tcl script.
Different commands interpret their words differently.
diff --git a/doc/ToUpper.3 b/doc/ToUpper.3
index 1c7a0c2..fd9ddfb 100644
--- a/doc/ToUpper.3
+++ b/doc/ToUpper.3
@@ -78,11 +78,5 @@ turns each character in the string into its lower-case equivalent.
turns the first character in the string into its title-case equivalent
and all following characters into their lower-case equivalents.
-.SH BUGS
-.PP
-At this time, the case conversions are only defined for the ISO8859-1
-characters. Unicode characters above 0x00ff are not modified by these
-routines.
-
.SH KEYWORDS
utf, unicode, toupper, tolower, totitle, case
diff --git a/doc/Utf.3 b/doc/Utf.3
index 3ae5c0e..80c86aa 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -130,9 +130,10 @@ represent one Unicode character in the UTF-8 representation.
\fBTcl_UniCharToUtf\fR stores the character \fIch\fR as a UTF-8 string
in starting at \fIbuf\fR. The return value is the number of bytes stored
in \fIbuf\fR. If ch is a high surrogate (range U+D800 - U+DBFF), then
-the return value will be 0 and nothing will be stored. If you still
-want to produce UTF-8 output for it (even though knowing it's an illegal
-code-point on its own), just call \fBTcl_UniCharToUtf\fR again using ch = -1.
+the return value will be 1 and a single byte in the range 0xF0 - 0xF4
+will be stored. If you still want to produce UTF-8 output for it (even
+though knowing it's an illegal code-point on its own), just call
+\fBTcl_UniCharToUtf\fR again specifying ch = -1.
.PP
\fBTcl_UtfToUniChar\fR reads one UTF-8 character starting at \fIsrc\fR
and stores it as a Tcl_UniChar in \fI*chPtr\fR. The return value is the
diff --git a/doc/array.n b/doc/array.n
index bbfcd9f..268597d 100644
--- a/doc/array.n
+++ b/doc/array.n
@@ -40,7 +40,7 @@ has been completed.
.VS TIP508
Manages the default value of the array. Arrays initially have no default
value, but this command allows you to set one; the default value will be
-returned when reading from an element of the array \farrayName\fR if the read
+returned when reading from an element of the array \fIarrayName\fR if the read
would otherwise result in an error. Note that this may cause the \fBappend\fR,
\fBdict\fR, \fBincr\fR and \fBlappend\fR commands to change their behavior in
relation to non-existing array elements.
diff --git a/doc/cookiejar.n b/doc/cookiejar.n
index ac71759..0d8b81a 100644
--- a/doc/cookiejar.n
+++ b/doc/cookiejar.n
@@ -96,7 +96,7 @@ the database.
.RE
.PP
Cookie jar instances may be made with any of the standard TclOO instance
-creation methods (\fBcreate\fR or \fRnew\fR).
+creation methods (\fBcreate\fR or \fBnew\fR).
.TP
\fB::http::cookiejar new\fR ?\fIfilename\fR?
.
diff --git a/doc/define.n b/doc/define.n
index 63daed1..36a68a6 100644
--- a/doc/define.n
+++ b/doc/define.n
@@ -52,7 +52,7 @@ the \fBmethod\fR definition, below.
.RS
.PP
Class methods can be called on either the class itself or on the instances of
-that class. When they are called, the current object (see the \fBself\R and
+that class. When they are called, the current object (see the \fBsel\fR and
\fBmy\fR commands) is the class on which they are called or the class of the
instance on which they are called, depending on whether they are called on the
class or an instance of the class, respectively. If called on a subclass or
diff --git a/doc/expr.n b/doc/expr.n
index 9cb1625..b8e33f7 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -124,7 +124,8 @@ applied to integers.
.TP 20
\fB**\fR
.
-Exponentiation. Valid for numeric operands.
+Exponentiation. Valid for numeric operands. The maximum exponent value
+that Tcl can handle if the first number is an integer > 1 is 268435455.
.TP 20
\fB*\0\0/\0\0%\fR
.
diff --git a/doc/info.n b/doc/info.n
index cf5a438..dc21ac1 100644
--- a/doc/info.n
+++ b/doc/info.n
@@ -13,129 +13,102 @@
.BS
'\" Note: do not modify the .SH NAME line immediately below!
.SH NAME
-info \- Return information about the state of the Tcl interpreter
+info \- Information about the state of the Tcl interpreter
.SH SYNOPSIS
\fBinfo \fIoption \fR?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
.PP
-This command provides information about various internals of the Tcl
-interpreter.
-The legal \fIoption\fRs (which may be abbreviated) are:
+Available commands:
.TP
\fBinfo args \fIprocname\fR
.
-Returns a list containing the names of the arguments to procedure
-\fIprocname\fR, in order. \fIProcname\fR must be the name of a
-Tcl command procedure.
+Returns the names of the parameters to the procedure named \fIprocname\fR.
.TP
\fBinfo body \fIprocname\fR
.
-Returns the body of procedure \fIprocname\fR. \fIProcname\fR must be
-the name of a Tcl command procedure.
+Returns the body of the procedure named \fIprocname\fR.
.TP
\fBinfo class\fI subcommand class\fR ?\fIarg ...\fR
.
-Returns information about the class, \fIclass\fR. The \fIsubcommand\fRs are
-described in \fBCLASS INTROSPECTION\fR below.
+Returns information about the class named \fIclass\fR.
+See \fBCLASS INTROSPECTION\fR below.
.TP
\fBinfo cmdcount\fR
.
-Returns a count of the total number of commands that have been invoked
-in this interpreter.
+Returns the total number of commands evaluated in this interpreter.
.TP
\fBinfo cmdtype \fIcommandName\fR
.VS TIP426
-Returns a description of the kind of command named by \fIcommandName\fR. The
-supported types are:
+Returns a the type of the command named \fIcommandName\fR.
+Built-in types are:
.RS
.IP \fBalias\fR
-Indicates that \fIcommandName\fR was created by \fBinterp alias\fR. Note that
-safe interpreters can only see a subset of aliases (specifically those between
-two commands within themselves).
+\fIcommandName\fR was created by \fBinterp alias\fR.
+In a safe interpreter an alias is only visible if both the alias and the
+target are visible.
.IP \fBcoroutine\fR
-Indicates that \fIcommandName\fR was created by \fBcoroutine\fR.
+\fIcommandName\fR was created by \fBcoroutine\fR.
.IP \fBensemble\fR
-Indicates that \fIcommandName\fR was created by \fBnamespace ensemble\fR.
+\fIcommandName\fR was created by \fBnamespace ensemble\fR.
.IP \fBimport\fR
-Indicates that \fIcommandName\fR was created by \fBnamespace import\fR.
+\fIcommandName\fR was created by \fBnamespace import\fR.
.IP \fBnative\fR
-Indicates that \fIcommandName\fR was created by the \fBTcl_CreateObjProc\fR
+\fIcommandName\fR was created by the \fBTcl_CreateObjProc\fR
interface directly without further registration of the type of command.
.IP \fBobject\fR
-Indicates that \fIcommandName\fR is the public command that represents an
+\fIcommandName\fR is the public command that represents an
instance of \fBoo::object\fR or one of its subclasses.
.IP \fBprivateObject\fR
-Indicates that \fIcommandName\fR is the private command (\fBmy\fR by default)
+\fIcommandName\fR is the private command, \fBmy\fR by default,
that represents an instance of \fBoo::object\fR or one of its subclasses.
.IP \fBproc\fR
-Indicates that \fIcommandName\fR was created by \fBproc\fR.
+\fIcommandName\fR was created by \fBproc\fR.
.IP \fBslave\fR
-Indicates that \fIcommandName\fR was created by \fBinterp create\fR.
+\fIcommandName\fR was created by \fBinterp create\fR.
.IP \fBzlibStream\fR
-Indicates that \fIcommandName\fR was created by \fBzlib stream\fR.
+\fIcommandName\fR was created by \fBzlib stream\fR.
.PP
-There may be other registered types as well; this is a set that is extensible
-at the implementation level with \fBTcl_RegisterCommandTypeName\fR.
+Other types may be also registered as well. See \fBTcl_RegisterCommandTypeName\fR.
.RE
.VE TIP426
.TP
\fBinfo commands \fR?\fIpattern\fR?
.
-If \fIpattern\fR is not specified,
-returns a list of names of all the Tcl commands visible
-(i.e. executable without using a qualified name) to the current namespace,
-including both the built-in commands written in C and
-the command procedures defined using the \fBproc\fR command.
-If \fIpattern\fR is specified,
-only those names matching \fIpattern\fR are returned.
-Matching is determined using the same rules as for \fBstring match\fR.
-\fIpattern\fR can be a qualified name like \fBFoo::print*\fR.
-That is, it may specify a particular namespace
-using a sequence of namespace names separated by double colons (\fB::\fR),
-and may have pattern matching special characters
-at the end to specify a set of commands in that namespace.
-If \fIpattern\fR is a qualified name,
-the resulting list of command names has each one qualified with the name
-of the specified namespace, and only the commands defined in the named
-namespace are returned.
-.\" Technically, most of this hasn't changed; that's mostly just the
-.\" way it always worked. Hardly anyone knew that though.
+Returns the names of all commands visible in the current namespace. If
+\fIpattern\fR is given, returns only those names that match according to
+\fBstring match\fR. Only the last component of \fIpattern\fR is a pattern.
+Other components identify a namespace. See \fBNAMESPACE RESOLUTION\fR in the
+\fBnamespace\fR(n) documentation.
.TP
\fBinfo complete \fIcommand\fR
.
-Returns 1 if \fIcommand\fR is a complete Tcl command in the sense of
-having no unclosed quotes, braces, brackets or array element names.
-If the command does not appear to be complete then 0 is returned.
-This command is typically used in line-oriented input environments
-to allow users to type in commands that span multiple lines; if the
-command is not complete, the script can delay evaluating it until additional
-lines have been typed to complete the command.
+Returns 1 if \fIcommand\fR is a complete command, and \fB0\fR otherwise.
+Typically used in line-oriented input environments
+to allow users to type in commands that span multiple lines.
.TP
\fBinfo coroutine\fR
.
-Returns the name of the currently executing \fBcoroutine\fR, or the empty
-string if either no coroutine is currently executing, or the current coroutine
-has been deleted (but has not yet returned or yielded since deletion).
+Returns the name of the current \fBcoroutine\fR, or the empty
+string if there is no current coroutine or the current coroutine
+has been deleted.
.TP
-\fBinfo default \fIprocname arg varname\fR
+\fBinfo default \fIprocname parameter varname\fR
.
-\fIProcname\fR must be the name of a Tcl command procedure and \fIarg\fR
-must be the name of an argument to that procedure. If \fIarg\fR
-does not have a default value then the command returns \fB0\fR.
-Otherwise it returns \fB1\fR and places the default value of \fIarg\fR
-into variable \fIvarname\fR.
+If the parameter \fIparameter\fR for the procedure named \fIprocname\fR has a
+default value, stores that value in \fIvarname\fR and returns \fB1\fR.
+Otherwise, returns \fB0\fR.
.TP
\fBinfo errorstack \fR?\fIinterp\fR?
.
-Returns, in a form that is programmatically easy to parse, the function names
-and arguments at each level from the call stack of the last error in the given
-\fIinterp\fR, or in the current one if not specified.
+Returns a description of the active command at each level for the
+last error in the current interpreter, or in the interpreter named
+\fIinterp\fR if given.
.RS
.PP
-This form is an even-sized list alternating tokens and parameters. Tokens are
+The description is a dictionary of tokens and parameters. Tokens are
currently either \fBCALL\fR, \fBUP\fR, or \fBINNER\fR, but other values may be
-introduced in the future. \fBCALL\fR indicates a procedure call, and its
+introduced in the future. \fBCALL\fR indicates a command call, and its
parameter is the corresponding \fBinfo level\fR \fB0\fR. \fBUP\fR indicates a
shift in variable frames generated by \fBuplevel\fR or similar, and applies to
the previous \fBCALL\fR item. Its parameter is the level offset. \fBINNER\fR
@@ -143,126 +116,103 @@ identifies the
.QW "inner context" ,
which is the innermost atomic command or bytecode instruction that raised the
error, along with its arguments when available. While \fBCALL\fR and \fBUP\fR
-allow to follow complex call paths, \fBINNER\fR homes in on the offending
-operation in the innermost procedure call, even going to sub-expression
+provide a trail of the call path, \fBINNER\fR provides details of the offending
+operation in the innermost procedure call, even to sub-expression
granularity.
.PP
This information is also present in the \fB\-errorstack\fR entry of the
options dictionary returned by 3-argument \fBcatch\fR; \fBinfo errorstack\fR
is a convenient way of retrieving it for uncaught errors at top-level in an
-interactive \fBtclsh\fR.
+interactive \fBinterpreter\fR.
.RE
.TP
\fBinfo exists \fIvarName\fR
.
-Returns \fB1\fR if the variable named \fIvarName\fR exists in the
-current context (either as a global or local variable) and has been
-defined by being given a value, returns \fB0\fR otherwise.
+Returns \fB1\fR if a variable named \fIvarName\fR is visible and has been
+defined, and \fB0\fR otherwise.
.TP
-\fBinfo frame\fR ?\fInumber\fR?
+\fBinfo frame\fR ?\fIdepth\fR?
.
-This command provides access to all frames on the stack, even those
-hidden from \fBinfo level\fR. If \fInumber\fR is not specified, this
-command returns a number giving the frame level of the command. This
-is 1 if the command is invoked at top-level. If \fInumber\fR is
-specified, then the result is a dictionary containing the location
-information for the command at the \fInumber\fRed level on the stack.
+Returns the depth of the call to \fBinfo frame\fR itself. Otherwise, returns a
+dictionary describing the active command at the \fIdepth\fR, which counts all
+commands visible to \fBinfo level\fR, plus commands that don't create a new
+level, such as \fBeval\fR, \fBsource\fR, or \fIuplevel\fR. The frame depth is
+always greater than the current level.
.RS
.PP
-If \fInumber\fR is positive (> 0) then it selects a particular stack
-level (1 refers to the outer-most active command, 2 to the command it
-called, and so on, up to the current frame level which refers to
-\fBinfo frame\fR itself); otherwise it gives a level relative to the
-current command (0 refers to the current command, i.e., \fBinfo
-frame\fR itself, -1 to its caller, and so on).
+If \fIdepth\fR is greater than \fB0\fR it is the frame at that depth. Otherwise
+it is the number of frames up from the current frame.
.PP
-This is similar to how \fBinfo level\fR works, except that this
-subcommand reports all frames, like \fBsource\fRd scripts,
-\fBeval\fRs, \fBuplevel\fRs, etc.
-.PP
-Note that for nested commands, like
+As with \fBinfo level\fR and error traces, for nested commands like
.QW "foo [bar [x]]" ,
only
.QW x
-will be seen by an \fBinfo frame\fR invoked within
+is seen by \fBinfo frame\fR invoked within
.QW x .
-This is the same as for \fBinfo level\fR and error stack traces.
.PP
-The result dictionary may contain the keys listed below, with the
-specified meanings for their values:
+The dictionary may contain the following keys:
.TP
\fBtype\fR
.
-This entry is always present and describes the nature of the location
-for the command. The recognized values are \fBsource\fR, \fBproc\fR,
+Always present. Possible values are \fBsource\fR, \fBproc\fR,
\fBeval\fR, and \fBprecompiled\fR.
.RS
.TP
\fBsource\fR\0\0\0\0\0\0\0\0
.
-means that the command is found in a script loaded by the \fBsource\fR
+A script loaded via the \fBsource\fR
command.
.TP
\fBproc\fR\0\0\0\0\0\0\0\0
.
-means that the command is found in dynamically created procedure body.
+The body of a procedure that could not be traced back to a
+line in a particular script.
.TP
\fBeval\fR\0\0\0\0\0\0\0\0
.
-means that the command is executed by \fBeval\fR or \fBuplevel\fR.
+The body of a script provided to \fBeval\fR or \fBuplevel\fR.
.TP
\fBprecompiled\fR\0\0\0\0\0\0\0\0
.
-means that the command is found in a pre-compiled script (loadable by
-the package \fBtbcload\fR), and no further information will be
-available.
+A pre-compiled script (loadable by the package
+\fBtbcload\fR), and no further information is available.
.RE
.TP
\fBline\fR
.
-This entry provides the number of the line the command is at inside of
-the script it is a part of. This information is not present for type
-\fBprecompiled\fR. For type \fBsource\fR this information is counted
-relative to the beginning of the file, whereas for the last two types
-the line is counted relative to the start of the script.
+The line number of of the command inside its script. Not available for
+\fBprecompiled\fR commands. When the type is \fBsource\fR, the line number is
+relative to the beginning of the file, whereas for the last two types it is
+relative to the start of the script.
.TP
\fBfile\fR
.
-This entry is present only for type \fBsource\fR. It provides the
-normalized path of the file the command is in.
+For type \fBsource\fR, provides the normalized path of the file that contains
+the command.
.TP
\fBcmd\fR
.
-This entry provides the string representation of the command. This is
-usually the unsubstituted form, however for commands which are a
-canonically-constructed list (e.g., as produced by the \fBlist\fR command)
-executed by \fBeval\fR it is the substituted form as they have no other
-string representation. Care is taken that the canonicality property of
-the latter is not spoiled.
+The command before substitutions were performed.
.TP
\fBproc\fR
.
-This entry is present only if the command is found in the body of a
-regular Tcl procedure. It then provides the name of that procedure.
+For type \fBprod\fR, the name of the procedure containing the command.
.TP
\fBlambda\fR
.
-This entry is present only if the command is found in the body of an
-anonymous Tcl procedure, i.e. a lambda. It then provides the entire
-definition of the lambda in question.
+For a command in a script evaluated as the body of an unnamed routine via the
+\fBapply\fR command, the definition of that routine.
.TP
\fBlevel\fR
.
-This entry is present only if the queried frame has a corresponding
-frame returned by \fBinfo level\fR. It provides the index of this
-frame, relative to the current level (0 and negative numbers).
+For a frame that corresponds to a level, (to be determined).
.PP
-A thing of note is that for procedures statically defined in files the
-locations of commands in their bodies will be reported with type
-\fBsource\fR and absolute line numbers, and not as type
-\fBproc\fR. The same is true for procedures nested in statically
-defined procedures, and literal eval scripts in files or statically
-defined procedures.
+When a command can be traced to its literal definition in some script, e.g.
+procedures nested in statically defined procedures, and literal eval scripts in
+files or statically defined procedures, its type is \fBsource\fR and its
+location is the absolute line number in the script. Otherwise, its type is
+\fBproc\fR and its location is its line number within the body of the
+procedure.
.PP
In contrast, procedure definitions and \fBeval\fR within a dynamically
\fBeval\fRuated environment count line numbers relative to the start of
@@ -270,7 +220,7 @@ their script, even if they would be able to count relative to the
start of the outer dynamic script. That type of number usually makes
more sense.
.PP
-A different way of describing this behaviour is that file based
+A different way of describing this behaviour is that file-based
locations are tracked as deeply as possible, and where this is not
possible the lines are counted based on the smallest possible
\fBeval\fR or procedure body, as that scope is usually easier to find
@@ -284,152 +234,112 @@ counted relative to the start of each word (smallest scope)
.TP
\fBinfo functions \fR?\fIpattern\fR?
.
-If \fIpattern\fR is not specified, returns a list of all the math
+If \fIpattern\fR is not given, returns a list of all the math
functions currently defined.
-If \fIpattern\fR is specified, only those functions whose name matches
-\fIpattern\fR are returned. Matching is determined using the same
-rules as for \fBstring match\fR.
+If \fIpattern\fR is given, returns only those names that match
+\fIpattern\fR according to \fBstring match\fR.
.TP
\fBinfo globals \fR?\fIpattern\fR?
.
-If \fIpattern\fR is not specified, returns a list of all the names
+If \fIpattern\fR is not given, returns a list of all the names
of currently-defined global variables.
Global variables are variables in the global namespace.
-If \fIpattern\fR is specified, only those names matching \fIpattern\fR
+If \fIpattern\fR is given, only those names matching \fIpattern\fR
are returned. Matching is determined using the same rules as for
\fBstring match\fR.
.TP
\fBinfo hostname\fR
.
-Returns the name of the computer on which this invocation is being
-executed.
-Note that this name is not guaranteed to be the fully qualified domain
-name of the host. Where machines have several different names (as is
+Returns the name of the current host.
+
+This name is not guaranteed to be the fully-qualified domain
+name of the host. Where machines have several different names, as is
common on systems with both TCP/IP (DNS) and NetBIOS-based networking
-installed,) it is the name that is suitable for TCP/IP networking that
+installed, it is the name that is suitable for TCP/IP networking that
is returned.
.TP
-\fBinfo level\fR ?\fInumber\fR?
+\fBinfo level\fR ?\fIlevel\fR?
.
-If \fInumber\fR is not specified, this command returns a number
-giving the stack level of the invoking procedure, or 0 if the
-command is invoked at top-level. If \fInumber\fR is specified,
-then the result is a list consisting of the name and arguments for the
-procedure call at level \fInumber\fR on the stack. If \fInumber\fR
-is positive then it selects a particular stack level (1 refers
-to the top-most active procedure, 2 to the procedure it called, and
-so on); otherwise it gives a level relative to the current level
-(0 refers to the current procedure, -1 to its caller, and so on).
-See the \fBuplevel\fR command for more information on what stack
-levels mean.
+If \fInumber\fR is not given, the level this routine was called from.
+Otherwise returns the complete command active at the given level. If
+\fInumber\fR is greater than \fB0\fR, it is the desired level. Otherwise, it
+is \fInumber\fR levels up from the current level. A complete command is the
+words in the command, with all subsitutions performed, meaning that it is a
+list. See \fBuplevel\fR for more information on levels.
.TP
\fBinfo library\fR
.
-Returns the name of the library directory in which standard Tcl
-scripts are stored.
-This is actually the value of the \fBtcl_library\fR
-variable and may be changed by setting \fBtcl_library\fR.
+Returns the value of \fBtcl_library\fR, which is the name of the library
+directory in which the scripts distributed with Tcl scripts are stored.
.TP
\fBinfo loaded \fR?\fIinterp\fR? ?\fIpackage\fR?
.
-Returns the filename loaded as part of \fIpackage\fR. If \fIpackage\fR
-is not specified, returns a list describing all of the packages
-that have been loaded into \fIinterp\fR with the \fBload\fR command.
-Each list element is a sub-list with two elements consisting of the
-name of the file from which the package was loaded and the name of
-the package.
-For statically-loaded packages the file name will be an empty string.
-If \fIinterp\fR is omitted then information is returned for all packages
-loaded in any interpreter in the process.
-To get a list of just the packages in the current interpreter, specify
-an empty string for the \fIinterp\fR argument.
+Returns the name of each file loaded in \fIinterp\fR va \fBload\fR as part of
+\fIpackage\fR . If \fIpackage\fR is not given, returns a list where each item
+is the name of the loaded file and the name of the package for which the file
+was loaded. For a statically-loaded package the name of the file is the empty
+string. For \fInterp\fR, the empty string is the current interpreter.
.TP
\fBinfo locals \fR?\fIpattern\fR?
.
-If \fIpattern\fR is not specified, returns a list of all the names
-of currently-defined local variables, including arguments to the
-current procedure, if any.
-Variables defined with the \fBglobal\fR, \fBupvar\fR and
-\fBvariable\fR commands will not be returned.
-If \fIpattern\fR is specified, only those names matching \fIpattern\fR
-are returned. Matching is determined using the same rules as for
-\fBstring match\fR.
+If \fIpattern\fR is given, returns the name of each local variable matching
+\fIpattern\fR according to \fBstring match\fR. Otherwise, returns the name of
+each local variable. A variables defined with the \fBglobal\fR, \fBupvar\fR or
+\fBvariable\fR is not local.
+
.TP
\fBinfo nameofexecutable\fR
.
-Returns the full path name of the binary file from which the application
-was invoked. If Tcl was unable to identify the file, then an empty
-string is returned.
+Returns the absolute pathname of the program for the current interpreter. If
+such a file can not be identified an empty string is returned.
.TP
\fBinfo object\fI subcommand object\fR ?\fIarg ...\fR
.
-Returns information about the object, \fIobject\fR. The \fIsubcommand\fRs are
-described in \fBOBJECT INTROSPECTION\fR below.
+Returns information about the object named \fIobject\fR. \fIsubcommand\fR is
+described \fBOBJECT INTROSPECTION\fR below.
.TP
\fBinfo patchlevel\fR
.
-Returns the value of the global variable \fBtcl_patchLevel\fR, which holds
-the exact version of the Tcl library by default.
+Returns the value of the global variable \fBtcl_patchLevel\fR, in which the
+exact version of the Tcl library initially stored.
.TP
\fBinfo procs \fR?\fIpattern\fR?
.
-If \fIpattern\fR is not specified, returns a list of all the
-names of Tcl command procedures in the current namespace.
-If \fIpattern\fR is specified,
-only those procedure names in the current namespace
-matching \fIpattern\fR are returned.
-Matching is determined using the same rules as for
-\fBstring match\fR.
-If \fIpattern\fR contains any namespace separators, they are used to
-select a namespace relative to the current namespace (or relative to
-the global namespace if \fIpattern\fR starts with \fB::\fR) to match
-within; the matching pattern is taken to be the part after the last
-namespace separator.
+Returns the names of all visible procedures. If \fIpattern\fR is given, returns
+only those names that match according to \fBstring match\fR. Only the final
+component in \fIpattern\fR is actually considered a pattern. Any qualifying
+components simply select a namespace. See \fBNAMESPACE RESOLUTION\fR in the
+\fBnamespace\fR(n) documentation.
.TP
\fBinfo script\fR ?\fIfilename\fR?
.
-If a Tcl script file is currently being evaluated (i.e. there is a
-call to \fBTcl_EvalFile\fR active or there is an active invocation
-of the \fBsource\fR command), then this command returns the name
-of the innermost file being processed. If \fIfilename\fR is specified,
-then the return value of this command will be modified for the
-duration of the active invocation to return that name. This is
-useful in virtual file system applications.
-Otherwise the command returns an empty string.
+Returns the pathname of the innermost script currently being evaluated, or the
+empty string if no pathname can be determined. If \fIfilename\fR is given,
+sets the return value of any future calls to \fBinfo script\fR for the duration
+of the innermost active script. This is useful in virtual file system
+applications.
.TP
\fBinfo sharedlibextension\fR
.
-Returns the extension used on this platform for the names of files
-containing shared libraries (for example, \fB.so\fR under Solaris).
-If shared libraries are not supported on this platform then an empty
-string is returned.
+Returns the extension used on this platform for names of shared libraries, e.g.
+\fB.so\fR under Solaris. Returns the empty string if shared libraries are not
+supported on this platform.
.TP
\fBinfo tclversion\fR
.
-Returns the value of the global variable \fBtcl_version\fR, which holds the
-major and minor version of the Tcl library by default.
+Returns the value of the global variable \fBtcl_version\fR, in which the
+major and minor version of the Tcl library are stored.
.TP
\fBinfo vars\fR ?\fIpattern\fR?
.
-If \fIpattern\fR is not specified,
-returns a list of all the names of currently-visible variables.
-This includes locals and currently-visible globals.
-If \fIpattern\fR is specified, only those names matching \fIpattern\fR
-are returned. Matching is determined using the same rules as for
-\fBstring match\fR.
-\fIpattern\fR can be a qualified name like \fBFoo::option*\fR.
-That is, it may specify a particular namespace
-using a sequence of namespace names separated by double colons (\fB::\fR),
-and may have pattern matching special characters
-at the end to specify a set of variables in that namespace.
-If \fIpattern\fR is a qualified name,
-the resulting list of variable names
-has each matching namespace variable qualified with the name
-of its namespace.
-Note that a currently-visible variable may not yet
-.QW exist
-if it has not
-been set (e.g. a variable declared but not set by \fBvariable\fR).
+If \fIpattern\fR is not given, returns the names of all visible variables. If
+\fIpattern\fR is given, returns only those names that match according to
+\fBstring match\fR. Only the last component of \fIpattern\fR is a pattern.
+Other components identify a namespace. See \fBNAMESPACE RESOLUTION\fR in the
+\fBnamespace\fR(n) documentation. When \fIpattern\fR is a qualified name,
+results are fully qualified.
+
+A variable that has declared but not yet defined is included in the results.
.SS "CLASS INTROSPECTION"
.PP
The following \fIsubcommand\fR values are supported by \fBinfo class\fR:
@@ -492,7 +402,7 @@ the class \fIclass\fR; the definition namespace only affects the instances of
actually useful on classes that are subclasses of \fBoo::class\fR).
.RS
.PP
-If \fIclass\fR does not provide a definition namespace of the specified kind,
+If \fIclass\fR does not provide a definition namespace of the given kind,
this command returns the empty string. In those circumstances, the
\fBoo::define\fR and \fBoo::objdefine\fR commands look up which definition
namespace to use using the class inheritance hierarchy.
@@ -523,7 +433,7 @@ instances to those that match it according to the rules of \fBstring match\fR.
.
This subcommand returns a list of all public (i.e. exported) methods of the
class called \fIclass\fR. Any of the following \fIoption\fRs may be
-specified, controlling exactly which method names are returned:
+given, controlling exactly which method names are returned:
.RS
.TP
\fB\-all\fR
@@ -600,7 +510,7 @@ This subcommand returns a list of all variables that have been declared for
the class named \fIclass\fR (i.e. that are automatically present in the
class's methods, constructor and destructor).
.VS TIP500
-If the \fB\-private\fR option is specified, this lists the private variables
+If the \fB\-private\fR option is given, this lists the private variables
declared instead.
.VE TIP500
.SS "OBJECT INTROSPECTION"
@@ -638,7 +548,7 @@ methods.
.TP
\fBinfo object class\fI object\fR ?\fIclassName\fR?
.
-If \fIclassName\fR is unspecified, this subcommand returns class of the
+If \fIclassName\fR is not given, this subcommand returns class of the
\fIobject\fR object. If \fIclassName\fR is present, this subcommand returns a
boolean value indicating whether the \fIobject\fR is of that class.
.TP
@@ -707,7 +617,7 @@ direct or indirect).
.
This subcommand returns a list of all public (i.e. exported) methods of the
object called \fIobject\fR. Any of the following \fIoption\fRs may be
-specified, controlling exactly which method names are returned:
+given, controlling exactly which method names are returned:
.RS
.TP
\fB\-all\fR
@@ -777,7 +687,7 @@ This subcommand returns a list of all variables that have been declared for
the object named \fIobject\fR (i.e. that are automatically present in the
object's methods).
.VS TIP500
-If the \fB\-private\fR option is specified, this lists the private variables
+If the \fB\-private\fR option is given, this lists the private variables
declared instead.
.VE TIP500
.TP
diff --git a/doc/mathop.n b/doc/mathop.n
index 4c16d76..84cf308 100644
--- a/doc/mathop.n
+++ b/doc/mathop.n
@@ -151,10 +151,11 @@ is the same as
.QW "\fB** 2 [** 3 4]\fR" .
Each \fInumber\fR may be
any numeric value, though the second number must not be fractional if the
-first is negative. If no arguments are given, the result will be one, and if
-only one argument is given, the result will be that argument. The
-result will have an integral value only when all arguments are
-integral values.
+first is negative. The maximum exponent value that Tcl can handle if the
+first number is an integer > 1 is 268435455. If no arguments are given,
+the result will be one, and if only one argument is given, the result will
+be that argument. The result will have an integral value only when all
+arguments are integral values.
.SS "COMPARISON OPERATORS"
.PP
The behaviors of the comparison operator commands (most of which operate
diff --git a/doc/zipfs.n b/doc/zipfs.n
index c27b5d5..2d84173 100644
--- a/doc/zipfs.n
+++ b/doc/zipfs.n
@@ -110,7 +110,6 @@ for the current platform. On Windows, this value is
.QW \fBzipfs:/\fR .
On Unix, this value is
.QW \fB//zipfs:/\fR .
-.RE
.TP
\fBzipfs unmount \fImountpoint\fR
.
@@ -184,7 +183,7 @@ before unmounting it again:
.PP
.CS
set zip myApp.zip
-set base [file join [\fbzipfs root\fR] myApp]
+set base [file join [\fBzipfs root\fR] myApp]
\fBzipfs mount\fR $base $zip
# $base now has the contents of myApp.zip
@@ -213,7 +212,7 @@ building the ZIP and when mounting it.
set zip myApp.zip
set sourceDir [file normalize myApp]
set password "hunter2"
-set base [file join [\fbzipfs root\fR] myApp]
+set base [file join [\fBzipfs root\fR] myApp]
# Create with password
\fBzipfs mkzip\fR $targetZip $sourceDir $sourceDir $password
diff --git a/generic/regc_locale.c b/generic/regc_locale.c
index 71fa57f..9b2f7ae 100644
--- a/generic/regc_locale.c
+++ b/generic/regc_locale.c
@@ -682,21 +682,21 @@ static const crange graphRangeTable[] = {
{0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
{0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312f},
{0x3131, 0x318e}, {0x3190, 0x31ba}, {0x31c0, 0x31e3}, {0x31f0, 0x321e},
- {0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c},
- {0xa490, 0xa4c6}, {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf},
- {0xa7c2, 0xa7c6}, {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877},
- {0xa880, 0xa8c5}, {0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c},
- {0xa980, 0xa9cd}, {0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36},
- {0xaa40, 0xaa4d}, {0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6},
- {0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26},
- {0xab28, 0xab2e}, {0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9},
- {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d},
- {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36},
- {0xfb38, 0xfb3c}, {0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f},
- {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfd}, {0xfe00, 0xfe19}, {0xfe20, 0xfe52},
- {0xfe54, 0xfe66}, {0xfe68, 0xfe6b}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc},
- {0xff01, 0xffbe}, {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7},
- {0xffda, 0xffdc}, {0xffe0, 0xffe6}, {0xffe8, 0xffee}
+ {0x3220, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c}, {0xa490, 0xa4c6},
+ {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf}, {0xa7c2, 0xa7c6},
+ {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877}, {0xa880, 0xa8c5},
+ {0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c}, {0xa980, 0xa9cd},
+ {0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36}, {0xaa40, 0xaa4d},
+ {0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6}, {0xab01, 0xab06},
+ {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e},
+ {0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
+ {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9},
+ {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36}, {0xfb38, 0xfb3c},
+ {0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7},
+ {0xfdf0, 0xfdfd}, {0xfe00, 0xfe19}, {0xfe20, 0xfe52}, {0xfe54, 0xfe66},
+ {0xfe68, 0xfe6b}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc}, {0xff01, 0xffbe},
+ {0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc},
+ {0xffe0, 0xffe6}, {0xffe8, 0xffee}
#if CHRBITS > 16
,{0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003f, 0x1004d},
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10100, 0x10102}, {0x10107, 0x10133},
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 61b1982..1cf0b89 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -889,9 +889,10 @@ declare 243 {
# void Tcl_StaticPackage(Tcl_Interp *interp, const char *pkgName,
# Tcl_PackageInitProc *initProc, Tcl_PackageInitProc *safeInitProc)
#}
-declare 245 {
- int Tcl_StringMatch(const char *str, const char *pattern)
-}
+# Removed in 9.0 (stub entry only)
+#declare 245 {
+# int Tcl_StringMatch(const char *str, const char *pattern)
+#}
# Removed in 9.0:
#declare 246 {
# int Tcl_TellOld(Tcl_Channel chan)
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index b311552..a9eb6b2 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -1065,7 +1065,7 @@ TclAssembleCode(
*/
if (parsePtr->numWords > 0) {
- int instLen = parsePtr->commandSize;
+ size_t instLen = parsePtr->commandSize;
/* Length in bytes of the current command */
if (parsePtr->term == parsePtr->commandStart + instLen - 1) {
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 9b57e2c..e116698 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -2444,7 +2444,6 @@ Tcl_CreateCommand(
* Side effects:
* If a command named "cmdName" already exists for interp, it is
* first deleted. Then the new command is created from the arguments.
- * [***] (See below for exception).
*
* In the future, during bytecode evaluation when "cmdName" is seen as
* the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
@@ -2553,24 +2552,7 @@ TclCreateObjCommandInNs(
cmdPtr = Tcl_GetHashValue(hPtr);
/*
- * [***] This is wrong. See Tcl Bug a16752c252. However, this buggy
- * behavior is kept under particular circumstances to accommodate
- * deployed binaries of the "tclcompiler" program
- * http://sourceforge.net/projects/tclpro/
- * that crash if the bug is fixed.
- */
-
- if (cmdPtr->objProc == TclInvokeStringCommand
- && cmdPtr->clientData == clientData
- && cmdPtr->deleteData == clientData
- && cmdPtr->deleteProc == deleteProc) {
- cmdPtr->objProc = proc;
- cmdPtr->objClientData = clientData;
- return (Tcl_Command) cmdPtr;
- }
-
- /*
- * Otherwise, we delete the old command. Be careful to preserve any
+ * Command already exists; delete it. Be careful to preserve any
* existing import links so we can restore them down below. That way,
* you can redefine a command and its import status will remain
* intact.
@@ -4854,7 +4836,8 @@ TclEvalEx(
Tcl_Obj **objv, **objvSpace;
int *expand, *lines, *lineSpace;
Tcl_Token *tokenPtr;
- int commandLength, bytesLeft, expandRequested, code = TCL_OK;
+ int bytesLeft, expandRequested, code = TCL_OK;
+ size_t commandLength;
CallFrame *savedVarFramePtr;/* Saves old copy of iPtr->varFramePtr in case
* TCL_EVAL_GLOBAL was set. */
int allowExceptions = (iPtr->evalFlags & TCL_ALLOW_EXCEPTIONS);
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index cda6d3a..fbf13f4 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -800,7 +800,7 @@ Tcl_ExitObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int value;
+ Tcl_WideInt value;
if ((objc != 1) && (objc != 2)) {
Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?");
@@ -809,10 +809,10 @@ Tcl_ExitObjCmd(
if (objc == 1) {
value = 0;
- } else if (Tcl_GetIntFromObj(interp, objv[1], &value) != TCL_OK) {
+ } else if (TclGetWideBitsFromObj(interp, objv[1], &value) != TCL_OK) {
return TCL_ERROR;
}
- Tcl_Exit(value);
+ Tcl_Exit((int)value);
/*NOTREACHED*/
return TCL_OK; /* Better not ever reach this! */
}
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 253c7cc..cf4625e 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1447,7 +1447,7 @@ StringIndexCmd(
Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(&uch, 1));
} else {
- char buf[TCL_UTF_MAX] = "";
+ char buf[4] = "";
end = Tcl_UniCharToUtf(ch, buf);
if ((ch >= 0xD800) && (end < 3)) {
@@ -4385,6 +4385,11 @@ usage:
middle *= TclpWideClickInMicrosec();
#endif
+ if (!count) { /* no iterations - avoid divide by zero */
+ objs[0] = objs[2] = objs[4] = Tcl_NewWideIntObj(0);
+ goto retRes;
+ }
+
/* if not calibrate */
if (!calibrate) {
/* minimize influence of measurement overhead */
@@ -4437,9 +4442,14 @@ usage:
objs[4] = Tcl_NewWideIntObj((count / middle) * 1000000);
}
+ retRes:
/* estimated net execution time (in millisecs) */
if (!calibrate) {
- objs[6] = Tcl_ObjPrintf("%.3f", (double)middle / 1000);
+ if (middle >= 1) {
+ objs[6] = Tcl_ObjPrintf("%.3f", (double)middle / 1000);
+ } else {
+ objs[6] = Tcl_NewWideIntObj(0);
+ }
TclNewLiteralStringObj(objs[7], "nett-ms");
}
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 1f8a8ea..4586992 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -1505,7 +1505,7 @@ TclSubstCompile(
tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) {
size_t length;
int literal, catchRange, breakJump;
- char buf[TCL_UTF_MAX] = "";
+ char buf[4] = "";
JumpFixup startFixup, okFixup, returnFixup, breakFixup;
JumpFixup continueFixup, otherFixup, endFixup;
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 2ba0b8d..830344d 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -2066,7 +2066,7 @@ ParseLexeme(
if (Tcl_UtfCharComplete(start, numBytes)) {
scanned = TclUtfToUniChar(start, &ch);
} else {
- char utfBytes[TCL_UTF_MAX];
+ char utfBytes[4];
memcpy(utfBytes, start, numBytes);
utfBytes[numBytes] = '\0';
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 38aad66..019b5b1 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -677,8 +677,8 @@ static void StartExpanding(CompileEnv *envPtr);
* commands.
*/
static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset,
- Tcl_Token *tokenPtr, const char *cmd, int len,
- int numWords, int line, int *clNext, int **lines,
+ Tcl_Token *tokenPtr, const char *cmd,
+ size_t numWords, int line, int *clNext, int **lines,
CompileEnv *envPtr);
static void ReleaseCmdWordData(ExtCmdLoc *eclPtr);
@@ -1725,7 +1725,7 @@ TclWordKnownAtCompileTime(
case TCL_TOKEN_BS:
if (tempPtr != NULL) {
- char utfBuf[TCL_UTF_MAX] = "";
+ char utfBuf[4] = "";
size_t length = TclParseBackslash(tokenPtr->start,
tokenPtr->size, NULL, utfBuf);
@@ -1769,7 +1769,7 @@ TclWordKnownAtCompileTime(
static int
ExpandRequested(
Tcl_Token *tokenPtr,
- int numWords)
+ size_t numWords)
{
/* Determine whether any words of the command require expansion */
while (numWords--) {
@@ -1811,10 +1811,11 @@ TclCompileInvocation(
Tcl_Interp *interp,
Tcl_Token *tokenPtr,
Tcl_Obj *cmdObj,
- int numWords,
+ size_t numWords,
CompileEnv *envPtr)
{
- int wordIdx = 0, depth = TclGetStackDepth(envPtr);
+ size_t wordIdx = 0;
+ int depth = TclGetStackDepth(envPtr);
DefineLineInformation;
if (cmdObj) {
@@ -2029,7 +2030,7 @@ CompileCommandTokens(
EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source,
parsePtr->tokenPtr, parsePtr->commandStart,
- parsePtr->commandSize, parsePtr->numWords, cmdLine,
+ parsePtr->numWords, cmdLine,
clNext, &wlines, envPtr);
wlineat = eclPtr->nuloc - 1;
@@ -2339,7 +2340,7 @@ TclCompileTokens(
{
Tcl_DString textBuffer; /* Holds concatenated chars from adjacent
* TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
- char buffer[TCL_UTF_MAX] = "";
+ char buffer[4] = "";
int i, numObjsToConcat, adjust;
size_t length;
unsigned char *entryCodeNext = envPtr->codeNext;
@@ -3238,8 +3239,7 @@ EnterCmdWordData(
int srcOffset, /* Offset of first char of the command. */
Tcl_Token *tokenPtr,
const char *cmd,
- int len,
- int numWords,
+ size_t numWords,
int line,
int *clNext,
int **wlines,
@@ -3247,7 +3247,8 @@ EnterCmdWordData(
{
ECL *ePtr;
const char *last;
- int wordIdx, wordLine, *wwlines, *wordNext;
+ size_t wordIdx;
+ int wordLine, *wwlines, *wordNext;
if (eclPtr->nuloc >= eclPtr->nloc) {
/*
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 44bde7a..614215c 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1077,7 +1077,7 @@ MODULE_SCOPE void TclCompileExprWords(Tcl_Interp *interp,
Tcl_Token *tokenPtr, int numWords,
CompileEnv *envPtr);
MODULE_SCOPE void TclCompileInvocation(Tcl_Interp *interp,
- Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, int numWords,
+ Tcl_Token *tokenPtr, Tcl_Obj *cmdObj, size_t numWords,
CompileEnv *envPtr);
MODULE_SCOPE void TclCompileScript(Tcl_Interp *interp,
const char *script, size_t numBytes,
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index cda7a48..002d365 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -689,8 +689,7 @@ EXTERN int Tcl_SplitList(Tcl_Interp *interp,
EXTERN void Tcl_SplitPath(const char *path, int *argcPtr,
const char ***argvPtr);
/* Slot 244 is reserved */
-/* 245 */
-EXTERN int Tcl_StringMatch(const char *str, const char *pattern);
+/* Slot 245 is reserved */
/* Slot 246 is reserved */
/* Slot 247 is reserved */
/* 248 */
@@ -2031,7 +2030,7 @@ typedef struct TclStubs {
int (*tcl_SplitList) (Tcl_Interp *interp, const char *listStr, int *argcPtr, const char ***argvPtr); /* 242 */
void (*tcl_SplitPath) (const char *path, int *argcPtr, const char ***argvPtr); /* 243 */
void (*reserved244)(void);
- int (*tcl_StringMatch) (const char *str, const char *pattern); /* 245 */
+ void (*reserved245)(void);
void (*reserved246)(void);
void (*reserved247)(void);
int (*tcl_TraceVar2) (Tcl_Interp *interp, const char *part1, const char *part2, int flags, Tcl_VarTraceProc *proc, void *clientData); /* 248 */
@@ -2925,8 +2924,7 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_SplitPath \
(tclStubsPtr->tcl_SplitPath) /* 243 */
/* Slot 244 is reserved */
-#define Tcl_StringMatch \
- (tclStubsPtr->tcl_StringMatch) /* 245 */
+/* Slot 245 is reserved */
/* Slot 246 is reserved */
/* Slot 247 is reserved */
#define Tcl_TraceVar2 \
@@ -3844,6 +3842,7 @@ extern const TclStubs *tclStubsPtr;
#define Tcl_SetLongObj(objPtr, value) Tcl_SetWideIntObj((objPtr), (long)(value))
#define Tcl_GetUnicode(objPtr) Tcl_GetUnicodeFromObj((objPtr), NULL)
#define Tcl_BackgroundError(interp) Tcl_BackgroundException((interp), TCL_ERROR)
+#define Tcl_StringMatch(str, pattern) Tcl_StringCaseMatch((str), (pattern), 0)
/*
* Deprecated Tcl procedures:
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 69ec6b3..8dd7a6d 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5006,7 +5006,7 @@ TEBCresume(
objResultPtr = Tcl_NewStringObj((const char *)
valuePtr->bytes+index, 1);
} else {
- char buf[TCL_UTF_MAX] = "";
+ char buf[4] = "";
int ch = Tcl_GetUniChar(valuePtr, index);
/*
@@ -8030,7 +8030,11 @@ ExecuteExtendedBinaryMathOp(
overflowExpon:
Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
- if (big2.used > 1) {
+ if ((big2.used > 1)
+#if DIGIT_BIT > 28
+ || ((big2.used == 1) && (big2.dp[0] >= (1<<28)))
+#endif
+ ) {
mp_clear(&big2);
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"exponent too large", -1));
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 3d7c9ad..721247b 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -6228,7 +6228,7 @@ ReadChars(
* and do not encounter the eof char this time.
*/
- dstLimit = dstRead - 1 + TCL_UTF_MAX;
+ dstLimit = dstRead + (TCL_UTF_MAX - 1);
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
@@ -6253,7 +6253,7 @@ ReadChars(
* here in this call.
*/
- dstLimit = dstRead - 1 + TCL_UTF_MAX;
+ dstLimit = dstRead + (TCL_UTF_MAX - 1);
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
@@ -6346,7 +6346,7 @@ ReadChars(
* bytes demanded by the Tcl_ExternalToUtf() call!
*/
- dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - 1 + TCL_UTF_MAX - dst;
+ dstLimit = Tcl_UtfAtIndex(dst, charsToRead) - dst + (TCL_UTF_MAX - 1);
statePtr->flags = savedFlags;
statePtr->inputEncodingFlags = savedIEFlags;
statePtr->inputEncodingState = savedState;
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 61b87a4..266b642 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -792,7 +792,7 @@ TclParseBackslash(
Tcl_UniChar unichar = 0;
int result;
size_t count;
- char buf[TCL_UTF_MAX] = "";
+ char buf[4] = "";
if (numBytes == 0) {
if (readPtr != NULL) {
@@ -2153,7 +2153,7 @@ TclSubstTokens(
Tcl_Obj *appendObj = NULL;
const char *append = NULL;
int appendByteLength = 0;
- char utfCharBytes[TCL_UTF_MAX] = "";
+ char utfCharBytes[4] = "";
switch (tokenPtr->type) {
case TCL_TOKEN_TEXT:
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 2e5cf0b..03fe6cc 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -2167,7 +2167,7 @@ Tcl_PkgInitStubsCheck(
const char * version,
int exact)
{
- const char *actualVersion = Tcl_PkgPresent(interp, "Tcl", version, 0);
+ const char *actualVersion = Tcl_PkgPresentEx(interp, "Tcl", version, 0, NULL);
if ((exact&1) && actualVersion) {
const char *p = version;
@@ -2179,11 +2179,11 @@ Tcl_PkgInitStubsCheck(
if (count == 1) {
if (0 != strncmp(version, actualVersion, strlen(version))) {
/* Construct error message */
- Tcl_PkgPresent(interp, "Tcl", version, 1);
+ Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL);
return NULL;
}
} else {
- return Tcl_PkgPresent(interp, "Tcl", version, 1);
+ return Tcl_PkgPresentEx(interp, "Tcl", version, 1, NULL);
}
}
return actualVersion;
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index ef16f4f..254e1e7 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -540,7 +540,7 @@ ProcessStatusObjCmd(
dict = Tcl_NewDictObj();
Tcl_MutexLock(&infoTablesMutex);
for (i = 0; i < numPids; i++) {
- result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid);
+ result = Tcl_GetIntFromObj(interp, pidObjs[i], &pid);
if (result != TCL_OK) {
Tcl_MutexUnlock(&infoTablesMutex);
Tcl_DecrRefCount(dict);
@@ -654,7 +654,7 @@ ProcessPurgeObjCmd(
}
Tcl_MutexLock(&infoTablesMutex);
for (i = 0; i < numPids; i++) {
- result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid);
+ result = Tcl_GetIntFromObj(interp, pidObjs[i], &pid);
if (result != TCL_OK) {
Tcl_MutexUnlock(&infoTablesMutex);
return result;
diff --git a/generic/tclResult.c b/generic/tclResult.c
index e7cc40f..a59a704 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -615,7 +615,6 @@ Tcl_SetObjErrorCode(
*----------------------------------------------------------------------
*/
-#undef Tcl_GetErrorLine
int
Tcl_GetErrorLine(
Tcl_Interp *interp)
@@ -633,7 +632,6 @@ Tcl_GetErrorLine(
*----------------------------------------------------------------------
*/
-#undef Tcl_SetErrorLine
void
Tcl_SetErrorLine(
Tcl_Interp *interp,
diff --git a/generic/tclScan.c b/generic/tclScan.c
index 0db1dd3..95006ca 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -261,7 +261,7 @@ ValidateFormat(
Tcl_UniChar ch = 0;
int objIndex, xpgSize, nspace = numVars;
int *nassign = TclStackAlloc(interp, nspace * sizeof(int));
- char buf[TCL_UTF_MAX+1] = "";
+ char buf[TCL_UTF_MAX + 1] = "";
Tcl_Obj *errorMsg; /* Place to build an error messages. Note that
* these are messy operations because we do
* not want to use the formatting engine;
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 6a0d796..590b1bd 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1944,7 +1944,7 @@ Tcl_AppendFormatToObj(
}
break;
case 'c': {
- char buf[TCL_UTF_MAX] = "";
+ char buf[4] = "";
int code, length;
if (TclGetIntFromObj(interp, segment, &code) != TCL_OK) {
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index b9efe22..26ba9e5 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -29,10 +29,8 @@
#undef Tcl_Alloc
#undef Tcl_Free
#undef Tcl_Realloc
-#undef Tcl_NewBooleanObj
#undef Tcl_NewByteArrayObj
#undef Tcl_NewDoubleObj
-#undef Tcl_NewIntObj
#undef Tcl_NewListObj
#undef Tcl_NewLongObj
#undef Tcl_DbNewLongObj
@@ -41,15 +39,9 @@
#undef Tcl_GetUnicode
#undef Tcl_DumpActiveMemory
#undef Tcl_ValidateAllMemory
-#undef Tcl_FindHashEntry
-#undef Tcl_CreateHashEntry
-#undef Tcl_Panic
-#undef Tcl_FindExecutable
#undef Tcl_SetExitProc
#undef Tcl_SetPanicProc
#undef TclpGetPid
-#undef TclSockMinimumBuffers
-#undef Tcl_SetIntObj
#undef TclStaticPackage
#undef Tcl_BackgroundError
#define TclStaticPackage Tcl_StaticPackage
@@ -946,7 +938,7 @@ const TclStubs tclStubs = {
Tcl_SplitList, /* 242 */
Tcl_SplitPath, /* 243 */
0, /* 244 */
- Tcl_StringMatch, /* 245 */
+ 0, /* 245 */
0, /* 246 */
0, /* 247 */
Tcl_TraceVar2, /* 248 */
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 9b19864..5690927 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -552,8 +552,7 @@ int
Tcltest_Init(
Tcl_Interp *interp) /* Interpreter for application. */
{
- Tcl_Obj *listPtr;
- Tcl_Obj **objv;
+ Tcl_Obj **objv, *objPtr;
int objc, index;
static const char *const specialOptions[] = {
"-appinitprocerror", "-appinitprocdeleteinterp",
@@ -740,9 +739,9 @@ Tcltest_Init(
* Check for special options used in ../tests/main.test
*/
- listPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
- if (listPtr != NULL) {
- if (Tcl_ListObjGetElements(interp, listPtr, &objc, &objv) != TCL_OK) {
+ objPtr = Tcl_GetVar2Ex(interp, "argv", NULL, TCL_GLOBAL_ONLY);
+ if (objPtr != NULL) {
+ if (Tcl_ListObjGetElements(interp, objPtr, &objc, &objv) != TCL_OK) {
return TCL_ERROR;
}
if (objc && (Tcl_GetIndexFromObj(NULL, objv[0], specialOptions, NULL,
@@ -3765,7 +3764,8 @@ TestregexpObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- int i, ii, indices, stringLength, match, about;
+ int i, indices, stringLength, match, about;
+ size_t ii;
int hasxflags, cflags, eflags;
Tcl_RegExp regExpr;
const char *string;
@@ -3922,13 +3922,13 @@ TestregexpObjCmd(
Tcl_Obj *newPtr, *varPtr, *valuePtr;
varPtr = objv[i];
- ii = ((cflags&REG_EXPECT) && i == objc-1) ? -1 : i;
+ ii = ((cflags&REG_EXPECT) && i == objc-1) ? TCL_INDEX_NONE : (size_t)i;
if (indices) {
Tcl_Obj *objs[2];
- if (ii == -1) {
+ if (ii == TCL_INDEX_NONE) {
TclRegExpRangeUniChar(regExpr, ii, &start, &end);
- } else if (ii > info.nsubs) {
+ } else if (ii > (size_t)info.nsubs) {
start = -1;
end = -1;
} else {
@@ -3950,10 +3950,10 @@ TestregexpObjCmd(
newPtr = Tcl_NewListObj(2, objs);
} else {
- if (ii == -1) {
+ if (ii == TCL_INDEX_NONE) {
TclRegExpRangeUniChar(regExpr, ii, &start, &end);
newPtr = Tcl_GetRange(objPtr, start, end);
- } else if (ii > info.nsubs) {
+ } else if (ii > (size_t)info.nsubs) {
newPtr = Tcl_NewObj();
} else {
newPtr = Tcl_GetRange(objPtr, info.matches[ii].start,
@@ -5012,7 +5012,7 @@ TestbytestringObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
- int n;
+ int n = 0;
const char *p;
if (objc != 2) {
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index 16e964a..efa40e6 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -385,9 +385,9 @@ TestbooleanobjCmd(
*/
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetBooleanObj(varPtr[varIndex], boolValue);
+ Tcl_SetWideIntObj(varPtr[varIndex], boolValue != 0);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewBooleanObj(boolValue));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(boolValue != 0));
}
Tcl_SetObjResult(interp, varPtr[varIndex]);
} else if (strcmp(subCmd, "get") == 0) {
@@ -410,9 +410,9 @@ TestbooleanobjCmd(
return TCL_ERROR;
}
if (!Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetBooleanObj(varPtr[varIndex], !boolValue);
+ Tcl_SetWideIntObj(varPtr[varIndex], boolValue == 0);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewBooleanObj(!boolValue));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(boolValue == 0));
}
Tcl_SetObjResult(interp, varPtr[varIndex]);
} else {
@@ -658,7 +658,7 @@ TestintobjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int intValue, varIndex, i;
- long longValue;
+ Tcl_WideInt wideValue;
const char *index, *subCmd, *string;
Tcl_Obj **varPtr;
@@ -713,7 +713,7 @@ TestintobjCmd(
} else {
SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(intValue));
}
- } else if (strcmp(subCmd, "setlong") == 0) {
+ } else if (strcmp(subCmd, "setint") == 0) {
if (objc != 4) {
goto wrongNumArgs;
}
@@ -728,28 +728,28 @@ TestintobjCmd(
SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(intValue));
}
Tcl_SetObjResult(interp, varPtr[varIndex]);
- } else if (strcmp(subCmd, "setmaxlong") == 0) {
- long maxLong = LONG_MAX;
+ } else if (strcmp(subCmd, "setmax") == 0) {
+ Tcl_WideInt maxWide = WIDE_MAX;
if (objc != 3) {
goto wrongNumArgs;
}
if ((varPtr[varIndex] != NULL) && !Tcl_IsShared(varPtr[varIndex])) {
- Tcl_SetWideIntObj(varPtr[varIndex], maxLong);
+ Tcl_SetWideIntObj(varPtr[varIndex], maxWide);
} else {
- SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(maxLong));
+ SetVarToObj(varPtr, varIndex, Tcl_NewWideIntObj(maxWide));
}
- } else if (strcmp(subCmd, "ismaxlong") == 0) {
+ } else if (strcmp(subCmd, "ismax") == 0) {
if (objc != 3) {
goto wrongNumArgs;
}
if (CheckIfVarUnset(interp, varPtr,varIndex)) {
return TCL_ERROR;
}
- if (Tcl_GetLongFromObj(interp, varPtr[varIndex], &longValue) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(interp, varPtr[varIndex], &wideValue) != TCL_OK) {
return TCL_ERROR;
}
Tcl_AppendToObj(Tcl_GetObjResult(interp),
- ((longValue == LONG_MAX)? "1" : "0"), -1);
+ ((wideValue == WIDE_MAX)? "1" : "0"), -1);
} else if (strcmp(subCmd, "get") == 0) {
if (objc != 3) {
goto wrongNumArgs;
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index c453ae2..7a7ce6c 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -190,7 +190,7 @@ ProcBodyTestInitInternal(
}
}
- return Tcl_PkgProvide(interp, packageName, packageVersion);
+ return Tcl_PkgProvideEx(interp, packageName, packageVersion, NULL);
}
/*
@@ -339,8 +339,8 @@ ProcBodyTestCheckObjCmd(
return TCL_ERROR;
}
- version = Tcl_PkgPresent(interp, packageName, packageVersion, 1);
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
+ version = Tcl_PkgPresentEx(interp, packageName, packageVersion, 1, NULL);
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
strcmp(version, packageVersion) == 0));
return TCL_OK;
}
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index cf275c8..77fdd70 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -308,19 +308,6 @@ TclpAlloc(
register int bucket;
size_t size;
-#ifndef __LP64__
- if (sizeof(int) >= sizeof(size_t)) {
- /* An unsigned int overflow can also be a size_t overflow */
- const size_t zero = 0;
- const size_t max = ~zero;
-
- if (reqSize > max - sizeof(Block) - RCHECK) {
- /* Requested allocation exceeds memory */
- return NULL;
- }
- }
-#endif
-
GETCACHE(cachePtr);
/*
@@ -450,19 +437,6 @@ TclpRealloc(
return TclpAlloc(reqSize);
}
-#ifndef __LP64__
- if (sizeof(int) >= sizeof(size_t)) {
- /* An unsigned int overflow can also be a size_t overflow */
- const size_t zero = 0;
- const size_t max = ~zero;
-
- if ((reqSize) > max - sizeof(Block) - RCHECK) {
- /* Requested allocation exceeds memory */
- return NULL;
- }
- }
-#endif
-
GETCACHE(cachePtr);
/*
diff --git a/generic/tclTomMath.h b/generic/tclTomMath.h
index fbf0d35..3f23fd6 100644
--- a/generic/tclTomMath.h
+++ b/generic/tclTomMath.h
@@ -25,7 +25,7 @@ extern "C" {
#endif
/* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */
-#if defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
+#if defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
# define MP_32BIT
#endif
@@ -110,9 +110,6 @@ typedef unsigned long long mp_word;
/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
#ifndef DIGIT_BIT
# define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
-typedef unsigned long mp_min_u32;
-#else
-typedef mp_digit mp_min_u32;
#endif
#define MP_DIGIT_BIT DIGIT_BIT
@@ -142,14 +139,6 @@ typedef mp_digit mp_min_u32;
typedef int mp_err;
-/* you'll have to tune these... */
-#if defined(BUILD_tcl) || !defined(_WIN32)
-MODULE_SCOPE int KARATSUBA_MUL_CUTOFF,
- KARATSUBA_SQR_CUTOFF,
- TOOM_MUL_CUTOFF,
- TOOM_SQR_CUTOFF;
-#endif
-
/* define this to use lower memory usage routines (exptmods mostly) */
/* #define MP_LOW_MEM */
@@ -229,8 +218,8 @@ int mp_init_size(mp_int *a, int size);
/* ---> Basic Manipulations <--- */
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
-#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO)
-#define mp_isodd(a) ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO)
+#define mp_iseven(a) (!mp_get_bit((a),0))
+#define mp_isodd(a) mp_get_bit((a),0)
#define mp_isneg(a) (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)
/* set to zero */
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h
index 6cabe85..e61fb3a 100644
--- a/generic/tclTomMathDecls.h
+++ b/generic/tclTomMathDecls.h
@@ -46,11 +46,6 @@
/* Rename the global symbols in libtommath to avoid linkage conflicts */
-#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff
-#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff
-#define TOOM_MUL_CUTOFF TclBNToomMulCutoff
-#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff
-
#define bn_reverse TclBN_reverse
#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs
#define fast_s_mp_sqr TclBN_fast_s_mp_sqr
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 7932b50..2bf39ed 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -468,7 +468,7 @@ TraceExecutionObjCmd(
}
}
command = TclGetStringFromObj(objv[5], &commandLength);
- length = (size_t) commandLength;
+ length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = Tcl_Alloc(
TclOffset(TraceCommandInfo, command) + 1 + length);
@@ -522,7 +522,7 @@ TraceExecutionObjCmd(
&& ((tcmdPtr->flags & (TCL_TRACE_ANY_EXEC |
TCL_TRACE_RENAME | TCL_TRACE_DELETE)) == flags)
&& (strncmp(command, tcmdPtr->command,
- (size_t) length) == 0)) {
+ length) == 0)) {
flags |= TCL_TRACE_DELETE;
if (flags & (TCL_TRACE_ENTER_DURING_EXEC |
TCL_TRACE_LEAVE_DURING_EXEC)) {
@@ -705,7 +705,7 @@ TraceCommandObjCmd(
}
command = TclGetStringFromObj(objv[5], &commandLength);
- length = (size_t) commandLength;
+ length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = Tcl_Alloc(
TclOffset(TraceCommandInfo, command) + 1 + length);
@@ -747,7 +747,7 @@ TraceCommandObjCmd(
if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags)
&& (strncmp(command, tcmdPtr->command,
- (size_t) length) == 0)) {
+ length) == 0)) {
Tcl_UntraceCommand(interp, name, flags | TCL_TRACE_DELETE,
TraceCommandProc, clientData);
tcmdPtr->flags |= TCL_TRACE_DESTROYED;
@@ -908,7 +908,7 @@ TraceVariableObjCmd(
}
}
command = TclGetStringFromObj(objv[5], &commandLength);
- length = (size_t) commandLength;
+ length = commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
CombinedTraceVarInfo *ctvarPtr = Tcl_Alloc(
TclOffset(CombinedTraceVarInfo, traceCmdInfo.command)
@@ -950,7 +950,7 @@ TraceVariableObjCmd(
#endif
)==flags)
&& (strncmp(command, tvarPtr->command,
- (size_t) length) == 0)) {
+ length) == 0)) {
Tcl_UntraceVar2(interp, name, NULL,
flags | TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT,
TraceVarProc, clientData);
diff --git a/generic/tclUniData.c b/generic/tclUniData.c
index 1cc84fd..94f5718 100644
--- a/generic/tclUniData.c
+++ b/generic/tclUniData.c
@@ -57,7 +57,7 @@ static const unsigned short pageMap[] = {
704, 7840, 7872, 7904, 1824, 7936, 4928, 4928, 7968, 4928, 4928, 4928,
4928, 4928, 4928, 8000, 8032, 8064, 8096, 3232, 1344, 8128, 4192, 1344,
8160, 8192, 8224, 1344, 1344, 8256, 8288, 4928, 8320, 8352, 8384, 8416,
- 4928, 8384, 8448, 4928, 8352, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
+ 4928, 8384, 8448, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928,
4928, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344,
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 59116c4..8ab77d2 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -67,9 +67,7 @@ static const unsigned char totalBytes[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
- 4,4,4,4,4,4,4,4,
- 1,1,1,1,1,1,1,1
+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1
};
/*
@@ -447,14 +445,14 @@ Tcl_UtfToUniChar(
#else
*chPtr = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
- if ((*chPtr - 0x10000) <= 0xFFFFF) {
+ if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
return 4;
}
#endif
}
/*
- * A four-byte-character lead-byte not followed by two trail-bytes
+ * A four-byte-character lead-byte not followed by three trail-bytes
* represents itself.
*/
}
@@ -622,8 +620,6 @@ Tcl_UtfToUniCharDString(
while (p < end) {
if (Tcl_UtfCharComplete(p, end-p)) {
p += TclUtfToUniChar(p, &ch);
- } else if (((UCHAR(*p)-0x80)) < 0x20) {
- ch = cp1252[UCHAR(*p++)-0x80];
} else {
ch = UCHAR(*p++);
}
@@ -676,8 +672,6 @@ TclUtfToWCharDString(
while (p < end) {
if (Tcl_UtfCharComplete(p, end-p)) {
p += TclUtfToWChar(p, &ch);
- } else if (((UCHAR(*p)-0x80)) < 0x20) {
- ch = cp1252[UCHAR(*p++)-0x80];
} else {
ch = UCHAR(*p++);
}
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 9299a8b..9791e26 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2125,33 +2125,6 @@ Tcl_ConcatObj(
/*
*----------------------------------------------------------------------
*
- * Tcl_StringMatch --
- *
- * See if a particular string matches a particular pattern.
- *
- * Results:
- * The return value is 1 if string matches pattern, and 0 otherwise. The
- * matching operation permits the following special characters in the
- * pattern: *?\[] (see the manual entry for details on what these mean).
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-int
-Tcl_StringMatch(
- const char *str, /* String. */
- const char *pattern) /* Pattern, which may contain special
- * characters. */
-{
- return Tcl_StringCaseMatch(str, pattern, 0);
-}
-
-/*
- *----------------------------------------------------------------------
- *
* Tcl_StringCaseMatch --
*
* See if a particular string matches a particular pattern. Allows case
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 2863096..e7c1f90 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -4772,7 +4772,7 @@ TclZipfs_Init(
Tcl_NewStringObj("::tcl::zipfs::find", -1));
Tcl_CreateObjCommand(interp, "::tcl::zipfs::tcl_library_init",
ZipFSTclLibraryObjCmd, NULL, NULL);
- Tcl_PkgProvide(interp, "zipfs", "2.0");
+ Tcl_PkgProvideEx(interp, "zipfs", "2.0", NULL);
}
return TCL_OK;
#else /* !HAVE_ZLIB */
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 94cf9e8..30a35d5 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -423,6 +423,7 @@ GenerateHeader(
Tcl_Obj *value;
int len, result = TCL_ERROR;
size_t length;
+ Tcl_WideInt wideValue;
const char *valueStr;
Tcl_Encoding latin1enc;
static const char *const types[] = {
@@ -486,10 +487,11 @@ GenerateHeader(
if (GetValue(interp, dictObj, "time", &value) != TCL_OK) {
goto error;
- } else if (value != NULL && Tcl_GetLongFromObj(interp, value,
- (long *) &headerPtr->header.time) != TCL_OK) {
+ } else if (value != NULL && Tcl_GetWideIntFromObj(interp, value,
+ &wideValue) != TCL_OK) {
goto error;
}
+ headerPtr->header.time = wideValue;
if (GetValue(interp, dictObj, "type", &value) != TCL_OK) {
goto error;
@@ -1517,7 +1519,7 @@ Tcl_ZlibStreamGet(
Tcl_ListObjIndex(NULL, zshPtr->outData, 0, &itemObj);
itemPtr = TclGetByteArrayFromObj(itemObj, &itemLen);
- if (itemLen-zshPtr->outPos >= (size_t)(count-dataPos)) {
+ if (itemLen-zshPtr->outPos + dataPos >= count) {
size_t len = count - dataPos;
memcpy(dataPtr + dataPos, itemPtr + zshPtr->outPos, len);
@@ -3930,7 +3932,7 @@ TclZlibInit(
* Formally provide the package as a Tcl built-in.
*/
- return Tcl_PkgProvide(interp, "zlib", TCL_ZLIB_VERSION);
+ return Tcl_PkgProvideEx(interp, "zlib", TCL_ZLIB_VERSION, NULL);
}
/*
diff --git a/library/tzdata/America/Metlakatla b/library/tzdata/America/Metlakatla
index 3636725..a0385d0 100644
--- a/library/tzdata/America/Metlakatla
+++ b/library/tzdata/America/Metlakatla
@@ -47,7 +47,8 @@ set TZData(:America/Metlakatla) {
{1509876000 -32400 0 AKST}
{1520766000 -28800 1 AKDT}
{1541329200 -28800 0 PST}
- {1552215600 -28800 0 AKDT}
+ {1547978400 -32400 0 AKST}
+ {1552215600 -28800 1 AKDT}
{1572775200 -32400 0 AKST}
{1583665200 -28800 1 AKDT}
{1604224800 -32400 0 AKST}
diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza
index 85b9f67..6d0f144 100644
--- a/library/tzdata/Asia/Gaza
+++ b/library/tzdata/Asia/Gaza
@@ -40,6 +40,10 @@ set TZData(:Asia/Gaza) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
+ {334015200 10800 1 IDT}
+ {337644000 7200 0 IST}
+ {452556000 10800 1 IDT}
+ {462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}
@@ -113,7 +117,7 @@ set TZData(:Asia/Gaza) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
- {1553295600 10800 1 EEST}
+ {1553900400 10800 1 EEST}
{1572040800 7200 0 EET}
{1585350000 10800 1 EEST}
{1604095200 7200 0 EET}
@@ -123,9 +127,9 @@ set TZData(:Asia/Gaza) {
{1666994400 7200 0 EET}
{1679698800 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711148400 10800 1 EEST}
+ {1711753200 10800 1 EEST}
{1729893600 7200 0 EET}
- {1742598000 10800 1 EEST}
+ {1743202800 10800 1 EEST}
{1761343200 7200 0 EET}
{1774652400 10800 1 EEST}
{1793397600 7200 0 EET}
@@ -135,9 +139,9 @@ set TZData(:Asia/Gaza) {
{1856296800 7200 0 EET}
{1869001200 10800 1 EEST}
{1887746400 7200 0 EET}
- {1900450800 10800 1 EEST}
+ {1901055600 10800 1 EEST}
{1919196000 7200 0 EET}
- {1931900400 10800 1 EEST}
+ {1932505200 10800 1 EEST}
{1950645600 7200 0 EET}
{1963954800 10800 1 EEST}
{1982700000 7200 0 EET}
@@ -147,7 +151,7 @@ set TZData(:Asia/Gaza) {
{2045599200 7200 0 EET}
{2058303600 10800 1 EEST}
{2077048800 7200 0 EET}
- {2089753200 10800 1 EEST}
+ {2090358000 10800 1 EEST}
{2108498400 7200 0 EET}
{2121807600 10800 1 EEST}
{2140552800 7200 0 EET}
@@ -157,9 +161,9 @@ set TZData(:Asia/Gaza) {
{2203452000 7200 0 EET}
{2216156400 10800 1 EEST}
{2234901600 7200 0 EET}
- {2247606000 10800 1 EEST}
+ {2248210800 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279055600 10800 1 EEST}
+ {2279660400 10800 1 EEST}
{2297800800 7200 0 EET}
{2311110000 10800 1 EEST}
{2329855200 7200 0 EET}
@@ -169,7 +173,7 @@ set TZData(:Asia/Gaza) {
{2392754400 7200 0 EET}
{2405458800 10800 1 EEST}
{2424204000 7200 0 EET}
- {2436908400 10800 1 EEST}
+ {2437513200 10800 1 EEST}
{2455653600 7200 0 EET}
{2468962800 10800 1 EEST}
{2487708000 7200 0 EET}
@@ -179,9 +183,9 @@ set TZData(:Asia/Gaza) {
{2550607200 7200 0 EET}
{2563311600 10800 1 EEST}
{2582056800 7200 0 EET}
- {2594761200 10800 1 EEST}
+ {2595366000 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626210800 10800 1 EEST}
+ {2626815600 10800 1 EEST}
{2644956000 7200 0 EET}
{2658265200 10800 1 EEST}
{2677010400 7200 0 EET}
@@ -191,9 +195,9 @@ set TZData(:Asia/Gaza) {
{2739909600 7200 0 EET}
{2752614000 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784063600 10800 1 EEST}
+ {2784668400 10800 1 EEST}
{2802808800 7200 0 EET}
- {2815513200 10800 1 EEST}
+ {2816118000 10800 1 EEST}
{2834258400 7200 0 EET}
{2847567600 10800 1 EEST}
{2866312800 7200 0 EET}
@@ -203,7 +207,7 @@ set TZData(:Asia/Gaza) {
{2929212000 7200 0 EET}
{2941916400 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973366000 10800 1 EEST}
+ {2973970800 10800 1 EEST}
{2992111200 7200 0 EET}
{3005420400 10800 1 EEST}
{3024165600 7200 0 EET}
@@ -213,9 +217,9 @@ set TZData(:Asia/Gaza) {
{3087064800 7200 0 EET}
{3099769200 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131218800 10800 1 EEST}
+ {3131823600 10800 1 EEST}
{3149964000 7200 0 EET}
- {3162668400 10800 1 EEST}
+ {3163273200 10800 1 EEST}
{3181413600 7200 0 EET}
{3194722800 10800 1 EEST}
{3213468000 7200 0 EET}
@@ -225,7 +229,7 @@ set TZData(:Asia/Gaza) {
{3276367200 7200 0 EET}
{3289071600 10800 1 EEST}
{3307816800 7200 0 EET}
- {3320521200 10800 1 EEST}
+ {3321126000 10800 1 EEST}
{3339266400 7200 0 EET}
{3352575600 10800 1 EEST}
{3371320800 7200 0 EET}
@@ -235,9 +239,9 @@ set TZData(:Asia/Gaza) {
{3434220000 7200 0 EET}
{3446924400 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478374000 10800 1 EEST}
+ {3478978800 10800 1 EEST}
{3497119200 7200 0 EET}
- {3509823600 10800 1 EEST}
+ {3510428400 10800 1 EEST}
{3528568800 7200 0 EET}
{3541878000 10800 1 EEST}
{3560623200 7200 0 EET}
@@ -247,9 +251,9 @@ set TZData(:Asia/Gaza) {
{3623522400 7200 0 EET}
{3636226800 10800 1 EEST}
{3654972000 7200 0 EET}
- {3667676400 10800 1 EEST}
+ {3668281200 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699126000 10800 1 EEST}
+ {3699730800 10800 1 EEST}
{3717871200 7200 0 EET}
{3731180400 10800 1 EEST}
{3749925600 7200 0 EET}
@@ -259,7 +263,7 @@ set TZData(:Asia/Gaza) {
{3812824800 7200 0 EET}
{3825529200 10800 1 EEST}
{3844274400 7200 0 EET}
- {3856978800 10800 1 EEST}
+ {3857583600 10800 1 EEST}
{3875724000 7200 0 EET}
{3889033200 10800 1 EEST}
{3907778400 7200 0 EET}
@@ -269,9 +273,9 @@ set TZData(:Asia/Gaza) {
{3970677600 7200 0 EET}
{3983382000 10800 1 EEST}
{4002127200 7200 0 EET}
- {4014831600 10800 1 EEST}
+ {4015436400 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046281200 10800 1 EEST}
+ {4046886000 10800 1 EEST}
{4065026400 7200 0 EET}
{4078335600 10800 1 EEST}
{4097080800 7200 0 EET}
diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron
index c0f5447..9249910 100644
--- a/library/tzdata/Asia/Hebron
+++ b/library/tzdata/Asia/Hebron
@@ -40,6 +40,10 @@ set TZData(:Asia/Hebron) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
+ {334015200 10800 1 IDT}
+ {337644000 7200 0 IST}
+ {452556000 10800 1 IDT}
+ {462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}
@@ -112,7 +116,7 @@ set TZData(:Asia/Hebron) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
- {1553295600 10800 1 EEST}
+ {1553900400 10800 1 EEST}
{1572040800 7200 0 EET}
{1585350000 10800 1 EEST}
{1604095200 7200 0 EET}
@@ -122,9 +126,9 @@ set TZData(:Asia/Hebron) {
{1666994400 7200 0 EET}
{1679698800 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711148400 10800 1 EEST}
+ {1711753200 10800 1 EEST}
{1729893600 7200 0 EET}
- {1742598000 10800 1 EEST}
+ {1743202800 10800 1 EEST}
{1761343200 7200 0 EET}
{1774652400 10800 1 EEST}
{1793397600 7200 0 EET}
@@ -134,9 +138,9 @@ set TZData(:Asia/Hebron) {
{1856296800 7200 0 EET}
{1869001200 10800 1 EEST}
{1887746400 7200 0 EET}
- {1900450800 10800 1 EEST}
+ {1901055600 10800 1 EEST}
{1919196000 7200 0 EET}
- {1931900400 10800 1 EEST}
+ {1932505200 10800 1 EEST}
{1950645600 7200 0 EET}
{1963954800 10800 1 EEST}
{1982700000 7200 0 EET}
@@ -146,7 +150,7 @@ set TZData(:Asia/Hebron) {
{2045599200 7200 0 EET}
{2058303600 10800 1 EEST}
{2077048800 7200 0 EET}
- {2089753200 10800 1 EEST}
+ {2090358000 10800 1 EEST}
{2108498400 7200 0 EET}
{2121807600 10800 1 EEST}
{2140552800 7200 0 EET}
@@ -156,9 +160,9 @@ set TZData(:Asia/Hebron) {
{2203452000 7200 0 EET}
{2216156400 10800 1 EEST}
{2234901600 7200 0 EET}
- {2247606000 10800 1 EEST}
+ {2248210800 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279055600 10800 1 EEST}
+ {2279660400 10800 1 EEST}
{2297800800 7200 0 EET}
{2311110000 10800 1 EEST}
{2329855200 7200 0 EET}
@@ -168,7 +172,7 @@ set TZData(:Asia/Hebron) {
{2392754400 7200 0 EET}
{2405458800 10800 1 EEST}
{2424204000 7200 0 EET}
- {2436908400 10800 1 EEST}
+ {2437513200 10800 1 EEST}
{2455653600 7200 0 EET}
{2468962800 10800 1 EEST}
{2487708000 7200 0 EET}
@@ -178,9 +182,9 @@ set TZData(:Asia/Hebron) {
{2550607200 7200 0 EET}
{2563311600 10800 1 EEST}
{2582056800 7200 0 EET}
- {2594761200 10800 1 EEST}
+ {2595366000 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626210800 10800 1 EEST}
+ {2626815600 10800 1 EEST}
{2644956000 7200 0 EET}
{2658265200 10800 1 EEST}
{2677010400 7200 0 EET}
@@ -190,9 +194,9 @@ set TZData(:Asia/Hebron) {
{2739909600 7200 0 EET}
{2752614000 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784063600 10800 1 EEST}
+ {2784668400 10800 1 EEST}
{2802808800 7200 0 EET}
- {2815513200 10800 1 EEST}
+ {2816118000 10800 1 EEST}
{2834258400 7200 0 EET}
{2847567600 10800 1 EEST}
{2866312800 7200 0 EET}
@@ -202,7 +206,7 @@ set TZData(:Asia/Hebron) {
{2929212000 7200 0 EET}
{2941916400 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973366000 10800 1 EEST}
+ {2973970800 10800 1 EEST}
{2992111200 7200 0 EET}
{3005420400 10800 1 EEST}
{3024165600 7200 0 EET}
@@ -212,9 +216,9 @@ set TZData(:Asia/Hebron) {
{3087064800 7200 0 EET}
{3099769200 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131218800 10800 1 EEST}
+ {3131823600 10800 1 EEST}
{3149964000 7200 0 EET}
- {3162668400 10800 1 EEST}
+ {3163273200 10800 1 EEST}
{3181413600 7200 0 EET}
{3194722800 10800 1 EEST}
{3213468000 7200 0 EET}
@@ -224,7 +228,7 @@ set TZData(:Asia/Hebron) {
{3276367200 7200 0 EET}
{3289071600 10800 1 EEST}
{3307816800 7200 0 EET}
- {3320521200 10800 1 EEST}
+ {3321126000 10800 1 EEST}
{3339266400 7200 0 EET}
{3352575600 10800 1 EEST}
{3371320800 7200 0 EET}
@@ -234,9 +238,9 @@ set TZData(:Asia/Hebron) {
{3434220000 7200 0 EET}
{3446924400 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478374000 10800 1 EEST}
+ {3478978800 10800 1 EEST}
{3497119200 7200 0 EET}
- {3509823600 10800 1 EEST}
+ {3510428400 10800 1 EEST}
{3528568800 7200 0 EET}
{3541878000 10800 1 EEST}
{3560623200 7200 0 EET}
@@ -246,9 +250,9 @@ set TZData(:Asia/Hebron) {
{3623522400 7200 0 EET}
{3636226800 10800 1 EEST}
{3654972000 7200 0 EET}
- {3667676400 10800 1 EEST}
+ {3668281200 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699126000 10800 1 EEST}
+ {3699730800 10800 1 EEST}
{3717871200 7200 0 EET}
{3731180400 10800 1 EEST}
{3749925600 7200 0 EET}
@@ -258,7 +262,7 @@ set TZData(:Asia/Hebron) {
{3812824800 7200 0 EET}
{3825529200 10800 1 EEST}
{3844274400 7200 0 EET}
- {3856978800 10800 1 EEST}
+ {3857583600 10800 1 EEST}
{3875724000 7200 0 EET}
{3889033200 10800 1 EEST}
{3907778400 7200 0 EET}
@@ -268,9 +272,9 @@ set TZData(:Asia/Hebron) {
{3970677600 7200 0 EET}
{3983382000 10800 1 EEST}
{4002127200 7200 0 EET}
- {4014831600 10800 1 EEST}
+ {4015436400 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046281200 10800 1 EEST}
+ {4046886000 10800 1 EEST}
{4065026400 7200 0 EET}
{4078335600 10800 1 EEST}
{4097080800 7200 0 EET}
diff --git a/library/tzdata/Asia/Jerusalem b/library/tzdata/Asia/Jerusalem
index 2714963..e1e84f4 100644
--- a/library/tzdata/Asia/Jerusalem
+++ b/library/tzdata/Asia/Jerusalem
@@ -39,6 +39,10 @@ set TZData(:Asia/Jerusalem) {
{150843600 7200 0 IST}
{167176800 10800 1 IDT}
{178664400 7200 0 IST}
+ {334015200 10800 1 IDT}
+ {337644000 7200 0 IST}
+ {452556000 10800 1 IDT}
+ {462232800 7200 0 IST}
{482277600 10800 1 IDT}
{495579600 7200 0 IST}
{516751200 10800 1 IDT}
diff --git a/library/tzdata/Etc/UCT b/library/tzdata/Etc/UCT
index f7d795e..c843cdc 100644
--- a/library/tzdata/Etc/UCT
+++ b/library/tzdata/Etc/UCT
@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
-
-set TZData(:Etc/UCT) {
- {-9223372036854775808 0 0 UCT}
+if {![info exists TZData(Etc/UTC)]} {
+ LoadTimeZoneFile Etc/UTC
}
+set TZData(:Etc/UCT) $TZData(:Etc/UTC)
diff --git a/library/tzdata/UCT b/library/tzdata/UCT
index 8449328..acfa48e 100644
--- a/library/tzdata/UCT
+++ b/library/tzdata/UCT
@@ -1,5 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
-if {![info exists TZData(Etc/UCT)]} {
- LoadTimeZoneFile Etc/UCT
+if {![info exists TZData(Etc/UTC)]} {
+ LoadTimeZoneFile Etc/UTC
}
-set TZData(:UCT) $TZData(:Etc/UCT)
+set TZData(:UCT) $TZData(:Etc/UTC)
diff --git a/libtommath/bn_mp_get_bit.c b/libtommath/bn_mp_get_bit.c
index ab732c4..f5d2450 100644
--- a/libtommath/bn_mp_get_bit.c
+++ b/libtommath/bn_mp_get_bit.c
@@ -27,18 +27,8 @@ int mp_get_bit(const mp_int *a, int b)
limb = b / DIGIT_BIT;
- /*
- * Zero is a special value with the member "used" set to zero.
- * Needs to be tested before the check for the upper boundary
- * otherwise (limb >= a->used) would be true for a = 0
- */
-
- if (mp_iszero(a) != MP_NO) {
- return MP_NO;
- }
-
if (limb >= a->used) {
- return MP_VAL;
+ return MP_NO;
}
bit = (mp_digit)(1) << (b % DIGIT_BIT);
diff --git a/libtommath/bn_mp_get_int.c b/libtommath/bn_mp_get_int.c
index 13eddbf..d9c7a11 100644
--- a/libtommath/bn_mp_get_int.c
+++ b/libtommath/bn_mp_get_int.c
@@ -15,25 +15,8 @@
/* get the lower 32-bits of an mp_int */
unsigned long mp_get_int(const mp_int *a)
{
- int i;
- mp_min_u32 res;
-
- if (a->used == 0) {
- return 0;
- }
-
- /* get number of digits of the lsb we have to read */
- i = MIN(a->used, ((((int)sizeof(unsigned long) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1;
-
- /* get most significant digit of result */
- res = DIGIT(a, i);
-
- while (--i >= 0) {
- res = (res << DIGIT_BIT) | DIGIT(a, i);
- }
-
/* force result to 32-bits always so it is consistent on non 32-bit platforms */
- return res & 0xFFFFFFFFUL;
+ return mp_get_long(a) & 0xFFFFFFFFUL;
}
#endif
diff --git a/libtommath/tommath.h b/libtommath/tommath.h
index ce38975..b5faf8c 100644
--- a/libtommath/tommath.h
+++ b/libtommath/tommath.h
@@ -23,7 +23,7 @@ extern "C" {
#endif
/* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */
-#if defined(_MSC_VER) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
+#if defined(_WIN32) || defined(__LLP64__) || defined(__e2k__) || defined(__LCC__)
# define MP_32BIT
#endif
@@ -91,17 +91,7 @@ typedef unsigned long long mp_word;
# endif
#endif
-/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
-#ifndef DIGIT_BIT
-# define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
-typedef unsigned long mp_min_u32;
-#else
-typedef mp_digit mp_min_u32;
-#endif
-
-#define MP_DIGIT_BIT DIGIT_BIT
#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
-#define MP_DIGIT_MAX MP_MASK
/* equalities */
#define MP_LT -1 /* less than */
@@ -127,12 +117,6 @@ typedef mp_digit mp_min_u32;
typedef int mp_err;
-/* you'll have to tune these... */
-extern int KARATSUBA_MUL_CUTOFF,
- KARATSUBA_SQR_CUTOFF,
- TOOM_MUL_CUTOFF,
- TOOM_SQR_CUTOFF;
-
/* define this to use lower memory usage routines (exptmods mostly) */
/* #define MP_LOW_MEM */
@@ -145,9 +129,6 @@ extern int KARATSUBA_MUL_CUTOFF,
# endif
#endif
-/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
-#define MP_WARRAY (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1))
-
/* the infamous mp_int structure */
typedef struct {
int used, alloc, sign;
@@ -158,10 +139,6 @@ typedef struct {
typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
-#define USED(m) ((m)->used)
-#define DIGIT(m, k) ((m)->dp[(k)])
-#define SIGN(m) ((m)->sign)
-
/* error code to char* string */
const char *mp_error_to_string(int code);
@@ -192,8 +169,8 @@ int mp_init_size(mp_int *a, int size);
/* ---> Basic Manipulations <--- */
#define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO)
-#define mp_iseven(a) ((((a)->used == 0) || (((a)->dp[0] & 1u) == 0u)) ? MP_YES : MP_NO)
-#define mp_isodd(a) ((((a)->used > 0) && (((a)->dp[0] & 1u) == 1u)) ? MP_YES : MP_NO)
+#define mp_iseven(a) (!mp_get_bit((a),0))
+#define mp_isodd(a) mp_get_bit((a),0)
#define mp_isneg(a) (((a)->sign != MP_ZPOS) ? MP_YES : MP_NO)
/* set to zero */
diff --git a/libtommath/tommath_private.h b/libtommath/tommath_private.h
index 8fc3442..2096f77 100644
--- a/libtommath/tommath_private.h
+++ b/libtommath/tommath_private.h
@@ -42,15 +42,22 @@ extern "C" {
# define XMALLOC malloc
# define XFREE free
# define XREALLOC realloc
-# define XCALLOC calloc
#elif 0
/* prototypes for our heap functions */
extern void *XMALLOC(size_t n);
extern void *XREALLOC(void *p, size_t n);
-extern void *XCALLOC(size_t n, size_t s);
extern void XFREE(void *p);
#endif
+/* you'll have to tune these... */
+#define KARATSUBA_MUL_CUTOFF 80 /* Min. number of digits before Karatsuba multiplication is used. */
+#define KARATSUBA_SQR_CUTOFF 120 /* Min. number of digits before Karatsuba squaring is used. */
+#define TOOM_MUL_CUTOFF 350 /* no optimal values of these are known yet so set em high */
+#define TOOM_SQR_CUTOFF 400
+
+/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */
+#define MP_WARRAY (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1))
+
/* lowlevel functions, do not call! */
int s_mp_add(const mp_int *a, const mp_int *b, mp_int *c);
int s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c);
diff --git a/macosx/Tcl.xcode/project.pbxproj b/macosx/Tcl.xcode/project.pbxproj
index d06a1a8..dac7f32 100644
--- a/macosx/Tcl.xcode/project.pbxproj
+++ b/macosx/Tcl.xcode/project.pbxproj
@@ -145,7 +145,6 @@
F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; };
F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; };
F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; };
- F96D495508F272C3004A47F5 /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; };
F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; };
F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; };
F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; };
@@ -620,7 +619,6 @@
F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = "<group>"; };
F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = "<group>"; };
F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = "<group>"; };
- F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = "<group>"; };
F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = "<group>"; };
F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = "<group>"; };
F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; };
@@ -1472,7 +1470,6 @@
F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */,
F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */,
F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */,
- F96D42D708F272B3004A47F5 /* bncore.c */,
F96D432908F272B4004A47F5 /* tommath_class.h */,
F96D432A08F272B4004A47F5 /* tommath_superclass.h */,
);
@@ -2104,7 +2101,6 @@
F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */,
F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */,
F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */,
- F96D495508F272C3004A47F5 /* bncore.c in Sources */,
F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */,
F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */,
F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */,
diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj
index 928d231..fb120b0 100644
--- a/macosx/Tcl.xcodeproj/project.pbxproj
+++ b/macosx/Tcl.xcodeproj/project.pbxproj
@@ -145,7 +145,6 @@
F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */; };
F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */; };
F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */; };
- F96D495508F272C3004A47F5 /* bncore.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42D708F272B3004A47F5 /* bncore.c */; };
F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433908F272B5004A47F5 /* tclMacOSXBundle.c */; };
F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433D08F272B5004A47F5 /* tclMacOSXFCmd.c */; };
F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D433E08F272B5004A47F5 /* tclMacOSXNotify.c */; };
@@ -621,7 +620,6 @@
F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_mul_digs.c; sourceTree = "<group>"; };
F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sqr.c; sourceTree = "<group>"; };
F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bn_s_mp_sub.c; sourceTree = "<group>"; };
- F96D42D708F272B3004A47F5 /* bncore.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = bncore.c; sourceTree = "<group>"; };
F96D432908F272B4004A47F5 /* tommath_class.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_class.h; sourceTree = "<group>"; };
F96D432A08F272B4004A47F5 /* tommath_superclass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tommath_superclass.h; sourceTree = "<group>"; };
F96D432B08F272B4004A47F5 /* license.terms */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 4; path = license.terms; sourceTree = "<group>"; };
@@ -1473,7 +1471,6 @@
F96D42D308F272B3004A47F5 /* bn_s_mp_mul_digs.c */,
F96D42D508F272B3004A47F5 /* bn_s_mp_sqr.c */,
F96D42D608F272B3004A47F5 /* bn_s_mp_sub.c */,
- F96D42D708F272B3004A47F5 /* bncore.c */,
F96D432908F272B4004A47F5 /* tommath_class.h */,
F96D432A08F272B4004A47F5 /* tommath_superclass.h */,
);
@@ -2105,7 +2102,6 @@
F96D495108F272C3004A47F5 /* bn_s_mp_mul_digs.c in Sources */,
F96D495308F272C3004A47F5 /* bn_s_mp_sqr.c in Sources */,
F96D495408F272C3004A47F5 /* bn_s_mp_sub.c in Sources */,
- F96D495508F272C3004A47F5 /* bncore.c in Sources */,
F96D49A908F272C4004A47F5 /* tclMacOSXBundle.c in Sources */,
F96D49AD08F272C4004A47F5 /* tclMacOSXFCmd.c in Sources */,
F96D49AE08F272C4004A47F5 /* tclMacOSXNotify.c in Sources */,
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index a48d2a6..0f40817 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -192,7 +192,7 @@ TclMacOSXGetFileAttribute(
OSSwapBigToHostInt32(finder->type));
break;
case MACOSX_HIDDEN_ATTRIBUTE:
- *attributePtrPtr = Tcl_NewBooleanObj(
+ *attributePtrPtr = Tcl_NewWideIntObj(
(finder->fdFlags & kFinfoIsInvisible) != 0);
break;
case MACOSX_RSRCLENGTH_ATTRIBUTE:
@@ -580,7 +580,7 @@ GetOSTypeFromObj(
if (!TclHasIntRep(objPtr, &tclOSTypeType)) {
result = SetOSTypeFromAny(interp, objPtr);
}
- *osTypePtr = (OSType) objPtr->internalRep.longValue;
+ *osTypePtr = (OSType) objPtr->internalRep.wideValue;
return result;
}
@@ -609,7 +609,7 @@ NewOSTypeObj(
TclNewObj(objPtr);
TclInvalidateStringRep(objPtr);
- objPtr->internalRep.longValue = (long) osType;
+ objPtr->internalRep.wideValue = (Tcl_WideInt) osType;
objPtr->typePtr = &tclOSTypeType;
return objPtr;
}
@@ -661,7 +661,7 @@ SetOSTypeFromAny(
(OSType) bytes[2] << 8 |
(OSType) bytes[3];
TclFreeIntRep(objPtr);
- objPtr->internalRep.longValue = (long) osType;
+ objPtr->internalRep.wideValue = (Tcl_WideInt) osType;
objPtr->typePtr = &tclOSTypeType;
}
Tcl_DStringFree(&ds);
@@ -695,7 +695,7 @@ UpdateStringOfOSType(
{
const int size = TCL_UTF_MAX * 4;
char *dst = Tcl_InitStringRep(objPtr, NULL, size);
- OSType osType = (OSType) objPtr->internalRep.longValue;
+ OSType osType = (OSType) objPtr->internalRep.wideValue;
int written = 0;
Tcl_Encoding encoding;
char src[5];
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index d574c2c..f80746f 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -2,18 +2,18 @@
# ------------------------------------------------------------------------
#
# test-performance.tcl --
-#
+#
# This file provides common performance tests for comparison of tcl-speed
# degradation by switching between branches.
# (currently for clock ensemble only)
#
# ------------------------------------------------------------------------
-#
+#
# Copyright (c) 2014 Serg G. Brester (aka sebres)
-#
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
-#
+#
array set in {-time 500}
if {[info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]]} {
@@ -215,7 +215,7 @@ proc test-freescan {{reptime 1000}} {
{clock scan "next January" -base 0 -gmt 1}
# FreeScan : relative week
{clock scan "next Fri" -base 0 -gmt 1}
- # FreeScan : relative weekday and week offset
+ # FreeScan : relative weekday and week offset
{clock scan "next January + 2 week" -base 0 -gmt 1}
# FreeScan : time only with base
{clock scan "19:18:30" -base 148863600 -gmt 1}
@@ -300,7 +300,7 @@ proc test-convert {{reptime 1000}} {
{clock format [clock scan "19:18:30 EST" -base 148863600] -format "%H:%M:%S %z" -timezone EST}
# Format locale 1x: comparison values
- {clock format 0 -gmt 1 -locale en}
+ {clock format 0 -gmt 1 -locale en}
{clock format 0 -gmt 1 -locale de}
{clock format 0 -gmt 1 -locale fr}
# Format locale 2x: without switching locale (en, en)
@@ -340,7 +340,7 @@ proc test-convert {{reptime 1000}} {
{clock scan "19:18:30 MST" -base 148863600; clock scan "19:18:30 EST" -base 148863600}
# FreeScan TZ 2x (+1 gmt, +1 system-default)
{clock scan "19:18:30 MST" -base 148863600 -gmt 1; clock scan "19:18:30 EST" -base 148863600}
-
+
# Scan TZ: comparison included in scan string vs. given
{clock scan "2009-06-30T18:30:00 CEST" -format "%Y-%m-%dT%H:%M:%S %z"}
{clock scan "2009-06-30T18:30:00 CET" -format "%Y-%m-%dT%H:%M:%S %z"}
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index 4629cd4..1ddecb5 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -1,19 +1,19 @@
# ------------------------------------------------------------------------
#
# test-performance.tcl --
-#
+#
# This file provides common performance tests for comparison of tcl-speed
# degradation or regression by switching between branches.
#
# To execute test case evaluate direct corresponding file "tests-perf\*.perf.tcl".
#
# ------------------------------------------------------------------------
-#
+#
# Copyright (c) 2014 Serg G. Brester (aka sebres)
-#
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
-#
+#
namespace eval ::tclTestPerf {
# warm-up interpeter compiler env, calibrate timerate measurement functionality:
@@ -33,7 +33,7 @@ if {[lindex [timerate {} 10] 6] >= (10-1)} {
}
proc {**STOP**} {args} {
- return -code error -level 4 "**STOP** in [info level [expr {[info level]-2}]] [join $args { }]"
+ return -code error -level 4 "**STOP** in [info level [expr {[info level]-2}]] [join $args { }]"
}
proc _test_get_commands {lst} {
diff --git a/tests-perf/timer-event.perf.tcl b/tests-perf/timer-event.perf.tcl
index c5a7d45..f68a56a 100644
--- a/tests-perf/timer-event.perf.tcl
+++ b/tests-perf/timer-event.perf.tcl
@@ -3,17 +3,17 @@
# ------------------------------------------------------------------------
#
# timer-event.perf.tcl --
-#
+#
# This file provides performance tests for comparison of tcl-speed
# of timer events (event-driven tcl-handling).
#
# ------------------------------------------------------------------------
-#
+#
# Copyright (c) 2014 Serg G. Brester (aka sebres)
-#
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
-#
+#
if {![namespace exists ::tclTestPerf]} {
@@ -40,7 +40,7 @@ proc test-queue {{reptime {1000 10000}}} {
{after idle {set foo bar}}
# update / after idle:
{update; if {![llength [after info]]} break}
-
+
# generate up to $howmuch idle-events:
{after idle {set foo bar}}
# update idletasks / after idle:
@@ -50,7 +50,7 @@ proc test-queue {{reptime {1000 10000}}} {
{after 0 {set foo bar}}
# update / after 0:
{update; if {![llength [after info]]} break}
-
+
# generate up to $howmuch 1-ms events:
{after 1 {set foo bar}}
setup {after 1}
@@ -83,7 +83,7 @@ proc test-queue {{reptime {1000 10000}}} {
setup {set le $i; incr i; list $le .. 1; # cancel up to $howmuch events}
{after cancel $ev([incr i -1]); if {$i <= 1} break}
cleanup {update; unset -nocomplain ev}
-
+
# end $howmuch events.
cleanup {if [llength [after info]] {error "unexpected: [llength [after info]] events are still there."}}
}]
@@ -149,7 +149,7 @@ proc test-long {{reptime 1000}} {
{time {after idle {after 30}} 10; after 1 {set important 1}; vwait important;}
cleanup {foreach i [after info] {after cancel $i}}
# in-between important event (of new generation) by amount of idle events:
- {time {after idle {after 30}} 10; after 1 {after 0 {set important 1}}; vwait important;}
+ {time {after idle {after 30}} 10; after 1 {after 0 {set important 1}}; vwait important;}
cleanup {foreach i [after info] {after cancel $i}}
}
}
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 45231c8..d79e9f6 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -360,8 +360,11 @@ test cmdMZ-6.3 {Tcl_TimeRateObjCmd: basic format of command} {
test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative iteration counts} {
list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg
} {1 {missing close-brace}}
-test cmdMZ-6.5 {Tcl_TimeRateObjCmd: result format and one iteration} {
- regexp {^\d+.\d+ \ws/# 1 # \d+ #/sec \d+.\d+ nett-ms$} [timerate {} 0]
+test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} {
+ regexp {^\d+(?:\.\d+)? \ws/# 1 # \d+(?:\.\d+)? #/sec \d+(?:\.\d+)? nett-ms$} [timerate {} 0]
+} 1
+test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} {
+ regexp {^0 \ws/# 0 # 0 #/sec 0 nett-ms$} [timerate {} 0 0]
} 1
test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
set m1 [timerate {after 0} 20]
diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test
index b466eff..634bb41 100644
--- a/tests/compExpr-old.test
+++ b/tests/compExpr-old.test
@@ -588,6 +588,7 @@ test compExpr-old-15.5 {CompileMathFuncCall: too few arguments} -body {
test compExpr-old-15.6 {CompileMathFuncCall: missing ')'} -body {
expr sin(1
} -returnCodes error -match glob -result *
+
test compExpr-old-16.1 {GetToken: checks whether integer token starting with "0x" (e.g., "0x$") is invalid} {
catch {unset a}
set a(VALUE) ff15
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 9f9ad99..0fc13ab 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -941,6 +941,7 @@ test expr-old-34.15 {errors in math functions} {
test expr-old-34.16 {errors in math functions} {
expr round(-1.0e30)
} -1000000000000000019884624838656
+
test expr-old-36.1 {ExprLooksLikeInt procedure} -body {
expr 0o289
} -returnCodes error -match glob -result {*invalid octal number*}
diff --git a/tests/expr.test b/tests/expr.test
index cc892f3..3c3f29a 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -16,7 +16,6 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
# Determine if "long int" type is a 32 bit number and if the wide
# type is a 64 bit number on this machine.
@@ -1107,7 +1106,7 @@ test expr-23.54.11 {INST_EXPON: Bug 2798543} {
expr {3**9 == 3**131081}
} 0
test expr-23.54.12 {INST_EXPON: Bug 2798543} -body {
- expr {3**9 == 3**268435465}
+ expr {3**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.54.13 {INST_EXPON: Bug 2798543} {
expr {(-3)**9 == (-3)**65545}
@@ -1122,7 +1121,7 @@ test expr-23.55.2 {INST_EXPON: Bug 2798543} {
expr {4**9 == 4**131081}
} 0
test expr-23.55.3 {INST_EXPON: Bug 2798543} -body {
- expr {4**9 == 4**268435465}
+ expr {4**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.55.4 {INST_EXPON: Bug 2798543} {
expr {(-4)**9 == (-4)**65545}
@@ -1137,7 +1136,7 @@ test expr-23.56.2 {INST_EXPON: Bug 2798543} {
expr {5**9 == 5**131081}
} 0
test expr-23.56.3 {INST_EXPON: Bug 2798543} -body {
- expr {5**9 == 5**268435465}
+ expr {5**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.56.4 {INST_EXPON: Bug 2798543} {
expr {(-5)**9 == (-5)**65545}
@@ -1152,7 +1151,7 @@ test expr-23.57.2 {INST_EXPON: Bug 2798543} {
expr {6**9 == 6**131081}
} 0
test expr-23.57.3 {INST_EXPON: Bug 2798543} -body {
- expr {6**9 == 6**268435465}
+ expr {6**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.57.4 {INST_EXPON: Bug 2798543} {
expr {(-6)**9 == (-6)**65545}
@@ -1167,7 +1166,7 @@ test expr-23.58.2 {INST_EXPON: Bug 2798543} {
expr {7**9 == 7**131081}
} 0
test expr-23.58.3 {INST_EXPON: Bug 2798543} -body {
- expr {7**9 == 7**268435465}
+ expr {7**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.58.4 {INST_EXPON: Bug 2798543} {
expr {(-7)**9 == (-7)**65545}
@@ -1182,7 +1181,7 @@ test expr-23.59.2 {INST_EXPON: Bug 2798543} {
expr {8**9 == 8**131081}
} 0
test expr-23.59.3 {INST_EXPON: Bug 2798543} -body {
- expr {8**9 == 8**268435465}
+ expr {8**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.59.4 {INST_EXPON: Bug 2798543} {
expr {(-8)**9 == (-8)**65545}
@@ -1194,7 +1193,7 @@ test expr-23.60.1 {INST_EXPON: Bug 2798543} {
expr {9**9 == 9**131081}
} 0
test expr-23.60.2 {INST_EXPON: Bug 2798543} -body {
- expr {9**9 == 9**268435465}
+ expr {9**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.60.3 {INST_EXPON: Bug 2798543} {
expr {(-9)**9 == (-9)**65545}
@@ -1206,7 +1205,7 @@ test expr-23.61.1 {INST_EXPON: Bug 2798543} {
expr {10**9 == 10**131081}
} 0
test expr-23.61.2 {INST_EXPON: Bug 2798543} -body {
- expr {10**9 == 10**268435465}
+ expr {10**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.61.3 {INST_EXPON: Bug 2798543} {
expr {(-10)**9 == (-10)**65545}
@@ -1218,7 +1217,7 @@ test expr-23.62.1 {INST_EXPON: Bug 2798543} {
expr {11**9 == 11**131081}
} 0
test expr-23.62.2 {INST_EXPON: Bug 2798543} -body {
- expr {11**9 == 11**268435465}
+ expr {11**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.62.3 {INST_EXPON: Bug 2798543} {
expr {(-11)**9 == (-11)**65545}
@@ -1233,7 +1232,7 @@ test expr-23.63.2 {INST_EXPON: Bug 2798543} {
expr {3**20 == 3**131092}
} 0
test expr-23.63.3 {INST_EXPON: Bug 2798543} -body {
- expr {3**20 == 3**268435476}
+ expr {3**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.63.4 {INST_EXPON: Bug 2798543} {
expr {(-3)**20 == (-3)**65556}
@@ -1248,7 +1247,7 @@ test expr-23.64.2 {INST_EXPON: Bug 2798543} {
expr {4**17 == 4**131089}
} 0
test expr-23.64.3 {INST_EXPON: Bug 2798543} -body {
- expr {4**17 == 4**268435473}
+ expr {4**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.64.4 {INST_EXPON: Bug 2798543} {
expr {(-4)**17 == (-4)**65553}
@@ -1263,7 +1262,7 @@ test expr-23.65.2 {INST_EXPON: Bug 2798543} {
expr {5**17 == 5**131089}
} 0
test expr-23.65.3 {INST_EXPON: Bug 2798543} -body {
- expr {5**17 == 5**268435473}
+ expr {5**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.65.4 {INST_EXPON: Bug 2798543} {
expr {(-5)**17 == (-5)**65553}
@@ -1278,7 +1277,7 @@ test expr-23.66.2 {INST_EXPON: Bug 2798543} {
expr {6**17 == 6**131089}
} 0
test expr-23.66.3 {INST_EXPON: Bug 2798543} -body {
- expr {6**17 == 6**268435473}
+ expr {6**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.66.4 {INST_EXPON: Bug 2798543} {
expr {(-6)**17 == (-6)**65553}
@@ -1293,7 +1292,7 @@ test expr-23.67.2 {INST_EXPON: Bug 2798543} {
expr {7**17 == 7**131089}
} 0
test expr-23.67.3 {INST_EXPON: Bug 2798543} -body {
- expr {7**17 == 7**268435473}
+ expr {7**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.67.4 {INST_EXPON: Bug 2798543} {
expr {(-7)**17 == (-7)**65553}
@@ -1308,7 +1307,7 @@ test expr-23.68.2 {INST_EXPON: Bug 2798543} {
expr {8**17 == 8**131089}
} 0
test expr-23.68.3 {INST_EXPON: Bug 2798543} -body {
- expr {8**17 == 8**268435473}
+ expr {8**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.68.4 {INST_EXPON: Bug 2798543} {
expr {(-8)**17 == (-8)**65553}
@@ -1323,7 +1322,7 @@ test expr-23.69.2 {INST_EXPON: Bug 2798543} {
expr {9**17 == 9**131089}
} 0
test expr-23.69.3 {INST_EXPON: Bug 2798543} -body {
- expr {9**17 == 9**268435473}
+ expr {9**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.69.4 {INST_EXPON: Bug 2798543} {
expr {(-9)**17 == (-9)**65553}
@@ -1338,7 +1337,7 @@ test expr-23.70.2 {INST_EXPON: Bug 2798543} {
expr {10**17 == 10**131089}
} 0
test expr-23.70.3 {INST_EXPON: Bug 2798543} -body {
- expr {10**17 == 10**268435473}
+ expr {10**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.70.4 {INST_EXPON: Bug 2798543} {
expr {(-10)**17 == (-10)**65553}
@@ -1353,7 +1352,7 @@ test expr-23.71.2 {INST_EXPON: Bug 2798543} {
expr {11**17 == 11**131089}
} 0
test expr-23.71.3 {INST_EXPON: Bug 2798543} -body {
- expr {11**17 == 11**268435473}
+ expr {11**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.71.4 {INST_EXPON: Bug 2798543} {
expr {(-11)**17 == (-11)**65553}
@@ -1365,7 +1364,7 @@ test expr-23.72.1 {INST_EXPON: Bug 2798543} {
expr {12**17 == 12**131089}
} 0
test expr-23.72.2 {INST_EXPON: Bug 2798543} -body {
- expr {12**17 == 12**268435473}
+ expr {12**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.72.3 {INST_EXPON: Bug 2798543} {
expr {(-12)**17 == (-12)**65553}
@@ -1377,7 +1376,7 @@ test expr-23.73.1 {INST_EXPON: Bug 2798543} {
expr {13**17 == 13**131089}
} 0
test expr-23.73.2 {INST_EXPON: Bug 2798543} -body {
- expr {13**17 == 13**268435473}
+ expr {13**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.73.3 {INST_EXPON: Bug 2798543} {
expr {(-13)**17 == (-13)**65553}
@@ -1389,7 +1388,7 @@ test expr-23.74.1 {INST_EXPON: Bug 2798543} {
expr {14**17 == 14**131089}
} 0
test expr-23.74.2 {INST_EXPON: Bug 2798543} -body {
- expr {14**17 == 14**268435473}
+ expr {14**268435456}
} -returnCodes error -result {exponent too large}
test expr-23.74.3 {INST_EXPON: Bug 2798543} {
expr {(-14)**17 == (-14)**65553}
diff --git a/tests/obj.test b/tests/obj.test
index e4ff958..e04e82d 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -475,11 +475,11 @@ test obj-26.1 {UpdateStringOfInt} testobj {
lappend result [testintobj get 1] ;# must update string rep
} {512 5120 5120}
-test obj-27.1 {Tcl_NewLongObj} testobj {
+test obj-27.1 {Tcl_NewWideObj} testobj {
set result ""
lappend result [testobj freeallvars]
- testintobj setmaxlong 1
- lappend result [testintobj ismaxlong 1]
+ testintobj setmax 1
+ lappend result [testintobj ismax 1]
lappend result [testobj type 1]
lappend result [testobj refcount 1]
} {{} 1 int 1}
@@ -488,7 +488,7 @@ test obj-28.1 {Tcl_SetLongObj, existing "empty string" object} testobj {
set result ""
lappend result [testobj freeallvars]
lappend result [testobj newobj 1]
- lappend result [testintobj setlong 1 77] ;# makes existing obj long int
+ lappend result [testintobj setint 1 77] ;# makes existing obj int
lappend result [testobj type 1]
lappend result [testobj refcount 1]
} {{} {} 77 int 2}
@@ -496,32 +496,32 @@ test obj-28.2 {Tcl_SetLongObj, existing non-"empty string" object} testobj {
set result ""
lappend result [testobj freeallvars]
lappend result [testdoubleobj set 1 12.34]
- lappend result [testintobj setlong 1 77] ;# makes existing obj long int
+ lappend result [testintobj setint 1 77] ;# makes existing obj int
lappend result [testobj type 1]
lappend result [testobj refcount 1]
} {{} 12.34 77 int 2}
-test obj-29.1 {Tcl_GetLongFromObj, existing long integer object} testobj {
+test obj-29.1 {Tcl_GetWideIntFromObj, existing int object} testobj {
set result ""
- lappend result [testintobj setlong 1 22]
- lappend result [testintobj mult10 1] ;# gets existing long int rep
+ lappend result [testintobj setint 1 22]
+ lappend result [testintobj mult10 1] ;# gets existingint rep
} {22 220}
-test obj-29.2 {Tcl_GetLongFromObj, convert to long} testobj {
+test obj-29.2 {Tcl_GetWideIntFromObj, convert to int} testobj {
set result ""
- lappend result [testintobj setlong 1 477]
+ lappend result [testintobj setint 1 477]
lappend result [testintobj div10 1] ;# must convert to bool
lappend result [testobj type 1]
} {477 47 int}
-test obj-29.3 {Tcl_GetLongFromObj, error converting to long integer} testobj {
+test obj-29.3 {Tcl_GetWideIntFromObj, error converting to int} testobj {
set result ""
lappend result [teststringobj set 1 abc]
- lappend result [catch {testintobj ismaxlong 1} msg] ;# cvts to long int
+ lappend result [catch {testintobj ismax 1} msg] ;# cvts to long int
lappend result $msg
} {abc 1 {expected integer but got "abc"}}
-test obj-29.4 {Tcl_GetLongFromObj, error converting from "empty string"} testobj {
+test obj-29.4 {Tcl_GetWideIntFromObj, error converting from "empty string"} testobj {
set result ""
lappend result [testobj newobj 1]
- lappend result [catch {testintobj ismaxlong 1} msg] ;# cvts to long int
+ lappend result [catch {testintobj ismax 1} msg] ;# cvts to long int
lappend result $msg
} {{} 1 {expected integer but got ""}}
diff --git a/tests/utf.test b/tests/utf.test
index 8c59490..f79d3bf 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -189,6 +189,12 @@ test utf-10.4 {Tcl_UtfBackslash: stops at first non-hex} testbytestring {
test utf-10.5 {Tcl_UtfBackslash: stops after 4 hex chars} testbytestring {
expr {"\u4e216" eq "[testbytestring \xe4\xb8\xa1]6"}
} 1
+test utf-10.6 {Tcl_UtfBackslash: stops after 5 hex chars} testbytestring {
+ expr {"\U1e2165" eq "[testbytestring \xf0\x9e\x88\x96]5"}
+} 1
+test utf-10.6 {Tcl_UtfBackslash: stops after 6 hex chars} testbytestring {
+ expr {"\U10e2165" eq "[testbytestring \xf4\x8e\x88\x96]5"}
+} 1
proc bsCheck {char num} {
global errNum
test utf-10.$errNum {backslash substitution} {
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index 82a041c..bd17b13 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -31,6 +31,38 @@ set ::CSSFILE "docs.css"
##
source [file join [file dirname [info script]] tcltk-man2html-utils.tcl]
+proc findversion {top name useversion} {
+ set upper [string toupper $name]
+ foreach top1 [list $top $top/..] sub {{} generic} {
+ foreach dirname [
+ glob -nocomplain -tails -type d -directory $top1 *] {
+
+ set tclh [join [list $top1 $dirname {*}$sub $name.h] /]
+ if {[file exists $tclh]} {
+ set chan [open $tclh]
+ set data [read $chan]
+ close $chan
+ # backslash isn't required in front of quote, but it keeps syntax
+ # highlighting straight in some editors
+ if {[regexp -lineanchor \
+ [string map [list @name@ $upper] \
+ {^#define\s+@name@_VERSION\s+\"([^.])+\.([^.\"]+)}] \
+ $data -> major minor]} {
+ # to do
+ # use glob matching instead of string matching or add
+ # brace handling to [string matcch]
+ if {$useversion eq {} || [string match $useversion $major.$minor]} {
+ set top [file dirname [file dirname $tclh]]
+ set prefix [file dirname $top]
+ return [list $prefix [file tail $top] $major $minor]
+ }
+ }
+ }
+ }
+ }
+ return
+}
+
proc parse_command_line {} {
global argv Version
@@ -44,7 +76,9 @@ proc parse_command_line {} {
set tcldir {}
set webdir ../html
set build_tcl 0
+ set opt_build_tcl 0
set build_tk 0
+ set opt_build_tk 0
set verbose 0
# Default search version is a glob pattern
set useversion {{,[8-9].[0-9]{,[.ab][0-9]{,[0-9]}}}}
@@ -93,10 +127,12 @@ proc parse_command_line {} {
--tcl {
set build_tcl 1
+ set opt_build_tcl 1
}
--tk {
set build_tk 1
+ set opt_build_tk 1
}
--verbose=* {
@@ -117,20 +153,19 @@ proc parse_command_line {} {
if {$build_tcl} {
# Find Tcl.
- set tcldir [lindex [lsort [glob -nocomplain -tails -type d \
- -directory $tcltkdir tcl$useversion]] end]
- if {$tcldir eq ""} {
+ lassign [findversion $tcltkdir tcl $useversion] tcltkdir tcldir major minor
+ if {$tcldir eq {} && $opt_build_tcl} {
puts stderr "tcltk-man-html: couldn't find Tcl below $tcltkdir"
exit 1
}
- puts "using Tcl source directory $tcldir"
+ puts "using Tcl source directory $tcltkdir $tcldir"
}
+
if {$build_tk} {
# Find Tk.
- set tkdir [lindex [lsort [glob -nocomplain -tails -type d \
- -directory $tcltkdir tk$useversion]] end]
- if {$tkdir eq ""} {
+ lassign [findversion $tcltkdir tk $useversion] tcltkdir tkdir major minor
+ if {$tkdir eq {} && $opt_build_tk} {
puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir"
exit 1
}
@@ -143,7 +178,7 @@ proc parse_command_line {} {
global overall_title
set overall_title ""
if {$build_tcl} {
- append overall_title "[capitalize $tcldir]"
+ append overall_title "Tcl $major.$minor"
}
if {$build_tcl && $build_tk} {
append overall_title "/"
diff --git a/unix/Makefile.in b/unix/Makefile.in
index d331955..7dfca29 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -319,7 +319,7 @@ GENERIC_OBJS = regcomp.o regexec.o regfree.o regerror.o tclAlloc.o \
OO_OBJS = tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o \
tclOOMethod.o tclOOStubInit.o
-TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \
+TOMMATH_OBJS = bn_reverse.o bn_fast_s_mp_mul_digs.o \
bn_fast_s_mp_sqr.o bn_mp_add.o bn_mp_and.o \
bn_mp_add_d.o bn_mp_clamp.o bn_mp_clear.o bn_mp_clear_multi.o \
bn_mp_cmp.o bn_mp_cmp_d.o bn_mp_cmp_mag.o \
@@ -490,7 +490,6 @@ STUB_SRCS = \
$(GENERIC_DIR)/tclOOStubLib.c
TOMMATH_SRCS = \
- $(TOMMATH_DIR)/bncore.c \
$(TOMMATH_DIR)/bn_reverse.c \
$(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c \
$(TOMMATH_DIR)/bn_fast_s_mp_sqr.c \
@@ -1460,9 +1459,6 @@ tclThreadTest.o: $(GENERIC_DIR)/tclThreadTest.c
tclTomMathInterface.o: $(GENERIC_DIR)/tclTomMathInterface.c $(MATHHDRS)
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTomMathInterface.c
-bncore.o: $(TOMMATH_DIR)/bncore.c $(MATHHDRS)
- $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bncore.c
-
bn_reverse.o: $(TOMMATH_DIR)/bn_reverse.c $(MATHHDRS)
$(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_reverse.c
@@ -2302,13 +2298,10 @@ html-tk: ${NATIVE_TCLSH}
$(BUILD_HTML) --tk
@EXTRA_BUILD_HTML@
-# You'd better have these programs or you will have problems creating Makefile
-# from Makefile.in in the first place...
-HTML_VERSION = `basename $(TOP_DIR) | sed s/tcl//`
BUILD_HTML = \
@${NATIVE_TCLSH} $(TOOL_DIR)/tcltk-man2html.tcl \
- --useversion=$(HTML_VERSION) --htmldir="$(HTML_INSTALL_DIR)" \
- --srcdir=$(TOP_DIR)/.. $(BUILD_HTML_FLAGS)
+ --tcl --useversion=$(MAJOR_VERSION).$(MINOR_VERSION) --htmldir="$(HTML_INSTALL_DIR)" \
+ --srcdir=$(TOP_DIR) $(BUILD_HTML_FLAGS)
#--------------------------------------------------------------------------
# The list of all the targets that do not correspond to real files. This stops
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 111acf8..c63b485 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -8,8 +8,6 @@
*/
#include "tclInt.h"
-#include <pwd.h>
-#include <grp.h>
#include <errno.h>
#include <string.h>
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index ff398be..6dfc772 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -41,8 +41,6 @@
*/
#include "tclInt.h"
-#include <utime.h>
-#include <grp.h>
#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE
#ifndef NO_FSTATFS
#include <sys/statfs.h>
@@ -1499,11 +1497,11 @@ SetGroupAttribute(
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New group for file. */
{
- long gid;
+ Tcl_WideInt gid;
int result;
const char *native;
- if (Tcl_GetLongFromObj(NULL, attributePtr, &gid) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(NULL, attributePtr, &gid) != TCL_OK) {
Tcl_DString ds;
struct group *groupPtr = NULL;
const char *string;
@@ -1566,11 +1564,11 @@ SetOwnerAttribute(
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* New owner for file. */
{
- long uid;
+ Tcl_WideInt uid;
int result;
const char *native;
- if (Tcl_GetLongFromObj(NULL, attributePtr, &uid) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(NULL, attributePtr, &uid) != TCL_OK) {
Tcl_DString ds;
struct passwd *pwPtr = NULL;
const char *string;
@@ -1633,7 +1631,7 @@ SetPermissionsAttribute(
Tcl_Obj *fileName, /* The name of the file (UTF-8). */
Tcl_Obj *attributePtr) /* The attribute to set. */
{
- long mode;
+ Tcl_WideInt mode;
mode_t newMode;
int result = TCL_ERROR;
const char *native;
@@ -1652,11 +1650,11 @@ SetPermissionsAttribute(
TclNewLiteralStringObj(modeObj, "0o");
Tcl_AppendToObj(modeObj, modeStringPtr+scanned+1, -1);
- result = Tcl_GetLongFromObj(NULL, modeObj, &mode);
+ result = Tcl_GetWideIntFromObj(NULL, modeObj, &mode);
Tcl_DecrRefCount(modeObj);
}
if (result == TCL_OK
- || Tcl_GetLongFromObj(NULL, attributePtr, &mode) == TCL_OK) {
+ || Tcl_GetWideIntFromObj(NULL, attributePtr, &mode) == TCL_OK) {
newMode = (mode_t) (mode & 0x00007FFF);
} else {
Tcl_StatBuf buf;
@@ -2343,8 +2341,8 @@ GetUnixFileAttributes(
return TCL_ERROR;
}
- *attributePtrPtr = Tcl_NewBooleanObj(
- fileAttributes & attributeArray[objIndex]);
+ *attributePtrPtr = Tcl_NewWideIntObj(
+ (fileAttributes & attributeArray[objIndex]) != 0);
return TCL_OK;
}
@@ -2443,7 +2441,7 @@ GetUnixFileAttributes(
return TCL_ERROR;
}
- *attributePtrPtr = Tcl_NewBooleanObj(statBuf.st_flags & UF_IMMUTABLE);
+ *attributePtrPtr = Tcl_NewWideIntObj((statBuf.st_flags & UF_IMMUTABLE) != 0);
return TCL_OK;
}
diff --git a/win/Makefile.in b/win/Makefile.in
index 3a25b44..888b19e 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -360,7 +360,6 @@ GENERIC_OBJS = \
tclZlib.$(OBJEXT)
TOMMATH_OBJS = \
- bncore.${OBJEXT} \
bn_reverse.${OBJEXT} \
bn_fast_s_mp_mul_digs.${OBJEXT} \
bn_fast_s_mp_sqr.${OBJEXT} \
diff --git a/win/makefile.vc b/win/makefile.vc
index 8535227..c61d846 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -252,7 +252,6 @@ ZLIBOBJS = \
$(TMP_DIR)\zutil.obj
TOMMATHOBJS = \
- $(TMP_DIR)\bncore.obj \
$(TMP_DIR)\bn_reverse.obj \
$(TMP_DIR)\bn_fast_s_mp_mul_digs.obj \
$(TMP_DIR)\bn_fast_s_mp_sqr.obj \
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 72c833a..ab783d9 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -1549,7 +1549,7 @@ GetWinFileAttributes(
}
}
- *attributePtrPtr = Tcl_NewBooleanObj(attr);
+ *attributePtrPtr = Tcl_NewWideIntObj(attr != 0);
return TCL_OK;
}