summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.fossil-settings/binary-glob18
-rwxr-xr-x.gitattributes39
-rwxr-xr-x.gitignore50
-rw-r--r--.travis.yml418
-rw-r--r--compat/fake-rfc2553.c3
-rw-r--r--compat/gettod.c3
-rw-r--r--compat/mkstemp.c13
-rw-r--r--compat/opendir.c12
-rw-r--r--compat/stdlib.h2
-rw-r--r--compat/strstr.c4
-rw-r--r--compat/strtol.c2
-rw-r--r--compat/strtoul.c6
-rw-r--r--compat/waitpid.c2
-rw-r--r--compat/zlib/contrib/minizip/minizip.c10
-rw-r--r--doc/Class.318
-rw-r--r--doc/Notifier.332
-rw-r--r--doc/OpenFileChnl.32
-rw-r--r--doc/StringObj.32
-rw-r--r--doc/Utf.310
-rw-r--r--doc/cd.n2
-rw-r--r--doc/source.n2
-rw-r--r--generic/regcomp.c2
-rw-r--r--generic/regcustom.h4
-rw-r--r--generic/regex.h4
-rw-r--r--generic/regexec.c3
-rw-r--r--generic/regguts.h2
-rw-r--r--generic/tcl.h2
-rw-r--r--generic/tclAlloc.c22
-rw-r--r--generic/tclAssembly.c76
-rw-r--r--generic/tclAsync.c2
-rw-r--r--generic/tclBasic.c126
-rw-r--r--generic/tclBinary.c8
-rw-r--r--generic/tclCmdAH.c29
-rw-r--r--generic/tclCmdIL.c30
-rw-r--r--generic/tclCmdMZ.c35
-rw-r--r--generic/tclCompCmds.c34
-rw-r--r--generic/tclCompCmdsGR.c2
-rw-r--r--generic/tclCompCmdsSZ.c10
-rw-r--r--generic/tclCompile.c60
-rw-r--r--generic/tclCompile.h6
-rw-r--r--generic/tclDTrace.d57
-rw-r--r--generic/tclDate.c34
-rw-r--r--generic/tclDisassemble.c6
-rw-r--r--generic/tclEncoding.c226
-rw-r--r--generic/tclEnsemble.c12
-rw-r--r--generic/tclExecute.c56
-rw-r--r--generic/tclFileName.c6
-rw-r--r--generic/tclGetDate.y28
-rw-r--r--generic/tclHash.c43
-rw-r--r--generic/tclHistory.c4
-rw-r--r--generic/tclIO.c6
-rw-r--r--generic/tclIORChan.c2
-rw-r--r--generic/tclIORTrans.c2
-rw-r--r--generic/tclIOUtil.c12
-rw-r--r--generic/tclIndexObj.c14
-rw-r--r--generic/tclInt.h17
-rw-r--r--generic/tclInterp.c8
-rw-r--r--generic/tclListObj.c22
-rw-r--r--generic/tclLiteral.c50
-rw-r--r--generic/tclNamesp.c70
-rw-r--r--generic/tclOO.c12
-rw-r--r--generic/tclOOBasic.c4
-rw-r--r--generic/tclOOCall.c10
-rw-r--r--generic/tclOODefineCmds.c8
-rw-r--r--generic/tclOOInfo.c12
-rw-r--r--generic/tclOOInt.h2
-rw-r--r--generic/tclOOMethod.c24
-rw-r--r--generic/tclObj.c182
-rw-r--r--generic/tclParse.c47
-rw-r--r--generic/tclPathObj.c4
-rw-r--r--generic/tclPipe.c6
-rw-r--r--generic/tclPkg.c6
-rw-r--r--generic/tclProc.c52
-rw-r--r--generic/tclResult.c34
-rw-r--r--generic/tclStringObj.c56
-rw-r--r--generic/tclTest.c29
-rw-r--r--generic/tclTestObj.c18
-rw-r--r--generic/tclTestProcBodyObj.c8
-rw-r--r--generic/tclThreadAlloc.c22
-rw-r--r--generic/tclTimer.c10
-rw-r--r--generic/tclTrace.c36
-rw-r--r--generic/tclUtf.c22
-rw-r--r--generic/tclUtil.c16
-rw-r--r--generic/tclVar.c54
-rw-r--r--generic/tclZipfs.c6
-rw-r--r--library/http/effective_tld_names.txt.gzbin39188 -> 70836 bytes
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl9
-rw-r--r--library/tzdata/Africa/Casablanca102
-rw-r--r--library/tzdata/Africa/El_Aaiun102
-rw-r--r--library/tzdata/America/Campo_Grande161
-rw-r--r--library/tzdata/America/Cuiaba161
-rw-r--r--library/tzdata/America/Sao_Paulo161
-rw-r--r--library/tzdata/Asia/Gaza162
-rw-r--r--library/tzdata/Asia/Hebron162
-rw-r--r--library/tzdata/Asia/Hong_Kong20
-rw-r--r--library/tzdata/Europe/Rome2
-rw-r--r--macosx/tclMacOSXFCmd.c4
-rw-r--r--tests-perf/clock.perf.tcl10
-rw-r--r--tests-perf/test-performance.tcl21
-rw-r--r--tests/all.tcl2
-rw-r--r--tests/async.test3
-rw-r--r--tests/binary.test2
-rw-r--r--tests/chanio.test7
-rw-r--r--tests/cmdAH.test23
-rw-r--r--tests/cmdMZ.test50
-rw-r--r--tests/encoding.test23
-rw-r--r--tests/expr.test2
-rw-r--r--tests/fileSystem.test3
-rw-r--r--tests/format.test5
-rw-r--r--tests/http.test8
-rw-r--r--tests/io.test9
-rw-r--r--tests/ioCmd.test15
-rw-r--r--tests/socket.test3
-rw-r--r--tests/source.test4
-rw-r--r--tests/stringObj.test4
-rw-r--r--tests/utf.test16
-rw-r--r--tests/winFCmd.test56
-rw-r--r--tests/winTime.test5
-rw-r--r--tests/zipfs.test2
-rwxr-xr-xunix/configure21
-rw-r--r--unix/configure.ac6
-rw-r--r--unix/tcl.m47
-rw-r--r--unix/tclLoadAix.c20
-rw-r--r--unix/tclUnixChan.c2
-rw-r--r--unix/tclUnixCompat.c12
-rw-r--r--unix/tclUnixFCmd.c4
-rw-r--r--unix/tclUnixInit.c8
-rw-r--r--unix/tclUnixThrd.c2
-rw-r--r--unix/tclUnixTime.c5
-rw-r--r--win/Makefile.in54
-rw-r--r--win/cat.c6
-rwxr-xr-xwin/configure21
-rw-r--r--win/configure.ac14
-rw-r--r--win/makefile.vc65
-rw-r--r--win/rules.vc20
-rw-r--r--win/tcl.dsp8
-rw-r--r--win/tclWin32Dll.c4
-rw-r--r--win/tclWinChan.c2
-rw-r--r--win/tclWinConsole.c14
-rw-r--r--win/tclWinError.c4
-rw-r--r--win/tclWinFCmd.c2
-rwxr-xr-xwin/tclWinFile.c28
-rw-r--r--win/tclWinInit.c4
-rw-r--r--win/tclWinInt.h6
-rw-r--r--win/tclWinLoad.c2
-rw-r--r--win/tclWinNotify.c29
-rw-r--r--win/tclWinPanic.c4
-rw-r--r--win/tclWinPort.h7
-rw-r--r--win/tclWinTest.c23
-rw-r--r--win/tclWinTime.c4
151 files changed, 2252 insertions, 1939 deletions
diff --git a/.fossil-settings/binary-glob b/.fossil-settings/binary-glob
index ec574be..2a205a1 100644
--- a/.fossil-settings/binary-glob
+++ b/.fossil-settings/binary-glob
@@ -1,9 +1,11 @@
-compat/zlib/win32/zdll.lib
-compat/zlib/win32/zlib1.dll
-compat/zlib/win64/zdll.lib
-compat/zlib/win64/zlib1.dll
-compat/zlib/win64/libz.dll.a
-compat/zlib/zlib.3.pdf
-*.bmp
+*.a
+*.dll
+*.exe
*.gif
-*.png \ No newline at end of file
+*.gz
+*.jpg
+*.lib
+*.pdf
+*.png
+*.xlsx
+*.zip
diff --git a/.gitattributes b/.gitattributes
new file mode 100755
index 0000000..e9a67c8
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,39 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* eol=lf
+* text=auto
+
+# Explicitly declare text files you want to always be normalized and converted
+# to native line endings on checkout.
+*.3 text
+*.c text
+*.css text
+*.enc text
+*.h text
+*.htm text
+*.html text
+*.java text
+*.js text
+*.json text
+*.n text
+*.svg text
+*.ts text
+*.tcl text
+*.test text
+
+# Declare files that will always have CRLF line endings on checkout.
+*.bat eol=crlf
+*.sln eol=crlf
+*.vc eol=crlf
+
+# Denote all files that are truly binary and should not be modified.
+*.a binary
+*.dll binary
+*.exe binary
+*.gif binary
+*.gz binary
+*.jpg binary
+*.lib binary
+*.pdf binary
+*.png binary
+*.xlsx binary
+*.zip binary
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..99fd07e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,50 @@
+*.a
+*.dll
+*.dylib
+*.exe
+*.exp
+*.lib
+*.o
+*.obj
+*.pdb
+*.res
+*.sl
+*.so
+*/Makefile
+*/config.cache
+*/config.log
+*/config.status
+*/tclConfig.sh
+*/tclsh*
+*/tcltest*
+*/versions.vc
+*/version.vc
+html
+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/*
+libtommath/mtest/*
+libtommath/logs/*
+libtommath/etc/*
+libtommath/demo/*
+libtommath/*.out
+libtommath/*.tex
+unix/autoMkindex.tcl
+unix/dltest.marker
+unix/tcl.pc
+unix/tclIndex
+unix/pkgs/*
+win/Debug*
+win/Release*
+win/pkgs/*
+win/tcl.hpj
+win/nmhlp-out.txt
diff --git a/.travis.yml b/.travis.yml
index 59b52eb..1d5f4dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,51 +3,66 @@ language: c
matrix:
include:
- - os: linux
+# Testing on Linux with various compilers
+ - name: "Linux/GCC/Shared"
+ os: linux
dist: xenial
- compiler: clang
+ compiler: gcc
env:
- BUILD_DIR=unix
- - os: linux
+ - name: "Linux/GCC/Static"
+ os: linux
dist: xenial
- compiler: clang
+ compiler: gcc
env:
- CFGOPT=--disable-shared
- BUILD_DIR=unix
- - os: linux
+ - name: "Linux/GCC/Shared: UTF_MAX=6"
+ os: linux
dist: xenial
compiler: gcc
env:
- BUILD_DIR=unix
- - os: linux
+ - CFGOPT=CFLAGS=-DTCL_UTF_MAX=6
+ - name: "Linux/GCC/Shared: UTF_MAX=3"
+ os: linux
dist: xenial
compiler: gcc
env:
- - CFGOPT=--disable-shared
- BUILD_DIR=unix
- - os: linux
+ - CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
+ - name: "Linux/GCC/Shared: NO_DEPRECATED"
+ os: linux
dist: xenial
- compiler: gcc-4.9
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-4.9
+ compiler: gcc
+ env:
+ - BUILD_DIR=unix
+ - CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
+# Debug build. Running test-cases disabled, because it is currently failing.
+ - name: "Linux/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: gcc
env:
- BUILD_DIR=unix
- - os: linux
+ - CFGOPT=--enable-symbols=all
+ script:
+ - make all tcltest
+# Older versions of GCC...
+ - name: "Linux/GCC 7/Shared"
+ os: linux
dist: xenial
- compiler: gcc-5
+ compiler: gcc-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-5
+ - g++-7
env:
- BUILD_DIR=unix
- - os: linux
+ - name: "Linux/GCC 6/Shared"
+ os: linux
dist: xenial
compiler: gcc-6
addons:
@@ -58,82 +73,98 @@ matrix:
- g++-6
env:
- BUILD_DIR=unix
- - os: linux
+ - name: "Linux/GCC 5/Shared"
+ os: linux
dist: xenial
- compiler: gcc-7
+ compiler: gcc-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-7
+ - g++-5
env:
- BUILD_DIR=unix
- - os: linux
+ - name: "Linux/GCC 4.9/Shared"
+ os: linux
dist: xenial
- compiler: gcc-7
+ compiler: gcc-4.9
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-7
+ - g++-4.9
env:
- BUILD_DIR=unix
- - CFGOPT=CFLAGS=-DTCL_UTF_MAX=6
- - os: linux
+# Clang
+ - name: "Linux/Clang/Shared"
+ os: linux
dist: xenial
- compiler: gcc-7
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-7
+ compiler: clang
env:
- BUILD_DIR=unix
- - CFGOPT=CFLAGS=-DTCL_UTF_MAX=3
- - os: linux
+ - name: "Linux/Clang/Static"
+ os: linux
dist: xenial
- compiler: gcc-7
- addons:
- apt:
- sources:
- - ubuntu-toolchain-r-test
- packages:
- - g++-7
+ compiler: clang
+ env:
+ - CFGOPT=--disable-shared
+ - BUILD_DIR=unix
+# Debug build. Running test-cases disabled, because it is currently failing.
+ - name: "Linux/Clang/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: clang
env:
- BUILD_DIR=unix
- - CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
- - os: osx
- osx_image: xcode8
+ - CFGOPT=--enable-symbols=all
+ script:
+ - make all tcltest
+# Testing on Mac, various styles
+ - name: "macOS/Xcode 11/Shared/Unix-like"
+ os: osx
+ osx_image: xcode11
env:
- BUILD_DIR=unix
- - os: osx
- osx_image: xcode8
+ - name: "macOS/Xcode 11/Shared"
+ os: osx
+ osx_image: xcode11
+ env:
+ - BUILD_DIR=macosx
+ install: []
+ script: &mactest
+ - make all
+ # The styles=develop avoids some weird problems on OSX
+ - make test styles=develop
+ - name: "macOS/Xcode 10/Shared"
+ os: osx
+ osx_image: xcode10.2
env:
- BUILD_DIR=macosx
- - NO_DIRECT_CONFIGURE=1
- - os: osx
+ install: []
+ script: *mactest
+ - name: "macOS/Xcode 9/Shared"
+ os: osx
osx_image: xcode9
env:
- BUILD_DIR=macosx
- - NO_DIRECT_CONFIGURE=1
- - os: osx
- osx_image: xcode10.2
+ install: []
+ script: *mactest
+ - name: "macOS/Xcode 8/Shared"
+ os: osx
+ osx_image: xcode8
env:
- BUILD_DIR=macosx
- - NO_DIRECT_CONFIGURE=1
-### C builds not currently supported on Windows instances
-# - os: windows
-# env:
-# - BUILD_DIR=win
-### ... so proxy with a Mingw cross-compile
-# Test with mingw-w64 (32 bit)
- - os: linux
+ install: []
+ script: *mactest
+# Test with mingw-w64 (32 bit) cross-compile
+# Doesn't run tests because wine is only an imperfect Windows emulation
+ - name: "Linux-cross-Windows-32/GCC/Shared/no test"
+ os: linux
dist: xenial
compiler: i686-w64-mingw32-gcc
- addons:
+ addons: &mingw32
apt:
packages:
- gcc-mingw-w64-base
@@ -145,76 +176,63 @@ matrix:
env:
- BUILD_DIR=win
- CFGOPT=--host=i686-w64-mingw32
- - NO_DIRECT_TEST=1
- - os: linux
+ script: &crosstest
+ - make all tcltest
+ # Include a high visibility marker that tests are skipped outright
+ - >
+ echo "`tput setaf 3`SKIPPED TEST: CROSS COMPILING`tput sgr0`"
+ - name: "Linux-cross-Windows-32/GCC/Static/no test"
+ 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
+ addons: *mingw32
env:
- BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 --disable-shared"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-32/GCC/Shared/no test: UTF_MAX=6"
+ 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
+ addons: *mingw32
env:
- BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=6"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-32/GCC/Shared/no test: UTF_MAX=3"
+ 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
+ addons: *mingw32
env:
- BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_UTF_MAX=3"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-32/GCC/Shared/no test: NO_DEPRECATED"
+ 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
+ addons: *mingw32
env:
- BUILD_DIR=win
- CFGOPT="--host=i686-w64-mingw32 CFLAGS=-DTCL_NO_DEPRECATED=1"
- - NO_DIRECT_TEST=1
+ script: *crosstest
+ - name: "Linux-cross-Windows-32/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: i686-w64-mingw32-gcc
+ addons: *mingw32
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--host=i686-w64-mingw32 --enable-symbols"
+ script: *crosstest
# Test with mingw-w64 (64 bit)
- - os: linux
+# Doesn't run tests because wine is only an imperfect Windows emulation
+ - name: "Linux-cross-Windows-64/GCC/Shared/no test"
+ os: linux
dist: xenial
compiler: x86_64-w64-mingw32-gcc
- addons:
+ addons: &mingw64
apt:
packages:
- gcc-mingw-w64-base
@@ -225,73 +243,163 @@ matrix:
env:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Static/no test"
+ 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
+ addons: *mingw64
env:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit --disable-shared"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Shared/no test: UTF_MAX=6"
+ 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
+ addons: *mingw64
env:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=6"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Shared/no test: UTF_MAX=3"
+ 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
+ addons: *mingw64
env:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
- - NO_DIRECT_TEST=1
- - os: linux
+ script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Shared/no test: NO_DEPRECATED"
+ 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
+ addons: *mingw64
env:
- BUILD_DIR=win
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
- - NO_DIRECT_TEST=1
+ script: *crosstest
+ - name: "Linux-cross-Windows-64/GCC/Debug/no test"
+ os: linux
+ dist: xenial
+ compiler: x86_64-w64-mingw32-gcc
+ addons: *mingw64
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit --enable-symbols"
+ script: *crosstest
+# Test on Windows with MSVC native
+ - name: "Windows/MSVC/Shared"
+ os: windows
+ compiler: cl
+ env: &vcenv
+ - BUILD_DIR=win
+ - VCDIR="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"
+ before_install: &vcpreinst
+ - PATH="$PATH:$VCDIR"
+ - cd ${BUILD_DIR}
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc test'
+ - name: "Windows/MSVC/Shared: UTF_MAX=6"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=utfmax -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=utfmax -f makefile.vc test'
+ - name: "Windows/MSVC/Shared: NO_DEPRECATED"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=nodep -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=nodep -f makefile.vc test'
+ - name: "Windows/MSVC/Static"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc test'
+ - name: "Windows/MSVC/Debug"
+ os: windows
+ compiler: cl
+ env: *vcenv
+ before_install: *vcpreinst
+ install: []
+ script:
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc all tcltest'
+ - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols -f makefile.vc test'
+# Test on Windows with GCC native
+ - name: "Windows/GCC/Shared"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
+ - name: "Windows/GCC/Shared: UTF_MAX=6"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=6"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
+ - name: "Windows/GCC/Shared: UTF_MAX=3"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
+ - name: "Windows/GCC/Shared: NO_DEPRECATED"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit CFLAGS=-DTCL_NO_DEPRECATED=1"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
+ - name: "Windows/GCC/Static"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit --disable-shared"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
+ - name: "Windows/GCC/Debug"
+ os: windows
+ compiler: gcc
+ env:
+ - BUILD_DIR=win
+ - CFGOPT="--enable-64bit --enable-symbols"
+ before_install:
+ - choco install make
+ - cd ${BUILD_DIR}
before_install:
- - export ERROR_ON_FAILURES=1
- cd ${BUILD_DIR}
install:
- - test -n "$NO_DIRECT_CONFIGURE" || ./configure ${CFGOPT}
+ - ./configure ${CFGOPT} --prefix=$HOME || (cat config.log && exit 1)
+before_script:
+ - export ERROR_ON_FAILURES=1
script:
- - make
- # The styles=develop avoids some weird problems on OSX
- - test -n "$NO_DIRECT_TEST" || make test styles=develop
+ - make all tcltest
+ - make test
diff --git a/compat/fake-rfc2553.c b/compat/fake-rfc2553.c
index c8e69400..29e2b56 100644
--- a/compat/fake-rfc2553.c
+++ b/compat/fake-rfc2553.c
@@ -73,6 +73,7 @@ int fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
struct hostent *hp;
char tmpserv[16];
+ (void)salen;
if (sa->sa_family != AF_UNSPEC && sa->sa_family != AF_INET)
return (EAI_FAMILY);
@@ -153,7 +154,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
{
struct addrinfo *ai;
- ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
+ ai = (struct addrinfo *)malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
if (ai == NULL)
return (NULL);
diff --git a/compat/gettod.c b/compat/gettod.c
index ca20cf8..f6651d4 100644
--- a/compat/gettod.c
+++ b/compat/gettod.c
@@ -21,10 +21,11 @@ gettimeofday(
struct timezone *tz)
{
struct timeb t;
+ (void)tz;
ftime(&t);
tp->tv_sec = t.time;
- tp->tv_usec = t. millitm * 1000;
+ tp->tv_usec = t.millitm * 1000;
return 0;
}
diff --git a/compat/mkstemp.c b/compat/mkstemp.c
index 1a44dfa..feccfbb 100644
--- a/compat/mkstemp.c
+++ b/compat/mkstemp.c
@@ -13,6 +13,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
/*
*----------------------------------------------------------------------
@@ -32,19 +33,19 @@
int
mkstemp(
- char *template) /* Template for filename. */
+ char *tmpl) /* Template for filename. */
{
static const char alphanumerics[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
- register char *a, *b;
+ char *a, *b;
int fd, count, alphanumericsLen = strlen(alphanumerics); /* == 62 */
- a = template + strlen(template);
- while (a > template && *(a-1) == 'X') {
+ a = tmpl + strlen(tmpl);
+ while (a > tmpl && *(a-1) == 'X') {
a--;
}
- if (a == template) {
+ if (a == tmpl) {
errno = ENOENT;
return -1;
}
@@ -71,7 +72,7 @@ mkstemp(
* Template is now realized; try to open (with correct options).
*/
- fd = open(template, O_RDWR|O_CREAT|O_EXCL, 0600);
+ fd = open(tmpl, O_RDWR|O_CREAT|O_EXCL, 0600);
} while (fd == -1 && errno == EEXIST && --count > 0);
return fd;
diff --git a/compat/opendir.c b/compat/opendir.c
index 7a49566..25a7ada 100644
--- a/compat/opendir.c
+++ b/compat/opendir.c
@@ -20,9 +20,9 @@ DIR *
opendir(
char *name)
{
- register DIR *dirp;
- register int fd;
- char *myname;
+ DIR *dirp;
+ int fd;
+ const char *myname;
myname = ((*name == '\0') ? "." : name);
if ((fd = open(myname, 0, 0)) == -1) {
@@ -65,9 +65,9 @@ struct olddirect {
struct dirent *
readdir(
- register DIR *dirp)
+ DIR *dirp)
{
- register struct olddirect *dp;
+ struct olddirect *dp;
static struct dirent dir;
for (;;) {
@@ -101,7 +101,7 @@ readdir(
void
closedir(
- register DIR *dirp)
+ DIR *dirp)
{
close(dirp->dd_fd);
dirp->dd_fd = -1;
diff --git a/compat/stdlib.h b/compat/stdlib.h
index 6900be3..bb0f133 100644
--- a/compat/stdlib.h
+++ b/compat/stdlib.h
@@ -5,7 +5,7 @@
* This file isn't complete in the ANSI-C sense; it only declares things
* that are needed by Tcl. This file is needed even on many systems with
* their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare
- * all the procedures needed here (such as strtod).
+ * all the procedures needed here (such as strtol/strtoul).
*
* Copyright (c) 1991 The Regents of the University of California.
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
diff --git a/compat/strstr.c b/compat/strstr.c
index e3b9b8d..206dca9 100644
--- a/compat/strstr.c
+++ b/compat/strstr.c
@@ -36,10 +36,10 @@
char *
strstr(
- register char *string, /* String to search. */
+ char *string, /* String to search. */
char *substring) /* Substring to try to find in string. */
{
- register char *a, *b;
+ char *a, *b;
/*
* First scan quickly through the two strings looking for a
diff --git a/compat/strtol.c b/compat/strtol.c
index b7f6919..22cc1eb 100644
--- a/compat/strtol.c
+++ b/compat/strtol.c
@@ -45,7 +45,7 @@ strtol(
* hex, "0" means octal, anything else means
* decimal. */
{
- register const char *p;
+ const char *p;
long result;
/*
diff --git a/compat/strtoul.c b/compat/strtoul.c
index e37eb05..bf16f7a 100644
--- a/compat/strtoul.c
+++ b/compat/strtoul.c
@@ -62,9 +62,9 @@ strtoul(
* hex, "0" means octal, anything else means
* decimal. */
{
- register const char *p;
- register unsigned long int result = 0;
- register unsigned digit;
+ const char *p;
+ unsigned long int result = 0;
+ unsigned digit;
int anyDigits = 0;
int negative=0;
int overflow=0;
diff --git a/compat/waitpid.c b/compat/waitpid.c
index d4473a8..626d210 100644
--- a/compat/waitpid.c
+++ b/compat/waitpid.c
@@ -70,7 +70,7 @@ waitpid(
int options) /* OR'ed combination of WNOHANG and
* WUNTRACED. */
{
- register WaitInfo *waitPtr, *prevPtr;
+ WaitInfo *waitPtr, *prevPtr;
pid_t result;
WAIT_STATUS_TYPE status;
diff --git a/compat/zlib/contrib/minizip/minizip.c b/compat/zlib/contrib/minizip/minizip.c
index 2dd9f10..8a31582 100644
--- a/compat/zlib/contrib/minizip/minizip.c
+++ b/compat/zlib/contrib/minizip/minizip.c
@@ -70,8 +70,8 @@
#ifdef _WIN32
uLong filetime(f, tmzip, dt)
- char *f; /* name of file to get info on */
- tm_zip *tmzip; /* return value: access, modific. and creation times */
+ const char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */
uLong *dt; /* dostime */
{
int ret = 0;
@@ -94,7 +94,7 @@ uLong filetime(f, tmzip, dt)
#else
#if defined(unix) || defined(__APPLE__)
uLong filetime(f, tmzip, dt)
- char *f; /* name of file to get info on */
+ const char *f; /* name of file to get info on */
tm_zip *tmzip; /* return value: access, modific. and creation times */
uLong *dt; /* dostime */
{
@@ -136,8 +136,8 @@ uLong filetime(f, tmzip, dt)
}
#else
uLong filetime(f, tmzip, dt)
- char *f; /* name of file to get info on */
- tm_zip *tmzip; /* return value: access, modific. and creation times */
+ const char *f; /* name of file to get info on */
+ tm_zip *tmzip; /* return value: access, modific. and creation times */
uLong *dt; /* dostime */
{
return 0;
diff --git a/doc/Class.3 b/doc/Class.3
index 1c3fe08..57203d5 100644
--- a/doc/Class.3
+++ b/doc/Class.3
@@ -79,7 +79,9 @@ The number of elements in the \fIobjv\fR array.
The arguments to the command to create the instance of the class.
.AP int skip in
The number of arguments at the start of the argument array, \fIobjv\fR, that
-are not arguments to any constructors.
+are not arguments to any constructors. This allows the generation of correct
+error messages even when complicated calling patterns are used (e.g., via the
+\fBnext\fR command).
.AP Tcl_ObjectMetadataType *metaTypePtr in
The type of \fImetadata\fR being set with \fBTcl_ClassSetMetadata\fR or
retrieved with \fBTcl_ClassGetMetadata\fR.
@@ -109,7 +111,9 @@ may be retrieved using the \fBTcl_GetObjectCommand\fR function, the name of
the object (and hence the name of the command) with \fBTcl_GetObjectName\fR,
and the namespace may be retrieved using the \fBTcl_GetObjectNamespace\fR
function. Note that the Tcl_Obj reference returned by \fBTcl_GetObjectName\fR
-is a shared reference.
+is a shared reference. You can also get whether the object has been marked for
+deletion with \fBTcl_ObjectDeleted\fR (it returns true if deletion of the
+object has begun); this can be useful during the processing of methods.
.PP
Instances of classes are created using \fBTcl_NewObjectInstance\fR, which
creates an object from any class (and which is internally called by both
@@ -121,6 +125,16 @@ created object, or NULL if the creation failed (when an error message will be
left in the interpreter result). In addition, objects may be copied by using
\fBTcl_CopyObjectInstance\fR which creates a copy of an object without running
any constructors.
+.PP
+Note that the lifetime management of objects is handled internally within
+TclOO, and does not use \fBTcl_Preserve\fR. \fIIt is not safe to put a
+Tcl_Object handle in a C structure with a lifespan different to the object;\fR
+you should use the object's command name (as retrieved with
+\fBTcl_GetObjectName\fR) instead. It is safe to use a Tcl_Object handle for
+the lifespan of a call of a method on that object; handles do not become
+invalid while there is an outstanding call on their object (even if the only
+operation guaranteed to be safe on them is \fBTcl_ObjectDeleted\fR; the other
+operations are only guaranteed to work on non-deleted objects).
.SH "OBJECT AND CLASS METADATA"
.PP
Every object and every class may have arbitrary amounts of metadata attached
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index 16f9f8d..ec9f910 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -132,22 +132,17 @@ higher-level software that they have occurred. The procedures
and \fBTcl_SetMaxBlockTime\fR, \fBTcl_QueueEvent\fR, and
\fBTcl_DeleteEvents\fR are used primarily by event sources.
.IP [2]
-The event queue: for non-threaded applications,
-there is a single queue for the whole application,
-containing events that have been detected but not yet serviced. Event
-sources place events onto the queue so that they may be processed in
-order at appropriate times during the event loop. The event queue
-guarantees a fair discipline of event handling, so that no event
-source can starve the others. It also allows events to be saved for
-servicing at a future time. Threaded applications work in a
-similar manner, except that there is a separate event queue for
-each thread containing a Tcl interpreter.
+The event queue: there is a single queue for each thread containing
+a Tcl interpreter, containing events that have been detected but not
+yet serviced. Event sources place events onto the queue so that they
+may be processed in order at appropriate times during the event loop.
+The event queue guarantees a fair discipline of event handling, so that
+no event source can starve the others. It also allows events to be
+saved for servicing at a future time.
\fBTcl_QueueEvent\fR is used (primarily
-by event sources) to add events to the event queue and
+by event sources) to add events to the current thread's event queue and
\fBTcl_DeleteEvents\fR is used to remove events from the queue without
-processing them. In a threaded application, \fBTcl_QueueEvent\fR adds
-an event to the current thread's queue, and \fBTcl_ThreadQueueEvent\fR
-adds an event to a queue in a specific thread.
+processing them.
.IP [3]
The event loop: in order to detect and process events, the application
enters a loop that waits for events to occur, places them on the event
@@ -403,11 +398,7 @@ the event source (using \fBTcl_Alloc\fR or the Tcl macro \fBckalloc\fR)
before calling \fBTcl_QueueEvent\fR, but it
will be freed by \fBTcl_ServiceEvent\fR, not by the event source.
.PP
-Threaded applications work in a
-similar manner, except that there is a separate event queue for
-each thread containing a Tcl interpreter.
-Calling \fBTcl_QueueEvent\fR in a multithreaded application adds
-an event to the current thread's queue.
+Calling \fBTcl_QueueEvent\fR adds an event to the current thread's queue.
To add an event to another thread's queue, use \fBTcl_ThreadQueueEvent\fR.
\fBTcl_ThreadQueueEvent\fR accepts as an argument a Tcl_ThreadId argument,
which uniquely identifies a thread in a Tcl application. To obtain the
@@ -498,8 +489,7 @@ under Unix it happens when \fBTcl_WaitForEvent\fR would have waited
forever because there were no active event sources and the timeout was
infinite.
.PP
-\fBTcl_AlertNotifier\fR is used in multithreaded applications to allow
-any thread to
+\fBTcl_AlertNotifier\fR is used to allow any thread to
.QW "wake up"
the notifier to alert it to new events on its
queue. \fBTcl_AlertNotifier\fR requires as an argument the notifier
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index 582ff4b..82851da 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -277,7 +277,7 @@ If an error occurs while opening the channel, \fBTcl_OpenCommandChannel\fR
returns NULL and records a POSIX error code that can be retrieved with
\fBTcl_GetErrno\fR.
In addition, \fBTcl_OpenCommandChannel\fR leaves an error message in
-the interpreter's result if \fIinterp\fR is not NULL.
+the interpreter's result. \fIinterp\fR cannot be NULL.
.PP
The newly created channel is not registered in the supplied interpreter; to
register it, use \fBTcl_RegisterChannel\fR, described below.
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index e011c27..12fc413 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -91,7 +91,7 @@ Points to the first byte of an array of UTF-8-encoded bytes
used to set or append to a string value.
This byte array may contain embedded null characters
unless \fInumChars\fR is negative. (Applications needing null bytes
-should represent them as the two-byte sequence \fI\e700\e600\fR, use
+should represent them as the two-byte sequence \fI\e300\e200\fR, use
\fBTcl_ExternalToUtf\fR to convert, or \fBTcl_NewByteArrayObj\fR if
the string is a collection of uninterpreted bytes.)
.AP int length in
diff --git a/doc/Utf.3 b/doc/Utf.3
index 111aae6..da2083f 100644
--- a/doc/Utf.3
+++ b/doc/Utf.3
@@ -75,7 +75,7 @@ int
.AS "const Tcl_UniChar" *uniPattern in/out
.AP char *buf out
Buffer in which the UTF-8 representation of the Tcl_UniChar is stored. At most
-\fBTCL_UTF_MAX\fR bytes are stored in the buffer.
+4 bytes are stored in the buffer.
.AP int ch in
The Unicode character to be converted or examined.
.AP Tcl_UniChar *chPtr out
@@ -113,7 +113,7 @@ If non-NULL, filled with the number of bytes in the backslash sequence,
including the backslash character.
.AP char *dst out
Buffer in which the bytes represented by the backslash sequence are stored.
-At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer.
+At most 4 bytes are stored in the buffer.
.AP int nocase in
Specifies whether the match should be done case-sensitive (0) or
case-insensitive (1).
@@ -148,8 +148,8 @@ a byte in the range 0x80 - 0x9F, \fBTcl_UtfToUniChar\fR assumes the
cp1252 encoding, stores the corresponding Tcl_UniChar in \fI*chPtr\fR
and returns 1. If the input is otherwise
not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first
-byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and
-0x00ff and return 1.
+byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x00A0 and
+0x00FF and return 1.
.PP
\fBTcl_UniCharToUtfDString\fR converts the given Unicode string
to UTF-8, storing the result in a previously initialized \fBTcl_DString\fR.
@@ -253,7 +253,7 @@ the return pointer points to the first character in the source string.
\fBTcl_UtfBackslash\fR is a utility procedure used by several of the Tcl
commands. It parses a backslash sequence and stores the properly formed
UTF-8 character represented by the backslash sequence in the output
-buffer \fIdst\fR. At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer.
+buffer \fIdst\fR. At most 4 bytes are stored in the buffer.
\fBTcl_UtfBackslash\fR modifies \fI*readPtr\fR to contain the number
of bytes in the backslash sequence, including the backslash character.
The return value is the number of bytes stored in the output buffer.
diff --git a/doc/cd.n b/doc/cd.n
index 8e19191..4cd4792 100644
--- a/doc/cd.n
+++ b/doc/cd.n
@@ -22,7 +22,7 @@ home directory (as specified in the HOME environment variable) if
Returns an empty string.
Note that the current working directory is a per-process resource; the
\fBcd\fR command changes the working directory for all interpreters
-and (in a threaded environment) all threads.
+and all threads.
.SH EXAMPLES
.PP
Change to the home directory of the user \fBfred\fR:
diff --git a/doc/source.n b/doc/source.n
index 3fc001e..353b8fb 100644
--- a/doc/source.n
+++ b/doc/source.n
@@ -43,7 +43,7 @@ or
which will be safely substituted by the Tcl interpreter into
.QW ^Z .
.PP
-A leading BOM (Byte order mark) contained in the file is ignored for unicode encodings (utf-8, unicode).
+A leading BOM (Byte order mark) contained in the file is ignored for unicode encodings (utf-8, utf-16, ucs-2).
.PP
The \fB\-encoding\fR option is used to specify the encoding of
the data stored in \fIfileName\fR. When the \fB\-encoding\fR option
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 49b024f..093cb95 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -512,7 +512,7 @@ freev(
struct vars *v,
int err)
{
- register int ret;
+ int ret;
if (v->re != NULL) {
rfree(v->re);
diff --git a/generic/regcustom.h b/generic/regcustom.h
index 095385d..4396399 100644
--- a/generic/regcustom.h
+++ b/generic/regcustom.h
@@ -131,7 +131,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */
#if 1
#define AllocVars(vPtr) \
static Tcl_ThreadDataKey varsKey; \
- register struct vars *vPtr = (struct vars *) \
+ struct vars *vPtr = (struct vars *) \
Tcl_GetThreadData(&varsKey, sizeof(struct vars))
#else
/*
@@ -140,7 +140,7 @@ typedef int celt; /* Type to hold chr, or NOCELT */
* faster in practice (measured!)
*/
#define AllocVars(vPtr) \
- register struct vars *vPtr = (struct vars *) MALLOC(sizeof(struct vars))
+ struct vars *vPtr = (struct vars *) MALLOC(sizeof(struct vars))
#define FreeVars(vPtr) \
FREE(vPtr)
#endif
diff --git a/generic/regex.h b/generic/regex.h
index 8845f72..f3159c6 100644
--- a/generic/regex.h
+++ b/generic/regex.h
@@ -151,8 +151,8 @@ typedef struct {
int re_csize; /* sizeof(character) */
char *re_endp; /* backward compatibility kludge */
/* the rest is opaque pointers to hidden innards */
- char *re_guts; /* `char *' is more portable than `void *' */
- char *re_fns;
+ void *re_guts;
+ void *re_fns;
} regex_t;
/* result reporting (may acquire more fields later) */
diff --git a/generic/regexec.c b/generic/regexec.c
index 1a3e114..24c4eac 100644
--- a/generic/regexec.c
+++ b/generic/regexec.c
@@ -91,7 +91,6 @@ struct smalldfa {
struct sset *outsarea[FEWSTATES*2 * FEWCOLORS];
struct arcp incarea[FEWSTATES*2 * FEWCOLORS];
};
-#define DOMALLOC ((struct smalldfa *)NULL) /* force malloc */
/*
* Internal variables, bundled for easy passing around.
@@ -299,7 +298,7 @@ getsubdfa(struct vars * v,
struct subre * t)
{
if (v->subdfas[t->id] == NULL) {
- v->subdfas[t->id] = newDFA(v, &t->cnfa, &v->g->cmap, DOMALLOC);
+ v->subdfas[t->id] = newDFA(v, &t->cnfa, &v->g->cmap, NULL);
if (ISERR())
return NULL;
}
diff --git a/generic/regguts.h b/generic/regguts.h
index b3dbaa4..da38ef2 100644
--- a/generic/regguts.h
+++ b/generic/regguts.h
@@ -411,7 +411,7 @@ struct guts {
#ifndef AllocVars
#define AllocVars(vPtr) \
struct vars var; \
- register struct vars *vPtr = &var
+ struct vars *vPtr = &var
#endif
#ifndef FreeVars
#define FreeVars(vPtr) ((void) 0)
diff --git a/generic/tcl.h b/generic/tcl.h
index 84267f4..2997dac 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -406,7 +406,7 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#if defined(_WIN32)
# ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;
-# elif defined(_WIN64)
+# elif defined(_WIN64) || defined(__MINGW_USE_VC2005_COMPAT) || defined(_USE_64BIT_TIME_T)
typedef struct __stat64 Tcl_StatBuf;
# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T)
typedef struct _stati64 Tcl_StatBuf;
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index bad3d8a..0c0ab7b 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -253,9 +253,9 @@ char *
TclpAlloc(
unsigned int numBytes) /* Number of bytes to allocate. */
{
- register union overhead *overPtr;
- register size_t bucket;
- register unsigned amount;
+ union overhead *overPtr;
+ size_t bucket;
+ unsigned amount;
struct block *bigBlockPtr = NULL;
if (!allocInit) {
@@ -304,7 +304,7 @@ TclpAlloc(
#endif
Tcl_MutexUnlock(allocMutexPtr);
- return (void *)(overPtr+1);
+ return (char *)(overPtr+1);
}
/*
@@ -387,8 +387,8 @@ static void
MoreCore(
size_t bucket) /* What bucket to allocate to. */
{
- register union overhead *overPtr;
- register size_t size; /* size of desired block */
+ union overhead *overPtr;
+ size_t size; /* size of desired block */
size_t amount; /* amount to allocate */
size_t numBlocks; /* how many blocks we get */
struct block *blockPtr;
@@ -448,8 +448,8 @@ void
TclpFree(
char *oldPtr) /* Pointer to memory to free. */
{
- register size_t size;
- register union overhead *overPtr;
+ size_t size;
+ union overhead *overPtr;
struct block *bigBlockPtr;
if (oldPtr == NULL) {
@@ -592,7 +592,7 @@ TclpRealloc(
}
if (expensive) {
- void *newPtr;
+ char *newPtr;
Tcl_MutexUnlock(allocMutexPtr);
@@ -645,8 +645,8 @@ void
mstats(
char *s) /* Where to write info. */
{
- register unsigned int i, j;
- register union overhead *overPtr;
+ unsigned int i, j;
+ union overhead *overPtr;
size_t totalFree = 0, totalUsed = 0;
Tcl_MutexLock(allocMutexPtr);
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index c70fb08..8e2edcf 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -506,7 +506,7 @@ static const TalInstDesc TalInstructionTable[] = {
{"variable", ASSEM_LVT4, INST_VARIABLE, 1, 0},
{"verifyDict", ASSEM_1BYTE, INST_DICT_VERIFY, 1, 0},
{"yield", ASSEM_1BYTE, INST_YIELD, 1, 1},
- {NULL, 0, 0, 0, 0}
+ {NULL, ASSEM_1BYTE, 0, 0, 0}
};
/*
@@ -853,7 +853,7 @@ CompileAssembleObj(
Interp *iPtr = (Interp *) interp;
/* Internals of the interpreter */
CompileEnv compEnv; /* Compilation environment structure */
- register ByteCode *codePtr = NULL;
+ ByteCode *codePtr = NULL;
/* Bytecode resulting from the assembly */
Namespace* namespacePtr; /* Namespace in which variable and command
* names in the bytecode resolve */
@@ -1155,9 +1155,9 @@ NewAssemblyEnv(
{
Tcl_Interp* interp = (Tcl_Interp*) envPtr->iPtr;
/* Tcl interpreter */
- AssemblyEnv* assemEnvPtr = TclStackAlloc(interp, sizeof(AssemblyEnv));
+ AssemblyEnv* assemEnvPtr = (AssemblyEnv*)TclStackAlloc(interp, sizeof(AssemblyEnv));
/* Assembler environment under construction */
- Tcl_Parse* parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse));
+ Tcl_Parse* parsePtr = (Tcl_Parse*)TclStackAlloc(interp, sizeof(Tcl_Parse));
/* Parse of one line of assembly code */
assemEnvPtr->envPtr = envPtr;
@@ -1546,7 +1546,7 @@ AssembleOneLine(
goto cleanup;
}
- jtPtr = ckalloc(sizeof(JumptableInfo));
+ jtPtr = (JumptableInfo*)ckalloc(sizeof(JumptableInfo));
Tcl_InitHashTable(&jtPtr->hashTable, TCL_STRING_KEYS);
assemEnvPtr->curr_bb->jumpLine = assemEnvPtr->cmdLine;
@@ -1945,7 +1945,7 @@ MoveExceptionRangesToBasicBlock(
curr_bb->foreignExceptionBase = savedExceptArrayNext;
curr_bb->foreignExceptionCount = exceptionCount;
curr_bb->foreignExceptions =
- ckalloc(exceptionCount * sizeof(ExceptionRange));
+ (ExceptionRange*)ckalloc(exceptionCount * sizeof(ExceptionRange));
memcpy(curr_bb->foreignExceptions,
envPtr->exceptArrayPtr + savedExceptArrayNext,
exceptionCount * sizeof(ExceptionRange));
@@ -2010,7 +2010,7 @@ CreateMirrorJumpTable(
* Allocate the jumptable.
*/
- jtPtr = ckalloc(sizeof(JumptableInfo));
+ jtPtr = (JumptableInfo*)ckalloc(sizeof(JumptableInfo));
jtHashPtr = &jtPtr->hashTable;
Tcl_InitHashTable(jtHashPtr, TCL_STRING_KEYS);
@@ -2070,7 +2070,7 @@ DeleteMirrorJumpTable(
for (entry = Tcl_FirstHashEntry(jtHashPtr, &search);
entry != NULL;
entry = Tcl_NextHashEntry(&search)) {
- label = Tcl_GetHashValue(entry);
+ label = (Tcl_Obj*)Tcl_GetHashValue(entry);
Tcl_DecrRefCount(label);
Tcl_SetHashValue(entry, NULL);
}
@@ -2658,7 +2658,7 @@ AllocBB(
AssemblyEnv* assemEnvPtr) /* Assembly environment */
{
CompileEnv* envPtr = assemEnvPtr->envPtr;
- BasicBlock *bb = ckalloc(sizeof(BasicBlock));
+ BasicBlock *bb = (BasicBlock*)ckalloc(sizeof(BasicBlock));
bb->originalStartOffset =
bb->startOffset = envPtr->codeNext - envPtr->codeStart;
@@ -2849,7 +2849,7 @@ CalculateJumpRelocations(
* target is out of range.
*/
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
if (bbPtr->flags & BB_JUMP1) {
offset = jumpTarget->startOffset
- (bbPtr->jumpOffset + motion);
@@ -2916,7 +2916,7 @@ CheckJumpTableLabels(
for (symEntryPtr = Tcl_FirstHashEntry(symHash, &search);
symEntryPtr != NULL;
symEntryPtr = Tcl_NextHashEntry(&search)) {
- symbolObj = Tcl_GetHashValue(symEntryPtr);
+ symbolObj = (Tcl_Obj*)Tcl_GetHashValue(symEntryPtr);
valEntryPtr = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(symbolObj));
DEBUG_PRINT(" %s -> %s (%d)\n",
@@ -3045,7 +3045,7 @@ FillInJumpOffsets(
if (bbPtr->jumpTarget != NULL) {
entry = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(bbPtr->jumpTarget));
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
fromOffset = bbPtr->jumpOffset;
targetOffset = jumpTarget->startOffset;
if (bbPtr->flags & BB_JUMP1) {
@@ -3104,7 +3104,7 @@ ResolveJumpTableTargets(
auxDataIndex = TclGetInt4AtPtr(envPtr->codeStart + bbPtr->jumpOffset + 1);
DEBUG_PRINT("bbPtr = %p jumpOffset = %d auxDataIndex = %d\n",
bbPtr, bbPtr->jumpOffset, auxDataIndex);
- realJumpTablePtr = TclFetchAuxData(envPtr, auxDataIndex);
+ realJumpTablePtr = (JumptableInfo*)TclFetchAuxData(envPtr, auxDataIndex);
realJumpHashPtr = &realJumpTablePtr->hashTable;
/*
@@ -3115,12 +3115,12 @@ ResolveJumpTableTargets(
for (symEntryPtr = Tcl_FirstHashEntry(symHash, &search);
symEntryPtr != NULL;
symEntryPtr = Tcl_NextHashEntry(&search)) {
- symbolObj = Tcl_GetHashValue(symEntryPtr);
+ symbolObj = (Tcl_Obj*)Tcl_GetHashValue(symEntryPtr);
DEBUG_PRINT(" symbol %s\n", TclGetString(symbolObj));
valEntryPtr = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(symbolObj));
- jumpTargetBBPtr = Tcl_GetHashValue(valEntryPtr);
+ jumpTargetBBPtr = (BasicBlock*)Tcl_GetHashValue(valEntryPtr);
realJumpEntryPtr = Tcl_CreateHashEntry(realJumpHashPtr,
Tcl_GetHashKey(symHash, symEntryPtr), &junk);
@@ -3499,7 +3499,7 @@ StackCheckBasicBlock(
if (result == TCL_OK && blockPtr->jumpTarget != NULL) {
entry = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(blockPtr->jumpTarget));
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
result = StackCheckBasicBlock(assemEnvPtr, jumpTarget, blockPtr,
stackDepth);
}
@@ -3513,10 +3513,10 @@ StackCheckBasicBlock(
&jtSearch);
result == TCL_OK && jtEntry != NULL;
jtEntry = Tcl_NextHashEntry(&jtSearch)) {
- targetLabel = Tcl_GetHashValue(jtEntry);
+ targetLabel = (Tcl_Obj*)Tcl_GetHashValue(jtEntry);
entry = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(targetLabel));
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
result = StackCheckBasicBlock(assemEnvPtr, jumpTarget,
blockPtr, stackDepth);
}
@@ -3821,7 +3821,7 @@ ProcessCatchesInBasicBlock(
if (result == TCL_OK && bbPtr->jumpTarget != NULL) {
entry = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(bbPtr->jumpTarget));
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
result = ProcessCatchesInBasicBlock(assemEnvPtr, jumpTarget,
jumpEnclosing, jumpState, catchDepth);
}
@@ -3834,10 +3834,10 @@ ProcessCatchesInBasicBlock(
for (jtEntry = Tcl_FirstHashEntry(&bbPtr->jtPtr->hashTable,&jtSearch);
result == TCL_OK && jtEntry != NULL;
jtEntry = Tcl_NextHashEntry(&jtSearch)) {
- targetLabel = Tcl_GetHashValue(jtEntry);
+ targetLabel = (Tcl_Obj*)Tcl_GetHashValue(jtEntry);
entry = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
TclGetString(targetLabel));
- jumpTarget = Tcl_GetHashValue(entry);
+ jumpTarget = (BasicBlock*)Tcl_GetHashValue(entry);
result = ProcessCatchesInBasicBlock(assemEnvPtr, jumpTarget,
jumpEnclosing, jumpState, catchDepth);
}
@@ -3936,8 +3936,8 @@ BuildExceptionRanges(
* Allocate memory for a stack of active catches.
*/
- catches = ckalloc(maxCatchDepth * sizeof(BasicBlock*));
- catchIndices = ckalloc(maxCatchDepth * sizeof(int));
+ catches = (BasicBlock**)ckalloc(maxCatchDepth * sizeof(BasicBlock*));
+ catchIndices = (int *)ckalloc(maxCatchDepth * sizeof(int));
for (i = 0; i < maxCatchDepth; ++i) {
catches[i] = NULL;
catchIndices[i] = -1;
@@ -4005,7 +4005,7 @@ UnstackExpiredCatches(
* corresponding to the catch contexts */
{
ExceptionRange* range; /* Exception range for a specific catch */
- BasicBlock* catch; /* Catch block being examined */
+ BasicBlock* block; /* Catch block being examined */
BasicBlockCatchState catchState;
/* State of the code relative to the catch
* block being examined ("in catch" or
@@ -4033,18 +4033,18 @@ UnstackExpiredCatches(
*/
catchState = bbPtr->catchState;
- catch = bbPtr->enclosingCatch;
+ block = bbPtr->enclosingCatch;
while (catchDepth > 0) {
--catchDepth;
if (catches[catchDepth] != NULL) {
- if (catches[catchDepth] != catch || catchState >= BBCS_CAUGHT) {
+ if (catches[catchDepth] != block || catchState >= BBCS_CAUGHT) {
range = envPtr->exceptArrayPtr + catchIndices[catchDepth];
range->numCodeBytes = bbPtr->startOffset - range->codeOffset;
catches[catchDepth] = NULL;
catchIndices[catchDepth] = -1;
}
- catchState = catch->catchState;
- catch = catch->enclosingCatch;
+ catchState = block->catchState;
+ block = block->enclosingCatch;
}
}
}
@@ -4073,19 +4073,19 @@ LookForFreshCatches(
BasicBlockCatchState catchState;
/* State ("in catch" or "caught") of the
* current catch. */
- BasicBlock* catch; /* Current enclosing catch */
+ BasicBlock* block; /* Current enclosing catch */
int catchDepth; /* Nesting depth of the current catch */
catchState = bbPtr->catchState;
- catch = bbPtr->enclosingCatch;
+ block = bbPtr->enclosingCatch;
catchDepth = bbPtr->catchDepth;
while (catchDepth > 0) {
--catchDepth;
- if (catches[catchDepth] != catch && catchState < BBCS_CAUGHT) {
- catches[catchDepth] = catch;
+ if (catches[catchDepth] != block && catchState < BBCS_CAUGHT) {
+ catches[catchDepth] = block;
}
- catchState = catch->catchState;
- catch = catch->enclosingCatch;
+ catchState = block->catchState;
+ block = block->enclosingCatch;
}
}
@@ -4113,7 +4113,7 @@ StackFreshCatches(
CompileEnv* envPtr = assemEnvPtr->envPtr;
/* Compilation environment */
ExceptionRange* range; /* Exception range for a specific catch */
- BasicBlock* catch; /* Catch block being examined */
+ BasicBlock* block; /* Catch block being examined */
BasicBlock* errorExit; /* Error exit from the catch block */
Tcl_HashEntry* entryPtr;
@@ -4130,7 +4130,7 @@ StackFreshCatches(
* Create an exception range for a block that needs one.
*/
- catch = catches[catchDepth];
+ block = catches[catchDepth];
catchIndices[catchDepth] =
TclCreateExceptRange(CATCH_EXCEPTION_RANGE, envPtr);
range = envPtr->exceptArrayPtr + catchIndices[catchDepth];
@@ -4140,13 +4140,13 @@ StackFreshCatches(
range->codeOffset = bbPtr->startOffset;
entryPtr = Tcl_FindHashEntry(&assemEnvPtr->labelHash,
- TclGetString(catch->jumpTarget));
+ TclGetString(block->jumpTarget));
if (entryPtr == NULL) {
Tcl_Panic("undefined label in tclAssembly.c:"
"BuildExceptionRanges, can't happen");
}
- errorExit = Tcl_GetHashValue(entryPtr);
+ errorExit = (BasicBlock*)Tcl_GetHashValue(entryPtr);
range->catchOffset = errorExit->startOffset;
}
}
diff --git a/generic/tclAsync.c b/generic/tclAsync.c
index 14804e4..c432e4f 100644
--- a/generic/tclAsync.c
+++ b/generic/tclAsync.c
@@ -118,7 +118,7 @@ Tcl_AsyncCreate(
AsyncHandler *asyncPtr;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- asyncPtr = ckalloc(sizeof(AsyncHandler));
+ asyncPtr = (AsyncHandler*)ckalloc(sizeof(AsyncHandler));
asyncPtr->ready = 0;
asyncPtr->nextPtr = NULL;
asyncPtr->proc = proc;
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 09c785e..aea77e4 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -33,20 +33,33 @@
*/
#ifndef TCL_FPCLASSIFY_MODE
+#if defined(__MINGW32__) && defined(_X86_) /* mingw 32-bit */
/*
* MINGW x86 (tested up to gcc 8.1) seems to have a bug in fpclassify,
- * [fpclassify 1e-314], x86 => normal, x64 => subnormal, so switch to _fpclass
+ * [fpclassify 1e-314], x86 => normal, x64 => subnormal, so switch to using a
+ * version using a compiler built-in.
*/
-# if ( defined(__MINGW32__) && defined(_X86_) ) /* mingw 32-bit */
-# define TCL_FPCLASSIFY_MODE 1
-# elif defined(fpclassify) /* fpclassify */
-# include <float.h>
-# define TCL_FPCLASSIFY_MODE 0
-# elif defined(_FPCLASS_NN) /* _fpclass */
-# define TCL_FPCLASSIFY_MODE 1
-# else /* !fpclassify && !_fpclass (older MSVC), simulate */
-# define TCL_FPCLASSIFY_MODE 2
-# endif /* !fpclassify */
+#define TCL_FPCLASSIFY_MODE 1
+#elif defined(fpclassify) /* fpclassify */
+/*
+ * This is the C99 standard.
+ */
+#include <float.h>
+#define TCL_FPCLASSIFY_MODE 0
+#elif defined(_FPCLASS_NN) /* _fpclass */
+/*
+ * This case handles newer MSVC on Windows, which doesn't have the standard
+ * operation but does have something that can tell us the same thing.
+ */
+#define TCL_FPCLASSIFY_MODE 1
+#else /* !fpclassify && !_fpclass (older MSVC), simulate */
+/*
+ * Older MSVC on Windows. So broken that we just have to do it our way. This
+ * assumes that we're on x86 (or at least a system with classic little-endian
+ * double layout and a 32-bit 'int' type).
+ */
+#define TCL_FPCLASSIFY_MODE 2
+#endif /* !fpclassify */
/* actually there is no fallback to builtin fpclassify */
#endif /* !TCL_FPCLASSIFY_MODE */
@@ -644,7 +657,15 @@ Tcl_CreateInterp(void)
Tcl_Panic("Tcl_CallFrame must not be smaller than CallFrame");
}
-#if defined(_WIN32) && !defined(_WIN64)
+#if defined(_WIN32) && !defined(_WIN64) && !defined(_USE_64BIT_TIME_T) \
+ && !defined(__MINGW_USE_VC2005_COMPAT)
+ /* If Tcl is compiled on Win32 using -D_USE_64BIT_TIME_T or
+ * -D__MINGW_USE_VC2005_COMPAT, the result is a binary incompatible
+ * with the 'standard' build of Tcl: All extensions using Tcl_StatBuf
+ * or interal functions like TclpGetDate() need to be recompiled in
+ * the same way. Therefore, this is not officially supported.
+ * In stead, it is recommended to use Win64 or Tcl 9.0 (not released yet)
+ */
if (sizeof(time_t) != 4) {
/*NOTREACHED*/
Tcl_Panic("<time.h> is not compatible with MSVC");
@@ -1284,8 +1305,8 @@ int
TclHideUnsafeCommands(
Tcl_Interp *interp) /* Hide commands in this interpreter. */
{
- register const CmdInfo *cmdInfoPtr;
- register const UnsafeEnsembleInfo *unsafePtr;
+ const CmdInfo *cmdInfoPtr;
+ const UnsafeEnsembleInfo *unsafePtr;
if (interp == NULL) {
return TCL_ERROR;
@@ -2622,7 +2643,7 @@ TclCreateObjCommandInNs(
Tcl_Interp *interp,
const char *cmdName, /* Name of command, without any namespace
* components. */
- Tcl_Namespace *namespace, /* The namespace to create the command in */
+ Tcl_Namespace *namesp, /* The namespace to create the command in */
Tcl_ObjCmdProc *proc, /* Object-based function to associate with
* name. */
ClientData clientData, /* Arbitrary value to pass to object
@@ -2636,7 +2657,7 @@ TclCreateObjCommandInNs(
ImportRef *oldRefPtr = NULL;
ImportedCmdData *dataPtr;
Tcl_HashEntry *hPtr;
- Namespace *nsPtr = (Namespace *) namespace;
+ Namespace *nsPtr = (Namespace *) namesp;
/*
* If the command name we seek to create already exists, we need to delete
@@ -2811,7 +2832,7 @@ int
TclInvokeStringCommand(
ClientData clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
- register int objc, /* Number of arguments. */
+ int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Command *cmdPtr = clientData;
@@ -2860,7 +2881,7 @@ TclInvokeObjectCommand(
ClientData clientData, /* Points to command's Command structure. */
Tcl_Interp *interp, /* Current interpreter. */
int argc, /* Number of arguments. */
- register const char **argv) /* Argument strings. */
+ const char **argv) /* Argument strings. */
{
Command *cmdPtr = clientData;
Tcl_Obj *objPtr;
@@ -3351,7 +3372,7 @@ Tcl_GetCommandFullName(
{
Interp *iPtr = (Interp *) interp;
- register Command *cmdPtr = (Command *) command;
+ Command *cmdPtr = (Command *) command;
char *name;
/*
@@ -3635,7 +3656,7 @@ CallCommandTraces(
* trigger, either TCL_TRACE_DELETE or
* TCL_TRACE_RENAME. */
{
- register CommandTrace *tracePtr;
+ CommandTrace *tracePtr;
ActiveCommandTrace active;
char *result;
Tcl_Obj *oldNamePtr = NULL;
@@ -3825,7 +3846,7 @@ CancelEvalProc(
void
TclCleanupCommand(
- register Command *cmdPtr) /* Points to the Command structure to
+ Command *cmdPtr) /* Points to the Command structure to
* be freed. */
{
if (cmdPtr->refCount-- <= 1) {
@@ -4216,7 +4237,7 @@ int
TclInterpReady(
Tcl_Interp *interp)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
/*
* Reset both the interpreter's string and object results and clear out
@@ -4288,7 +4309,7 @@ TclResetCancellation(
Tcl_Interp *interp,
int force)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
if (iPtr == NULL) {
return TCL_ERROR;
@@ -4330,7 +4351,7 @@ Tcl_Canceled(
Tcl_Interp *interp,
int flags)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
/*
* Has the current script in progress for this interpreter been canceled
@@ -5851,7 +5872,7 @@ TclAdvanceLines(
const char *start,
const char *end)
{
- register const char *p;
+ const char *p;
for (p = start; p < end; p++) {
if (*p == '\n') {
@@ -5946,7 +5967,7 @@ TclArgumentEnter(
CmdFrame *cfPtr)
{
Interp *iPtr = (Interp *) interp;
- int new, i;
+ int isNew, i;
Tcl_HashEntry *hPtr;
CFWord *cfwPtr;
@@ -5962,8 +5983,8 @@ TclArgumentEnter(
if (cfPtr->line[i] < 0) {
continue;
}
- hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, objv[i], &new);
- if (new) {
+ hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, objv[i], &isNew);
+ if (isNew) {
/*
* The word is not on the stack yet, remember the current location
* and initialize references.
@@ -6377,7 +6398,7 @@ int
Tcl_EvalObjEx(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* a previous call to Tcl_CreateInterp). */
- register Tcl_Obj *objPtr, /* Pointer to object containing commands to
+ Tcl_Obj *objPtr, /* Pointer to object containing commands to
* execute. */
int flags) /* Collection of OR-ed bits that control the
* evaluation of the script. Supported values
@@ -6390,7 +6411,7 @@ int
TclEvalObjEx(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* a previous call to Tcl_CreateInterp). */
- register Tcl_Obj *objPtr, /* Pointer to object containing commands to
+ Tcl_Obj *objPtr, /* Pointer to object containing commands to
* execute. */
int flags, /* Collection of OR-ed bits that control the
* evaluation of the script. Supported values
@@ -6409,7 +6430,7 @@ int
TclNREvalObjEx(
Tcl_Interp *interp, /* Token for command interpreter (returned by
* a previous call to Tcl_CreateInterp). */
- register Tcl_Obj *objPtr, /* Pointer to object containing commands to
+ Tcl_Obj *objPtr, /* Pointer to object containing commands to
* execute. */
int flags, /* Collection of OR-ed bits that control the
* evaluation of the script. Supported values
@@ -6717,7 +6738,7 @@ Tcl_ExprLong(
const char *exprstring, /* Expression to evaluate. */
long *ptr) /* Where to store result. */
{
- register Tcl_Obj *exprPtr;
+ Tcl_Obj *exprPtr;
int result = TCL_OK;
if (*exprstring == '\0') {
/*
@@ -6744,7 +6765,7 @@ Tcl_ExprDouble(
const char *exprstring, /* Expression to evaluate. */
double *ptr) /* Where to store result. */
{
- register Tcl_Obj *exprPtr;
+ Tcl_Obj *exprPtr;
int result = TCL_OK;
if (*exprstring == '\0') {
@@ -6824,7 +6845,7 @@ int
Tcl_ExprLongObj(
Tcl_Interp *interp, /* Context in which to evaluate the
* expression. */
- register Tcl_Obj *objPtr, /* Expression to evaluate. */
+ Tcl_Obj *objPtr, /* Expression to evaluate. */
long *ptr) /* Where to store long result. */
{
Tcl_Obj *resultPtr;
@@ -6871,7 +6892,7 @@ int
Tcl_ExprDoubleObj(
Tcl_Interp *interp, /* Context in which to evaluate the
* expression. */
- register Tcl_Obj *objPtr, /* Expression to evaluate. */
+ Tcl_Obj *objPtr, /* Expression to evaluate. */
double *ptr) /* Where to store double result. */
{
Tcl_Obj *resultPtr;
@@ -6907,7 +6928,7 @@ int
Tcl_ExprBooleanObj(
Tcl_Interp *interp, /* Context in which to evaluate the
* expression. */
- register Tcl_Obj *objPtr, /* Expression to evaluate. */
+ Tcl_Obj *objPtr, /* Expression to evaluate. */
int *ptr) /* Where to store 0/1 result. */
{
Tcl_Obj *resultPtr;
@@ -7019,7 +7040,7 @@ TclNRInvoke(
int objc,
Tcl_Obj *const objv[])
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
Tcl_HashTable *hTblPtr; /* Table of hidden commands. */
const char *cmdName; /* Name of the command from objv[0]. */
Tcl_HashEntry *hPtr = NULL;
@@ -7214,7 +7235,7 @@ Tcl_AddObjErrorInfo(
int length) /* The number of bytes in the message. If < 0,
* then append all bytes up to a NULL byte. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
/*
* If we are just starting to log an error, errorInfo is initialized from
@@ -7364,7 +7385,7 @@ Tcl_GlobalEval(
* command. */
const char *command) /* Command to evaluate. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int result;
CallFrame *savedVarFramePtr;
@@ -8366,22 +8387,23 @@ ClassifyDouble(
{
#if TCL_FPCLASSIFY_MODE == 0
return fpclassify(d);
-#else /* !fpclassify */
+#else /* TCL_FPCLASSIFY_MODE != 0 */
/*
* If we don't have fpclassify(), we also don't have the values it returns.
* Hence we define those here.
*/
-# ifndef FP_NAN
+#ifndef FP_NAN
# define FP_NAN 1 /* Value is NaN */
# define FP_INFINITE 2 /* Value is an infinity */
# define FP_ZERO 3 /* Value is a zero */
# define FP_NORMAL 4 /* Value is a normal float */
# define FP_SUBNORMAL 5 /* Value has lost accuracy */
-#endif
+#endif /* !FP_NAN */
-# if TCL_FPCLASSIFY_MODE == 3
- return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, d);
-# elif TCL_FPCLASSIFY_MODE == 2
+#if TCL_FPCLASSIFY_MODE == 3
+ return __builtin_fpclassify(
+ FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, d);
+#elif TCL_FPCLASSIFY_MODE == 2
/*
* We assume this hack is only needed on little-endian systems.
* Specifically, x86 running Windows. It's fairly easy to enable for
@@ -8408,9 +8430,9 @@ ClassifyDouble(
* Shifts and masks to use with the doubleMeaning variable above.
*/
-# define EXPONENT_MASK 0x7ff /* 11 bits (after shifting) */
-# define EXPONENT_SHIFT 20 /* Moves exponent to bottom of word */
-# define MANTISSA_MASK 0xfffff /* 20 bits (plus 32 from other word) */
+#define EXPONENT_MASK 0x7ff /* 11 bits (after shifting) */
+#define EXPONENT_SHIFT 20 /* Moves exponent to bottom of word */
+#define MANTISSA_MASK 0xfffff /* 20 bits (plus 32 from other word) */
/*
* Extract the exponent (11 bits) and mantissa (52 bits). Note that we
@@ -8447,7 +8469,7 @@ ClassifyDouble(
return FP_NORMAL;
}
-# elif TCL_FPCLASSIFY_MODE == 1
+#elif TCL_FPCLASSIFY_MODE == 1
switch (_fpclass(d)) {
case _FPCLASS_NZ:
case _FPCLASS_PZ:
@@ -8467,9 +8489,9 @@ ClassifyDouble(
case _FPCLASS_SNAN:
return FP_NAN;
}
-# else /* unknown TCL_FPCLASSIFY_MODE */
-# error "unknown or unexpected TCL_FPCLASSIFY_MODE"
-# endif /* TCL_FPCLASSIFY_MODE */
+#else /* TCL_FPCLASSIFY_MODE not in (0..3) */
+#error "unknown or unexpected TCL_FPCLASSIFY_MODE"
+#endif /* TCL_FPCLASSIFY_MODE */
#endif /* !fpclassify */
}
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index d8b9ae9..027c157 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -2288,8 +2288,8 @@ ScanNumber(
if (*numberCachePtrPtr == NULL) {
return Tcl_NewWideIntObj(value);
} else {
- register Tcl_HashTable *tablePtr = *numberCachePtrPtr;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashTable *tablePtr = *numberCachePtrPtr;
+ Tcl_HashEntry *hPtr;
int isNew;
hPtr = Tcl_CreateHashEntry(tablePtr, INT2PTR(value), &isNew);
@@ -2297,7 +2297,7 @@ ScanNumber(
return Tcl_GetHashValue(hPtr);
}
if (tablePtr->numEntries <= BINARY_SCAN_MAX_CACHE) {
- register Tcl_Obj *objPtr = Tcl_NewWideIntObj(value);
+ Tcl_Obj *objPtr = Tcl_NewWideIntObj(value);
Tcl_IncrRefCount(objPtr);
Tcl_SetHashValue(hPtr, objPtr);
@@ -2416,7 +2416,7 @@ DeleteScanNumberCache(
hEntry = Tcl_FirstHashEntry(numberCachePtr, &search);
while (hEntry != NULL) {
- register Tcl_Obj *value = Tcl_GetHashValue(hEntry);
+ Tcl_Obj *value = Tcl_GetHashValue(hEntry);
if (value != NULL) {
Tcl_DecrRefCount(value);
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index dd98ef3..c895817 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -15,7 +15,6 @@
#ifdef _WIN32
# include "tclWinInt.h"
#endif
-#include <locale.h>
/*
* The state structure used by [foreach]. Note that the actual structure has
@@ -169,7 +168,7 @@ Tcl_CaseObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register int i;
+ int i;
int body, result, caseObjc;
const char *stringPtr, *arg;
Tcl_Obj *const *caseObjv;
@@ -872,7 +871,7 @@ TclNREvalObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
Interp *iPtr = (Interp *) interp;
CmdFrame *invoker = NULL;
int word = 0;
@@ -1139,7 +1138,7 @@ FileAttrAccessTimeCmd(
}
#if defined(_WIN32)
/* We use a value of 0 to indicate the access time not available */
- if (buf.st_atime == 0) {
+ if (Tcl_GetAccessTimeFromStat(&buf) == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"could not get access time for file \"%s\"",
TclGetString(objv[1])));
@@ -1160,7 +1159,7 @@ FileAttrAccessTimeCmd(
}
tval.actime = newTime;
- tval.modtime = buf.st_mtime;
+ tval.modtime = Tcl_GetModificationTimeFromStat(&buf);
if (Tcl_FSUtime(objv[1], &tval) != 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -1180,7 +1179,7 @@ FileAttrAccessTimeCmd(
}
}
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj((long) buf.st_atime));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(&buf)));
return TCL_OK;
}
@@ -1221,7 +1220,7 @@ FileAttrModifyTimeCmd(
}
#if defined(_WIN32)
/* We use a value of 0 to indicate the modification time not available */
- if (buf.st_mtime == 0) {
+ if (Tcl_GetModificationTimeFromStat(&buf) == 0) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"could not get modification time for file \"%s\"",
TclGetString(objv[1])));
@@ -1240,7 +1239,7 @@ FileAttrModifyTimeCmd(
return TCL_ERROR;
}
- tval.actime = buf.st_atime;
+ tval.actime = Tcl_GetAccessTimeFromStat(&buf);
tval.modtime = newTime;
if (Tcl_FSUtime(objv[1], &tval) != 0) {
@@ -1260,7 +1259,7 @@ FileAttrModifyTimeCmd(
}
}
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj((long) buf.st_mtime));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(&buf)));
return TCL_OK;
}
@@ -2254,7 +2253,7 @@ StoreStatData(
* store in varName. */
{
Tcl_Obj *field, *value;
- register unsigned short mode;
+ unsigned short mode;
/*
* Assume Tcl_ObjSetVar2() does not keep a copy of the field name!
@@ -2291,9 +2290,9 @@ StoreStatData(
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
STORE_ARY("blksize", Tcl_NewWideIntObj((long)statPtr->st_blksize));
#endif
- STORE_ARY("atime", Tcl_NewWideIntObj((long)statPtr->st_atime));
- STORE_ARY("mtime", Tcl_NewWideIntObj((long)statPtr->st_mtime));
- STORE_ARY("ctime", Tcl_NewWideIntObj((long)statPtr->st_ctime));
+ STORE_ARY("atime", Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(statPtr)));
+ STORE_ARY("mtime", Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(statPtr)));
+ STORE_ARY("ctime", Tcl_NewWideIntObj(Tcl_GetChangeTimeFromStat(statPtr)));
mode = (unsigned short) statPtr->st_mode;
STORE_ARY("mode", Tcl_NewWideIntObj(mode));
STORE_ARY("type", Tcl_NewStringObj(GetTypeFromMode(mode), -1));
@@ -2631,7 +2630,7 @@ EachloopCmd(
Tcl_Obj *const objv[])
{
int numLists = (objc-2) / 2;
- register struct ForeachState *statePtr;
+ struct ForeachState *statePtr;
int i, j, result;
if (objc < 4 || (objc%2 != 0)) {
@@ -2756,7 +2755,7 @@ ForeachLoopStep(
Tcl_Interp *interp,
int result)
{
- register struct ForeachState *statePtr = data[0];
+ struct ForeachState *statePtr = data[0];
/*
* Process the result code from this run of the [foreach] body. Note that
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index c11534e..9d4bbf3 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -475,7 +475,7 @@ InfoArgsCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
const char *name;
Proc *procPtr;
CompiledLocal *localPtr;
@@ -538,7 +538,7 @@ InfoBodyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
const char *name, *bytes;
Proc *procPtr;
int numBytes;
@@ -643,7 +643,7 @@ InfoCommandsCmd(
{
const char *cmdName, *pattern;
const char *simplePattern;
- register Tcl_HashEntry *entryPtr;
+ Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
Namespace *nsPtr;
Namespace *globalNsPtr = (Namespace *) Tcl_GetGlobalNamespace(interp);
@@ -1843,7 +1843,7 @@ InfoProcsCmd(
Namespace *currNsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp);
Tcl_Obj *listPtr, *elemObjPtr;
int specificNsInPattern = 0;/* Init. to avoid compiler warning. */
- register Tcl_HashEntry *entryPtr;
+ Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
Command *cmdPtr, *realCmdPtr;
@@ -1958,7 +1958,7 @@ InfoProcsCmd(
/*
* If "info procs" worked like "info commands", returning the commands
* also seen in the global namespace, then you would include this
- * code. As this could break backwards compatibilty with 8.0-8.2, we
+ * code. As this could break backwards compatibility with 8.0-8.2, we
* decided not to "fix" it in 8.3, leaving the behavior slightly
* different.
*/
@@ -2415,7 +2415,7 @@ int
Tcl_LinsertObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- register int objc, /* Number of arguments. */
+ int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *listPtr;
@@ -2497,8 +2497,8 @@ int
Tcl_ListObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- register int objc, /* Number of arguments. */
- register Tcl_Obj *const objv[])
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[])
/* The argument objects. */
{
/*
@@ -2534,7 +2534,7 @@ Tcl_LlengthObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- register Tcl_Obj *const objv[])
+ Tcl_Obj *const objv[])
/* Argument objects. */
{
int listLen, result;
@@ -2580,7 +2580,7 @@ Tcl_LpopObjCmd(
ClientData notUsed, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- register Tcl_Obj *const objv[])
+ Tcl_Obj *const objv[])
/* Argument objects. */
{
int listLen, result;
@@ -2673,7 +2673,7 @@ Tcl_LrangeObjCmd(
ClientData notUsed, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
- register Tcl_Obj *const objv[])
+ Tcl_Obj *const objv[])
/* Argument objects. */
{
int listLen, first, last, result;
@@ -2859,8 +2859,8 @@ int
Tcl_LrepeatObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- register int objc, /* Number of arguments. */
- register Tcl_Obj *const objv[])
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[])
/* The argument objects. */
{
int elementCount, i, totalElems;
@@ -2925,7 +2925,7 @@ Tcl_LrepeatObjCmd(
CLANG_ASSERT(dataArray || totalElems == 0 );
if (objc == 1) {
- register Tcl_Obj *tmpPtr = objv[0];
+ Tcl_Obj *tmpPtr = objv[0];
tmpPtr->refCount += elementCount;
for (i=0 ; i<elementCount ; i++) {
@@ -2971,7 +2971,7 @@ Tcl_LreplaceObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tcl_Obj *listPtr;
+ Tcl_Obj *listPtr;
int first, last, listLen, numToDelete, result;
if (objc < 4) {
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index cdc1e28..c413780 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1662,7 +1662,7 @@ StringIsCmd(
const char *elemStart, *nextElem;
int lenRemain, elemSize;
- register const char *p;
+ const char *p;
string1 = TclGetStringFromObj(objPtr, &length1);
end = string1 + length1;
@@ -1842,7 +1842,7 @@ StringIsCmd(
const char *elemStart, *nextElem;
int lenRemain, elemSize;
- register const char *p;
+ const char *p;
string1 = TclGetStringFromObj(objPtr, &length1);
end = string1 + length1;
@@ -4060,9 +4060,9 @@ Tcl_TimeObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
Tcl_Obj *objs[4];
- register int i, result;
+ int i, result;
int count;
double totalMicroSec;
#ifndef TCL_WIDE_CLICKS
@@ -4161,8 +4161,8 @@ Tcl_TimeRateObjCmd(
static double measureOverhead = 0;
/* global measure-overhead */
double overhead = -1; /* given measure-overhead */
- register Tcl_Obj *objPtr;
- register int result, i;
+ Tcl_Obj *objPtr;
+ int result, i;
Tcl_Obj *calibrate = NULL, *direct = NULL;
TclWideMUInt count = 0; /* Holds repetition count */
Tcl_WideInt maxms = WIDE_MIN;
@@ -4176,7 +4176,7 @@ Tcl_TimeRateObjCmd(
* zero (i.e., never < 1) */
unsigned short factor = 50; /* Factor (4..50) limiting threshold to avoid
* growth of execution time. */
- register Tcl_WideInt start, middle, stop;
+ Tcl_WideInt start, middle, stop;
#ifndef TCL_WIDE_CLICKS
Tcl_Time now;
#endif /* !TCL_WIDE_CLICKS */
@@ -4188,7 +4188,6 @@ Tcl_TimeRateObjCmd(
};
NRE_callback *rootPtr;
ByteCode *codePtr = NULL;
- int codeOptimized = 0;
for (i = 1; i < objc - 1; i++) {
int index;
@@ -4373,15 +4372,6 @@ Tcl_TimeRateObjCmd(
}
codePtr = TclCompileObj(interp, objPtr, NULL, 0);
TclPreserveByteCode(codePtr);
- /*
- * Replace last compiled done instruction with continue: it's a part of
- * iteration, this way evaluation will be more similar to a cycle (also
- * avoids extra overhead to set result to interp, etc.)
- */
- if (codePtr->codeStart[codePtr->numCodeBytes-1] == INST_DONE) {
- codePtr->codeStart[codePtr->numCodeBytes-1] = INST_CONTINUE;
- codeOptimized = 1;
- }
}
/*
@@ -4423,6 +4413,12 @@ Tcl_TimeRateObjCmd(
count++;
if (!direct) { /* precompiled */
rootPtr = TOP_CB(interp);
+ /*
+ * Use loop optimized TEBC call (TCL_EVAL_DISCARD_RESULT): it's a part of
+ * iteration, this way evaluation will be more similar to a cycle (also
+ * avoids extra overhead to set result to interp, etc.)
+ */
+ ((Interp *)interp)->evalFlags |= TCL_EVAL_DISCARD_RESULT;
result = TclNRExecuteByteCode(interp, codePtr);
result = TclNRRunCallbacks(interp, result, rootPtr);
} else { /* eval */
@@ -4675,11 +4671,6 @@ Tcl_TimeRateObjCmd(
done:
if (codePtr != NULL) {
- if ( codeOptimized
- && codePtr->codeStart[codePtr->numCodeBytes-1] == INST_CONTINUE
- ) {
- codePtr->codeStart[codePtr->numCodeBytes-1] = INST_DONE;
- }
TclReleaseByteCode(codePtr);
}
return result;
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 4844dd8..8c6050d 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -2912,9 +2912,9 @@ DupForeachInfo(
ClientData clientData) /* The foreach command's compilation auxiliary
* data to duplicate. */
{
- register ForeachInfo *srcPtr = clientData;
+ ForeachInfo *srcPtr = clientData;
ForeachInfo *dupPtr;
- register ForeachVarList *srcListPtr, *dupListPtr;
+ ForeachVarList *srcListPtr, *dupListPtr;
int numVars, i, j, numLists = srcPtr->numLists;
dupPtr = ckalloc(sizeof(ForeachInfo)
@@ -2961,10 +2961,10 @@ FreeForeachInfo(
ClientData clientData) /* The foreach command's compilation auxiliary
* data to free. */
{
- register ForeachInfo *infoPtr = clientData;
- register ForeachVarList *listPtr;
+ ForeachInfo *infoPtr = clientData;
+ ForeachVarList *listPtr;
int numLists = infoPtr->numLists;
- register int i;
+ int i;
for (i = 0; i < numLists; i++) {
listPtr = infoPtr->varLists[i];
@@ -2997,8 +2997,8 @@ PrintForeachInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register ForeachInfo *infoPtr = clientData;
- register ForeachVarList *varsPtr;
+ ForeachInfo *infoPtr = clientData;
+ ForeachVarList *varsPtr;
int i, j;
Tcl_AppendToObj(appendObj, "data=[", -1);
@@ -3037,8 +3037,8 @@ PrintNewForeachInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register ForeachInfo *infoPtr = clientData;
- register ForeachVarList *varsPtr;
+ ForeachInfo *infoPtr = clientData;
+ ForeachVarList *varsPtr;
int i, j;
Tcl_AppendPrintfToObj(appendObj, "jumpOffset=%+d, vars=",
@@ -3067,8 +3067,8 @@ DisassembleForeachInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register ForeachInfo *infoPtr = clientData;
- register ForeachVarList *varsPtr;
+ ForeachInfo *infoPtr = clientData;
+ ForeachVarList *varsPtr;
int i, j;
Tcl_Obj *objPtr, *innerPtr;
@@ -3114,8 +3114,8 @@ DisassembleNewForeachInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register ForeachInfo *infoPtr = clientData;
- register ForeachVarList *varsPtr;
+ ForeachInfo *infoPtr = clientData;
+ ForeachVarList *varsPtr;
int i, j;
Tcl_Obj *objPtr, *innerPtr;
@@ -3174,7 +3174,7 @@ TclCompileFormatCmd(
DefineLineInformation; /* TIP #280 */
Tcl_Token *tokenPtr = parsePtr->tokenPtr;
Tcl_Obj **objv, *formatObj, *tmpObj;
- char *bytes, *start;
+ const char *bytes, *start;
int i, j, len;
/*
@@ -3301,7 +3301,7 @@ TclCompileFormatCmd(
if (*++bytes == '%') {
Tcl_AppendToObj(tmpObj, "%", 1);
} else {
- char *b = TclGetStringFromObj(tmpObj, &len);
+ const char *b = TclGetStringFromObj(tmpObj, &len);
/*
* If there is a non-empty literal from the format string,
@@ -3439,9 +3439,9 @@ TclPushVarName(
int *localIndexPtr, /* Must not be NULL. */
int *isScalarPtr) /* Must not be NULL. */
{
- register const char *p;
+ const char *p;
const char *last, *name, *elName;
- register int n;
+ int n;
Tcl_Token *elemTokenPtr = NULL;
int nameLen, elNameLen, simpleVarName, localIndex;
int elemTokenCount = 0, allocedTokens = 0, removedParen = 0;
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index a8a85f8..3c8a156 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -589,7 +589,7 @@ TclCompileInfoCommandsCmd(
DefineLineInformation; /* TIP #280 */
Tcl_Token *tokenPtr;
Tcl_Obj *objPtr;
- char *bytes;
+ const char *bytes;
/*
* We require one compile-time known argument for the case we can compile.
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index da45cb3..db51890 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -925,7 +925,7 @@ TclCompileStringMapCmd(
DefineLineInformation; /* TIP #280 */
Tcl_Token *mapTokenPtr, *stringTokenPtr;
Tcl_Obj *mapObj, **objv;
- char *bytes;
+ const char *bytes;
int len;
/*
@@ -1862,8 +1862,8 @@ TclCompileSwitchCmd(
*/
for (; numWords>=3 ; tokenPtr=TokenAfter(tokenPtr),numWords--) {
- register unsigned size = tokenPtr[1].size;
- register const char *chrs = tokenPtr[1].start;
+ unsigned size = tokenPtr[1].size;
+ const char *chrs = tokenPtr[1].start;
/*
* We only process literal options, and we assume that -e, -g and -n
@@ -2602,7 +2602,7 @@ PrintJumptableInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register JumptableInfo *jtPtr = clientData;
+ JumptableInfo *jtPtr = clientData;
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
const char *keyPtr;
@@ -2631,7 +2631,7 @@ DisassembleJumptableInfo(
ByteCode *codePtr,
unsigned int pcOffset)
{
- register JumptableInfo *jtPtr = clientData;
+ JumptableInfo *jtPtr = clientData;
Tcl_Obj *mapping = Tcl_NewObj();
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index c10e3ee..8a13eba 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -990,7 +990,7 @@ DupByteCodeInternalRep(
static void
FreeByteCodeInternalRep(
- register Tcl_Obj *objPtr) /* Object whose internal rep to free. */
+ Tcl_Obj *objPtr) /* Object whose internal rep to free. */
{
ByteCode *codePtr;
@@ -1021,14 +1021,14 @@ FreeByteCodeInternalRep(
void
TclPreserveByteCode(
- register ByteCode *codePtr)
+ ByteCode *codePtr)
{
codePtr->refCount++;
}
void
TclReleaseByteCode(
- register ByteCode *codePtr)
+ ByteCode *codePtr)
{
if (codePtr->refCount-- > 1) {
return;
@@ -1040,14 +1040,14 @@ TclReleaseByteCode(
static void
CleanupByteCode(
- register ByteCode *codePtr) /* Points to the ByteCode to free. */
+ ByteCode *codePtr) /* Points to the ByteCode to free. */
{
Tcl_Interp *interp = (Tcl_Interp *) *codePtr->interpHandle;
Interp *iPtr = (Interp *) interp;
int numLitObjects = codePtr->numLitObjects;
int numAuxDataItems = codePtr->numAuxDataItems;
- register Tcl_Obj **objArrayPtr, *objPtr;
- register const AuxData *auxDataPtr;
+ Tcl_Obj **objArrayPtr, *objPtr;
+ const AuxData *auxDataPtr;
int i;
#ifdef TCL_COMPILE_STATS
@@ -1392,9 +1392,9 @@ CompileSubstObj(
static void
FreeSubstCodeInternalRep(
- register Tcl_Obj *objPtr) /* Object whose internal rep to free. */
+ Tcl_Obj *objPtr) /* Object whose internal rep to free. */
{
- register ByteCode *codePtr;
+ ByteCode *codePtr;
ByteCodeGetIntRep(objPtr, &substCodeType, codePtr);
assert(codePtr != NULL);
@@ -1443,7 +1443,7 @@ void
TclInitCompileEnv(
Tcl_Interp *interp, /* The interpreter for which a CompileEnv
* structure is initialized. */
- register CompileEnv *envPtr,/* Points to the CompileEnv structure to
+ CompileEnv *envPtr,/* Points to the CompileEnv structure to
* initialize. */
const char *stringPtr, /* The source string to be compiled. */
int numBytes, /* Number of bytes in source string. */
@@ -1650,7 +1650,7 @@ TclInitCompileEnv(
void
TclFreeCompileEnv(
- register CompileEnv *envPtr)/* Points to the CompileEnv structure. */
+ CompileEnv *envPtr)/* Points to the CompileEnv structure. */
{
if (envPtr->localLitTable.buckets != envPtr->localLitTable.staticBuckets){
ckfree(envPtr->localLitTable.buckets);
@@ -2782,13 +2782,13 @@ PreventCycle(
ByteCode *
TclInitByteCode(
- register CompileEnv *envPtr)/* Points to the CompileEnv structure from
+ CompileEnv *envPtr)/* Points to the CompileEnv structure from
* which to create a ByteCode structure. */
{
- register ByteCode *codePtr;
+ ByteCode *codePtr;
size_t codeBytes, objArrayBytes, exceptArrayBytes, cmdLocBytes;
size_t auxDataArrayBytes, structureSize;
- register unsigned char *p;
+ unsigned char *p;
#ifdef TCL_COMPILE_DEBUG
unsigned char *nextPtr;
#endif
@@ -2923,7 +2923,7 @@ TclInitByteCodeObj(
* and whose string rep contains the source
* code. */
const Tcl_ObjType *typePtr,
- register CompileEnv *envPtr)/* Points to the CompileEnv structure from
+ CompileEnv *envPtr)/* Points to the CompileEnv structure from
* which to create a ByteCode structure. */
{
ByteCode *codePtr;
@@ -2968,7 +2968,7 @@ TclInitByteCodeObj(
int
TclFindCompiledLocal(
- register const char *name, /* Points to first character of the name of a
+ const char *name, /* Points to first character of the name of a
* scalar or array variable. If NULL, a
* temporary var should be created. */
int nameBytes, /* Number of bytes in the name. */
@@ -2976,9 +2976,9 @@ TclFindCompiledLocal(
* variable if it is new. */
CompileEnv *envPtr) /* Points to the current compile environment*/
{
- register CompiledLocal *localPtr;
+ CompiledLocal *localPtr;
int localVar = -1;
- register int i;
+ int i;
Proc *procPtr;
/*
@@ -3351,11 +3351,11 @@ EnterCmdWordData(
int
TclCreateExceptRange(
ExceptionRangeType type, /* The kind of ExceptionRange desired. */
- register CompileEnv *envPtr)/* Points to CompileEnv for which to create a
+ CompileEnv *envPtr)/* Points to CompileEnv for which to create a
* new ExceptionRange structure. */
{
- register ExceptionRange *rangePtr;
- register ExceptionAux *auxPtr;
+ ExceptionRange *rangePtr;
+ ExceptionAux *auxPtr;
int index = envPtr->exceptArrayNext;
if (index >= envPtr->exceptArrayEnd) {
@@ -3719,11 +3719,11 @@ TclCreateAuxData(
* the new aux data record. */
const AuxDataType *typePtr, /* Pointer to the type to attach to this
* AuxData */
- register CompileEnv *envPtr)/* Points to the CompileEnv for which a new
+ CompileEnv *envPtr)/* Points to the CompileEnv for which a new
* aux data structure is to be allocated. */
{
int index; /* Index for the new AuxData structure. */
- register AuxData *auxDataPtr;
+ AuxData *auxDataPtr;
/* Points to the new AuxData structure */
index = envPtr->auxDataArrayNext;
@@ -3782,7 +3782,7 @@ TclCreateAuxData(
void
TclInitJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* initialize. */
{
@@ -3814,7 +3814,7 @@ TclInitJumpFixupArray(
void
TclExpandJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* enlarge. */
{
@@ -3863,7 +3863,7 @@ TclExpandJumpFixupArray(
void
TclFreeJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* free. */
{
@@ -4310,7 +4310,7 @@ GetCmdLocEncodingSize(
* containing the CmdLocation structure to
* encode. */
{
- register CmdLocation *mapPtr = envPtr->cmdMapPtr;
+ CmdLocation *mapPtr = envPtr->cmdMapPtr;
int numCmds = envPtr->numCommands;
int codeDelta, codeLen, srcDelta, srcLen;
int codeDeltaNext, codeLengthNext, srcDeltaNext, srcLengthNext;
@@ -4394,11 +4394,11 @@ EncodeCmdLocMap(
* memory block where the location information
* is to be stored. */
{
- register CmdLocation *mapPtr = envPtr->cmdMapPtr;
+ CmdLocation *mapPtr = envPtr->cmdMapPtr;
int numCmds = envPtr->numCommands;
- register unsigned char *p = startPtr;
+ unsigned char *p = startPtr;
int codeDelta, codeLen, srcDelta, srcLen, prevOffset;
- register int i;
+ int i;
/*
* Encode the code offset for each command as a sequence of deltas.
@@ -4512,7 +4512,7 @@ RecordByteCodeStats(
* to add to accumulated statistics. */
{
Interp *iPtr = (Interp *) *codePtr->interpHandle;
- register ByteCodeStats *statsPtr;
+ ByteCodeStats *statsPtr;
if (iPtr == NULL) {
/* Avoid segfaulting in case we're called in a deleted interp */
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 686b2dd..5e39a21 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -529,7 +529,7 @@ typedef struct ByteCode {
do { \
const Tcl_ObjIntRep *irPtr; \
irPtr = TclFetchIntRep((objPtr), (typePtr)); \
- (codePtr) = irPtr ? irPtr->twoPtrValue.ptr1 : NULL; \
+ (codePtr) = irPtr ? (ByteCode*)irPtr->twoPtrValue.ptr1 : NULL; \
} while (0)
/*
@@ -1217,7 +1217,7 @@ MODULE_SCOPE Tcl_Obj *TclGetInnerContext(Tcl_Interp *interp,
const unsigned char *pc, Tcl_Obj **tosPtr);
MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
- register Tcl_Interp *interp, int objc,
+ Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int isLambda);
@@ -1405,7 +1405,7 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define TclEmitPush(objIndex, envPtr) \
do { \
- register int _objIndexCopy = (objIndex); \
+ int _objIndexCopy = (objIndex); \
if (_objIndexCopy <= 255) { \
TclEmitInstInt1(INST_PUSH1, _objIndexCopy, (envPtr)); \
} else { \
diff --git a/generic/tclDTrace.d b/generic/tclDTrace.d
index 360bdff..f5493b1 100644
--- a/generic/tclDTrace.d
+++ b/generic/tclDTrace.d
@@ -10,7 +10,6 @@
*/
typedef struct Tcl_Obj Tcl_Obj;
-typedef const char* TclDTraceStr;
/*
* Tcl DTrace probes
@@ -25,14 +24,14 @@ provider tcl {
* arg1: number of arguments (int)
* arg2: array of proc argument objects (Tcl_Obj**)
*/
- probe proc__entry(TclDTraceStr name, int objc, struct Tcl_Obj **objv);
+ probe proc__entry(const char *name, int objc, struct Tcl_Obj **objv);
/*
* tcl*:::proc-return probe
* triggered immediately after proc bytecode execution
* arg0: proc name (string)
* arg1: return code (int)
*/
- probe proc__return(TclDTraceStr name, int code);
+ probe proc__return(const char *name, int code);
/*
* tcl*:::proc-result probe
* triggered after proc-return probe and result processing
@@ -41,7 +40,7 @@ provider tcl {
* arg2: proc result (string)
* arg3: proc result object (Tcl_Obj*)
*/
- probe proc__result(TclDTraceStr name, int code, TclDTraceStr result,
+ probe proc__result(const char *name, int code, const char *result,
struct Tcl_Obj *resultobj);
/*
* tcl*:::proc-args probe
@@ -50,10 +49,10 @@ provider tcl {
* arg0: proc name (string)
* arg1-arg9: proc arguments or NULL (strings)
*/
- probe proc__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2,
- TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
- TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
- TclDTraceStr arg9);
+ probe proc__args(const char *name, const char *arg1, const char *arg2,
+ const char *arg3, const char *arg4, const char *arg5,
+ const char *arg6, const char *arg7, const char *arg8,
+ const char *arg9);
/*
* tcl*:::proc-info probe
* triggered before proc-entry probe, gives access to TIP 280
@@ -67,9 +66,9 @@ provider tcl {
* arg6: TclOO method (string)
* arg7: TclOO class/object (string)
*/
- probe proc__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc,
- TclDTraceStr file, int line, int level, TclDTraceStr method,
- TclDTraceStr class);
+ probe proc__info(const char *cmd, const char *type, const char *proc,
+ const char *file, int line, int level, const char *method,
+ const char *class);
/***************************** cmd probes ******************************/
/*
@@ -79,14 +78,14 @@ provider tcl {
* arg1: number of arguments (int)
* arg2: array of command argument objects (Tcl_Obj**)
*/
- probe cmd__entry(TclDTraceStr name, int objc, struct Tcl_Obj **objv);
+ probe cmd__entry(const char *name, int objc, struct Tcl_Obj **objv);
/*
* tcl*:::cmd-return probe
* triggered immediately after commmand execution
* arg0: command name (string)
* arg1: return code (int)
*/
- probe cmd__return(TclDTraceStr name, int code);
+ probe cmd__return(const char *name, int code);
/*
* tcl*:::cmd-result probe
* triggered after cmd-return probe and result processing
@@ -95,7 +94,7 @@ provider tcl {
* arg2: command result (string)
* arg3: command result object (Tcl_Obj*)
*/
- probe cmd__result(TclDTraceStr name, int code, TclDTraceStr result,
+ probe cmd__result(const char *name, int code, const char *result,
struct Tcl_Obj *resultobj);
/*
* tcl*:::cmd-args probe
@@ -104,10 +103,10 @@ provider tcl {
* arg0: command name (string)
* arg1-arg9: command arguments or NULL (strings)
*/
- probe cmd__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2,
- TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
- TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
- TclDTraceStr arg9);
+ probe cmd__args(const char *name, const char *arg1, const char *arg2,
+ const char *arg3, const char *arg4, const char *arg5,
+ const char *arg6, const char *arg7, const char *arg8,
+ const char *arg9);
/*
* tcl*:::cmd-info probe
* triggered before cmd-entry probe, gives access to TIP 280
@@ -121,9 +120,9 @@ provider tcl {
* arg6: TclOO method (string)
* arg7: TclOO class/object (string)
*/
- probe cmd__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc,
- TclDTraceStr file, int line, int level, TclDTraceStr method,
- TclDTraceStr class);
+ probe cmd__info(const char *cmd, const char *type, const char *proc,
+ const char *file, int line, int level, const char *method,
+ const char *class);
/***************************** inst probes *****************************/
/*
@@ -133,7 +132,7 @@ provider tcl {
* arg1: depth of stack (int)
* arg2: top of stack (Tcl_Obj**)
*/
- probe inst__start(TclDTraceStr name, int depth, struct Tcl_Obj **stack);
+ probe inst__start(const char *name, int depth, struct Tcl_Obj **stack);
/*
* tcl*:::inst-done probe
* triggered immediately after execution of a bytecode
@@ -141,7 +140,7 @@ provider tcl {
* arg1: depth of stack (int)
* arg2: top of stack (Tcl_Obj**)
*/
- probe inst__done(TclDTraceStr name, int depth, struct Tcl_Obj **stack);
+ probe inst__done(const char *name, int depth, struct Tcl_Obj **stack);
/***************************** obj probes ******************************/
/*
@@ -163,10 +162,10 @@ provider tcl {
* triggered when the ::tcl::dtrace command is called
* arg0-arg9: command arguments (strings)
*/
- probe tcl__probe(TclDTraceStr arg0, TclDTraceStr arg1, TclDTraceStr arg2,
- TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
- TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
- TclDTraceStr arg9);
+ probe tcl__probe(const char *arg0, const char *arg1, const char *arg2,
+ const char *arg3, const char *arg4, const char *arg5,
+ const char *arg6, const char *arg7, const char *arg8,
+ const char *arg9);
};
/*
@@ -174,7 +173,7 @@ provider tcl {
*/
typedef struct Tcl_ObjType {
- char *name;
+ const char *name;
void *freeIntRepProc;
void *dupIntRepProc;
void *updateStringProc;
@@ -185,7 +184,7 @@ struct Tcl_Obj {
int refCount;
char *bytes;
int length;
- Tcl_ObjType *typePtr;
+ const Tcl_ObjType *typePtr;
union {
long longValue;
double doubleValue;
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 32c71de..fb4f3cf 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -95,6 +95,17 @@
#endif /* _MSC_VER */
/*
+ * Meridian: am, pm, or 24-hour style.
+ */
+
+typedef enum _MERIDIAN {
+ MERam, MERpm, MER24
+} MERIDIAN;
+
+
+
+
+/*
* yyparse will accept a 'struct DateInfo' as its parameter; that's where the
* parsed fields will be returned.
*/
@@ -112,7 +123,7 @@ typedef struct DateInfo {
time_t dateHour;
time_t dateMinutes;
time_t dateSeconds;
- int dateMeridian;
+ MERIDIAN dateMeridian;
int dateHaveTime;
time_t dateTimezone;
@@ -199,17 +210,6 @@ typedef enum _DSTMODE {
DSTon, DSToff, DSTmaybe
} DSTMODE;
-/*
- * Meridian: am, pm, or 24-hour style.
- */
-
-typedef enum _MERIDIAN {
- MERam, MERpm, MER24
-} MERIDIAN;
-
-
-
-
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULLPTR nullptr
@@ -2549,9 +2549,9 @@ LookupWord(
YYSTYPE* yylvalPtr,
char *buff)
{
- register char *p;
- register char *q;
- register const TABLE *tp;
+ char *p;
+ char *q;
+ const TABLE *tp;
int i, abbrev;
/*
@@ -2674,8 +2674,8 @@ TclDatelex(
YYLTYPE* location,
DateInfo *info)
{
- register char c;
- register char *p;
+ char c;
+ char *p;
char buff[20];
int Count;
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index 76a4d46..3204619 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -542,7 +542,7 @@ FormatInstruction(
{
Proc *procPtr = codePtr->procPtr;
unsigned char opCode = *pc;
- register const InstructionDesc *instDesc = &tclInstructionTable[opCode];
+ const InstructionDesc *instDesc = &tclInstructionTable[opCode];
unsigned char *codeStart = codePtr->codeStart;
unsigned pcOffset = pc - codeStart;
int opnd = 0, i, j, numBytes = 1;
@@ -863,8 +863,8 @@ PrintSourceToObj(
const char *stringPtr, /* The string to print. */
int maxChars) /* Maximum number of chars to print. */
{
- register const char *p;
- register int i = 0, len;
+ const char *p;
+ int i = 0, len;
Tcl_UniChar ch = 0;
if (stringPtr == NULL) {
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 7eb73e8..a88c1a7 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -234,12 +234,17 @@ static int TableToUtfProc(ClientData clientData, const char *src,
char *dst, int dstLen, int *srcReadPtr,
int *dstWrotePtr, int *dstCharsPtr);
static size_t unilen(const char *src);
-static int UniCharToUtfProc(ClientData clientData,
+static int Utf16ToUtfProc(ClientData clientData,
const char *src, int srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, int dstLen,
int *srcReadPtr, int *dstWrotePtr,
int *dstCharsPtr);
-static int UtfToUniCharProc(ClientData clientData,
+static int UtfToUtf16Proc(ClientData clientData,
+ const char *src, int srcLen, int flags,
+ Tcl_EncodingState *statePtr, char *dst, int dstLen,
+ int *srcReadPtr, int *dstWrotePtr,
+ int *dstCharsPtr);
+static int UtfToUcs2Proc(ClientData clientData,
const char *src, int srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, int dstLen,
int *srcReadPtr, int *dstWrotePtr,
@@ -564,11 +569,16 @@ TclInitEncodingSubsystem(void)
TableEncodingData *dataPtr;
unsigned size;
unsigned short i;
+ union {
+ char c;
+ short s;
+ } isLe;
if (encodingsInitialized) {
return;
}
+ isLe.s = 1;
Tcl_MutexLock(&encodingMutex);
Tcl_InitHashTable(&encodingTable, TCL_STRING_KEYS);
Tcl_MutexUnlock(&encodingMutex);
@@ -595,13 +605,38 @@ TclInitEncodingSubsystem(void)
type.clientData = NULL;
Tcl_CreateEncoding(&type);
- type.encodingName = "unicode";
- type.toUtfProc = UniCharToUtfProc;
- type.fromUtfProc = UtfToUniCharProc;
+ type.toUtfProc = Utf16ToUtfProc;
+ type.fromUtfProc = UtfToUcs2Proc;
type.freeProc = NULL;
type.nullSize = 2;
- type.clientData = NULL;
+ type.encodingName = "ucs-2le";
+ type.clientData = INT2PTR(1);
+ Tcl_CreateEncoding(&type);
+ type.encodingName = "ucs-2be";
+ type.clientData = INT2PTR(0);
+ Tcl_CreateEncoding(&type);
+ type.encodingName = "ucs-2";
+ type.clientData = INT2PTR(isLe.c);
+ Tcl_CreateEncoding(&type);
+
+ type.toUtfProc = Utf16ToUtfProc;
+ type.fromUtfProc = UtfToUtf16Proc;
+ type.freeProc = NULL;
+ type.nullSize = 2;
+ type.encodingName = "utf-16le";
+ type.clientData = INT2PTR(1);;
+ Tcl_CreateEncoding(&type);
+ type.encodingName = "utf-16be";
+ type.clientData = INT2PTR(0);
+ Tcl_CreateEncoding(&type);
+ type.encodingName = "utf-16";
+ type.clientData = INT2PTR(isLe.c);;
+ Tcl_CreateEncoding(&type);
+
+#ifndef TCL_NO_DEPRECATED
+ type.encodingName = "unicode";
Tcl_CreateEncoding(&type);
+#endif
/*
* Need the iso8859-1 encoding in order to process binary data, so force
@@ -1279,7 +1314,7 @@ Tcl_ExternalToUtf(
if (*dstCharsPtr <= maxChars) {
break;
}
- dstLen = Tcl_UtfAtIndex(dst, maxChars) - 1 - dst + TCL_UTF_MAX;
+ dstLen = Tcl_UtfAtIndex(dst, maxChars) - dst + (TCL_UTF_MAX - 1);
flags = savedFlags;
*statePtr = savedState;
} while (1);
@@ -2401,9 +2436,9 @@ UtfToUtfProc(
/*
*-------------------------------------------------------------------------
*
- * UniCharToUtfProc --
+ * Utf16ToUtfProc --
*
- * Convert from Unicode to UTF-8.
+ * Convert from UTF-16 to UTF-8.
*
* Results:
* Returns TCL_OK if conversion was successful.
@@ -2415,8 +2450,8 @@ UtfToUtfProc(
*/
static int
-UniCharToUtfProc(
- ClientData clientData, /* Not used. */
+Utf16ToUtfProc(
+ ClientData clientData, /* != NULL means LE, == NUL means BE */
const char *src, /* Source string in Unicode. */
int srcLen, /* Source string length in bytes. */
int flags, /* Conversion control flags. */
@@ -2468,12 +2503,15 @@ UniCharToUtfProc(
break;
}
+ if (clientData) {
+ ch = (src[1] & 0xFF) << 8 | (src[0] & 0xFF);
+ } else {
+ ch = (src[0] & 0xFF) << 8 | (src[1] & 0xFF);
+ }
/*
* Special case for 1-byte utf chars for speed. Make sure we work with
* unsigned short-size data.
*/
-
- ch = *(unsigned short *)src;
if (ch && ch < 0x80) {
*dst++ = (ch & 0xFF);
} else {
@@ -2491,9 +2529,9 @@ UniCharToUtfProc(
/*
*-------------------------------------------------------------------------
*
- * UtfToUniCharProc --
+ * UtfToUtf16Proc --
*
- * Convert from UTF-8 to Unicode.
+ * Convert from UTF-8 to UTF-16.
*
* Results:
* Returns TCL_OK if conversion was successful.
@@ -2505,9 +2543,8 @@ UniCharToUtfProc(
*/
static int
-UtfToUniCharProc(
- ClientData clientData, /* TableEncodingData that specifies
- * encoding. */
+UtfToUtf16Proc(
+ ClientData clientData, /* != NULL means LE, == NUL means BE */
const char *src, /* Source string in UTF-8. */
int srcLen, /* Source string length in bytes. */
int flags, /* Conversion control flags. */
@@ -2571,44 +2608,151 @@ UtfToUniCharProc(
* casting dst to a Tcl_UniChar. [Bug 1122671]
*/
-#ifdef WORDS_BIGENDIAN
+ if (clientData) {
#if TCL_UTF_MAX > 4
- if (*chPtr <= 0xFFFF) {
- *dst++ = (*chPtr >> 8);
- *dst++ = (*chPtr & 0xFF);
- } else {
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
- *dst++ = (*chPtr & 0xFF);
- *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
- *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
- }
-#else
- *dst++ = (*chPtr >> 8);
- *dst++ = (*chPtr & 0xFF);
-#endif
+ if (*chPtr <= 0xFFFF) {
+ *dst++ = (*chPtr & 0xFF);
+ *dst++ = (*chPtr >> 8);
+ } else {
+ *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
+ *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
+ *dst++ = (*chPtr & 0xFF);
+ *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+ }
#else
-#if TCL_UTF_MAX > 4
- if (*chPtr <= 0xFFFF) {
*dst++ = (*chPtr & 0xFF);
*dst++ = (*chPtr >> 8);
+#endif
} else {
- *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
- *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
+#if TCL_UTF_MAX > 4
+ if (*chPtr <= 0xFFFF) {
+ *dst++ = (*chPtr >> 8);
+ *dst++ = (*chPtr & 0xFF);
+ } else {
+ *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+ *dst++ = (*chPtr & 0xFF);
+ *dst++ = (((*chPtr - 0x10000) >> 18) & 0x3) | 0xD8;
+ *dst++ = (((*chPtr - 0x10000) >> 10) & 0xFF);
+ }
+#else
+ *dst++ = (*chPtr >> 8);
*dst++ = (*chPtr & 0xFF);
- *dst++ = ((*chPtr & 0x3) >> 8) | 0xDC;
+#endif
}
-#else
- *dst++ = (*chPtr & 0xFF);
- *dst++ = (*chPtr >> 8);
+ }
+ *srcReadPtr = src - srcStart;
+ *dstWrotePtr = dst - dstStart;
+ *dstCharsPtr = numChars;
+ return result;
+}
+
+/*
+ *-------------------------------------------------------------------------
+ *
+ * UtfToUcs2Proc --
+ *
+ * Convert from UTF-8 to UCS-2.
+ *
+ * Results:
+ * Returns TCL_OK if conversion was successful.
+ *
+ * Side effects:
+ * None.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static int
+UtfToUcs2Proc(
+ ClientData clientData, /* != NULL means LE, == NUL means BE */
+ const char *src, /* Source string in UTF-8. */
+ int srcLen, /* Source string length in bytes. */
+ int flags, /* Conversion control flags. */
+ Tcl_EncodingState *statePtr,/* Place for conversion routine to store state
+ * information used during a piecewise
+ * conversion. Contents of statePtr are
+ * initialized and/or reset by conversion
+ * routine under control of flags argument. */
+ char *dst, /* Output buffer in which converted string is
+ * stored. */
+ int dstLen, /* The maximum length of output buffer in
+ * bytes. */
+ int *srcReadPtr, /* Filled with the number of bytes from the
+ * source string that were converted. This may
+ * be less than the original source length if
+ * there was a problem converting some source
+ * characters. */
+ int *dstWrotePtr, /* Filled with the number of bytes that were
+ * stored in the output buffer as a result of
+ * the conversion. */
+ int *dstCharsPtr) /* Filled with the number of characters that
+ * correspond to the bytes stored in the
+ * output buffer. */
+{
+ const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
+ int result, numChars;
+#if TCL_UTF_MAX <= 4
+ int len;
#endif
+ Tcl_UniChar ch = 0;
+
+ srcStart = src;
+ srcEnd = src + srcLen;
+ srcClose = srcEnd;
+ if ((flags & TCL_ENCODING_END) == 0) {
+ srcClose -= TCL_UTF_MAX;
+ }
+
+ dstStart = dst;
+ dstEnd = dst + dstLen - sizeof(Tcl_UniChar);
+
+ result = TCL_OK;
+ for (numChars = 0; src < srcEnd; numChars++) {
+ if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
+ /*
+ * If there is more string to follow, this will ensure that the
+ * last UTF-8 character in the source buffer hasn't been cut off.
+ */
+
+ result = TCL_CONVERT_MULTIBYTE;
+ break;
+ }
+ if (dst > dstEnd) {
+ result = TCL_CONVERT_NOSPACE;
+ break;
+ }
+#if TCL_UTF_MAX <= 4
+ src += (len = TclUtfToUniChar(src, &ch));
+ if ((ch >= 0xD800) && (len < 3)) {
+ src += TclUtfToUniChar(src, &ch);
+ ch = 0xFFFD;
+ }
+#else
+ src += TclUtfToUniChar(src, &ch);
+ if (ch > 0xFFFF) {
+ ch = 0xFFFD;
+ }
#endif
+
+ /*
+ * Need to handle this in a way that won't cause misalignment by
+ * casting dst to a Tcl_UniChar. [Bug 1122671]
+ */
+
+ if (clientData) {
+ *dst++ = (ch & 0xFF);
+ *dst++ = (ch >> 8);
+ } else {
+ *dst++ = (ch >> 8);
+ *dst++ = (ch & 0xFF);
+ }
}
*srcReadPtr = src - srcStart;
*dstWrotePtr = dst - dstStart;
*dstCharsPtr = numChars;
return result;
}
-
+
/*
*-------------------------------------------------------------------------
*
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index e7e5c92..16d8310 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -119,7 +119,7 @@ static inline Tcl_Obj *
NewNsObj(
Tcl_Namespace *namespacePtr)
{
- register Namespace *nsPtr = (Namespace *) namespacePtr;
+ Namespace *nsPtr = (Namespace *) namespacePtr;
if (namespacePtr == TclGetGlobalNamespace(nsPtr->interp)) {
return Tcl_NewStringObj("::", 2);
@@ -1813,7 +1813,7 @@ NsEnsembleImplementationCmdNR(
subcmdName = TclGetStringFromObj(subObj, &stringLength);
for (i=0 ; i<tableLength ; i++) {
- register int cmp = strncmp(subcmdName,
+ int cmp = strncmp(subcmdName,
ensemblePtr->subcommandArrayPtr[i],
stringLength);
@@ -2404,7 +2404,7 @@ MakeCachedEnsembleCommand(
Tcl_HashEntry *hPtr,
Tcl_Obj *fix)
{
- register EnsembleCmdRep *ensembleCmd;
+ EnsembleCmdRep *ensembleCmd;
ECRGetIntRep(objPtr, ensembleCmd);
if (ensembleCmd) {
@@ -2580,7 +2580,7 @@ BuildEnsembleConfig(
if (subList) {
int subc;
Tcl_Obj **subv, *target, *cmdObj, *cmdPrefixObj;
- char *name;
+ const char *name;
/*
* There is a list of exactly what subcommands go in the table.
@@ -2665,7 +2665,7 @@ BuildEnsembleConfig(
Tcl_DictObjFirst(NULL, ensemblePtr->subcommandDict, &dictSearch,
&keyObj, &valueObj, &done);
while (!done) {
- char *name = TclGetString(keyObj);
+ const char *name = TclGetString(keyObj);
hPtr = Tcl_CreateHashEntry(hash, name, &isNew);
Tcl_SetHashValue(hPtr, valueObj);
@@ -3379,7 +3379,7 @@ CompileToInvokedCommand(
{
Tcl_Token *tokPtr;
Tcl_Obj *objPtr, **words;
- char *bytes;
+ const char *bytes;
int i, numWords, cmdLit, extraLiteralFlags = LITERAL_CMD_NAME;
DefineLineInformation;
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 484efe0..4b25064 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -1327,7 +1327,7 @@ int
Tcl_ExprObj(
Tcl_Interp *interp, /* Context in which to evaluate the
* expression. */
- register Tcl_Obj *objPtr, /* Points to Tcl object containing expression
+ Tcl_Obj *objPtr, /* Points to Tcl object containing expression
* to evaluate. */
Tcl_Obj **resultPtrPtr) /* Where the Tcl_Obj* that is the expression
* result is stored if no errors occur. */
@@ -1444,7 +1444,7 @@ CompileExprObj(
Interp *iPtr = (Interp *) interp;
CompileEnv compEnv; /* Compilation environment structure allocated
* in frame. */
- register ByteCode *codePtr = NULL;
+ ByteCode *codePtr = NULL;
/* Tcl Internal type of bytecode. Initialized
* to avoid compiler warning. */
@@ -1598,8 +1598,8 @@ TclCompileObj(
const CmdFrame *invoker,
int word)
{
- register Interp *iPtr = (Interp *) interp;
- register ByteCode *codePtr; /* Tcl Internal type of bytecode. */
+ Interp *iPtr = (Interp *) interp;
+ ByteCode *codePtr; /* Tcl Internal type of bytecode. */
Namespace *namespacePtr = iPtr->varFramePtr->nsPtr;
/*
@@ -1981,7 +1981,14 @@ TclNRExecuteByteCode(
*/
TclNRAddCallback(interp, TEBCresume, TD, /* pc */ NULL,
- /* cleanup */ INT2PTR(0), NULL);
+ /* cleanup */ INT2PTR(0), INT2PTR(iPtr->evalFlags));
+
+ /*
+ * Reset discard result flag - because it is applicable for this call only,
+ * and should not affect all the nested invocations may return result.
+ */
+ iPtr->evalFlags &= ~TCL_EVAL_DISCARD_RESULT;
+
return TCL_OK;
}
@@ -2043,6 +2050,7 @@ TEBCresume(
#define auxObjList (TD->auxObjList)
#define catchTop (TD->catchTop)
#define codePtr (TD->codePtr)
+#define curEvalFlags PTR2INT(data[3]) /* calling iPtr->evalFlags */
/*
* Globals: variables that store state, must remain valid at all times.
@@ -2493,7 +2501,7 @@ TEBCresume(
#ifdef TCL_COMPILE_DEBUG
/* FIXME: What is the right thing to trace? */
{
- register int i;
+ int i;
TRACE(("%d [", opnd));
for (i=opnd-1 ; i>=0 ; i--) {
@@ -2526,6 +2534,14 @@ TEBCresume(
case INST_DONE:
if (tosPtr > initTosPtr) {
+
+ if ((curEvalFlags & TCL_EVAL_DISCARD_RESULT) && (result == TCL_OK)) {
+ /* simulate pop & fast done (like it does continue in loop) */
+ TRACE_WITH_OBJ(("=> discarding "), OBJ_AT_TOS);
+ objPtr = POP_OBJECT();
+ TclDecrRefCount(objPtr);
+ goto abnormalReturn;
+ }
/*
* Set the interpreter's object result to point to the topmost
* object from the stack, and check for a possible [catch]. The
@@ -4395,8 +4411,8 @@ TEBCresume(
NEXT_INST_F(1, 0, 1);
case INST_INFO_LEVEL_ARGS: {
int level;
- register CallFrame *framePtr = iPtr->varFramePtr;
- register CallFrame *rootFramePtr = iPtr->rootFramePtr;
+ CallFrame *framePtr = iPtr->varFramePtr;
+ CallFrame *rootFramePtr = iPtr->rootFramePtr;
TRACE(("\"%.30s\" => ", O2S(OBJ_AT_TOS)));
if (TclGetIntFromObj(interp, OBJ_AT_TOS, &level) != TCL_OK) {
@@ -4693,7 +4709,7 @@ TEBCresume(
}
{
- register Method *const mPtr =
+ Method *const mPtr =
contextPtr->callPtr->chain[newDepth].mPtr;
return mPtr->typePtr->callProc(mPtr->clientData, interp,
@@ -6783,7 +6799,7 @@ TEBCresume(
NEXT_INST_F(1, 1, 0);
case INST_DICT_EXISTS: {
- register int found;
+ int found;
opnd = TclGetUInt4AtPtr(pc+1);
TRACE(("%u => ", opnd));
@@ -7695,7 +7711,7 @@ TEBCresume(
*/
/*
- * Abnormal return code. Restore the stack to state it had when
+ * Done or abnormal return code. Restore the stack to state it had when
* starting to execute the ByteCode. Panic if the stack is below the
* initial level.
*/
@@ -8452,7 +8468,7 @@ ExecuteExtendedBinaryMathOp(
}
Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
mp_init(&bigResult);
- mp_expt_d_ex(&big1, w2, &bigResult, 1);
+ mp_expt_d(&big1, (mp_digit)w2, &bigResult);
mp_clear(&big1);
BIG_RESULT(&bigResult);
}
@@ -8884,7 +8900,7 @@ TclCompareTwoNumbers(
static void
PrintByteCodeInfo(
- register ByteCode *codePtr) /* The bytecode whose summary is printed to
+ ByteCode *codePtr) /* The bytecode whose summary is printed to
* stdout. */
{
Proc *procPtr = codePtr->procPtr;
@@ -8948,7 +8964,7 @@ PrintByteCodeInfo(
#ifdef TCL_COMPILE_DEBUG
static void
ValidatePcAndStackTop(
- register ByteCode *codePtr, /* The bytecode whose summary is printed to
+ ByteCode *codePtr, /* The bytecode whose summary is printed to
* stdout. */
const unsigned char *pc, /* Points to first byte of a bytecode
* instruction. The program counter. */
@@ -9191,7 +9207,7 @@ GetSrcInfoForPc(
* of the command containing the pc should
* be stored. */
{
- register int pcOffset = (pc - codePtr->codeStart);
+ int pcOffset = (pc - codePtr->codeStart);
int numCmds = codePtr->numCommands;
unsigned char *codeDeltaNext, *codeLengthNext;
unsigned char *srcDeltaNext, *srcLengthNext;
@@ -9344,9 +9360,9 @@ GetExceptRangeForPc(
{
ExceptionRange *rangeArrayPtr;
int numRanges = codePtr->numExceptRanges;
- register ExceptionRange *rangePtr;
+ ExceptionRange *rangePtr;
int pcOffset = pc - codePtr->codeStart;
- register int start;
+ int start;
if (numRanges == 0) {
return NULL;
@@ -9478,11 +9494,11 @@ TclExprFloatError(
int
TclLog2(
- register int value) /* The integer for which to compute the log
+ int value) /* The integer for which to compute the log
* base 2. */
{
- register int n = value;
- register int result = 0;
+ int n = value;
+ int result = 0;
while (n > 1) {
n = n >> 1;
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 98ee37c..3419d7c 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1072,7 +1072,7 @@ Tcl_TranslateFileName(
*/
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
- register char *p;
+ char *p;
for (p = Tcl_DStringValue(bufferPtr); *p != '\0'; p++) {
if (*p == '/') {
*p = '\\';
@@ -2077,7 +2077,7 @@ SkipToChar(
int match) /* Character to find. */
{
int quoted, level;
- register char *p;
+ char *p;
quoted = 0;
level = 0;
@@ -2628,7 +2628,7 @@ Tcl_GetBlocksFromStat(
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
return (Tcl_WideUInt) statPtr->st_blocks;
#else
- register unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr);
+ unsigned blksize = Tcl_GetBlockSizeFromStat(statPtr);
return ((Tcl_WideUInt) statPtr->st_size + blksize - 1) / blksize;
#endif
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index 59f85bd..3b6134c 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -46,6 +46,14 @@
#endif /* _MSC_VER */
/*
+ * Meridian: am, pm, or 24-hour style.
+ */
+
+typedef enum _MERIDIAN {
+ MERam, MERpm, MER24
+} MERIDIAN;
+
+/*
* yyparse will accept a 'struct DateInfo' as its parameter; that's where the
* parsed fields will be returned.
*/
@@ -63,7 +71,7 @@ typedef struct DateInfo {
time_t dateHour;
time_t dateMinutes;
time_t dateSeconds;
- int dateMeridian;
+ MERIDIAN dateMeridian;
int dateHaveTime;
time_t dateTimezone;
@@ -150,14 +158,6 @@ typedef enum _DSTMODE {
DSTon, DSToff, DSTmaybe
} DSTMODE;
-/*
- * Meridian: am, pm, or 24-hour style.
- */
-
-typedef enum _MERIDIAN {
- MERam, MERpm, MER24
-} MERIDIAN;
-
%}
%union {
@@ -765,9 +765,9 @@ LookupWord(
YYSTYPE* yylvalPtr,
char *buff)
{
- register char *p;
- register char *q;
- register const TABLE *tp;
+ char *p;
+ char *q;
+ const TABLE *tp;
int i, abbrev;
/*
@@ -890,8 +890,8 @@ TclDatelex(
YYLTYPE* location,
DateInfo *info)
{
- register char c;
- register char *p;
+ char c;
+ char *p;
char buff[20];
int Count;
diff --git a/generic/tclHash.c b/generic/tclHash.c
index 9b462d9..9ea8807 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -113,7 +113,7 @@ const Tcl_HashKeyType tclStringHashKeyType = {
void
Tcl_InitHashTable(
- register Tcl_HashTable *tablePtr,
+ Tcl_HashTable *tablePtr,
/* Pointer to table record, which is supplied
* by the caller. */
int keyType) /* Type of keys to use in table:
@@ -151,7 +151,7 @@ Tcl_InitHashTable(
void
Tcl_InitCustomHashTable(
- register Tcl_HashTable *tablePtr,
+ Tcl_HashTable *tablePtr,
/* Pointer to table record, which is supplied
* by the caller. */
int keyType, /* Type of keys to use in table:
@@ -271,7 +271,7 @@ CreateHashEntry(
int *newPtr) /* Store info here telling whether a new entry
* was created. */
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
const Tcl_HashKeyType *typePtr;
unsigned int hash;
int index;
@@ -392,7 +392,7 @@ void
Tcl_DeleteHashEntry(
Tcl_HashEntry *entryPtr)
{
- register Tcl_HashEntry *prevPtr;
+ Tcl_HashEntry *prevPtr;
const Tcl_HashKeyType *typePtr;
Tcl_HashTable *tablePtr;
Tcl_HashEntry **bucketPtr;
@@ -461,9 +461,9 @@ Tcl_DeleteHashEntry(
void
Tcl_DeleteHashTable(
- register Tcl_HashTable *tablePtr) /* Table to delete. */
+ Tcl_HashTable *tablePtr) /* Table to delete. */
{
- register Tcl_HashEntry *hPtr, *nextPtr;
+ Tcl_HashEntry *hPtr, *nextPtr;
const Tcl_HashKeyType *typePtr;
int i;
@@ -569,7 +569,7 @@ Tcl_FirstHashEntry(
Tcl_HashEntry *
Tcl_NextHashEntry(
- register Tcl_HashSearch *searchPtr)
+ Tcl_HashSearch *searchPtr)
/* Place to store information about progress
* through the table. Must have been
* initialized by calling
@@ -616,7 +616,7 @@ Tcl_HashStats(
#define NUM_COUNTERS 10
int count[NUM_COUNTERS], overflow, i, j;
double average, tmp;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
char *result, *p;
/*
@@ -686,7 +686,7 @@ AllocArrayEntry(
void *keyPtr) /* Key to store in the hash table entry. */
{
int *array = (int *) keyPtr;
- register int *iPtr1, *iPtr2;
+ int *iPtr1, *iPtr2;
Tcl_HashEntry *hPtr;
int count;
unsigned int size;
@@ -730,8 +730,8 @@ CompareArrayKeys(
void *keyPtr, /* New key to compare. */
Tcl_HashEntry *hPtr) /* Existing key to compare. */
{
- register const int *iPtr1 = (const int *) keyPtr;
- register const int *iPtr2 = (const int *) hPtr->key.words;
+ const int *iPtr1 = (const int *) keyPtr;
+ const int *iPtr2 = (const int *) hPtr->key.words;
Tcl_HashTable *tablePtr = hPtr->tablePtr;
int count;
@@ -769,8 +769,8 @@ HashArrayKey(
Tcl_HashTable *tablePtr, /* Hash table. */
void *keyPtr) /* Key from which to compute hash value. */
{
- register const int *array = (const int *) keyPtr;
- register unsigned int result;
+ const int *array = (const int *) keyPtr;
+ unsigned int result;
int count;
for (result = 0, count = tablePtr->keyType; count > 0;
@@ -810,6 +810,7 @@ AllocStringEntry(
allocsize = sizeof(hPtr->key);
}
hPtr = ckalloc(offsetof(Tcl_HashEntry, key) + allocsize);
+ memset(hPtr, 0, sizeof(Tcl_HashEntry) + allocsize - sizeof(hPtr->key));
memcpy(hPtr->key.string, string, size);
hPtr->clientData = 0;
return hPtr;
@@ -837,8 +838,8 @@ CompareStringKeys(
void *keyPtr, /* New key to compare. */
Tcl_HashEntry *hPtr) /* Existing key to compare. */
{
- register const char *p1 = (const char *) keyPtr;
- register const char *p2 = (const char *) hPtr->key.string;
+ const char *p1 = (const char *) keyPtr;
+ const char *p2 = (const char *) hPtr->key.string;
return !strcmp(p1, p2);
}
@@ -865,9 +866,9 @@ HashStringKey(
Tcl_HashTable *tablePtr, /* Hash table. */
void *keyPtr) /* Key from which to compute hash value. */
{
- register const char *string = keyPtr;
- register unsigned int result;
- register char c;
+ const char *string = keyPtr;
+ unsigned int result;
+ char c;
/*
* I tried a zillion different hash functions and asked many other people
@@ -986,12 +987,12 @@ BogusCreate(
static void
RebuildTable(
- register Tcl_HashTable *tablePtr) /* Table to enlarge. */
+ Tcl_HashTable *tablePtr) /* Table to enlarge. */
{
int count, index, oldSize = tablePtr->numBuckets;
Tcl_HashEntry **oldBuckets = tablePtr->buckets;
- register Tcl_HashEntry **oldChainPtr, **newChainPtr;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry **oldChainPtr, **newChainPtr;
+ Tcl_HashEntry *hPtr;
const Tcl_HashKeyType *typePtr;
/* Avoid outgrowing capability of the memory allocators */
diff --git a/generic/tclHistory.c b/generic/tclHistory.c
index 47806d4..46e6989 100644
--- a/generic/tclHistory.c
+++ b/generic/tclHistory.c
@@ -61,7 +61,7 @@ Tcl_RecordAndEval(
* TCL_EVAL_GLOBAL means use Tcl_GlobalEval
* instead of Tcl_Eval. */
{
- register Tcl_Obj *cmdPtr;
+ Tcl_Obj *cmdPtr;
int result;
if (cmd[0]) {
@@ -213,7 +213,7 @@ DeleteHistoryObjs(
ClientData clientData,
Tcl_Interp *interp)
{
- register HistoryObjs *histObjsPtr = clientData;
+ HistoryObjs *histObjsPtr = clientData;
TclDecrRefCount(histObjsPtr->historyObj);
TclDecrRefCount(histObjsPtr->addObj);
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 118820a..f50ef4a 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -7480,7 +7480,7 @@ Tcl_OutputBuffered(
bytesBuffered += BytesLeft(bufPtr);
}
if (statePtr->curOutPtr != NULL) {
- register ChannelBuffer *curOutPtr = statePtr->curOutPtr;
+ ChannelBuffer *curOutPtr = statePtr->curOutPtr;
if (IsBufferReady(curOutPtr)) {
bytesBuffered += BytesLeft(curOutPtr);
@@ -11235,9 +11235,9 @@ Tcl_ChannelTruncateProc(
static void
DupChannelIntRep(
- register Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have
+ Tcl_Obj *srcPtr, /* Object with internal rep to copy. Must have
* an internal rep of type "Channel". */
- register Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. Must not
* currently have an internal rep.*/
{
ResolvedChanName *resPtr;
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 23049fb..1d90def 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -2125,7 +2125,7 @@ static Tcl_Obj *
DecodeEventMask(
int mask)
{
- register const char *eventStr;
+ const char *eventStr;
Tcl_Obj *evObj;
switch (mask & RANDW) {
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 8e24cf7..8385d88 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -1706,7 +1706,7 @@ static Tcl_Obj *
DecodeEventMask(
int mask)
{
- register const char *eventStr;
+ const char *eventStr;
Tcl_Obj *evObj;
switch (mask & RANDW) {
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 4b3eaa5..3773159 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -327,9 +327,9 @@ Tcl_Stat(
oldStyleBuf->st_uid = buf.st_uid;
oldStyleBuf->st_gid = buf.st_gid;
oldStyleBuf->st_size = (off_t) buf.st_size;
- oldStyleBuf->st_atime = buf.st_atime;
- oldStyleBuf->st_mtime = buf.st_mtime;
- oldStyleBuf->st_ctime = buf.st_ctime;
+ oldStyleBuf->st_atime = Tcl_GetAccessTimeFromStat(&buf);
+ oldStyleBuf->st_mtime = Tcl_GetModificationTimeFromStat(&buf);
+ oldStyleBuf->st_ctime = Tcl_GetChangeTimeFromStat(&buf);
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
oldStyleBuf->st_blksize = buf.st_blksize;
#endif
@@ -1392,7 +1392,7 @@ TclFSNormalizeToUniquePath(
int i;
int isVfsPath = 0;
- char *path;
+ const char *path;
/*
* Paths starting with a UNC prefix whose final character is a colon
@@ -4422,8 +4422,8 @@ TclCrossFilesystemCopy(
*/
if (Tcl_FSLstat(source, &sourceStatBuf) == 0) {
- tval.actime = sourceStatBuf.st_atime;
- tval.modtime = sourceStatBuf.st_mtime;
+ tval.actime = Tcl_GetAccessTimeFromStat(&sourceStatBuf);
+ tval.modtime = Tcl_GetModificationTimeFromStat(&sourceStatBuf);
Tcl_FSUtime(target, &tval);
}
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 919db92..e7c3b46 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -426,7 +426,7 @@ Tcl_GetIndexFromObjStruct(
static int
SetIndexFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -458,7 +458,7 @@ UpdateStringOfIndex(
Tcl_Obj *objPtr)
{
IndexRep *indexRep = TclFetchIntRep(objPtr, &indexType)->twoPtrValue.ptr1;
- register const char *indexStr = EXPAND_OF(indexRep);
+ const char *indexStr = EXPAND_OF(indexRep);
Tcl_InitStringRep(objPtr, indexStr, strlen(indexStr));
}
@@ -967,7 +967,7 @@ Tcl_WrongNumArgs(
const Tcl_ObjIntRep *irPtr;
if ((irPtr = TclFetchIntRep(origObjv[i], &indexType))) {
- register IndexRep *indexRep = irPtr->twoPtrValue.ptr1;
+ IndexRep *indexRep = irPtr->twoPtrValue.ptr1;
elementStr = EXPAND_OF(indexRep);
elemLen = strlen(elementStr);
@@ -1016,7 +1016,7 @@ Tcl_WrongNumArgs(
const Tcl_ObjIntRep *irPtr;
if ((irPtr = TclFetchIntRep(objv[i], &indexType))) {
- register IndexRep *indexRep = irPtr->twoPtrValue.ptr1;
+ IndexRep *indexRep = irPtr->twoPtrValue.ptr1;
Tcl_AppendStringsToObj(objPtr, EXPAND_OF(indexRep), NULL);
} else {
@@ -1107,14 +1107,14 @@ Tcl_ParseArgsObjv(
* successful exit. Will include the name of
* the command. */
int nrem; /* Size of leftovers.*/
- register const Tcl_ArgvInfo *infoPtr;
+ const Tcl_ArgvInfo *infoPtr;
/* Pointer to the current entry in the table
* of argument descriptions. */
const Tcl_ArgvInfo *matchPtr;
/* Descriptor that matches current argument */
Tcl_Obj *curArg; /* Current argument */
const char *str = NULL;
- register char c; /* Second character of current arg (used for
+ char c; /* Second character of current arg (used for
* quick check for matching; use 2nd char.
* because first char. will almost always be
* '-'). */
@@ -1362,7 +1362,7 @@ PrintUsage(
/* Array of command-specific argument
* descriptions. */
{
- register const Tcl_ArgvInfo *infoPtr;
+ const Tcl_ArgvInfo *infoPtr;
int width, numSpaces;
#define NUM_SPACES 20
static const char spaces[] = " ";
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 42a9044..2ac833e 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -78,12 +78,12 @@
#else
#include <string.h>
#endif
-#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \
- || defined(__cplusplus) || defined(_MSC_VER) || defined(__ICC)
-#include <stddef.h>
-#else
+#if !defined(STDC_HEADERS) && !defined(__STDC__) && !defined(__C99__FUNC__) \
+ && !defined(__cplusplus) && !defined(_MSC_VER) && !defined(__ICC)
typedef int ptrdiff_t;
#endif
+#include <stddef.h>
+#include <locale.h>
/*
* Ensure WORDS_BIGENDIAN is defined correctly:
@@ -1384,7 +1384,7 @@ MODULE_SCOPE void TclThreadDataKeySet(Tcl_ThreadDataKey *keyPtr,
*/
#define TCL_TSD_INIT(keyPtr) \
- Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData))
+ (ThreadSpecificData *)Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData))
/*
*----------------------------------------------------------------
@@ -2259,6 +2259,7 @@ typedef struct Interp {
#define TCL_EVAL_FILE 0x02
#define TCL_EVAL_SOURCE_IN_FRAME 0x10
#define TCL_EVAL_NORESOLVE 0x20
+#define TCL_EVAL_DISCARD_RESULT 0x40
/*
* Flag bits for Interp structures:
@@ -3076,6 +3077,7 @@ MODULE_SCOPE void TclInitObjSubsystem(void);
MODULE_SCOPE void TclInitSubsystems(void);
MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp);
MODULE_SCOPE int TclIsSpaceProc(int byte);
+MODULE_SCOPE int TclIsDigitProc(int byte);
MODULE_SCOPE int TclIsBareword(int byte);
MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[],
int forceRelative);
@@ -4234,7 +4236,6 @@ MODULE_SCOPE int TclIndexDecode(int encoded, int endValue);
#ifdef USE_DTRACE
#ifndef _TCLDTRACE_H
-typedef const char *TclDTraceStr;
#include "tclDTrace.h"
#endif
#define TCL_DTRACE_OBJ_CREATE(objPtr) TCL_OBJ_CREATE(objPtr)
@@ -4535,8 +4536,8 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TclUnpackBignum(objPtr, bignum) \
do { \
- register Tcl_Obj *bignumObj = (objPtr); \
- register int bignumPayload = \
+ Tcl_Obj *bignumObj = (objPtr); \
+ int bignumPayload = \
PTR2INT(bignumObj->internalRep.twoPtrValue.ptr2); \
if (bignumPayload == -1) { \
(bignum) = *((mp_int *) bignumObj->internalRep.twoPtrValue.ptr1); \
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 92c6159..3188fce 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -3362,7 +3362,7 @@ int
Tcl_LimitExceeded(
Tcl_Interp *interp)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
return iPtr->limit.exceeded != 0;
}
@@ -3393,10 +3393,10 @@ int
Tcl_LimitReady(
Tcl_Interp *interp)
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
if (iPtr->limit.active != 0) {
- register int ticker = ++iPtr->limit.granularityTicker;
+ int ticker = ++iPtr->limit.granularityTicker;
if ((iPtr->limit.active & TCL_LIMIT_COMMANDS) &&
((iPtr->limit.cmdGranularity == 1) ||
@@ -3440,7 +3440,7 @@ Tcl_LimitCheck(
Tcl_Interp *interp)
{
Interp *iPtr = (Interp *) interp;
- register int ticker = iPtr->limit.granularityTicker;
+ int ticker = iPtr->limit.granularityTicker;
if (Tcl_InterpDeleted(interp)) {
return TCL_OK;
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index ad64971..d4dec9b 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -557,14 +557,14 @@ TclListObjRange(
int
Tcl_ListObjGetElements(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
- register Tcl_Obj *listPtr, /* List object for which an element array is
+ Tcl_Obj *listPtr, /* List object for which an element array is
* to be returned. */
int *objcPtr, /* Where to store the count of objects
* referenced by objv. */
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
* pointers to the list's objects. */
{
- register List *listRepPtr;
+ List *listRepPtr;
ListGetIntRep(listPtr, listRepPtr);
@@ -614,7 +614,7 @@ Tcl_ListObjGetElements(
int
Tcl_ListObjAppendList(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
- register Tcl_Obj *listPtr, /* List object to append elements to. */
+ Tcl_Obj *listPtr, /* List object to append elements to. */
Tcl_Obj *elemListPtr) /* List obj with elements to append. */
{
int objc;
@@ -673,7 +673,7 @@ Tcl_ListObjAppendElement(
Tcl_Obj *listPtr, /* List object to append objPtr to. */
Tcl_Obj *objPtr) /* Object to append to listPtr's list. */
{
- register List *listRepPtr, *newPtr = NULL;
+ List *listRepPtr, *newPtr = NULL;
int numElems, numRequired, needGrow, isShared, attempt;
if (Tcl_IsShared(listPtr)) {
@@ -844,11 +844,11 @@ Tcl_ListObjAppendElement(
int
Tcl_ListObjIndex(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
- register Tcl_Obj *listPtr, /* List object to index into. */
- register int index, /* Index of element to return. */
+ Tcl_Obj *listPtr, /* List object to index into. */
+ int index, /* Index of element to return. */
Tcl_Obj **objPtrPtr) /* The resulting Tcl_Obj* is stored here. */
{
- register List *listRepPtr;
+ List *listRepPtr;
ListGetIntRep(listPtr, listRepPtr);
if (listRepPtr == NULL) {
@@ -900,10 +900,10 @@ Tcl_ListObjIndex(
int
Tcl_ListObjLength(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
- register Tcl_Obj *listPtr, /* List object whose #elements to return. */
- register int *intPtr) /* The resulting int is stored here. */
+ Tcl_Obj *listPtr, /* List object whose #elements to return. */
+ int *intPtr) /* The resulting int is stored here. */
{
- register List *listRepPtr;
+ List *listRepPtr;
ListGetIntRep(listPtr, listRepPtr);
if (listRepPtr == NULL) {
@@ -974,7 +974,7 @@ Tcl_ListObjReplace(
* insert. */
{
List *listRepPtr;
- register Tcl_Obj **elemPtrs;
+ Tcl_Obj **elemPtrs;
int needGrow, numElems, numRequired, numAfterLast, start, i, j, isShared;
if (Tcl_IsShared(listPtr)) {
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 2f93200..5982cc8 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -58,7 +58,7 @@ static void RebuildLiteralTable(LiteralTable *tablePtr);
void
TclInitLiteralTable(
- register LiteralTable *tablePtr)
+ LiteralTable *tablePtr)
/* Pointer to table structure, which is
* supplied by the caller. */
{
@@ -209,7 +209,7 @@ TclCreateLiteral(
*/
int objLength;
- char *objBytes = TclGetStringFromObj(objPtr, &objLength);
+ const char *objBytes = TclGetStringFromObj(objPtr, &objLength);
if ((objLength == length) && ((length == 0)
|| ((objBytes[0] == bytes[0])
@@ -389,7 +389,7 @@ int
TclRegisterLiteral(
void *ePtr, /* Points to the CompileEnv in whose object
* array an object is found or created. */
- register const char *bytes, /* Points to string for which to find or
+ const char *bytes, /* Points to string for which to find or
* create an object in CompileEnv's object
* array. */
int length, /* Number of bytes in the string. If < 0, the
@@ -408,7 +408,7 @@ TclRegisterLiteral(
Tcl_Obj *objPtr;
unsigned hash;
unsigned int localHash;
- int objIndex, new;
+ int objIndex, isNew;
Namespace *nsPtr;
if (length < 0) {
@@ -462,7 +462,7 @@ TclRegisterLiteral(
*/
globalPtr = NULL;
- objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, flags,
+ objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &isNew, nsPtr, flags,
&globalPtr);
objIndex = AddLocalLiteralEntry(envPtr, objPtr, localHash);
@@ -499,13 +499,13 @@ static LiteralEntry *
LookupLiteralEntry(
Tcl_Interp *interp, /* Interpreter for which objPtr was created to
* hold a literal. */
- register Tcl_Obj *objPtr) /* Points to a Tcl object holding a literal
+ Tcl_Obj *objPtr) /* Points to a Tcl object holding a literal
* that was previously created by a call to
* TclRegisterLiteral. */
{
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr = &iPtr->literalTable;
- register LiteralEntry *entryPtr;
+ LiteralEntry *entryPtr;
const char *bytes;
int length, globalHash;
@@ -545,7 +545,7 @@ void
TclHideLiteral(
Tcl_Interp *interp, /* Interpreter for which objPtr was created to
* hold a literal. */
- register CompileEnv *envPtr,/* Points to CompileEnv whose literal array
+ CompileEnv *envPtr,/* Points to CompileEnv whose literal array
* contains the entry being hidden. */
int index) /* The index of the entry in the literal
* array. */
@@ -609,14 +609,14 @@ TclHideLiteral(
int
TclAddLiteralObj(
- register CompileEnv *envPtr,/* Points to CompileEnv in whose literal array
+ CompileEnv *envPtr,/* Points to CompileEnv in whose literal array
* the object is to be inserted. */
Tcl_Obj *objPtr, /* The object to insert into the array. */
LiteralEntry **litPtrPtr) /* The location where the pointer to the new
* literal entry should be stored. May be
* NULL. */
{
- register LiteralEntry *lPtr;
+ LiteralEntry *lPtr;
int objIndex;
if (envPtr->literalArrayNext >= envPtr->literalArrayEnd) {
@@ -658,12 +658,12 @@ TclAddLiteralObj(
static int
AddLocalLiteralEntry(
- register CompileEnv *envPtr,/* Points to CompileEnv in whose literal array
+ CompileEnv *envPtr,/* Points to CompileEnv in whose literal array
* the object is to be inserted. */
Tcl_Obj *objPtr, /* The literal to add to the CompileEnv. */
int localHash) /* Hash value for the literal's string. */
{
- register LiteralTable *localTablePtr = &envPtr->localLitTable;
+ LiteralTable *localTablePtr = &envPtr->localLitTable;
LiteralEntry *localPtr;
int objIndex;
@@ -736,7 +736,7 @@ AddLocalLiteralEntry(
static void
ExpandLocalLiteralArray(
- register CompileEnv *envPtr)/* Points to the CompileEnv whose object array
+ CompileEnv *envPtr)/* Points to the CompileEnv whose object array
* must be enlarged. */
{
/*
@@ -818,13 +818,13 @@ void
TclReleaseLiteral(
Tcl_Interp *interp, /* Interpreter for which objPtr was created to
* hold a literal. */
- register Tcl_Obj *objPtr) /* Points to a literal object that was
+ Tcl_Obj *objPtr) /* Points to a literal object that was
* previously created by a call to
* TclRegisterLiteral. */
{
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr;
- register LiteralEntry *entryPtr, *prevPtr;
+ LiteralEntry *entryPtr, *prevPtr;
const char *bytes;
int length;
unsigned int index;
@@ -898,10 +898,10 @@ TclReleaseLiteral(
static unsigned
HashString(
- register const char *string, /* String for which to compute hash value. */
+ const char *string, /* String for which to compute hash value. */
int length) /* Number of bytes in the string. */
{
- register unsigned int result = 0;
+ unsigned int result = 0;
/*
* I tried a zillion different hash functions and asked many other people
@@ -962,12 +962,12 @@ HashString(
static void
RebuildLiteralTable(
- register LiteralTable *tablePtr)
+ LiteralTable *tablePtr)
/* Local or global table to enlarge. */
{
LiteralEntry **oldBuckets;
- register LiteralEntry **oldChainPtr, **newChainPtr;
- register LiteralEntry *entryPtr;
+ LiteralEntry **oldChainPtr, **newChainPtr;
+ LiteralEntry *entryPtr;
LiteralEntry **bucketPtr;
const char *bytes;
unsigned int oldSize, index;
@@ -1098,7 +1098,7 @@ TclLiteralStats(
int overflow;
size_t i, j;
double average, tmp;
- register LiteralEntry *entryPtr;
+ LiteralEntry *entryPtr;
char *result, *p;
/*
@@ -1169,8 +1169,8 @@ TclVerifyLocalLiteralTable(
CompileEnv *envPtr) /* Points to CompileEnv whose literal table is
* to be validated. */
{
- register LiteralTable *localTablePtr = &envPtr->localLitTable;
- register LiteralEntry *localPtr;
+ LiteralTable *localTablePtr = &envPtr->localLitTable;
+ LiteralEntry *localPtr;
char *bytes;
size_t i, count;
int length;
@@ -1220,8 +1220,8 @@ TclVerifyGlobalLiteralTable(
Interp *iPtr) /* Points to interpreter whose global literal
* table is to be validated. */
{
- register LiteralTable *globalTablePtr = &iPtr->literalTable;
- register LiteralEntry *globalPtr;
+ LiteralTable *globalTablePtr = &iPtr->literalTable;
+ LiteralEntry *globalPtr;
char *bytes;
size_t i, count;
int length;
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index bbe357d..9f28661 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -240,7 +240,7 @@ TclInitNamespaceSubsystem(void)
Tcl_Namespace *
Tcl_GetCurrentNamespace(
- register Tcl_Interp *interp)/* Interpreter whose current namespace is
+ Tcl_Interp *interp)/* Interpreter whose current namespace is
* being queried. */
{
return TclGetCurrentNamespace(interp);
@@ -264,7 +264,7 @@ Tcl_GetCurrentNamespace(
Tcl_Namespace *
Tcl_GetGlobalNamespace(
- register Tcl_Interp *interp)/* Interpreter whose global namespace should
+ Tcl_Interp *interp)/* Interpreter whose global namespace should
* be returned. */
{
return TclGetGlobalNamespace(interp);
@@ -316,8 +316,8 @@ Tcl_PushCallFrame(
* variables. */
{
Interp *iPtr = (Interp *) interp;
- register CallFrame *framePtr = (CallFrame *) callFramePtr;
- register Namespace *nsPtr;
+ CallFrame *framePtr = (CallFrame *) callFramePtr;
+ Namespace *nsPtr;
if (namespacePtr == NULL) {
nsPtr = (Namespace *) TclGetCurrentNamespace(interp);
@@ -393,8 +393,8 @@ void
Tcl_PopCallFrame(
Tcl_Interp *interp) /* Interpreter with call frame to pop. */
{
- register Interp *iPtr = (Interp *) interp;
- register CallFrame *framePtr = iPtr->framePtr;
+ Interp *iPtr = (Interp *) interp;
+ CallFrame *framePtr = iPtr->framePtr;
Namespace *nsPtr;
/*
@@ -679,7 +679,7 @@ Tcl_CreateNamespace(
* function should be called. */
{
Interp *iPtr = (Interp *) interp;
- register Namespace *nsPtr, *ancestorPtr;
+ Namespace *nsPtr, *ancestorPtr;
Namespace *parentPtr, *dummy1Ptr, *dummy2Ptr;
Namespace *globalNsPtr = iPtr->globalNsPtr;
const char *simpleName;
@@ -848,7 +848,7 @@ Tcl_CreateNamespace(
for (ancestorPtr = nsPtr; ancestorPtr != NULL;
ancestorPtr = ancestorPtr->parentPtr) {
if (ancestorPtr != globalNsPtr) {
- register Tcl_DString *tempPtr = namePtr;
+ Tcl_DString *tempPtr = namePtr;
TclDStringAppendLiteral(buffPtr, "::");
Tcl_DStringAppend(buffPtr, ancestorPtr->name, -1);
@@ -922,7 +922,7 @@ void
Tcl_DeleteNamespace(
Tcl_Namespace *namespacePtr)/* Points to the namespace to delete. */
{
- register Namespace *nsPtr = (Namespace *) namespacePtr;
+ Namespace *nsPtr = (Namespace *) namespacePtr;
Interp *iPtr = (Interp *) nsPtr->interp;
Namespace *globalNsPtr = (Namespace *)
TclGetGlobalNamespace((Tcl_Interp *) iPtr);
@@ -1118,11 +1118,11 @@ TclNamespaceDeleted(
void
TclTeardownNamespace(
- register Namespace *nsPtr) /* Points to the namespace to be dismantled
+ Namespace *nsPtr) /* Points to the namespace to be dismantled
* and unlinked from its parent. */
{
Interp *iPtr = (Interp *) nsPtr->interp;
- register Tcl_HashEntry *entryPtr;
+ Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
int i;
@@ -1311,7 +1311,7 @@ TclTeardownNamespace(
static void
NamespaceFree(
- register Namespace *nsPtr) /* Points to the namespace to free. */
+ Namespace *nsPtr) /* Points to the namespace to free. */
{
/*
* Most of the namespace's contents are freed when the namespace is
@@ -1586,7 +1586,7 @@ Tcl_Import(
{
Namespace *nsPtr, *importNsPtr, *dummyPtr;
const char *simplePattern;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
/*
@@ -1865,7 +1865,7 @@ Tcl_ForgetImport(
Namespace *nsPtr, *sourceNsPtr, *dummyPtr;
const char *simplePattern;
char *cmdName;
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
/*
@@ -1992,7 +1992,7 @@ TclGetOriginalCommand(
Tcl_Command command) /* The imported command for which the original
* command should be returned. */
{
- register Command *cmdPtr = (Command *) command;
+ Command *cmdPtr = (Command *) command;
ImportedCmdData *dataPtr;
if (cmdPtr->deleteProc != DeleteImportedCmd) {
@@ -2081,7 +2081,7 @@ DeleteImportedCmd(
ImportedCmdData *dataPtr = clientData;
Command *realCmdPtr = dataPtr->realCmdPtr;
Command *selfPtr = dataPtr->selfPtr;
- register ImportRef *refPtr, *prevPtr;
+ ImportRef *refPtr, *prevPtr;
prevPtr = NULL;
for (refPtr = realCmdPtr->importRefPtr; refPtr != NULL;
@@ -2501,7 +2501,7 @@ Tcl_FindNamespace(
* points to namespace in which to resolve
* name; if NULL, look up name in the current
* namespace. */
- register int flags) /* Flags controlling namespace lookup: an OR'd
+ int flags) /* Flags controlling namespace lookup: an OR'd
* combination of TCL_GLOBAL_ONLY and
* TCL_LEAVE_ERR_MSG flags. */
{
@@ -2572,8 +2572,8 @@ Tcl_FindCommand(
{
Interp *iPtr = (Interp *) interp;
Namespace *cxtNsPtr;
- register Tcl_HashEntry *entryPtr;
- register Command *cmdPtr;
+ Tcl_HashEntry *entryPtr;
+ Command *cmdPtr;
const char *simpleName;
int result;
@@ -2684,7 +2684,7 @@ Tcl_FindCommand(
}
} else {
Namespace *nsPtr[2];
- register int search;
+ int search;
TclGetNamespaceForQualName(interp, name, cxtNsPtr,
flags, &nsPtr[0], &nsPtr[1], &cxtNsPtr, &simpleName);
@@ -2758,7 +2758,7 @@ TclResetShadowedCmdRefs(
{
char *cmdName;
Tcl_HashEntry *hPtr;
- register Namespace *nsPtr;
+ Namespace *nsPtr;
Namespace *trailNsPtr, *shadowNsPtr;
Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp);
int found, i;
@@ -3008,7 +3008,7 @@ NamespaceChildrenCmd(
Namespace *globalNsPtr = (Namespace *) TclGetGlobalNamespace(interp);
const char *pattern = NULL;
Tcl_DString buffer;
- register Tcl_HashEntry *entryPtr;
+ Tcl_HashEntry *entryPtr;
Tcl_HashSearch search;
Tcl_Obj *listPtr, *elemPtr;
@@ -3134,7 +3134,7 @@ NamespaceCodeCmd(
{
Namespace *currNsPtr;
Tcl_Obj *listPtr, *objPtr;
- register const char *arg;
+ const char *arg;
int length;
if (objc != 2) {
@@ -3213,7 +3213,7 @@ NamespaceCurrentCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Namespace *currNsPtr;
+ Namespace *currNsPtr;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
@@ -3278,7 +3278,7 @@ NamespaceDeleteCmd(
{
Tcl_Namespace *namespacePtr;
const char *name;
- register int i;
+ int i;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?name name...?");
@@ -3633,7 +3633,7 @@ NamespaceForgetCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *pattern;
- register int i, result;
+ int i, result;
if (objc < 1) {
Tcl_WrongNumArgs(interp, 1, objv, "?pattern pattern...?");
@@ -3699,7 +3699,7 @@ NamespaceImportCmd(
{
int allowOverwrite = 0;
const char *string, *pattern;
- register int i, result;
+ int i, result;
int firstArg;
if (objc < 1) {
@@ -3852,7 +3852,7 @@ NRNamespaceInscopeCmd(
cmdObjPtr = objv[2];
} else {
Tcl_Obj *concatObjv[2];
- register Tcl_Obj *listPtr;
+ Tcl_Obj *listPtr;
listPtr = Tcl_NewListObj(0, NULL);
for (i = 3; i < objc; i++) {
@@ -4253,7 +4253,7 @@ NamespaceQualifiersCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register const char *name, *p;
+ const char *name, *p;
int length;
if (objc != 2) {
@@ -4508,7 +4508,7 @@ NamespaceTailCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register const char *name, *p;
+ const char *name, *p;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "string");
@@ -4711,7 +4711,7 @@ NamespaceWhichCmd(
static void
FreeNsNameInternalRep(
- register Tcl_Obj *objPtr) /* nsName object with internal representation
+ Tcl_Obj *objPtr) /* nsName object with internal representation
* to free. */
{
ResolvedNsName *resNamePtr;
@@ -4758,7 +4758,7 @@ FreeNsNameInternalRep(
static void
DupNsNameInternalRep(
Tcl_Obj *srcPtr, /* Object with internal rep to copy. */
- register Tcl_Obj *copyPtr) /* Object with internal rep to set. */
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. */
{
ResolvedNsName *resNamePtr;
@@ -4794,11 +4794,11 @@ SetNsNameFromAny(
Tcl_Interp *interp, /* Points to the namespace in which to resolve
* name. Also used for error reporting if not
* NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
const char *dummy;
Namespace *nsPtr, *dummy1Ptr, *dummy2Ptr;
- register ResolvedNsName *resNamePtr;
+ ResolvedNsName *resNamePtr;
const char *name;
if (interp == NULL) {
@@ -4921,7 +4921,7 @@ TclLogCommandInfo(
Tcl_Obj **tosPtr) /* Current stack of bytecode execution
* context */
{
- register const char *p;
+ const char *p;
Interp *iPtr = (Interp *) interp;
int overflow, limit = 150;
Var *varPtr, *arrayPtr;
diff --git a/generic/tclOO.c b/generic/tclOO.c
index e9cc0f0..1ba262b 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -789,7 +789,7 @@ MyDeleted(
ClientData clientData) /* Reference to the object whose [my] has been
* squelched. */
{
- register Object *oPtr = clientData;
+ Object *oPtr = clientData;
oPtr->myCommand = NULL;
}
@@ -1652,7 +1652,7 @@ Tcl_NewObjectInstance(
int skip) /* Number of arguments to _not_ pass to the
* constructor. */
{
- register Class *classPtr = (Class *) cls;
+ Class *classPtr = (Class *) cls;
Object *oPtr;
ClientData clientData[4];
@@ -1722,7 +1722,7 @@ TclNRNewObjectInstance(
Tcl_Object *objectPtr) /* Place to write the object reference upon
* successful allocation. */
{
- register Class *classPtr = (Class *) cls;
+ Class *classPtr = (Class *) cls;
CallContext *contextPtr;
Tcl_InterpState state;
Object *oPtr;
@@ -2656,7 +2656,7 @@ TclOOObjectCmdCore(
methodNamePtr = objv[1];
if (oPtr->mapMethodNameProc != NULL) {
- register Class **startClsPtr = &startCls;
+ Class **startClsPtr = &startCls;
Tcl_Obj *mappedMethodName = Tcl_DuplicateObj(methodNamePtr);
result = oPtr->mapMethodNameProc(interp, (Tcl_Object) oPtr,
@@ -2715,7 +2715,7 @@ TclOOObjectCmdCore(
if (startCls != NULL) {
for (; contextPtr->index < contextPtr->callPtr->numChain;
contextPtr->index++) {
- register struct MInvoke *miPtr =
+ struct MInvoke *miPtr =
&contextPtr->callPtr->chain[contextPtr->index];
if (miPtr->isFilter) {
@@ -2853,7 +2853,7 @@ TclNRObjectContextInvokeNext(
Tcl_Obj *const *objv,
int skip)
{
- register CallContext *contextPtr = (CallContext *) context;
+ CallContext *contextPtr = (CallContext *) context;
if (contextPtr->index + 1 >= contextPtr->callPtr->numChain) {
/*
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c
index 13c98f4..6de7513 100644
--- a/generic/tclOOBasic.c
+++ b/generic/tclOOBasic.c
@@ -426,7 +426,7 @@ TclOO_Object_Eval(
{
CallContext *contextPtr = (CallContext *) context;
Tcl_Object object = Tcl_ObjectContextObject(context);
- register const int skip = Tcl_ObjectContextSkippedArgs(context);
+ const int skip = Tcl_ObjectContextSkippedArgs(context);
CallFrame *framePtr, **framePtrPtr = &framePtr;
Tcl_Obj *scriptPtr;
CmdFrame *invoker;
@@ -1122,7 +1122,7 @@ TclOOSelfObjCmd(
Tcl_SetErrorCode(interp, "TCL", "OO", "UNMATCHED_CONTEXT", NULL);
return TCL_ERROR;
} else {
- register struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr);
+ struct MInvoke *miPtr = &CurrentlyInvoked(contextPtr);
Object *oPtr;
const char *type;
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index c0d2e64..f3474b6 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -168,7 +168,7 @@ void
TclOODeleteContext(
CallContext *contextPtr)
{
- register Object *oPtr = contextPtr->oPtr;
+ Object *oPtr = contextPtr->oPtr;
TclOODeleteChain(contextPtr->callPtr);
if (oPtr != NULL) {
@@ -314,7 +314,7 @@ TclOOInvokeContext(
int objc, /* The number of arguments. */
Tcl_Obj *const objv[]) /* The arguments as actually seen. */
{
- register CallContext *const contextPtr = clientData;
+ CallContext *const contextPtr = clientData;
Method *const mPtr = contextPtr->callPtr->chain[contextPtr->index].mPtr;
const int isFilter =
contextPtr->callPtr->chain[contextPtr->index].isFilter;
@@ -968,7 +968,7 @@ AddMethodToCallChain(
* looking to add things from a mixin and have
* not passed a mixin. */
{
- register CallChain *callPtr = cbPtr->callChainPtr;
+ CallChain *callPtr = cbPtr->callChainPtr;
int i;
/*
@@ -1656,7 +1656,7 @@ AddPrivatesFromClassChainToCallContext(
(char *) methodName);
if (hPtr != NULL) {
- register Method *mPtr = Tcl_GetHashValue(hPtr);
+ Method *mPtr = Tcl_GetHashValue(hPtr);
if (IS_PRIVATE(mPtr)) {
AddMethodToCallChain(mPtr, cbPtr, doneFilters, filterDecl,
@@ -1740,7 +1740,7 @@ AddSimpleClassChainToCallContext(
privateDanger |= 1;
}
if (hPtr != NULL) {
- register Method *mPtr = Tcl_GetHashValue(hPtr);
+ Method *mPtr = Tcl_GetHashValue(hPtr);
if (!IS_PRIVATE(mPtr)) {
if (!(flags & KNOWN_STATE)) {
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index 6a00018..f259954 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -779,7 +779,7 @@ FindCommand(
{
int length;
const char *nameStr, *string = TclGetStringFromObj(stringObj, &length);
- register Namespace *const nsPtr = (Namespace *) namespacePtr;
+ Namespace *const nsPtr = (Namespace *) namespacePtr;
FOREACH_HASH_DECLS;
Tcl_Command cmd, cmd2;
@@ -1244,7 +1244,7 @@ TclOODefineSelfObjCmd(
{
Tcl_Namespace *nsPtr;
Object *oPtr;
- int result, private;
+ int result, isPrivate;
oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
@@ -1256,7 +1256,7 @@ TclOODefineSelfObjCmd(
return TCL_OK;
}
- private = IsPrivateDefine(interp);
+ isPrivate = IsPrivateDefine(interp);
/*
* Make the oo::objdefine namespace the current namespace and evaluate the
@@ -1267,7 +1267,7 @@ TclOODefineSelfObjCmd(
if (InitDefineContext(interp, nsPtr, oPtr, objc, objv) != TCL_OK) {
return TCL_ERROR;
}
- if (private) {
+ if (isPrivate) {
((Interp *) interp)->varFramePtr->isProcCallFrame = PRIVATE_FRAME;
}
diff --git a/generic/tclOOInfo.c b/generic/tclOOInfo.c
index fefeb0f..99918ae 100644
--- a/generic/tclOOInfo.c
+++ b/generic/tclOOInfo.c
@@ -809,7 +809,7 @@ InfoObjectVariablesCmd(
{
Object *oPtr;
Tcl_Obj *resultObj;
- int i, private = 0;
+ int i, isPrivate = 0;
if (objc != 2 && objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "objName ?-private?");
@@ -819,7 +819,7 @@ InfoObjectVariablesCmd(
if (strcmp("-private", Tcl_GetString(objv[2])) != 0) {
return TCL_ERROR;
}
- private = 1;
+ isPrivate = 1;
}
oPtr = (Object *) Tcl_GetObjectFromObj(interp, objv[1]);
if (oPtr == NULL) {
@@ -827,7 +827,7 @@ InfoObjectVariablesCmd(
}
resultObj = Tcl_NewObj();
- if (private) {
+ if (isPrivate) {
PrivateVariableMapping *privatePtr;
FOREACH_STRUCT(privatePtr, oPtr->privateVariables) {
@@ -1588,7 +1588,7 @@ InfoClassVariablesCmd(
{
Class *clsPtr;
Tcl_Obj *resultObj;
- int i, private = 0;
+ int i, isPrivate = 0;
if (objc != 2 && objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "className ?-private?");
@@ -1598,7 +1598,7 @@ InfoClassVariablesCmd(
if (strcmp("-private", Tcl_GetString(objv[2])) != 0) {
return TCL_ERROR;
}
- private = 1;
+ isPrivate = 1;
}
clsPtr = GetClassFromObj(interp, objv[1]);
if (clsPtr == NULL) {
@@ -1606,7 +1606,7 @@ InfoClassVariablesCmd(
}
resultObj = Tcl_NewObj();
- if (private) {
+ if (isPrivate) {
PrivateVariableMapping *privatePtr;
FOREACH_STRUCT(privatePtr, clsPtr->privateVariables) {
diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h
index c1a9010..1f44ef8 100644
--- a/generic/tclOOInt.h
+++ b/generic/tclOOInt.h
@@ -671,7 +671,7 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr);
#undef DUPLICATE /* prevent possible conflict with definition in WINAPI nb30.h */
#define DUPLICATE(target,source,type) \
do { \
- register unsigned len = sizeof(type) * ((target).num=(source).num);\
+ unsigned len = sizeof(type) * ((target).num=(source).num);\
if (len != 0) { \
memcpy(((target).list=(type*)ckalloc(len)), (source).list, len); \
} else { \
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 32dd3c7..78421e1 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -149,8 +149,8 @@ Tcl_NewInstanceMethod(
void *clientData) /* Some data associated with the particular
* method to be created. */
{
- register Object *oPtr = (Object *) object;
- register Method *mPtr;
+ Object *oPtr = (Object *) object;
+ Method *mPtr;
Tcl_HashEntry *hPtr;
int isNew;
@@ -221,8 +221,8 @@ Tcl_NewMethod(
void *clientData) /* Some data associated with the particular
* method to be created. */
{
- register Class *clsPtr = (Class *) cls;
- register Method *mPtr;
+ Class *clsPtr = (Class *) cls;
+ Method *mPtr;
Tcl_HashEntry *hPtr;
int isNew;
@@ -344,7 +344,7 @@ TclOONewProcInstanceMethod(
* interested. */
{
int argsLen;
- register ProcedureMethod *pmPtr;
+ ProcedureMethod *pmPtr;
Tcl_Method method;
if (Tcl_ListObjLength(interp, argsObj, &argsLen) != TCL_OK) {
@@ -396,7 +396,7 @@ TclOONewProcMethod(
* interested. */
{
int argsLen; /* -1 => delete argsObj before exit */
- register ProcedureMethod *pmPtr;
+ ProcedureMethod *pmPtr;
const char *procName;
Tcl_Method method;
@@ -796,7 +796,7 @@ PushMethodCallFrame(
* frame. */
{
Namespace *nsPtr = (Namespace *) contextPtr->oPtr->namespacePtr;
- register int result;
+ int result;
const char *namePtr;
CallFrame **framePtrPtr = &fdPtr->framePtr;
ByteCode *codePtr;
@@ -829,7 +829,7 @@ PushMethodCallFrame(
*/
if (pmPtr->flags & USE_DECLARER_NS) {
- register Method *mPtr =
+ Method *mPtr =
contextPtr->callPtr->chain[contextPtr->index].mPtr;
if (mPtr->declaringClassPtr != NULL) {
@@ -900,7 +900,7 @@ PushMethodCallFrame(
fdPtr->efi.fields[1].proc = pmPtr->gfivProc;
fdPtr->efi.fields[1].clientData = pmPtr;
} else {
- register Tcl_Method method =
+ Tcl_Method method =
Tcl_ObjectContextMethod((Tcl_ObjectContext) contextPtr);
if (Tcl_MethodDeclarerObject(method) != NULL) {
@@ -1294,7 +1294,7 @@ static void
DeleteProcedureMethod(
void *clientData)
{
- register ProcedureMethod *pmPtr = clientData;
+ ProcedureMethod *pmPtr = clientData;
if (pmPtr->refCount-- <= 1) {
DeleteProcedureMethodRecord(pmPtr);
@@ -1387,7 +1387,7 @@ TclOONewForwardInstanceMethod(
* prefix to forward to. */
{
int prefixLen;
- register ForwardMethod *fmPtr;
+ ForwardMethod *fmPtr;
if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) {
return NULL;
@@ -1426,7 +1426,7 @@ TclOONewForwardMethod(
* prefix to forward to. */
{
int prefixLen;
- register ForwardMethod *fmPtr;
+ ForwardMethod *fmPtr;
if (Tcl_ListObjLength(interp, prefixObj, &prefixLen) != TCL_OK) {
return NULL;
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d329aba..5c8217a 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -811,7 +811,7 @@ TclThreadFinalizeContLines(
*
* Tcl_RegisterObjType --
*
- * This function is called to register a new Tcl object type in the table
+ * This function is called to a new Tcl object type in the table
* of all object types supported by Tcl.
*
* Results:
@@ -870,7 +870,7 @@ Tcl_AppendAllObjTypes(
* name of each registered type is appended as
* a list element. */
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
int numElems;
@@ -918,7 +918,7 @@ const Tcl_ObjType *
Tcl_GetObjType(
const char *typeName) /* Name of Tcl object type to look up. */
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
const Tcl_ObjType *typePtr = NULL;
Tcl_MutexLock(&tableMutex);
@@ -1048,10 +1048,10 @@ TclDbDumpActiveObjects(
#ifdef TCL_MEM_DEBUG
void
TclDbInitNewObj(
- register Tcl_Obj *objPtr,
- register const char *file, /* The name of the source file calling this
+ Tcl_Obj *objPtr,
+ const char *file, /* The name of the source file calling this
* function; used for debugging. */
- register int line) /* Line number in the source file; used for
+ int line) /* Line number in the source file; used for
* debugging. */
{
objPtr->refCount = 0;
@@ -1135,7 +1135,7 @@ Tcl_NewObj(void)
Tcl_Obj *
Tcl_NewObj(void)
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
/*
* Use the macro defined in tclInt.h - it will use the correct allocator.
@@ -1177,12 +1177,12 @@ Tcl_NewObj(void)
Tcl_Obj *
Tcl_DbNewObj(
- register const char *file, /* The name of the source file calling this
+ const char *file, /* The name of the source file calling this
* function; used for debugging. */
- register int line) /* Line number in the source file; used for
+ int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
/*
* Use the macro defined in tclInt.h - it will use the correct allocator.
@@ -1232,8 +1232,8 @@ TclAllocateFreeObjects(void)
{
size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * sizeof(Tcl_Obj));
char *basePtr;
- register Tcl_Obj *prevPtr, *objPtr;
- register int i;
+ Tcl_Obj *prevPtr, *objPtr;
+ int i;
/*
* This has been noted by Purify to be a potential leak. The problem is
@@ -1284,9 +1284,9 @@ TclAllocateFreeObjects(void)
#ifdef TCL_MEM_DEBUG
void
TclFreeObj(
- register Tcl_Obj *objPtr) /* The object to be freed. */
+ Tcl_Obj *objPtr) /* The object to be freed. */
{
- register const Tcl_ObjType *typePtr = objPtr->typePtr;
+ const Tcl_ObjType *typePtr = objPtr->typePtr;
/*
* This macro declares a variable, so must come here...
@@ -1409,7 +1409,7 @@ TclFreeObj(
void
TclFreeObj(
- register Tcl_Obj *objPtr) /* The object to be freed. */
+ Tcl_Obj *objPtr) /* The object to be freed. */
{
/*
* Invalidate the string rep first so we can use the bytes value for our
@@ -1618,7 +1618,7 @@ TclSetDuplicateObj(
char *
Tcl_GetString(
- register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
* be returned. */
{
if (objPtr->bytes == NULL) {
@@ -1674,9 +1674,9 @@ Tcl_GetString(
char *
Tcl_GetStringFromObj(
- register Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
* be returned. */
- register int *lengthPtr) /* If non-NULL, the location where the string
+ int *lengthPtr) /* If non-NULL, the location where the string
* rep's byte array length should * be stored.
* If NULL, no length is stored. */
{
@@ -1816,7 +1816,7 @@ Tcl_InitStringRep(
void
Tcl_InvalidateStringRep(
- register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
* be freed. */
{
TclInvalidateStringRep(objPtr);
@@ -1961,7 +1961,7 @@ Tcl_FreeIntRep(
Tcl_Obj *
Tcl_NewBooleanObj(
- register int boolValue) /* Boolean used to initialize new object. */
+ int boolValue) /* Boolean used to initialize new object. */
{
return Tcl_DbNewWideIntObj(boolValue!=0, "unknown", 0);
}
@@ -1970,9 +1970,9 @@ Tcl_NewBooleanObj(
Tcl_Obj *
Tcl_NewBooleanObj(
- register int boolValue) /* Boolean used to initialize new object. */
+ int boolValue) /* Boolean used to initialize new object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewIntObj(objPtr, boolValue!=0);
return objPtr;
@@ -2011,13 +2011,13 @@ Tcl_NewBooleanObj(
Tcl_Obj *
Tcl_DbNewBooleanObj(
- register int boolValue, /* Boolean used to initialize new object. */
+ int boolValue, /* Boolean used to initialize new object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
/* Optimized TclInvalidateStringRep() */
@@ -2032,7 +2032,7 @@ Tcl_DbNewBooleanObj(
Tcl_Obj *
Tcl_DbNewBooleanObj(
- register int boolValue, /* Boolean used to initialize new object. */
+ int boolValue, /* Boolean used to initialize new object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
@@ -2063,8 +2063,8 @@ Tcl_DbNewBooleanObj(
#undef Tcl_SetBooleanObj
void
Tcl_SetBooleanObj(
- register Tcl_Obj *objPtr, /* Object whose internal rep to init. */
- register int boolValue) /* Boolean used to set object's value. */
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ int boolValue) /* Boolean used to set object's value. */
{
if (Tcl_IsShared(objPtr)) {
Tcl_Panic("%s called with shared object", "Tcl_SetBooleanObj");
@@ -2096,8 +2096,8 @@ Tcl_SetBooleanObj(
int
Tcl_GetBooleanFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get boolean. */
- register int *boolPtr) /* Place to store resulting boolean. */
+ Tcl_Obj *objPtr, /* The object from which to get boolean. */
+ int *boolPtr) /* Place to store resulting boolean. */
{
do {
if (objPtr->typePtr == &tclIntType) {
@@ -2162,7 +2162,7 @@ Tcl_GetBooleanFromObj(
int
TclSetBooleanFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
/*
* For some "pure" numeric Tcl_ObjTypes (no string rep), we can determine
@@ -2208,7 +2208,7 @@ TclSetBooleanFromAny(
static int
ParseBoolean(
- register Tcl_Obj *objPtr) /* The object to parse/convert. */
+ Tcl_Obj *objPtr) /* The object to parse/convert. */
{
int newBool;
char lowerCase[6];
@@ -2350,7 +2350,7 @@ ParseBoolean(
Tcl_Obj *
Tcl_NewDoubleObj(
- register double dblValue) /* Double used to initialize the object. */
+ double dblValue) /* Double used to initialize the object. */
{
return Tcl_DbNewDoubleObj(dblValue, "unknown", 0);
}
@@ -2359,9 +2359,9 @@ Tcl_NewDoubleObj(
Tcl_Obj *
Tcl_NewDoubleObj(
- register double dblValue) /* Double used to initialize the object. */
+ double dblValue) /* Double used to initialize the object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewDoubleObj(objPtr, dblValue);
return objPtr;
@@ -2398,13 +2398,13 @@ Tcl_NewDoubleObj(
Tcl_Obj *
Tcl_DbNewDoubleObj(
- register double dblValue, /* Double used to initialize the object. */
+ double dblValue, /* Double used to initialize the object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
/* Optimized TclInvalidateStringRep() */
@@ -2419,7 +2419,7 @@ Tcl_DbNewDoubleObj(
Tcl_Obj *
Tcl_DbNewDoubleObj(
- register double dblValue, /* Double used to initialize the object. */
+ double dblValue, /* Double used to initialize the object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
@@ -2449,8 +2449,8 @@ Tcl_DbNewDoubleObj(
void
Tcl_SetDoubleObj(
- register Tcl_Obj *objPtr, /* Object whose internal rep to init. */
- register double dblValue) /* Double used to set the object's value. */
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ double dblValue) /* Double used to set the object's value. */
{
if (Tcl_IsShared(objPtr)) {
Tcl_Panic("%s called with shared object", "Tcl_SetDoubleObj");
@@ -2482,8 +2482,8 @@ Tcl_SetDoubleObj(
int
Tcl_GetDoubleFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a double. */
- register double *dblPtr) /* Place to store resulting double. */
+ Tcl_Obj *objPtr, /* The object from which to get a double. */
+ double *dblPtr) /* Place to store resulting double. */
{
do {
if (objPtr->typePtr == &tclDoubleType) {
@@ -2537,7 +2537,7 @@ Tcl_GetDoubleFromObj(
static int
SetDoubleFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
return TclParseNumber(interp, objPtr, "floating-point number", NULL, -1,
NULL, 0);
@@ -2566,7 +2566,7 @@ SetDoubleFromAny(
static void
UpdateStringOfDouble(
- register Tcl_Obj *objPtr) /* Double obj with string rep to update. */
+ Tcl_Obj *objPtr) /* Double obj with string rep to update. */
{
char *dst = Tcl_InitStringRep(objPtr, NULL, TCL_DOUBLE_SPACE);
@@ -2612,7 +2612,7 @@ UpdateStringOfDouble(
Tcl_Obj *
Tcl_NewIntObj(
- register int intValue) /* Int used to initialize the new object. */
+ int intValue) /* Int used to initialize the new object. */
{
return Tcl_DbNewWideIntObj((long)intValue, "unknown", 0);
}
@@ -2621,9 +2621,9 @@ Tcl_NewIntObj(
Tcl_Obj *
Tcl_NewIntObj(
- register int intValue) /* Int used to initialize the new object. */
+ int intValue) /* Int used to initialize the new object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewIntObj(objPtr, intValue);
return objPtr;
@@ -2652,8 +2652,8 @@ Tcl_NewIntObj(
#undef Tcl_SetIntObj
void
Tcl_SetIntObj(
- register Tcl_Obj *objPtr, /* Object whose internal rep to init. */
- register int intValue) /* Integer used to set object's value. */
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ int intValue) /* Integer used to set object's value. */
{
if (Tcl_IsShared(objPtr)) {
Tcl_Panic("%s called with shared object", "Tcl_SetIntObj");
@@ -2692,8 +2692,8 @@ Tcl_SetIntObj(
int
Tcl_GetIntFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a int. */
- register int *intPtr) /* Place to store resulting int. */
+ Tcl_Obj *objPtr, /* The object from which to get a int. */
+ int *intPtr) /* Place to store resulting int. */
{
#if (LONG_MAX == INT_MAX)
return TclGetLongFromObj(interp, objPtr, (long *) intPtr);
@@ -2763,7 +2763,7 @@ SetIntFromAny(
static void
UpdateStringOfInt(
- register Tcl_Obj *objPtr) /* Int object whose string rep to update. */
+ Tcl_Obj *objPtr) /* Int object whose string rep to update. */
{
char *dst = Tcl_InitStringRep( objPtr, NULL, TCL_INTEGER_SPACE);
@@ -2775,7 +2775,7 @@ UpdateStringOfInt(
#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 && !defined(TCL_WIDE_INT_IS_LONG)
static void
UpdateStringOfOldInt(
- register Tcl_Obj *objPtr) /* Int object whose string rep to update. */
+ Tcl_Obj *objPtr) /* Int object whose string rep to update. */
{
char *dst = Tcl_InitStringRep( objPtr, NULL, TCL_INTEGER_SPACE);
@@ -2821,7 +2821,7 @@ UpdateStringOfOldInt(
Tcl_Obj *
Tcl_NewLongObj(
- register long longValue) /* Long integer used to initialize the
+ long longValue) /* Long integer used to initialize the
* new object. */
{
return Tcl_DbNewWideIntObj(longValue, "unknown", 0);
@@ -2831,10 +2831,10 @@ Tcl_NewLongObj(
Tcl_Obj *
Tcl_NewLongObj(
- register long longValue) /* Long integer used to initialize the
+ long longValue) /* Long integer used to initialize the
* new object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewIntObj(objPtr, longValue);
return objPtr;
@@ -2880,14 +2880,14 @@ Tcl_NewLongObj(
Tcl_Obj *
Tcl_DbNewLongObj(
- register long longValue, /* Long integer used to initialize the new
+ long longValue, /* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
/* Optimized TclInvalidateStringRep */
@@ -2902,7 +2902,7 @@ Tcl_DbNewLongObj(
Tcl_Obj *
Tcl_DbNewLongObj(
- register long longValue, /* Long integer used to initialize the new
+ long longValue, /* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -2936,8 +2936,8 @@ Tcl_DbNewLongObj(
#undef Tcl_SetLongObj
void
Tcl_SetLongObj(
- register Tcl_Obj *objPtr, /* Object whose internal rep to init. */
- register long longValue) /* Long integer used to initialize the
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ long longValue) /* Long integer used to initialize the
* object's value. */
{
if (Tcl_IsShared(objPtr)) {
@@ -2972,8 +2972,8 @@ Tcl_SetLongObj(
int
Tcl_GetLongFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a long. */
- register long *longPtr) /* Place to store resulting long. */
+ Tcl_Obj *objPtr, /* The object from which to get a long. */
+ long *longPtr) /* Place to store resulting long. */
{
do {
#ifdef TCL_WIDE_INT_IS_LONG
@@ -3086,7 +3086,7 @@ Tcl_GetLongFromObj(
Tcl_Obj *
Tcl_NewWideIntObj(
- register Tcl_WideInt wideValue)
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the new
* object. */
{
@@ -3097,11 +3097,11 @@ Tcl_NewWideIntObj(
Tcl_Obj *
Tcl_NewWideIntObj(
- register Tcl_WideInt wideValue)
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the new
* object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewObj(objPtr);
TclSetIntObj(objPtr, wideValue);
@@ -3145,7 +3145,7 @@ Tcl_NewWideIntObj(
Tcl_Obj *
Tcl_DbNewWideIntObj(
- register Tcl_WideInt wideValue,
+ Tcl_WideInt wideValue,
/* Wide integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
@@ -3153,7 +3153,7 @@ Tcl_DbNewWideIntObj(
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
TclSetIntObj(objPtr, wideValue);
@@ -3164,7 +3164,7 @@ Tcl_DbNewWideIntObj(
Tcl_Obj *
Tcl_DbNewWideIntObj(
- register Tcl_WideInt wideValue,
+ Tcl_WideInt wideValue,
/* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
@@ -3196,8 +3196,8 @@ Tcl_DbNewWideIntObj(
void
Tcl_SetWideIntObj(
- register Tcl_Obj *objPtr, /* Object w. internal rep to init. */
- register Tcl_WideInt wideValue)
+ Tcl_Obj *objPtr, /* Object w. internal rep to init. */
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the
* object's value. */
{
@@ -3232,8 +3232,8 @@ Tcl_SetWideIntObj(
int
Tcl_GetWideIntFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* Object from which to get a wide int. */
- register Tcl_WideInt *wideIntPtr)
+ Tcl_Obj *objPtr, /* Object from which to get a wide int. */
+ Tcl_WideInt *wideIntPtr)
/* Place to store resulting long. */
{
do {
@@ -3925,7 +3925,7 @@ Tcl_IsShared(
void
Tcl_DbIncrRefCount(
- register Tcl_Obj *objPtr, /* The object we are registering a reference
+ Tcl_Obj *objPtr, /* The object we are registering a reference
* to. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -3988,7 +3988,7 @@ Tcl_DbIncrRefCount(
void
Tcl_DbDecrRefCount(
- register Tcl_Obj *objPtr, /* The object we are releasing a reference
+ Tcl_Obj *objPtr, /* The object we are releasing a reference
* to. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -4054,7 +4054,7 @@ Tcl_DbDecrRefCount(
int
Tcl_DbIsShared(
- register Tcl_Obj *objPtr, /* The object to test for being shared. */
+ Tcl_Obj *objPtr, /* The object to test for being shared. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
@@ -4126,7 +4126,7 @@ Tcl_DbIsShared(
void
Tcl_InitObjHashTable(
- register Tcl_HashTable *tablePtr)
+ Tcl_HashTable *tablePtr)
/* Pointer to table record, which is supplied
* by the caller. */
{
@@ -4189,8 +4189,8 @@ TclCompareObjKeys(
{
Tcl_Obj *objPtr1 = keyPtr;
Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue;
- register const char *p1, *p2;
- register size_t l1, l2;
+ const char *p1, *p2;
+ size_t l1, l2;
/*
* If the object pointers are the same then they match.
@@ -4347,13 +4347,13 @@ Tcl_Command
Tcl_GetCommandFromObj(
Tcl_Interp *interp, /* The interpreter in which to resolve the
* command and to report errors. */
- register Tcl_Obj *objPtr) /* The object containing the command's name.
+ Tcl_Obj *objPtr) /* The object containing the command's name.
* If the name starts with "::", will be
* looked up in global namespace. Else, looked
* up first in the current namespace, then in
* global namespace. */
{
- register ResolvedCmdName *resPtr;
+ ResolvedCmdName *resPtr;
/*
* Get the internal representation, converting to a command type if
@@ -4376,12 +4376,12 @@ Tcl_GetCommandFromObj(
resPtr = objPtr->internalRep.twoPtrValue.ptr1;
if (objPtr->typePtr == &tclCmdNameType) {
- register Command *cmdPtr = resPtr->cmdPtr;
+ Command *cmdPtr = resPtr->cmdPtr;
if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch)
&& (interp == cmdPtr->nsPtr->interp)
&& !(cmdPtr->nsPtr->flags & NS_DYING)) {
- register Namespace *refNsPtr = (Namespace *)
+ Namespace *refNsPtr = (Namespace *)
TclGetCurrentNamespace(interp);
if ((resPtr->refNsPtr == NULL)
@@ -4483,12 +4483,12 @@ void
TclSetCmdNameObj(
Tcl_Interp *interp, /* Points to interpreter containing command
* that should be cached in objPtr. */
- register Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a
+ Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a
* CmdName object. */
Command *cmdPtr) /* Points to Command structure that the
* CmdName object should refer to. */
{
- register ResolvedCmdName *resPtr;
+ ResolvedCmdName *resPtr;
if (objPtr->typePtr == &tclCmdNameType) {
resPtr = objPtr->internalRep.twoPtrValue.ptr1;
@@ -4523,10 +4523,10 @@ TclSetCmdNameObj(
static void
FreeCmdNameInternalRep(
- register Tcl_Obj *objPtr) /* CmdName object with internal
+ Tcl_Obj *objPtr) /* CmdName object with internal
* representation to free. */
{
- register ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1;
+ ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1;
/*
* Decrement the reference count of the ResolvedCmdName structure. If
@@ -4571,9 +4571,9 @@ FreeCmdNameInternalRep(
static void
DupCmdNameInternalRep(
Tcl_Obj *srcPtr, /* Object with internal rep to copy. */
- register Tcl_Obj *copyPtr) /* Object with internal rep to set. */
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. */
{
- register ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1;
+ ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1;
copyPtr->internalRep.twoPtrValue.ptr1 = resPtr;
copyPtr->internalRep.twoPtrValue.ptr2 = NULL;
@@ -4605,11 +4605,11 @@ DupCmdNameInternalRep(
static int
SetCmdNameFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
const char *name;
- register Command *cmdPtr;
- register ResolvedCmdName *resPtr;
+ Command *cmdPtr;
+ ResolvedCmdName *resPtr;
if (interp == NULL) {
return TCL_ERROR;
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 164905a..897dbb6 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -195,19 +195,19 @@ Tcl_ParseCommand(
* NULL, then no error message is provided. */
const char *start, /* First character of string containing one or
* more Tcl commands. */
- register int numBytes, /* Total number of bytes in string. If < 0,
+ int numBytes, /* Total number of bytes in string. If < 0,
* the script consists of all bytes up to the
* first null character. */
int nested, /* Non-zero means this is a nested command:
* close bracket should be considered a
* command terminator. If zero, then close
* bracket has no special meaning. */
- register Tcl_Parse *parsePtr)
+ Tcl_Parse *parsePtr)
/* Structure to fill in with information about
* the parsed command; any previous
* information in the structure is ignored. */
{
- register const char *src; /* Points to current character in the
+ const char *src; /* Points to current character in the
* command. */
char type; /* Result returned by CHAR_TYPE(*src). */
Tcl_Token *tokenPtr; /* Pointer to token being filled in. */
@@ -620,14 +620,14 @@ TclIsBareword(
static int
ParseWhiteSpace(
const char *src, /* First character to parse. */
- register int numBytes, /* Max number of bytes to scan. */
+ int numBytes, /* Max number of bytes to scan. */
int *incompletePtr, /* Set this boolean memory to true if parsing
* indicates an incomplete command. */
char *typePtr) /* Points to location to store character type
* of character that ends run of whitespace */
{
- register char type = TYPE_NORMAL;
- register const char *p = src;
+ char type = TYPE_NORMAL;
+ const char *p = src;
while (1) {
while (numBytes && ((type = CHAR_TYPE(*p)) & TYPE_SPACE)) {
@@ -729,7 +729,7 @@ TclParseHex(
* conversion is to be written. */
{
int result = 0;
- register const char *p = src;
+ const char *p = src;
while (numBytes--) {
unsigned char digit = UCHAR(*p);
@@ -784,10 +784,9 @@ TclParseBackslash(
* of bytes scanned should be written. */
char *dst) /* NULL, or points to buffer where the UTF-8
* encoding of the backslash sequence is to be
- * written. At most TCL_UTF_MAX bytes will be
- * written there. */
+ * written. At most 4 bytes will be written there. */
{
- register const char *p = src+1;
+ const char *p = src+1;
Tcl_UniChar unichar = 0;
int result;
int count;
@@ -967,12 +966,12 @@ TclParseBackslash(
static int
ParseComment(
const char *src, /* First character to parse. */
- register int numBytes, /* Max number of bytes to scan. */
+ int numBytes, /* Max number of bytes to scan. */
Tcl_Parse *parsePtr) /* Information about parse in progress.
* Updated if parsing indicates an incomplete
* command. */
{
- register const char *p = src;
+ const char *p = src;
int incomplete = parsePtr->incomplete;
while (numBytes) {
@@ -1039,8 +1038,8 @@ ParseComment(
static int
ParseTokens(
- register const char *src, /* First character to parse. */
- register int numBytes, /* Max number of bytes to scan. */
+ const char *src, /* First character to parse. */
+ int numBytes, /* Max number of bytes to scan. */
int mask, /* Specifies when to stop parsing. The parse
* stops at the first unquoted character whose
* CHAR_TYPE contains any of the bits in
@@ -1318,7 +1317,7 @@ Tcl_ParseVarName(
* NULL, then no error message is provided. */
const char *start, /* Start of variable substitution string.
* First character must be "$". */
- register int numBytes, /* Total number of bytes in string. If < 0,
+ int numBytes, /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to the
* first null character. */
Tcl_Parse *parsePtr, /* Structure to fill in with information about
@@ -1329,7 +1328,7 @@ Tcl_ParseVarName(
* reinitialize it. */
{
Tcl_Token *tokenPtr;
- register const char *src;
+ const char *src;
int varIndex;
unsigned array;
@@ -1511,13 +1510,13 @@ Tcl_ParseVarName(
const char *
Tcl_ParseVar(
Tcl_Interp *interp, /* Context for looking up variable. */
- register const char *start, /* Start of variable substitution. First
+ const char *start, /* Start of variable substitution. First
* character must be "$". */
const char **termPtr) /* If non-NULL, points to word to fill in with
* character just after last one in the
* variable specifier. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
int code;
Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse));
@@ -1596,10 +1595,10 @@ Tcl_ParseBraces(
* NULL, then no error message is provided. */
const char *start, /* Start of string enclosed in braces. The
* first character must be {'. */
- register int numBytes, /* Total number of bytes in string. If < 0,
+ int numBytes, /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to the
* first null character. */
- register Tcl_Parse *parsePtr,
+ Tcl_Parse *parsePtr,
/* Structure to fill in with information about
* the string. */
int append, /* Non-zero means append tokens to existing
@@ -1612,7 +1611,7 @@ Tcl_ParseBraces(
* successful. */
{
Tcl_Token *tokenPtr;
- register const char *src;
+ const char *src;
int startIndex, level, length;
if ((numBytes == 0) || (start == NULL)) {
@@ -1738,7 +1737,7 @@ Tcl_ParseBraces(
*/
{
- register int openBrace = 0;
+ int openBrace = 0;
while (--src > start) {
switch (*src) {
@@ -1798,10 +1797,10 @@ Tcl_ParseQuotedString(
* NULL, then no error message is provided. */
const char *start, /* Start of the quoted string. The first
* character must be '"'. */
- register int numBytes, /* Total number of bytes in string. If < 0,
+ int numBytes, /* Total number of bytes in string. If < 0,
* the string consists of all bytes up to the
* first null character. */
- register Tcl_Parse *parsePtr,
+ Tcl_Parse *parsePtr,
/* Structure to fill in with information about
* the string. */
int append, /* Non-zero means append tokens to existing
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 3703aaf..2fa93d8 100644
--- a/generic/tclPathObj.c
+++ b/generic/tclPathObj.c
@@ -2242,7 +2242,7 @@ SetFsPathFromAny(
int len;
FsPath *fsPathPtr;
Tcl_Obj *transPtr;
- char *name;
+ const char *name;
if (TclHasIntRep(pathPtr, &fsPathType)) {
return TCL_OK;
@@ -2501,7 +2501,7 @@ DupFsPathInternalRep(
static void
UpdateStringOfFsPath(
- register Tcl_Obj *pathPtr) /* path obj with string rep to update. */
+ Tcl_Obj *pathPtr) /* path obj with string rep to update. */
{
FsPath *fsPathPtr = PATHOBJ(pathPtr);
int cwdLen;
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 63fd2fa..70774e7 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -183,7 +183,7 @@ Tcl_DetachPids(
* array pointed to by pidPtr. */
Tcl_Pid *pidPtr) /* Array of pids to detach. */
{
- register Detached *detPtr;
+ Detached *detPtr;
int i;
Tcl_MutexLock(&pipeMutex);
@@ -219,7 +219,7 @@ Tcl_DetachPids(
void
Tcl_ReapDetachedProcs(void)
{
- register Detached *detPtr;
+ Detached *detPtr;
Detached *nextPtr, *prevPtr;
int status, code;
@@ -413,7 +413,7 @@ TclCreatePipeline(
* at *inPipePtr. NULL means command specified
* its own input source. */
TclFile *outPipePtr, /* If non-NULL, output to the pipeline goes to
- * a pipe, unless overriden by redirection in
+ * a pipe, unless overridden by redirection in
* the command. The file id with which to read
* frome this pipe is stored at *outPipePtr.
* NULL means command specified its own output
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index ed5c57a..6727715 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -280,11 +280,11 @@ TclPkgFileSeen(
if (pkgFiles && pkgFiles->names) {
const char *name = pkgFiles->names->name;
Tcl_HashTable *table = &pkgFiles->table;
- int new;
- Tcl_HashEntry *entry = Tcl_CreateHashEntry(table, name, &new);
+ int isNew;
+ Tcl_HashEntry *entry = Tcl_CreateHashEntry(table, name, &isNew);
Tcl_Obj *list;
- if (new) {
+ if (isNew) {
list = Tcl_NewObj();
Tcl_SetHashValue(entry, list);
Tcl_IncrRefCount(list);
diff --git a/generic/tclProc.c b/generic/tclProc.c
index afa00ee..1ed48ac 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -157,7 +157,7 @@ Tcl_ProcObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
Proc *procPtr;
const char *procName;
const char *simpleName, *procArgs, *procBody;
@@ -405,9 +405,9 @@ TclCreateProc(
{
Interp *iPtr = (Interp *) interp;
- register Proc *procPtr = NULL;
+ Proc *procPtr = NULL;
int i, result, numArgs;
- register CompiledLocal *localPtr = NULL;
+ CompiledLocal *localPtr = NULL;
Tcl_Obj **argArray;
int precompiled = 0;
@@ -761,7 +761,7 @@ TclObjGetFrame(
CallFrame **framePtrPtr) /* Store pointer to frame here (or NULL if
* global frame indicated). */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
int curLevel, level, result;
const Tcl_ObjIntRep *irPtr;
const char *name = NULL;
@@ -898,7 +898,7 @@ TclNRUplevelObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
CmdFrame *invoker = NULL;
int word = 0;
int result;
@@ -1038,7 +1038,7 @@ ProcWrongNumArgs(
int skip)
{
CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
- register Proc *procPtr = framePtr->procPtr;
+ Proc *procPtr = framePtr->procPtr;
int localCt = procPtr->numCompiledLocals, numArgs, i;
Tcl_Obj **desiredObjs;
const char *final = NULL;
@@ -1063,7 +1063,7 @@ ProcWrongNumArgs(
Tcl_IncrRefCount(desiredObjs[0]);
if (localCt > 0) {
- register Var *defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt);
+ Var *defPtr = (Var *) (&framePtr->localCachePtr->varName0 + localCt);
for (i=1 ; i<=numArgs ; i++, defPtr++) {
Tcl_Obj *argObj;
@@ -1254,7 +1254,7 @@ InitResolvedLocals(
resVarInfo = localPtr->resolveInfo;
if (resVarInfo && resVarInfo->fetchProc) {
- register Var *resolvedVarPtr = (Var *)
+ Var *resolvedVarPtr = (Var *)
resVarInfo->fetchProc(interp, resVarInfo);
if (resolvedVarPtr) {
@@ -1277,7 +1277,7 @@ TclFreeLocalCache(
Tcl_Obj **namePtrPtr = &localCachePtr->varName0;
for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) {
- register Tcl_Obj *objPtr = *namePtrPtr;
+ Tcl_Obj *objPtr = *namePtrPtr;
if (objPtr) {
/* TclReleaseLiteral calls Tcl_DecrRefCount for us */
@@ -1300,7 +1300,7 @@ InitLocalCache(
Var *varPtr;
LocalCache *localCachePtr;
CompiledLocal *localPtr;
- int new;
+ int isNew;
ByteCodeGetIntRep(procPtr->bodyPtr, &tclByteCodeType, codePtr);
@@ -1323,7 +1323,7 @@ InitLocalCache(
} else {
*namePtr = TclCreateLiteral(iPtr, localPtr->name,
localPtr->nameLength, /* hash */ (unsigned int) -1,
- &new, /* nsPtr */ NULL, 0, NULL);
+ &isNew, /* nsPtr */ NULL, 0, NULL);
Tcl_IncrRefCount(*namePtr);
}
@@ -1363,16 +1363,16 @@ InitLocalCache(
static int
InitArgsAndLocals(
- register Tcl_Interp *interp,/* Interpreter in which procedure was
+ Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
int skip) /* Number of initial arguments to be skipped,
* i.e., words in the "command name". */
{
CallFrame *framePtr = ((Interp *)interp)->varFramePtr;
- register Proc *procPtr = framePtr->procPtr;
+ Proc *procPtr = framePtr->procPtr;
ByteCode *codePtr;
- register Var *varPtr, *defPtr;
+ Var *varPtr, *defPtr;
int localCt = procPtr->numCompiledLocals, numArgs, argCt, i, imax;
Tcl_Obj *const *argObjs;
@@ -1530,7 +1530,7 @@ int
TclPushProcCallFrame(
ClientData clientData, /* Record describing procedure to be
* interpreted. */
- register Tcl_Interp *interp,/* Interpreter in which procedure was
+ Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
int objc, /* Count of number of arguments to this
* procedure. */
@@ -1622,7 +1622,7 @@ int
TclObjInterpProc(
ClientData clientData, /* Record describing procedure to be
* interpreted. */
- register Tcl_Interp *interp,/* Interpreter in which procedure was
+ Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
int objc, /* Count of number of arguments to this
* procedure. */
@@ -1639,7 +1639,7 @@ int
TclNRInterpProc(
ClientData clientData, /* Record describing procedure to be
* interpreted. */
- register Tcl_Interp *interp,/* Interpreter in which procedure was
+ Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
int objc, /* Count of number of arguments to this
* procedure. */
@@ -1674,7 +1674,7 @@ TclNRInterpProc(
int
TclNRInterpProcCore(
- register Tcl_Interp *interp,/* Interpreter in which procedure was
+ Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
int skip, /* Number of initial arguments to be skipped,
@@ -1683,7 +1683,7 @@ TclNRInterpProcCore(
* results of the overall procedure. */
{
Interp *iPtr = (Interp *) interp;
- register Proc *procPtr = iPtr->varFramePtr->procPtr;
+ Proc *procPtr = iPtr->varFramePtr->procPtr;
int result;
CallFrame *freePtr;
ByteCode *codePtr;
@@ -1700,8 +1700,8 @@ TclNRInterpProcCore(
#if defined(TCL_COMPILE_DEBUG)
if (tclTraceExec >= 1) {
- register CallFrame *framePtr = iPtr->varFramePtr;
- register int i;
+ CallFrame *framePtr = iPtr->varFramePtr;
+ int i;
if (framePtr->isProcCallFrame & FRAME_IS_LAMBDA) {
fprintf(stdout, "Calling lambda ");
@@ -2119,9 +2119,9 @@ TclProcDeleteProc(
void
TclProcCleanupProc(
- register Proc *procPtr) /* Procedure to be deleted. */
+ Proc *procPtr) /* Procedure to be deleted. */
{
- register CompiledLocal *localPtr;
+ CompiledLocal *localPtr;
Tcl_Obj *bodyPtr = procPtr->bodyPtr;
Tcl_Obj *defPtr;
Tcl_ResolvedVarInfo *resVarInfo;
@@ -2370,7 +2370,7 @@ ProcBodyFree(
static void
DupLambdaInternalRep(
Tcl_Obj *srcPtr, /* Object with internal rep to copy. */
- register Tcl_Obj *copyPtr) /* Object with internal rep to set. */
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. */
{
Proc *procPtr;
Tcl_Obj *nsObjPtr;
@@ -2385,7 +2385,7 @@ DupLambdaInternalRep(
static void
FreeLambdaInternalRep(
- register Tcl_Obj *objPtr) /* CmdName object with internal representation
+ Tcl_Obj *objPtr) /* CmdName object with internal representation
* to free. */
{
Proc *procPtr;
@@ -2403,7 +2403,7 @@ FreeLambdaInternalRep(
static int
SetLambdaFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
Interp *iPtr = (Interp *) interp;
const char *name;
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 4d14f01..3c856d3 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -414,14 +414,14 @@ void
Tcl_SetResult(
Tcl_Interp *interp, /* Interpreter with which to associate the
* return value. */
- register char *result, /* Value to be returned. If NULL, the result
+ char *result, /* Value to be returned. If NULL, the result
* is set to an empty string. */
Tcl_FreeProc *freeProc) /* Gives information about the string:
* TCL_STATIC, TCL_VOLATILE, or the address of
* a Tcl_FreeProc such as free. */
{
Interp *iPtr = (Interp *) interp;
- register Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
+ Tcl_FreeProc *oldFreeProc = iPtr->freeProc;
char *oldResult = iPtr->result;
if (result == NULL) {
@@ -484,7 +484,7 @@ Tcl_SetResult(
const char *
Tcl_GetStringResult(
- register Tcl_Interp *interp)/* Interpreter whose result to return. */
+ Tcl_Interp *interp)/* Interpreter whose result to return. */
{
Interp *iPtr = (Interp *) interp;
/*
@@ -523,11 +523,11 @@ void
Tcl_SetObjResult(
Tcl_Interp *interp, /* Interpreter with which to associate the
* return object value. */
- register Tcl_Obj *objPtr) /* Tcl object to be returned. If NULL, the obj
+ Tcl_Obj *objPtr) /* Tcl object to be returned. If NULL, the obj
* result is made an empty string object. */
{
- register Interp *iPtr = (Interp *) interp;
- register Tcl_Obj *oldObjResult = iPtr->objResultPtr;
+ Interp *iPtr = (Interp *) interp;
+ Tcl_Obj *oldObjResult = iPtr->objResultPtr;
iPtr->objResultPtr = objPtr;
Tcl_IncrRefCount(objPtr); /* since interp result is a reference */
@@ -582,7 +582,7 @@ Tcl_Obj *
Tcl_GetObjResult(
Tcl_Interp *interp) /* Interpreter whose result to return. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
#ifndef TCL_NO_DEPRECATED
Tcl_Obj *objResultPtr;
int length;
@@ -832,19 +832,19 @@ SetupAppendBuffer(
totalSpace = newSpace + iPtr->appendUsed;
if (totalSpace >= iPtr->appendAvl) {
- char *new;
+ char *newSpace;
if (totalSpace < 100) {
totalSpace = 200;
} else {
totalSpace *= 2;
}
- new = ckalloc(totalSpace);
- strcpy(new, iPtr->result);
+ newSpace = ckalloc(totalSpace);
+ strcpy(newSpace, iPtr->result);
if (iPtr->appendResult != NULL) {
ckfree(iPtr->appendResult);
}
- iPtr->appendResult = new;
+ iPtr->appendResult = newSpace;
iPtr->appendAvl = totalSpace;
} else if (iPtr->result != iPtr->appendResult) {
strcpy(iPtr->appendResult, iPtr->result);
@@ -879,9 +879,9 @@ SetupAppendBuffer(
void
Tcl_FreeResult(
- register Tcl_Interp *interp)/* Interpreter for which to free result. */
+ Tcl_Interp *interp)/* Interpreter for which to free result. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
#ifndef TCL_NO_DEPRECATED
if (iPtr->freeProc != NULL) {
@@ -918,9 +918,9 @@ Tcl_FreeResult(
void
Tcl_ResetResult(
- register Tcl_Interp *interp)/* Interpreter for which to clear result. */
+ Tcl_Interp *interp)/* Interpreter for which to clear result. */
{
- register Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *) interp;
ResetObjResult(iPtr);
#ifndef TCL_NO_DEPRECATED
@@ -983,10 +983,10 @@ Tcl_ResetResult(
static void
ResetObjResult(
- register Interp *iPtr) /* Points to the interpreter whose result
+ Interp *iPtr) /* Points to the interpreter whose result
* object should be reset. */
{
- register Tcl_Obj *objResultPtr = iPtr->objResultPtr;
+ Tcl_Obj *objResultPtr = iPtr->objResultPtr;
if (Tcl_IsShared(objResultPtr)) {
TclDecrRefCount(objResultPtr);
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 547ece1..ce687c6 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3563,7 +3563,7 @@ TclStringFirst(
}
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
- unsigned char *end, *try, *bh;
+ unsigned char *end, *check, *bh;
unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
/* Find bytes in bytes */
@@ -3574,25 +3574,25 @@ TclStringFirst(
}
end = bh + lh;
- try = bh + start;
- while (try + ln <= end) {
+ check = bh + start;
+ while (check + ln <= end) {
/*
* Look for the leading byte of the needle in the haystack
- * starting at try and stopping when there's not enough room
+ * starting at check and stopping when there's not enough room
* for the needle left.
*/
- try = memchr(try, bn[0], (end + 1 - ln) - try);
- if (try == NULL) {
+ check = memchr(check, bn[0], (end + 1 - ln) - check);
+ if (check == NULL) {
/* Leading byte not found -> needle cannot be found. */
return -1;
}
/* Leading byte found, check rest of needle. */
- if (0 == memcmp(try+1, bn+1, ln-1)) {
+ if (0 == memcmp(check+1, bn+1, ln-1)) {
/* Checks! Return the successful index. */
- return (try - bh);
+ return (check - bh);
}
/* Rest of needle match failed; Iterate to continue search. */
- try++;
+ check++;
}
return -1;
}
@@ -3610,7 +3610,7 @@ TclStringFirst(
*/
{
- Tcl_UniChar *try, *end, *uh;
+ Tcl_UniChar *check, *end, *uh;
Tcl_UniChar *un = Tcl_GetUnicodeFromObj(needle, &ln);
uh = Tcl_GetUnicodeFromObj(haystack, &lh);
@@ -3620,10 +3620,10 @@ TclStringFirst(
}
end = uh + lh;
- for (try = uh + start; try + ln <= end; try++) {
- if ((*try == *un) && (0 ==
- memcmp(try + 1, un + 1, (ln-1) * sizeof(Tcl_UniChar)))) {
- return (try - uh);
+ for (check = uh + start; check + ln <= end; check++) {
+ if ((*check == *un) && (0 ==
+ memcmp(check + 1, un + 1, (ln-1) * sizeof(Tcl_UniChar)))) {
+ return (check - uh);
}
}
return -1;
@@ -3667,7 +3667,7 @@ TclStringLast(
}
if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
- unsigned char *try, *bh = Tcl_GetByteArrayFromObj(haystack, &lh);
+ unsigned char *check, *bh = Tcl_GetByteArrayFromObj(haystack, &lh);
unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
if (last >= lh) {
@@ -3677,20 +3677,20 @@ TclStringLast(
/* Don't start the loop if there cannot be a valid answer */
return -1;
}
- try = bh + last + 1 - ln;
+ check = bh + last + 1 - ln;
- while (try >= bh) {
- if ((*try == bn[0])
- && (0 == memcmp(try+1, bn+1, ln-1))) {
- return (try - bh);
+ while (check >= bh) {
+ if ((*check == bn[0])
+ && (0 == memcmp(check+1, bn+1, ln-1))) {
+ return (check - bh);
}
- try--;
+ check--;
}
return -1;
}
{
- Tcl_UniChar *try, *uh = Tcl_GetUnicodeFromObj(haystack, &lh);
+ Tcl_UniChar *check, *uh = Tcl_GetUnicodeFromObj(haystack, &lh);
Tcl_UniChar *un = Tcl_GetUnicodeFromObj(needle, &ln);
if (last >= lh) {
@@ -3700,13 +3700,13 @@ TclStringLast(
/* Don't start the loop if there cannot be a valid answer */
return -1;
}
- try = uh + last + 1 - ln;
- while (try >= uh) {
- if ((*try == un[0])
- && (0 == memcmp(try+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
- return (try - uh);
+ check = uh + last + 1 - ln;
+ while (check >= uh) {
+ if ((*check == un[0])
+ && (0 == memcmp(check+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
+ return (check - uh);
}
- try--;
+ check--;
}
return -1;
}
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 4eb8519..b365bd9 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -29,11 +29,6 @@
#include "tclRegexp.h"
/*
- * Required for TestlocaleCmd
- */
-#include <locale.h>
-
-/*
* Required for the TestChannelCmd and TestChannelEventCmd
*/
#include "tclIO.h"
@@ -2404,11 +2399,11 @@ ExitProcOdd(
void *clientData) /* Integer value to print. */
{
char buf[16 + TCL_INTEGER_SPACE];
- size_t len;
+ int len;
- sprintf(buf, "odd %" TCL_Z_MODIFIER "d\n", (size_t)PTR2INT(clientData));
+ sprintf(buf, "odd %d\n", (int)PTR2INT(clientData));
len = strlen(buf);
- if (len != (size_t) write(1, buf, len)) {
+ if (len != (int) write(1, buf, len)) {
Tcl_Panic("ExitProcOdd: unable to write to stdout");
}
}
@@ -2418,11 +2413,11 @@ ExitProcEven(
void *clientData) /* Integer value to print. */
{
char buf[16 + TCL_INTEGER_SPACE];
- size_t len;
+ int len;
- sprintf(buf, "even %" TCL_Z_MODIFIER "d\n", (size_t)PTR2INT(clientData));
+ sprintf(buf, "even %d\n", (int)PTR2INT(clientData));
len = strlen(buf);
- if (len != (size_t) write(1, buf, len)) {
+ if (len != (int) write(1, buf, len)) {
Tcl_Panic("ExitProcEven: unable to write to stdout");
}
}
@@ -5176,7 +5171,7 @@ TestbytestringObjCmd(
static int
TestsetCmd(
void *data, /* Additional flags for Get/SetVar2. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int argc, /* Number of arguments. */
const char **argv) /* Argument strings. */
{
@@ -5208,7 +5203,7 @@ TestsetCmd(
static int
Testset2Cmd(
void *data, /* Additional flags for Get/SetVar2. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int argc, /* Number of arguments. */
const char **argv) /* Argument strings. */
{
@@ -5259,7 +5254,7 @@ Testset2Cmd(
static int
TestsaveresultCmd(
void *dummy, /* Not used. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* The argument objects. */
{
@@ -5390,7 +5385,7 @@ TestsaveresultFree(
static int
TestmainthreadCmd(
void *dummy, /* Not used. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int argc, /* Number of arguments. */
const char **argv) /* Argument strings. */
{
@@ -5451,7 +5446,7 @@ MainLoop(void)
static int
TestsetmainloopCmd(
void *dummy, /* Not used. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int argc, /* Number of arguments. */
const char **argv) /* Argument strings. */
{
@@ -5480,7 +5475,7 @@ TestsetmainloopCmd(
static int
TestexitmainloopCmd(
void *dummy, /* Not used. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int argc, /* Number of arguments. */
const char **argv) /* Argument strings. */
{
diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c
index c9e4a6f..cc54f24 100644
--- a/generic/tclTestObj.c
+++ b/generic/tclTestObj.c
@@ -53,7 +53,7 @@ static int TeststringobjCmd(ClientData dummy, Tcl_Interp *interp,
static void VarPtrDeleteProc(ClientData clientData, Tcl_Interp *interp)
{
- register int i;
+ int i;
Tcl_Obj **varPtr = (Tcl_Obj **) clientData;
for (i = 0; i < NUMBER_OF_OBJECT_VARS; i++) {
if (varPtr[i]) Tcl_DecrRefCount(varPtr[i]);
@@ -91,7 +91,7 @@ int
TclObjTest_Init(
Tcl_Interp *interp)
{
- register int i;
+ int i;
/*
* An array of Tcl_Obj pointers used in the commands that operate on or get
* the values of Tcl object-valued variables. varPtr[i] is the i-th variable's
@@ -1178,8 +1178,8 @@ TeststringobjCmd(
Tcl_Obj **varPtr;
static const char *const options[] = {
"append", "appendstrings", "get", "get2", "length", "length2",
- "set", "set2", "setlength", "maxchars", "getunicode",
- "appendself", "appendself2", NULL
+ "set", "set2", "setlength", "maxchars", "appendself",
+ "appendself2", NULL
};
if (objc < 3) {
@@ -1344,13 +1344,7 @@ TeststringobjCmd(
}
Tcl_SetIntObj(Tcl_GetObjResult(interp), length);
break;
- case 10: /* getunicode */
- if (objc != 3) {
- goto wrongNumArgs;
- }
- Tcl_GetUnicode(varPtr[varIndex]);
- break;
- case 11: /* appendself */
+ case 10: /* appendself */
if (objc != 4) {
goto wrongNumArgs;
}
@@ -1381,7 +1375,7 @@ TeststringobjCmd(
Tcl_AppendToObj(varPtr[varIndex], string + i, length - i);
Tcl_SetObjResult(interp, varPtr[varIndex]);
break;
- case 12: /* appendself2 */
+ case 11: /* appendself2 */
if (objc != 4) {
goto wrongNumArgs;
}
diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c
index 913b253..11e841f 100644
--- a/generic/tclTestProcBodyObj.c
+++ b/generic/tclTestProcBodyObj.c
@@ -51,7 +51,7 @@ static int ProcBodyTestCheckObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe);
static int RegisterCommand(Tcl_Interp* interp,
- const char *namespace, const CmdTable *cmdTablePtr);
+ const char *namesp, const CmdTable *cmdTablePtr);
/*
* List of commands to create when the package is loaded; must go after the
@@ -139,7 +139,7 @@ static int
RegisterCommand(
Tcl_Interp* interp, /* the Tcl interpreter for which the operation
* is performed */
- const char *namespace, /* the namespace in which the command is
+ const char *namesp, /* the namespace in which the command is
* registered */
const CmdTable *cmdTablePtr)/* the command to register */
{
@@ -147,13 +147,13 @@ RegisterCommand(
if (cmdTablePtr->exportIt) {
sprintf(buf, "namespace eval %s { namespace export %s }",
- namespace, cmdTablePtr->cmdName);
+ namesp, cmdTablePtr->cmdName);
if (Tcl_EvalEx(interp, buf, -1, 0) != TCL_OK) {
return TCL_ERROR;
}
}
- sprintf(buf, "%s::%s", namespace, cmdTablePtr->cmdName);
+ sprintf(buf, "%s::%s", namesp, cmdTablePtr->cmdName);
Tcl_CreateObjCommand(interp, buf, cmdTablePtr->proc, 0, 0);
return TCL_OK;
}
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 3f1abc2..60d7b0c 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -248,7 +248,7 @@ TclFreeAllocCache(
{
Cache *cachePtr = arg;
Cache **nextPtrPtr;
- register unsigned int bucket;
+ unsigned int bucket;
/*
* Flush blocks.
@@ -305,7 +305,7 @@ TclpAlloc(
{
Cache *cachePtr;
Block *blockPtr;
- register int bucket;
+ int bucket;
size_t size;
#ifndef __LP64__
@@ -537,8 +537,8 @@ TclpRealloc(
Tcl_Obj *
TclThreadAllocObj(void)
{
- register Cache *cachePtr;
- register Tcl_Obj *objPtr;
+ Cache *cachePtr;
+ Tcl_Obj *objPtr;
GETCACHE(cachePtr);
@@ -548,7 +548,7 @@ TclThreadAllocObj(void)
*/
if (cachePtr->numObjects == 0) {
- register int numMove;
+ int numMove;
Tcl_MutexLock(objLockPtr);
numMove = sharedPtr->numObjects;
@@ -709,7 +709,7 @@ MoveObjs(
Cache *toPtr,
int numMove)
{
- register Tcl_Obj *objPtr = fromPtr->firstObjPtr;
+ Tcl_Obj *objPtr = fromPtr->firstObjPtr;
Tcl_Obj *fromFirstObjPtr = objPtr;
toPtr->numObjects += numMove;
@@ -810,7 +810,7 @@ Block2Ptr(
int bucket,
unsigned int reqSize)
{
- register void *ptr;
+ void *ptr;
blockPtr->magicNum1 = blockPtr->magicNum2 = MAGIC;
blockPtr->sourceBucket = bucket;
@@ -826,7 +826,7 @@ static Block *
Ptr2Block(
char *ptr)
{
- register Block *blockPtr;
+ Block *blockPtr;
blockPtr = (((Block *) ptr) - 1);
if (blockPtr->magicNum1 != MAGIC || blockPtr->magicNum2 != MAGIC) {
@@ -960,8 +960,8 @@ GetBlocks(
Cache *cachePtr,
int bucket)
{
- register Block *blockPtr;
- register int n;
+ Block *blockPtr;
+ int n;
/*
* First, atttempt to move blocks from the shared cache. Note the
@@ -1006,7 +1006,7 @@ GetBlocks(
}
if (cachePtr->buckets[bucket].numFree == 0) {
- register size_t size;
+ size_t size;
/*
* If no blocks could be moved from shared, first look for a larger
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index ea80320..934b329 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -217,7 +217,7 @@ TimerExitProc(
Tcl_DeleteEventSource(TimerSetupProc, TimerCheckProc, NULL);
if (tsdPtr != NULL) {
- register TimerHandler *timerHandlerPtr;
+ TimerHandler *timerHandlerPtr;
timerHandlerPtr = tsdPtr->firstTimerHandlerPtr;
while (timerHandlerPtr != NULL) {
@@ -294,7 +294,7 @@ TclCreateAbsoluteTimerHandler(
Tcl_TimerProc *proc,
ClientData clientData)
{
- register TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
+ TimerHandler *timerHandlerPtr, *tPtr2, *prevPtr;
ThreadSpecificData *tsdPtr = InitTimer();
timerHandlerPtr = ckalloc(sizeof(TimerHandler));
@@ -355,7 +355,7 @@ Tcl_DeleteTimerHandler(
Tcl_TimerToken token) /* Result previously returned by
* Tcl_DeleteTimerHandler. */
{
- register TimerHandler *timerHandlerPtr, *prevPtr;
+ TimerHandler *timerHandlerPtr, *prevPtr;
ThreadSpecificData *tsdPtr = InitTimer();
if (token == NULL) {
@@ -621,7 +621,7 @@ Tcl_DoWhenIdle(
Tcl_IdleProc *proc, /* Function to invoke. */
ClientData clientData) /* Arbitrary value to pass to proc. */
{
- register IdleHandler *idlePtr;
+ IdleHandler *idlePtr;
Tcl_Time blockTime;
ThreadSpecificData *tsdPtr = InitTimer();
@@ -665,7 +665,7 @@ Tcl_CancelIdleCall(
Tcl_IdleProc *proc, /* Function that was previously registered. */
ClientData clientData) /* Arbitrary value to pass to proc. */
{
- register IdleHandler *idlePtr, *prevPtr;
+ IdleHandler *idlePtr, *prevPtr;
IdleHandler *nextPtr;
ThreadSpecificData *tsdPtr = InitTimer();
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 1a6d459..cfa86b2 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -136,7 +136,7 @@ static int StringTraceProc(ClientData clientData,
static void StringTraceDeleteProc(ClientData clientData);
static void DisposeTraceResult(int flags, char *result);
static int TraceVarEx(Tcl_Interp *interp, const char *part1,
- const char *part2, register VarTrace *tracePtr);
+ const char *part2, VarTrace *tracePtr);
/*
* The following structure holds the client data for string-based
@@ -1049,7 +1049,7 @@ Tcl_CommandTraceInfo(
* call will return the first trace. */
{
Command *cmdPtr;
- register CommandTrace *tracePtr;
+ CommandTrace *tracePtr;
cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL,
TCL_LEAVE_ERR_MSG);
@@ -1114,7 +1114,7 @@ Tcl_TraceCommand(
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
Command *cmdPtr;
- register CommandTrace *tracePtr;
+ CommandTrace *tracePtr;
cmdPtr = (Command *) Tcl_FindCommand(interp, cmdName, NULL,
TCL_LEAVE_ERR_MSG);
@@ -1177,7 +1177,7 @@ Tcl_UntraceCommand(
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
- register CommandTrace *tracePtr;
+ CommandTrace *tracePtr;
CommandTrace *prevPtr;
Command *cmdPtr;
Interp *iPtr = (Interp *) interp;
@@ -1672,13 +1672,13 @@ TclCheckInterpTraces(
static int
CallTraceFunction(
Tcl_Interp *interp, /* The current interpreter. */
- register Trace *tracePtr, /* Describes the trace function to call. */
+ Trace *tracePtr, /* Describes the trace function to call. */
Command *cmdPtr, /* Points to command's Command struct. */
const char *command, /* Points to the first character of the
* command's source before substitutions. */
int numChars, /* The number of characters in the command's
* source. */
- register int objc, /* Number of arguments for the command. */
+ int objc, /* Number of arguments for the command. */
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
{
Interp *iPtr = (Interp *) interp;
@@ -1920,7 +1920,7 @@ TraceExecutionProc(
if ((flags & TCL_TRACE_ENTER_EXEC) && (tcmdPtr->stepTrace == NULL)
&& (tcmdPtr->flags & (TCL_TRACE_ENTER_DURING_EXEC |
TCL_TRACE_LEAVE_DURING_EXEC))) {
- register unsigned len = strlen(command) + 1;
+ size_t len = strlen(command) + 1;
tcmdPtr->startLevel = level;
tcmdPtr->startCmd = ckalloc(len);
@@ -2065,7 +2065,7 @@ TraceVarProc(
}
}
if (destroy && result != NULL) {
- register Tcl_Obj *errMsgObj = (Tcl_Obj *) result;
+ Tcl_Obj *errMsgObj = (Tcl_Obj *) result;
Tcl_DecrRefCount(errMsgObj);
result = NULL;
@@ -2142,8 +2142,8 @@ Tcl_CreateObjTrace(
Tcl_CmdObjTraceDeleteProc *delProc)
/* Function to call when trace is deleted */
{
- register Trace *tracePtr;
- register Interp *iPtr = (Interp *) interp;
+ Trace *tracePtr;
+ Interp *iPtr = (Interp *) interp;
/*
* Test if this trace allows inline compilation of commands.
@@ -2342,7 +2342,7 @@ Tcl_DeleteTrace(
{
Interp *iPtr = (Interp *) interp;
Trace *prevPtr, *tracePtr = (Trace *) trace;
- register Trace **tracePtr2 = &iPtr->tracePtr;
+ Trace **tracePtr2 = &iPtr->tracePtr;
ActiveInterpTrace *activePtr;
/*
@@ -2534,7 +2534,7 @@ TclCheckArrayTraces(
int
TclObjCallVarTraces(
Interp *iPtr, /* Interpreter containing variable. */
- register Var *arrayPtr, /* Pointer to array variable that contains the
+ Var *arrayPtr, /* Pointer to array variable that contains the
* variable, or NULL if the variable isn't an
* element of an array. */
Var *varPtr, /* Variable whose traces are to be invoked. */
@@ -2568,7 +2568,7 @@ TclObjCallVarTraces(
int
TclCallVarTraces(
Interp *iPtr, /* Interpreter containing variable. */
- register Var *arrayPtr, /* Pointer to array variable that contains the
+ Var *arrayPtr, /* Pointer to array variable that contains the
* variable, or NULL if the variable isn't an
* element of an array. */
Var *varPtr, /* Variable whose traces are to be invoked. */
@@ -2581,7 +2581,7 @@ TclCallVarTraces(
* error, then leave an error message and
* stack trace information in *iPTr. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
ActiveVarTrace active;
char *result;
const char *openParen, *p;
@@ -2911,7 +2911,7 @@ Tcl_UntraceVar2(
Tcl_VarTraceProc *proc, /* Function assocated with trace. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
VarTrace *prevPtr, *nextPtr;
Var *varPtr, *arrayPtr;
Interp *iPtr = (Interp *) interp;
@@ -3103,7 +3103,7 @@ Tcl_VarTraceInfo2(
hPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr);
if (hPtr) {
- register VarTrace *tracePtr = Tcl_GetHashValue(hPtr);
+ VarTrace *tracePtr = Tcl_GetHashValue(hPtr);
if (prevClientData != NULL) {
for (; tracePtr != NULL; tracePtr = tracePtr->nextPtr) {
@@ -3201,7 +3201,7 @@ Tcl_TraceVar2(
* invoked upon varName. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
{
- register VarTrace *tracePtr;
+ VarTrace *tracePtr;
int result;
tracePtr = ckalloc(sizeof(VarTrace));
@@ -3246,7 +3246,7 @@ TraceVarEx(
const char *part2, /* Name of element within array; NULL means
* trace applies to scalar variable or array
* as-a-whole. */
- register VarTrace *tracePtr)/* Structure containing flags, traceProc and
+ VarTrace *tracePtr)/* Structure containing flags, traceProc and
* clientData fields. Others should be left
* blank. Will be ckfree()d (eventually) if
* this function returns TCL_OK, and up to
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index 86d1913..6c39d1c 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -352,8 +352,8 @@ static const unsigned short cp1252[32] = {
int
Tcl_UtfToUniChar(
- register const char *src, /* The UTF-8 string. */
- register Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by
+ const char *src, /* The UTF-8 string. */
+ Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by
* the UTF-8 string. */
{
Tcl_UniChar byte;
@@ -731,12 +731,12 @@ Tcl_UtfCharComplete(
int
Tcl_NumUtfChars(
- register const char *src, /* The UTF-8 string to measure. */
+ const char *src, /* The UTF-8 string to measure. */
int length) /* The length of the string in bytes, or -1
* for strlen(string). */
{
Tcl_UniChar ch = 0;
- register int i = 0;
+ int i = 0;
/*
* The separate implementations are faster.
@@ -752,7 +752,7 @@ Tcl_NumUtfChars(
}
if (i < 0) i = INT_MAX; /* Bug [2738427] */
} else {
- register const char *endPtr = src + length - 4;
+ const char *endPtr = src + length - 4;
while (src < endPtr) {
src += TclUtfToUniChar(src, &ch);
@@ -968,8 +968,8 @@ Tcl_UtfPrev(
int
Tcl_UniCharAtIndex(
- register const char *src, /* The UTF-8 string to dereference. */
- register int index) /* The position of the desired character. */
+ const char *src, /* The UTF-8 string to dereference. */
+ int index) /* The position of the desired character. */
{
Tcl_UniChar ch = 0;
int fullchar = 0;
@@ -1016,8 +1016,8 @@ Tcl_UniCharAtIndex(
const char *
Tcl_UtfAtIndex(
- register const char *src, /* The UTF-8 string. */
- register int index) /* The position of the desired character. */
+ const char *src, /* The UTF-8 string. */
+ int index) /* The position of the desired character. */
{
Tcl_UniChar ch = 0;
int len = 0;
@@ -1044,7 +1044,7 @@ Tcl_UtfAtIndex(
*
* Results:
* Stores the bytes represented by the backslash sequence in dst and
- * returns the number of bytes written to dst. At most TCL_UTF_MAX bytes
+ * returns the number of bytes written to dst. At most 4 bytes
* are written to dst; dst must have been large enough to accept those
* bytes. If readPtr isn't NULL then it is filled in with a count of the
* number of bytes in the backslash sequence.
@@ -1323,7 +1323,7 @@ TclpUtfNcmp2(
* fine in the strcmp manner.
*/
- register int result = 0;
+ int result = 0;
for ( ; numBytes != 0; numBytes--, cs++, ct++) {
if (*cs != *ct) {
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 4387c75..8bf3eb3 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -943,8 +943,8 @@ Tcl_SplitList(
int
Tcl_ScanElement(
- register const char *src, /* String to convert to list element. */
- register int *flagPtr) /* Where to store information to guide
+ const char *src, /* String to convert to list element. */
+ int *flagPtr) /* Where to store information to guide
* Tcl_ConvertCountedElement. */
{
return Tcl_ScanCountedElement(src, -1, flagPtr);
@@ -1323,9 +1323,9 @@ TclScanElement(
int
Tcl_ConvertElement(
- register const char *src, /* Source information for list element. */
- register char *dst, /* Place to put list-ified element. */
- register int flags) /* Flags produced by Tcl_ScanElement. */
+ const char *src, /* Source information for list element. */
+ char *dst, /* Place to put list-ified element. */
+ int flags) /* Flags produced by Tcl_ScanElement. */
{
return Tcl_ConvertCountedElement(src, -1, dst, flags);
}
@@ -1353,7 +1353,7 @@ Tcl_ConvertElement(
int
Tcl_ConvertCountedElement(
- register const char *src, /* Source information for list element. */
+ const char *src, /* Source information for list element. */
int length, /* Number of bytes in src, or -1. */
char *dst, /* Place to put list-ified element. */
int flags) /* Flags produced by Tcl_ScanElement. */
@@ -1386,7 +1386,7 @@ Tcl_ConvertCountedElement(
int
TclConvertElement(
- register const char *src, /* Source information for list element. */
+ const char *src, /* Source information for list element. */
int length, /* Number of bytes in src, or -1. */
char *dst, /* Place to put list-ified element. */
int flags) /* Flags produced by Tcl_ScanElement. */
@@ -4192,7 +4192,7 @@ TclCheckBadOctal(
* errors. */
const char *value) /* String to check. */
{
- register const char *p = value;
+ const char *p = value;
/*
* A frequent mistake is invalid octal values due to an unwanted leading
diff --git a/generic/tclVar.c b/generic/tclVar.c
index e8ebd3c..4849839 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -532,7 +532,7 @@ TclLookupVar(
Var *
TclObjLookupVar(
Tcl_Interp *interp, /* Interpreter to use for lookup. */
- register Tcl_Obj *part1Ptr, /* If part2 isn't NULL, this is the name of an
+ Tcl_Obj *part1Ptr, /* If part2 isn't NULL, this is the name of an
* array. Otherwise, this is a full variable
* name that could include a parenthesized
* array element. */
@@ -605,7 +605,7 @@ TclObjLookupVarEx(
{
Interp *iPtr = (Interp *) interp;
CallFrame *varFramePtr = iPtr->varFramePtr;
- register Var *varPtr; /* Points to the variable's in-frame Var
+ Var *varPtr; /* Points to the variable's in-frame Var
* structure. */
const char *errMsg = NULL;
int index, parsed = 0;
@@ -984,7 +984,7 @@ TclLookupSimpleVar(
int localLen;
for (i=0 ; i<localCt ; i++, objPtrPtr++) {
- register Tcl_Obj *objPtr = *objPtrPtr;
+ Tcl_Obj *objPtr = *objPtrPtr;
if (objPtr) {
localNameStr = TclGetStringFromObj(objPtr, &localLen);
@@ -1325,10 +1325,10 @@ Tcl_Obj *
Tcl_ObjGetVar2(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- register Tcl_Obj *part1Ptr, /* Points to an object holding the name of an
+ Tcl_Obj *part1Ptr, /* Points to an object holding the name of an
* array (if part2 is non-NULL) or the name of
* a variable. */
- register Tcl_Obj *part2Ptr, /* If non-null, points to an object holding
+ Tcl_Obj *part2Ptr, /* If non-null, points to an object holding
* the name of an element in the array
* part1Ptr. */
int flags) /* OR-ed combination of TCL_GLOBAL_ONLY and
@@ -1423,7 +1423,7 @@ Tcl_Obj *
TclPtrGetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- register Var *varPtr, /* The variable to be read.*/
+ Var *varPtr, /* The variable to be read.*/
Var *arrayPtr, /* NULL for scalar variables, pointer to the
* containing array otherwise. */
Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or
@@ -1529,7 +1529,7 @@ TclPtrGetVarIdx(
int
Tcl_SetObjCmd(
ClientData dummy, /* Not used. */
- register Tcl_Interp *interp,/* Current interpreter. */
+ Tcl_Interp *interp,/* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
@@ -1753,10 +1753,10 @@ Tcl_Obj *
Tcl_ObjSetVar2(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be found. */
- register Tcl_Obj *part1Ptr, /* Points to an object holding the name of an
+ Tcl_Obj *part1Ptr, /* Points to an object holding the name of an
* array (if part2 is non-NULL) or the name of
* a variable. */
- register Tcl_Obj *part2Ptr, /* If non-NULL, points to an object holding
+ Tcl_Obj *part2Ptr, /* If non-NULL, points to an object holding
* the name of an element in the array
* part1Ptr. */
Tcl_Obj *newValuePtr, /* New value for variable. */
@@ -1993,7 +1993,7 @@ Tcl_Obj *
TclPtrSetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
- register Var *varPtr, /* Reference to the variable to set. */
+ Var *varPtr, /* Reference to the variable to set. */
Var *arrayPtr, /* Reference to the array containing the
* variable, or NULL if the variable is a
* scalar. */
@@ -2313,7 +2313,7 @@ TclPtrIncrObjVarIdx(
* variable, or -1. Only used when part1Ptr is
* NULL. */
{
- register Tcl_Obj *varValuePtr;
+ Tcl_Obj *varValuePtr;
if (TclIsVarInHash(varPtr)) {
VarHashRefCount(varPtr)++;
@@ -2574,7 +2574,7 @@ int
TclPtrUnsetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
- register Var *varPtr, /* The variable to be unset. */
+ Var *varPtr, /* The variable to be unset. */
Var *arrayPtr, /* NULL for scalar variables, pointer to the
* containing array otherwise. */
Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or
@@ -2828,8 +2828,8 @@ Tcl_UnsetObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register int i, flags = TCL_LEAVE_ERR_MSG;
- register const char *name;
+ int i, flags = TCL_LEAVE_ERR_MSG;
+ const char *name;
if (objc == 1) {
/*
@@ -2897,7 +2897,7 @@ Tcl_AppendObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Var *varPtr, *arrayPtr;
- register Tcl_Obj *varValuePtr = NULL;
+ Tcl_Obj *varValuePtr = NULL;
/* Initialized to avoid compiler warning. */
int i;
@@ -4953,7 +4953,7 @@ Tcl_GetVariableFullName(
* variable's full name is appended. */
{
Interp *iPtr = (Interp *) interp;
- register Var *varPtr = (Var *) variable;
+ Var *varPtr = (Var *) variable;
Tcl_Obj *namePtr;
Namespace *nsPtr;
@@ -5013,9 +5013,9 @@ Tcl_GlobalObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
- register Tcl_Obj *objPtr, *tailPtr;
+ Tcl_Obj *objPtr, *tailPtr;
const char *varName;
- register const char *tail;
+ const char *tail;
int result, i;
/*
@@ -5410,7 +5410,7 @@ ParseSearchId(
static void
DeleteSearches(
Interp *iPtr,
- register Var *arrayVarPtr) /* Variable whose searches are to be
+ Var *arrayVarPtr) /* Variable whose searches are to be
* deleted. */
{
ArraySearch *searchPtr, *nextPtr;
@@ -5552,7 +5552,7 @@ TclDeleteVars(
{
Tcl_Interp *interp = (Tcl_Interp *) iPtr;
Tcl_HashSearch search;
- register Var *varPtr;
+ Var *varPtr;
int flags;
Namespace *currNsPtr = (Namespace *) TclGetCurrentNamespace(interp);
@@ -5604,7 +5604,7 @@ TclDeleteCompiledLocalVars(
CallFrame *framePtr) /* Procedure call frame containing compiler-
* assigned local variables to delete. */
{
- register Var *varPtr;
+ Var *varPtr;
int numLocals, i;
Tcl_Obj **namePtrPtr;
@@ -5653,7 +5653,7 @@ DeleteArray(
{
Tcl_HashSearch search;
Tcl_HashEntry *tPtr;
- register Var *elPtr;
+ Var *elPtr;
ActiveVarTrace *activePtr;
Tcl_Obj *objPtr;
VarTrace *tracePtr;
@@ -5842,7 +5842,7 @@ static void
FreeParsedVarName(
Tcl_Obj *objPtr)
{
- register Tcl_Obj *arrayPtr, *elem;
+ Tcl_Obj *arrayPtr, *elem;
int parsed;
ParsedGetIntRep(objPtr, parsed, arrayPtr, elem);
@@ -5859,7 +5859,7 @@ DupParsedVarName(
Tcl_Obj *srcPtr,
Tcl_Obj *dupPtr)
{
- register Tcl_Obj *arrayPtr, *elem;
+ Tcl_Obj *arrayPtr, *elem;
int parsed;
ParsedGetIntRep(srcPtr, parsed, arrayPtr, elem);
@@ -5948,7 +5948,7 @@ ObjFindNamespaceVar(
Namespace *nsPtr[2], *cxtNsPtr;
const char *simpleName;
Var *varPtr;
- register int search;
+ int search;
int result;
Tcl_Var var;
Tcl_Obj *simpleNamePtr;
@@ -6600,8 +6600,8 @@ CompareVarKeys(
{
Tcl_Obj *objPtr1 = keyPtr;
Tcl_Obj *objPtr2 = hPtr->key.objPtr;
- register const char *p1, *p2;
- register int l1, l2;
+ const char *p1, *p2;
+ int l1, l2;
/*
* If the object pointers are the same then they match.
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 6a568fe..d842289 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -399,9 +399,7 @@ static int ZipChannelWrite(void *instanceData,
* Define the ZIP filesystem dispatch table.
*/
-MODULE_SCOPE const Tcl_Filesystem zipfsFilesystem;
-
-const Tcl_Filesystem zipfsFilesystem = {
+static const Tcl_Filesystem zipfsFilesystem = {
"zipfs",
sizeof(Tcl_Filesystem),
TCL_FILESYSTEM_VERSION_2,
@@ -4729,7 +4727,7 @@ ZipFSLoadFile(
*-------------------------------------------------------------------------
*/
-MODULE_SCOPE int
+int
TclZipfs_Init(
Tcl_Interp *interp) /* Current interpreter. */
{
diff --git a/library/http/effective_tld_names.txt.gz b/library/http/effective_tld_names.txt.gz
index 9ce2b69..13e08bb 100644
--- a/library/http/effective_tld_names.txt.gz
+++ b/library/http/effective_tld_names.txt.gz
Binary files differ
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl
index fde3ffe..ca93725 100644
--- a/library/tcltest/pkgIndex.tcl
+++ b/library/tcltest/pkgIndex.tcl
@@ -9,4 +9,4 @@
# full path name of this file's directory.
if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
-package ifneeded tcltest 2.5.0 [list source [file join $dir tcltest.tcl]]
+package ifneeded tcltest 2.5.1 [list source [file join $dir tcltest.tcl]]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index d67a900..a7a68c7 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -22,7 +22,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
- variable Version 2.5.0
+ variable Version 2.5.1
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -3072,7 +3072,12 @@ proc tcltest::removeFile {name {directory ""}} {
Warn "removeFile removing \"$fullName\":\n not a file"
}
}
- return [file delete -- $fullName]
+ if {[catch {file delete -- $fullName} msg ]} {
+ DebugDo 1 {
+ Warn "removeFile removing \"$fullName\":\n failed: $msg"
+ }
+ }
+ return
}
# tcltest::makeDirectory --
diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca
index a280415..99027c9 100644
--- a/library/tzdata/Africa/Casablanca
+++ b/library/tzdata/Africa/Casablanca
@@ -97,4 +97,106 @@ set TZData(:Africa/Casablanca) {
{2111018400 3600 0 +01}
{2138234400 0 1 +01}
{2141863200 3600 0 +01}
+ {2169079200 0 1 +01}
+ {2172103200 3600 0 +01}
+ {2199924000 0 1 +01}
+ {2202948000 3600 0 +01}
+ {2230164000 0 1 +01}
+ {2233792800 3600 0 +01}
+ {2261008800 0 1 +01}
+ {2264032800 3600 0 +01}
+ {2291248800 0 1 +01}
+ {2294877600 3600 0 +01}
+ {2322093600 0 1 +01}
+ {2325117600 3600 0 +01}
+ {2352938400 0 1 +01}
+ {2355962400 3600 0 +01}
+ {2383178400 0 1 +01}
+ {2386807200 3600 0 +01}
+ {2414023200 0 1 +01}
+ {2417047200 3600 0 +01}
+ {2444868000 0 1 +01}
+ {2447892000 3600 0 +01}
+ {2475108000 0 1 +01}
+ {2478736800 3600 0 +01}
+ {2505952800 0 1 +01}
+ {2508976800 3600 0 +01}
+ {2536192800 0 1 +01}
+ {2539821600 3600 0 +01}
+ {2567037600 0 1 +01}
+ {2570061600 3600 0 +01}
+ {2597882400 0 1 +01}
+ {2600906400 3600 0 +01}
+ {2628122400 0 1 +01}
+ {2631751200 3600 0 +01}
+ {2658967200 0 1 +01}
+ {2661991200 3600 0 +01}
+ {2689812000 0 1 +01}
+ {2692836000 3600 0 +01}
+ {2720052000 0 1 +01}
+ {2723680800 3600 0 +01}
+ {2750896800 0 1 +01}
+ {2753920800 3600 0 +01}
+ {2781136800 0 1 +01}
+ {2784765600 3600 0 +01}
+ {2811981600 0 1 +01}
+ {2815005600 3600 0 +01}
+ {2842826400 0 1 +01}
+ {2845850400 3600 0 +01}
+ {2873066400 0 1 +01}
+ {2876695200 3600 0 +01}
+ {2903911200 0 1 +01}
+ {2906935200 3600 0 +01}
+ {2934756000 0 1 +01}
+ {2937780000 3600 0 +01}
+ {2964996000 0 1 +01}
+ {2968020000 3600 0 +01}
+ {2995840800 0 1 +01}
+ {2998864800 3600 0 +01}
+ {3026080800 0 1 +01}
+ {3029709600 3600 0 +01}
+ {3056925600 0 1 +01}
+ {3059949600 3600 0 +01}
+ {3087770400 0 1 +01}
+ {3090794400 3600 0 +01}
+ {3118010400 0 1 +01}
+ {3121639200 3600 0 +01}
+ {3148855200 0 1 +01}
+ {3151879200 3600 0 +01}
+ {3179700000 0 1 +01}
+ {3182724000 3600 0 +01}
+ {3209940000 0 1 +01}
+ {3212964000 3600 0 +01}
+ {3240784800 0 1 +01}
+ {3243808800 3600 0 +01}
+ {3271024800 0 1 +01}
+ {3274653600 3600 0 +01}
+ {3301869600 0 1 +01}
+ {3304893600 3600 0 +01}
+ {3332714400 0 1 +01}
+ {3335738400 3600 0 +01}
+ {3362954400 0 1 +01}
+ {3366583200 3600 0 +01}
+ {3393799200 0 1 +01}
+ {3396823200 3600 0 +01}
+ {3424644000 0 1 +01}
+ {3427668000 3600 0 +01}
+ {3454884000 0 1 +01}
+ {3457908000 3600 0 +01}
+ {3485728800 0 1 +01}
+ {3488752800 3600 0 +01}
+ {3515968800 0 1 +01}
+ {3519597600 3600 0 +01}
+ {3546813600 0 1 +01}
+ {3549837600 3600 0 +01}
+ {3577658400 0 1 +01}
+ {3580682400 3600 0 +01}
+ {3607898400 0 1 +01}
+ {3611527200 3600 0 +01}
+ {3638743200 0 1 +01}
+ {3641767200 3600 0 +01}
+ {3669588000 0 1 +01}
+ {3672612000 3600 0 +01}
+ {3699828000 0 1 +01}
+ {3702852000 3600 0 +01}
}
diff --git a/library/tzdata/Africa/El_Aaiun b/library/tzdata/Africa/El_Aaiun
index 58a4594..9f021a4 100644
--- a/library/tzdata/Africa/El_Aaiun
+++ b/library/tzdata/Africa/El_Aaiun
@@ -86,4 +86,106 @@ set TZData(:Africa/El_Aaiun) {
{2111018400 3600 0 +01}
{2138234400 0 1 +01}
{2141863200 3600 0 +01}
+ {2169079200 0 1 +01}
+ {2172103200 3600 0 +01}
+ {2199924000 0 1 +01}
+ {2202948000 3600 0 +01}
+ {2230164000 0 1 +01}
+ {2233792800 3600 0 +01}
+ {2261008800 0 1 +01}
+ {2264032800 3600 0 +01}
+ {2291248800 0 1 +01}
+ {2294877600 3600 0 +01}
+ {2322093600 0 1 +01}
+ {2325117600 3600 0 +01}
+ {2352938400 0 1 +01}
+ {2355962400 3600 0 +01}
+ {2383178400 0 1 +01}
+ {2386807200 3600 0 +01}
+ {2414023200 0 1 +01}
+ {2417047200 3600 0 +01}
+ {2444868000 0 1 +01}
+ {2447892000 3600 0 +01}
+ {2475108000 0 1 +01}
+ {2478736800 3600 0 +01}
+ {2505952800 0 1 +01}
+ {2508976800 3600 0 +01}
+ {2536192800 0 1 +01}
+ {2539821600 3600 0 +01}
+ {2567037600 0 1 +01}
+ {2570061600 3600 0 +01}
+ {2597882400 0 1 +01}
+ {2600906400 3600 0 +01}
+ {2628122400 0 1 +01}
+ {2631751200 3600 0 +01}
+ {2658967200 0 1 +01}
+ {2661991200 3600 0 +01}
+ {2689812000 0 1 +01}
+ {2692836000 3600 0 +01}
+ {2720052000 0 1 +01}
+ {2723680800 3600 0 +01}
+ {2750896800 0 1 +01}
+ {2753920800 3600 0 +01}
+ {2781136800 0 1 +01}
+ {2784765600 3600 0 +01}
+ {2811981600 0 1 +01}
+ {2815005600 3600 0 +01}
+ {2842826400 0 1 +01}
+ {2845850400 3600 0 +01}
+ {2873066400 0 1 +01}
+ {2876695200 3600 0 +01}
+ {2903911200 0 1 +01}
+ {2906935200 3600 0 +01}
+ {2934756000 0 1 +01}
+ {2937780000 3600 0 +01}
+ {2964996000 0 1 +01}
+ {2968020000 3600 0 +01}
+ {2995840800 0 1 +01}
+ {2998864800 3600 0 +01}
+ {3026080800 0 1 +01}
+ {3029709600 3600 0 +01}
+ {3056925600 0 1 +01}
+ {3059949600 3600 0 +01}
+ {3087770400 0 1 +01}
+ {3090794400 3600 0 +01}
+ {3118010400 0 1 +01}
+ {3121639200 3600 0 +01}
+ {3148855200 0 1 +01}
+ {3151879200 3600 0 +01}
+ {3179700000 0 1 +01}
+ {3182724000 3600 0 +01}
+ {3209940000 0 1 +01}
+ {3212964000 3600 0 +01}
+ {3240784800 0 1 +01}
+ {3243808800 3600 0 +01}
+ {3271024800 0 1 +01}
+ {3274653600 3600 0 +01}
+ {3301869600 0 1 +01}
+ {3304893600 3600 0 +01}
+ {3332714400 0 1 +01}
+ {3335738400 3600 0 +01}
+ {3362954400 0 1 +01}
+ {3366583200 3600 0 +01}
+ {3393799200 0 1 +01}
+ {3396823200 3600 0 +01}
+ {3424644000 0 1 +01}
+ {3427668000 3600 0 +01}
+ {3454884000 0 1 +01}
+ {3457908000 3600 0 +01}
+ {3485728800 0 1 +01}
+ {3488752800 3600 0 +01}
+ {3515968800 0 1 +01}
+ {3519597600 3600 0 +01}
+ {3546813600 0 1 +01}
+ {3549837600 3600 0 +01}
+ {3577658400 0 1 +01}
+ {3580682400 3600 0 +01}
+ {3607898400 0 1 +01}
+ {3611527200 3600 0 +01}
+ {3638743200 0 1 +01}
+ {3641767200 3600 0 +01}
+ {3669588000 0 1 +01}
+ {3672612000 3600 0 +01}
+ {3699828000 0 1 +01}
+ {3702852000 3600 0 +01}
}
diff --git a/library/tzdata/America/Campo_Grande b/library/tzdata/America/Campo_Grande
index 5ec7112..904c27d 100644
--- a/library/tzdata/America/Campo_Grande
+++ b/library/tzdata/America/Campo_Grande
@@ -93,165 +93,4 @@ set TZData(:America/Campo_Grande) {
{1518922800 -14400 0 -04}
{1541304000 -10800 1 -04}
{1550372400 -14400 0 -04}
- {1572753600 -10800 1 -04}
- {1581822000 -14400 0 -04}
- {1604203200 -10800 1 -04}
- {1613876400 -14400 0 -04}
- {1636257600 -10800 1 -04}
- {1645326000 -14400 0 -04}
- {1667707200 -10800 1 -04}
- {1677380400 -14400 0 -04}
- {1699156800 -10800 1 -04}
- {1708225200 -14400 0 -04}
- {1730606400 -10800 1 -04}
- {1739674800 -14400 0 -04}
- {1762056000 -10800 1 -04}
- {1771729200 -14400 0 -04}
- {1793505600 -10800 1 -04}
- {1803178800 -14400 0 -04}
- {1825560000 -10800 1 -04}
- {1834628400 -14400 0 -04}
- {1857009600 -10800 1 -04}
- {1866078000 -14400 0 -04}
- {1888459200 -10800 1 -04}
- {1897527600 -14400 0 -04}
- {1919908800 -10800 1 -04}
- {1928977200 -14400 0 -04}
- {1951358400 -10800 1 -04}
- {1960426800 -14400 0 -04}
- {1983412800 -10800 1 -04}
- {1992481200 -14400 0 -04}
- {2014862400 -10800 1 -04}
- {2024535600 -14400 0 -04}
- {2046312000 -10800 1 -04}
- {2055380400 -14400 0 -04}
- {2077761600 -10800 1 -04}
- {2086830000 -14400 0 -04}
- {2109211200 -10800 1 -04}
- {2118884400 -14400 0 -04}
- {2140660800 -10800 1 -04}
- {2150334000 -14400 0 -04}
- {2172715200 -10800 1 -04}
- {2181783600 -14400 0 -04}
- {2204164800 -10800 1 -04}
- {2213233200 -14400 0 -04}
- {2235614400 -10800 1 -04}
- {2244682800 -14400 0 -04}
- {2267064000 -10800 1 -04}
- {2276132400 -14400 0 -04}
- {2298513600 -10800 1 -04}
- {2307582000 -14400 0 -04}
- {2329963200 -10800 1 -04}
- {2339636400 -14400 0 -04}
- {2362017600 -10800 1 -04}
- {2371086000 -14400 0 -04}
- {2393467200 -10800 1 -04}
- {2402535600 -14400 0 -04}
- {2424916800 -10800 1 -04}
- {2433985200 -14400 0 -04}
- {2456366400 -10800 1 -04}
- {2465434800 -14400 0 -04}
- {2487816000 -10800 1 -04}
- {2497489200 -14400 0 -04}
- {2519870400 -10800 1 -04}
- {2528938800 -14400 0 -04}
- {2551320000 -10800 1 -04}
- {2560388400 -14400 0 -04}
- {2582769600 -10800 1 -04}
- {2591838000 -14400 0 -04}
- {2614219200 -10800 1 -04}
- {2623287600 -14400 0 -04}
- {2645668800 -10800 1 -04}
- {2654737200 -14400 0 -04}
- {2677118400 -10800 1 -04}
- {2686791600 -14400 0 -04}
- {2709172800 -10800 1 -04}
- {2718241200 -14400 0 -04}
- {2740622400 -10800 1 -04}
- {2749690800 -14400 0 -04}
- {2772072000 -10800 1 -04}
- {2781140400 -14400 0 -04}
- {2803521600 -10800 1 -04}
- {2812590000 -14400 0 -04}
- {2834971200 -10800 1 -04}
- {2844039600 -14400 0 -04}
- {2867025600 -10800 1 -04}
- {2876094000 -14400 0 -04}
- {2898475200 -10800 1 -04}
- {2907543600 -14400 0 -04}
- {2929924800 -10800 1 -04}
- {2938993200 -14400 0 -04}
- {2961374400 -10800 1 -04}
- {2970442800 -14400 0 -04}
- {2992824000 -10800 1 -04}
- {3001892400 -14400 0 -04}
- {3024273600 -10800 1 -04}
- {3033946800 -14400 0 -04}
- {3056328000 -10800 1 -04}
- {3065396400 -14400 0 -04}
- {3087777600 -10800 1 -04}
- {3096846000 -14400 0 -04}
- {3119227200 -10800 1 -04}
- {3128295600 -14400 0 -04}
- {3150676800 -10800 1 -04}
- {3159745200 -14400 0 -04}
- {3182126400 -10800 1 -04}
- {3191194800 -14400 0 -04}
- {3213576000 -10800 1 -04}
- {3223249200 -14400 0 -04}
- {3245630400 -10800 1 -04}
- {3254698800 -14400 0 -04}
- {3277080000 -10800 1 -04}
- {3286148400 -14400 0 -04}
- {3308529600 -10800 1 -04}
- {3317598000 -14400 0 -04}
- {3339979200 -10800 1 -04}
- {3349047600 -14400 0 -04}
- {3371428800 -10800 1 -04}
- {3381102000 -14400 0 -04}
- {3403483200 -10800 1 -04}
- {3412551600 -14400 0 -04}
- {3434932800 -10800 1 -04}
- {3444001200 -14400 0 -04}
- {3466382400 -10800 1 -04}
- {3475450800 -14400 0 -04}
- {3497832000 -10800 1 -04}
- {3506900400 -14400 0 -04}
- {3529281600 -10800 1 -04}
- {3538350000 -14400 0 -04}
- {3560731200 -10800 1 -04}
- {3570404400 -14400 0 -04}
- {3592785600 -10800 1 -04}
- {3601854000 -14400 0 -04}
- {3624235200 -10800 1 -04}
- {3633303600 -14400 0 -04}
- {3655684800 -10800 1 -04}
- {3664753200 -14400 0 -04}
- {3687134400 -10800 1 -04}
- {3696202800 -14400 0 -04}
- {3718584000 -10800 1 -04}
- {3727652400 -14400 0 -04}
- {3750638400 -10800 1 -04}
- {3759706800 -14400 0 -04}
- {3782088000 -10800 1 -04}
- {3791156400 -14400 0 -04}
- {3813537600 -10800 1 -04}
- {3822606000 -14400 0 -04}
- {3844987200 -10800 1 -04}
- {3854055600 -14400 0 -04}
- {3876436800 -10800 1 -04}
- {3885505200 -14400 0 -04}
- {3907886400 -10800 1 -04}
- {3917559600 -14400 0 -04}
- {3939940800 -10800 1 -04}
- {3949009200 -14400 0 -04}
- {3971390400 -10800 1 -04}
- {3980458800 -14400 0 -04}
- {4002840000 -10800 1 -04}
- {4011908400 -14400 0 -04}
- {4034289600 -10800 1 -04}
- {4043358000 -14400 0 -04}
- {4065739200 -10800 1 -04}
- {4074807600 -14400 0 -04}
- {4097188800 -10800 1 -04}
}
diff --git a/library/tzdata/America/Cuiaba b/library/tzdata/America/Cuiaba
index 09f5b1f..fd97289 100644
--- a/library/tzdata/America/Cuiaba
+++ b/library/tzdata/America/Cuiaba
@@ -93,165 +93,4 @@ set TZData(:America/Cuiaba) {
{1518922800 -14400 0 -04}
{1541304000 -10800 1 -04}
{1550372400 -14400 0 -04}
- {1572753600 -10800 1 -04}
- {1581822000 -14400 0 -04}
- {1604203200 -10800 1 -04}
- {1613876400 -14400 0 -04}
- {1636257600 -10800 1 -04}
- {1645326000 -14400 0 -04}
- {1667707200 -10800 1 -04}
- {1677380400 -14400 0 -04}
- {1699156800 -10800 1 -04}
- {1708225200 -14400 0 -04}
- {1730606400 -10800 1 -04}
- {1739674800 -14400 0 -04}
- {1762056000 -10800 1 -04}
- {1771729200 -14400 0 -04}
- {1793505600 -10800 1 -04}
- {1803178800 -14400 0 -04}
- {1825560000 -10800 1 -04}
- {1834628400 -14400 0 -04}
- {1857009600 -10800 1 -04}
- {1866078000 -14400 0 -04}
- {1888459200 -10800 1 -04}
- {1897527600 -14400 0 -04}
- {1919908800 -10800 1 -04}
- {1928977200 -14400 0 -04}
- {1951358400 -10800 1 -04}
- {1960426800 -14400 0 -04}
- {1983412800 -10800 1 -04}
- {1992481200 -14400 0 -04}
- {2014862400 -10800 1 -04}
- {2024535600 -14400 0 -04}
- {2046312000 -10800 1 -04}
- {2055380400 -14400 0 -04}
- {2077761600 -10800 1 -04}
- {2086830000 -14400 0 -04}
- {2109211200 -10800 1 -04}
- {2118884400 -14400 0 -04}
- {2140660800 -10800 1 -04}
- {2150334000 -14400 0 -04}
- {2172715200 -10800 1 -04}
- {2181783600 -14400 0 -04}
- {2204164800 -10800 1 -04}
- {2213233200 -14400 0 -04}
- {2235614400 -10800 1 -04}
- {2244682800 -14400 0 -04}
- {2267064000 -10800 1 -04}
- {2276132400 -14400 0 -04}
- {2298513600 -10800 1 -04}
- {2307582000 -14400 0 -04}
- {2329963200 -10800 1 -04}
- {2339636400 -14400 0 -04}
- {2362017600 -10800 1 -04}
- {2371086000 -14400 0 -04}
- {2393467200 -10800 1 -04}
- {2402535600 -14400 0 -04}
- {2424916800 -10800 1 -04}
- {2433985200 -14400 0 -04}
- {2456366400 -10800 1 -04}
- {2465434800 -14400 0 -04}
- {2487816000 -10800 1 -04}
- {2497489200 -14400 0 -04}
- {2519870400 -10800 1 -04}
- {2528938800 -14400 0 -04}
- {2551320000 -10800 1 -04}
- {2560388400 -14400 0 -04}
- {2582769600 -10800 1 -04}
- {2591838000 -14400 0 -04}
- {2614219200 -10800 1 -04}
- {2623287600 -14400 0 -04}
- {2645668800 -10800 1 -04}
- {2654737200 -14400 0 -04}
- {2677118400 -10800 1 -04}
- {2686791600 -14400 0 -04}
- {2709172800 -10800 1 -04}
- {2718241200 -14400 0 -04}
- {2740622400 -10800 1 -04}
- {2749690800 -14400 0 -04}
- {2772072000 -10800 1 -04}
- {2781140400 -14400 0 -04}
- {2803521600 -10800 1 -04}
- {2812590000 -14400 0 -04}
- {2834971200 -10800 1 -04}
- {2844039600 -14400 0 -04}
- {2867025600 -10800 1 -04}
- {2876094000 -14400 0 -04}
- {2898475200 -10800 1 -04}
- {2907543600 -14400 0 -04}
- {2929924800 -10800 1 -04}
- {2938993200 -14400 0 -04}
- {2961374400 -10800 1 -04}
- {2970442800 -14400 0 -04}
- {2992824000 -10800 1 -04}
- {3001892400 -14400 0 -04}
- {3024273600 -10800 1 -04}
- {3033946800 -14400 0 -04}
- {3056328000 -10800 1 -04}
- {3065396400 -14400 0 -04}
- {3087777600 -10800 1 -04}
- {3096846000 -14400 0 -04}
- {3119227200 -10800 1 -04}
- {3128295600 -14400 0 -04}
- {3150676800 -10800 1 -04}
- {3159745200 -14400 0 -04}
- {3182126400 -10800 1 -04}
- {3191194800 -14400 0 -04}
- {3213576000 -10800 1 -04}
- {3223249200 -14400 0 -04}
- {3245630400 -10800 1 -04}
- {3254698800 -14400 0 -04}
- {3277080000 -10800 1 -04}
- {3286148400 -14400 0 -04}
- {3308529600 -10800 1 -04}
- {3317598000 -14400 0 -04}
- {3339979200 -10800 1 -04}
- {3349047600 -14400 0 -04}
- {3371428800 -10800 1 -04}
- {3381102000 -14400 0 -04}
- {3403483200 -10800 1 -04}
- {3412551600 -14400 0 -04}
- {3434932800 -10800 1 -04}
- {3444001200 -14400 0 -04}
- {3466382400 -10800 1 -04}
- {3475450800 -14400 0 -04}
- {3497832000 -10800 1 -04}
- {3506900400 -14400 0 -04}
- {3529281600 -10800 1 -04}
- {3538350000 -14400 0 -04}
- {3560731200 -10800 1 -04}
- {3570404400 -14400 0 -04}
- {3592785600 -10800 1 -04}
- {3601854000 -14400 0 -04}
- {3624235200 -10800 1 -04}
- {3633303600 -14400 0 -04}
- {3655684800 -10800 1 -04}
- {3664753200 -14400 0 -04}
- {3687134400 -10800 1 -04}
- {3696202800 -14400 0 -04}
- {3718584000 -10800 1 -04}
- {3727652400 -14400 0 -04}
- {3750638400 -10800 1 -04}
- {3759706800 -14400 0 -04}
- {3782088000 -10800 1 -04}
- {3791156400 -14400 0 -04}
- {3813537600 -10800 1 -04}
- {3822606000 -14400 0 -04}
- {3844987200 -10800 1 -04}
- {3854055600 -14400 0 -04}
- {3876436800 -10800 1 -04}
- {3885505200 -14400 0 -04}
- {3907886400 -10800 1 -04}
- {3917559600 -14400 0 -04}
- {3939940800 -10800 1 -04}
- {3949009200 -14400 0 -04}
- {3971390400 -10800 1 -04}
- {3980458800 -14400 0 -04}
- {4002840000 -10800 1 -04}
- {4011908400 -14400 0 -04}
- {4034289600 -10800 1 -04}
- {4043358000 -14400 0 -04}
- {4065739200 -10800 1 -04}
- {4074807600 -14400 0 -04}
- {4097188800 -10800 1 -04}
}
diff --git a/library/tzdata/America/Sao_Paulo b/library/tzdata/America/Sao_Paulo
index 235f57a..77d5d8c 100644
--- a/library/tzdata/America/Sao_Paulo
+++ b/library/tzdata/America/Sao_Paulo
@@ -94,165 +94,4 @@ set TZData(:America/Sao_Paulo) {
{1518919200 -10800 0 -03}
{1541300400 -7200 1 -03}
{1550368800 -10800 0 -03}
- {1572750000 -7200 1 -03}
- {1581818400 -10800 0 -03}
- {1604199600 -7200 1 -03}
- {1613872800 -10800 0 -03}
- {1636254000 -7200 1 -03}
- {1645322400 -10800 0 -03}
- {1667703600 -7200 1 -03}
- {1677376800 -10800 0 -03}
- {1699153200 -7200 1 -03}
- {1708221600 -10800 0 -03}
- {1730602800 -7200 1 -03}
- {1739671200 -10800 0 -03}
- {1762052400 -7200 1 -03}
- {1771725600 -10800 0 -03}
- {1793502000 -7200 1 -03}
- {1803175200 -10800 0 -03}
- {1825556400 -7200 1 -03}
- {1834624800 -10800 0 -03}
- {1857006000 -7200 1 -03}
- {1866074400 -10800 0 -03}
- {1888455600 -7200 1 -03}
- {1897524000 -10800 0 -03}
- {1919905200 -7200 1 -03}
- {1928973600 -10800 0 -03}
- {1951354800 -7200 1 -03}
- {1960423200 -10800 0 -03}
- {1983409200 -7200 1 -03}
- {1992477600 -10800 0 -03}
- {2014858800 -7200 1 -03}
- {2024532000 -10800 0 -03}
- {2046308400 -7200 1 -03}
- {2055376800 -10800 0 -03}
- {2077758000 -7200 1 -03}
- {2086826400 -10800 0 -03}
- {2109207600 -7200 1 -03}
- {2118880800 -10800 0 -03}
- {2140657200 -7200 1 -03}
- {2150330400 -10800 0 -03}
- {2172711600 -7200 1 -03}
- {2181780000 -10800 0 -03}
- {2204161200 -7200 1 -03}
- {2213229600 -10800 0 -03}
- {2235610800 -7200 1 -03}
- {2244679200 -10800 0 -03}
- {2267060400 -7200 1 -03}
- {2276128800 -10800 0 -03}
- {2298510000 -7200 1 -03}
- {2307578400 -10800 0 -03}
- {2329959600 -7200 1 -03}
- {2339632800 -10800 0 -03}
- {2362014000 -7200 1 -03}
- {2371082400 -10800 0 -03}
- {2393463600 -7200 1 -03}
- {2402532000 -10800 0 -03}
- {2424913200 -7200 1 -03}
- {2433981600 -10800 0 -03}
- {2456362800 -7200 1 -03}
- {2465431200 -10800 0 -03}
- {2487812400 -7200 1 -03}
- {2497485600 -10800 0 -03}
- {2519866800 -7200 1 -03}
- {2528935200 -10800 0 -03}
- {2551316400 -7200 1 -03}
- {2560384800 -10800 0 -03}
- {2582766000 -7200 1 -03}
- {2591834400 -10800 0 -03}
- {2614215600 -7200 1 -03}
- {2623284000 -10800 0 -03}
- {2645665200 -7200 1 -03}
- {2654733600 -10800 0 -03}
- {2677114800 -7200 1 -03}
- {2686788000 -10800 0 -03}
- {2709169200 -7200 1 -03}
- {2718237600 -10800 0 -03}
- {2740618800 -7200 1 -03}
- {2749687200 -10800 0 -03}
- {2772068400 -7200 1 -03}
- {2781136800 -10800 0 -03}
- {2803518000 -7200 1 -03}
- {2812586400 -10800 0 -03}
- {2834967600 -7200 1 -03}
- {2844036000 -10800 0 -03}
- {2867022000 -7200 1 -03}
- {2876090400 -10800 0 -03}
- {2898471600 -7200 1 -03}
- {2907540000 -10800 0 -03}
- {2929921200 -7200 1 -03}
- {2938989600 -10800 0 -03}
- {2961370800 -7200 1 -03}
- {2970439200 -10800 0 -03}
- {2992820400 -7200 1 -03}
- {3001888800 -10800 0 -03}
- {3024270000 -7200 1 -03}
- {3033943200 -10800 0 -03}
- {3056324400 -7200 1 -03}
- {3065392800 -10800 0 -03}
- {3087774000 -7200 1 -03}
- {3096842400 -10800 0 -03}
- {3119223600 -7200 1 -03}
- {3128292000 -10800 0 -03}
- {3150673200 -7200 1 -03}
- {3159741600 -10800 0 -03}
- {3182122800 -7200 1 -03}
- {3191191200 -10800 0 -03}
- {3213572400 -7200 1 -03}
- {3223245600 -10800 0 -03}
- {3245626800 -7200 1 -03}
- {3254695200 -10800 0 -03}
- {3277076400 -7200 1 -03}
- {3286144800 -10800 0 -03}
- {3308526000 -7200 1 -03}
- {3317594400 -10800 0 -03}
- {3339975600 -7200 1 -03}
- {3349044000 -10800 0 -03}
- {3371425200 -7200 1 -03}
- {3381098400 -10800 0 -03}
- {3403479600 -7200 1 -03}
- {3412548000 -10800 0 -03}
- {3434929200 -7200 1 -03}
- {3443997600 -10800 0 -03}
- {3466378800 -7200 1 -03}
- {3475447200 -10800 0 -03}
- {3497828400 -7200 1 -03}
- {3506896800 -10800 0 -03}
- {3529278000 -7200 1 -03}
- {3538346400 -10800 0 -03}
- {3560727600 -7200 1 -03}
- {3570400800 -10800 0 -03}
- {3592782000 -7200 1 -03}
- {3601850400 -10800 0 -03}
- {3624231600 -7200 1 -03}
- {3633300000 -10800 0 -03}
- {3655681200 -7200 1 -03}
- {3664749600 -10800 0 -03}
- {3687130800 -7200 1 -03}
- {3696199200 -10800 0 -03}
- {3718580400 -7200 1 -03}
- {3727648800 -10800 0 -03}
- {3750634800 -7200 1 -03}
- {3759703200 -10800 0 -03}
- {3782084400 -7200 1 -03}
- {3791152800 -10800 0 -03}
- {3813534000 -7200 1 -03}
- {3822602400 -10800 0 -03}
- {3844983600 -7200 1 -03}
- {3854052000 -10800 0 -03}
- {3876433200 -7200 1 -03}
- {3885501600 -10800 0 -03}
- {3907882800 -7200 1 -03}
- {3917556000 -10800 0 -03}
- {3939937200 -7200 1 -03}
- {3949005600 -10800 0 -03}
- {3971386800 -7200 1 -03}
- {3980455200 -10800 0 -03}
- {4002836400 -7200 1 -03}
- {4011904800 -10800 0 -03}
- {4034286000 -7200 1 -03}
- {4043354400 -10800 0 -03}
- {4065735600 -7200 1 -03}
- {4074804000 -10800 0 -03}
- {4097185200 -7200 1 -03}
}
diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza
index 6d0f144..9b73dcc 100644
--- a/library/tzdata/Asia/Gaza
+++ b/library/tzdata/Asia/Gaza
@@ -117,166 +117,166 @@ set TZData(:Asia/Gaza) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
- {1553900400 10800 1 EEST}
+ {1553810400 10800 1 EEST}
{1572040800 7200 0 EET}
- {1585350000 10800 1 EEST}
+ {1585260000 10800 1 EEST}
{1604095200 7200 0 EET}
- {1616799600 10800 1 EEST}
+ {1616709600 10800 1 EEST}
{1635544800 7200 0 EET}
- {1648249200 10800 1 EEST}
+ {1648159200 10800 1 EEST}
{1666994400 7200 0 EET}
- {1679698800 10800 1 EEST}
+ {1680213600 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711753200 10800 1 EEST}
+ {1711663200 10800 1 EEST}
{1729893600 7200 0 EET}
- {1743202800 10800 1 EEST}
+ {1743112800 10800 1 EEST}
{1761343200 7200 0 EET}
- {1774652400 10800 1 EEST}
+ {1774562400 10800 1 EEST}
{1793397600 7200 0 EET}
- {1806102000 10800 1 EEST}
+ {1806012000 10800 1 EEST}
{1824847200 7200 0 EET}
- {1837551600 10800 1 EEST}
+ {1838066400 10800 1 EEST}
{1856296800 7200 0 EET}
- {1869001200 10800 1 EEST}
+ {1869516000 10800 1 EEST}
{1887746400 7200 0 EET}
- {1901055600 10800 1 EEST}
+ {1900965600 10800 1 EEST}
{1919196000 7200 0 EET}
- {1932505200 10800 1 EEST}
+ {1932415200 10800 1 EEST}
{1950645600 7200 0 EET}
- {1963954800 10800 1 EEST}
+ {1963864800 10800 1 EEST}
{1982700000 7200 0 EET}
- {1995404400 10800 1 EEST}
+ {1995314400 10800 1 EEST}
{2014149600 7200 0 EET}
- {2026854000 10800 1 EEST}
+ {2027368800 10800 1 EEST}
{2045599200 7200 0 EET}
- {2058303600 10800 1 EEST}
+ {2058818400 10800 1 EEST}
{2077048800 7200 0 EET}
- {2090358000 10800 1 EEST}
+ {2090268000 10800 1 EEST}
{2108498400 7200 0 EET}
- {2121807600 10800 1 EEST}
+ {2121717600 10800 1 EEST}
{2140552800 7200 0 EET}
- {2153257200 10800 1 EEST}
+ {2153167200 10800 1 EEST}
{2172002400 7200 0 EET}
- {2184706800 10800 1 EEST}
+ {2184616800 10800 1 EEST}
{2203452000 7200 0 EET}
- {2216156400 10800 1 EEST}
+ {2216671200 10800 1 EEST}
{2234901600 7200 0 EET}
- {2248210800 10800 1 EEST}
+ {2248120800 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279660400 10800 1 EEST}
+ {2279570400 10800 1 EEST}
{2297800800 7200 0 EET}
- {2311110000 10800 1 EEST}
+ {2311020000 10800 1 EEST}
{2329855200 7200 0 EET}
- {2342559600 10800 1 EEST}
+ {2342469600 10800 1 EEST}
{2361304800 7200 0 EET}
- {2374009200 10800 1 EEST}
+ {2374524000 10800 1 EEST}
{2392754400 7200 0 EET}
- {2405458800 10800 1 EEST}
+ {2405973600 10800 1 EEST}
{2424204000 7200 0 EET}
- {2437513200 10800 1 EEST}
+ {2437423200 10800 1 EEST}
{2455653600 7200 0 EET}
- {2468962800 10800 1 EEST}
+ {2468872800 10800 1 EEST}
{2487708000 7200 0 EET}
- {2500412400 10800 1 EEST}
+ {2500322400 10800 1 EEST}
{2519157600 7200 0 EET}
- {2531862000 10800 1 EEST}
+ {2531772000 10800 1 EEST}
{2550607200 7200 0 EET}
- {2563311600 10800 1 EEST}
+ {2563826400 10800 1 EEST}
{2582056800 7200 0 EET}
- {2595366000 10800 1 EEST}
+ {2595276000 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626815600 10800 1 EEST}
+ {2626725600 10800 1 EEST}
{2644956000 7200 0 EET}
- {2658265200 10800 1 EEST}
+ {2658175200 10800 1 EEST}
{2677010400 7200 0 EET}
- {2689714800 10800 1 EEST}
+ {2689624800 10800 1 EEST}
{2708460000 7200 0 EET}
- {2721164400 10800 1 EEST}
+ {2721679200 10800 1 EEST}
{2739909600 7200 0 EET}
- {2752614000 10800 1 EEST}
+ {2753128800 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784668400 10800 1 EEST}
+ {2784578400 10800 1 EEST}
{2802808800 7200 0 EET}
- {2816118000 10800 1 EEST}
+ {2816028000 10800 1 EEST}
{2834258400 7200 0 EET}
- {2847567600 10800 1 EEST}
+ {2847477600 10800 1 EEST}
{2866312800 7200 0 EET}
- {2879017200 10800 1 EEST}
+ {2878927200 10800 1 EEST}
{2897762400 7200 0 EET}
- {2910466800 10800 1 EEST}
+ {2910981600 10800 1 EEST}
{2929212000 7200 0 EET}
- {2941916400 10800 1 EEST}
+ {2942431200 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973970800 10800 1 EEST}
+ {2973880800 10800 1 EEST}
{2992111200 7200 0 EET}
- {3005420400 10800 1 EEST}
+ {3005330400 10800 1 EEST}
{3024165600 7200 0 EET}
- {3036870000 10800 1 EEST}
+ {3036780000 10800 1 EEST}
{3055615200 7200 0 EET}
- {3068319600 10800 1 EEST}
+ {3068229600 10800 1 EEST}
{3087064800 7200 0 EET}
- {3099769200 10800 1 EEST}
+ {3100284000 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131823600 10800 1 EEST}
+ {3131733600 10800 1 EEST}
{3149964000 7200 0 EET}
- {3163273200 10800 1 EEST}
+ {3163183200 10800 1 EEST}
{3181413600 7200 0 EET}
- {3194722800 10800 1 EEST}
+ {3194632800 10800 1 EEST}
{3213468000 7200 0 EET}
- {3226172400 10800 1 EEST}
+ {3226082400 10800 1 EEST}
{3244917600 7200 0 EET}
- {3257622000 10800 1 EEST}
+ {3258136800 10800 1 EEST}
{3276367200 7200 0 EET}
- {3289071600 10800 1 EEST}
+ {3289586400 10800 1 EEST}
{3307816800 7200 0 EET}
- {3321126000 10800 1 EEST}
+ {3321036000 10800 1 EEST}
{3339266400 7200 0 EET}
- {3352575600 10800 1 EEST}
+ {3352485600 10800 1 EEST}
{3371320800 7200 0 EET}
- {3384025200 10800 1 EEST}
+ {3383935200 10800 1 EEST}
{3402770400 7200 0 EET}
- {3415474800 10800 1 EEST}
+ {3415384800 10800 1 EEST}
{3434220000 7200 0 EET}
- {3446924400 10800 1 EEST}
+ {3447439200 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478978800 10800 1 EEST}
+ {3478888800 10800 1 EEST}
{3497119200 7200 0 EET}
- {3510428400 10800 1 EEST}
+ {3510338400 10800 1 EEST}
{3528568800 7200 0 EET}
- {3541878000 10800 1 EEST}
+ {3541788000 10800 1 EEST}
{3560623200 7200 0 EET}
- {3573327600 10800 1 EEST}
+ {3573237600 10800 1 EEST}
{3592072800 7200 0 EET}
- {3604777200 10800 1 EEST}
+ {3605292000 10800 1 EEST}
{3623522400 7200 0 EET}
- {3636226800 10800 1 EEST}
+ {3636741600 10800 1 EEST}
{3654972000 7200 0 EET}
- {3668281200 10800 1 EEST}
+ {3668191200 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699730800 10800 1 EEST}
+ {3699640800 10800 1 EEST}
{3717871200 7200 0 EET}
- {3731180400 10800 1 EEST}
+ {3731090400 10800 1 EEST}
{3749925600 7200 0 EET}
- {3762630000 10800 1 EEST}
+ {3762540000 10800 1 EEST}
{3781375200 7200 0 EET}
- {3794079600 10800 1 EEST}
+ {3794594400 10800 1 EEST}
{3812824800 7200 0 EET}
- {3825529200 10800 1 EEST}
+ {3826044000 10800 1 EEST}
{3844274400 7200 0 EET}
- {3857583600 10800 1 EEST}
+ {3857493600 10800 1 EEST}
{3875724000 7200 0 EET}
- {3889033200 10800 1 EEST}
+ {3888943200 10800 1 EEST}
{3907778400 7200 0 EET}
- {3920482800 10800 1 EEST}
+ {3920392800 10800 1 EEST}
{3939228000 7200 0 EET}
- {3951932400 10800 1 EEST}
+ {3951842400 10800 1 EEST}
{3970677600 7200 0 EET}
- {3983382000 10800 1 EEST}
+ {3983896800 10800 1 EEST}
{4002127200 7200 0 EET}
- {4015436400 10800 1 EEST}
+ {4015346400 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046886000 10800 1 EEST}
+ {4046796000 10800 1 EEST}
{4065026400 7200 0 EET}
- {4078335600 10800 1 EEST}
+ {4078245600 10800 1 EEST}
{4097080800 7200 0 EET}
}
diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron
index 9249910..fe8f7e1 100644
--- a/library/tzdata/Asia/Hebron
+++ b/library/tzdata/Asia/Hebron
@@ -116,166 +116,166 @@ set TZData(:Asia/Hebron) {
{1509141600 7200 0 EET}
{1521846000 10800 1 EEST}
{1540591200 7200 0 EET}
- {1553900400 10800 1 EEST}
+ {1553810400 10800 1 EEST}
{1572040800 7200 0 EET}
- {1585350000 10800 1 EEST}
+ {1585260000 10800 1 EEST}
{1604095200 7200 0 EET}
- {1616799600 10800 1 EEST}
+ {1616709600 10800 1 EEST}
{1635544800 7200 0 EET}
- {1648249200 10800 1 EEST}
+ {1648159200 10800 1 EEST}
{1666994400 7200 0 EET}
- {1679698800 10800 1 EEST}
+ {1680213600 10800 1 EEST}
{1698444000 7200 0 EET}
- {1711753200 10800 1 EEST}
+ {1711663200 10800 1 EEST}
{1729893600 7200 0 EET}
- {1743202800 10800 1 EEST}
+ {1743112800 10800 1 EEST}
{1761343200 7200 0 EET}
- {1774652400 10800 1 EEST}
+ {1774562400 10800 1 EEST}
{1793397600 7200 0 EET}
- {1806102000 10800 1 EEST}
+ {1806012000 10800 1 EEST}
{1824847200 7200 0 EET}
- {1837551600 10800 1 EEST}
+ {1838066400 10800 1 EEST}
{1856296800 7200 0 EET}
- {1869001200 10800 1 EEST}
+ {1869516000 10800 1 EEST}
{1887746400 7200 0 EET}
- {1901055600 10800 1 EEST}
+ {1900965600 10800 1 EEST}
{1919196000 7200 0 EET}
- {1932505200 10800 1 EEST}
+ {1932415200 10800 1 EEST}
{1950645600 7200 0 EET}
- {1963954800 10800 1 EEST}
+ {1963864800 10800 1 EEST}
{1982700000 7200 0 EET}
- {1995404400 10800 1 EEST}
+ {1995314400 10800 1 EEST}
{2014149600 7200 0 EET}
- {2026854000 10800 1 EEST}
+ {2027368800 10800 1 EEST}
{2045599200 7200 0 EET}
- {2058303600 10800 1 EEST}
+ {2058818400 10800 1 EEST}
{2077048800 7200 0 EET}
- {2090358000 10800 1 EEST}
+ {2090268000 10800 1 EEST}
{2108498400 7200 0 EET}
- {2121807600 10800 1 EEST}
+ {2121717600 10800 1 EEST}
{2140552800 7200 0 EET}
- {2153257200 10800 1 EEST}
+ {2153167200 10800 1 EEST}
{2172002400 7200 0 EET}
- {2184706800 10800 1 EEST}
+ {2184616800 10800 1 EEST}
{2203452000 7200 0 EET}
- {2216156400 10800 1 EEST}
+ {2216671200 10800 1 EEST}
{2234901600 7200 0 EET}
- {2248210800 10800 1 EEST}
+ {2248120800 10800 1 EEST}
{2266351200 7200 0 EET}
- {2279660400 10800 1 EEST}
+ {2279570400 10800 1 EEST}
{2297800800 7200 0 EET}
- {2311110000 10800 1 EEST}
+ {2311020000 10800 1 EEST}
{2329855200 7200 0 EET}
- {2342559600 10800 1 EEST}
+ {2342469600 10800 1 EEST}
{2361304800 7200 0 EET}
- {2374009200 10800 1 EEST}
+ {2374524000 10800 1 EEST}
{2392754400 7200 0 EET}
- {2405458800 10800 1 EEST}
+ {2405973600 10800 1 EEST}
{2424204000 7200 0 EET}
- {2437513200 10800 1 EEST}
+ {2437423200 10800 1 EEST}
{2455653600 7200 0 EET}
- {2468962800 10800 1 EEST}
+ {2468872800 10800 1 EEST}
{2487708000 7200 0 EET}
- {2500412400 10800 1 EEST}
+ {2500322400 10800 1 EEST}
{2519157600 7200 0 EET}
- {2531862000 10800 1 EEST}
+ {2531772000 10800 1 EEST}
{2550607200 7200 0 EET}
- {2563311600 10800 1 EEST}
+ {2563826400 10800 1 EEST}
{2582056800 7200 0 EET}
- {2595366000 10800 1 EEST}
+ {2595276000 10800 1 EEST}
{2613506400 7200 0 EET}
- {2626815600 10800 1 EEST}
+ {2626725600 10800 1 EEST}
{2644956000 7200 0 EET}
- {2658265200 10800 1 EEST}
+ {2658175200 10800 1 EEST}
{2677010400 7200 0 EET}
- {2689714800 10800 1 EEST}
+ {2689624800 10800 1 EEST}
{2708460000 7200 0 EET}
- {2721164400 10800 1 EEST}
+ {2721679200 10800 1 EEST}
{2739909600 7200 0 EET}
- {2752614000 10800 1 EEST}
+ {2753128800 10800 1 EEST}
{2771359200 7200 0 EET}
- {2784668400 10800 1 EEST}
+ {2784578400 10800 1 EEST}
{2802808800 7200 0 EET}
- {2816118000 10800 1 EEST}
+ {2816028000 10800 1 EEST}
{2834258400 7200 0 EET}
- {2847567600 10800 1 EEST}
+ {2847477600 10800 1 EEST}
{2866312800 7200 0 EET}
- {2879017200 10800 1 EEST}
+ {2878927200 10800 1 EEST}
{2897762400 7200 0 EET}
- {2910466800 10800 1 EEST}
+ {2910981600 10800 1 EEST}
{2929212000 7200 0 EET}
- {2941916400 10800 1 EEST}
+ {2942431200 10800 1 EEST}
{2960661600 7200 0 EET}
- {2973970800 10800 1 EEST}
+ {2973880800 10800 1 EEST}
{2992111200 7200 0 EET}
- {3005420400 10800 1 EEST}
+ {3005330400 10800 1 EEST}
{3024165600 7200 0 EET}
- {3036870000 10800 1 EEST}
+ {3036780000 10800 1 EEST}
{3055615200 7200 0 EET}
- {3068319600 10800 1 EEST}
+ {3068229600 10800 1 EEST}
{3087064800 7200 0 EET}
- {3099769200 10800 1 EEST}
+ {3100284000 10800 1 EEST}
{3118514400 7200 0 EET}
- {3131823600 10800 1 EEST}
+ {3131733600 10800 1 EEST}
{3149964000 7200 0 EET}
- {3163273200 10800 1 EEST}
+ {3163183200 10800 1 EEST}
{3181413600 7200 0 EET}
- {3194722800 10800 1 EEST}
+ {3194632800 10800 1 EEST}
{3213468000 7200 0 EET}
- {3226172400 10800 1 EEST}
+ {3226082400 10800 1 EEST}
{3244917600 7200 0 EET}
- {3257622000 10800 1 EEST}
+ {3258136800 10800 1 EEST}
{3276367200 7200 0 EET}
- {3289071600 10800 1 EEST}
+ {3289586400 10800 1 EEST}
{3307816800 7200 0 EET}
- {3321126000 10800 1 EEST}
+ {3321036000 10800 1 EEST}
{3339266400 7200 0 EET}
- {3352575600 10800 1 EEST}
+ {3352485600 10800 1 EEST}
{3371320800 7200 0 EET}
- {3384025200 10800 1 EEST}
+ {3383935200 10800 1 EEST}
{3402770400 7200 0 EET}
- {3415474800 10800 1 EEST}
+ {3415384800 10800 1 EEST}
{3434220000 7200 0 EET}
- {3446924400 10800 1 EEST}
+ {3447439200 10800 1 EEST}
{3465669600 7200 0 EET}
- {3478978800 10800 1 EEST}
+ {3478888800 10800 1 EEST}
{3497119200 7200 0 EET}
- {3510428400 10800 1 EEST}
+ {3510338400 10800 1 EEST}
{3528568800 7200 0 EET}
- {3541878000 10800 1 EEST}
+ {3541788000 10800 1 EEST}
{3560623200 7200 0 EET}
- {3573327600 10800 1 EEST}
+ {3573237600 10800 1 EEST}
{3592072800 7200 0 EET}
- {3604777200 10800 1 EEST}
+ {3605292000 10800 1 EEST}
{3623522400 7200 0 EET}
- {3636226800 10800 1 EEST}
+ {3636741600 10800 1 EEST}
{3654972000 7200 0 EET}
- {3668281200 10800 1 EEST}
+ {3668191200 10800 1 EEST}
{3686421600 7200 0 EET}
- {3699730800 10800 1 EEST}
+ {3699640800 10800 1 EEST}
{3717871200 7200 0 EET}
- {3731180400 10800 1 EEST}
+ {3731090400 10800 1 EEST}
{3749925600 7200 0 EET}
- {3762630000 10800 1 EEST}
+ {3762540000 10800 1 EEST}
{3781375200 7200 0 EET}
- {3794079600 10800 1 EEST}
+ {3794594400 10800 1 EEST}
{3812824800 7200 0 EET}
- {3825529200 10800 1 EEST}
+ {3826044000 10800 1 EEST}
{3844274400 7200 0 EET}
- {3857583600 10800 1 EEST}
+ {3857493600 10800 1 EEST}
{3875724000 7200 0 EET}
- {3889033200 10800 1 EEST}
+ {3888943200 10800 1 EEST}
{3907778400 7200 0 EET}
- {3920482800 10800 1 EEST}
+ {3920392800 10800 1 EEST}
{3939228000 7200 0 EET}
- {3951932400 10800 1 EEST}
+ {3951842400 10800 1 EEST}
{3970677600 7200 0 EET}
- {3983382000 10800 1 EEST}
+ {3983896800 10800 1 EEST}
{4002127200 7200 0 EET}
- {4015436400 10800 1 EEST}
+ {4015346400 10800 1 EEST}
{4033576800 7200 0 EET}
- {4046886000 10800 1 EEST}
+ {4046796000 10800 1 EEST}
{4065026400 7200 0 EET}
- {4078335600 10800 1 EEST}
+ {4078245600 10800 1 EEST}
{4097080800 7200 0 EET}
}
diff --git a/library/tzdata/Asia/Hong_Kong b/library/tzdata/Asia/Hong_Kong
index eb79a90..9420142 100644
--- a/library/tzdata/Asia/Hong_Kong
+++ b/library/tzdata/Asia/Hong_Kong
@@ -3,24 +3,24 @@
set TZData(:Asia/Hong_Kong) {
{-9223372036854775808 27402 0 LMT}
{-2056690800 28800 0 HKT}
- {-900909000 32400 1 HKST}
+ {-900910800 32400 1 HKST}
{-891579600 30600 0 HKT}
{-884248200 32400 0 JST}
- {-766659600 28800 0 HKT}
- {-747981000 32400 1 HKST}
- {-728544600 28800 0 HKT}
+ {-761209200 28800 0 HKT}
+ {-747907200 32400 1 HKST}
+ {-728541000 28800 0 HKT}
{-717049800 32400 1 HKST}
- {-694503000 28800 0 HKT}
+ {-697091400 28800 0 HKT}
{-683785800 32400 1 HKST}
- {-668064600 28800 0 HKT}
+ {-668061000 28800 0 HKT}
{-654755400 32400 1 HKST}
- {-636615000 28800 0 HKT}
+ {-636611400 28800 0 HKT}
{-623305800 32400 1 HKST}
- {-605165400 28800 0 HKT}
+ {-605161800 28800 0 HKT}
{-591856200 32400 1 HKST}
- {-573715800 28800 0 HKT}
+ {-573712200 28800 0 HKT}
{-559801800 32400 1 HKST}
- {-541661400 28800 0 HKT}
+ {-541657800 28800 0 HKT}
{-528352200 32400 1 HKST}
{-510211800 28800 0 HKT}
{-498112200 32400 1 HKST}
diff --git a/library/tzdata/Europe/Rome b/library/tzdata/Europe/Rome
index f53340c..932754f 100644
--- a/library/tzdata/Europe/Rome
+++ b/library/tzdata/Europe/Rome
@@ -2,7 +2,7 @@
set TZData(:Europe/Rome) {
{-9223372036854775808 2996 0 LMT}
- {-3259097396 2996 0 RMT}
+ {-3252098996 2996 0 RMT}
{-2403565200 3600 0 CET}
{-1690765200 7200 1 CEST}
{-1680487200 3600 0 CET}
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index 7c65088..6ff60aa 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -347,7 +347,7 @@ TclMacOSXSetFileAttribute(
Tcl_DStringAppend(&ds, native, -1);
Tcl_DStringAppend(&ds, _PATH_RSRCFORKSPEC, -1);
- result = truncate(Tcl_DStringValue(&ds), (off_t)0);
+ result = truncate(Tcl_DStringValue(&ds), 0);
if (result != 0) {
/*
* truncate() on a valid resource fork path may fail with a
@@ -689,7 +689,7 @@ SetOSTypeFromAny(
static void
UpdateStringOfOSType(
- register Tcl_Obj *objPtr) /* OSType object whose string rep to
+ Tcl_Obj *objPtr) /* OSType object whose string rep to
* update. */
{
const int size = TCL_UTF_MAX * 4;
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index f80746f..c0da0ab 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -122,7 +122,7 @@ proc test-format {{reptime 1000}} {
}
proc test-scan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# Scan : date (in gmt)
{clock scan "25.11.2015" -format "%d.%m.%Y" -base 0 -gmt 1}
# Scan : date (system time zone, with base)
@@ -198,11 +198,11 @@ proc test-scan {{reptime 1000}} {
# {clock scan "25.11.2015" -format [string repeat "[incr i] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
# # Scan : again:
# {clock scan "25.11.2015" -format [string repeat "[incr i -1] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-freescan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# FreeScan : relative date
{clock scan "5 years 18 months 385 days" -base 0 -gmt 1}
# FreeScan : relative date with relative weekday
@@ -239,7 +239,7 @@ proc test-freescan {{reptime 1000}} {
{clock scan "19:18:30 MST" -base 148863600 -gmt 1
clock scan "19:18:30 EST" -base 148863600
}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-add {{reptime 1000}} {
@@ -282,7 +282,7 @@ proc test-add {{reptime 1000}} {
if {[catch {clock add 0 3 weekdays -gmt 1}]} {
regsub -all {\mweekdays\M} $tests "days" tests
}
- _test_run $reptime $tests {puts [clock format $_(r) -locale en]}
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime $tests
}
proc test-convert {{reptime 1000}} {
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index 78189e6..a715c8a 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -127,15 +127,23 @@ proc _adjust_maxcount {reptime maxcount} {
proc _test_run {args} {
upvar _ _
# parse args:
- array set _ [set _opts {-no-result 0 -uplevel 0}]
+ array set _ {-no-result 0 -uplevel 0 -convert-result {}}
while {[llength $args] > 2} {
- if {[set o [lindex $args 0]] ni $_opts || $_($o)} {
+ if {![info exists _([set o [lindex $args 0]])]} {
break
}
- set _($o) 1
- set args [lrange $args 1 end]
+ if {[string is boolean -strict $_($o)]} {
+ set _($o) [expr {! $_($o)}]
+ set args [lrange $args 1 end]
+ } else {
+ if {[llength $args] <= 2} {
+ return -code error "value expected for option $o"
+ }
+ set _($o) [lindex $args 1]
+ set args [lrange $args 2 end]
+ }
}
- unset -nocomplain _opts o
+ unset -nocomplain o
if {[llength $args] < 2 || [llength $args] > 3} {
return -code error "wrong # args: should be \"[lindex [info level [info level]] 0] ?-no-result? reptime lst ?outcmd?\""
}
@@ -173,7 +181,8 @@ proc _test_run {args} {
# if output result (and not once):
if {!$_(-no-result)} {
set _(r) [if 1 $_(c)]
- if {$_(outcmd) ne {}} {{*}$_(outcmd) $_(r)}
+ if {$_(-convert-result) ne ""} { set _(r) [if 1 $_(-convert-result)] }
+ {*}$_(outcmd) $_(r)
if {[llength $_(ittime)] > 1} { # decrement max-count
lset _(ittime) 1 [expr {[lindex $_(ittime) 1] - 1}]
}
diff --git a/tests/all.tcl b/tests/all.tcl
index 89a4f1a..287de1f 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -12,7 +12,7 @@
package prefer latest
package require Tcl 8.5-
-package require tcltest 2.2
+package require tcltest 2.5
namespace import ::tcltest::*
configure {*}$argv -testdir [file dirname [file dirname [file normalize [
diff --git a/tests/async.test b/tests/async.test
index 34c2fdc..df13f83 100644
--- a/tests/async.test
+++ b/tests/async.test
@@ -20,6 +20,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
catch [list package require -exact Tcltest [info patchlevel]]
testConstraint testasync [llength [info commands testasync]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
proc async1 {result code} {
global aresult acode
@@ -202,7 +203,7 @@ test async-4.2 {async interrupting straight bytecode sequence} -constraints {
testasync delete $hm
}
test async-4.3 {async interrupting loop-less bytecode sequence} -constraints {
- testasync
+ testasync knownMsvcBug
} -setup {
set hm [testasync create async3]
} -body {
diff --git a/tests/binary.test b/tests/binary.test
index aede659..973240f 100644
--- a/tests/binary.test
+++ b/tests/binary.test
@@ -2912,7 +2912,7 @@ test binary-77.2 {string cat ops on all bytearrays} {
} [binary format H* abcd]
test binary-78.1 {unicode (out of BMP) to byte-array conversion, bug-[bd94500678]} -body {
- # just test for BO-segfault (high surrogate w/o advance source pointer for out of BMP char if TCL_UTF_MAX <= 4):
+ # just test for BO-segfault (high surrogate w/o advance source pointer for out of BMP char if TCL_UTF_MAX == 3):
binary encode hex \U0001f415
binary scan \U0001f415 a* v; set v
set str {}
diff --git a/tests/chanio.test b/tests/chanio.test
index 9dc9e7c..4b71fef 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -43,6 +43,7 @@ namespace eval ::tcl::test::io {
testConstraint testfevent [llength [info commands testfevent]]
testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
+ testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
# You need a *very* special environment to do some tests. In particular,
# many file systems do not support large-files...
@@ -888,7 +889,7 @@ test chan-io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} -setup
# Tcl_ExternalToUtf()
set f [openpipe w+ $path(cat)]
chan configure $f -translation {auto lf} -buffering none
- chan configure $f -encoding unicode
+ chan configure $f -encoding utf-16
chan puts -nonewline $f "bbbbbbbbbbbbbbb\n123456789abcdef\r"
chan configure $f -buffersize 16
chan gets $f
@@ -1129,7 +1130,7 @@ test chan-io-8.2 {PeekAhead: only go to device if no more cached data} -setup {
chan event $f read [namespace code {
lappend x [chan gets $f line] $line [testchannel inputbuffered $f]
}]
- chan configure $f -encoding unicode -buffersize 16 -blocking 0
+ chan configure $f -encoding utf-16 -buffersize 16 -blocking 0
vwait [namespace which -variable x]
chan configure $f -translation auto -encoding ascii -blocking 1
# here
@@ -2790,7 +2791,7 @@ test chan-io-29.34 {Tcl_Chan Close, async flush on chan close, using sockets} -s
chan puts $s $l
}
}
-} -constraints {socket tempNotMac fileevent} -body {
+} -constraints {socket tempNotMac fileevent knownMsvcBug} -body {
proc accept {s a p} {
variable x
chan event $s readable [namespace code [list readit $s]]
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index f8ab361..b15c77d 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -21,11 +21,16 @@ catch [list package require -exact Tcltest [info patchlevel]]
testConstraint testchmod [llength [info commands testchmod]]
testConstraint testsetplatform [llength [info commands testsetplatform]]
testConstraint testvolumetype [llength [info commands testvolumetype]]
+testConstraint time64bit [expr {
+ $::tcl_platform(pointerSize) >= 8 ||
+ [llength [info command testsize]] && [testsize time_t] >= 8
+}]
testConstraint linkDirectory [expr {
![testConstraint win] ||
($::tcl_platform(osVersion) >= 5.0
&& [lindex [file system [temporaryDirectory]] 1] eq "NTFS")
}]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
global env
set cmdAHwd [pwd]
@@ -1290,6 +1295,22 @@ test cmdAH-24.14.1 {
file mtime [file join [temporaryDirectory] CON.txt]
} -match regexp -result {could not (?:get modification time|read)} -returnCodes error
+# 3155760000 is 64-bit unix time, Wed Jan 01 00:00:00 GMT 2070:
+test cmdAH-24.20.1 {Tcl_FileObjCmd: atime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+ set filename [makeFile "" foo.text]
+} -body {
+ list [file atime $filename 3155760000] [file atime $filename]
+} -cleanup {
+ removeFile $filename
+} -result {3155760000 3155760000}
+test cmdAH-24.20.2 {Tcl_FileObjCmd: mtime 64-bit time_t, bug [4718b41c56]} -constraints {time64bit} -setup {
+ set filename [makeFile "" foo.text]
+} -body {
+ list [file mtime $filename 3155760000] [file mtime $filename]
+} -cleanup {
+ file delete -force $filename
+} -result {3155760000 3155760000}
+
# owned
test cmdAH-25.1 {Tcl_FileObjCmd: owned} -returnCodes error -body {
file owned a b
@@ -1308,7 +1329,7 @@ test cmdAH-25.2.1 {Tcl_FileObjCmd: owned} -constraints unix -setup {
test cmdAH-25.3 {Tcl_FileObjCmd: owned} {unix notRoot} {
file owned /
} 0
-test cmdAH-25.3.1 {Tcl_FileObjCmd: owned} -constraints win -body {
+test cmdAH-25.3.1 {Tcl_FileObjCmd: owned} -constraints {win knownMsvcBug} -body {
file owned $env(windir)
} -result 0
test cmdAH-25.4 {Tcl_FileObjCmd: owned} -body {
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 60b104f..9df6d20 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -22,8 +22,11 @@ namespace eval ::tcl::test::cmdMZ {
namespace import ::tcltest::makeFile
namespace import ::tcltest::removeFile
namespace import ::tcltest::temporaryDirectory
+ namespace import ::tcltest::testConstraint
namespace import ::tcltest::test
+ testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
+
proc ListGlobMatch {expected actual} {
if {[llength $expected] != [llength $actual]} {
return 0
@@ -339,7 +342,7 @@ test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts}
test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} -body {
time {format 1}
} -match regexp -result {^\d+ microseconds per iteration}
-test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} {
+test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} knownMsvcBug {
expr {[lindex [time {_nrt_sleep 1}] 0] < [lindex [time {_nrt_sleep 20}] 0]}
} 1
test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} {
@@ -349,6 +352,24 @@ test cmdMZ-5.7 {Tcl_TimeObjCmd: errors generate right trace} {
"error foo"
invoked from within
"time {error foo}"}}
+test cmdMZ-5.7.1 {Tcl_TimeObjCmd: return from time} {
+ set x 0
+ proc r1 {} {upvar x x; time {incr x; return "r1"; incr x} 10}
+ list [r1] $x
+} {r1 1}
+test cmdMZ-5.8 {Tcl_TimeObjCmd: done optimization: nested call of self inside time (if compiled)} {
+ set x [set y 0]
+ set m1 {
+ if {[incr x] <= 5} {
+ # nested call should return result, so covering that:
+ if {![string is integer -strict [eval $m1]]} {error unexpected}
+ }
+ # increase again (no "continue" from nested call):
+ incr x
+ }
+ time {incr y; eval $m1} 5
+ list $y $x
+} {5 20}
test cmdMZ-6.1 {Tcl_TimeRateObjCmd: basic format of command} {
list [catch {timerate} msg] $msg
@@ -374,7 +395,7 @@ test cmdMZ-6.5a {Tcl_TimeRateObjCmd: result format and one iteration} {
test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} {
regexp {^0 \ws/# 0 # 0 #/sec 0 net-ms$} [timerate {} 0 0]
} 1
-test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} {
+test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument} knownMsvcBug {
set m1 [timerate {_nrt_sleep 0} 20]
set m2 [timerate {_nrt_sleep 0.2} 20]
list \
@@ -395,6 +416,11 @@ test cmdMZ-6.7 {Tcl_TimeRateObjCmd: errors generate right trace} {
"error foo"
invoked from within
"timerate {error foo} 1"}}
+test cmdMZ-6.7.1 {Tcl_TimeRateObjCmd: return from timerate} {
+ set x 0
+ proc r1 {} {upvar x x; timerate {incr x; return "r1"; incr x} 1000 10}
+ list [r1] $x
+} {r1 1}
test cmdMZ-6.8 {Tcl_TimeRateObjCmd: allow (conditional) break from timerate} {
set m1 [timerate {break}]
list \
@@ -406,10 +432,10 @@ test cmdMZ-6.8 {Tcl_TimeRateObjCmd: allow (conditional) break from timerate} {
test cmdMZ-6.8.1 {Tcl_TimeRateObjCmd: allow (conditional) continue in timerate} {
set m1 [timerate {continue; return -code error "unexpected"} 1000 10]
list \
- [expr {[lindex $m1 0] < 1000}] \
- [expr {[lindex $m1 2] == 10}] \
- [expr {[lindex $m1 4] > 1000}] \
- [expr {[lindex $m1 6] < 100}]
+ [expr {[lindex $m1 0] < 1000}] \
+ [expr {[lindex $m1 2] == 10}] \
+ [expr {[lindex $m1 4] > 1000}] \
+ [expr {[lindex $m1 6] < 100}]
} {1 1 1 1}
test cmdMZ-6.9 {Tcl_TimeRateObjCmd: max count of iterations} {
set m1 [timerate {} 1000 5]; # max-count wins
@@ -430,6 +456,18 @@ test cmdMZ-6.11 {Tcl_TimeRateObjCmd: done/continue optimization rollback} {
timerate $m1 1000 10
if 1 $m1; # if rollback is missing throws an error: invoked "continue" outside of a loop
} ok
+test cmdMZ-6.12 {Tcl_TimeRateObjCmd: done optimization: nested call of self inside timerate} {
+ set x 0
+ set m1 {
+ if {[incr x] <= 5} {
+ # nested call should return result, so covering that:
+ if {![string is integer -strict [eval $m1]]} {error unexpected}
+ }
+ # increase again (no "continue" from nested call):
+ incr x
+ }
+ list [lindex [timerate $m1 1000 5] 2] $x
+} {5 20}
test cmdMZ-try-1.0 {
diff --git a/tests/encoding.test b/tests/encoding.test
index 4736928..da34f03 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -322,18 +322,29 @@ test encoding-15.3 {UtfToUtfProc null character input} teststringbytes {
set z
} c080
-test encoding-16.1 {UnicodeToUtfProc} -body {
- set val [encoding convertfrom unicode NN]
+test encoding-16.1 {Utf16ToUtfProc} -body {
+ set val [encoding convertfrom utf-16 NN]
list $val [format %x [scan $val %c]]
} -result "\u4e4e 4e4e"
-test encoding-16.2 {UnicodeToUtfProc} -body {
- set val [encoding convertfrom unicode "\xd8\xd8\xdc\xdc"]
+test encoding-16.2 {Utf16ToUtfProc} -body {
+ set val [encoding convertfrom utf-16 "\xd8\xd8\xdc\xdc"]
+ list $val [format %x [scan $val %c]]
+} -result "\U460dc 460dc"
+test encoding-16.3 {Ucs2ToUtfProc} -body {
+ set val [encoding convertfrom ucs-2 NN]
+ list $val [format %x [scan $val %c]]
+} -result "\u4e4e 4e4e"
+test encoding-16.4 {Ucs2ToUtfProc} -body {
+ set val [encoding convertfrom ucs-2 "\xd8\xd8\xdc\xdc"]
list $val [format %x [scan $val %c]]
} -result "\U460dc 460dc"
-test encoding-17.1 {UtfToUnicodeProc} -body {
- encoding convertto unicode "\U460dc"
+test encoding-17.1 {UtfToUtf16Proc} -body {
+ encoding convertto utf-16 "\U460dc"
} -result "\xd8\xd8\xdc\xdc"
+test encoding-17.2 {UtfToUcs2Proc} -body {
+ encoding convertfrom utf-16 [encoding convertto ucs-2 "\U460dc"]
+} -result "\ufffd"
test encoding-18.1 {TableToUtfProc} {
} {}
diff --git a/tests/expr.test b/tests/expr.test
index 59d96a1..bc01c03 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -729,7 +729,7 @@ test expr-18.1 {expr and conversion of operands to numbers} {
catch {expr int($x)}
expr {$x}
} 11
-test expr-18.2 {whitespace strings should not be == 0 (buggy strtod)} {
+test expr-18.2 {whitespace strings should not be == 0 (buggy strtol/strtoul)} {
expr {" "}
} { }
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 2494cb4..361542d 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -34,6 +34,7 @@ catch {
testConstraint testfilesystem [llength [info commands ::testfilesystem]]
testConstraint testsetplatform [llength [info commands ::testsetplatform]]
testConstraint testsimplefilesystem [llength [info commands ::testsimplefilesystem]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
cd [tcltest::temporaryDirectory]
makeFile "test file" gorp.file
@@ -312,7 +313,7 @@ test filesystem-1.37 {file normalisation with '/./'} -body {
} -match regexp -result {^(?:[^/]|/(?:[^/]|$))+$}
test filesystem-1.38 {file normalisation with volume relative} -setup {
set dir [pwd]
-} -constraints {win moreThanOneDrive} -body {
+} -constraints {win moreThanOneDrive knownMsvcBug} -body {
set path "[string range [lindex $drives 0] 0 1]foo"
cd [lindex $drives 1]
file norm $path
diff --git a/tests/format.test b/tests/format.test
index 1bf46a1..3640376 100644
--- a/tests/format.test
+++ b/tests/format.test
@@ -20,6 +20,7 @@ testConstraint longIs32bit [expr {$tcl_platform(wordSize) == 4}]
testConstraint longIs64bit [expr {$tcl_platform(wordSize) == 8}]
testConstraint wideIs64bit [expr {wide(0x8000000000000000) < 0}]
testConstraint pointerIs64bit [expr {$tcl_platform(pointerSize) >= 8}]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
test format-1.1 {integer formatting} {
format "%*d %d %d %d" 6 34 16923 -12 -1
@@ -263,13 +264,13 @@ test format-6.1 {floating-point zeroes} {eformat} {
test format-6.2 {floating-point zeroes} {eformat} {
format "%.4e %.4f %.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0}
-test format-6.3 {floating-point zeroes} {eformat} {
+test format-6.3 {floating-point zeroes} {eformat knownMsvcBug} {
format "%#.4e %#.4f %#.4g" 0.0 0.0 0.0 0.0
} {0.0000e+00 0.0000 0.000}
test format-6.4 {floating-point zeroes} {eformat} {
format "%.0e %.0f %.0g" 0.0 0.0 0.0 0.0
} {0e+00 0 0}
-test format-6.5 {floating-point zeroes} {eformat} {
+test format-6.5 {floating-point zeroes} {eformat knownMsvcBug} {
format "%#.0e %#.0f %#.0g" 0.0 0.0 0.0 0.0
} {0.e+00 0. 0.}
test format-6.6 {floating-point zeroes} {
diff --git a/tests/http.test b/tests/http.test
index cf30348..2184449 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -186,7 +186,7 @@ test http-3.7 {http::geturl} -body {
<h2>GET $tail</h2>
</body></html>"
test http-3.8 {http::geturl} -body {
- set token [http::geturl $url -query Name=Value&Foo=Bar -timeout 2000]
+ set token [http::geturl $url -query Name=Value&Foo=Bar -timeout 3000]
http::data $token
} -cleanup {
http::cleanup $token
@@ -352,7 +352,7 @@ test http-3.24 {http::geturl parse failures} -body {
test http-3.25 {http::meta} -setup {
unset -nocomplain m token
} -body {
- set token [http::geturl $url -timeout 2000]
+ set token [http::geturl $url -timeout 3000]
array set m [http::meta $token]
lsort [array names m]
} -cleanup {
@@ -362,7 +362,7 @@ test http-3.25 {http::meta} -setup {
test http-3.26 {http::meta} -setup {
unset -nocomplain m token
} -body {
- set token [http::geturl $url -headers {X-Check 1} -timeout 2000]
+ set token [http::geturl $url -headers {X-Check 1} -timeout 3000]
array set m [http::meta $token]
lsort [array names m]
} -cleanup {
@@ -588,7 +588,7 @@ test http-4.14 {http::Event} -body {
test http-4.15 {http::Event} -body {
# This test may fail if you use a proxy server. That is to be
# expected and is not a problem with Tcl.
- set token [http::geturl //not_a_host.tcl.tk -timeout 1000 -command \#]
+ set token [http::geturl //not_a_host.tcl.tk -timeout 3000 -command \#]
http::wait $token
http::status $token
# error codes vary among platforms.
diff --git a/tests/io.test b/tests/io.test
index 6470282..6d9e1c3 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -43,6 +43,7 @@ testConstraint testfevent [llength [info commands testfevent]]
testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
testConstraint testobj [llength [info commands testobj]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
# You need a *very* special environment to do some tests. In
# particular, many file systems do not support large-files...
@@ -918,7 +919,7 @@ test io-6.45 {Tcl_GetsObj: input saw cr, skip right number of bytes} {stdio test
set f [open "|[list [interpreter] $path(cat)]" w+]
fconfigure $f -translation {auto lf} -buffering none
- fconfigure $f -encoding unicode
+ fconfigure $f -encoding utf-16
puts -nonewline $f "bbbbbbbbbbbbbbb\n123456789abcdef\r"
fconfigure $f -buffersize 16
gets $f
@@ -1162,7 +1163,7 @@ test io-8.2 {PeekAhead: only go to device if no more cached data} {stdio testcha
variable x
lappend x [gets $f line] $line [testchannel inputbuffered $f]
}
- fconfigure $f -encoding unicode -buffersize 16 -blocking 0
+ fconfigure $f -encoding utf-16 -buffersize 16 -blocking 0
vwait [namespace which -variable x]
fconfigure $f -translation auto -encoding ascii -blocking 1
# here
@@ -2228,7 +2229,7 @@ test io-27.5 {FlushChannel, implicit flush when buffer fills and on close} \
set path(pipe) [makeFile {} pipe]
set path(output) [makeFile {} output]
test io-27.6 {FlushChannel, async flushing, async close} \
- {stdio asyncPipeClose openpipe} {
+ {stdio asyncPipeClose openpipe knownMsvcBug} {
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
file delete $path(pipe)
@@ -2832,7 +2833,7 @@ test io-29.31 {Tcl_WriteChars, background flush} {stdio openpipe} {
set result
} ok
test io-29.32 {Tcl_WriteChars, background flush to slow reader} \
- {stdio asyncPipeClose openpipe} {
+ {stdio asyncPipeClose openpipe knownMsvcBug} {
# This test may fail on old Unix systems (seen on IRIX64 6.5) with
# obsolete gettimeofday() calls. See Tcl Bugs 3530533, 1942197.
file delete $path(pipe)
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index a967139..89afb0a 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -25,6 +25,7 @@ package require tcltests
# Custom constraints used in this file
testConstraint testchannel [llength [info commands testchannel]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
#----------------------------------------------------------------------
@@ -241,23 +242,23 @@ test iocmd-8.7 {fconfigure command} -setup {
file delete $path(test1)
} -body {
set f1 [open $path(test1) w]
- fconfigure $f1 -translation lf -eofchar {} -encoding unicode
+ fconfigure $f1 -translation lf -eofchar {} -encoding utf-16
fconfigure $f1
} -cleanup {
catch {close $f1}
-} -result {-blocking 1 -buffering full -buffersize 4096 -encoding unicode -eofchar {} -translation lf}
+} -result {-blocking 1 -buffering full -buffersize 4096 -encoding utf-16 -eofchar {} -translation lf}
test iocmd-8.8 {fconfigure command} -setup {
file delete $path(test1)
set x {}
} -body {
set f1 [open $path(test1) w]
fconfigure $f1 -translation lf -buffering line -buffersize 3030 \
- -eofchar {} -encoding unicode
+ -eofchar {} -encoding utf-16
lappend x [fconfigure $f1 -buffering]
lappend x [fconfigure $f1]
} -cleanup {
catch {close $f1}
-} -result {line {-blocking 1 -buffering line -buffersize 3030 -encoding unicode -eofchar {} -translation lf}}
+} -result {line {-blocking 1 -buffering line -buffersize 3030 -encoding utf-16 -eofchar {} -translation lf}}
test iocmd-8.9 {fconfigure command} -setup {
file delete $path(test1)
} -body {
@@ -810,7 +811,7 @@ test iocmd-21.19 {chan create, init failure -> no channel, no finalize} -match g
rename foo {}
set res
} -result {{} {initialize rc* {read write}} 1 {*all required methods*} {}}
-test iocmd-21.20 {Bug 88aef05cda} -setup {
+test iocmd-21.20 {Bug 88aef05cda} -constraints knownMsvcBug -setup {
proc foo {method chan args} {
switch -- $method blocking {
chan configure $chan -blocking [lindex $args 0]
@@ -2015,7 +2016,7 @@ test iocmd-31.6 {chan postevent, posted events do happen} -match glob -body {
set c [chan create {r w} foo]
set tock {}
note [fileevent $c readable {lappend res TOCK; set tock 1}]
- set stop [after 10000 {lappend res TIMEOUT; set tock 1}]
+ set stop [after 15000 {lappend res TIMEOUT; set tock 1}]
after 1000 {note [chan postevent $c r]}
vwait ::tock
catch {after cancel $stop}
@@ -2028,7 +2029,7 @@ test iocmd-31.7 {chan postevent, posted events do happen} -match glob -body {
proc foo {args} {oninit; onfinal; track; return}
set c [chan create {r w} foo]
note [fileevent $c writable {lappend res TOCK; set tock 1}]
- set stop [after 10000 {lappend res TIMEOUT; set tock 1}]
+ set stop [after 15000 {lappend res TIMEOUT; set tock 1}]
after 1000 {note [chan postevent $c w]}
vwait ::tock
catch {after cancel $stop}
diff --git a/tests/socket.test b/tests/socket.test
index b91668e..84320bd 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -75,6 +75,7 @@ if {[expr {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(
# Some tests require the Thread package or exec command
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]
testConstraint exec [llength [info commands exec]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
# Produce a random port number in the Dynamic/Private range
# from 49152 through 65535.
@@ -2285,7 +2286,7 @@ test socket-14.10.1 {pending [socket -async] and nonblocking [puts], server is I
removeFile script
} -result {{} ok}
test socket-14.11.0 {pending [socket -async] and nonblocking [puts], no listener, no flush} \
- -constraints {socket} \
+ -constraints {socket knownMsvcBug} \
-body {
set sock [socket -async localhost [randport]]
fconfigure $sock -blocking 0
diff --git a/tests/source.test b/tests/source.test
index 8b146d3..c6cccd6 100644
--- a/tests/source.test
+++ b/tests/source.test
@@ -240,12 +240,12 @@ test source-7.2 {source -encoding test} -setup {
set sourcefile [makeFile {} source.file]
file delete $sourcefile
set f [open $sourcefile w]
- fconfigure $f -encoding unicode
+ fconfigure $f -encoding utf-16
puts $f "set symbol(square-root) \u221A; set x correct"
close $f
} -body {
set x unset
- source -encoding unicode $sourcefile
+ source -encoding utf-16 $sourcefile
set x
} -cleanup {
removeFile source.file
diff --git a/tests/stringObj.test b/tests/stringObj.test
index a78b5f8..bda7285 100644
--- a/tests/stringObj.test
+++ b/tests/stringObj.test
@@ -439,9 +439,9 @@ test stringObj-13.8 {Tcl_GetCharLength with identity nulls} {testobj testbytestr
test stringObj-14.1 {Tcl_SetObjLength on pure unicode object} testobj {
teststringobj set 1 foo
- teststringobj getunicode 1
+ teststringobj maxchars 1
teststringobj append 1 bar -1
- teststringobj getunicode 1
+ teststringobj maxchars 1
teststringobj append 1 bar -1
teststringobj setlength 1 0
teststringobj append 1 bar -1
diff --git a/tests/utf.test b/tests/utf.test
index dc1a435..f75d19e 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -471,8 +471,8 @@ test utf-25.1 {Tcl_UniCharNcasecmp} -constraints teststringobj \
-body {
teststringobj set 1 a
teststringobj set 2 b
- teststringobj getunicode 1
- teststringobj getunicode 2
+ teststringobj maxchars 1
+ teststringobj maxchars 2
string compare -nocase [teststringobj get 1] [teststringobj get 2]
} \
-cleanup {
@@ -486,8 +486,8 @@ test utf-25.2 {Tcl_UniCharNcasecmp} -constraints teststringobj \
-body {
teststringobj set 1 b
teststringobj set 2 a
- teststringobj getunicode 1
- teststringobj getunicode 2
+ teststringobj maxchars 1
+ teststringobj maxchars 2
string compare -nocase [teststringobj get 1] [teststringobj get 2]
} \
-cleanup {
@@ -501,8 +501,8 @@ test utf-25.3 {Tcl_UniCharNcasecmp} -constraints teststringobj \
-body {
teststringobj set 1 B
teststringobj set 2 a
- teststringobj getunicode 1
- teststringobj getunicode 2
+ teststringobj maxchars 1
+ teststringobj maxchars 2
string compare -nocase [teststringobj get 1] [teststringobj get 2]
} \
-cleanup {
@@ -517,8 +517,8 @@ test utf-25.4 {Tcl_UniCharNcasecmp} -constraints teststringobj \
-body {
teststringobj set 1 aBcB
teststringobj set 2 abca
- teststringobj getunicode 1
- teststringobj getunicode 2
+ teststringobj maxchars 1
+ teststringobj maxchars 2
string compare -nocase [teststringobj get 1] [teststringobj get 2]
} \
-cleanup {
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index a0b7053..2bce77c 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.test
@@ -28,6 +28,7 @@ testConstraint testchmod [llength [info commands testchmod]]
testConstraint cdrom 0
testConstraint exdev 0
testConstraint longFileNames 0
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
proc createfile {file {string a}} {
set f [open $file w]
@@ -92,8 +93,13 @@ if {[testConstraint testvolumetype]} {
# NB: filename is chosen to be short but unlikely to clash with other apps
if {[file exists c:/] && [file exists d:/]} {
catch {file delete d:/TclTmpF.1}
- if {[catch {createfile d:/TclTmpF.1 {}}] == 0} {
- file delete d:/TclTmpF.1
+ catch {file delete d:/TclTmpD.1}
+ catch {file delete c:/TclTmpC.1}
+ if {![catch {createfile d:/TclTmpF.1 {}}] && [file isfile d:/TclTmpF.1]
+ && ![catch {file mkdir d:/TclTmpD.1}] && [file isdirectory d:/TclTmpD.1]
+ && ![catch {file mkdir c:/TclTmpC.1}] && [file isdirectory c:/TclTmpC.1]
+ } {
+ file delete d:/TclTmpF.1 d:/TclTmpD.1 c:/TclTmpC.1
testConstraint exdev 1
}
}
@@ -173,12 +179,12 @@ test winFCmd-1.9 {TclpRenameFile: errno: ENOTDIR} -setup {
testfile mv td1 tf1
} -returnCodes error -result ENOTDIR
test winFCmd-1.10 {TclpRenameFile: errno: EXDEV} -setup {
- file delete -force d:/tf1
+ file delete -force d:/TclTmpD.1
} -constraints {win exdev testfile} -body {
- file mkdir c:/tf1
- testfile mv c:/tf1 d:/tf1
+ file mkdir c:/TclTmpC.1
+ testfile mv c:/TclTmpC.1 d:/TclTmpD.1
} -cleanup {
- file delete -force c:/tf1
+ file delete -force c:/TclTmpC.1
} -returnCodes error -result EXDEV
test winFCmd-1.11 {TclpRenameFile: errno: EACCES} -setup {
cleanup
@@ -316,15 +322,15 @@ test winFCmd-1.32 {TclpRenameFile: TclpRemoveDirectory succeeds} -setup {
} -result {0 1 1}
test winFCmd-1.33 {TclpRenameFile: After removing dst dir, MoveFile fails} \
-constraints {win exdev testfile testchmod} -body {
- file mkdir d:/td1
- testchmod 0 d:/td1
- file mkdir c:/tf1
- catch {testfile mv c:/tf1 d:/td1} msg
- list $msg [file writable d:/td1]
-} -cleanup {
- catch {testchmod 0o666 d:/td1}
- file delete d:/td1
- file delete -force c:/tf1
+ file mkdir d:/TclTmpD.1
+ testchmod 0 d:/TclTmpD.1
+ file mkdir c:/TclTmpC.1
+ catch {testfile mv c:/TclTmpC.1 d:/TclTmpD.1} msg
+ list $msg [file writable d:/TclTmpD.1]
+} -cleanup {
+ catch {testchmod 0o666 d:/TclTmpD.1}
+ file delete d:/TclTmpD.1
+ file delete -force c:/TclTmpC.1
} -result {EXDEV 0}
test winFCmd-1.34 {TclpRenameFile: src is dir, dst is not} -setup {
cleanup
@@ -388,7 +394,7 @@ proc MakeFiles {dirname} {
test winFCmd-1.38 {TclpRenameFile: check rename of conflicting inodes} -setup {
cleanup
-} -constraints {win winNonZeroInodes} -body {
+} -constraints {win winNonZeroInodes knownMsvcBug} -body {
file mkdir td1
foreach {a b} [MakeFiles td1] break
file rename -force $a $b
@@ -633,7 +639,7 @@ test winFCmd-5.1 {TclpCopyDirectory: calls TraverseWinTree} -setup {
test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -687,7 +693,7 @@ test winFCmd-6.8 {TclpRemoveDirectory: RemoveDirectory fails} -setup {
} -result {1 {tf1 ENOTDIR}}
test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} -setup {
cleanup
-} -constraints {winVista testfile testchmod} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -705,7 +711,7 @@ test winFCmd-6.11 {TclpRemoveDirectory: attr == -1} -setup {
} -returnCodes error -match regexp -result {^/ E(ACCES|EXIST)$}
test winFCmd-6.13 {TclpRemoveDirectory: write-protected} -setup {
cleanup
-} -constraints {winVista testfile testchmod} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug} -body {
file mkdir td1
testchmod 0 td1
testfile rmdir td1
@@ -934,7 +940,7 @@ test winFCmd-9.1 {TraversalDelete: DOTREE_F} -setup {
} -result {}
test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} -setup {
cleanup
-} -constraints {winVista testfile testchmod} -body {
+} -constraints {winVista testfile testchmod knownMsvcBug} -body {
file mkdir td1/td2
testchmod 0 td1
testfile rmdir -force td1
@@ -1048,13 +1054,13 @@ test winFCmd-12.5 {ConvertFileNameFormat: absolute path} -body {
list [file attributes / -longname] [file attributes \\ -longname]
} -constraints {win} -result {/ /}
test winFCmd-12.6 {ConvertFileNameFormat: absolute path with drive} -setup {
- catch {file delete -force -- c:/td1}
+ catch {file delete -force -- c:/TclTmpC.1}
} -constraints {win winXP} -body {
- createfile c:/td1 {}
- string tolower [file attributes c:/td1 -longname]
+ createfile c:/TclTmpC.1 {}
+ string tolower [file attributes c:/TclTmpC.1 -longname]
} -cleanup {
- file delete -force -- c:/td1
-} -result {c:/td1}
+ file delete -force -- c:/TclTmpC.1
+} -result [string tolower {c:/TclTmpC.1}]
test winFCmd-12.6.2 {ConvertFileNameFormat: absolute path with drive (in temp folder)} -setup {
catch {file delete -force -- $::env(TEMP)/td1}
} -constraints {win} -body {
diff --git a/tests/winTime.test b/tests/winTime.test
index add8f98..dbaa14c 100644
--- a/tests/winTime.test
+++ b/tests/winTime.test
@@ -19,6 +19,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
catch [list package require -exact Tcltest [info patchlevel]]
testConstraint testwinclock [llength [info commands testwinclock]]
+testConstraint knownMsvcBug [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match windows $::env(TRAVIS_OS_NAME)]}]
# The next two tests will crash on Windows if the check for negative
# clock values is not done properly.
@@ -40,7 +41,7 @@ test winTime-1.2 {TclpGetDate} {win} {
# with the Windows clock. 30 sec really isn't enough,
# but how much time does a tester have patience for?
-test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock} {
+test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock knownMsvcBug} {
# May fail due to OS/hardware discrepancies. See:
# http://support.microsoft.com/default.aspx?scid=kb;en-us;274323
set failed {}
@@ -50,7 +51,7 @@ test winTime-2.1 {Synchronization of Tcl and Windows clocks} {testwinclock} {
foreach { sys_sec sys_usec tcl_sec tcl_usec } [testwinclock] break
set diff [expr { $tcl_sec - $sys_sec
+ 1.0e-6 * ( $tcl_usec - $sys_usec ) }]
- if { abs($diff) > 0.06 } {
+ if { abs($diff) > 0.1 } {
set failed "Tcl clock differs from system clock by $diff sec"
break
} else {
diff --git a/tests/zipfs.test b/tests/zipfs.test
index 782d032..2ecbdfa 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -45,7 +45,7 @@ if {![string match ${ziproot}* $tcl_library]} {
# archive
###
set tclzip [file join $CWD [::tcl::pkgconfig get zipfile,runtime]]
- testConstraint zipfslib [file exists $tclzip]
+ testConstraint zipfslib [file isfile $tclzip]
if {[testConstraint zipfslib]} {
zipfs mount /lib/tcl $tclzip
set ::tcl_library ${ziproot}lib/tcl/tcl_library
diff --git a/unix/configure b/unix/configure
index 24252cb..34a1e0d 100755
--- a/unix/configure
+++ b/unix/configure
@@ -3333,8 +3333,8 @@ esac
#--------------------------------------------------------------------
# Supply substitutes for missing POSIX header files. Special notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some versions
+# of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
# Do this early, otherwise an autoconf bug throws errors on configure
@@ -3825,19 +3825,6 @@ else
fi
rm -f conftest*
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "strtod" >/dev/null 2>&1; then :
-
-else
- tcl_ok=0
-fi
-rm -f conftest*
-
if test $tcl_ok = 0; then
$as_echo "#define NO_STDLIB_H 1" >>confdefs.h
@@ -5660,7 +5647,7 @@ fi
fi
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
@@ -9836,7 +9823,7 @@ $as_echo "$tcl_ok" >&6; }
#------------------------------------------------------------------------
# Check whether the timezone data is supplied by the OS or has
# to be installed by Tcl. The default is autodetection, but can
-# be overriden on the configure command line either way.
+# be overridden on the configure command line either way.
#------------------------------------------------------------------------
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone data" >&5
diff --git a/unix/configure.ac b/unix/configure.ac
index 815fbf2..1830fd5 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -89,8 +89,8 @@ AC_C_INLINE
#--------------------------------------------------------------------
# Supply substitutes for missing POSIX header files. Special notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some versions
+# of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
# Do this early, otherwise an autoconf bug throws errors on configure
@@ -677,7 +677,7 @@ AC_MSG_RESULT([$tcl_ok])
#------------------------------------------------------------------------
# Check whether the timezone data is supplied by the OS or has
# to be installed by Tcl. The default is autodetection, but can
-# be overriden on the configure command line either way.
+# be overridden on the configure command line either way.
#------------------------------------------------------------------------
AC_MSG_CHECKING([for timezone data])
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index a206f26..70303ce 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1311,7 +1311,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
])
# The combo of gcc + glibc has a bug related to inlining of
- # functions like strtod(). The -fno-builtin flag should address
+ # functions like strtol()/strtoul(). The -fno-builtin flag should address
# this problem but it does not work. The -fno-inline flag is kind
# of overkill but it works. Disable inlining only when one of the
# files in compat/*.c is being linked in.
@@ -1913,8 +1913,8 @@ dnl # preprocessing tests use only CPPFLAGS.
#
# Supply substitutes for missing POSIX header files. Special
# notes:
-# - stdlib.h doesn't define strtol, strtoul, or
-# strtod insome versions of SunOS
+# - stdlib.h doesn't define strtol or strtoul in some
+# versions of SunOS
# - some versions of string.h don't declare procedures such
# as strstr
#
@@ -1965,7 +1965,6 @@ closedir(d);
AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
- AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
if test $tcl_ok = 0; then
AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
fi
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index e5d9729..fea9494 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -98,7 +98,7 @@ dlopen(
const char *path,
int mode)
{
- register ModulePtr mp;
+ ModulePtr mp;
static void *mainModule;
/*
@@ -191,7 +191,7 @@ dlopen(
*/
if (mode & RTLD_GLOBAL) {
- register ModulePtr mp1;
+ ModulePtr mp1;
for (mp1 = mp->next; mp1; mp1 = mp1->next) {
if (loadbind(0, mp1->entry, mp->entry) == -1) {
@@ -243,7 +243,7 @@ static void
caterr(
char *s)
{
- register char *p = s;
+ char *p = s;
while (*p >= '0' && *p <= '9') {
p++;
@@ -282,9 +282,9 @@ dlsym(
void *handle,
const char *symbol)
{
- register ModulePtr mp = (ModulePtr)handle;
- register ExportPtr ep;
- register int i;
+ ModulePtr mp = (ModulePtr)handle;
+ ExportPtr ep;
+ int i;
/*
* Could speed up the search, but I assume that one assigns the result to
@@ -317,9 +317,9 @@ int
dlclose(
void *handle)
{
- register ModulePtr mp = (ModulePtr)handle;
+ ModulePtr mp = (ModulePtr)handle;
int result;
- register ModulePtr mp1;
+ ModulePtr mp1;
if (--mp->refCnt > 0) {
return 0;
@@ -343,8 +343,8 @@ dlclose(
}
if (mp->exports) {
- register ExportPtr ep;
- register int i;
+ ExportPtr ep;
+ int i;
for (ep = mp->exports, i = mp->nExports; i; i--, ep++) {
if (ep->name) {
free(ep->name);
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index be49c95..5e757ee 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -96,7 +96,7 @@ typedef struct {
/*
* The following structure is used to set or get the serial port attributes in
- * a platform-independant manner.
+ * a platform-independent manner.
*/
typedef struct {
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index aa25c6b..e0a826c 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -685,8 +685,8 @@ CopyGrp(
char *buf,
int buflen)
{
- register char *p = buf;
- register int copied, len = 0;
+ char *p = buf;
+ int copied, len = 0;
/*
* Copy username.
@@ -887,7 +887,7 @@ CopyArray(
int buflen) /* Size of buffer. */
{
int i, j, len = 0;
- char *p, **new;
+ char *p, **newBuffer;
if (src == NULL) {
return 0;
@@ -903,7 +903,7 @@ CopyArray(
return -1;
}
- new = (char **) buf;
+ newBuffer = (char **) buf;
p = buf + len;
for (j = 0; j < i; j++) {
@@ -914,10 +914,10 @@ CopyArray(
return -1;
}
memcpy(p, src[j], sz);
- new[j] = p;
+ newBuffer[j] = p;
p = buf + len;
}
- new[j] = NULL;
+ newBuffer[j] = NULL;
return len;
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 3e1a5c2..b214627 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1315,8 +1315,8 @@ CopyFileAtts(
}
}
- tval.actime = statBufPtr->st_atime;
- tval.modtime = statBufPtr->st_mtime;
+ tval.actime = Tcl_GetAccessTimeFromStat(statBufPtr);
+ tval.modtime = Tcl_GetModificationTimeFromStat(statBufPtr);
if (utime(dst, &tval)) { /* INTL: Native. */
return TCL_ERROR;
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index b6b66da..13a624e 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -9,8 +9,6 @@
*/
#include "tclInt.h"
-#include <stddef.h>
-#include <locale.h>
#ifdef HAVE_LANGINFO
# include <langinfo.h>
# ifdef __APPLE__
@@ -335,7 +333,7 @@ long tclMacOSXDarwinRelease = 0;
*
* TclpInitPlatform --
*
- * Initialize all the platform-dependant things like signals and
+ * Initialize all the platform-dependent things like signals and
* floating-point error handling.
*
* Called at process initialization time.
@@ -411,7 +409,7 @@ TclpInitPlatform(void)
/*
* In case the initial locale is not "C", ensure that the numeric
* processing is done in "C" locale regardless. This is needed because Tcl
- * relies on routines like strtod, but should not have locale dependent
+ * relies on routines like strtol/strtoul, but should not have locale dependent
* behavior.
*/
@@ -1001,7 +999,7 @@ TclpFindVariable(
* searches). */
{
int i, result = -1;
- register const char *env, *p1, *p2;
+ const char *env, *p1, *p2;
Tcl_DString envString;
Tcl_DStringInit(&envString);
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 60340b0..35eca8d 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -844,7 +844,7 @@ Tcl_Mutex *
TclpNewAllocMutex(void)
{
AllocMutex *lockPtr;
- register PMutex *plockPtr;
+ PMutex *plockPtr;
lockPtr = malloc(sizeof(AllocMutex));
if (lockPtr == NULL) {
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 1d8b351..1b90f6e 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -11,7 +11,6 @@
*/
#include "tclInt.h"
-#include <locale.h>
#if defined(TCL_WIDE_CLICKS) && defined(MAC_OSX_TCL)
#include <mach/mach_time.h>
#endif
@@ -118,7 +117,7 @@ TclpGetMicroseconds(void)
* This procedure returns a value that represents the highest resolution
* clock available on the system. There are no garantees on what the
* resolution will be. In Tcl we will call this value a "click". The
- * start time is also system dependant.
+ * start time is also system dependent.
*
* Results:
* Number of clicks from some start time.
@@ -167,7 +166,7 @@ TclpGetClicks(void)
* This procedure returns a WideInt value that represents the highest
* resolution clock available on the system. There are no garantees on
* what the resolution will be. In Tcl we will call this value a "click".
- * The start time is also system dependant.
+ * The start time is also system dependent.
*
* Results:
* Number of WideInt clicks from some start time.
diff --git a/win/Makefile.in b/win/Makefile.in
index af2b6e3..c9ef05b 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -96,7 +96,7 @@ COMPILE_DEBUG_FLAGS =
SRC_DIR = @srcdir@
ROOT_DIR = @srcdir@/..
-TOP_DIR = $(shell cd @srcdir@/..; pwd -P)
+TOP_DIR = $(shell cd @srcdir@/..; pwd -W 2>/dev/null || pwd -P)
GENERIC_DIR = $(TOP_DIR)/generic
TOMMATH_DIR = $(TOP_DIR)/libtommath
WIN_DIR = $(TOP_DIR)/win
@@ -116,7 +116,7 @@ GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)')
TOMMATH_DIR_NATIVE = $(shell $(CYGPATH) '$(TOMMATH_DIR)')
WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)')
ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)')
-ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W || pwd -P)
+ROOT_DIR_WIN_NATIVE = $(shell cd '$(ROOT_DIR)' ; pwd -W 2>/dev/null || pwd -P)
ZLIB_DIR_NATIVE = $(shell $(CYGPATH) '$(ZLIB_DIR)')
#GENERIC_DIR_NATIVE = $(GENERIC_DIR)
#TOMMATH_DIR_NATIVE = $(TOMMATH_DIR)
@@ -486,7 +486,7 @@ all: binaries libraries doc packages
# or from mingw/msys shell:
# $ ./tcltest -verbose bps -file fileName.test
-tcltest.cmd:
+tcltest.cmd: Makefile
@echo 'Create tcltest.cmd helpers';
@(\
echo '@echo off'; \
@@ -494,8 +494,8 @@ tcltest.cmd:
echo 'set BDP=%~dp0'; \
echo 'set OWD=%CD%'; \
echo 'cd /d %TEMP%'; \
- echo 'rem "%BDP%\$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" %*'; \
- echo '"%BDP%\$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_PRMS)" %*'; \
+ echo 'rem "%BDP%\$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" %TESTFLAGS% -load "$(TEST_LOAD_FACILITIES)" %*'; \
+ echo '"%BDP%\$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" %TESTFLAGS% -load "$(TEST_LOAD_PRMS)" %*'; \
echo 'cd /d %OWD%'; \
) > tcltest.cmd;
@(\
@@ -503,11 +503,13 @@ tcltest.cmd:
echo '#LANG=en_US'; \
echo 'BDP=$$(dirname $$(readlink -f %0))'; \
echo 'cd /tmp'; \
- echo '#"$$BDP/$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" "$$@"'; \
- echo '"$$BDP/$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $(TESTFLAGS) -load "$(TEST_LOAD_PRMS)" "$$@"'; \
- ) > tcltest;
+ echo '#"$$BDP/$(TCLSH)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $$TESTFLAGS -load "$(TEST_LOAD_FACILITIES)" "$$@"'; \
+ echo '"$$BDP/$(TEST_EXE_FILE)" "$(ROOT_DIR_WIN_NATIVE)/tests/all.tcl" $$TESTFLAGS -load "$(TEST_LOAD_PRMS)" "$$@"'; \
+ ) > tcltest.sh;
-tcltest: $(TCLSH) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd
+tcltest.sh: tcltest.cmd
+
+tcltest: binaries $(TEST_EXE_FILE) $(TEST_DLL_FILE) $(CAT32) tcltest.cmd
binaries: $(TCL_STUB_LIB_FILE) @LIBRARIES@ winextensions ${TCL_ZIP_FILE} $(TCLSH)
@@ -548,6 +550,7 @@ ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} ${DDE_DLL_FILE} ${REG_DLL_FILE}
$(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES)
$(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
+ $(COPY) tclsh.exe.manifest $(TCLSH).manifest
@VC_MANIFEST_EMBED_EXE@
cat32.$(OBJEXT): cat.c
@@ -567,6 +570,7 @@ ${TCL_STUB_LIB_FILE}: ${STUB_OBJS}
${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES) @ZLIB_DLL_FILE@ ${TCL_ZIP_FILE}
@$(RM) ${TCL_DLL_FILE} $(TCL_LIB_FILE)
@MAKE_DLL@ ${TCL_OBJS} tcl.$(RES) $(SHLIB_LD_LIBS)
+ $(COPY) tclsh.exe.manifest ${TCL_DLL_FILE}.manifest
@VC_MANIFEST_EMBED_DLL@
@if test "${ZIPFS_BUILD}" = "1" ; then \
cat ${TCL_ZIP_FILE} >> ${TCL_DLL_FILE}; \
@@ -581,18 +585,22 @@ ${TCL_LIB_FILE}: ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS}
${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${DDE_OBJS}
@MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
+ $(COPY) tclsh.exe.manifest ${DDE_DLL_FILE}.manifest
${REG_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${REG_OBJS}
@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
+ $(COPY) tclsh.exe.manifest ${REG_DLL_FILE}.manifest
${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
@$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}
@MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
+ $(COPY) tclsh.exe.manifest ${TEST_DLL_FILE}.manifest
${TEST_EXE_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} tclTestMain.${OBJEXT}
@$(RM) ${TEST_EXE_FILE}
$(CC) $(CFLAGS) $(TCLTEST_OBJS) tclTestMain.$(OBJEXT) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
+ $(COPY) tclsh.exe.manifest ${TEST_EXE_FILE}.manifest
# use pre-built zlib1.dll
${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
@@ -647,17 +655,17 @@ tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c
tclPkgConfig.${OBJEXT}: tclPkgConfig.c
$(CC) -c $(CC_SWITCHES) \
- -DCFG_INSTALL_LIBDIR=\"$(LIB_INSTALL_DIR_NATIVE)\" \
- -DCFG_INSTALL_BINDIR=\"$(BIN_INSTALL_DIR_NATIVE)\" \
- -DCFG_INSTALL_SCRDIR=\"$(SCRIPT_INSTALL_DIR_NATIVE)\" \
- -DCFG_INSTALL_INCDIR=\"$(INCLUDE_INSTALL_DIR_NATIVE)\" \
- -DCFG_INSTALL_DOCDIR=\"$(MAN_INSTALL_DIR)\" \
+ -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR_NATIVE)\"" \
+ -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR_NATIVE)\"" \
+ -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR_NATIVE)\"" \
+ -DCFG_INSTALL_INCDIR="\"$(INCLUDE_INSTALL_DIR_NATIVE)\"" \
+ -DCFG_INSTALL_DOCDIR="\"$(MAN_INSTALL_DIR)\"" \
\
- -DCFG_RUNTIME_LIBDIR=\"$(libdir_native)\" \
- -DCFG_RUNTIME_BINDIR=\"$(bindir_native)\" \
- -DCFG_RUNTIME_SCRDIR=\"$(TCL_LIBRARY_NATIVE)\" \
- -DCFG_RUNTIME_INCDIR=\"$(includedir_native)\" \
- -DCFG_RUNTIME_DOCDIR=\"$(mandir_native)\" \
+ -DCFG_RUNTIME_LIBDIR="\"$(libdir_native)\"" \
+ -DCFG_RUNTIME_BINDIR="\"$(bindir_native)\"" \
+ -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY_NATIVE)\"" \
+ -DCFG_RUNTIME_INCDIR="\"$(includedir_native)\"" \
+ -DCFG_RUNTIME_DOCDIR="\"$(mandir_native)\"" \
-DCFG_RUNTIME_DLLFILE="\"$(TCL_DLL_FILE)\"" \
-DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \
-DBUILD_tcl \
@@ -927,13 +935,13 @@ install-private-headers: libraries
test: test-tcl test-packages
-test-tcl: binaries $(TCLSH) $(CAT32) $(TEST_DLL_FILE)
+test-tcl: tcltest
TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
$(WINE) ./$(TCLSH) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \
- -load "$(TEST_LOAD_FACILITIES)" | $(WINE) ./$(CAT32)
+ -load "$(TEST_LOAD_FACILITIES)"
# Useful target to launch a built tclsh with the proper path,...
-runtest: binaries $(TCLSH) $(TEST_DLL_FILE)
+runtest: tcltest
@TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
$(WINE) ./$(TCLSH) $(TESTFLAGS) -load "$(TEST_LOAD_FACILITIES)" $(SCRIPT)
@@ -959,7 +967,7 @@ cleanhelp:
clean: cleanhelp clean-packages
$(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out
- $(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest
+ $(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh
$(RM) *.pch *.ilk *.pdb
$(RM) minizip${HOST_EXEEXT} *.${HOST_OBJEXT}
$(RM) *.zip
diff --git a/win/cat.c b/win/cat.c
index d49e37c..bd84dd4 100644
--- a/win/cat.c
+++ b/win/cat.c
@@ -28,14 +28,14 @@ _tmain(void)
const char *err;
while (1) {
- n = read(0, buf, sizeof(buf));
+ n = _read(0, buf, sizeof(buf));
if (n <= 0) {
break;
}
- write(1, buf, n);
+ _write(1, buf, n);
}
err = (sizeof(int) == 2) ? "stderr16" : "stderr32";
- write(2, err, strlen(err));
+ _write(2, err, (unsigned int)strlen(err));
return 0;
}
diff --git a/win/configure b/win/configure
index c36e51d..34fd5b3 100755
--- a/win/configure
+++ b/win/configure
@@ -778,6 +778,7 @@ ac_user_opts='
enable_option_checking
with_encoding
enable_shared
+enable_time64bit
enable_64bit
enable_zipfs
enable_symbols
@@ -1400,6 +1401,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-shared build and link with shared libraries (default: on)
+ --enable-time64bit force 64-bit time_t for 32-bit build (default: off)
--enable-64bit enable 64bit support (where applicable)
--enable-zipfs build with Zipfs support (default: on)
--enable-symbols build with debugging symbols (default: off)
@@ -3749,6 +3751,25 @@ $as_echo "#define STATIC_BUILD 1" >>confdefs.h
#--------------------------------------------------------------------
+# Check whether --enable-time64bit was given.
+#--------------------------------------------------------------------
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking force of 64-bit time_t" >&5
+$as_echo_n "checking force of 64-bit time_t... " >&6; }
+# Check whether --enable-time64bit was given.
+if test "${enable_time64bit+set}" = set; then :
+ enableval=$enable_time64bit; tcl_ok=$enableval
+else
+ tcl_ok=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$tcl_ok\"" >&5
+$as_echo "\"$tcl_ok\"" >&6; }
+if test "$tcl_ok" = "yes"; then
+ CFLAGS="${CFLAGS} -D_USE_64BIT_TIME_T"
+fi
+
+#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This
# macro depends on the value of SHARED_BUILD, and should be called
# after SC_ENABLE_SHARED checks the configure switches.
diff --git a/win/configure.ac b/win/configure.ac
index 7077045..b46835c 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -92,6 +92,20 @@ SC_TCL_CFG_ENCODING
SC_ENABLE_SHARED
#--------------------------------------------------------------------
+# Check whether --enable-time64bit was given.
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING([force of 64-bit time_t])
+AC_ARG_ENABLE(time64bit,
+ AC_HELP_STRING([--enable-time64bit],
+ [force 64-bit time_t for 32-bit build (default: off)]),
+ [tcl_ok=$enableval], [tcl_ok=no])
+AC_MSG_RESULT("$tcl_ok")
+if test "$tcl_ok" = "yes"; then
+ CFLAGS="${CFLAGS} -D_USE_64BIT_TIME_T"
+fi
+
+#--------------------------------------------------------------------
# The statements below define a collection of compile flags. This
# macro depends on the value of SHARED_BUILD, and should be called
# after SC_ENABLE_SHARED checks the configure switches.
diff --git a/win/makefile.vc b/win/makefile.vc
index 44af015..c2343a0 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -51,6 +51,71 @@
# vcvars32.bat according to the instructions for it. This can also
# turn on the 64-bit compiler, if your SDK has it.
#
+# Basic macros and options usable on the commandline (see rules.vc for more info):
+# OPTS=msvcrt,static,staticpkg,symbols,profile,unchecked,time64bit,utfmax,none
+# Sets special options for the core. The default is for none.
+# Any combination of the above may be used (comma separated).
+# 'none' will over-ride everything to nothing.
+#
+# msvcrt = Affects the static option only to switch it from
+# using libcmt(d) as the C runtime [by default] to
+# msvcrt(d). This is useful for static embedding
+# support.
+# static = Builds a static library of the core instead of a
+# dll. The shell will be static (and large), as well.
+# staticpkg= Affects the static option only to switch
+# tclshXX.exe to have the dde and reg extension linked
+# inside it.
+# thrdalloc = Use the thread allocator (shared global free pool).
+# symbols = Adds symbols for step debugging.
+# profile = Adds profiling hooks. Map file is assumed.
+# unchecked = Allows a symbols build to not use the debug
+# enabled runtime (msvcrt.dll not msvcrtd.dll
+# or libcmt.lib not libcmtd.lib).
+# time64bit = Forces a build using 64-bit time_t for 32-bit build
+# (CRT library should support this).
+# utfmax = Forces Tcl_UniChar to be a 32-bit quantity in stead
+# of 16-bits
+#
+# STATS=compdbg,memdbg,none
+# Sets optional memory and bytecode compiler debugging code added
+# to the core. The default is for none. Any combination of the
+# above may be used (comma separated). 'none' will over-ride
+# everything to nothing.
+#
+# compdbg = Enables byte compilation logging.
+# memdbg = Enables the debugging memory allocator.
+#
+# CHECKS=64bit,fullwarn,nodep,none
+# Sets special macros for checking compatibility.
+#
+# 64bit = Enable 64bit portability warnings (if available)
+# fullwarn = Builds with full compiler and link warnings enabled.
+# Very verbose.
+# nodep = Turns off compatibility macros to ensure the core
+# isn't being built with deprecated functions.
+#
+# MACHINE=(ALPHA|AMD64|IA64|IX86)
+# Set the machine type used for the compiler, linker, and
+# resource compiler. This hook is needed to tell the tools
+# when alternate platforms are requested. IX86 is the default
+# when not specified. If the CPU environment variable has been
+# set (ie: recent Platform SDK) then MACHINE is set from CPU.
+#
+# TMP_DIR=<path>
+# OUT_DIR=<path>
+# Hooks to allow the intermediate and output directories to be
+# changed. $(OUT_DIR) is assumed to be
+# $(BINROOT)\(Release|Debug) based on if symbols are requested.
+# $(TMP_DIR) will de $(OUT_DIR)\<buildtype> by default.
+#
+# TESTPAT=<file>
+# Reads the tests requested to be run from this file.
+#
+# CFG_ENCODING=encoding
+# name of encoding for configuration information. Defaults
+# to cp1252
+#
# Examples:
# c:\tcl_src\win\>nmake -f makefile.vc release
# c:\tcl_src\win\>nmake -f makefile.vc test
diff --git a/win/rules.vc b/win/rules.vc
index 1cd0b68..3fa0704 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -686,6 +686,9 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
# USE_STUBS - 1 -> compile to use stubs interfaces, 0 -> direct linking
# CONFIG_CHECK - 1 -> check current build configuration against Tcl
# configuration (ignored for Tcl itself)
+# _USE_64BIT_TIME_T - forces a build using 64-bit time_t for 32-bit build
+# (CRT library should support this)
+# TCL_UTF_MAX=6 - forces a build using 32-bit Tcl_UniChar in stead of 16-bit.
# Further, LINKERFLAGS are modified based on above.
# Default values for all the above
@@ -745,6 +748,16 @@ TCL_USE_STATIC_PACKAGES = 1
TCL_USE_STATIC_PACKAGES = 0
!endif
+!if [nmakehlp -f $(OPTS) "time64bit"]
+!message *** Force 64-bit time_t
+_USE_64BIT_TIME_T = 1
+!endif
+
+!if [nmakehlp -f $(OPTS) "utfmax"]
+!message *** Force 32-bit Tcl_UniChar
+TCL_UTF_MAX = 6
+!endif
+
# Yes, it's weird that the "symbols" option controls DEBUG and
# the "pdbs" option controls SYMBOLS. That's historical.
!if [nmakehlp -f $(OPTS) "symbols"]
@@ -1305,6 +1318,13 @@ OPTDEFINES = $(OPTDEFINES) -DTCL_CFG_DO64BIT
OPTDEFINES = $(OPTDEFINES) -DNO_STRTOI64
!endif
+!if "$(_USE_64BIT_TIME_T)" == "1"
+OPTDEFINES = $(OPTDEFINES) -D_USE_64BIT_TIME_T
+!endif
+!if "$(TCL_UTF_MAX)" == "6"
+OPTDEFINES = $(OPTDEFINES) -DTCL_UTF_MAX=6
+!endif
+
# _ATL_XP_TARGETING - Newer SDK's need this to build for XP
COMPILERFLAGS = /D_ATL_XP_TARGETING
diff --git a/win/tcl.dsp b/win/tcl.dsp
index eae1681..065d598 100644
--- a/win/tcl.dsp
+++ b/win/tcl.dsp
@@ -148,10 +148,6 @@ SOURCE=..\compat\dlfcn.h
# End Source File
# Begin Source File
-SOURCE=..\compat\fixstrtod.c
-# End Source File
-# Begin Source File
-
SOURCE=..\compat\gettod.c
# End Source File
# Begin Source File
@@ -188,10 +184,6 @@ SOURCE=..\compat\strstr.c
# End Source File
# Begin Source File
-SOURCE=..\compat\strtod.c
-# End Source File
-# Begin Source File
-
SOURCE=..\compat\strtol.c
# End Source File
# Begin Source File
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 36205e1..9e5885c 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -290,7 +290,7 @@ TclWinDriveLetterForVolMountPoint(
{
MountPointMap *dlIter, *dlPtr2;
WCHAR Target[55]; /* Target of mount at mount point */
- WCHAR drive[4] = TEXT("A:\\");
+ WCHAR drive[4] = L"A:\\";
/*
* Detect the volume mounted there. Unfortunately, there is no simple way
@@ -368,7 +368,7 @@ TclWinDriveLetterForVolMountPoint(
* We couldn't find it, so we must iterate over the letters.
*/
- for (drive[0] = L'A'; drive[0] <= L'Z'; drive[0]++) {
+ for (drive[0] = 'A'; drive[0] <= 'Z'; drive[0]++) {
/*
* Try to read the volume mount point and see where it points.
*/
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index dcd8528..3b6e4e4 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -1571,7 +1571,7 @@ NativeIsComPort(
* The 4th character must be a digit 1..9
*/
- if ((p[3] < L'1') || (p[3] > L'9')) {
+ if ((p[3] < '1') || (p[3] > '9')) {
return 0;
}
return 1;
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 28969d6..3668ae3 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -202,8 +202,8 @@ static const Tcl_ChannelType consoleChannelType = {
*
* ReadConsoleBytes, WriteConsoleBytes --
*
- * Wrapper for ReadConsole{A,W}, that takes and returns number of bytes
- * instead of number of TCHARS.
+ * Wrapper for ReadConsoleW, that takes and returns number of bytes
+ * instead of number of WCHARS.
*
*----------------------------------------------------------------------
*/
@@ -217,7 +217,6 @@ ReadConsoleBytes(
{
DWORD ntchars;
BOOL result;
- int tcharsize = sizeof(TCHAR);
/*
* If user types a Ctrl-Break or Ctrl-C, ReadConsole will return
@@ -230,11 +229,11 @@ ReadConsoleBytes(
* will run and take whatever action it deems appropriate.
*/
do {
- result = ReadConsole(hConsole, lpBuffer, nbytes / tcharsize, &ntchars,
+ result = ReadConsole(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
NULL);
} while (result && ntchars == 0 && GetLastError() == ERROR_OPERATION_ABORTED);
if (nbytesread != NULL) {
- *nbytesread = ntchars * tcharsize;
+ *nbytesread = ntchars * sizeof(WCHAR);
}
return result;
}
@@ -248,12 +247,11 @@ WriteConsoleBytes(
{
DWORD ntchars;
BOOL result;
- int tcharsize = sizeof(TCHAR);
- result = WriteConsole(hConsole, lpBuffer, nbytes / tcharsize, &ntchars,
+ result = WriteConsole(hConsole, lpBuffer, nbytes / sizeof(WCHAR), &ntchars,
NULL);
if (nbyteswritten != NULL) {
- *nbyteswritten = ntchars * tcharsize;
+ *nbyteswritten = ntchars * sizeof(WCHAR);
}
return result;
}
diff --git a/win/tclWinError.c b/win/tclWinError.c
index bce81fa..18f290f 100644
--- a/win/tclWinError.c
+++ b/win/tclWinError.c
@@ -394,14 +394,14 @@ tclWinDebugPanic(
char buf[TCL_MAX_WARN_LEN * 3];
vsnprintf(buf, sizeof(buf), format, argList);
- msgString[TCL_MAX_WARN_LEN-1] = L'\0';
+ msgString[TCL_MAX_WARN_LEN-1] = '\0';
MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN);
/*
* Truncate MessageBox string if it is too long to not overflow the buffer.
*/
- if (msgString[TCL_MAX_WARN_LEN-1] != L'\0') {
+ if (msgString[TCL_MAX_WARN_LEN-1] != '\0') {
memcpy(msgString + (TCL_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR));
}
OutputDebugStringW(msgString);
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 2531ba6..78489ca 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -455,7 +455,7 @@ DoRenameFile(
return TCL_ERROR;
}
nativeTmp = (WCHAR *) tempBuf;
- nativeRest[0] = L'\0';
+ nativeRest[0] = '\0';
result = TCL_ERROR;
nativePrefix = (WCHAR *) L"tclr";
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index fa5f28e..1c4379a 100755
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -395,11 +395,11 @@ WinSymLinkDirectory(
*/
for (loop = nativeTarget; *loop != 0; loop++) {
- if (*loop == L'/') {
- *loop = L'\\';
+ if (*loop == '/') {
+ *loop = '\\';
}
}
- if ((nativeTarget[len-1] == L'\\') && (nativeTarget[len-2] != L':')) {
+ if ((nativeTarget[len-1] == '\\') && (nativeTarget[len-2] != ':')) {
nativeTarget[len-1] = 0;
}
@@ -572,7 +572,7 @@ WinReadLinkDirectory(
*/
offset = 0;
- if (reparseBuffer->MountPointReparseBuffer.PathBuffer[0] == L'\\') {
+ if (reparseBuffer->MountPointReparseBuffer.PathBuffer[0] == '\\') {
/*
* Check whether this is a mounted volume.
*/
@@ -586,7 +586,7 @@ WinReadLinkDirectory(
* to fix here. It doesn't seem very well documented.
*/
- reparseBuffer->MountPointReparseBuffer.PathBuffer[1]=L'\\';
+ reparseBuffer->MountPointReparseBuffer.PathBuffer[1] = '\\';
/*
* Check if a corresponding drive letter exists, and use that
@@ -814,7 +814,7 @@ tclWinDebugPanic(
va_start(argList, format);
vsnprintf(buf, sizeof(buf), format, argList);
- msgString[TCL_MAX_WARN_LEN-1] = L'\0';
+ msgString[TCL_MAX_WARN_LEN-1] = '\0';
MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN);
/*
@@ -822,7 +822,7 @@ tclWinDebugPanic(
* and cause possible oversized window error.
*/
- if (msgString[TCL_MAX_WARN_LEN-1] != L'\0') {
+ if (msgString[TCL_MAX_WARN_LEN-1] != '\0') {
memcpy(msgString + (TCL_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR));
}
if (IsDebuggerPresent()) {
@@ -1504,7 +1504,7 @@ TclpGetUserHome(
DWORD i, size = MAX_PATH;
wHomeDir = uiPtr->usri1_home_dir;
- if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) {
+ if ((wHomeDir != NULL) && (wHomeDir[0] != '\0')) {
size = lstrlenW(wHomeDir);
TclWCharToUtfDString(wHomeDir, size, bufferPtr);
} else {
@@ -2583,8 +2583,8 @@ TclpObjNormalizePath(
for (i=0 ; i<len ; i++) {
WCHAR wc = ((WCHAR *) nativePath)[i];
- if (wc >= L'a') {
- wc -= (L'a' - L'A');
+ if (wc >= 'a') {
+ wc -= ('a' - 'A');
((WCHAR *) nativePath)[i] = wc;
}
}
@@ -2674,8 +2674,8 @@ TclpObjNormalizePath(
if (isDrive) {
WCHAR drive = ((WCHAR *) nativePath)[0];
- if (drive >= L'a') {
- drive -= (L'a' - L'A');
+ if (drive >= 'a') {
+ drive -= ('a' - 'A');
((WCHAR *) nativePath)[0] = drive;
}
Tcl_DStringAppend(&dsNorm, (const char *)nativePath,
@@ -2772,8 +2772,8 @@ TclpObjNormalizePath(
* We have to make the drive letter uppercase.
*/
- if (wpath[0] >= L'a') {
- wpath[0] -= (L'a' - L'A');
+ if (wpath[0] >= 'a') {
+ wpath[0] -= ('a' - 'A');
}
Tcl_DStringAppend(&dsNorm, (const char *) wpath,
wpathlen * sizeof(WCHAR));
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index f4c6e06..f35d318 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -113,7 +113,7 @@ static void AppendEnvironment(Tcl_Obj *listPtr, const char *lib);
*
* TclpInitPlatform --
*
- * Initialize all the platform-dependant things like signals,
+ * Initialize all the platform-dependent things like signals,
* floating-point error handling and sockets.
*
* Called at process initialization time.
@@ -628,7 +628,7 @@ TclpFindVariable(
* searches). */
{
int i, length, result = -1;
- register const char *env, *p1, *p2;
+ const char *env, *p1, *p2;
char *envUpper, *nameUpper;
Tcl_DString envString;
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index ba07d0e..07c1b9e 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -58,9 +58,9 @@ MODULE_SCOPE Tcl_Channel TclWinOpenSerialChannel(HANDLE handle,
char *channelName, int permissions);
MODULE_SCOPE HANDLE TclWinSerialOpen(HANDLE handle, const WCHAR *name,
DWORD access);
-MODULE_SCOPE int TclWinSymLinkCopyDirectory(const TCHAR *LinkOriginal,
- const TCHAR *LinkCopy);
-MODULE_SCOPE int TclWinSymLinkDelete(const TCHAR *LinkOriginal,
+MODULE_SCOPE int TclWinSymLinkCopyDirectory(const WCHAR *LinkOriginal,
+ const WCHAR *LinkCopy);
+MODULE_SCOPE int TclWinSymLinkDelete(const WCHAR *LinkOriginal,
int linkOnly);
MODULE_SCOPE int TclWinFileOwned(Tcl_Obj *);
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index 69263e9..dc673d2 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -64,7 +64,7 @@ TclpDlopen(
int flags)
{
HINSTANCE hInstance = NULL;
- const TCHAR *nativeName;
+ const WCHAR *nativeName;
Tcl_LoadHandle handlePtr;
DWORD firstError;
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index b34fc4f..dba7a31 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -49,7 +49,7 @@ static Tcl_ThreadDataKey dataKey;
*/
static int notifierCount = 0;
-static const TCHAR className[] = TEXT("TclNotifier");
+static const WCHAR className[] = L"TclNotifier";
static int initialized = 0;
static CRITICAL_SECTION notifierMutex;
@@ -83,7 +83,6 @@ Tcl_InitNotifier(void)
return tclNotifierHooks.initNotifierProc();
} else {
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- WNDCLASS class;
TclpMasterLock();
if (!initialized) {
@@ -99,18 +98,20 @@ Tcl_InitNotifier(void)
EnterCriticalSection(&notifierMutex);
if (notifierCount == 0) {
- class.style = 0;
- class.cbClsExtra = 0;
- class.cbWndExtra = 0;
- class.hInstance = TclWinGetTclInstance();
- class.hbrBackground = NULL;
- class.lpszMenuName = NULL;
- class.lpszClassName = className;
- class.lpfnWndProc = NotifierProc;
- class.hIcon = NULL;
- class.hCursor = NULL;
-
- if (!RegisterClass(&class)) {
+ WNDCLASS clazz;
+
+ clazz.style = 0;
+ clazz.cbClsExtra = 0;
+ clazz.cbWndExtra = 0;
+ clazz.hInstance = TclWinGetTclInstance();
+ clazz.hbrBackground = NULL;
+ clazz.lpszMenuName = NULL;
+ clazz.lpszClassName = className;
+ clazz.lpfnWndProc = NotifierProc;
+ clazz.hIcon = NULL;
+ clazz.hCursor = NULL;
+
+ if (!RegisterClass(&clazz)) {
Tcl_Panic("Unable to register TclNotifier window class");
}
}
diff --git a/win/tclWinPanic.c b/win/tclWinPanic.c
index 5c6e02d..fbd3e46 100644
--- a/win/tclWinPanic.c
+++ b/win/tclWinPanic.c
@@ -42,14 +42,14 @@ Tcl_ConsolePanic(
va_start(argList, format);
vsnprintf(buf+3, sizeof(buf)-3, format, argList);
buf[sizeof(buf)-1] = 0;
- msgString[TCL_MAX_WARN_LEN-1] = L'\0';
+ msgString[TCL_MAX_WARN_LEN-1] = '\0';
MultiByteToWideChar(CP_UTF8, 0, buf+3, -1, msgString, TCL_MAX_WARN_LEN);
/*
* Truncate MessageBox string if it is too long to not overflow the buffer.
*/
- if (msgString[TCL_MAX_WARN_LEN-1] != L'\0') {
+ if (msgString[TCL_MAX_WARN_LEN-1] != '\0') {
memcpy(msgString + (TCL_MAX_WARN_LEN - 5), L" ...", 5 * sizeof(WCHAR));
}
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 943f1ca..3f8b546 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -14,7 +14,12 @@
#ifndef _TCLWINPORT
#define _TCLWINPORT
-#if !defined(_WIN64) && defined(BUILD_tcl)
+/* define _USE_64BIT_TIME_T (or make/configure option time64bit) to force 64-bit time_t */
+#if defined(_USE_64BIT_TIME_T)
+#define __MINGW_USE_VC2005_COMPAT
+#endif
+
+#if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT) && defined(BUILD_tcl)
/* See [Bug 3354324]: file mtime sets wrong time */
# define _USE_32BIT_TIME_T
#endif
diff --git a/win/tclWinTest.c b/win/tclWinTest.c
index 40be3d5..c06f10a 100644
--- a/win/tclWinTest.c
+++ b/win/tclWinTest.c
@@ -41,6 +41,8 @@ static int TestwinclockCmd(ClientData dummy, Tcl_Interp* interp,
int objc, Tcl_Obj *const objv[]);
static int TestwinsleepCmd(ClientData dummy, Tcl_Interp* interp,
int objc, Tcl_Obj *const objv[]);
+static int TestSizeCmd(ClientData dummy, Tcl_Interp* interp,
+ int objc, Tcl_Obj *const objv[]);
static Tcl_ObjCmdProc TestExceptionCmd;
static int TestplatformChmod(const char *nativePath, int pmode);
static int TestchmodCmd(ClientData dummy, Tcl_Interp* interp,
@@ -78,6 +80,7 @@ TclplatformtestInit(
Tcl_CreateObjCommand(interp, "testwinclock", TestwinclockCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testwinsleep", TestwinsleepCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testexcept", TestExceptionCmd, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "testsize", TestSizeCmd, NULL, NULL);
return TCL_OK;
}
@@ -310,6 +313,26 @@ TestwinsleepCmd(
return TCL_OK;
}
+static int
+TestSizeCmd(
+ ClientData clientData, /* Unused */
+ Tcl_Interp* interp, /* Tcl interpreter */
+ int objc, /* Parameter count */
+ Tcl_Obj *const * objv) /* Parameter vector */
+{
+ if (objc != 2) {
+ goto syntax;
+ }
+ if (strcmp(Tcl_GetString(objv[1]), "time_t") == 0) {
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(sizeof(time_t)));
+ return TCL_OK;
+ }
+
+syntax:
+ Tcl_WrongNumArgs(interp, 1, objv, "time_t");
+ return TCL_ERROR;
+}
+
/*
*----------------------------------------------------------------------
*
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index bfebbe6..985e181 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -124,7 +124,7 @@ static struct {
int initialized; /* 1 if initialized, 0 otherwise */
int perfCounter; /* 1 if performance counter usable for wide clicks */
double microsecsScale; /* Denominator scale between clock / microsecs */
-} wideClick = {0, 0.0};
+} wideClick = {0, 0, 0.0};
/*
@@ -198,7 +198,7 @@ TclpGetSeconds(void)
* This procedure returns a value that represents the highest resolution
* clock available on the system. There are no guarantees on what the
* resolution will be. In Tcl we will call this value a "click". The
- * start time is also system dependant.
+ * start time is also system dependent.
*
* Results:
* Number of clicks from some start time.