Compare commits
308
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4654f8568 | ||
|
|
332f3e88d2 | ||
|
|
49935f618a | ||
|
|
12b79cb977 | ||
|
|
3a5183b88e | ||
|
|
d129d1a6e9 | ||
|
|
b032f6d67b | ||
|
|
777a642667 | ||
|
|
eaaa675e99 | ||
|
|
5d106cabda | ||
|
|
4b7f867f90 | ||
|
|
a4c8e24f4c | ||
|
|
309510e33e | ||
|
|
58c45c0f97 | ||
|
|
fdf2dd144f | ||
|
|
97bf1ced2b | ||
|
|
28f17c0d70 | ||
|
|
9d0dfc6f26 | ||
|
|
4d25168772 | ||
|
|
912f1a8816 | ||
|
|
24829b80ac | ||
|
|
12c3fbcb0c | ||
|
|
a33b0950be | ||
|
|
9740bc1662 | ||
|
|
8751d32304 | ||
|
|
b0ffd31845 | ||
|
|
ac198c7f44 | ||
|
|
150fb8061f | ||
|
|
d17af2c703 | ||
|
|
41be9233e9 | ||
|
|
574c3c0027 | ||
|
|
d25a0dae48 | ||
|
|
c4459402a9 | ||
|
|
7c0afa7cd6 | ||
|
|
595cb86379 | ||
|
|
5ef1c629df | ||
|
|
9392d9001a | ||
|
|
e113eb82e5 | ||
|
|
334b8029ed | ||
|
|
be26adf83b | ||
|
|
9489b8b506 | ||
|
|
8ab0ae062e | ||
|
|
2f8cb2ab85 | ||
|
|
a9083528ab | ||
|
|
96f1d4ec34 | ||
|
|
c1ee80eccf | ||
|
|
526c432322 | ||
|
|
1ebe878444 | ||
|
|
1cd98b93bd | ||
|
|
5645bb01ff | ||
|
|
e69d76af16 | ||
|
|
6420ec98e8 | ||
|
|
44d4c7f793 | ||
|
|
1cab268c94 | ||
|
|
39fba10b45 | ||
|
|
5f72a5554c | ||
|
|
3fe6dfccc1 | ||
|
|
774c2050f1 | ||
|
|
ab3a73bf75 | ||
|
|
d23bb9578a | ||
|
|
be861c2430 | ||
|
|
984c717026 | ||
|
|
7a1b66b00d | ||
|
|
6c6bec6689 | ||
|
|
372248583f | ||
|
|
4ff1524f2a | ||
|
|
4e994192a1 | ||
|
|
c70641a878 | ||
|
|
b15a6a700f | ||
|
|
ffdd95d4a3 | ||
|
|
d249b0629d | ||
|
|
cb9018a721 | ||
|
|
e298c2595d | ||
|
|
3ab1f672a4 | ||
|
|
7db84b0155 | ||
|
|
e2f5de73e3 | ||
|
|
57c23073f7 | ||
|
|
245ed0c3c3 | ||
|
|
543703d4ee | ||
|
|
1f5c7c693b | ||
|
|
2865a8da13 | ||
|
|
8af3fb7317 | ||
|
|
ccc592df50 | ||
|
|
de4f571baa | ||
|
|
8094d33e43 | ||
|
|
9ca29b09ae | ||
|
|
95d2a7f7c0 | ||
|
|
d232a6d28e | ||
|
|
5419f8e0ba | ||
|
|
f218c1f1eb | ||
|
|
84f4682378 | ||
|
|
06124df7de | ||
|
|
4909a5cc24 | ||
|
|
55b6550aaa | ||
|
|
cd6fdc6976 | ||
|
|
48891ff56a | ||
|
|
5ee08fdf00 | ||
|
|
e42fbc68b9 | ||
|
|
ba3eca6d7e | ||
|
|
eaf90743ee | ||
|
|
1e9a4512c7 | ||
|
|
407ebf2899 | ||
|
|
0cced28f38 | ||
|
|
05509bdd77 | ||
|
|
68c28bd274 | ||
|
|
f720f4cad5 | ||
|
|
7df97e9292 | ||
|
|
417474f1fd | ||
|
|
6fb4854406 | ||
|
|
817da23169 | ||
|
|
f2c8c6c408 | ||
|
|
747b668676 | ||
|
|
d96dda52c4 | ||
|
|
e4912abbd2 | ||
|
|
9b1a75a1cc | ||
|
|
1749b4cc87 | ||
|
|
96bf31bbbd | ||
|
|
0dfee54d3f | ||
|
|
689987ea92 | ||
|
|
b1266f39d8 | ||
|
|
9d183921c9 | ||
|
|
b938ddd055 | ||
|
|
2b8e087252 | ||
|
|
01dccf28f9 | ||
|
|
89fee22341 | ||
|
|
abf9722f42 | ||
|
|
d74f47cb2a | ||
|
|
230de714e7 | ||
|
|
9535d1ecdc | ||
|
|
9eb32ba719 | ||
|
|
6d27f27fe6 | ||
|
|
aaf56c8086 | ||
|
|
f080055506 | ||
|
|
c4f3c560ab | ||
|
|
2c246b85fa | ||
|
|
f9944f5235 | ||
|
|
c73dcaad20 | ||
|
|
d164d828d7 | ||
|
|
df5dff9008 | ||
|
|
2680fee6ce | ||
|
|
2d4e87b986 | ||
|
|
c5abbcaaf4 | ||
|
|
15ff4cc2de | ||
|
|
68061dfef2 | ||
|
|
781c32ac29 | ||
|
|
d37dcc7d71 | ||
|
|
65baf6c706 | ||
|
|
fa0f595cf9 | ||
|
|
1d47b2fc79 | ||
|
|
7ca040ad88 | ||
|
|
78000f7f87 | ||
|
|
bc27eb2430 | ||
|
|
d9929185f3 | ||
|
|
2e2fdf481a | ||
|
|
1568393cf3 | ||
|
|
6d9266494b | ||
|
|
b424e06193 | ||
|
|
00f20c7d65 | ||
|
|
e50b8ab068 | ||
|
|
18c4dc903a | ||
|
|
ecc6d3264b | ||
|
|
a548454c57 | ||
|
|
0801e742ab | ||
|
|
bfaca50963 | ||
|
|
cc3041cee0 | ||
|
|
809bbc79fb | ||
|
|
a29e4e5b15 | ||
|
|
82c3e7df6d | ||
|
|
dc75a4866c | ||
|
|
6806ca9630 | ||
|
|
886343e50b | ||
|
|
d273753223 | ||
|
|
b24cecb582 | ||
|
|
963cceee57 | ||
|
|
5add43aac8 | ||
|
|
2d41d8b6e2 | ||
|
|
f7183b361e | ||
|
|
e0587d1564 | ||
|
|
6a355b11a6 | ||
|
|
1890d482a7 | ||
|
|
9a62e42dd6 | ||
|
|
4b4a960bfb | ||
|
|
0a876f8e00 | ||
|
|
0fcfbd81df | ||
|
|
cf1edde4f6 | ||
|
|
08d4e75deb | ||
|
|
bcd9ec5103 | ||
|
|
04ed7f99da | ||
|
|
99be2974c3 | ||
|
|
3aabb2ae35 | ||
|
|
272e429c2c | ||
|
|
fc5dc8e811 | ||
|
|
8a8e70d5a6 | ||
|
|
0f79f6ed15 | ||
|
|
7cb32717a9 | ||
|
|
3621a3fd74 | ||
|
|
1dec12d618 | ||
|
|
0f700f0067 | ||
|
|
fa64afb29a | ||
|
|
5f4d728863 | ||
|
|
523ea309ce | ||
|
|
c1065a28f9 | ||
|
|
d6f67fed94 | ||
|
|
3cf1eb2c23 | ||
|
|
4aca9276df | ||
|
|
ae312970b6 | ||
|
|
6933dc6991 | ||
|
|
0e3cc87362 | ||
|
|
631a3b78cb | ||
|
|
ae556e2203 | ||
|
|
73442469a2 | ||
|
|
4693981b23 | ||
|
|
cc6df875d6 | ||
|
|
9ad3d4b7b1 | ||
|
|
97ef187e5b | ||
|
|
1d20d5be0d | ||
|
|
8692d794c4 | ||
|
|
b4745088b1 | ||
|
|
9fd97a3b30 | ||
|
|
e0908c3226 | ||
|
|
13ae5915d6 | ||
|
|
2593fcb11c | ||
|
|
ae279a393f | ||
|
|
5004f536d3 | ||
|
|
a1351d366d | ||
|
|
84425899dd | ||
|
|
b5a9fff0ac | ||
|
|
b226057ffc | ||
|
|
211afcace9 | ||
|
|
0513ee0141 | ||
|
|
c00086981f | ||
|
|
12f94f7a7a | ||
|
|
878077e3b0 | ||
|
|
4b795b56c8 | ||
|
|
f55b154644 | ||
|
|
b3f8bdaff2 | ||
|
|
72fca75fb1 | ||
|
|
5c59a6a505 | ||
|
|
fb0f0b6c37 | ||
|
|
e4f3ce78e3 | ||
|
|
dccc93bfb8 | ||
|
|
a89cd349f1 | ||
|
|
e02fb5a67b | ||
|
|
8c233c93c1 | ||
|
|
0e5ff41021 | ||
|
|
23102369d1 | ||
|
|
1aa5869ece | ||
|
|
e537ff7be6 | ||
|
|
35299947e3 | ||
|
|
38f743a2c7 | ||
|
|
4a6019f7a6 | ||
|
|
fa3d7ed178 | ||
|
|
d1e5b0f72f | ||
|
|
dca8be01de | ||
|
|
f2d42d756e | ||
|
|
54488f1714 | ||
|
|
5b4a1fcaf3 | ||
|
|
5e8ed94397 | ||
|
|
4402274b45 | ||
|
|
77a9cc76b1 | ||
|
|
fc38a30572 | ||
|
|
18b503297b | ||
|
|
44fd5b0f83 | ||
|
|
13f704914a | ||
|
|
3166f1ad45 | ||
|
|
b82e966961 | ||
|
|
6fe99b6e66 | ||
|
|
cbbc8d66b8 | ||
|
|
4dc3934516 | ||
|
|
d16fc1a584 | ||
|
|
5deb25bc9b | ||
|
|
0f4e877214 | ||
|
|
4df4dafad6 | ||
|
|
83ec300abd | ||
|
|
ddae61a859 | ||
|
|
75399e97a8 | ||
|
|
13446e004a | ||
|
|
008a36f3e4 | ||
|
|
dc53840e35 | ||
|
|
5471354571 | ||
|
|
155f409a38 | ||
|
|
20c06fad80 | ||
|
|
a6d8a3e498 | ||
|
|
c1c94e4437 | ||
|
|
e2d299f771 | ||
|
|
2577d3bd45 | ||
|
|
c65da32867 | ||
|
|
ff9bd4ad1c | ||
|
|
ccbbac847a | ||
|
|
8e4701fd31 | ||
|
|
691b2ab5c4 | ||
|
|
352d056288 | ||
|
|
7e67cf48eb | ||
|
|
f8876cc390 | ||
|
|
68cad4302a | ||
|
|
4dbcfc37b3 | ||
|
|
7c859988ba | ||
|
|
a221655e1a | ||
|
|
af3a20ad4e | ||
|
|
f4f6ef461b | ||
|
|
d918760272 | ||
|
|
9e61a85e86 | ||
|
|
eec0f0f9da | ||
|
|
e13c5f55a1 | ||
|
|
c74364be4c | ||
|
|
5753c7a42b | ||
|
|
ccbd8395f4 | ||
|
|
05d83f7b1a |
@@ -24,9 +24,11 @@ libtommath/bn.ilg
|
||||
libtommath/bn.ind
|
||||
libtommath/pretty.build
|
||||
libtommath/tommath.src
|
||||
libtommath/*.log
|
||||
libtommath/*.pdf
|
||||
libtommath/*.pl
|
||||
libtommath/*.sh
|
||||
libtommath/doc/*
|
||||
libtommath/tombc/*
|
||||
libtommath/pre_gen/*
|
||||
libtommath/pics/*
|
||||
|
||||
+141
-148
@@ -1,123 +1,40 @@
|
||||
dist: trusty
|
||||
sudo: false
|
||||
language: c
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=unix CFGOPT=--disable-shared
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=unix CFGOPT=--disable-shared
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.9
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-4.9" BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-5
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-5" BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-6
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-6" BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-7
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7" BUILD_DIR=unix
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=unix
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=macosx NO_DIRECT_CONFIGURE=1
|
||||
- os: osx
|
||||
osx_image: xcode9
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=macosx NO_DIRECT_CONFIGURE=1
|
||||
- os: osx
|
||||
osx_image: xcode10
|
||||
env:
|
||||
- MATRIX_EVAL="" BUILD_DIR=macosx NO_DIRECT_CONFIGURE=1
|
||||
### C builds not currently supported on Windows instances
|
||||
# - os: windows
|
||||
# env:
|
||||
# - MATRIX_EVAL="" BUILD_DIR=win
|
||||
|
||||
before_install:
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- export ERROR_ON_FAILURES=1
|
||||
- cd ${BUILD_DIR}
|
||||
install:
|
||||
- test -n "$NO_DIRECT_CONFIGURE" || ./configure ${CFGOPT}
|
||||
script:
|
||||
- make
|
||||
- make test
|
||||
dist: trusty
|
||||
sudo: false
|
||||
language: c
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
# Testing on Linux with various compilers
|
||||
- name: "Linux/Clang/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: clang
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=unix
|
||||
- os: linux
|
||||
- name: "Linux/Clang/Static"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: clang
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=unix
|
||||
- CFGOPT=--disable-shared
|
||||
- os: linux
|
||||
- BUILD_DIR=unix
|
||||
- name: "Linux/GCC/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=unix
|
||||
- os: linux
|
||||
- name: "Linux/GCC/Static"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=unix
|
||||
- CFGOPT=--disable-shared
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
- BUILD_DIR=unix
|
||||
# Older versions of GCC...
|
||||
- name: "Linux/GCC 4.9/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-4.9
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -125,10 +42,11 @@ matrix:
|
||||
packages:
|
||||
- g++-4.9
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-4.9"
|
||||
- BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
- name: "Linux/GCC 5/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-5
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -136,10 +54,11 @@ matrix:
|
||||
packages:
|
||||
- g++-5
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-5"
|
||||
- BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
- name: "Linux/GCC 6/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-6
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -147,10 +66,11 @@ matrix:
|
||||
packages:
|
||||
- g++-6
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-6"
|
||||
- BUILD_DIR=unix
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
- name: "Linux/GCC 7/Shared"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: gcc-7
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -158,35 +78,44 @@ matrix:
|
||||
packages:
|
||||
- g++-7
|
||||
env:
|
||||
- MATRIX_EVAL="CC=gcc-7"
|
||||
- BUILD_DIR=unix
|
||||
- os: osx
|
||||
# Testing on Mac, various styles
|
||||
- name: "macOS/Xcode 8/Shared/Unix-like"
|
||||
os: osx
|
||||
osx_image: xcode8
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=unix
|
||||
- os: osx
|
||||
- name: "macOS/Xcode 8/Shared/Mac-like"
|
||||
os: osx
|
||||
osx_image: xcode8
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=macosx
|
||||
- NO_DIRECT_CONFIGURE=1
|
||||
- os: osx
|
||||
install: []
|
||||
script: &mactest
|
||||
- make all
|
||||
# The styles=develop avoids some weird problems on OSX
|
||||
- make test styles=develop
|
||||
- name: "macOS/Xcode 9/Shared/Mac-like"
|
||||
os: osx
|
||||
osx_image: xcode9
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=macosx
|
||||
- NO_DIRECT_CONFIGURE=1
|
||||
- os: osx
|
||||
osx_image: xcode10
|
||||
install: []
|
||||
script: *mactest
|
||||
- name: "macOS/Xcode 10/Shared/Mac-like"
|
||||
os: osx
|
||||
osx_image: xcode10.2
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=macosx
|
||||
- NO_DIRECT_CONFIGURE=1
|
||||
# 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
|
||||
@@ -196,15 +125,30 @@ matrix:
|
||||
- gcc-multilib
|
||||
- wine
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT=--host=i686-w64-mingw32
|
||||
- NO_DIRECT_TEST=1
|
||||
|
||||
script: &crosstest
|
||||
- make all
|
||||
- make 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: *mingw32
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT="--host=i686-w64-mingw32 --disable-shared"
|
||||
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
|
||||
@@ -213,24 +157,73 @@ matrix:
|
||||
- gcc-mingw-w64
|
||||
- wine
|
||||
env:
|
||||
- MATRIX_EVAL=""
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT=--host=x86_64-w64-mingw32 --enable-64bit
|
||||
- NO_DIRECT_TEST=1
|
||||
|
||||
### C builds not currently supported on Windows instances
|
||||
# - os: windows
|
||||
# env:
|
||||
# - MATRIX_EVAL=""
|
||||
# - BUILD_DIR=win
|
||||
- CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit"
|
||||
script: *crosstest
|
||||
- name: "Linux-cross-Windows-64/GCC/Static/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 --disable-shared"
|
||||
script: *crosstest
|
||||
# Test on Windows with GCC native
|
||||
- name: "Windows/GCC/Shared"
|
||||
os: windows
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT="--enable-64bit --enable-threads"
|
||||
before_install: &cygwinSetup
|
||||
- choco install cyg-get
|
||||
- cyg-get make
|
||||
- cd ${BUILD_DIR}
|
||||
install:
|
||||
- ./configure ${CFGOPT} --prefix=$HOME
|
||||
# for debugging only
|
||||
- cat Makefile
|
||||
- name: "Windows/GCC/Unshared"
|
||||
os: windows
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT="--enable-64bit --enable-threads --disable-shared"
|
||||
before_install: *cygwinSetup
|
||||
# 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: &vctest
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc all'
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc tcltest'
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake -f makefile.vc test'
|
||||
- name: "Windows/MSVC/Unshared"
|
||||
os: windows
|
||||
compiler: cl
|
||||
env: *vcenv
|
||||
before_install: *vcpreinst
|
||||
install: []
|
||||
script: &vctest
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc all'
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc tcltest'
|
||||
- cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static -f makefile.vc test'
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm get stable; fi
|
||||
- eval "${MATRIX_EVAL}"
|
||||
- export ERROR_ON_FAILURES=1
|
||||
- cd ${BUILD_DIR}
|
||||
install:
|
||||
- test -n "$NO_DIRECT_CONFIGURE" || ./configure ${CFGOPT}
|
||||
- ./configure ${CFGOPT} --prefix=$HOME
|
||||
before_script:
|
||||
- export ERROR_ON_FAILURES=1
|
||||
script:
|
||||
- make
|
||||
- test -n "$NO_DIRECT_TEST" || make test
|
||||
- make all
|
||||
- make tcltest
|
||||
- make test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
A NOTE ON THE CHANGELOG:
|
||||
Starting in early 2011, Tcl source code has been under the management of
|
||||
fossil, hosted at http://core.tcl.tk/tcl/ . Fossil presents a "Timeline"
|
||||
fossil, hosted at https://core.tcl-lang.org/tcl/ . Fossil presents a "Timeline"
|
||||
view of changes made that is superior in every way to a hand edited log file.
|
||||
Because of this, many Tcl developers are now out of the habit of maintaining
|
||||
this log file. You may still find useful things in it, but the Timeline is
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
# README: Tcl
|
||||
|
||||
This is the **Tcl 8.6.9** source distribution.
|
||||
|
||||
You can get any source release of Tcl from [our distribution
|
||||
site](https://sourceforge.net/projects/tcl/files/Tcl/).
|
||||
|
||||
[](https://travis-ci.org/tcltk/tcl)
|
||||
|
||||
## Contents
|
||||
1. [Introduction](#intro)
|
||||
2. [Documentation](#doc)
|
||||
3. [Compiling and installing Tcl](#build)
|
||||
4. [Development tools](#devtools)
|
||||
5. [Tcl newsgroup](#complangtcl)
|
||||
6. [The Tcler's Wiki](#wiki)
|
||||
7. [Mailing lists](#email)
|
||||
8. [Support and Training](#support)
|
||||
9. [Tracking Development](#watch)
|
||||
10. [Thank You](#thanks)
|
||||
|
||||
## <a id="intro">1.</a> Introduction
|
||||
Tcl provides a powerful platform for creating integration applications that
|
||||
tie together diverse applications, protocols, devices, and frameworks.
|
||||
When paired with the Tk toolkit, Tcl provides the fastest and most powerful
|
||||
way to create GUI applications that run on PCs, Unix, and Mac OS X.
|
||||
Tcl can also be used for a variety of web-related tasks and for creating
|
||||
powerful command languages for applications.
|
||||
|
||||
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
|
||||
Source code development and tracking of bug reports and feature requests
|
||||
takes place at [core.tcl-lang.org](https://core.tcl-lang.org/).
|
||||
Tcl/Tk release and mailing list services are [hosted by
|
||||
SourceForge](https://sourceforge.net/projects/tcl/)
|
||||
with the Tcl Developer Xchange hosted at
|
||||
[www.tcl-lang.org](https://www.tcl-lang.org).
|
||||
|
||||
Tcl is a freely available open source package. You can do virtually
|
||||
anything you like with it, such as modifying it, redistributing it,
|
||||
and selling it either in whole or in part. See the file
|
||||
`license.terms` for complete information.
|
||||
|
||||
## <a id="doc">2.</a> Documentation
|
||||
Extensive documentation is available at our website.
|
||||
The home page for this release, including new features, is
|
||||
[here](https://www.tcl.tk/software/tcltk/8.6.html).
|
||||
Detailed release notes can be found at the
|
||||
[file distributions page](https://sourceforge.net/projects/tcl/files/Tcl/)
|
||||
by clicking on the relevant version.
|
||||
|
||||
Information about Tcl itself can be found at the [Developer
|
||||
Xchange](https://www.tcl-lang.org/about/).
|
||||
There have been many Tcl books on the market. Many are mentioned in
|
||||
[the Wiki](https://wiki.tcl-lang.org/_/ref?N=25206).
|
||||
|
||||
The complete set of reference manual entries for Tcl 8.6 is [online,
|
||||
here](https://www.tcl-lang.org/man/tcl8.6/).
|
||||
|
||||
### <a id="doc.unix">2a.</a> Unix Documentation
|
||||
The `doc` subdirectory in this release contains a complete set of
|
||||
reference manual entries for Tcl. Files with extension "`.1`" are for
|
||||
programs (for example, `tclsh.1`); files with extension "`.3`" are for C
|
||||
library procedures; and files with extension "`.n`" describe Tcl
|
||||
commands. The file "`doc/Tcl.n`" gives a quick summary of the Tcl
|
||||
language syntax. To print any of the man pages on Unix, cd to the
|
||||
"doc" directory and invoke your favorite variant of troff using the
|
||||
normal -man macros, for example
|
||||
|
||||
groff -man -Tpdf Tcl.n >output.pdf
|
||||
|
||||
to print Tcl.n to PDF. If Tcl has been installed correctly and your "man" program
|
||||
supports it, you should be able to access the Tcl manual entries using the
|
||||
normal "man" mechanisms, such as
|
||||
|
||||
man Tcl
|
||||
|
||||
### <a id="doc.win">2b.</a> Windows Documentation
|
||||
The "doc" subdirectory in this release contains a complete set of Windows
|
||||
help files for Tcl. Once you install this Tcl release, a shortcut to the
|
||||
Windows help Tcl documentation will appear in the "Start" menu:
|
||||
|
||||
Start | Programs | Tcl | Tcl Help
|
||||
|
||||
## <a id="build">3.</a> Compiling and installing Tcl
|
||||
There are brief notes in the `unix/README`, `win/README`, and `macosx/README`
|
||||
about compiling on these different platforms. There is additional information
|
||||
about building Tcl from sources
|
||||
[online](https://www.tcl-lang.org/doc/howto/compile.html).
|
||||
|
||||
## <a id="devtools">4.</a> Development tools
|
||||
ActiveState produces a high quality set of commercial quality development
|
||||
tools that is available to accelerate your Tcl application development.
|
||||
Tcl Dev Kit builds on the earlier TclPro toolset and provides a debugger,
|
||||
static code checker, single-file wrapping utility, bytecode compiler and
|
||||
more. More information can be found at
|
||||
|
||||
http://www.ActiveState.com/Tcl
|
||||
|
||||
## <a id="complangtcl">5.</a> Tcl newsgroup
|
||||
There is a USENET news group, "`comp.lang.tcl`", intended for the exchange of
|
||||
information about Tcl, Tk, and related applications. The newsgroup is a
|
||||
great place to ask general information questions. For bug reports, please
|
||||
see the "Support and bug fixes" section below.
|
||||
|
||||
## <a id="wiki">6.</a> Tcl'ers Wiki
|
||||
There is a [wiki-based open community site](https://wiki.tcl-lang.org/)
|
||||
covering all aspects of Tcl/Tk.
|
||||
|
||||
It is dedicated to the Tcl programming language and its extensions. A
|
||||
wealth of useful information can be found there. It contains code
|
||||
snippets, references to papers, books, and FAQs, as well as pointers to
|
||||
development tools, extensions, and applications. You can also recommend
|
||||
additional URLs by editing the wiki yourself.
|
||||
|
||||
## <a id="email">7.</a> Mailing lists
|
||||
Several mailing lists are hosted at SourceForge to discuss development or use
|
||||
issues (like Macintosh and Windows topics). For more information and to
|
||||
subscribe, visit [here](https://sourceforge.net/projects/tcl/) and go to the
|
||||
Mailing Lists page.
|
||||
|
||||
## <a id="support">8.</a> Support and Training
|
||||
We are very interested in receiving bug reports, patches, and suggestions for
|
||||
improvements. We prefer that you send this information to us as tickets
|
||||
entered into [our issue tracker](https://core.tcl-lang.org/tcl/reportlist).
|
||||
|
||||
We will log and follow-up on each bug, although we cannot promise a
|
||||
specific turn-around time. Enhancements may take longer and may not happen
|
||||
at all unless there is widespread support for them (we're trying to
|
||||
slow the rate at which Tcl/Tk turns into a kitchen sink). It's very
|
||||
difficult to make incompatible changes to Tcl/Tk at this point, due to
|
||||
the size of the installed base.
|
||||
|
||||
The Tcl community is too large for us to provide much individual support for
|
||||
users. If you need help we suggest that you post questions to `comp.lang.tcl`
|
||||
or ask a question on [Stack
|
||||
Overflow](https://stackoverflow.com/questions/tagged/tcl). We read the
|
||||
newsgroup and will attempt to answer esoteric questions for which no one else
|
||||
is likely to know the answer. In addition, see the wiki for [links to other
|
||||
organizations](https://wiki.tcl-lang.org/training) that offer Tcl/Tk training.
|
||||
|
||||
## <a id="watch">9.</a> Tracking Development
|
||||
Tcl is developed in public. You can keep an eye on how Tcl is changing at
|
||||
[core.tcl-lang.org](https://core.tcl-lang.org/).
|
||||
|
||||
## <a id="thanks">10.</a> Thank You
|
||||
We'd like to express our thanks to the Tcl community for all the
|
||||
helpful suggestions, bug reports, and patches we have received.
|
||||
Tcl/Tk has improved vastly and will continue to do so with your help.
|
||||
@@ -8830,3 +8830,67 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
|
||||
2017-12-19 (bug)[586e71] EvalObjv exception handling at level #0 (sebres,porter)
|
||||
|
||||
--- Released 8.6.8, December 22, 2017 --- http://core.tcl.tk/tcl/ for details
|
||||
|
||||
2018-02-11 (enhance) stop blocking conversion of object to/from class (coulter)
|
||||
|
||||
2018-02-12 (enhance) NR-enable [package require] (coulter)
|
||||
|
||||
2018-02-14 (bug)[9fd5c6] crash in object deletion, test oo-11.5 (coulter)
|
||||
|
||||
2018-02-14 (bug)[3c32a3] crash deleting object with class mixed in (coulter)
|
||||
|
||||
2018-02-15 (platform) stop using -lieee, removed from glibc-2.27 (porter)
|
||||
***POTENTIAL INCOMPATIBILITY for math programs that embed Tcl***
|
||||
|
||||
2018-02-23 (bug)[8e6a9a] bad binary [string match], test string-11.55 (porter)
|
||||
|
||||
2018-03-05 (bug)[1873ea] repair multi-thread std channel init (sebres)
|
||||
|
||||
2018-03-09 (bug)[db36fa] broken bytecode for index values (porter)
|
||||
|
||||
2018-03-13 (bug) broken compiled [string replace], test string-14.19 (porter)
|
||||
|
||||
2018-03-14 (bug) [string trim*] engine crashed on invalid UTF (sebres)
|
||||
|
||||
2018-04-17 (bug) missing trace in compiled [array set], test var-20.11 (porter)
|
||||
|
||||
2018-04-22 (bug)[46a241] crash in unset array with search, var-13.[23] (goth)
|
||||
|
||||
2018-04-30 (bug)[27b682] race made [file delete] raise "no such file" (sebres)
|
||||
|
||||
2018-06-04 (bug)[925643] 32/64 cleanup of filesystem DIR operations (sebres)
|
||||
|
||||
2018-06-18 (bug) leaks in TclSetEnv and env cache (coulter)
|
||||
|
||||
2018-06-24 (bug)[3592747] [yieldto] dying namespace, tailcall-14.1 (coulter)
|
||||
|
||||
2018-07-09 (bug)[270f78] race in [file mkdir] (sebres)
|
||||
|
||||
2018-07-12 (bug)[3f7af0] [file delete] raised "permission denied" (sebres)
|
||||
|
||||
2018-07-26 (bug)[d051b7] overflow crash in [format] (sebres)
|
||||
|
||||
2018-08-29 revised quoting of [exec] args in generated command line (sebres)
|
||||
***POTENTIAL INCOMPATIBILITY***
|
||||
|
||||
2018-09-20 HTTP Keep-Alive with pipelined requests (nash)
|
||||
=> http 2.9.0
|
||||
|
||||
2018-09-27 (new)[TIP 505] [lreplace] accepts all out of range indices (porter)
|
||||
|
||||
2018-10-04 (bug) Prevent crash from NULL keyName (nijtmans)
|
||||
=> registry 1.3.3
|
||||
|
||||
2018-10-26 (enhance) advance dde version (nijtmans)
|
||||
=> dde 1.4.1
|
||||
|
||||
2018-10-27 tzdata updated to Olson's tzdata2018g (jima)
|
||||
|
||||
2018-10-29 Update tcltest package for Travis support (fellows)
|
||||
=> tcltest 2.5.0
|
||||
|
||||
2018-11-09 (bug)[35a8f1] overlong string length of some lists (owens)
|
||||
|
||||
2018-11-16 (bug)[00d04c] Repair [binary encode base64] (sebres)
|
||||
|
||||
- Released 8.6.9, November 16, 2018 - details at http://core.tcl-lang.org/tcl/ -
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ strtol(
|
||||
*/
|
||||
|
||||
p = string;
|
||||
while (isspace(UCHAR(*p))) {
|
||||
while (TclIsSpaceProc(*p)) {
|
||||
p += 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ strtoul(
|
||||
*/
|
||||
|
||||
p = string;
|
||||
while (isspace(UCHAR(*p))) {
|
||||
while (TclIsSpaceProc(*p)) {
|
||||
p += 1;
|
||||
}
|
||||
if (*p == '-') {
|
||||
|
||||
@@ -97,7 +97,7 @@ void change_file_date(filename,dosdate,tmu_date)
|
||||
SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
|
||||
CloseHandle(hFile);
|
||||
#else
|
||||
#ifdef unix || __APPLE__
|
||||
#if defined(unix) || defined(__APPLE__)
|
||||
struct utimbuf ut;
|
||||
struct tm newdate;
|
||||
newdate.tm_sec = tmu_date.tm_sec;
|
||||
|
||||
@@ -94,7 +94,7 @@ uLong filetime(f, tmzip, dt)
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#ifdef unix || __APPLE__
|
||||
#if defined(unix) || defined(__APPLE__)
|
||||
uLong filetime(f, tmzip, dt)
|
||||
char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
|
||||
+16
-2
@@ -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
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
'\"
|
||||
.TH Tcl_ParseArgsObjv 3 8.6 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
@@ -103,8 +103,8 @@ the argument's value. The following values are acceptable values for
|
||||
\fBTCL_ARGV_CONSTANT\fR
|
||||
.
|
||||
The argument does not take any following value argument. If this argument is
|
||||
present, the int pointed to by the \fIsrcPtr\fR field is copied to the
|
||||
\fIdstPtr\fR field. The \fIclientData\fR field is ignored.
|
||||
present, the \fIsrcPtr\fR field (casted to \fIint\fR) is copied to the variable
|
||||
pointed to by the \fIdstPtr\fR field. The \fIclientData\fR field is ignored.
|
||||
.TP
|
||||
\fBTCL_ARGV_END\fR
|
||||
.
|
||||
|
||||
+4
-3
@@ -80,9 +80,10 @@ and all following characters into their lower-case equivalents.
|
||||
|
||||
.SH BUGS
|
||||
.PP
|
||||
At this time, the case conversions are only defined for the ISO8859-1
|
||||
characters. Unicode characters above 0x00ff are not modified by these
|
||||
routines.
|
||||
At this time, the case conversions are only defined for the Unicode
|
||||
plane 0 characters. The result for Unicode characters above 0xffff
|
||||
is undefined, but - actually - only the lower 16 bits of the
|
||||
character value is handled.
|
||||
|
||||
.SH KEYWORDS
|
||||
utf, unicode, toupper, tolower, totitle, case
|
||||
|
||||
+4
-4
@@ -331,11 +331,11 @@ trace procedures will always be invoked.
|
||||
.SH "RESTRICTIONS"
|
||||
.PP
|
||||
A trace procedure can be called at any time, even when there
|
||||
is a partially formed result in the interpreter's result area. If
|
||||
are partially formed results stored in the interpreter. If
|
||||
the trace procedure does anything that could damage this result (such
|
||||
as calling \fBTcl_Eval\fR) then it must save the original values of
|
||||
the interpreter's \fBresult\fR and \fBfreeProc\fR fields and restore
|
||||
them before it returns.
|
||||
as calling \fBTcl_Eval\fR) then it must use the \fBTcl_SaveInterpState\fR
|
||||
and related routines to save and restore the original state of
|
||||
the interpreter before it returns.
|
||||
.SH "UNDEFINED VARIABLES"
|
||||
.PP
|
||||
It is legal to set a trace on an undefined variable.
|
||||
|
||||
+12
-6
@@ -55,7 +55,8 @@ string, the constructor will be deleted.
|
||||
This deletes each of the methods called \fIname\fR from a class. The methods
|
||||
must have previously existed in that class. Does not affect the superclasses
|
||||
of the class, nor does it affect the subclasses or instances of the class
|
||||
(except when they have a call chain through the class being modified).
|
||||
(except when they have a call chain through the class being modified) or the
|
||||
class object itself.
|
||||
.TP
|
||||
\fBdestructor\fI bodyScript\fR
|
||||
.
|
||||
@@ -135,7 +136,8 @@ This renames the method called \fIfromName\fR in a class to \fItoName\fR. The
|
||||
method must have previously existed in the class, and \fItoName\fR must not
|
||||
previously refer to a method in that class. Does not affect the superclasses
|
||||
of the class, nor does it affect the subclasses or instances of the class
|
||||
(except when they have a call chain through the class being modified). Does
|
||||
(except when they have a call chain through the class being modified), or the
|
||||
class object itself. Does
|
||||
not change the export status of the method; if it was exported before, it will
|
||||
be afterwards.
|
||||
.TP
|
||||
@@ -203,8 +205,10 @@ well be in an inconsistent state unless additional configuration work is done.
|
||||
\fBdeletemethod\fI name\fR ?\fIname ...\fR
|
||||
.
|
||||
This deletes each of the methods called \fIname\fR from an object. The methods
|
||||
must have previously existed in that object. Does not affect the classes that
|
||||
the object is an instance of.
|
||||
must have previously existed in that object (e.g., because it was created
|
||||
through \fBoo::objdefine method\fR). Does not affect the classes that the
|
||||
object is an instance of, or remove the exposure of those class-provided
|
||||
methods in the instance of that class.
|
||||
.TP
|
||||
\fBexport\fI name \fR?\fIname ...\fR?
|
||||
.
|
||||
@@ -262,8 +266,10 @@ By default, this slot works by replacement.
|
||||
This renames the method called \fIfromName\fR in an object to \fItoName\fR.
|
||||
The method must have previously existed in the object, and \fItoName\fR must
|
||||
not previously refer to a method in that object. Does not affect the classes
|
||||
that the object is an instance of. Does not change the export status of the
|
||||
method; if it was exported before, it will be afterwards.
|
||||
that the object is an instance of and cannot rename in an instance object the
|
||||
methods provided by those classes (though a \fBoo::objdefine forward\fRed
|
||||
method may provide an equivalent capability). Does not change the export
|
||||
status of the method; if it was exported before, it will be afterwards.
|
||||
.TP
|
||||
\fBunexport\fI name \fR?\fIname ...\fR?
|
||||
.
|
||||
|
||||
+31
-7
@@ -106,7 +106,7 @@ Then the command on the left side of each of the lines below
|
||||
will produce the value on the right side of the line:
|
||||
.PP
|
||||
.CS
|
||||
.ta 6c
|
||||
.ta 9c
|
||||
\fBexpr\fR 3.1 + $a \fI6.1\fR
|
||||
\fBexpr\fR 2 + "$a.$b" \fI5.6\fR
|
||||
\fBexpr\fR 4*[llength "6 2"] \fI8\fR
|
||||
@@ -126,7 +126,8 @@ applied only to integers.
|
||||
.TP 20
|
||||
\fB**\fR
|
||||
.
|
||||
Exponentiation. Valid for any numeric operands.
|
||||
Exponentiation. Valid for any numeric operands. The maximum exponent value
|
||||
that Tcl can handle if the first number is an integer > 1 is 268435455.
|
||||
.TP 20
|
||||
\fB*\0\0/\0\0%\fR
|
||||
.
|
||||
@@ -200,18 +201,23 @@ Bit-wise OR. Valid for integer operands only.
|
||||
Logical AND. Produces a 1 result if both operands are non-zero,
|
||||
0 otherwise.
|
||||
Valid for boolean and numeric (integers or floating-point) operands only.
|
||||
This operator evaluates lazily; it only evaluates its second operand if it
|
||||
must in order to determine its result.
|
||||
.TP 20
|
||||
\fB||\fR
|
||||
.
|
||||
Logical OR. Produces a 0 result if both operands are zero, 1 otherwise.
|
||||
Valid for boolean and numeric (integers or floating-point) operands only.
|
||||
This operator evaluates lazily; it only evaluates its second operand if it
|
||||
must in order to determine its result.
|
||||
.TP 20
|
||||
\fIx\fB?\fIy\fB:\fIz\fR
|
||||
\fIx \fB?\fI y \fB:\fI z\fR
|
||||
.
|
||||
If-then-else, as in C. If \fIx\fR
|
||||
evaluates to non-zero, then the result is the value of \fIy\fR.
|
||||
Otherwise the result is the value of \fIz\fR.
|
||||
The \fIx\fR operand must have a boolean or numeric value.
|
||||
This operator evaluates lazily; it evaluates only one of \fIy\fR or \fIz\fR.
|
||||
.PP
|
||||
See the C manual for more details on the results
|
||||
produced by each operator.
|
||||
@@ -221,6 +227,7 @@ of the \fBpow\fR function (after any type conversions.)
|
||||
All of the binary operators but exponentiation group left-to-right
|
||||
within the same precedence level; exponentiation groups right-to-left. For example, the command
|
||||
.PP
|
||||
.PP
|
||||
.CS
|
||||
\fBexpr\fR {4*2 < 7}
|
||||
.CE
|
||||
@@ -258,7 +265,7 @@ before invoking the \fBexpr\fR command.
|
||||
.PP
|
||||
When the expression parser encounters a mathematical function
|
||||
such as \fBsin($x)\fR, it replaces it with a call to an ordinary
|
||||
Tcl function in the \fBtcl::mathfunc\fR namespace. The processing
|
||||
Tcl command in the \fBtcl::mathfunc\fR namespace. The processing
|
||||
of an expression such as:
|
||||
.PP
|
||||
.CS
|
||||
@@ -390,9 +397,11 @@ set b {$a + 2}
|
||||
.CE
|
||||
.PP
|
||||
return 11, not a multiple of 4.
|
||||
This is because the Tcl parser will first substitute \fB$a + 2\fR for
|
||||
the variable \fBb\fR,
|
||||
then the \fBexpr\fR command will evaluate the expression \fB$a + 2*4\fR.
|
||||
This is because the Tcl parser will first substitute
|
||||
.QW "\fB$a + 2\fR"
|
||||
for the variable \fBb\fR,
|
||||
then the \fBexpr\fR command will evaluate the expression
|
||||
.QW "\fB$a + 2*4\fR" .
|
||||
.PP
|
||||
Most expressions do not require a second round of substitutions.
|
||||
Either they are enclosed in braces or, if not,
|
||||
@@ -406,6 +415,21 @@ The most expensive code is required for
|
||||
unbraced expressions that contain command substitutions.
|
||||
These expressions must be implemented by generating new code
|
||||
each time the expression is executed.
|
||||
.PP
|
||||
If it is necessary to include a non-constant expression string within the
|
||||
wider context of an otherwise-constant expression, the most efficient
|
||||
technique is to put the varying part inside a recursive \fBexpr\fR, as this at
|
||||
least allows for the compilation of the outer part, though it does mean that
|
||||
the varying part must itself be evaluated as a separate expression. Thus, in
|
||||
this example the result is 20 and the outer expression benefits from fully
|
||||
cached bytecode compilation.
|
||||
.PP
|
||||
.CS
|
||||
set a 3
|
||||
set b {$a + 2}
|
||||
\fBexpr\fR {[\fBexpr\fR $b] * 4}
|
||||
.CE
|
||||
.PP
|
||||
When the expression is unbraced to allow the substitution of a function or
|
||||
operator, consider using the commands documented in the \fBmathfunc\fR(n) or
|
||||
\fBmathop\fR(n) manual pages directly instead.
|
||||
|
||||
+1
-1
@@ -201,7 +201,7 @@ slave interpreter identified by \fIpath\fR. If no arguments are
|
||||
given, option and current setting are returned. If \fB\-frame\fR
|
||||
is given, the debug setting is set to the given boolean if provided
|
||||
and the current setting is returned.
|
||||
This only effects the output of \fBinfo frame\fR, in that exact
|
||||
This only affects the output of \fBinfo frame\fR, in that exact
|
||||
frame-level information for command invocation at the bytecode level
|
||||
is only captured with this setting on.
|
||||
.RS
|
||||
|
||||
+5
-4
@@ -151,10 +151,11 @@ is the same as
|
||||
.QW "\fB** 2 [** 3 4]\fR" .
|
||||
Each \fInumber\fR may be
|
||||
any numeric value, though the second number must not be fractional if the
|
||||
first is negative. If no arguments are given, the result will be one, and if
|
||||
only one argument is given, the result will be that argument. The
|
||||
result will have an integral value only when all arguments are
|
||||
integral values.
|
||||
first is negative. The maximum exponent value that Tcl can handle if the
|
||||
first number is an integer > 1 is 268435455. If no arguments are given,
|
||||
the result will be one, and if only one argument is given, the result will
|
||||
be that argument. The result will have an integral value only when all
|
||||
arguments are integral values.
|
||||
.SS "COMPARISON OPERATORS"
|
||||
.PP
|
||||
The behaviors of the comparison operator commands (most of which operate
|
||||
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
'\"
|
||||
'\" Copyright (c) 2005 Sergey Brester aka sebres.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH timerate n "" Tcl "Tcl Built-In Commands"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
timerate \- Calibrated performance measurements of script execution time
|
||||
.SH SYNOPSIS
|
||||
\fBtimerate \fIscript\fR ?\fItime\fR? ?\fImax-count\fR?
|
||||
.sp
|
||||
\fBtimerate \fR?\fB\-direct\fR? ?\fB\-overhead\fI double\fR? \fIscript\fR ?\fItime\fR? ?\fImax-count\fR?
|
||||
.sp
|
||||
\fBtimerate \fR?\fB\-calibrate\fR? ?\fB\-direct\fR? \fIscript\fR ?\fItime\fR? ?\fImax-count\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBtimerate\fR command does calibrated performance measurement of a Tcl
|
||||
command or script, \fIscript\fR. The \fIscript\fR should be written so that it
|
||||
can be executed multiple times during the performance measurement process.
|
||||
Time is measured in elapsed time using the finest timer resolution as possible,
|
||||
not CPU time; if \fIscript\fR interacts with the OS, the cost of that
|
||||
interaction is included.
|
||||
This command may be used to provide information as to how well a script or
|
||||
Tcl command is performing, and can help determine bottlenecks and fine-tune
|
||||
application performance.
|
||||
.PP
|
||||
The first and second form will evaluate \fIscript\fR until the interval
|
||||
\fItime\fR given in milliseconds elapses, or for 1000 milliseconds (1 second)
|
||||
if \fItime\fR is not specified.
|
||||
.sp
|
||||
The parameter \fImax-count\fR could additionally impose a further restriction
|
||||
by the maximal number of iterations to evaluate the script.
|
||||
If \fImax-count\fR is specified, the evalution will stop either this count of
|
||||
iterations is reached or the time is exceeded.
|
||||
.sp
|
||||
It will then return a canonical tcl-list of the form:
|
||||
.PP
|
||||
.CS
|
||||
\fB0.095977 \(mcs/# 52095836 # 10419167 #/sec 5000.000 net-ms\fR
|
||||
.CE
|
||||
.PP
|
||||
which indicates:
|
||||
.IP \(bu 3
|
||||
the average amount of time required per iteration, in microseconds ([\fBlindex\fR $result 0])
|
||||
.IP \(bu 3
|
||||
the count how many times it was executed ([\fBlindex\fR $result 2])
|
||||
.IP \(bu 3
|
||||
the estimated rate per second ([\fBlindex\fR $result 4])
|
||||
.IP \(bu 3
|
||||
the estimated real execution time without measurement overhead ([\fBlindex\fR $result 6])
|
||||
.PP
|
||||
The following options may be supplied to the \fBtimerate\fR command:
|
||||
.TP
|
||||
\fB\-calibrate\fR
|
||||
.
|
||||
To measure very fast scripts as exactly as possible, a calibration process
|
||||
may be required.
|
||||
The \fB\-calibrate\fR option is used to calibrate \fBtimerate\fR itself,
|
||||
calculating the estimated overhead of the given script as the default overhead
|
||||
for future invocations of the \fBtimerate\fR command. If the \fItime\fR
|
||||
parameter is not specified, the calibrate procedure runs for up to 10 seconds.
|
||||
.RS
|
||||
.PP
|
||||
Note that calibration is not thread safe in the current implementation.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-overhead \fIdouble\fR
|
||||
.
|
||||
The \fB\-overhead\fR parameter supplies an estimate (in microseconds) of the
|
||||
measurement overhead of each iteration of the tested script. This quantity
|
||||
will be subtracted from the measured time prior to reporting results. This can
|
||||
be useful for removing the cost of interpreter state reset commands from the
|
||||
script being measured.
|
||||
.TP
|
||||
\fB\-direct\fR
|
||||
.
|
||||
The \fB-direct\fR option causes direct execution of the supplied script,
|
||||
without compilation, in a manner similar to the \fBtime\fR command. It can be
|
||||
used to measure the cost of \fBTcl_EvalObjEx\fR, of the invocation of canonical
|
||||
lists, and of the uncompiled versions of bytecoded commands.
|
||||
.PP
|
||||
As opposed to the \fBtime\fR commmand, which runs the tested script for a fixed
|
||||
number of iterations, the timerate command runs it for a fixed time.
|
||||
Additionally, the compiled variant of the script will be used during the entire
|
||||
measurement, as if the script were part of a compiled procedure, if the \fB\-direct\fR
|
||||
option is not specified. The fixed time period and possibility of compilation allow
|
||||
for more precise results and prevent very long execution times by slow scripts, making
|
||||
it practical for measuring scripts with highly uncertain execution times.
|
||||
.SH EXAMPLES
|
||||
Estimate how fast it takes for a simple Tcl \fBfor\fR loop (including
|
||||
operations on variable \fIi\fR) to count to ten:
|
||||
.PP
|
||||
.CS
|
||||
\fI# calibrate\fR
|
||||
\fBtimerate\fR -calibrate {}
|
||||
|
||||
\fI# measure\fR
|
||||
\fBtimerate\fR { for {set i 0} {$i<10} {incr i} {} } 5000
|
||||
.CE
|
||||
.PP
|
||||
Estimate how fast it takes for a simple Tcl \fBfor\fR loop, ignoring the
|
||||
overhead of the management of the variable that controls the loop:
|
||||
.PP
|
||||
.CS
|
||||
\fI# calibrate for overhead of variable operations\fR
|
||||
set i 0; \fBtimerate\fR -calibrate {expr {$i<10}; incr i} 1000
|
||||
|
||||
\fI# measure\fR
|
||||
\fBtimerate\fR {
|
||||
for {set i 0} {$i<10} {incr i} {}
|
||||
} 5000
|
||||
.CE
|
||||
.PP
|
||||
Estimate the speed of calculating the hour of the day using \fBclock format\fR only,
|
||||
ignoring overhead of the portion of the script that prepares the time for it to
|
||||
calculate:
|
||||
.PP
|
||||
.CS
|
||||
\fI# calibrate\fR
|
||||
\fBtimerate\fR -calibrate {}
|
||||
|
||||
\fI# estimate overhead\fR
|
||||
set tm 0
|
||||
set ovh [lindex [\fBtimerate\fR {
|
||||
incr tm [expr {24*60*60}]
|
||||
}] 0]
|
||||
|
||||
\fI# measure using estimated overhead\fR
|
||||
set tm 0
|
||||
\fBtimerate\fR -overhead $ovh {
|
||||
clock format $tm -format %H
|
||||
incr tm [expr {24*60*60}]; # overhead for this is ignored
|
||||
} 5000
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
time(n)
|
||||
.SH KEYWORDS
|
||||
performance measurement, script, time
|
||||
.\" Local Variables:
|
||||
.\" mode: nroff
|
||||
.\" End:
|
||||
+166
-161
@@ -153,46 +153,46 @@ static const crange alphaRangeTable[] = {
|
||||
{0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xd05, 0xd0c},
|
||||
{0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd54, 0xd56}, {0xd5f, 0xd61},
|
||||
{0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
|
||||
{0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe40, 0xe46}, {0xe94, 0xe97},
|
||||
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xead, 0xeb0}, {0xec0, 0xec4},
|
||||
{0xedc, 0xedf}, {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c},
|
||||
{0x1000, 0x102a}, {0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070},
|
||||
{0x1075, 0x1081}, {0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248},
|
||||
{0x124a, 0x124d}, {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288},
|
||||
{0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be},
|
||||
{0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315},
|
||||
{0x1318, 0x135a}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd},
|
||||
{0x1401, 0x166c}, {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea},
|
||||
{0x16f1, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731},
|
||||
{0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3},
|
||||
{0x1820, 0x1878}, {0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5},
|
||||
{0x1900, 0x191e}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab},
|
||||
{0x19b0, 0x19c9}, {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33},
|
||||
{0x1b45, 0x1b4b}, {0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23},
|
||||
{0x1c4d, 0x1c4f}, {0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1c90, 0x1cba},
|
||||
{0x1cbd, 0x1cbf}, {0x1ce9, 0x1cec}, {0x1cee, 0x1cf1}, {0x1d00, 0x1dbf},
|
||||
{0x1e00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d},
|
||||
{0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
|
||||
{0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb},
|
||||
{0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2090, 0x209c},
|
||||
{0x210a, 0x2113}, {0x2119, 0x211d}, {0x212a, 0x212d}, {0x212f, 0x2139},
|
||||
{0x213c, 0x213f}, {0x2145, 0x2149}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e},
|
||||
{0x2c60, 0x2ce4}, {0x2ceb, 0x2cee}, {0x2d00, 0x2d25}, {0x2d30, 0x2d67},
|
||||
{0x2d80, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6},
|
||||
{0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6},
|
||||
{0x2dd8, 0x2dde}, {0x3031, 0x3035}, {0x3041, 0x3096}, {0x309d, 0x309f},
|
||||
{0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e},
|
||||
{0x31a0, 0x31ba}, {0x31f0, 0x31ff}, {0x3400, 0x4db5}, {0x4e00, 0x9fef},
|
||||
{0xa000, 0xa48c}, {0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f},
|
||||
{0xa640, 0xa66e}, {0xa67f, 0xa69d}, {0xa6a0, 0xa6e5}, {0xa717, 0xa71f},
|
||||
{0xa722, 0xa788}, {0xa78b, 0xa7b9}, {0xa7f7, 0xa801}, {0xa803, 0xa805},
|
||||
{0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe40, 0xe46}, {0xe86, 0xe8a},
|
||||
{0xe8c, 0xea3}, {0xea7, 0xeb0}, {0xec0, 0xec4}, {0xedc, 0xedf},
|
||||
{0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c}, {0x1000, 0x102a},
|
||||
{0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070}, {0x1075, 0x1081},
|
||||
{0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d},
|
||||
{0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d},
|
||||
{0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5},
|
||||
{0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a},
|
||||
{0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1401, 0x166c},
|
||||
{0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16f1, 0x16f8},
|
||||
{0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731}, {0x1740, 0x1751},
|
||||
{0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3}, {0x1820, 0x1878},
|
||||
{0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5}, {0x1900, 0x191e},
|
||||
{0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9},
|
||||
{0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33}, {0x1b45, 0x1b4b},
|
||||
{0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23}, {0x1c4d, 0x1c4f},
|
||||
{0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf},
|
||||
{0x1ce9, 0x1cec}, {0x1cee, 0x1cf3}, {0x1d00, 0x1dbf}, {0x1e00, 0x1f15},
|
||||
{0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
|
||||
{0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fc2, 0x1fc4},
|
||||
{0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec},
|
||||
{0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc}, {0x2090, 0x209c}, {0x210a, 0x2113},
|
||||
{0x2119, 0x211d}, {0x212a, 0x212d}, {0x212f, 0x2139}, {0x213c, 0x213f},
|
||||
{0x2145, 0x2149}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2ce4},
|
||||
{0x2ceb, 0x2cee}, {0x2d00, 0x2d25}, {0x2d30, 0x2d67}, {0x2d80, 0x2d96},
|
||||
{0x2da0, 0x2da6}, {0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe},
|
||||
{0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde},
|
||||
{0x3031, 0x3035}, {0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa},
|
||||
{0x30fc, 0x30ff}, {0x3105, 0x312f}, {0x3131, 0x318e}, {0x31a0, 0x31ba},
|
||||
{0x31f0, 0x31ff}, {0x3400, 0x4db5}, {0x4e00, 0x9fef}, {0xa000, 0xa48c},
|
||||
{0xa4d0, 0xa4fd}, {0xa500, 0xa60c}, {0xa610, 0xa61f}, {0xa640, 0xa66e},
|
||||
{0xa67f, 0xa69d}, {0xa6a0, 0xa6e5}, {0xa717, 0xa71f}, {0xa722, 0xa788},
|
||||
{0xa78b, 0xa7bf}, {0xa7c2, 0xa7c6}, {0xa7f7, 0xa801}, {0xa803, 0xa805},
|
||||
{0xa807, 0xa80a}, {0xa80c, 0xa822}, {0xa840, 0xa873}, {0xa882, 0xa8b3},
|
||||
{0xa8f2, 0xa8f7}, {0xa90a, 0xa925}, {0xa930, 0xa946}, {0xa960, 0xa97c},
|
||||
{0xa984, 0xa9b2}, {0xa9e0, 0xa9e4}, {0xa9e6, 0xa9ef}, {0xa9fa, 0xa9fe},
|
||||
{0xaa00, 0xaa28}, {0xaa40, 0xaa42}, {0xaa44, 0xaa4b}, {0xaa60, 0xaa76},
|
||||
{0xaa7e, 0xaaaf}, {0xaab9, 0xaabd}, {0xaadb, 0xaadd}, {0xaae0, 0xaaea},
|
||||
{0xaaf2, 0xaaf4}, {0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16},
|
||||
{0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab65},
|
||||
{0xab20, 0xab26}, {0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab67},
|
||||
{0xab70, 0xabe2}, {0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb},
|
||||
{0xf900, 0xfa6d}, {0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17},
|
||||
{0xfb1f, 0xfb28}, {0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb46, 0xfbb1},
|
||||
@@ -213,21 +213,22 @@ static const crange alphaRangeTable[] = {
|
||||
{0x10a80, 0x10a9c}, {0x10ac0, 0x10ac7}, {0x10ac9, 0x10ae4}, {0x10b00, 0x10b35},
|
||||
{0x10b40, 0x10b55}, {0x10b60, 0x10b72}, {0x10b80, 0x10b91}, {0x10c00, 0x10c48},
|
||||
{0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10d00, 0x10d23}, {0x10f00, 0x10f1c},
|
||||
{0x10f30, 0x10f45}, {0x11003, 0x11037}, {0x11083, 0x110af}, {0x110d0, 0x110e8},
|
||||
{0x11103, 0x11126}, {0x11150, 0x11172}, {0x11183, 0x111b2}, {0x111c1, 0x111c4},
|
||||
{0x11200, 0x11211}, {0x11213, 0x1122b}, {0x11280, 0x11286}, {0x1128a, 0x1128d},
|
||||
{0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de}, {0x11305, 0x1130c},
|
||||
{0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339}, {0x1135d, 0x11361},
|
||||
{0x11400, 0x11434}, {0x11447, 0x1144a}, {0x11480, 0x114af}, {0x11580, 0x115ae},
|
||||
{0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11680, 0x116aa}, {0x11700, 0x1171a},
|
||||
{0x11800, 0x1182b}, {0x118a0, 0x118df}, {0x11a0b, 0x11a32}, {0x11a5c, 0x11a83},
|
||||
{0x11a86, 0x11a89}, {0x11ac0, 0x11af8}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e},
|
||||
{0x11c72, 0x11c8f}, {0x11d00, 0x11d06}, {0x11d0b, 0x11d30}, {0x11d60, 0x11d65},
|
||||
{0x11d6a, 0x11d89}, {0x11ee0, 0x11ef2}, {0x12000, 0x12399}, {0x12480, 0x12543},
|
||||
{0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
|
||||
{0x16ad0, 0x16aed}, {0x16b00, 0x16b2f}, {0x16b40, 0x16b43}, {0x16b63, 0x16b77},
|
||||
{0x16b7d, 0x16b8f}, {0x16e40, 0x16e7f}, {0x16f00, 0x16f44}, {0x16f93, 0x16f9f},
|
||||
{0x17000, 0x187f1}, {0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb},
|
||||
{0x10f30, 0x10f45}, {0x10fe0, 0x10ff6}, {0x11003, 0x11037}, {0x11083, 0x110af},
|
||||
{0x110d0, 0x110e8}, {0x11103, 0x11126}, {0x11150, 0x11172}, {0x11183, 0x111b2},
|
||||
{0x111c1, 0x111c4}, {0x11200, 0x11211}, {0x11213, 0x1122b}, {0x11280, 0x11286},
|
||||
{0x1128a, 0x1128d}, {0x1128f, 0x1129d}, {0x1129f, 0x112a8}, {0x112b0, 0x112de},
|
||||
{0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339},
|
||||
{0x1135d, 0x11361}, {0x11400, 0x11434}, {0x11447, 0x1144a}, {0x11480, 0x114af},
|
||||
{0x11580, 0x115ae}, {0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11680, 0x116aa},
|
||||
{0x11700, 0x1171a}, {0x11800, 0x1182b}, {0x118a0, 0x118df}, {0x119a0, 0x119a7},
|
||||
{0x119aa, 0x119d0}, {0x11a0b, 0x11a32}, {0x11a5c, 0x11a89}, {0x11ac0, 0x11af8},
|
||||
{0x11c00, 0x11c08}, {0x11c0a, 0x11c2e}, {0x11c72, 0x11c8f}, {0x11d00, 0x11d06},
|
||||
{0x11d0b, 0x11d30}, {0x11d60, 0x11d65}, {0x11d6a, 0x11d89}, {0x11ee0, 0x11ef2},
|
||||
{0x12000, 0x12399}, {0x12480, 0x12543}, {0x13000, 0x1342e}, {0x14400, 0x14646},
|
||||
{0x16800, 0x16a38}, {0x16a40, 0x16a5e}, {0x16ad0, 0x16aed}, {0x16b00, 0x16b2f},
|
||||
{0x16b40, 0x16b43}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16e40, 0x16e7f},
|
||||
{0x16f00, 0x16f4a}, {0x16f93, 0x16f9f}, {0x17000, 0x187f7}, {0x18800, 0x18af2},
|
||||
{0x1b000, 0x1b11e}, {0x1b150, 0x1b152}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb},
|
||||
{0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99},
|
||||
{0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9},
|
||||
{0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
|
||||
@@ -235,12 +236,13 @@ static const crange alphaRangeTable[] = {
|
||||
{0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da},
|
||||
{0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, {0x1d736, 0x1d74e},
|
||||
{0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2},
|
||||
{0x1d7c4, 0x1d7cb}, {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1ee00, 0x1ee03},
|
||||
{0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f},
|
||||
{0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c},
|
||||
{0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9},
|
||||
{0x1eeab, 0x1eebb}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d},
|
||||
{0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}
|
||||
{0x1d7c4, 0x1d7cb}, {0x1e100, 0x1e12c}, {0x1e137, 0x1e13d}, {0x1e2c0, 0x1e2eb},
|
||||
{0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f},
|
||||
{0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a},
|
||||
{0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89},
|
||||
{0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb},
|
||||
{0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1},
|
||||
{0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -257,24 +259,24 @@ static const chr alphaCharTable[] = {
|
||||
0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4, 0xbd0,
|
||||
0xc3d, 0xc60, 0xc61, 0xc80, 0xcbd, 0xcde, 0xce0, 0xce1, 0xcf1,
|
||||
0xcf2, 0xd3d, 0xd4e, 0xdbd, 0xe32, 0xe33, 0xe81, 0xe82, 0xe84,
|
||||
0xe87, 0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xeb2,
|
||||
0xeb3, 0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065, 0x1066, 0x108e,
|
||||
0x10c7, 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1bae,
|
||||
0x1baf, 0x1cf5, 0x1cf6, 0x1f59, 0x1f5b, 0x1f5d, 0x1fbe, 0x2071, 0x207f,
|
||||
0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e, 0x2183, 0x2184,
|
||||
0x2cf2, 0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f, 0x3005, 0x3006, 0x303b,
|
||||
0x303c, 0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa8fe, 0xa9cf, 0xaa7a, 0xaab1,
|
||||
0xaab5, 0xaab6, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e, 0xfb40, 0xfb41, 0xfb43,
|
||||
0xfb44
|
||||
0xea5, 0xeb2, 0xeb3, 0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065,
|
||||
0x1066, 0x108e, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa,
|
||||
0x1aa7, 0x1bae, 0x1baf, 0x1cf5, 0x1cf6, 0x1cfa, 0x1f59, 0x1f5b, 0x1f5d,
|
||||
0x1fbe, 0x2071, 0x207f, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128,
|
||||
0x214e, 0x2183, 0x2184, 0x2cf2, 0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f,
|
||||
0x3005, 0x3006, 0x303b, 0x303c, 0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa8fe,
|
||||
0xa9cf, 0xaa7a, 0xaab1, 0xaab5, 0xaab6, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e,
|
||||
0xfb40, 0xfb41, 0xfb43, 0xfb44
|
||||
#if CHRBITS > 16
|
||||
,0x1003c, 0x1003d, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4, 0x108f5, 0x109be,
|
||||
0x109bf, 0x10a00, 0x10f27, 0x11144, 0x11176, 0x111da, 0x111dc, 0x11288, 0x1130f,
|
||||
0x11310, 0x11332, 0x11333, 0x1133d, 0x11350, 0x114c4, 0x114c5, 0x114c7, 0x11644,
|
||||
0x118ff, 0x11a00, 0x11a3a, 0x11a50, 0x11a9d, 0x11c40, 0x11d08, 0x11d09, 0x11d46,
|
||||
0x11d67, 0x11d68, 0x11d98, 0x16f50, 0x16fe0, 0x16fe1, 0x1d49e, 0x1d49f, 0x1d4a2,
|
||||
0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39,
|
||||
0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57,
|
||||
0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e
|
||||
0x11310, 0x11332, 0x11333, 0x1133d, 0x11350, 0x1145f, 0x114c4, 0x114c5, 0x114c7,
|
||||
0x11644, 0x116b8, 0x118ff, 0x119e1, 0x119e3, 0x11a00, 0x11a3a, 0x11a50, 0x11a9d,
|
||||
0x11c40, 0x11d08, 0x11d09, 0x11d46, 0x11d67, 0x11d68, 0x11d98, 0x16f50, 0x16fe0,
|
||||
0x16fe1, 0x16fe3, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546,
|
||||
0x1e14e, 0x1e94b, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39, 0x1ee3b, 0x1ee42,
|
||||
0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57, 0x1ee59, 0x1ee5b,
|
||||
0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -289,8 +291,8 @@ static const crange controlRangeTable[] = {
|
||||
{0x202a, 0x202e}, {0x2060, 0x2064}, {0x2066, 0x206f}, {0xe000, 0xf8ff},
|
||||
{0xfff9, 0xfffb}
|
||||
#if CHRBITS > 16
|
||||
,{0x1bca0, 0x1bca3}, {0x1d173, 0x1d17a}, {0xe0020, 0xe007f}, {0xf0000, 0xffffd},
|
||||
{0x100000, 0x10fffd}
|
||||
,{0x13430, 0x13438}, {0x1bca0, 0x1bca3}, {0x1d173, 0x1d17a}, {0xe0020, 0xe007f},
|
||||
{0xf0000, 0xffffd}, {0x100000, 0x10fffd}
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -325,7 +327,8 @@ static const crange digitRangeTable[] = {
|
||||
{0x11136, 0x1113f}, {0x111d0, 0x111d9}, {0x112f0, 0x112f9}, {0x11450, 0x11459},
|
||||
{0x114d0, 0x114d9}, {0x11650, 0x11659}, {0x116c0, 0x116c9}, {0x11730, 0x11739},
|
||||
{0x118e0, 0x118e9}, {0x11c50, 0x11c59}, {0x11d50, 0x11d59}, {0x11da0, 0x11da9},
|
||||
{0x16a60, 0x16a69}, {0x16b50, 0x16b59}, {0x1d7ce, 0x1d7ff}, {0x1e950, 0x1e959}
|
||||
{0x16a60, 0x16a69}, {0x16b50, 0x16b59}, {0x1d7ce, 0x1d7ff}, {0x1e140, 0x1e149},
|
||||
{0x1e2f0, 0x1e2f9}, {0x1e950, 0x1e959}
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -348,7 +351,7 @@ static const crange punctRangeTable[] = {
|
||||
{0x1b5a, 0x1b60}, {0x1bfc, 0x1bff}, {0x1c3b, 0x1c3f}, {0x1cc0, 0x1cc7},
|
||||
{0x2010, 0x2027}, {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x205e},
|
||||
{0x2308, 0x230b}, {0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998},
|
||||
{0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e4e},
|
||||
{0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e4f},
|
||||
{0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0xa60d, 0xa60f},
|
||||
{0xa6f2, 0xa6f7}, {0xa874, 0xa877}, {0xa8f8, 0xa8fa}, {0xa9c1, 0xa9cd},
|
||||
{0xaa5c, 0xaa5f}, {0xfe10, 0xfe19}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61},
|
||||
@@ -372,8 +375,8 @@ static const chr punctCharTable[] = {
|
||||
0xab, 0xb6, 0xb7, 0xbb, 0xbf, 0x37e, 0x387, 0x589, 0x58a,
|
||||
0x5be, 0x5c0, 0x5c3, 0x5c6, 0x5f3, 0x5f4, 0x609, 0x60a, 0x60c,
|
||||
0x60d, 0x61b, 0x61e, 0x61f, 0x6d4, 0x85e, 0x964, 0x965, 0x970,
|
||||
0x9fd, 0xa76, 0xaf0, 0xc84, 0xdf4, 0xe4f, 0xe5a, 0xe5b, 0xf14,
|
||||
0xf85, 0xfd9, 0xfda, 0x10fb, 0x1400, 0x166d, 0x166e, 0x169b, 0x169c,
|
||||
0x9fd, 0xa76, 0xaf0, 0xc77, 0xc84, 0xdf4, 0xe4f, 0xe5a, 0xe5b,
|
||||
0xf14, 0xf85, 0xfd9, 0xfda, 0x10fb, 0x1400, 0x166e, 0x169b, 0x169c,
|
||||
0x1735, 0x1736, 0x1944, 0x1945, 0x1a1e, 0x1a1f, 0x1c7e, 0x1c7f, 0x1cd3,
|
||||
0x207d, 0x207e, 0x208d, 0x208e, 0x2329, 0x232a, 0x27c5, 0x27c6, 0x29fc,
|
||||
0x29fd, 0x2cfe, 0x2cff, 0x2d70, 0x3030, 0x303d, 0x30a0, 0x30fb, 0xa4fe,
|
||||
@@ -384,8 +387,8 @@ static const chr punctCharTable[] = {
|
||||
#if CHRBITS > 16
|
||||
,0x1039f, 0x103d0, 0x1056f, 0x10857, 0x1091f, 0x1093f, 0x10a7f, 0x110bb, 0x110bc,
|
||||
0x11174, 0x11175, 0x111cd, 0x111db, 0x112a9, 0x1145b, 0x1145d, 0x114c6, 0x1183b,
|
||||
0x11c70, 0x11c71, 0x11ef7, 0x11ef8, 0x16a6e, 0x16a6f, 0x16af5, 0x16b44, 0x1bc9f,
|
||||
0x1e95e, 0x1e95f
|
||||
0x119e2, 0x11c70, 0x11c71, 0x11ef7, 0x11ef8, 0x11fff, 0x16a6e, 0x16a6f, 0x16af5,
|
||||
0x16b44, 0x16fe2, 0x1bc9f, 0x1e95e, 0x1e95f
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -424,7 +427,7 @@ static const crange lowerRangeTable[] = {
|
||||
{0x1f90, 0x1f97}, {0x1fa0, 0x1fa7}, {0x1fb0, 0x1fb4}, {0x1fc2, 0x1fc4},
|
||||
{0x1fd0, 0x1fd3}, {0x1fe0, 0x1fe7}, {0x1ff2, 0x1ff4}, {0x2146, 0x2149},
|
||||
{0x2c30, 0x2c5e}, {0x2c76, 0x2c7b}, {0x2d00, 0x2d25}, {0xa72f, 0xa731},
|
||||
{0xa771, 0xa778}, {0xa793, 0xa795}, {0xab30, 0xab5a}, {0xab60, 0xab65},
|
||||
{0xa771, 0xa778}, {0xa793, 0xa795}, {0xab30, 0xab5a}, {0xab60, 0xab67},
|
||||
{0xab70, 0xabbf}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xff41, 0xff5a}
|
||||
#if CHRBITS > 16
|
||||
,{0x10428, 0x1044f}, {0x104d8, 0x104fb}, {0x10cc0, 0x10cf2}, {0x118c0, 0x118df},
|
||||
@@ -504,7 +507,7 @@ static const chr lowerCharTable[] = {
|
||||
0xa763, 0xa765, 0xa767, 0xa769, 0xa76b, 0xa76d, 0xa76f, 0xa77a, 0xa77c,
|
||||
0xa77f, 0xa781, 0xa783, 0xa785, 0xa787, 0xa78c, 0xa78e, 0xa791, 0xa797,
|
||||
0xa799, 0xa79b, 0xa79d, 0xa79f, 0xa7a1, 0xa7a3, 0xa7a5, 0xa7a7, 0xa7a9,
|
||||
0xa7af, 0xa7b5, 0xa7b7, 0xa7b9, 0xa7fa
|
||||
0xa7af, 0xa7b5, 0xa7b7, 0xa7b9, 0xa7bb, 0xa7bd, 0xa7bf, 0xa7c3, 0xa7fa
|
||||
#if CHRBITS > 16
|
||||
,0x1d4bb, 0x1d7cb
|
||||
#endif
|
||||
@@ -527,7 +530,7 @@ static const crange upperRangeTable[] = {
|
||||
{0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb}, {0x210b, 0x210d}, {0x2110, 0x2112},
|
||||
{0x2119, 0x211d}, {0x212a, 0x212d}, {0x2130, 0x2133}, {0x2c00, 0x2c2e},
|
||||
{0x2c62, 0x2c64}, {0x2c6d, 0x2c70}, {0x2c7e, 0x2c80}, {0xa7aa, 0xa7ae},
|
||||
{0xa7b0, 0xa7b4}, {0xff21, 0xff3a}
|
||||
{0xa7b0, 0xa7b4}, {0xa7c4, 0xa7c6}, {0xff21, 0xff3a}
|
||||
#if CHRBITS > 16
|
||||
,{0x10400, 0x10427}, {0x104b0, 0x104d3}, {0x10c80, 0x10cb2}, {0x118a0, 0x118bf},
|
||||
{0x16e40, 0x16e5f}, {0x1d400, 0x1d419}, {0x1d434, 0x1d44d}, {0x1d468, 0x1d481},
|
||||
@@ -606,7 +609,7 @@ static const chr upperCharTable[] = {
|
||||
0xa768, 0xa76a, 0xa76c, 0xa76e, 0xa779, 0xa77b, 0xa77d, 0xa77e, 0xa780,
|
||||
0xa782, 0xa784, 0xa786, 0xa78b, 0xa78d, 0xa790, 0xa792, 0xa796, 0xa798,
|
||||
0xa79a, 0xa79c, 0xa79e, 0xa7a0, 0xa7a2, 0xa7a4, 0xa7a6, 0xa7a8, 0xa7b6,
|
||||
0xa7b8
|
||||
0xa7b8, 0xa7ba, 0xa7bc, 0xa7be, 0xa7c2
|
||||
#if CHRBITS > 16
|
||||
,0x1d49c, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d504, 0x1d505, 0x1d538,
|
||||
0x1d539, 0x1d546, 0x1d7ca
|
||||
@@ -640,54 +643,53 @@ static const crange graphRangeTable[] = {
|
||||
{0xbae, 0xbb9}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd},
|
||||
{0xbe6, 0xbfa}, {0xc00, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
|
||||
{0xc2a, 0xc39}, {0xc3d, 0xc44}, {0xc46, 0xc48}, {0xc4a, 0xc4d},
|
||||
{0xc58, 0xc5a}, {0xc60, 0xc63}, {0xc66, 0xc6f}, {0xc78, 0xc8c},
|
||||
{0xc58, 0xc5a}, {0xc60, 0xc63}, {0xc66, 0xc6f}, {0xc77, 0xc8c},
|
||||
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
|
||||
{0xcbc, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xce0, 0xce3},
|
||||
{0xce6, 0xcef}, {0xd00, 0xd03}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
|
||||
{0xd12, 0xd44}, {0xd46, 0xd48}, {0xd4a, 0xd4f}, {0xd54, 0xd63},
|
||||
{0xd66, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
|
||||
{0xdc0, 0xdc6}, {0xdcf, 0xdd4}, {0xdd8, 0xddf}, {0xde6, 0xdef},
|
||||
{0xdf2, 0xdf4}, {0xe01, 0xe3a}, {0xe3f, 0xe5b}, {0xe94, 0xe97},
|
||||
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xead, 0xeb9}, {0xebb, 0xebd},
|
||||
{0xec0, 0xec4}, {0xec8, 0xecd}, {0xed0, 0xed9}, {0xedc, 0xedf},
|
||||
{0xf00, 0xf47}, {0xf49, 0xf6c}, {0xf71, 0xf97}, {0xf99, 0xfbc},
|
||||
{0xfbe, 0xfcc}, {0xfce, 0xfda}, {0x1000, 0x10c5}, {0x10d0, 0x1248},
|
||||
{0x124a, 0x124d}, {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288},
|
||||
{0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be},
|
||||
{0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315},
|
||||
{0x1318, 0x135a}, {0x135d, 0x137c}, {0x1380, 0x1399}, {0x13a0, 0x13f5},
|
||||
{0x13f8, 0x13fd}, {0x1400, 0x167f}, {0x1681, 0x169c}, {0x16a0, 0x16f8},
|
||||
{0x1700, 0x170c}, {0x170e, 0x1714}, {0x1720, 0x1736}, {0x1740, 0x1753},
|
||||
{0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17dd}, {0x17e0, 0x17e9},
|
||||
{0x17f0, 0x17f9}, {0x1800, 0x180d}, {0x1810, 0x1819}, {0x1820, 0x1878},
|
||||
{0x1880, 0x18aa}, {0x18b0, 0x18f5}, {0x1900, 0x191e}, {0x1920, 0x192b},
|
||||
{0x1930, 0x193b}, {0x1944, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab},
|
||||
{0x19b0, 0x19c9}, {0x19d0, 0x19da}, {0x19de, 0x1a1b}, {0x1a1e, 0x1a5e},
|
||||
{0x1a60, 0x1a7c}, {0x1a7f, 0x1a89}, {0x1a90, 0x1a99}, {0x1aa0, 0x1aad},
|
||||
{0x1ab0, 0x1abe}, {0x1b00, 0x1b4b}, {0x1b50, 0x1b7c}, {0x1b80, 0x1bf3},
|
||||
{0x1bfc, 0x1c37}, {0x1c3b, 0x1c49}, {0x1c4d, 0x1c88}, {0x1c90, 0x1cba},
|
||||
{0x1cbd, 0x1cc7}, {0x1cd0, 0x1cf9}, {0x1d00, 0x1df9}, {0x1dfb, 0x1f15},
|
||||
{0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57},
|
||||
{0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fc4}, {0x1fc6, 0x1fd3},
|
||||
{0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffe},
|
||||
{0x2010, 0x2027}, {0x2030, 0x205e}, {0x2074, 0x208e}, {0x2090, 0x209c},
|
||||
{0x20a0, 0x20bf}, {0x20d0, 0x20f0}, {0x2100, 0x218b}, {0x2190, 0x2426},
|
||||
{0x2440, 0x244a}, {0x2460, 0x2b73}, {0x2b76, 0x2b95}, {0x2b98, 0x2bc8},
|
||||
{0x2bca, 0x2bfe}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
|
||||
{0xdf2, 0xdf4}, {0xe01, 0xe3a}, {0xe3f, 0xe5b}, {0xe86, 0xe8a},
|
||||
{0xe8c, 0xea3}, {0xea7, 0xebd}, {0xec0, 0xec4}, {0xec8, 0xecd},
|
||||
{0xed0, 0xed9}, {0xedc, 0xedf}, {0xf00, 0xf47}, {0xf49, 0xf6c},
|
||||
{0xf71, 0xf97}, {0xf99, 0xfbc}, {0xfbe, 0xfcc}, {0xfce, 0xfda},
|
||||
{0x1000, 0x10c5}, {0x10d0, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256},
|
||||
{0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0},
|
||||
{0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5}, {0x12c8, 0x12d6},
|
||||
{0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a}, {0x135d, 0x137c},
|
||||
{0x1380, 0x1399}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1400, 0x167f},
|
||||
{0x1681, 0x169c}, {0x16a0, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1714},
|
||||
{0x1720, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176c}, {0x176e, 0x1770},
|
||||
{0x1780, 0x17dd}, {0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1800, 0x180d},
|
||||
{0x1810, 0x1819}, {0x1820, 0x1878}, {0x1880, 0x18aa}, {0x18b0, 0x18f5},
|
||||
{0x1900, 0x191e}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x1944, 0x196d},
|
||||
{0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x19d0, 0x19da},
|
||||
{0x19de, 0x1a1b}, {0x1a1e, 0x1a5e}, {0x1a60, 0x1a7c}, {0x1a7f, 0x1a89},
|
||||
{0x1a90, 0x1a99}, {0x1aa0, 0x1aad}, {0x1ab0, 0x1abe}, {0x1b00, 0x1b4b},
|
||||
{0x1b50, 0x1b7c}, {0x1b80, 0x1bf3}, {0x1bfc, 0x1c37}, {0x1c3b, 0x1c49},
|
||||
{0x1c4d, 0x1c88}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cc7}, {0x1cd0, 0x1cfa},
|
||||
{0x1d00, 0x1df9}, {0x1dfb, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
|
||||
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
|
||||
{0x1fb6, 0x1fc4}, {0x1fc6, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef},
|
||||
{0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffe}, {0x2010, 0x2027}, {0x2030, 0x205e},
|
||||
{0x2074, 0x208e}, {0x2090, 0x209c}, {0x20a0, 0x20bf}, {0x20d0, 0x20f0},
|
||||
{0x2100, 0x218b}, {0x2190, 0x2426}, {0x2440, 0x244a}, {0x2460, 0x2b73},
|
||||
{0x2b76, 0x2b95}, {0x2b98, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
|
||||
{0x2cf9, 0x2d25}, {0x2d30, 0x2d67}, {0x2d7f, 0x2d96}, {0x2da0, 0x2da6},
|
||||
{0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6},
|
||||
{0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e4e},
|
||||
{0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e4f},
|
||||
{0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
|
||||
{0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312f},
|
||||
{0x3131, 0x318e}, {0x3190, 0x31ba}, {0x31c0, 0x31e3}, {0x31f0, 0x321e},
|
||||
{0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c},
|
||||
{0xa490, 0xa4c6}, {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7b9},
|
||||
{0x3220, 0x4db5}, {0x4dc0, 0x9fef}, {0xa000, 0xa48c}, {0xa490, 0xa4c6},
|
||||
{0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7bf}, {0xa7c2, 0xa7c6},
|
||||
{0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877}, {0xa880, 0xa8c5},
|
||||
{0xa8ce, 0xa8d9}, {0xa8e0, 0xa953}, {0xa95f, 0xa97c}, {0xa980, 0xa9cd},
|
||||
{0xa9cf, 0xa9d9}, {0xa9de, 0xa9fe}, {0xaa00, 0xaa36}, {0xaa40, 0xaa4d},
|
||||
{0xaa50, 0xaa59}, {0xaa5c, 0xaac2}, {0xaadb, 0xaaf6}, {0xab01, 0xab06},
|
||||
{0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e},
|
||||
{0xab30, 0xab65}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
|
||||
{0xab30, 0xab67}, {0xab70, 0xabed}, {0xabf0, 0xabf9}, {0xac00, 0xd7a3},
|
||||
{0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9},
|
||||
{0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1d, 0xfb36}, {0xfb38, 0xfb3c},
|
||||
{0xfb46, 0xfbc1}, {0xfbd3, 0xfd3f}, {0xfd50, 0xfd8f}, {0xfd92, 0xfdc7},
|
||||
@@ -711,29 +713,31 @@ static const crange graphRangeTable[] = {
|
||||
{0x10aeb, 0x10af6}, {0x10b00, 0x10b35}, {0x10b39, 0x10b55}, {0x10b58, 0x10b72},
|
||||
{0x10b78, 0x10b91}, {0x10b99, 0x10b9c}, {0x10ba9, 0x10baf}, {0x10c00, 0x10c48},
|
||||
{0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10cfa, 0x10d27}, {0x10d30, 0x10d39},
|
||||
{0x10e60, 0x10e7e}, {0x10f00, 0x10f27}, {0x10f30, 0x10f59}, {0x11000, 0x1104d},
|
||||
{0x11052, 0x1106f}, {0x1107f, 0x110bc}, {0x110be, 0x110c1}, {0x110d0, 0x110e8},
|
||||
{0x110f0, 0x110f9}, {0x11100, 0x11134}, {0x11136, 0x11146}, {0x11150, 0x11176},
|
||||
{0x11180, 0x111cd}, {0x111d0, 0x111df}, {0x111e1, 0x111f4}, {0x11200, 0x11211},
|
||||
{0x11213, 0x1123e}, {0x11280, 0x11286}, {0x1128a, 0x1128d}, {0x1128f, 0x1129d},
|
||||
{0x1129f, 0x112a9}, {0x112b0, 0x112ea}, {0x112f0, 0x112f9}, {0x11300, 0x11303},
|
||||
{0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339},
|
||||
{0x1133b, 0x11344}, {0x1134b, 0x1134d}, {0x1135d, 0x11363}, {0x11366, 0x1136c},
|
||||
{0x11370, 0x11374}, {0x11400, 0x11459}, {0x11480, 0x114c7}, {0x114d0, 0x114d9},
|
||||
{0x11580, 0x115b5}, {0x115b8, 0x115dd}, {0x11600, 0x11644}, {0x11650, 0x11659},
|
||||
{0x11660, 0x1166c}, {0x11680, 0x116b7}, {0x116c0, 0x116c9}, {0x11700, 0x1171a},
|
||||
{0x1171d, 0x1172b}, {0x11730, 0x1173f}, {0x11800, 0x1183b}, {0x118a0, 0x118f2},
|
||||
{0x11a00, 0x11a47}, {0x11a50, 0x11a83}, {0x11a86, 0x11aa2}, {0x11ac0, 0x11af8},
|
||||
{0x10e60, 0x10e7e}, {0x10f00, 0x10f27}, {0x10f30, 0x10f59}, {0x10fe0, 0x10ff6},
|
||||
{0x11000, 0x1104d}, {0x11052, 0x1106f}, {0x1107f, 0x110bc}, {0x110be, 0x110c1},
|
||||
{0x110d0, 0x110e8}, {0x110f0, 0x110f9}, {0x11100, 0x11134}, {0x11136, 0x11146},
|
||||
{0x11150, 0x11176}, {0x11180, 0x111cd}, {0x111d0, 0x111df}, {0x111e1, 0x111f4},
|
||||
{0x11200, 0x11211}, {0x11213, 0x1123e}, {0x11280, 0x11286}, {0x1128a, 0x1128d},
|
||||
{0x1128f, 0x1129d}, {0x1129f, 0x112a9}, {0x112b0, 0x112ea}, {0x112f0, 0x112f9},
|
||||
{0x11300, 0x11303}, {0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330},
|
||||
{0x11335, 0x11339}, {0x1133b, 0x11344}, {0x1134b, 0x1134d}, {0x1135d, 0x11363},
|
||||
{0x11366, 0x1136c}, {0x11370, 0x11374}, {0x11400, 0x11459}, {0x1145d, 0x1145f},
|
||||
{0x11480, 0x114c7}, {0x114d0, 0x114d9}, {0x11580, 0x115b5}, {0x115b8, 0x115dd},
|
||||
{0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166c}, {0x11680, 0x116b8},
|
||||
{0x116c0, 0x116c9}, {0x11700, 0x1171a}, {0x1171d, 0x1172b}, {0x11730, 0x1173f},
|
||||
{0x11800, 0x1183b}, {0x118a0, 0x118f2}, {0x119a0, 0x119a7}, {0x119aa, 0x119d7},
|
||||
{0x119da, 0x119e4}, {0x11a00, 0x11a47}, {0x11a50, 0x11aa2}, {0x11ac0, 0x11af8},
|
||||
{0x11c00, 0x11c08}, {0x11c0a, 0x11c36}, {0x11c38, 0x11c45}, {0x11c50, 0x11c6c},
|
||||
{0x11c70, 0x11c8f}, {0x11c92, 0x11ca7}, {0x11ca9, 0x11cb6}, {0x11d00, 0x11d06},
|
||||
{0x11d0b, 0x11d36}, {0x11d3f, 0x11d47}, {0x11d50, 0x11d59}, {0x11d60, 0x11d65},
|
||||
{0x11d6a, 0x11d8e}, {0x11d93, 0x11d98}, {0x11da0, 0x11da9}, {0x11ee0, 0x11ef8},
|
||||
{0x12000, 0x12399}, {0x12400, 0x1246e}, {0x12470, 0x12474}, {0x12480, 0x12543},
|
||||
{0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
|
||||
{0x16a60, 0x16a69}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af5}, {0x16b00, 0x16b45},
|
||||
{0x16b50, 0x16b59}, {0x16b5b, 0x16b61}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f},
|
||||
{0x16e40, 0x16e9a}, {0x16f00, 0x16f44}, {0x16f50, 0x16f7e}, {0x16f8f, 0x16f9f},
|
||||
{0x17000, 0x187f1}, {0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb},
|
||||
{0x11fc0, 0x11ff1}, {0x11fff, 0x12399}, {0x12400, 0x1246e}, {0x12470, 0x12474},
|
||||
{0x12480, 0x12543}, {0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38},
|
||||
{0x16a40, 0x16a5e}, {0x16a60, 0x16a69}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af5},
|
||||
{0x16b00, 0x16b45}, {0x16b50, 0x16b59}, {0x16b5b, 0x16b61}, {0x16b63, 0x16b77},
|
||||
{0x16b7d, 0x16b8f}, {0x16e40, 0x16e9a}, {0x16f00, 0x16f4a}, {0x16f4f, 0x16f87},
|
||||
{0x16f8f, 0x16f9f}, {0x16fe0, 0x16fe3}, {0x17000, 0x187f7}, {0x18800, 0x18af2},
|
||||
{0x1b000, 0x1b11e}, {0x1b150, 0x1b152}, {0x1b164, 0x1b167}, {0x1b170, 0x1b2fb},
|
||||
{0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99},
|
||||
{0x1bc9c, 0x1bc9f}, {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d129, 0x1d172},
|
||||
{0x1d17b, 0x1d1e8}, {0x1d200, 0x1d245}, {0x1d2e0, 0x1d2f3}, {0x1d300, 0x1d356},
|
||||
@@ -742,22 +746,24 @@ static const crange graphRangeTable[] = {
|
||||
{0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
|
||||
{0x1d540, 0x1d544}, {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d7cb},
|
||||
{0x1d7ce, 0x1da8b}, {0x1da9b, 0x1da9f}, {0x1daa1, 0x1daaf}, {0x1e000, 0x1e006},
|
||||
{0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, {0x1e026, 0x1e02a}, {0x1e800, 0x1e8c4},
|
||||
{0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94a}, {0x1e950, 0x1e959}, {0x1ec71, 0x1ecb4},
|
||||
{0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37},
|
||||
{0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77},
|
||||
{0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3},
|
||||
{0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b}, {0x1f030, 0x1f093},
|
||||
{0x1f0a0, 0x1f0ae}, {0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf}, {0x1f0d1, 0x1f0f5},
|
||||
{0x1f100, 0x1f10c}, {0x1f110, 0x1f16b}, {0x1f170, 0x1f1ac}, {0x1f1e6, 0x1f202},
|
||||
{0x1f210, 0x1f23b}, {0x1f240, 0x1f248}, {0x1f260, 0x1f265}, {0x1f300, 0x1f6d4},
|
||||
{0x1f6e0, 0x1f6ec}, {0x1f6f0, 0x1f6f9}, {0x1f700, 0x1f773}, {0x1f780, 0x1f7d8},
|
||||
{0x1f800, 0x1f80b}, {0x1f810, 0x1f847}, {0x1f850, 0x1f859}, {0x1f860, 0x1f887},
|
||||
{0x1f890, 0x1f8ad}, {0x1f900, 0x1f90b}, {0x1f910, 0x1f93e}, {0x1f940, 0x1f970},
|
||||
{0x1f973, 0x1f976}, {0x1f97c, 0x1f9a2}, {0x1f9b0, 0x1f9b9}, {0x1f9c0, 0x1f9c2},
|
||||
{0x1f9d0, 0x1f9ff}, {0x1fa60, 0x1fa6d}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734},
|
||||
{0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d},
|
||||
{0xe0100, 0xe01ef}
|
||||
{0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, {0x1e026, 0x1e02a}, {0x1e100, 0x1e12c},
|
||||
{0x1e130, 0x1e13d}, {0x1e140, 0x1e149}, {0x1e2c0, 0x1e2f9}, {0x1e800, 0x1e8c4},
|
||||
{0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94b}, {0x1e950, 0x1e959}, {0x1ec71, 0x1ecb4},
|
||||
{0x1ed01, 0x1ed3d}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32},
|
||||
{0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72},
|
||||
{0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b},
|
||||
{0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b},
|
||||
{0x1f030, 0x1f093}, {0x1f0a0, 0x1f0ae}, {0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf},
|
||||
{0x1f0d1, 0x1f0f5}, {0x1f100, 0x1f10c}, {0x1f110, 0x1f16c}, {0x1f170, 0x1f1ac},
|
||||
{0x1f1e6, 0x1f202}, {0x1f210, 0x1f23b}, {0x1f240, 0x1f248}, {0x1f260, 0x1f265},
|
||||
{0x1f300, 0x1f6d5}, {0x1f6e0, 0x1f6ec}, {0x1f6f0, 0x1f6fa}, {0x1f700, 0x1f773},
|
||||
{0x1f780, 0x1f7d8}, {0x1f7e0, 0x1f7eb}, {0x1f800, 0x1f80b}, {0x1f810, 0x1f847},
|
||||
{0x1f850, 0x1f859}, {0x1f860, 0x1f887}, {0x1f890, 0x1f8ad}, {0x1f900, 0x1f90b},
|
||||
{0x1f90d, 0x1f971}, {0x1f973, 0x1f976}, {0x1f97a, 0x1f9a2}, {0x1f9a5, 0x1f9aa},
|
||||
{0x1f9ae, 0x1f9ca}, {0x1f9cd, 0x1fa53}, {0x1fa60, 0x1fa6d}, {0x1fa70, 0x1fa73},
|
||||
{0x1fa78, 0x1fa7a}, {0x1fa80, 0x1fa82}, {0x1fa90, 0x1fa95}, {0x20000, 0x2a6d6},
|
||||
{0x2a700, 0x2b734}, {0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0},
|
||||
{0x2f800, 0x2fa1d}, {0xe0100, 0xe01ef}
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -770,21 +776,20 @@ static const chr graphCharTable[] = {
|
||||
0xb10, 0xb32, 0xb33, 0xb47, 0xb48, 0xb56, 0xb57, 0xb5c, 0xb5d,
|
||||
0xb82, 0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4,
|
||||
0xbd0, 0xbd7, 0xc55, 0xc56, 0xcd5, 0xcd6, 0xcde, 0xcf1, 0xcf2,
|
||||
0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81, 0xe82, 0xe84, 0xe87,
|
||||
0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xec6, 0x10c7,
|
||||
0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940, 0x1f59, 0x1f5b, 0x1f5d,
|
||||
0x2070, 0x2071, 0x2d27, 0x2d2d, 0x2d6f, 0x2d70, 0xfb3e, 0xfb40, 0xfb41,
|
||||
0xfb43, 0xfb44, 0xfffc, 0xfffd
|
||||
0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81, 0xe82, 0xe84, 0xea5,
|
||||
0xec6, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940, 0x1f59,
|
||||
0x1f5b, 0x1f5d, 0x2070, 0x2071, 0x2d27, 0x2d2d, 0x2d6f, 0x2d70, 0xfb3e,
|
||||
0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfffc, 0xfffd
|
||||
#if CHRBITS > 16
|
||||
,0x1003c, 0x1003d, 0x101a0, 0x1056f, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4,
|
||||
0x108f5, 0x1093f, 0x10a05, 0x10a06, 0x11288, 0x1130f, 0x11310, 0x11332, 0x11333,
|
||||
0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x1145d, 0x1145e, 0x118ff, 0x11d08,
|
||||
0x11d09, 0x11d3a, 0x11d3c, 0x11d3d, 0x11d67, 0x11d68, 0x11d90, 0x11d91, 0x16a6e,
|
||||
0x16a6f, 0x16fe0, 0x16fe1, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb,
|
||||
0x1d546, 0x1e023, 0x1e024, 0x1e95e, 0x1e95f, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27,
|
||||
0x1ee39, 0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54,
|
||||
0x1ee57, 0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e,
|
||||
0x1eef0, 0x1eef1, 0x1f250, 0x1f251, 0x1f97a
|
||||
0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x118ff, 0x11d08, 0x11d09, 0x11d3a,
|
||||
0x11d3c, 0x11d3d, 0x11d67, 0x11d68, 0x11d90, 0x11d91, 0x16a6e, 0x16a6f, 0x1d49e,
|
||||
0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1e023, 0x1e024, 0x1e14e,
|
||||
0x1e14f, 0x1e2ff, 0x1e95e, 0x1e95f, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39,
|
||||
0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57,
|
||||
0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e, 0x1eef0,
|
||||
0x1eef1, 0x1f250, 0x1f251
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
+2
-6
@@ -42,10 +42,6 @@ extern "C" {
|
||||
* win/configure.in (as above)
|
||||
* win/tcl.m4 (not patchlevel)
|
||||
* README (sections 0 and 2, with and without separator)
|
||||
* macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
|
||||
* macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
|
||||
* macosx/Tcl.xcode/project.pbxproj (not patchlevel) 2 LOC
|
||||
* macosx/Tcl.xcode/default.pbxuser (not patchlevel) 1 LOC
|
||||
* macosx/Tcl-Common.xcconfig (not patchlevel) 1 LOC
|
||||
* win/README (not patchlevel) (sections 0 and 2)
|
||||
* unix/tcl.spec (1 LOC patch)
|
||||
@@ -55,10 +51,10 @@ extern "C" {
|
||||
#define TCL_MAJOR_VERSION 8
|
||||
#define TCL_MINOR_VERSION 6
|
||||
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
|
||||
#define TCL_RELEASE_SERIAL 8
|
||||
#define TCL_RELEASE_SERIAL 9
|
||||
|
||||
#define TCL_VERSION "8.6"
|
||||
#define TCL_PATCH_LEVEL "8.6.8"
|
||||
#define TCL_PATCH_LEVEL "8.6.9"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
|
||||
@@ -513,6 +513,7 @@ static const unsigned char NonThrowingByteCodes[] = {
|
||||
INST_PUSH1, INST_PUSH4, INST_POP, INST_DUP, /* 1-4 */
|
||||
INST_JUMP1, INST_JUMP4, /* 34-35 */
|
||||
INST_END_CATCH, INST_PUSH_RESULT, INST_PUSH_RETURN_CODE, /* 70-72 */
|
||||
INST_STR_EQ, INST_STR_NEQ, INST_STR_CMP, INST_STR_LEN, /* 73-76 */
|
||||
INST_LIST, /* 79 */
|
||||
INST_OVER, /* 95 */
|
||||
INST_PUSH_RETURN_OPTIONS, /* 108 */
|
||||
@@ -2255,7 +2256,7 @@ GetListIndexOperand(
|
||||
if (GetNextOperand(assemEnvPtr, tokenPtrPtr, &value) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/* Convert to an integer, advance to the next token and return. */
|
||||
/*
|
||||
* NOTE: Indexing a list with an index before it yields the
|
||||
|
||||
+169
-55
@@ -158,6 +158,7 @@ static Tcl_NRPostProc Dispatch;
|
||||
|
||||
static Tcl_ObjCmdProc NRCoroInjectObjCmd;
|
||||
static Tcl_NRPostProc NRPostInvoke;
|
||||
static Tcl_ObjCmdProc CoroTypeObjCmd;
|
||||
|
||||
MODULE_SCOPE const TclStubs tclStubs;
|
||||
|
||||
@@ -285,6 +286,9 @@ static const CmdInfo builtInCmds[] = {
|
||||
{"source", Tcl_SourceObjCmd, NULL, TclNRSourceObjCmd, 0},
|
||||
{"tell", Tcl_TellObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"time", Tcl_TimeObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
#ifdef TCL_TIMERATE
|
||||
{"timerate", Tcl_TimeRateObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
#endif
|
||||
{"unload", Tcl_UnloadObjCmd, NULL, NULL, 0},
|
||||
{"update", Tcl_UpdateObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"vwait", Tcl_VwaitObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
@@ -454,7 +458,7 @@ Tcl_CreateInterp(void)
|
||||
const BuiltinFuncDef *builtinFuncPtr;
|
||||
const OpCmdInfo *opcmdInfoPtr;
|
||||
const CmdInfo *cmdInfoPtr;
|
||||
Tcl_Namespace *mathfuncNSPtr, *mathopNSPtr;
|
||||
Tcl_Namespace *nsPtr;
|
||||
Tcl_HashEntry *hPtr;
|
||||
int isNew;
|
||||
CancelInfo *cancelInfo;
|
||||
@@ -842,8 +846,22 @@ Tcl_CreateInterp(void)
|
||||
TclNRAssembleObjCmd, NULL, NULL);
|
||||
cmdPtr->compileProc = &TclCompileAssembleCmd;
|
||||
|
||||
/* Coroutine monkeybusiness */
|
||||
Tcl_NRCreateCommand(interp, "::tcl::unsupported::inject", NULL,
|
||||
NRCoroInjectObjCmd, NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "::tcl::unsupported::corotype",
|
||||
CoroTypeObjCmd, NULL, NULL);
|
||||
|
||||
/* Create an unsupported command for timerate */
|
||||
Tcl_CreateObjCommand(interp, "::tcl::unsupported::timerate",
|
||||
Tcl_TimeRateObjCmd, NULL, NULL);
|
||||
|
||||
/* Export unsupported commands */
|
||||
nsPtr = Tcl_FindNamespace(interp, "::tcl::unsupported", NULL, 0);
|
||||
if (nsPtr) {
|
||||
Tcl_Export(interp, nsPtr, "*", 1);
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_DTRACE
|
||||
/*
|
||||
@@ -857,8 +875,8 @@ Tcl_CreateInterp(void)
|
||||
* Register the builtin math functions.
|
||||
*/
|
||||
|
||||
mathfuncNSPtr = Tcl_CreateNamespace(interp, "::tcl::mathfunc", NULL,NULL);
|
||||
if (mathfuncNSPtr == NULL) {
|
||||
nsPtr = Tcl_CreateNamespace(interp, "::tcl::mathfunc", NULL,NULL);
|
||||
if (nsPtr == NULL) {
|
||||
Tcl_Panic("Can't create math function namespace");
|
||||
}
|
||||
#define MATH_FUNC_PREFIX_LEN 17 /* == strlen("::tcl::mathfunc::") */
|
||||
@@ -868,18 +886,18 @@ Tcl_CreateInterp(void)
|
||||
strcpy(mathFuncName+MATH_FUNC_PREFIX_LEN, builtinFuncPtr->name);
|
||||
Tcl_CreateObjCommand(interp, mathFuncName,
|
||||
builtinFuncPtr->objCmdProc, builtinFuncPtr->clientData, NULL);
|
||||
Tcl_Export(interp, mathfuncNSPtr, builtinFuncPtr->name, 0);
|
||||
Tcl_Export(interp, nsPtr, builtinFuncPtr->name, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Register the mathematical "operator" commands. [TIP #174]
|
||||
*/
|
||||
|
||||
mathopNSPtr = Tcl_CreateNamespace(interp, "::tcl::mathop", NULL, NULL);
|
||||
if (mathopNSPtr == NULL) {
|
||||
nsPtr = Tcl_CreateNamespace(interp, "::tcl::mathop", NULL, NULL);
|
||||
if (nsPtr == NULL) {
|
||||
Tcl_Panic("can't create math operator namespace");
|
||||
}
|
||||
Tcl_Export(interp, mathopNSPtr, "*", 1);
|
||||
Tcl_Export(interp, nsPtr, "*", 1);
|
||||
#define MATH_OP_PREFIX_LEN 15 /* == strlen("::tcl::mathop::") */
|
||||
memcpy(mathFuncName, "::tcl::mathop::", MATH_OP_PREFIX_LEN);
|
||||
for (opcmdInfoPtr=mathOpCmds ; opcmdInfoPtr->name!=NULL ; opcmdInfoPtr++){
|
||||
@@ -2095,14 +2113,16 @@ Tcl_CreateCommand(
|
||||
break;
|
||||
}
|
||||
|
||||
/* An existing command conflicts. Try to delete it.. */
|
||||
/*
|
||||
* An existing command conflicts. Try to delete it...
|
||||
*/
|
||||
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
/*
|
||||
* Be careful to preserve
|
||||
* any existing import links so we can restore them down below. That
|
||||
* way, you can redefine a command and its import status will remain
|
||||
* intact.
|
||||
* Be careful to preserve any existing import links so we can restore
|
||||
* them down below. That way, you can redefine a command and its
|
||||
* import status will remain intact.
|
||||
*/
|
||||
|
||||
cmdPtr->refCount++;
|
||||
@@ -2122,16 +2142,15 @@ Tcl_CreateCommand(
|
||||
|
||||
if (!isNew) {
|
||||
/*
|
||||
* If the deletion callback recreated the command, just throw away
|
||||
* the new command (if we try to delete it again, we could get
|
||||
* stuck in an infinite loop).
|
||||
* If the deletion callback recreated the command, just throw away the
|
||||
* new command (if we try to delete it again, we could get stuck in an
|
||||
* infinite loop).
|
||||
*/
|
||||
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
}
|
||||
|
||||
if (!deleted) {
|
||||
|
||||
/*
|
||||
* Command resolvers (per-interp, per-namespace) might have resolved
|
||||
* to a command for the given namespace scope with this command not
|
||||
@@ -2310,16 +2329,18 @@ TclCreateObjCommandInNs (
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* An existing command conflicts. Try to delete it...
|
||||
*/
|
||||
|
||||
/* An existing command conflicts. Try to delete it.. */
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
/*
|
||||
* [***] This is wrong. See Tcl Bug a16752c252.
|
||||
* However, this buggy behavior is kept under particular
|
||||
* circumstances to accommodate deployed binaries of the
|
||||
* "tclcompiler" program. http://sourceforge.net/projects/tclpro/
|
||||
* that crash if the bug is fixed.
|
||||
* However, this buggy behavior is kept under particular circumstances
|
||||
* to accommodate deployed binaries of the "tclcompiler" program
|
||||
* <http://sourceforge.net/projects/tclpro/> that crash if the bug is
|
||||
* fixed.
|
||||
*/
|
||||
|
||||
if (cmdPtr->objProc == TclInvokeStringCommand
|
||||
@@ -2343,7 +2364,10 @@ TclCreateObjCommandInNs (
|
||||
cmdPtr->flags |= CMD_REDEF_IN_PROGRESS;
|
||||
}
|
||||
|
||||
/* Make sure namespace doesn't get deallocated. */
|
||||
/*
|
||||
* Make sure namespace doesn't get deallocated.
|
||||
*/
|
||||
|
||||
cmdPtr->nsPtr->refCount++;
|
||||
|
||||
Tcl_DeleteCommandFromToken(interp, (Tcl_Command) cmdPtr);
|
||||
@@ -4301,15 +4325,22 @@ EvalObjvCore(
|
||||
reresolve:
|
||||
assert(cmdPtr == NULL);
|
||||
if (preCmdPtr) {
|
||||
/* Caller gave it to us */
|
||||
/*
|
||||
* Caller gave it to us.
|
||||
*/
|
||||
|
||||
if (!(preCmdPtr->flags & CMD_IS_DELETED)) {
|
||||
/* So long as it exists, use it. */
|
||||
/*
|
||||
* So long as it exists, use it.
|
||||
*/
|
||||
|
||||
cmdPtr = preCmdPtr;
|
||||
} else if (flags & TCL_EVAL_NORESOLVE) {
|
||||
/*
|
||||
* When it's been deleted, and we're told not to attempt
|
||||
* resolving it ourselves, all we can do is raise an error.
|
||||
* When it's been deleted, and we're told not to attempt resolving
|
||||
* it ourselves, all we can do is raise an error.
|
||||
*/
|
||||
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"attempt to invoke a deleted command"));
|
||||
Tcl_SetErrorCode(interp, "TCL", "EVAL", "DELETEDCOMMAND", NULL);
|
||||
@@ -4325,14 +4356,12 @@ EvalObjvCore(
|
||||
|
||||
if (enterTracesDone || iPtr->tracePtr
|
||||
|| (cmdPtr->flags & CMD_HAS_EXEC_TRACES)) {
|
||||
|
||||
Tcl_Obj *commandPtr = TclGetSourceFromFrame(
|
||||
flags & TCL_EVAL_SOURCE_IN_FRAME ? iPtr->cmdFramePtr : NULL,
|
||||
objc, objv);
|
||||
|
||||
Tcl_IncrRefCount(commandPtr);
|
||||
|
||||
if (!enterTracesDone) {
|
||||
|
||||
int code = TEOV_RunEnterTraces(interp, &cmdPtr, commandPtr,
|
||||
objc, objv);
|
||||
|
||||
@@ -4340,10 +4369,10 @@ EvalObjvCore(
|
||||
* Send any exception from enter traces back as an exception
|
||||
* raised by the traced command.
|
||||
* TODO: Is this a bug? Letting an execution trace BREAK or
|
||||
* CONTINUE or RETURN in the place of the traced command?
|
||||
* Would either converting all exceptions to TCL_ERROR, or
|
||||
* just swallowing them be better? (Swallowing them has the
|
||||
* problem of permanently hiding program errors.)
|
||||
* CONTINUE or RETURN in the place of the traced command? Would
|
||||
* either converting all exceptions to TCL_ERROR, or just
|
||||
* swallowing them be better? (Swallowing them has the problem of
|
||||
* permanently hiding program errors.)
|
||||
*/
|
||||
|
||||
if (code != TCL_OK) {
|
||||
@@ -4352,9 +4381,8 @@ EvalObjvCore(
|
||||
}
|
||||
|
||||
/*
|
||||
* If the enter traces made the resolved cmdPtr unusable, go
|
||||
* back and resolve again, but next time don't run enter
|
||||
* traces again.
|
||||
* If the enter traces made the resolved cmdPtr unusable, go back
|
||||
* and resolve again, but next time don't run enter traces again.
|
||||
*/
|
||||
|
||||
if (cmdPtr == NULL) {
|
||||
@@ -4365,9 +4393,9 @@ EvalObjvCore(
|
||||
}
|
||||
|
||||
/*
|
||||
* Schedule leave traces. Raise the refCount on the resolved
|
||||
* cmdPtr, so that when it passes to the leave traces we know
|
||||
* it's still valid.
|
||||
* Schedule leave traces. Raise the refCount on the resolved cmdPtr,
|
||||
* so that when it passes to the leave traces we know it's still
|
||||
* valid.
|
||||
*/
|
||||
|
||||
cmdPtr->refCount++;
|
||||
@@ -4435,8 +4463,6 @@ TclNRRunCallbacks(
|
||||
* are to be run. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
NRE_callback *callbackPtr;
|
||||
Tcl_NRPostProc *procPtr;
|
||||
|
||||
/*
|
||||
* If the interpreter has a non-empty string result, the result object is
|
||||
@@ -4452,11 +4478,14 @@ TclNRRunCallbacks(
|
||||
(void) Tcl_GetObjResult(interp);
|
||||
}
|
||||
|
||||
/* This is the trampoline. */
|
||||
/*
|
||||
* This is the trampoline.
|
||||
*/
|
||||
|
||||
while (TOP_CB(interp) != rootPtr) {
|
||||
callbackPtr = TOP_CB(interp);
|
||||
procPtr = callbackPtr->procPtr;
|
||||
NRE_callback *callbackPtr = TOP_CB(interp);
|
||||
Tcl_NRPostProc *procPtr = callbackPtr->procPtr;
|
||||
|
||||
TOP_CB(interp) = callbackPtr->nextPtr;
|
||||
result = procPtr(callbackPtr->data, interp, result);
|
||||
TCLNR_FREE(interp, callbackPtr);
|
||||
@@ -6662,14 +6691,17 @@ TclNRInvoke(
|
||||
}
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
/* Avoid the exception-handling brain damage when numLevels == 0 . */
|
||||
/*
|
||||
* Avoid the exception-handling brain damage when numLevels == 0
|
||||
*/
|
||||
|
||||
iPtr->numLevels++;
|
||||
Tcl_NRAddCallback(interp, NRPostInvoke, NULL, NULL, NULL, NULL);
|
||||
|
||||
/*
|
||||
* Normal command resolution of objv[0] isn't going to find cmdPtr.
|
||||
* That's the whole point of **hidden** commands. So tell the
|
||||
* Eval core machinery not to even try (and risk finding something wrong).
|
||||
* That's the whole point of **hidden** commands. So tell the Eval core
|
||||
* machinery not to even try (and risk finding something wrong).
|
||||
*/
|
||||
|
||||
return TclNREvalObjv(interp, objc, objv, TCL_EVAL_NORESOLVE, cmdPtr);
|
||||
@@ -7238,7 +7270,7 @@ ExprIsqrtFunc(
|
||||
if (Tcl_GetBignumFromObj(interp, objv[1], &big) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (SIGN(&big) == MP_NEG) {
|
||||
if (big.sign) {
|
||||
mp_clear(&big);
|
||||
goto negarg;
|
||||
}
|
||||
@@ -7735,7 +7767,7 @@ ExprRandFunc(
|
||||
iPtr->flags |= RAND_SEED_INITIALIZED;
|
||||
|
||||
/*
|
||||
* To ensure different seeds in different threads (bug #416643),
|
||||
* To ensure different seeds in different threads (bug #416643),
|
||||
* take into consideration the thread this interp is running in.
|
||||
*/
|
||||
|
||||
@@ -8051,13 +8083,21 @@ TclDTraceInfo(
|
||||
Tcl_DictObjGet(NULL, info, *k++, &val);
|
||||
args[i] = val ? TclGetString(val) : NULL;
|
||||
}
|
||||
/* no "proc" -> use "lambda" */
|
||||
|
||||
/*
|
||||
* no "proc" -> use "lambda"
|
||||
*/
|
||||
|
||||
if (!args[2]) {
|
||||
Tcl_DictObjGet(NULL, info, *k, &val);
|
||||
args[2] = val ? TclGetString(val) : NULL;
|
||||
}
|
||||
k++;
|
||||
/* no "class" -> use "object" */
|
||||
|
||||
/*
|
||||
* no "class" -> use "object"
|
||||
*/
|
||||
|
||||
if (!args[5]) {
|
||||
Tcl_DictObjGet(NULL, info, *k, &val);
|
||||
args[5] = val ? TclGetString(val) : NULL;
|
||||
@@ -8410,8 +8450,10 @@ TclNRTailcallObjCmd(
|
||||
Tcl_Obj *listPtr, *nsObjPtr;
|
||||
Tcl_Namespace *nsPtr = (Tcl_Namespace *) iPtr->varFramePtr->nsPtr;
|
||||
|
||||
/* The tailcall data is in a Tcl list: the first element is the
|
||||
* namespace, the rest the command to be tailcalled. */
|
||||
/*
|
||||
* The tailcall data is in a Tcl list: the first element is the
|
||||
* namespace, the rest the command to be tailcalled.
|
||||
*/
|
||||
|
||||
nsObjPtr = Tcl_NewStringObj(nsPtr->fullName, -1);
|
||||
listPtr = Tcl_NewListObj(objc, objv);
|
||||
@@ -8861,6 +8903,75 @@ TclNREvalList(
|
||||
return TclNREvalObjv(interp, objc, objv, 0, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* CoroTypeObjCmd --
|
||||
*
|
||||
* Implementation of [::tcl::unsupported::corotype] command.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
CoroTypeObjCmd(
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
Command *cmdPtr;
|
||||
CoroutineData *corPtr;
|
||||
|
||||
if (objc != 2) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "coroName");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Look up the coroutine.
|
||||
*/
|
||||
|
||||
cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[1]);
|
||||
if ((!cmdPtr) || (cmdPtr->nreProc != TclNRInterpCoroutine)) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"can only get coroutine type of a coroutine", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "COROUTINE",
|
||||
TclGetString(objv[1]), NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* An active coroutine is "active". Can't tell what it might do in the
|
||||
* future.
|
||||
*/
|
||||
|
||||
corPtr = cmdPtr->objClientData;
|
||||
if (!COR_IS_SUSPENDED(corPtr)) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj("active", -1));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Inactive coroutines are classified by the (effective) command used to
|
||||
* suspend them, which matters when you're injecting a probe.
|
||||
*/
|
||||
|
||||
switch (corPtr->nargs) {
|
||||
case COROUTINE_ARGUMENTS_SINGLE_OPTIONAL:
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj("yield", -1));
|
||||
return TCL_OK;
|
||||
case COROUTINE_ARGUMENTS_ARBITRARY:
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj("yieldto", -1));
|
||||
return TCL_OK;
|
||||
default:
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"unknown coroutine type", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "COROUTINE", "BAD_TYPE", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -9094,9 +9205,12 @@ TclNRCoroutineObjCmd(
|
||||
TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
/* ensure that the command is looked up in the correct namespace */
|
||||
/*
|
||||
* Ensure that the command is looked up in the correct namespace.
|
||||
*/
|
||||
|
||||
iPtr->lookupNsPtr = lookupNsPtr;
|
||||
Tcl_NREvalObj(interp, Tcl_NewListObj(objc-2, objv+2), 0);
|
||||
Tcl_NREvalObj(interp, Tcl_NewListObj(objc - 2, objv + 2), 0);
|
||||
iPtr->numLevels--;
|
||||
|
||||
SAVE_CONTEXT(corPtr->running);
|
||||
|
||||
+94
-67
@@ -318,10 +318,10 @@ Tcl_DbNewByteArrayObj(
|
||||
void
|
||||
Tcl_SetByteArrayObj(
|
||||
Tcl_Obj *objPtr, /* Object to initialize as a ByteArray. */
|
||||
const unsigned char *bytes, /* The array of bytes to use as the new
|
||||
value. May be NULL even if length > 0. */
|
||||
const unsigned char *bytes, /* The array of bytes to use as the new value.
|
||||
* May be NULL even if length > 0. */
|
||||
int length) /* Length of the array of bytes, which must
|
||||
be >= 0. */
|
||||
* be >= 0. */
|
||||
{
|
||||
ByteArray *byteArrayPtr;
|
||||
|
||||
@@ -639,7 +639,10 @@ TclAppendBytesToByteArray(
|
||||
"TclAppendBytesToByteArray");
|
||||
}
|
||||
if (len == 0) {
|
||||
/* Append zero bytes is a no-op. */
|
||||
/*
|
||||
* Append zero bytes is a no-op.
|
||||
*/
|
||||
|
||||
return;
|
||||
}
|
||||
if (objPtr->typePtr != &tclByteArrayType) {
|
||||
@@ -661,12 +664,18 @@ TclAppendBytesToByteArray(
|
||||
int attempt;
|
||||
|
||||
if (needed <= INT_MAX/2) {
|
||||
/* Try to allocate double the total space that is needed. */
|
||||
/*
|
||||
* Try to allocate double the total space that is needed.
|
||||
*/
|
||||
|
||||
attempt = 2 * needed;
|
||||
ptr = attemptckrealloc(byteArrayPtr, BYTEARRAY_SIZE(attempt));
|
||||
}
|
||||
if (ptr == NULL) {
|
||||
/* Try to allocate double the increment that is needed (plus). */
|
||||
/*
|
||||
* Try to allocate double the increment that is needed (plus).
|
||||
*/
|
||||
|
||||
unsigned int limit = INT_MAX - needed;
|
||||
unsigned int extra = len + TCL_MIN_GROWTH;
|
||||
int growth = (int) ((extra > limit) ? limit : extra);
|
||||
@@ -675,7 +684,10 @@ TclAppendBytesToByteArray(
|
||||
ptr = attemptckrealloc(byteArrayPtr, BYTEARRAY_SIZE(attempt));
|
||||
}
|
||||
if (ptr == NULL) {
|
||||
/* Last chance: Try to allocate exactly what is needed. */
|
||||
/*
|
||||
* Last chance: Try to allocate exactly what is needed.
|
||||
*/
|
||||
|
||||
attempt = needed;
|
||||
ptr = ckrealloc(byteArrayPtr, BYTEARRAY_SIZE(attempt));
|
||||
}
|
||||
@@ -750,7 +762,7 @@ BinaryFormatCmd(
|
||||
int count; /* Count associated with current format
|
||||
* character. */
|
||||
int flags; /* Format field flags */
|
||||
const char *format; /* Pointer to current position in format
|
||||
const char *format; /* Pointer to current position in format
|
||||
* string. */
|
||||
Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */
|
||||
unsigned char *buffer; /* Start of result buffer. */
|
||||
@@ -936,9 +948,9 @@ BinaryFormatCmd(
|
||||
memset(buffer, 0, (size_t) length);
|
||||
|
||||
/*
|
||||
* Pack the data into the result object. Note that we can skip the
|
||||
* error checking during this pass, since we have already parsed the
|
||||
* string once.
|
||||
* Pack the data into the result object. Note that we can skip the error
|
||||
* checking during this pass, since we have already parsed the string
|
||||
* once.
|
||||
*/
|
||||
|
||||
arg = 2;
|
||||
@@ -1151,7 +1163,7 @@ BinaryFormatCmd(
|
||||
}
|
||||
arg++;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (FormatNumber(interp, cmd, listv[i], &cursor)!=TCL_OK) {
|
||||
if (FormatNumber(interp, cmd, listv[i], &cursor) != TCL_OK) {
|
||||
Tcl_DecrRefCount(resultPtr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -1211,7 +1223,7 @@ BinaryFormatCmd(
|
||||
badField:
|
||||
{
|
||||
Tcl_UniChar ch = 0;
|
||||
char buf[TCL_UTF_MAX + 1];
|
||||
char buf[TCL_UTF_MAX + 1] = "";
|
||||
|
||||
TclUtfToUniChar(errorString, &ch);
|
||||
buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
|
||||
@@ -1255,7 +1267,7 @@ BinaryScanCmd(
|
||||
int count; /* Count associated with current format
|
||||
* character. */
|
||||
int flags; /* Format field flags */
|
||||
const char *format; /* Pointer to current position in format
|
||||
const char *format; /* Pointer to current position in format
|
||||
* string. */
|
||||
Tcl_Obj *resultPtr = NULL; /* Object holding result buffer. */
|
||||
unsigned char *buffer; /* Start of result buffer. */
|
||||
@@ -1314,7 +1326,7 @@ BinaryScanCmd(
|
||||
|
||||
if (cmd == 'A') {
|
||||
while (size > 0) {
|
||||
if (src[size-1] != '\0' && src[size-1] != ' ') {
|
||||
if (src[size - 1] != '\0' && src[size - 1] != ' ') {
|
||||
break;
|
||||
}
|
||||
size--;
|
||||
@@ -1581,7 +1593,7 @@ BinaryScanCmd(
|
||||
badField:
|
||||
{
|
||||
Tcl_UniChar ch = 0;
|
||||
char buf[TCL_UTF_MAX + 1];
|
||||
char buf[TCL_UTF_MAX + 1] = "";
|
||||
|
||||
TclUtfToUniChar(errorString, &ch);
|
||||
buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
|
||||
@@ -1920,7 +1932,7 @@ FormatNumber(
|
||||
* valid range for float.
|
||||
*/
|
||||
|
||||
if (fabs(dvalue) > (double)FLT_MAX) {
|
||||
if (fabs(dvalue) > (double) FLT_MAX) {
|
||||
fvalue = (dvalue >= 0.0) ? FLT_MAX : -FLT_MAX;
|
||||
} else {
|
||||
fvalue = (float) dvalue;
|
||||
@@ -2041,9 +2053,9 @@ ScanNumber(
|
||||
int type, /* Format character from "binary scan" */
|
||||
int flags, /* Format field flags */
|
||||
Tcl_HashTable **numberCachePtrPtr)
|
||||
/* Place to look for cache of scanned
|
||||
* value objects, or NULL if too many
|
||||
* different numbers have been scanned. */
|
||||
/* Place to look for cache of scanned value
|
||||
* objects, or NULL if too many different
|
||||
* numbers have been scanned. */
|
||||
{
|
||||
long value;
|
||||
float fvalue;
|
||||
@@ -2117,6 +2129,7 @@ ScanNumber(
|
||||
/*
|
||||
* Check to see if the value was sign extended properly on systems
|
||||
* where an int is more than 32-bits.
|
||||
*
|
||||
* We avoid caching unsigned integers as we cannot distinguish between
|
||||
* 32bit signed and unsigned in the hash (short and char are ok).
|
||||
*/
|
||||
@@ -2124,9 +2137,9 @@ ScanNumber(
|
||||
if (flags & BINARY_UNSIGNED) {
|
||||
return Tcl_NewWideIntObj((Tcl_WideInt)(unsigned long)value);
|
||||
}
|
||||
if ((value & (((unsigned) 1)<<31)) && (value > 0)) {
|
||||
value -= (((unsigned) 1)<<31);
|
||||
value -= (((unsigned) 1)<<31);
|
||||
if ((value & (((unsigned) 1) << 31)) && (value > 0)) {
|
||||
value -= (((unsigned) 1) << 31);
|
||||
value -= (((unsigned) 1) << 31);
|
||||
}
|
||||
|
||||
returnNumericObject:
|
||||
@@ -2326,8 +2339,8 @@ BinaryEncodeHex(
|
||||
data = Tcl_GetByteArrayFromObj(objv[1], &count);
|
||||
cursor = Tcl_SetByteArrayLength(resultObj, count * 2);
|
||||
for (offset = 0; offset < count; ++offset) {
|
||||
*cursor++ = HexDigits[((data[offset] >> 4) & 0x0f)];
|
||||
*cursor++ = HexDigits[(data[offset] & 0x0f)];
|
||||
*cursor++ = HexDigits[(data[offset] >> 4) & 0x0f];
|
||||
*cursor++ = HexDigits[data[offset] & 0x0f];
|
||||
}
|
||||
Tcl_SetObjResult(interp, resultObj);
|
||||
return TCL_OK;
|
||||
@@ -2367,7 +2380,7 @@ BinaryDecodeHex(
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?options? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; ++i) {
|
||||
for (i = 1; i < objc - 1; ++i) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
@@ -2381,13 +2394,13 @@ BinaryDecodeHex(
|
||||
|
||||
TclNewObj(resultObj);
|
||||
datastart = data = (unsigned char *)
|
||||
TclGetStringFromObj(objv[objc-1], &count);
|
||||
TclGetStringFromObj(objv[objc - 1], &count);
|
||||
dataend = data + count;
|
||||
size = (count + 1) / 2;
|
||||
begin = cursor = Tcl_SetByteArrayLength(resultObj, size);
|
||||
while (data < dataend) {
|
||||
value = 0;
|
||||
for (i=0 ; i<2 ; i++) {
|
||||
for (i = 0 ; i < 2 ; i++) {
|
||||
if (data >= dataend) {
|
||||
value <<= 4;
|
||||
break;
|
||||
@@ -2395,7 +2408,7 @@ BinaryDecodeHex(
|
||||
|
||||
c = *data++;
|
||||
if (!isxdigit((int) c)) {
|
||||
if (strict || !isspace(c)) {
|
||||
if (strict || !TclIsSpaceProc(c)) {
|
||||
goto badChar;
|
||||
}
|
||||
i--;
|
||||
@@ -2410,7 +2423,7 @@ BinaryDecodeHex(
|
||||
if (c > 16) {
|
||||
c += ('A' - 'a');
|
||||
}
|
||||
value |= (c & 0xf);
|
||||
value |= c & 0xf;
|
||||
}
|
||||
if (i < 2) {
|
||||
cut++;
|
||||
@@ -2481,22 +2494,22 @@ BinaryEncode64(
|
||||
const char *wrapchar = "\n";
|
||||
int wrapcharlen = 1;
|
||||
int offset, i, index, size, outindex = 0, count = 0;
|
||||
enum {OPT_MAXLEN, OPT_WRAPCHAR };
|
||||
enum { OPT_MAXLEN, OPT_WRAPCHAR };
|
||||
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
|
||||
|
||||
if (objc < 2 || objc%2 != 0) {
|
||||
if (objc < 2 || objc % 2 != 0) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"?-maxlen len? ?-wrapchar char? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; i += 2) {
|
||||
for (i = 1; i < objc - 1; i += 2) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
switch (index) {
|
||||
case OPT_MAXLEN:
|
||||
if (Tcl_GetIntFromObj(interp, objv[i+1], &maxlen) != TCL_OK) {
|
||||
if (Tcl_GetIntFromObj(interp, objv[i + 1], &maxlen) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (maxlen < 0) {
|
||||
@@ -2508,7 +2521,7 @@ BinaryEncode64(
|
||||
}
|
||||
break;
|
||||
case OPT_WRAPCHAR:
|
||||
wrapchar = Tcl_GetStringFromObj(objv[i+1], &wrapcharlen);
|
||||
wrapchar = Tcl_GetStringFromObj(objv[i + 1], &wrapcharlen);
|
||||
if (wrapcharlen == 0) {
|
||||
maxlen = 0;
|
||||
}
|
||||
@@ -2517,9 +2530,9 @@ BinaryEncode64(
|
||||
}
|
||||
|
||||
resultObj = Tcl_NewObj();
|
||||
data = Tcl_GetByteArrayFromObj(objv[objc-1], &count);
|
||||
data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count);
|
||||
if (count > 0) {
|
||||
size = (((count * 4) / 3) + 3) & ~3; /* ensure 4 byte chunks */
|
||||
size = (((count * 4) / 3) + 3) & ~3; /* ensure 4 byte chunks */
|
||||
if (maxlen > 0 && size > maxlen) {
|
||||
int adjusted = size + (wrapcharlen * (size / maxlen));
|
||||
|
||||
@@ -2530,15 +2543,15 @@ BinaryEncode64(
|
||||
}
|
||||
cursor = Tcl_SetByteArrayLength(resultObj, size);
|
||||
limit = cursor + size;
|
||||
for (offset = 0; offset < count; offset+=3) {
|
||||
for (offset = 0; offset < count; offset += 3) {
|
||||
unsigned char d[3] = {0, 0, 0};
|
||||
|
||||
for (i = 0; i < 3 && offset+i < count; ++i) {
|
||||
for (i = 0; i < 3 && offset + i < count; ++i) {
|
||||
d[i] = data[offset + i];
|
||||
}
|
||||
OUTPUT(B64Digits[d[0] >> 2]);
|
||||
OUTPUT(B64Digits[((d[0] & 0x03) << 4) | (d[1] >> 4)]);
|
||||
if (offset+1 < count) {
|
||||
if (offset + 1 < count) {
|
||||
OUTPUT(B64Digits[((d[1] & 0x0f) << 2) | (d[2] >> 6)]);
|
||||
} else {
|
||||
OUTPUT(B64Digits[64]);
|
||||
@@ -2591,19 +2604,20 @@ BinaryEncodeUu(
|
||||
enum { OPT_MAXLEN, OPT_WRAPCHAR };
|
||||
static const char *const optStrings[] = { "-maxlen", "-wrapchar", NULL };
|
||||
|
||||
if (objc < 2 || objc%2 != 0) {
|
||||
if (objc < 2 || objc % 2 != 0) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"?-maxlen len? ?-wrapchar char? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; i += 2) {
|
||||
for (i = 1; i < objc - 1; i += 2) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
switch (index) {
|
||||
case OPT_MAXLEN:
|
||||
if (Tcl_GetIntFromObj(interp, objv[i+1], &lineLength) != TCL_OK) {
|
||||
if (Tcl_GetIntFromObj(interp, objv[i + 1],
|
||||
&lineLength) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (lineLength < 3 || lineLength > 85) {
|
||||
@@ -2615,7 +2629,7 @@ BinaryEncodeUu(
|
||||
}
|
||||
break;
|
||||
case OPT_WRAPCHAR:
|
||||
wrapchar = Tcl_GetByteArrayFromObj(objv[i+1], &wrapcharlen);
|
||||
wrapchar = Tcl_GetByteArrayFromObj(objv[i + 1], &wrapcharlen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2627,7 +2641,7 @@ BinaryEncodeUu(
|
||||
|
||||
resultObj = Tcl_NewObj();
|
||||
offset = 0;
|
||||
data = Tcl_GetByteArrayFromObj(objv[objc-1], &count);
|
||||
data = Tcl_GetByteArrayFromObj(objv[objc - 1], &count);
|
||||
rawLength = (lineLength - 1) * 3 / 4;
|
||||
start = cursor = Tcl_SetByteArrayLength(resultObj,
|
||||
(lineLength + wrapcharlen) *
|
||||
@@ -2648,11 +2662,11 @@ BinaryEncodeUu(
|
||||
lineLen = rawLength;
|
||||
}
|
||||
*cursor++ = UueDigits[lineLen];
|
||||
for (i=0 ; i<lineLen ; i++) {
|
||||
for (i = 0 ; i < lineLen ; i++) {
|
||||
n <<= 8;
|
||||
n |= data[offset++];
|
||||
for (bits += 8; bits > 6 ; bits -= 6) {
|
||||
*cursor++ = UueDigits[(n >> (bits-6)) & 0x3f];
|
||||
*cursor++ = UueDigits[(n >> (bits - 6)) & 0x3f];
|
||||
}
|
||||
}
|
||||
if (bits > 0) {
|
||||
@@ -2660,7 +2674,7 @@ BinaryEncodeUu(
|
||||
*cursor++ = UueDigits[(n >> (bits + 2)) & 0x3f];
|
||||
bits = 0;
|
||||
}
|
||||
for (j=0 ; j<wrapcharlen ; ++j) {
|
||||
for (j = 0 ; j < wrapcharlen ; ++j) {
|
||||
*cursor++ = wrapchar[j];
|
||||
}
|
||||
}
|
||||
@@ -2669,7 +2683,7 @@ BinaryEncodeUu(
|
||||
* Fix the length of the output bytearray.
|
||||
*/
|
||||
|
||||
Tcl_SetByteArrayLength(resultObj, cursor-start);
|
||||
Tcl_SetByteArrayLength(resultObj, cursor - start);
|
||||
Tcl_SetObjResult(interp, resultObj);
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -2702,14 +2716,14 @@ BinaryDecodeUu(
|
||||
unsigned char *begin, *cursor;
|
||||
int i, index, size, count = 0, strict = 0, lineLen;
|
||||
unsigned char c;
|
||||
enum {OPT_STRICT };
|
||||
enum { OPT_STRICT };
|
||||
static const char *const optStrings[] = { "-strict", NULL };
|
||||
|
||||
if (objc < 2 || objc > 3) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?options? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; ++i) {
|
||||
for (i = 1; i < objc - 1; ++i) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
@@ -2723,7 +2737,7 @@ BinaryDecodeUu(
|
||||
|
||||
TclNewObj(resultObj);
|
||||
datastart = data = (unsigned char *)
|
||||
TclGetStringFromObj(objv[objc-1], &count);
|
||||
TclGetStringFromObj(objv[objc - 1], &count);
|
||||
dataend = data + count;
|
||||
size = ((count + 3) & ~3) * 3 / 4;
|
||||
begin = cursor = Tcl_SetByteArrayLength(resultObj, size);
|
||||
@@ -2742,7 +2756,7 @@ BinaryDecodeUu(
|
||||
if (lineLen < 0) {
|
||||
c = *data++;
|
||||
if (c < 32 || c > 96) {
|
||||
if (strict || !isspace(c)) {
|
||||
if (strict || !TclIsSpaceProc(c)) {
|
||||
goto badUu;
|
||||
}
|
||||
i--;
|
||||
@@ -2755,12 +2769,12 @@ BinaryDecodeUu(
|
||||
* Now we read a four-character grouping.
|
||||
*/
|
||||
|
||||
for (i=0 ; i<4 ; i++) {
|
||||
for (i = 0 ; i < 4 ; i++) {
|
||||
if (data < dataend) {
|
||||
d[i] = c = *data++;
|
||||
if (c < 32 || c > 96) {
|
||||
if (strict) {
|
||||
if (!isspace(c)) {
|
||||
if (!TclIsSpaceProc(c)) {
|
||||
goto badUu;
|
||||
} else if (c == '\n') {
|
||||
goto shortUu;
|
||||
@@ -2804,7 +2818,7 @@ BinaryDecodeUu(
|
||||
} else if (c >= 32 && c <= 96) {
|
||||
data--;
|
||||
break;
|
||||
} else if (strict || !isspace(c)) {
|
||||
} else if (strict || !TclIsSpaceProc(c)) {
|
||||
goto badUu;
|
||||
}
|
||||
} while (data < dataend);
|
||||
@@ -2873,7 +2887,7 @@ BinaryDecode64(
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?options? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
for (i = 1; i < objc-1; ++i) {
|
||||
for (i = 1; i < objc - 1; ++i) {
|
||||
if (Tcl_GetIndexFromObj(interp, objv[i], optStrings, "option",
|
||||
TCL_EXACT, &index) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
@@ -2887,7 +2901,7 @@ BinaryDecode64(
|
||||
|
||||
TclNewObj(resultObj);
|
||||
datastart = data = (unsigned char *)
|
||||
TclGetStringFromObj(objv[objc-1], &count);
|
||||
TclGetStringFromObj(objv[objc - 1], &count);
|
||||
dataend = data + count;
|
||||
size = ((count + 3) & ~3) * 3 / 4;
|
||||
begin = cursor = Tcl_SetByteArrayLength(resultObj, size);
|
||||
@@ -2914,6 +2928,14 @@ BinaryDecode64(
|
||||
} else if (i > 1) {
|
||||
c = '=';
|
||||
} else {
|
||||
if (strict && i <= 1) {
|
||||
/*
|
||||
* Single resp. unfulfilled char (each 4th next single
|
||||
* char) is rather bad64 error case in strict mode.
|
||||
*/
|
||||
|
||||
goto bad64;
|
||||
}
|
||||
cut += 3;
|
||||
break;
|
||||
}
|
||||
@@ -2927,10 +2949,10 @@ BinaryDecode64(
|
||||
|
||||
if (cut) {
|
||||
if (c == '=' && i > 1) {
|
||||
value <<= 6;
|
||||
cut++;
|
||||
} else if (!strict && isspace(c)) {
|
||||
i--;
|
||||
value <<= 6;
|
||||
cut++;
|
||||
} else if (!strict && TclIsSpaceProc(c)) {
|
||||
i--;
|
||||
} else {
|
||||
goto bad64;
|
||||
}
|
||||
@@ -2944,10 +2966,16 @@ BinaryDecode64(
|
||||
value = (value << 6) | 0x3e;
|
||||
} else if (c == '/') {
|
||||
value = (value << 6) | 0x3f;
|
||||
} else if (c == '=') {
|
||||
} else if (c == '=' && (!strict || i > 1)) {
|
||||
/*
|
||||
* "=" and "a=" is rather bad64 error case in strict mode.
|
||||
*/
|
||||
|
||||
value <<= 6;
|
||||
cut++;
|
||||
} else if (strict || !isspace(c)) {
|
||||
if (i) {
|
||||
cut++;
|
||||
}
|
||||
} else if (strict || !TclIsSpaceProc(c)) {
|
||||
goto bad64;
|
||||
} else {
|
||||
i--;
|
||||
@@ -2968,7 +2996,7 @@ BinaryDecode64(
|
||||
goto bad64;
|
||||
}
|
||||
for (; data < dataend; data++) {
|
||||
if (!isspace(*data)) {
|
||||
if (!TclIsSpaceProc(*data)) {
|
||||
goto bad64;
|
||||
}
|
||||
}
|
||||
@@ -2993,4 +3021,3 @@ BinaryDecode64(
|
||||
* fill-column: 78
|
||||
* End:
|
||||
*/
|
||||
|
||||
|
||||
+2
-7
@@ -1772,8 +1772,7 @@ ClockClicksObjCmd(
|
||||
#endif
|
||||
break;
|
||||
case CLICKS_MICROS:
|
||||
Tcl_GetTime(&now);
|
||||
clicks = ((Tcl_WideInt) now.sec * 1000000) + now.usec;
|
||||
clicks = TclpGetMicroseconds();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1843,15 +1842,11 @@ ClockMicrosecondsObjCmd(
|
||||
int objc, /* Parameter count */
|
||||
Tcl_Obj *const *objv) /* Parameter values */
|
||||
{
|
||||
Tcl_Time now;
|
||||
|
||||
if (objc != 1) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_GetTime(&now);
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
|
||||
((Tcl_WideInt) now.sec * 1000000) + now.usec));
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetMicroseconds()));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
+14
-19
@@ -1383,7 +1383,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])));
|
||||
@@ -1392,19 +1392,14 @@ FileAttrAccessTimeCmd(
|
||||
#endif
|
||||
|
||||
if (objc == 3) {
|
||||
/*
|
||||
* Need separate variable for reading longs from an object on 64-bit
|
||||
* platforms. [Bug 698146]
|
||||
*/
|
||||
Tcl_WideInt newTime;
|
||||
|
||||
long newTime;
|
||||
|
||||
if (TclGetLongFromObj(interp, objv[2], &newTime) != TCL_OK) {
|
||||
if (Tcl_GetWideIntFromObj(interp, objv[2], &newTime) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
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(
|
||||
@@ -1424,7 +1419,7 @@ FileAttrAccessTimeCmd(
|
||||
}
|
||||
}
|
||||
|
||||
Tcl_SetObjResult(interp, Tcl_NewLongObj((long) buf.st_atime));
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(&buf)));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -1465,7 +1460,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])));
|
||||
@@ -1478,13 +1473,13 @@ FileAttrModifyTimeCmd(
|
||||
* platforms. [Bug 698146]
|
||||
*/
|
||||
|
||||
long newTime;
|
||||
Tcl_WideInt newTime;
|
||||
|
||||
if (TclGetLongFromObj(interp, objv[2], &newTime) != TCL_OK) {
|
||||
if (Tcl_GetWideIntFromObj(interp, objv[2], &newTime) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
tval.actime = buf.st_atime;
|
||||
tval.actime = Tcl_GetAccessTimeFromStat(&buf);
|
||||
tval.modtime = newTime;
|
||||
|
||||
if (Tcl_FSUtime(objv[1], &tval) != 0) {
|
||||
@@ -1504,7 +1499,7 @@ FileAttrModifyTimeCmd(
|
||||
}
|
||||
}
|
||||
|
||||
Tcl_SetObjResult(interp, Tcl_NewLongObj((long) buf.st_mtime));
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(&buf)));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -2127,7 +2122,7 @@ PathJoinCmd(
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "name ?name ...?");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetObjResult(interp, TclJoinPath(objc - 1, objv + 1));
|
||||
Tcl_SetObjResult(interp, TclJoinPath(objc - 1, objv + 1, 0));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -2535,9 +2530,9 @@ StoreStatData(
|
||||
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
|
||||
STORE_ARY("blksize", Tcl_NewLongObj((long)statPtr->st_blksize));
|
||||
#endif
|
||||
STORE_ARY("atime", Tcl_NewLongObj((long)statPtr->st_atime));
|
||||
STORE_ARY("mtime", Tcl_NewLongObj((long)statPtr->st_mtime));
|
||||
STORE_ARY("ctime", Tcl_NewLongObj((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_NewIntObj(mode));
|
||||
STORE_ARY("type", Tcl_NewStringObj(GetTypeFromMode(mode), -1));
|
||||
|
||||
+2
-2
@@ -1960,7 +1960,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.
|
||||
*/
|
||||
@@ -3937,7 +3937,7 @@ Tcl_LsortObjCmd(
|
||||
/*
|
||||
* Do not shrink the actual memory block used; that doesn't
|
||||
* work with TclStackAlloc-allocated memory. [Bug 2918962]
|
||||
*
|
||||
*
|
||||
* TODO: Consider a pointer increment to replace this
|
||||
* array shift.
|
||||
*/
|
||||
|
||||
+738
-160
File diff suppressed because it is too large
Load Diff
+32
-28
@@ -3408,10 +3408,10 @@ TclPushVarName(
|
||||
int *isScalarPtr) /* Must not be NULL. */
|
||||
{
|
||||
register const char *p;
|
||||
const char *name, *elName;
|
||||
register int i, n;
|
||||
const char *last, *name, *elName;
|
||||
register int n;
|
||||
Tcl_Token *elemTokenPtr = NULL;
|
||||
int nameChars, elNameChars, simpleVarName, localIndex;
|
||||
int nameLen, elNameLen, simpleVarName, localIndex;
|
||||
int elemTokenCount = 0, allocedTokens = 0, removedParen = 0;
|
||||
|
||||
/*
|
||||
@@ -3424,7 +3424,7 @@ TclPushVarName(
|
||||
|
||||
simpleVarName = 0;
|
||||
name = elName = NULL;
|
||||
nameChars = elNameChars = 0;
|
||||
nameLen = elNameLen = 0;
|
||||
localIndex = -1;
|
||||
|
||||
if (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
|
||||
@@ -3436,22 +3436,25 @@ TclPushVarName(
|
||||
simpleVarName = 1;
|
||||
|
||||
name = varTokenPtr[1].start;
|
||||
nameChars = varTokenPtr[1].size;
|
||||
if (name[nameChars-1] == ')') {
|
||||
nameLen = varTokenPtr[1].size;
|
||||
if (name[nameLen-1] == ')') {
|
||||
/*
|
||||
* last char is ')' => potential array reference.
|
||||
*/
|
||||
last = Tcl_UtfPrev(name + nameLen, name);
|
||||
|
||||
for (i=0,p=name ; i<nameChars ; i++,p++) {
|
||||
if (*p == '(') {
|
||||
elName = p + 1;
|
||||
elNameChars = nameChars - i - 2;
|
||||
nameChars = i;
|
||||
break;
|
||||
if (*last == ')') {
|
||||
for (p = name; p < last; p = Tcl_UtfNext(p)) {
|
||||
if (*p == '(') {
|
||||
elName = p + 1;
|
||||
elNameLen = last - elName;
|
||||
nameLen = p - name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!(flags & TCL_NO_ELEMENT) && (elName != NULL) && elNameChars) {
|
||||
if (!(flags & TCL_NO_ELEMENT) && elNameLen) {
|
||||
/*
|
||||
* An array element, the element name is a simple string:
|
||||
* assemble the corresponding token.
|
||||
@@ -3461,7 +3464,7 @@ TclPushVarName(
|
||||
allocedTokens = 1;
|
||||
elemTokenPtr->type = TCL_TOKEN_TEXT;
|
||||
elemTokenPtr->start = elName;
|
||||
elemTokenPtr->size = elNameChars;
|
||||
elemTokenPtr->size = elNameLen;
|
||||
elemTokenPtr->numComponents = 0;
|
||||
elemTokenCount = 1;
|
||||
}
|
||||
@@ -3469,21 +3472,22 @@ TclPushVarName(
|
||||
} else if (interp && ((n = varTokenPtr->numComponents) > 1)
|
||||
&& (varTokenPtr[1].type == TCL_TOKEN_TEXT)
|
||||
&& (varTokenPtr[n].type == TCL_TOKEN_TEXT)
|
||||
&& (varTokenPtr[n].start[varTokenPtr[n].size - 1] == ')')) {
|
||||
&& (*((p = varTokenPtr[n].start + varTokenPtr[n].size)-1) == ')')
|
||||
&& (*Tcl_UtfPrev(p, varTokenPtr[n].start) == ')')) {
|
||||
/*
|
||||
* Check for parentheses inside first token.
|
||||
*/
|
||||
|
||||
simpleVarName = 0;
|
||||
for (i = 0, p = varTokenPtr[1].start;
|
||||
i < varTokenPtr[1].size; i++, p++) {
|
||||
for (p = varTokenPtr[1].start,
|
||||
last = p + varTokenPtr[1].size; p < last; p = Tcl_UtfNext(p)) {
|
||||
if (*p == '(') {
|
||||
simpleVarName = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (simpleVarName) {
|
||||
int remainingChars;
|
||||
int remainingLen;
|
||||
|
||||
/*
|
||||
* Check the last token: if it is just ')', do not count it.
|
||||
@@ -3499,13 +3503,13 @@ TclPushVarName(
|
||||
}
|
||||
|
||||
name = varTokenPtr[1].start;
|
||||
nameChars = p - varTokenPtr[1].start;
|
||||
nameLen = p - varTokenPtr[1].start;
|
||||
elName = p + 1;
|
||||
remainingChars = (varTokenPtr[2].start - p) - 1;
|
||||
elNameChars = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 1;
|
||||
remainingLen = (varTokenPtr[2].start - p) - 1;
|
||||
elNameLen = (varTokenPtr[n].start-p) + varTokenPtr[n].size - 1;
|
||||
|
||||
if (!(flags & TCL_NO_ELEMENT)) {
|
||||
if (remainingChars) {
|
||||
if (remainingLen) {
|
||||
/*
|
||||
* Make a first token with the extra characters in the first
|
||||
* token.
|
||||
@@ -3515,7 +3519,7 @@ TclPushVarName(
|
||||
allocedTokens = 1;
|
||||
elemTokenPtr->type = TCL_TOKEN_TEXT;
|
||||
elemTokenPtr->start = elName;
|
||||
elemTokenPtr->size = remainingChars;
|
||||
elemTokenPtr->size = remainingLen;
|
||||
elemTokenPtr->numComponents = 0;
|
||||
elemTokenCount = n;
|
||||
|
||||
@@ -3544,8 +3548,8 @@ TclPushVarName(
|
||||
|
||||
int hasNsQualifiers = 0;
|
||||
|
||||
for (i = 0, p = name; i < nameChars; i++, p++) {
|
||||
if ((*p == ':') && ((i+1) < nameChars) && (*(p+1) == ':')) {
|
||||
for (p = name, last = p + nameLen-1; p < last; p = Tcl_UtfNext(p)) {
|
||||
if ((*p == ':') && (*(p+1) == ':')) {
|
||||
hasNsQualifiers = 1;
|
||||
break;
|
||||
}
|
||||
@@ -3558,7 +3562,7 @@ TclPushVarName(
|
||||
*/
|
||||
|
||||
if (!hasNsQualifiers) {
|
||||
localIndex = TclFindCompiledLocal(name, nameChars, 1, envPtr);
|
||||
localIndex = TclFindCompiledLocal(name, nameLen, 1, envPtr);
|
||||
if ((flags & TCL_NO_LARGE_INDEX) && (localIndex > 255)) {
|
||||
/*
|
||||
* We'll push the name.
|
||||
@@ -3568,7 +3572,7 @@ TclPushVarName(
|
||||
}
|
||||
}
|
||||
if (interp && localIndex < 0) {
|
||||
PushLiteral(envPtr, name, nameChars);
|
||||
PushLiteral(envPtr, name, nameLen);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3577,7 +3581,7 @@ TclPushVarName(
|
||||
*/
|
||||
|
||||
if (elName != NULL && !(flags & TCL_NO_ELEMENT)) {
|
||||
if (elNameChars) {
|
||||
if (elNameLen) {
|
||||
TclCompileTokens(interp, elemTokenPtr, elemTokenCount,
|
||||
envPtr);
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ static int IndexTailVarIfKnown(Tcl_Interp *interp,
|
||||
* TclGetIndexFromToken --
|
||||
*
|
||||
* Parse a token to determine if an index value is known at
|
||||
* compile time.
|
||||
* compile time.
|
||||
*
|
||||
* Returns:
|
||||
* TCL_OK if parsing succeeded, and TCL_ERROR if it failed.
|
||||
@@ -1536,7 +1536,7 @@ TclCompileLreplaceCmd(
|
||||
|
||||
emptyPrefix = 0;
|
||||
}
|
||||
|
||||
|
||||
if ((idx1 == suffixStart) && (parsePtr->numWords == 4)) {
|
||||
/*
|
||||
* This is a "no-op". Example: [lreplace {a b c} 2 0]
|
||||
|
||||
@@ -1002,13 +1002,13 @@ TclCompileStringReplaceCmd(
|
||||
if (parsePtr->numWords < 4 || parsePtr->numWords > 5) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
/* Bytecode to compute/push string argument being replaced */
|
||||
valueTokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
CompileWord(envPtr, valueTokenPtr, interp, 1);
|
||||
|
||||
/*
|
||||
* Check for first index known and useful at compile time.
|
||||
* Check for first index known and useful at compile time.
|
||||
*/
|
||||
tokenPtr = TokenAfter(valueTokenPtr);
|
||||
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER,
|
||||
@@ -1017,7 +1017,7 @@ TclCompileStringReplaceCmd(
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for last index known and useful at compile time.
|
||||
* Check for last index known and useful at compile time.
|
||||
*/
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER,
|
||||
@@ -1025,7 +1025,7 @@ TclCompileStringReplaceCmd(
|
||||
goto genericReplace;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* [string replace] is an odd bird. For many arguments it is
|
||||
* a conventional substring replacer. However it also goes out
|
||||
* of its way to become a no-op for many cases where it would be
|
||||
@@ -1108,12 +1108,12 @@ TclCompileStringReplaceCmd(
|
||||
* Finally we need, third:
|
||||
*
|
||||
* (first <= last)
|
||||
*
|
||||
*
|
||||
* Considered in combination with the constraints we already have,
|
||||
* we see that we can proceed when (first == TCL_INDEX_BEFORE)
|
||||
* or (last == TCL_INDEX_AFTER). These also permit simplification
|
||||
* of the prefix|replace|suffix construction. The other constraints,
|
||||
* though, interfere with getting a guarantee that first <= last.
|
||||
* though, interfere with getting a guarantee that first <= last.
|
||||
*/
|
||||
|
||||
if ((first == TCL_INDEX_BEFORE) && (last >= TCL_INDEX_START)) {
|
||||
@@ -1141,7 +1141,7 @@ TclCompileStringReplaceCmd(
|
||||
/* FLOW THROUGH TO genericReplace */
|
||||
|
||||
} else {
|
||||
/*
|
||||
/*
|
||||
* When we have no replacement string to worry about, we may
|
||||
* have more luck, because the forbidden empty string replacements
|
||||
* are harmless when they are replaced by another empty string.
|
||||
@@ -1496,7 +1496,7 @@ TclSubstCompile(
|
||||
for (endTokenPtr = tokenPtr + parse.numTokens;
|
||||
tokenPtr < endTokenPtr; tokenPtr = TokenAfter(tokenPtr)) {
|
||||
int length, literal, catchRange, breakJump;
|
||||
char buf[TCL_UTF_MAX];
|
||||
char buf[TCL_UTF_MAX] = "";
|
||||
JumpFixup startFixup, okFixup, returnFixup, breakFixup;
|
||||
JumpFixup continueFixup, otherFixup, endFixup;
|
||||
|
||||
|
||||
@@ -1723,7 +1723,7 @@ TclWordKnownAtCompileTime(
|
||||
|
||||
case TCL_TOKEN_BS:
|
||||
if (tempPtr != NULL) {
|
||||
char utfBuf[TCL_UTF_MAX];
|
||||
char utfBuf[TCL_UTF_MAX] = "";
|
||||
int length = TclParseBackslash(tokenPtr->start,
|
||||
tokenPtr->size, NULL, utfBuf);
|
||||
|
||||
@@ -2337,7 +2337,7 @@ TclCompileTokens(
|
||||
{
|
||||
Tcl_DString textBuffer; /* Holds concatenated chars from adjacent
|
||||
* TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
|
||||
char buffer[TCL_UTF_MAX];
|
||||
char buffer[TCL_UTF_MAX] = "";
|
||||
int i, numObjsToConcat, length, adjust;
|
||||
unsigned char *entryCodeNext = envPtr->codeNext;
|
||||
#define NUM_STATIC_POS 20
|
||||
|
||||
@@ -1161,6 +1161,25 @@ MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
|
||||
Tcl_Token *varTokenPtr, CompileEnv *envPtr,
|
||||
int flags, int *localIndexPtr,
|
||||
int *isScalarPtr);
|
||||
|
||||
static inline void
|
||||
TclPreserveByteCode(
|
||||
register ByteCode *codePtr)
|
||||
{
|
||||
codePtr->refCount++;
|
||||
}
|
||||
|
||||
static inline void
|
||||
TclReleaseByteCode(
|
||||
register ByteCode *codePtr)
|
||||
{
|
||||
if (codePtr->refCount-- > 1) {
|
||||
return;
|
||||
}
|
||||
/* Just dropped to refcount==0. Clean up. */
|
||||
TclCleanupByteCode(codePtr);
|
||||
}
|
||||
|
||||
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
|
||||
MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
|
||||
const char *name, Namespace *nsPtr);
|
||||
|
||||
+12
-7
@@ -1720,7 +1720,9 @@ LoadTableEncoding(
|
||||
};
|
||||
|
||||
Tcl_DStringInit(&lineString);
|
||||
Tcl_Gets(chan, &lineString);
|
||||
if (Tcl_Gets(chan, &lineString) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
line = Tcl_DStringValue(&lineString);
|
||||
|
||||
fallback = (int) strtol(line, &line, 16);
|
||||
@@ -1760,8 +1762,11 @@ LoadTableEncoding(
|
||||
for (i = 0; i < numPages; i++) {
|
||||
int ch;
|
||||
const char *p;
|
||||
int expected = 3 + 16 * (16 * 4 + 1);
|
||||
|
||||
Tcl_ReadChars(chan, objPtr, 3 + 16 * (16 * 4 + 1), 0);
|
||||
if (Tcl_ReadChars(chan, objPtr, expected, 0) != expected) {
|
||||
return NULL;
|
||||
}
|
||||
p = Tcl_GetString(objPtr);
|
||||
hi = (staticHex[UCHAR(p[0])] << 4) + staticHex[UCHAR(p[1])];
|
||||
dataPtr->toUnicode[hi] = pageMemPtr;
|
||||
@@ -2360,8 +2365,8 @@ UtfToUtfProc(
|
||||
src += len;
|
||||
dst += Tcl_UniCharToUtf(*chPtr, dst);
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!len) {
|
||||
src += TclUtfToUniChar(src, chPtr);
|
||||
if ((*chPtr >= 0xD800) && (len < 3)) {
|
||||
src += TclUtfToUniChar(src + len, chPtr);
|
||||
dst += Tcl_UniCharToUtf(*chPtr, dst);
|
||||
}
|
||||
#endif
|
||||
@@ -2982,7 +2987,7 @@ Iso88591FromUtfProc(
|
||||
|
||||
if (ch > 0xff
|
||||
#if TCL_UTF_MAX == 4
|
||||
|| !len
|
||||
|| ((ch >= 0xD800) && (len < 3))
|
||||
#endif
|
||||
) {
|
||||
if (flags & TCL_ENCODING_STOPONERROR) {
|
||||
@@ -2990,7 +2995,7 @@ Iso88591FromUtfProc(
|
||||
break;
|
||||
}
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!len) len = 4;
|
||||
if ((ch >= 0xD800) && (len < 3)) len = 4;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -3420,7 +3425,7 @@ EscapeFromUtfProc(
|
||||
break;
|
||||
}
|
||||
memcpy(dst, subTablePtr->sequence,
|
||||
(size_t) subTablePtr->sequenceLen);
|
||||
subTablePtr->sequenceLen);
|
||||
dst += subTablePtr->sequenceLen;
|
||||
}
|
||||
}
|
||||
|
||||
+44
-21
@@ -649,12 +649,12 @@ TclNamespaceEnsembleCmd(
|
||||
|
||||
Tcl_Command
|
||||
TclCreateEnsembleInNs(
|
||||
Tcl_Interp *interp,
|
||||
|
||||
Tcl_Interp *interp,
|
||||
|
||||
const char *name, /* Simple name of command to create (no */
|
||||
/* namespace components). */
|
||||
Tcl_Namespace /* Name of namespace to create the command in. */
|
||||
*nameNsPtr,
|
||||
Tcl_Namespace /* Name of namespace to create the command in. */
|
||||
*nameNsPtr,
|
||||
Tcl_Namespace
|
||||
*ensembleNsPtr, /* Name of the namespace for the ensemble. */
|
||||
int flags
|
||||
@@ -2071,8 +2071,8 @@ TclResetRewriteEnsemble(
|
||||
*
|
||||
* TclSpellFix --
|
||||
*
|
||||
* Record a spelling correction that needs making in the
|
||||
* generation of the WrongNumArgs usage message.
|
||||
* Record a spelling correction that needs making in the generation of
|
||||
* the WrongNumArgs usage message.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
@@ -2089,9 +2089,10 @@ FreeER(
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
Tcl_Obj **tmp = (Tcl_Obj **)data[0];
|
||||
Tcl_Obj **tmp = (Tcl_Obj **) data[0];
|
||||
Tcl_Obj **store = (Tcl_Obj **) data[1];
|
||||
|
||||
ckfree(tmp[2]);
|
||||
ckfree(store);
|
||||
ckfree(tmp);
|
||||
return result;
|
||||
}
|
||||
@@ -2117,22 +2118,28 @@ TclSpellFix(
|
||||
iPtr->ensembleRewrite.numInsertedObjs = 0;
|
||||
}
|
||||
|
||||
/* Compute the valid length of the ensemble root */
|
||||
/*
|
||||
* Compute the valid length of the ensemble root.
|
||||
*/
|
||||
|
||||
size = iPtr->ensembleRewrite.numRemovedObjs + objc
|
||||
- iPtr->ensembleRewrite.numInsertedObjs;
|
||||
|
||||
search = iPtr->ensembleRewrite.sourceObjs;
|
||||
if (search[0] == NULL) {
|
||||
/* Awful casting abuse here */
|
||||
/*
|
||||
* Awful casting abuse here!
|
||||
*/
|
||||
|
||||
search = (Tcl_Obj *const *) search[1];
|
||||
}
|
||||
|
||||
if (badIdx < iPtr->ensembleRewrite.numInsertedObjs) {
|
||||
/*
|
||||
* Misspelled value was inserted. We cannot directly jump
|
||||
* to the bad value, but have to search.
|
||||
* Misspelled value was inserted. We cannot directly jump to the bad
|
||||
* value, but have to search.
|
||||
*/
|
||||
|
||||
idx = 1;
|
||||
while (idx < size) {
|
||||
if (search[idx] == bad) {
|
||||
@@ -2144,7 +2151,10 @@ TclSpellFix(
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
/* Jump to the misspelled value. */
|
||||
/*
|
||||
* Jump to the misspelled value.
|
||||
*/
|
||||
|
||||
idx = iPtr->ensembleRewrite.numRemovedObjs + badIdx
|
||||
- iPtr->ensembleRewrite.numInsertedObjs;
|
||||
|
||||
@@ -2156,17 +2166,26 @@ TclSpellFix(
|
||||
|
||||
search = iPtr->ensembleRewrite.sourceObjs;
|
||||
if (search[0] == NULL) {
|
||||
store = (Tcl_Obj **)search[2];
|
||||
store = (Tcl_Obj **) search[2];
|
||||
} else {
|
||||
Tcl_Obj **tmp = ckalloc(3 * sizeof(Tcl_Obj *));
|
||||
tmp[0] = NULL;
|
||||
tmp[1] = (Tcl_Obj *)iPtr->ensembleRewrite.sourceObjs;
|
||||
tmp[2] = (Tcl_Obj *)ckalloc(size * sizeof(Tcl_Obj *));
|
||||
memcpy(tmp[2], tmp[1], size*sizeof(Tcl_Obj *));
|
||||
|
||||
store = ckalloc(size * sizeof(Tcl_Obj *));
|
||||
memcpy(store, iPtr->ensembleRewrite.sourceObjs,
|
||||
size * sizeof(Tcl_Obj *));
|
||||
|
||||
/*
|
||||
* Awful casting abuse here! Note that the NULL in the first element
|
||||
* indicates that the initial objects are a raw array in the second
|
||||
* element and the rewritten ones are a raw array in the third.
|
||||
*/
|
||||
|
||||
tmp[0] = NULL;
|
||||
tmp[1] = (Tcl_Obj *) iPtr->ensembleRewrite.sourceObjs;
|
||||
tmp[2] = (Tcl_Obj *) store;
|
||||
iPtr->ensembleRewrite.sourceObjs = (Tcl_Obj *const *) tmp;
|
||||
TclNRAddCallback(interp, FreeER, tmp, NULL, NULL, NULL);
|
||||
store = (Tcl_Obj **)tmp[2];
|
||||
|
||||
TclNRAddCallback(interp, FreeER, tmp, store, NULL, NULL);
|
||||
}
|
||||
|
||||
store[idx] = fix;
|
||||
@@ -2675,7 +2694,11 @@ BuildEnsembleConfig(
|
||||
if (isNew) {
|
||||
Tcl_Obj *cmdObj, *cmdPrefixObj;
|
||||
|
||||
cmdObj = Tcl_NewStringObj(nsCmdName, -1);
|
||||
TclNewObj(cmdObj);
|
||||
Tcl_AppendStringsToObj(cmdObj,
|
||||
ensemblePtr->nsPtr->fullName,
|
||||
(ensemblePtr->nsPtr->parentPtr ? "::" : ""),
|
||||
nsCmdName, NULL);
|
||||
cmdPrefixObj = Tcl_NewListObj(1, &cmdObj);
|
||||
Tcl_SetHashValue(hPtr, cmdPrefixObj);
|
||||
Tcl_IncrRefCount(cmdPrefixObj);
|
||||
|
||||
@@ -135,6 +135,18 @@ TclSetupEnv(
|
||||
}
|
||||
p2++;
|
||||
p2[-1] = '\0';
|
||||
#if defined(_WIN32)
|
||||
/*
|
||||
* Enforce PATH and COMSPEC to be all uppercase. This eliminates
|
||||
* additional trace logic otherwise required in init.tcl.
|
||||
*/
|
||||
|
||||
if (strcasecmp(p1, "PATH") == 0) {
|
||||
p1 = "PATH";
|
||||
} else if (strcasecmp(p1, "COMSPEC") == 0) {
|
||||
p1 = "COMSPEC";
|
||||
}
|
||||
#endif
|
||||
obj1 = Tcl_NewStringObj(p1, -1);
|
||||
obj2 = Tcl_NewStringObj(p2, -1);
|
||||
Tcl_DStringFree(&envString);
|
||||
|
||||
+14
-9
@@ -944,16 +944,20 @@ Tcl_Exit(
|
||||
currentAppExitPtr = appExitPtr;
|
||||
Tcl_MutexUnlock(&exitMutex);
|
||||
|
||||
/*
|
||||
* Warning: this function SHOULD NOT return, as there is code that depends
|
||||
* on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone
|
||||
* returns, so critical is this dependcy.
|
||||
*
|
||||
* If subsystems are not (yet) initialized, proper Tcl-finalization is
|
||||
* impossible, so fallback to system exit, see bug-[f8a33ce3db5d8cc2].
|
||||
*/
|
||||
|
||||
if (currentAppExitPtr) {
|
||||
/*
|
||||
* Warning: this code SHOULD NOT return, as there is code that depends
|
||||
* on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone
|
||||
* returns, so critical is this dependcy.
|
||||
*/
|
||||
|
||||
currentAppExitPtr(INT2PTR(status));
|
||||
Tcl_Panic("AppExitProc returned unexpectedly");
|
||||
} else {
|
||||
|
||||
} else if (subsystemsInitialized) {
|
||||
|
||||
if (TclFullFinalizationRequested()) {
|
||||
|
||||
@@ -986,9 +990,10 @@ Tcl_Exit(
|
||||
|
||||
FinalizeThread(/* quick */ 1);
|
||||
}
|
||||
TclpExit(status);
|
||||
Tcl_Panic("OS exit failed!");
|
||||
}
|
||||
|
||||
TclpExit(status);
|
||||
Tcl_Panic("OS exit failed!");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+230
-310
@@ -2014,7 +2014,7 @@ ArgumentBCEnter(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
#define bcFramePtr (&TD->cmdFrame)
|
||||
#define initCatchTop ((ptrdiff_t *) (&TD->stack[-1]))
|
||||
#define initCatchTop ((ptrdiff_t *) (TD->stack-1))
|
||||
#define initTosPtr ((Tcl_Obj **) (initCatchTop+codePtr->maxExceptDepth))
|
||||
#define esPtr (iPtr->execEnvPtr->execStackPtr)
|
||||
|
||||
@@ -3716,31 +3716,36 @@ TEBCresume(
|
||||
|
||||
{
|
||||
int createdNewObj = 0;
|
||||
Tcl_Obj *valueToAssign;
|
||||
|
||||
if (!objResultPtr) {
|
||||
objResultPtr = valuePtr;
|
||||
valueToAssign = valuePtr;
|
||||
} else if (TclListObjLength(interp, objResultPtr, &len)!=TCL_OK) {
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
} else {
|
||||
if (Tcl_IsShared(objResultPtr)) {
|
||||
objResultPtr = Tcl_DuplicateObj(objResultPtr);
|
||||
valueToAssign = Tcl_DuplicateObj(objResultPtr);
|
||||
createdNewObj = 1;
|
||||
} else {
|
||||
valueToAssign = objResultPtr;
|
||||
}
|
||||
if (Tcl_ListObjReplace(interp, objResultPtr, len,0, objc,objv)
|
||||
!= TCL_OK) {
|
||||
if (Tcl_ListObjReplace(interp, valueToAssign, len, 0,
|
||||
objc, objv) != TCL_OK) {
|
||||
if (createdNewObj) {
|
||||
TclDecrRefCount(valueToAssign);
|
||||
}
|
||||
goto errorInLappendListPtr;
|
||||
}
|
||||
}
|
||||
DECACHE_STACK_INFO();
|
||||
Tcl_IncrRefCount(valueToAssign);
|
||||
objResultPtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr,
|
||||
part2Ptr, objResultPtr, TCL_LEAVE_ERR_MSG, opnd);
|
||||
part2Ptr, valueToAssign, TCL_LEAVE_ERR_MSG, opnd);
|
||||
TclDecrRefCount(valueToAssign);
|
||||
CACHE_STACK_INFO();
|
||||
if (!objResultPtr) {
|
||||
errorInLappendListPtr:
|
||||
if (createdNewObj) {
|
||||
TclDecrRefCount(objResultPtr);
|
||||
}
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
@@ -5237,13 +5242,17 @@ TEBCresume(
|
||||
|
||||
/* Every range of an empty list is an empty list */
|
||||
if (objc == 0) {
|
||||
TRACE_APPEND(("\n"));
|
||||
NEXT_INST_F(9, 0, 0);
|
||||
/* avoid return of not canonical list (e. g. spaces in string repr.) */
|
||||
if (!valuePtr->bytes || !valuePtr->length) {
|
||||
TRACE_APPEND(("\n"));
|
||||
NEXT_INST_F(9, 0, 0);
|
||||
}
|
||||
goto emptyList;
|
||||
}
|
||||
|
||||
/* Decode index value operands. */
|
||||
|
||||
/*
|
||||
/*
|
||||
assert ( toIdx != TCL_INDEX_AFTER);
|
||||
*
|
||||
* Extra safety for legacy bytecodes:
|
||||
@@ -5511,7 +5520,7 @@ TEBCresume(
|
||||
objResultPtr = Tcl_NewStringObj((const char *)
|
||||
valuePtr->bytes+index, 1);
|
||||
} else {
|
||||
char buf[TCL_UTF_MAX];
|
||||
char buf[TCL_UTF_MAX] = "";
|
||||
Tcl_UniChar ch = Tcl_GetUniChar(valuePtr, index);
|
||||
|
||||
/*
|
||||
@@ -6028,7 +6037,7 @@ TEBCresume(
|
||||
/* [string is integer] is -UINT_MAX to UINT_MAX range */
|
||||
int i;
|
||||
|
||||
if (Tcl_GetIntFromObj(NULL, OBJ_AT_TOS, &i) != TCL_OK) {
|
||||
if (TclGetIntFromObj(NULL, OBJ_AT_TOS, &i) != TCL_OK) {
|
||||
type1 = TCL_NUMBER_WIDE;
|
||||
}
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
@@ -6036,7 +6045,7 @@ TEBCresume(
|
||||
/* value is between WIDE_MIN and WIDE_MAX */
|
||||
/* [string is wideinteger] is -UWIDE_MAX to UWIDE_MAX range */
|
||||
int i;
|
||||
if (Tcl_GetIntFromObj(NULL, OBJ_AT_TOS, &i) == TCL_OK) {
|
||||
if (TclGetIntFromObj(NULL, OBJ_AT_TOS, &i) == TCL_OK) {
|
||||
type1 = TCL_NUMBER_LONG;
|
||||
}
|
||||
#endif
|
||||
@@ -6045,7 +6054,7 @@ TEBCresume(
|
||||
/* [string is wideinteger] is -UWIDE_MAX to UWIDE_MAX range */
|
||||
Tcl_WideInt w;
|
||||
|
||||
if (Tcl_GetWideIntFromObj(NULL, OBJ_AT_TOS, &w) == TCL_OK) {
|
||||
if (TclGetWideIntFromObj(NULL, OBJ_AT_TOS, &w) == TCL_OK) {
|
||||
type1 = TCL_NUMBER_WIDE;
|
||||
}
|
||||
}
|
||||
@@ -8217,6 +8226,128 @@ FinalizeOONextFilter(
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* LongPwrSmallExpon -- , WidePwrSmallExpon --
|
||||
*
|
||||
* Helpers to calculate small powers of integers whose result is long or wide.
|
||||
*/
|
||||
#if (LONG_MAX == 0x7fffffff)
|
||||
static inline long
|
||||
LongPwrSmallExpon(long l1, long exponent) {
|
||||
|
||||
long lResult;
|
||||
|
||||
lResult = l1 * l1; /* b**2 */
|
||||
switch (exponent) {
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
lResult *= l1; /* b**3 */
|
||||
break;
|
||||
case 4:
|
||||
lResult *= lResult; /* b**4 */
|
||||
break;
|
||||
case 5:
|
||||
lResult *= lResult; /* b**4 */
|
||||
lResult *= l1; /* b**5 */
|
||||
break;
|
||||
case 6:
|
||||
lResult *= l1; /* b**3 */
|
||||
lResult *= lResult; /* b**6 */
|
||||
break;
|
||||
case 7:
|
||||
lResult *= l1; /* b**3 */
|
||||
lResult *= lResult; /* b**6 */
|
||||
lResult *= l1; /* b**7 */
|
||||
break;
|
||||
case 8:
|
||||
lResult *= lResult; /* b**4 */
|
||||
lResult *= lResult; /* b**8 */
|
||||
break;
|
||||
}
|
||||
return lResult;
|
||||
}
|
||||
#endif
|
||||
static inline Tcl_WideInt
|
||||
WidePwrSmallExpon(Tcl_WideInt w1, long exponent) {
|
||||
|
||||
Tcl_WideInt wResult;
|
||||
|
||||
wResult = w1 * w1; /* b**2 */
|
||||
switch (exponent) {
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
wResult *= w1; /* b**3 */
|
||||
break;
|
||||
case 4:
|
||||
wResult *= wResult; /* b**4 */
|
||||
break;
|
||||
case 5:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
break;
|
||||
case 6:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
break;
|
||||
case 7:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
break;
|
||||
case 8:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
break;
|
||||
case 9:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
wResult *= w1; /* b**9 */
|
||||
break;
|
||||
case 10:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
wResult *= wResult; /* b**10 */
|
||||
break;
|
||||
case 11:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
wResult *= wResult; /* b**10 */
|
||||
wResult *= w1; /* b**11 */
|
||||
break;
|
||||
case 12:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= wResult; /* b**12 */
|
||||
break;
|
||||
case 13:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= wResult; /* b**12 */
|
||||
wResult *= w1; /* b**13 */
|
||||
break;
|
||||
case 14:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
wResult *= wResult; /* b**14 */
|
||||
break;
|
||||
case 15:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
wResult *= wResult; /* b**14 */
|
||||
wResult *= w1; /* b**15 */
|
||||
break;
|
||||
case 16:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
wResult *= wResult; /* b**16 */
|
||||
break;
|
||||
}
|
||||
return wResult;
|
||||
}
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -8288,7 +8419,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
Tcl_WideInt w1, w2, wResult;
|
||||
mp_int big1, big2, bigResult, bigRemainder;
|
||||
Tcl_Obj *objResultPtr;
|
||||
int invalid, numPos, zero;
|
||||
int invalid, zero;
|
||||
long shift;
|
||||
|
||||
(void) GetNumberFromObj(NULL, valuePtr, &ptr1, &type1);
|
||||
@@ -8317,7 +8448,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
w1 = *((const Tcl_WideInt *)ptr1);
|
||||
if (type2 != TCL_NUMBER_BIG) {
|
||||
Tcl_WideInt wQuotient, wRemainder;
|
||||
Tcl_GetWideIntFromObj(NULL, value2Ptr, &w2);
|
||||
TclGetWideIntFromObj(NULL, value2Ptr, &w2);
|
||||
wQuotient = w1 / w2;
|
||||
|
||||
/*
|
||||
@@ -8363,7 +8494,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
mp_init(&bigResult);
|
||||
mp_init(&bigRemainder);
|
||||
mp_div(&big1, &big2, &bigResult, &bigRemainder);
|
||||
if (!mp_iszero(&bigRemainder) && (bigRemainder.sign != big2.sign)) {
|
||||
if ((bigRemainder.used) != 0 && (bigRemainder.sign != big2.sign)) {
|
||||
/*
|
||||
* Convert to Tcl's integer division rules.
|
||||
*/
|
||||
@@ -8516,16 +8647,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
if (opcode == INST_LSHIFT) {
|
||||
mp_mul_2d(&big1, shift, &bigResult);
|
||||
} else {
|
||||
mp_init(&bigRemainder);
|
||||
mp_div_2d(&big1, shift, &bigResult, &bigRemainder);
|
||||
if (mp_cmp_d(&bigRemainder, 0) == MP_LT) {
|
||||
/*
|
||||
* Convert to Tcl's integer division rules.
|
||||
*/
|
||||
|
||||
mp_sub_d(&bigResult, 1, &bigResult);
|
||||
}
|
||||
mp_clear(&bigRemainder);
|
||||
mp_signed_rsh(&big1, shift, &bigResult);
|
||||
}
|
||||
mp_clear(&big1);
|
||||
BIG_RESULT(&bigResult);
|
||||
@@ -8535,138 +8657,22 @@ ExecuteExtendedBinaryMathOp(
|
||||
case INST_BITXOR:
|
||||
case INST_BITAND:
|
||||
if ((type1 == TCL_NUMBER_BIG) || (type2 == TCL_NUMBER_BIG)) {
|
||||
mp_int *First, *Second;
|
||||
|
||||
Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
|
||||
Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
|
||||
|
||||
/*
|
||||
* Count how many positive arguments we have. If only one of the
|
||||
* arguments is negative, store it in 'Second'.
|
||||
*/
|
||||
|
||||
if (mp_cmp_d(&big1, 0) != MP_LT) {
|
||||
numPos = 1 + (mp_cmp_d(&big2, 0) != MP_LT);
|
||||
First = &big1;
|
||||
Second = &big2;
|
||||
} else {
|
||||
First = &big2;
|
||||
Second = &big1;
|
||||
numPos = (mp_cmp_d(First, 0) != MP_LT);
|
||||
}
|
||||
mp_init(&bigResult);
|
||||
|
||||
switch (opcode) {
|
||||
case INST_BITAND:
|
||||
switch (numPos) {
|
||||
case 2:
|
||||
/*
|
||||
* Both arguments positive, base case.
|
||||
*/
|
||||
|
||||
mp_and(First, Second, &bigResult);
|
||||
break;
|
||||
case 1:
|
||||
/*
|
||||
* First is positive; second negative:
|
||||
* P & N = P & ~~N = P&~(-N-1) = P & (P ^ (-N-1))
|
||||
*/
|
||||
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_xor(First, Second, &bigResult);
|
||||
mp_and(First, &bigResult, &bigResult);
|
||||
break;
|
||||
case 0:
|
||||
/*
|
||||
* Both arguments negative:
|
||||
* a & b = ~ (~a | ~b) = -(-a-1|-b-1)-1
|
||||
*/
|
||||
|
||||
mp_neg(First, First);
|
||||
mp_sub_d(First, 1, First);
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_or(First, Second, &bigResult);
|
||||
mp_neg(&bigResult, &bigResult);
|
||||
mp_sub_d(&bigResult, 1, &bigResult);
|
||||
break;
|
||||
}
|
||||
mp_and(&big1, &big2, &bigResult);
|
||||
break;
|
||||
|
||||
case INST_BITOR:
|
||||
switch (numPos) {
|
||||
case 2:
|
||||
/*
|
||||
* Both arguments positive, base case.
|
||||
*/
|
||||
|
||||
mp_or(First, Second, &bigResult);
|
||||
break;
|
||||
case 1:
|
||||
/*
|
||||
* First is positive; second negative:
|
||||
* N|P = ~(~N&~P) = ~((-N-1)&~P) = -((-N-1)&((-N-1)^P))-1
|
||||
*/
|
||||
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_xor(First, Second, &bigResult);
|
||||
mp_and(Second, &bigResult, &bigResult);
|
||||
mp_neg(&bigResult, &bigResult);
|
||||
mp_sub_d(&bigResult, 1, &bigResult);
|
||||
break;
|
||||
case 0:
|
||||
/*
|
||||
* Both arguments negative:
|
||||
* a | b = ~ (~a & ~b) = -(-a-1&-b-1)-1
|
||||
*/
|
||||
|
||||
mp_neg(First, First);
|
||||
mp_sub_d(First, 1, First);
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_and(First, Second, &bigResult);
|
||||
mp_neg(&bigResult, &bigResult);
|
||||
mp_sub_d(&bigResult, 1, &bigResult);
|
||||
break;
|
||||
}
|
||||
mp_or(&big1, &big2, &bigResult);
|
||||
break;
|
||||
|
||||
case INST_BITXOR:
|
||||
switch (numPos) {
|
||||
case 2:
|
||||
/*
|
||||
* Both arguments positive, base case.
|
||||
*/
|
||||
|
||||
mp_xor(First, Second, &bigResult);
|
||||
break;
|
||||
case 1:
|
||||
/*
|
||||
* First is positive; second negative:
|
||||
* P^N = ~(P^~N) = -(P^(-N-1))-1
|
||||
*/
|
||||
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_xor(First, Second, &bigResult);
|
||||
mp_neg(&bigResult, &bigResult);
|
||||
mp_sub_d(&bigResult, 1, &bigResult);
|
||||
break;
|
||||
case 0:
|
||||
/*
|
||||
* Both arguments negative:
|
||||
* a ^ b = (~a ^ ~b) = (-a-1^-b-1)
|
||||
*/
|
||||
|
||||
mp_neg(First, First);
|
||||
mp_sub_d(First, 1, First);
|
||||
mp_neg(Second, Second);
|
||||
mp_sub_d(Second, 1, Second);
|
||||
mp_xor(First, Second, &bigResult);
|
||||
break;
|
||||
}
|
||||
mp_xor(&big1, &big2, &bigResult);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -8731,8 +8737,13 @@ ExecuteExtendedBinaryMathOp(
|
||||
goto doubleResult;
|
||||
}
|
||||
l1 = l2 = 0;
|
||||
if (type2 == TCL_NUMBER_LONG) {
|
||||
w1 = w2 = 0; /* to silence compiler warning (maybe-uninitialized) */
|
||||
switch (type2) {
|
||||
case TCL_NUMBER_LONG:
|
||||
l2 = *((const long *) ptr2);
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
pwrLongExpon:
|
||||
#endif
|
||||
if (l2 == 0) {
|
||||
/*
|
||||
* Anything to the zero power is 1.
|
||||
@@ -8746,16 +8757,18 @@ ExecuteExtendedBinaryMathOp(
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
switch (type2) {
|
||||
case TCL_NUMBER_LONG:
|
||||
negativeExponent = (l2 < 0);
|
||||
oddExponent = (int) (l2 & 1);
|
||||
break;
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
case TCL_NUMBER_WIDE:
|
||||
w2 = *((const Tcl_WideInt *)ptr2);
|
||||
/* check it fits in long */
|
||||
l2 = (long)w2;
|
||||
if (w2 == l2) {
|
||||
type2 = TCL_NUMBER_LONG;
|
||||
goto pwrLongExpon;
|
||||
}
|
||||
negativeExponent = (w2 < 0);
|
||||
oddExponent = (int) (w2 & (Tcl_WideInt)1);
|
||||
break;
|
||||
@@ -8764,36 +8777,58 @@ ExecuteExtendedBinaryMathOp(
|
||||
Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
|
||||
negativeExponent = (mp_cmp_d(&big2, 0) == MP_LT);
|
||||
mp_mod_2d(&big2, 1, &big2);
|
||||
oddExponent = !mp_iszero(&big2);
|
||||
oddExponent = big2.used != 0;
|
||||
mp_clear(&big2);
|
||||
break;
|
||||
}
|
||||
|
||||
if (type1 == TCL_NUMBER_LONG) {
|
||||
switch (type1) {
|
||||
case TCL_NUMBER_LONG:
|
||||
l1 = *((const long *)ptr1);
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
pwrLongBase:
|
||||
#endif
|
||||
switch (l1) {
|
||||
case 0:
|
||||
/*
|
||||
* Zero to a positive power is zero.
|
||||
* Zero to a negative power is div by zero error.
|
||||
*/
|
||||
|
||||
return (!negativeExponent) ? constants[0] : EXPONENT_OF_ZERO;
|
||||
case 1:
|
||||
/*
|
||||
* 1 to any power is 1.
|
||||
*/
|
||||
|
||||
return constants[1];
|
||||
case -1:
|
||||
if (!negativeExponent) {
|
||||
if (!oddExponent) {
|
||||
return constants[1];
|
||||
}
|
||||
LONG_RESULT(-1);
|
||||
}
|
||||
/* negativeExponent */
|
||||
if (oddExponent) {
|
||||
LONG_RESULT(-1);
|
||||
}
|
||||
return constants[1];
|
||||
}
|
||||
break;
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
case TCL_NUMBER_WIDE:
|
||||
w1 = *((const Tcl_WideInt *) ptr1);
|
||||
/* check it fits in long */
|
||||
l1 = (long)w1;
|
||||
if (w1 == l1) {
|
||||
type1 = TCL_NUMBER_LONG;
|
||||
goto pwrLongBase;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (negativeExponent) {
|
||||
if (type1 == TCL_NUMBER_LONG) {
|
||||
switch (l1) {
|
||||
case 0:
|
||||
/*
|
||||
* Zero to a negative power is div by zero error.
|
||||
*/
|
||||
|
||||
return EXPONENT_OF_ZERO;
|
||||
case -1:
|
||||
if (oddExponent) {
|
||||
LONG_RESULT(-1);
|
||||
}
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
/*
|
||||
* 1 to any power is 1.
|
||||
*/
|
||||
|
||||
return constants[1];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Integers with magnitude greater than 1 raise to a negative
|
||||
@@ -8803,26 +8838,9 @@ ExecuteExtendedBinaryMathOp(
|
||||
return constants[0];
|
||||
}
|
||||
|
||||
if (type1 == TCL_NUMBER_LONG) {
|
||||
switch (l1) {
|
||||
case 0:
|
||||
/*
|
||||
* Zero to a positive power is zero.
|
||||
*/
|
||||
|
||||
return constants[0];
|
||||
case 1:
|
||||
/*
|
||||
* 1 to any power is 1.
|
||||
*/
|
||||
|
||||
return constants[1];
|
||||
case -1:
|
||||
if (!oddExponent) {
|
||||
return constants[1];
|
||||
}
|
||||
LONG_RESULT(-1);
|
||||
}
|
||||
if (type1 == TCL_NUMBER_BIG) {
|
||||
goto overflowExpon;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8840,6 +8858,8 @@ ExecuteExtendedBinaryMathOp(
|
||||
return GENERAL_ARITHMETIC_ERROR;
|
||||
}
|
||||
|
||||
/* From here (up to overflowExpon) exponent is long (l2). */
|
||||
|
||||
if (type1 == TCL_NUMBER_LONG) {
|
||||
if (l1 == 2) {
|
||||
/*
|
||||
@@ -8880,35 +8900,8 @@ ExecuteExtendedBinaryMathOp(
|
||||
/*
|
||||
* Small powers of 32-bit integers.
|
||||
*/
|
||||
lResult = LongPwrSmallExpon(l1, l2);
|
||||
|
||||
lResult = l1 * l1; /* b**2 */
|
||||
switch (l2) {
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
lResult *= l1; /* b**3 */
|
||||
break;
|
||||
case 4:
|
||||
lResult *= lResult; /* b**4 */
|
||||
break;
|
||||
case 5:
|
||||
lResult *= lResult; /* b**4 */
|
||||
lResult *= l1; /* b**5 */
|
||||
break;
|
||||
case 6:
|
||||
lResult *= l1; /* b**3 */
|
||||
lResult *= lResult; /* b**6 */
|
||||
break;
|
||||
case 7:
|
||||
lResult *= l1; /* b**3 */
|
||||
lResult *= lResult; /* b**6 */
|
||||
lResult *= l1; /* b**7 */
|
||||
break;
|
||||
case 8:
|
||||
lResult *= lResult; /* b**4 */
|
||||
lResult *= lResult; /* b**8 */
|
||||
break;
|
||||
}
|
||||
LONG_RESULT(lResult);
|
||||
}
|
||||
|
||||
@@ -8941,97 +8934,24 @@ ExecuteExtendedBinaryMathOp(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG)
|
||||
if (type1 == TCL_NUMBER_LONG) {
|
||||
/* Code below (up to overflowExpon) works with wide-int base */
|
||||
w1 = l1;
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
} else if (type1 == TCL_NUMBER_WIDE) {
|
||||
w1 = *((const Tcl_WideInt *) ptr1);
|
||||
#endif
|
||||
} else {
|
||||
goto overflowExpon;
|
||||
}
|
||||
|
||||
#if (LONG_MAX > 0x7fffffff) || !defined(TCL_WIDE_INT_IS_LONG)
|
||||
|
||||
/* From here (up to overflowExpon) base is wide-int (w1). */
|
||||
|
||||
if (l2 - 2 < (long)MaxBase64Size
|
||||
&& w1 <= MaxBase64[l2 - 2]
|
||||
&& w1 >= -MaxBase64[l2 - 2]) {
|
||||
/*
|
||||
* Small powers of integers whose result is wide.
|
||||
*/
|
||||
wResult = WidePwrSmallExpon(w1, l2);
|
||||
|
||||
wResult = w1 * w1; /* b**2 */
|
||||
switch (l2) {
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
wResult *= l1; /* b**3 */
|
||||
break;
|
||||
case 4:
|
||||
wResult *= wResult; /* b**4 */
|
||||
break;
|
||||
case 5:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
break;
|
||||
case 6:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
break;
|
||||
case 7:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
break;
|
||||
case 8:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
break;
|
||||
case 9:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
wResult *= w1; /* b**9 */
|
||||
break;
|
||||
case 10:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
wResult *= wResult; /* b**10 */
|
||||
break;
|
||||
case 11:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= w1; /* b**5 */
|
||||
wResult *= wResult; /* b**10 */
|
||||
wResult *= w1; /* b**11 */
|
||||
break;
|
||||
case 12:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= wResult; /* b**12 */
|
||||
break;
|
||||
case 13:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= wResult; /* b**12 */
|
||||
wResult *= w1; /* b**13 */
|
||||
break;
|
||||
case 14:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
wResult *= wResult; /* b**14 */
|
||||
break;
|
||||
case 15:
|
||||
wResult *= w1; /* b**3 */
|
||||
wResult *= wResult; /* b**6 */
|
||||
wResult *= w1; /* b**7 */
|
||||
wResult *= wResult; /* b**14 */
|
||||
wResult *= w1; /* b**15 */
|
||||
break;
|
||||
case 16:
|
||||
wResult *= wResult; /* b**4 */
|
||||
wResult *= wResult; /* b**8 */
|
||||
wResult *= wResult; /* b**16 */
|
||||
break;
|
||||
}
|
||||
WIDE_RESULT(wResult);
|
||||
}
|
||||
|
||||
@@ -9071,18 +8991,18 @@ ExecuteExtendedBinaryMathOp(
|
||||
#endif
|
||||
|
||||
overflowExpon:
|
||||
Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2);
|
||||
if (big2.used > 1) {
|
||||
mp_clear(&big2);
|
||||
|
||||
if ((TclGetWideIntFromObj(NULL, value2Ptr, &w2) != TCL_OK)
|
||||
|| (value2Ptr->typePtr != &tclIntType)
|
||||
|| (Tcl_WideUInt)w2 >= (1<<28)) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"exponent too large", -1));
|
||||
return GENERAL_ARITHMETIC_ERROR;
|
||||
}
|
||||
Tcl_TakeBignumFromObj(NULL, valuePtr, &big1);
|
||||
mp_init(&bigResult);
|
||||
mp_expt_d(&big1, big2.dp[0], &bigResult);
|
||||
mp_expt_d(&big1, (mp_digit)w2, &bigResult);
|
||||
mp_clear(&big1);
|
||||
mp_clear(&big2);
|
||||
BIG_RESULT(&bigResult);
|
||||
}
|
||||
|
||||
@@ -9245,7 +9165,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
mp_mul(&big1, &big2, &bigResult);
|
||||
break;
|
||||
case INST_DIV:
|
||||
if (mp_iszero(&big2)) {
|
||||
if (big2.used == 0) {
|
||||
mp_clear(&big1);
|
||||
mp_clear(&big2);
|
||||
mp_clear(&bigResult);
|
||||
@@ -9254,7 +9174,7 @@ ExecuteExtendedBinaryMathOp(
|
||||
mp_init(&bigRemainder);
|
||||
mp_div(&big1, &big2, &bigResult, &bigRemainder);
|
||||
/* TODO: internals intrusion */
|
||||
if (!mp_iszero(&bigRemainder)
|
||||
if (bigRemainder.used != 0
|
||||
&& (bigRemainder.sign != big2.sign)) {
|
||||
/*
|
||||
* Convert to Tcl's integer division rules.
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ FileCopyRename(
|
||||
}
|
||||
jargv[0] = objv[objc - 1];
|
||||
jargv[1] = source;
|
||||
newFileName = TclJoinPath(2, jargv);
|
||||
newFileName = TclJoinPath(2, jargv, 1);
|
||||
Tcl_IncrRefCount(newFileName);
|
||||
result = CopyRenameOneFile(interp, objv[i], newFileName, copyFlag,
|
||||
force);
|
||||
|
||||
@@ -808,24 +808,24 @@ Tcl_FSJoinToPath(
|
||||
Tcl_Obj *const objv[]) /* Path elements to join. */
|
||||
{
|
||||
if (pathPtr == NULL) {
|
||||
return TclJoinPath(objc, objv);
|
||||
return TclJoinPath(objc, objv, 0);
|
||||
}
|
||||
if (objc == 0) {
|
||||
return TclJoinPath(1, &pathPtr);
|
||||
return TclJoinPath(1, &pathPtr, 0);
|
||||
}
|
||||
if (objc == 1) {
|
||||
Tcl_Obj *pair[2];
|
||||
|
||||
pair[0] = pathPtr;
|
||||
pair[1] = objv[0];
|
||||
return TclJoinPath(2, pair);
|
||||
return TclJoinPath(2, pair, 0);
|
||||
} else {
|
||||
int elemc = objc + 1;
|
||||
Tcl_Obj *ret, **elemv = ckalloc(elemc*sizeof(Tcl_Obj *));
|
||||
|
||||
elemv[0] = pathPtr;
|
||||
memcpy(elemv+1, objv, objc*sizeof(Tcl_Obj *));
|
||||
ret = TclJoinPath(elemc, elemv);
|
||||
ret = TclJoinPath(elemc, elemv, 0);
|
||||
ckfree(elemv);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ TclDatelex(
|
||||
|
||||
location->first_column = yyInput - info->dateStart;
|
||||
for ( ; ; ) {
|
||||
while (isspace(UCHAR(*yyInput))) {
|
||||
while (TclIsSpaceProc(*yyInput)) {
|
||||
yyInput++;
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -326,7 +326,10 @@ CreateHashEntry(
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (((void *) key == hPtr) || compareKeysProc((void *) key, hPtr)) {
|
||||
/* if keys pointers or values are equal */
|
||||
if ((key == hPtr->key.oneWordValue)
|
||||
|| compareKeysProc((void *) key, hPtr)
|
||||
) {
|
||||
if (newPtr) {
|
||||
*newPtr = 0;
|
||||
}
|
||||
@@ -836,6 +839,7 @@ AllocStringEntry(
|
||||
allocsize = sizeof(hPtr->key);
|
||||
}
|
||||
hPtr = ckalloc(TclOffset(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;
|
||||
|
||||
+5
-5
@@ -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
|
||||
@@ -4392,8 +4392,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);
|
||||
}
|
||||
|
||||
|
||||
+31
-25
@@ -49,7 +49,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \
|
||||
|| defined(__cplusplus) || defined(_MSC_VER)
|
||||
|| defined(__cplusplus) || defined(_MSC_VER) || defined(__ICC)
|
||||
#include <stddef.h>
|
||||
#else
|
||||
typedef int ptrdiff_t;
|
||||
@@ -902,9 +902,8 @@ typedef struct CompiledLocal {
|
||||
/* Next compiler-recognized local variable for
|
||||
* this procedure, or NULL if this is the last
|
||||
* local. */
|
||||
int nameLength; /* The number of characters in local
|
||||
* variable's name. Used to speed up variable
|
||||
* lookups. */
|
||||
int nameLength; /* The number of bytes in local variable's name.
|
||||
* Among others used to speed up var lookups. */
|
||||
int frameIndex; /* Index in the array of compiler-assigned
|
||||
* variables in the procedure call frame. */
|
||||
int flags; /* Flag bits for the local variable. Same as
|
||||
@@ -3025,9 +3024,10 @@ MODULE_SCOPE void TclInitNotifier(void);
|
||||
MODULE_SCOPE void TclInitObjSubsystem(void);
|
||||
MODULE_SCOPE void TclInitSubsystems(void);
|
||||
MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp);
|
||||
MODULE_SCOPE int TclIsSpaceProc(char byte);
|
||||
MODULE_SCOPE int TclIsBareword(char byte);
|
||||
MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[]);
|
||||
MODULE_SCOPE int TclIsSpaceProc(int byte);
|
||||
MODULE_SCOPE int TclIsBareword(int byte);
|
||||
MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[],
|
||||
int forceRelative);
|
||||
MODULE_SCOPE int TclJoinThread(Tcl_ThreadId id, int *result);
|
||||
MODULE_SCOPE void TclLimitRemoveAllHandlers(Tcl_Interp *interp);
|
||||
MODULE_SCOPE Tcl_Obj * TclLindexList(Tcl_Interp *interp,
|
||||
@@ -3053,6 +3053,8 @@ MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc,
|
||||
MODULE_SCOPE Tcl_Obj * TclNoErrorStack(Tcl_Interp *interp, Tcl_Obj *options);
|
||||
MODULE_SCOPE int TclNokia770Doubles(void);
|
||||
MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr);
|
||||
MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr);
|
||||
MODULE_SCOPE int TclNamespaceDeleted(Namespace *nsPtr);
|
||||
MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
|
||||
Tcl_Obj *part2Ptr, const char *operation,
|
||||
const char *reason, int index);
|
||||
@@ -3199,10 +3201,29 @@ MODULE_SCOPE int TclpLoadMemory(Tcl_Interp *interp, void *buffer,
|
||||
MODULE_SCOPE void TclInitThreadStorage(void);
|
||||
MODULE_SCOPE void TclFinalizeThreadDataThread(void);
|
||||
MODULE_SCOPE void TclFinalizeThreadStorage(void);
|
||||
|
||||
/* TclWideMUInt -- wide integer used for measurement calculations: */
|
||||
#if (!defined(_WIN32) || !defined(_MSC_VER) || (_MSC_VER >= 1400))
|
||||
# define TclWideMUInt Tcl_WideUInt
|
||||
#else
|
||||
/* older MSVS may not allow conversions between unsigned __int64 and double) */
|
||||
# define TclWideMUInt Tcl_WideInt
|
||||
#endif
|
||||
#ifdef TCL_WIDE_CLICKS
|
||||
MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
|
||||
MODULE_SCOPE double TclpWideClicksToNanoseconds(Tcl_WideInt clicks);
|
||||
MODULE_SCOPE double TclpWideClickInMicrosec(void);
|
||||
#else
|
||||
# ifdef _WIN32
|
||||
# define TCL_WIDE_CLICKS 1
|
||||
MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void);
|
||||
MODULE_SCOPE double TclpWideClickInMicrosec(void);
|
||||
# define TclpWideClicksToNanoseconds(clicks) \
|
||||
((double)(clicks) * TclpWideClickInMicrosec() * 1000)
|
||||
# endif
|
||||
#endif
|
||||
MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void);
|
||||
|
||||
MODULE_SCOPE int TclZlibInit(Tcl_Interp *interp);
|
||||
MODULE_SCOPE void * TclpThreadCreateKey(void);
|
||||
MODULE_SCOPE void TclpThreadDeleteKey(void *keyPtr);
|
||||
@@ -3472,6 +3493,9 @@ MODULE_SCOPE int Tcl_ThrowObjCmd(ClientData dummy, Tcl_Interp *interp,
|
||||
MODULE_SCOPE int Tcl_TimeObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int Tcl_TimeRateObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int Tcl_TraceObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
@@ -3927,39 +3951,21 @@ MODULE_SCOPE int TclDivOpCmd(ClientData clientData,
|
||||
MODULE_SCOPE int TclCompileDivOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclLessOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileLessOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclLeqOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileLeqOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclGreaterOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileGreaterOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclGeqOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileGeqOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclEqOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileEqOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
MODULE_SCOPE int TclStreqOpCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
MODULE_SCOPE int TclCompileStreqOpCmd(Tcl_Interp *interp,
|
||||
Tcl_Parse *parsePtr, Command *cmdPtr,
|
||||
struct CompileEnv *envPtr);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#ifndef _TCLINTDECLS
|
||||
#define _TCLINTDECLS
|
||||
|
||||
#include "tclPort.h"
|
||||
|
||||
#undef TCL_STORAGE_CLASS
|
||||
#ifdef BUILD_tcl
|
||||
|
||||
+17
-1
@@ -23,6 +23,7 @@
|
||||
|
||||
typedef struct Link {
|
||||
Tcl_Interp *interp; /* Interpreter containing Tcl variable. */
|
||||
Namespace *nsPtr; /* Namespace containing Tcl variable */
|
||||
Tcl_Obj *varName; /* Name of variable (must be global). This is
|
||||
* needed during trace callbacks, since the
|
||||
* actual variable may be aliased at that time
|
||||
@@ -113,6 +114,8 @@ Tcl_LinkVar(
|
||||
{
|
||||
Tcl_Obj *objPtr;
|
||||
Link *linkPtr;
|
||||
Namespace *dummy;
|
||||
const char *name;
|
||||
int code;
|
||||
|
||||
linkPtr = (Link *) Tcl_VarTraceInfo2(interp, varName, NULL,
|
||||
@@ -125,6 +128,7 @@ Tcl_LinkVar(
|
||||
|
||||
linkPtr = ckalloc(sizeof(Link));
|
||||
linkPtr->interp = interp;
|
||||
linkPtr->nsPtr = NULL;
|
||||
linkPtr->varName = Tcl_NewStringObj(varName, -1);
|
||||
Tcl_IncrRefCount(linkPtr->varName);
|
||||
linkPtr->addr = addr;
|
||||
@@ -141,11 +145,17 @@ Tcl_LinkVar(
|
||||
ckfree(linkPtr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
TclGetNamespaceForQualName(interp, varName, NULL, TCL_GLOBAL_ONLY,
|
||||
&(linkPtr->nsPtr), &dummy, &dummy, &name);
|
||||
linkPtr->nsPtr->refCount++;
|
||||
|
||||
code = Tcl_TraceVar2(interp, varName, NULL,
|
||||
TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
|
||||
LinkTraceProc, linkPtr);
|
||||
if (code != TCL_OK) {
|
||||
Tcl_DecrRefCount(linkPtr->varName);
|
||||
TclNsDecrRefCount(linkPtr->nsPtr);
|
||||
ckfree(linkPtr);
|
||||
}
|
||||
return code;
|
||||
@@ -184,6 +194,9 @@ Tcl_UnlinkVar(
|
||||
TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
|
||||
LinkTraceProc, linkPtr);
|
||||
Tcl_DecrRefCount(linkPtr->varName);
|
||||
if (linkPtr->nsPtr) {
|
||||
TclNsDecrRefCount(linkPtr->nsPtr);
|
||||
}
|
||||
ckfree(linkPtr);
|
||||
}
|
||||
|
||||
@@ -277,8 +290,11 @@ LinkTraceProc(
|
||||
*/
|
||||
|
||||
if (flags & TCL_TRACE_UNSETS) {
|
||||
if (Tcl_InterpDeleted(interp)) {
|
||||
if (Tcl_InterpDeleted(interp) || TclNamespaceDeleted(linkPtr->nsPtr)) {
|
||||
Tcl_DecrRefCount(linkPtr->varName);
|
||||
if (linkPtr->nsPtr) {
|
||||
TclNsDecrRefCount(linkPtr->nsPtr);
|
||||
}
|
||||
ckfree(linkPtr);
|
||||
} else if (flags & TCL_TRACE_DESTROYED) {
|
||||
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
|
||||
|
||||
+25
-8
@@ -136,8 +136,8 @@ NewListIntRep(
|
||||
*
|
||||
* AttemptNewList --
|
||||
*
|
||||
* Like NewListIntRep, but additionally sets an error message on failure.
|
||||
*
|
||||
* Like NewListIntRep, but additionally sets an error message on failure.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -234,12 +234,12 @@ Tcl_NewListObj(
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_DbNewListObj --
|
||||
*
|
||||
*
|
||||
* Like 'Tcl_NewListObj', but it calls Tcl_DbCkalloc directly with the
|
||||
* file name and line number from its caller. This simplifies debugging
|
||||
* since the [memory active] command will report the correct file
|
||||
* name and line number when reporting objects that haven't been freed.
|
||||
*
|
||||
*
|
||||
* When TCL_MEM_DEBUG is not defined, 'Tcl_NewListObj' is called instead.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -695,7 +695,7 @@ Tcl_ListObjAppendElement(
|
||||
* object should be treated as readonly and its 'refCount' is _not_
|
||||
* incremented. The caller must do that if it holds on to the
|
||||
* reference.
|
||||
*
|
||||
*
|
||||
* TCL_ERROR
|
||||
*
|
||||
* 'listPtr' is not a valid list. An an error message is left in the
|
||||
@@ -1331,9 +1331,9 @@ TclLsetList(
|
||||
* reference. The caller is expected to store the result in the
|
||||
* variable and decrement its reference count. (INST_STORE_* does
|
||||
* exactly this.)
|
||||
*
|
||||
*
|
||||
* NULL
|
||||
*
|
||||
*
|
||||
* An error occurred. If 'listPtr' was duplicated, the reference
|
||||
* count on the duplicate is decremented so that it is 0, causing any
|
||||
* memory allocated by this function to be freed.
|
||||
@@ -1990,7 +1990,21 @@ UpdateStringOfList(
|
||||
* Pass 2: copy into string rep buffer.
|
||||
*/
|
||||
|
||||
/*
|
||||
* We used to set the string length here, relying on a presumed
|
||||
* guarantee that the number of bytes TclScanElement() calls reported
|
||||
* to be needed was a precise count and not an over-estimate, so long
|
||||
* as the same flag values were passed to TclConvertElement().
|
||||
*
|
||||
* Then we saw [35a8f1c04a], where a bug in TclScanElement() caused
|
||||
* that guarantee to fail. Rather than trust there are no more bugs,
|
||||
* we set the length after the loop based on what was actually written,
|
||||
* an not on what was predicted.
|
||||
*
|
||||
listPtr->length = bytesNeeded - 1;
|
||||
*
|
||||
*/
|
||||
|
||||
listPtr->bytes = ckalloc(bytesNeeded);
|
||||
dst = listPtr->bytes;
|
||||
for (i = 0; i < numElems; i++) {
|
||||
@@ -1999,7 +2013,10 @@ UpdateStringOfList(
|
||||
dst += TclConvertElement(elem, length, dst, flagPtr[i]);
|
||||
*dst++ = ' ';
|
||||
}
|
||||
listPtr->bytes[listPtr->length] = '\0';
|
||||
dst[-1] = '\0';
|
||||
|
||||
/* Here is the safe setting of the string length. */
|
||||
listPtr->length = dst - 1 - listPtr->bytes;
|
||||
|
||||
if (flagPtr != localFlags) {
|
||||
ckfree(flagPtr);
|
||||
|
||||
+26
-15
@@ -200,25 +200,36 @@ TclCreateLiteral(
|
||||
for (globalPtr=globalTablePtr->buckets[globalHash] ; globalPtr!=NULL;
|
||||
globalPtr = globalPtr->nextPtr) {
|
||||
objPtr = globalPtr->objPtr;
|
||||
if ((globalPtr->nsPtr == nsPtr)
|
||||
&& (objPtr->length == length) && ((length == 0)
|
||||
|| ((objPtr->bytes[0] == bytes[0])
|
||||
&& (memcmp(objPtr->bytes, bytes, (unsigned) length) == 0)))) {
|
||||
if (globalPtr->nsPtr == nsPtr) {
|
||||
/*
|
||||
* A literal was found: return it
|
||||
* Literals should always have UTF-8 representations... but this
|
||||
* is not guaranteed so we need to be careful anyway.
|
||||
*
|
||||
* https://stackoverflow.com/q/54337750/301832
|
||||
*/
|
||||
|
||||
if (newPtr) {
|
||||
*newPtr = 0;
|
||||
int objLength;
|
||||
char *objBytes = TclGetStringFromObj(objPtr, &objLength);
|
||||
|
||||
if ((objLength == length) && ((length == 0)
|
||||
|| ((objBytes[0] == bytes[0])
|
||||
&& (memcmp(objBytes, bytes, (unsigned) length) == 0)))) {
|
||||
/*
|
||||
* A literal was found: return it
|
||||
*/
|
||||
|
||||
if (newPtr) {
|
||||
*newPtr = 0;
|
||||
}
|
||||
if (globalPtrPtr) {
|
||||
*globalPtrPtr = globalPtr;
|
||||
}
|
||||
if (flags & LITERAL_ON_HEAP) {
|
||||
ckfree(bytes);
|
||||
}
|
||||
globalPtr->refCount++;
|
||||
return objPtr;
|
||||
}
|
||||
if (globalPtrPtr) {
|
||||
*globalPtrPtr = globalPtr;
|
||||
}
|
||||
if ((flags & LITERAL_ON_HEAP)) {
|
||||
ckfree(bytes);
|
||||
}
|
||||
globalPtr->refCount++;
|
||||
return objPtr;
|
||||
}
|
||||
}
|
||||
if (!newPtr) {
|
||||
|
||||
@@ -1071,6 +1071,13 @@ Tcl_DeleteNamespace(
|
||||
}
|
||||
TclNsDecrRefCount(nsPtr);
|
||||
}
|
||||
|
||||
int
|
||||
TclNamespaceDeleted(
|
||||
Namespace *nsPtr)
|
||||
{
|
||||
return (nsPtr->flags & NS_DYING) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
|
||||
+117
-59
@@ -365,14 +365,14 @@ InitFoundation(
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&buffer);
|
||||
for (i=0 ; defineCmds[i].name ; i++) {
|
||||
for (i = 0 ; defineCmds[i].name ; i++) {
|
||||
TclDStringAppendLiteral(&buffer, "::oo::define::");
|
||||
Tcl_DStringAppend(&buffer, defineCmds[i].name, -1);
|
||||
Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
|
||||
defineCmds[i].objProc, INT2PTR(defineCmds[i].flag), NULL);
|
||||
Tcl_DStringFree(&buffer);
|
||||
}
|
||||
for (i=0 ; objdefCmds[i].name ; i++) {
|
||||
for (i = 0 ; objdefCmds[i].name ; i++) {
|
||||
TclDStringAppendLiteral(&buffer, "::oo::objdefine::");
|
||||
Tcl_DStringAppend(&buffer, objdefCmds[i].name, -1);
|
||||
Tcl_CreateObjCommand(interp, Tcl_DStringValue(&buffer),
|
||||
@@ -387,30 +387,50 @@ InitFoundation(
|
||||
* spliced manually.
|
||||
*/
|
||||
|
||||
/* Stand up a phony class for bootstrapping. */
|
||||
/*
|
||||
* Stand up a phony class for bootstrapping.
|
||||
*/
|
||||
|
||||
fPtr->objectCls = &fakeCls;
|
||||
/* referenced in TclOOAllocClass to increment the refCount. */
|
||||
|
||||
/*
|
||||
* Referenced in TclOOAllocClass to increment the refCount.
|
||||
*/
|
||||
|
||||
fakeCls.thisPtr = &fakeObject;
|
||||
|
||||
fPtr->objectCls = TclOOAllocClass(interp,
|
||||
AllocObject(interp, "object", (Namespace *)fPtr->ooNs, NULL));
|
||||
/* Corresponding TclOODecrRefCount in KillFoudation */
|
||||
/*
|
||||
* Corresponding TclOODecrRefCount in KillFoudation.
|
||||
*/
|
||||
|
||||
AddRef(fPtr->objectCls->thisPtr);
|
||||
|
||||
/* This is why it is unnecessary in this routine to replace the
|
||||
/*
|
||||
* This is why it is unnecessary in this routine to replace the
|
||||
* incremented reference count of fPtr->objectCls that was swallowed by
|
||||
* fakeObject. */
|
||||
* fakeObject.
|
||||
*/
|
||||
|
||||
fPtr->objectCls->superclasses.num = 0;
|
||||
ckfree(fPtr->objectCls->superclasses.list);
|
||||
fPtr->objectCls->superclasses.list = NULL;
|
||||
|
||||
/* special initialization for the primordial objects */
|
||||
/*
|
||||
* Special initialization for the primordial objects.
|
||||
*/
|
||||
|
||||
fPtr->objectCls->thisPtr->flags |= ROOT_OBJECT;
|
||||
fPtr->objectCls->flags |= ROOT_OBJECT;
|
||||
|
||||
fPtr->classCls = TclOOAllocClass(interp,
|
||||
AllocObject(interp, "class", (Namespace *)fPtr->ooNs, NULL));
|
||||
/* Corresponding TclOODecrRefCount in KillFoudation */
|
||||
|
||||
/*
|
||||
* Corresponding TclOODecrRefCount in KillFoudation.
|
||||
*/
|
||||
|
||||
AddRef(fPtr->classCls->thisPtr);
|
||||
|
||||
/*
|
||||
@@ -421,7 +441,10 @@ InitFoundation(
|
||||
* KillFoundation.
|
||||
*/
|
||||
|
||||
/* Rewire bootstrapped objects. */
|
||||
/*
|
||||
* Rewire bootstrapped objects.
|
||||
*/
|
||||
|
||||
fPtr->objectCls->thisPtr->selfCls = fPtr->classCls;
|
||||
AddRef(fPtr->classCls->thisPtr);
|
||||
TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls);
|
||||
@@ -433,17 +456,20 @@ InitFoundation(
|
||||
fPtr->classCls->thisPtr->flags |= ROOT_CLASS;
|
||||
fPtr->classCls->flags |= ROOT_CLASS;
|
||||
|
||||
/* Standard initialization for new Objects */
|
||||
/*
|
||||
* Standard initialization for new Objects.
|
||||
*/
|
||||
|
||||
TclOOAddToSubclasses(fPtr->classCls, fPtr->objectCls);
|
||||
|
||||
/*
|
||||
* Basic method declarations for the core classes.
|
||||
*/
|
||||
|
||||
for (i=0 ; objMethods[i].name ; i++) {
|
||||
for (i = 0 ; objMethods[i].name ; i++) {
|
||||
TclOONewBasicMethod(interp, fPtr->objectCls, &objMethods[i]);
|
||||
}
|
||||
for (i=0 ; clsMethods[i].name ; i++) {
|
||||
for (i = 0 ; clsMethods[i].name ; i++) {
|
||||
TclOONewBasicMethod(interp, fPtr->classCls, &clsMethods[i]);
|
||||
}
|
||||
|
||||
@@ -467,7 +493,7 @@ InitFoundation(
|
||||
|
||||
TclNewLiteralStringObj(namePtr, "new");
|
||||
Tcl_NewInstanceMethod(interp, (Tcl_Object) fPtr->classCls->thisPtr,
|
||||
namePtr /* keeps ref */, 0 /* ==private */, NULL, NULL);
|
||||
namePtr /* keeps ref */, 0 /* private */, NULL, NULL);
|
||||
fPtr->classCls->constructorPtr = (Method *) Tcl_NewMethod(interp,
|
||||
(Tcl_Class) fPtr->classCls, NULL, 0, &classConstructor, NULL);
|
||||
|
||||
@@ -651,10 +677,8 @@ AllocObject(
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
|
||||
|
||||
configNamespace:
|
||||
|
||||
((Namespace *)oPtr->namespacePtr)->refCount++;
|
||||
((Namespace *) oPtr->namespacePtr)->refCount++;
|
||||
|
||||
/*
|
||||
* Make the namespace know about the helper commands. This grants access
|
||||
@@ -692,7 +716,7 @@ AllocObject(
|
||||
/*
|
||||
* An object starts life with a refCount of 2 to mark the two stages of
|
||||
* destruction it occur: A call to ObjectRenamedTrace(), and a call to
|
||||
* ObjectNamespaceDeleted().
|
||||
* ObjectNamespaceDeleted().
|
||||
*/
|
||||
oPtr->refCount = 2;
|
||||
|
||||
@@ -847,10 +871,14 @@ TclOODeleteDescendants(
|
||||
|
||||
if (clsPtr->mixinSubs.num > 0) {
|
||||
while (clsPtr->mixinSubs.num > 0) {
|
||||
mixinSubclassPtr = clsPtr->mixinSubs.list[clsPtr->mixinSubs.num-1];
|
||||
/* This condition also covers the case where mixinSubclassPtr ==
|
||||
mixinSubclassPtr =
|
||||
clsPtr->mixinSubs.list[clsPtr->mixinSubs.num - 1];
|
||||
|
||||
/*
|
||||
* This condition also covers the case where mixinSubclassPtr ==
|
||||
* clsPtr
|
||||
*/
|
||||
|
||||
if (!Deleted(mixinSubclassPtr->thisPtr)
|
||||
&& !(mixinSubclassPtr->thisPtr->flags & DONT_DELETE)) {
|
||||
Tcl_DeleteCommandFromToken(interp,
|
||||
@@ -869,7 +897,7 @@ TclOODeleteDescendants(
|
||||
|
||||
if (clsPtr->subclasses.num > 0) {
|
||||
while (clsPtr->subclasses.num > 0) {
|
||||
subclassPtr = clsPtr->subclasses.list[clsPtr->subclasses.num-1];
|
||||
subclassPtr = clsPtr->subclasses.list[clsPtr->subclasses.num - 1];
|
||||
if (!Deleted(subclassPtr->thisPtr) && !IsRoot(subclassPtr)
|
||||
&& !(subclassPtr->thisPtr->flags & DONT_DELETE)) {
|
||||
Tcl_DeleteCommandFromToken(interp,
|
||||
@@ -890,8 +918,12 @@ TclOODeleteDescendants(
|
||||
|
||||
if (clsPtr->instances.num > 0) {
|
||||
while (clsPtr->instances.num > 0) {
|
||||
instancePtr = clsPtr->instances.list[clsPtr->instances.num-1];
|
||||
/* This condition also covers the case where instancePtr == oPtr */
|
||||
instancePtr = clsPtr->instances.list[clsPtr->instances.num - 1];
|
||||
|
||||
/*
|
||||
* This condition also covers the case where instancePtr == oPtr
|
||||
*/
|
||||
|
||||
if (!Deleted(instancePtr) && !IsRoot(instancePtr) &&
|
||||
!(instancePtr->flags & DONT_DELETE)) {
|
||||
Tcl_DeleteCommandFromToken(interp, instancePtr->command);
|
||||
@@ -905,7 +937,6 @@ TclOODeleteDescendants(
|
||||
clsPtr->instances.size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
@@ -924,7 +955,7 @@ TclOOReleaseClassContents(
|
||||
Object *oPtr) /* The object representing the class. */
|
||||
{
|
||||
FOREACH_HASH_DECLS;
|
||||
int i;
|
||||
int i;
|
||||
Class *clsPtr = oPtr->classPtr, *tmpClsPtr;
|
||||
Method *mPtr;
|
||||
Foundation *fPtr = oPtr->fPtr;
|
||||
@@ -1035,7 +1066,6 @@ TclOOReleaseClassContents(
|
||||
if (IsRootClass(oPtr) && !Deleted(fPtr->objectCls->thisPtr)) {
|
||||
Tcl_DeleteCommandFromToken(interp, fPtr->objectCls->thisPtr->command);
|
||||
}
|
||||
oPtr->classPtr = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1066,7 +1096,8 @@ ObjectNamespaceDeleted(
|
||||
int i;
|
||||
|
||||
if (Deleted(oPtr)) {
|
||||
/* To do: Can ObjectNamespaceDeleted ever be called twice? If not,
|
||||
/*
|
||||
* TODO: Can ObjectNamespaceDeleted ever be called twice? If not,
|
||||
* this guard could be removed.
|
||||
*/
|
||||
return;
|
||||
@@ -1079,7 +1110,10 @@ ObjectNamespaceDeleted(
|
||||
*/
|
||||
oPtr->flags |= OBJECT_DELETED;
|
||||
|
||||
/* Let the dominoes fall */
|
||||
/*
|
||||
* Let the dominoes fall!
|
||||
*/
|
||||
|
||||
if (oPtr->classPtr) {
|
||||
TclOODeleteDescendants(interp, oPtr);
|
||||
}
|
||||
@@ -1090,12 +1124,13 @@ ObjectNamespaceDeleted(
|
||||
* in that case when the destructor is partially deleted before the uses
|
||||
* of it have gone. [Bug 2949397]
|
||||
*/
|
||||
|
||||
if (!Tcl_InterpDeleted(interp) && !(oPtr->flags & DESTRUCTOR_CALLED)) {
|
||||
CallContext *contextPtr =
|
||||
TclOOGetCallContext(oPtr, NULL, DESTRUCTOR, NULL);
|
||||
int result;
|
||||
|
||||
Tcl_InterpState state;
|
||||
|
||||
oPtr->flags |= DESTRUCTOR_CALLED;
|
||||
|
||||
if (contextPtr != NULL) {
|
||||
@@ -1114,12 +1149,12 @@ ObjectNamespaceDeleted(
|
||||
|
||||
/*
|
||||
* Instruct everyone to no longer use any allocated fields of the object.
|
||||
* Also delete the command that refers to the object at this point (if
|
||||
* it still exists) because otherwise its pointer to the object
|
||||
* points into freed memory.
|
||||
* Also delete the command that refers to the object at this point (if it
|
||||
* still exists) because otherwise its pointer to the object points into
|
||||
* freed memory.
|
||||
*/
|
||||
|
||||
if (((Command *)oPtr->command)->flags && CMD_IS_DELETED) {
|
||||
if (((Command *) oPtr->command)->flags && CMD_IS_DELETED) {
|
||||
/*
|
||||
* Something has already started the command deletion process. We can
|
||||
* go ahead and clean up the the namespace,
|
||||
@@ -1129,6 +1164,7 @@ ObjectNamespaceDeleted(
|
||||
* The namespace must have been deleted directly. Delete the command
|
||||
* as well.
|
||||
*/
|
||||
|
||||
Tcl_DeleteCommandFromToken(oPtr->fPtr->interp, oPtr->command);
|
||||
}
|
||||
|
||||
@@ -1141,7 +1177,7 @@ ObjectNamespaceDeleted(
|
||||
* methods on the object.
|
||||
*/
|
||||
|
||||
/* To do: Should this be protected with a * !IsRoot() condition? */
|
||||
/* TODO: Should this be protected with a !IsRoot() condition? */
|
||||
TclOORemoveFromInstances(oPtr, oPtr->selfCls);
|
||||
|
||||
if (oPtr->mixins.num > 0) {
|
||||
@@ -1149,7 +1185,9 @@ ObjectNamespaceDeleted(
|
||||
TclOORemoveFromInstances(oPtr, mixinPtr);
|
||||
TclOODecrRefCount(mixinPtr->thisPtr);
|
||||
}
|
||||
ckfree(oPtr->mixins.list);
|
||||
if (oPtr->mixins.list != NULL) {
|
||||
ckfree(oPtr->mixins.list);
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH(filterObj, oPtr->filters) {
|
||||
@@ -1195,7 +1233,7 @@ ObjectNamespaceDeleted(
|
||||
/*
|
||||
* Because an object can be a class that is an instance of itself, the
|
||||
* class object's class structure should only be cleaned after most of
|
||||
* the cleanup on the object is done.
|
||||
* the cleanup on the object is done.
|
||||
*
|
||||
* The class of objects needs some special care; if it is deleted (and
|
||||
* we're not killing the whole interpreter) we force the delete of the
|
||||
@@ -1248,10 +1286,13 @@ int TclOODecrRefCount(Object *oPtr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* setting the "empty" location to NULL makes debugging a little easier */
|
||||
#define REMOVEBODY { \
|
||||
/*
|
||||
* Setting the "empty" location to NULL makes debugging a little easier.
|
||||
*/
|
||||
|
||||
#define REMOVEBODY { \
|
||||
for (; idx < num - 1; idx++) { \
|
||||
list[idx] = list[idx+1]; \
|
||||
list[idx] = list[idx + 1]; \
|
||||
} \
|
||||
list[idx] = NULL; \
|
||||
return; \
|
||||
@@ -1350,6 +1391,10 @@ TclOORemoveFromMixins(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (oPtr->mixins.num == 0) {
|
||||
ckfree(oPtr->mixins.list);
|
||||
oPtr->mixins.list = NULL;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -1685,7 +1730,6 @@ TclNRNewObjectInstance(
|
||||
TclPushTailcallPoint(interp);
|
||||
return TclOOInvokeContext(contextPtr, interp, objc, objv);
|
||||
}
|
||||
|
||||
|
||||
Object *
|
||||
TclNewObjectInstanceCommon(
|
||||
@@ -1700,21 +1744,17 @@ TclNewObjectInstanceCommon(
|
||||
const char *simpleName = NULL;
|
||||
Namespace *nsPtr = NULL, *dummy,
|
||||
*inNsPtr = (Namespace *)TclGetCurrentNamespace(interp);
|
||||
int isNew;
|
||||
|
||||
if (nameStr) {
|
||||
TclGetNamespaceForQualName(interp, nameStr, inNsPtr, TCL_CREATE_NS_IF_UNKNOWN,
|
||||
&nsPtr, &dummy, &dummy, &simpleName);
|
||||
TclGetNamespaceForQualName(interp, nameStr, inNsPtr,
|
||||
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy, &dummy, &simpleName);
|
||||
|
||||
/*
|
||||
* Disallow creation of an object over an existing command.
|
||||
*/
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, simpleName, &isNew);
|
||||
if (isNew) {
|
||||
/* Just kidding */
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
} else {
|
||||
hPtr = Tcl_FindHashEntry(&nsPtr->cmdTable, simpleName);
|
||||
if (hPtr) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"can't create object \"%s\": command already exists with"
|
||||
" that name", nameStr));
|
||||
@@ -1731,6 +1771,7 @@ TclNewObjectInstanceCommon(
|
||||
oPtr->selfCls = classPtr;
|
||||
AddRef(classPtr->thisPtr);
|
||||
TclOOAddToInstances(oPtr, classPtr);
|
||||
|
||||
/*
|
||||
* Check to see if we're really creating a class. If so, allocate the
|
||||
* class structure as well.
|
||||
@@ -1752,8 +1793,6 @@ TclNewObjectInstanceCommon(
|
||||
return oPtr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
FinalizeAlloc(
|
||||
ClientData data[],
|
||||
@@ -1789,13 +1828,21 @@ FinalizeAlloc(
|
||||
(void) TclOOObjectName(interp, oPtr);
|
||||
Tcl_DeleteCommandFromToken(interp, oPtr->command);
|
||||
}
|
||||
/* This decrements the refcount of oPtr */
|
||||
|
||||
/*
|
||||
* This decrements the refcount of oPtr.
|
||||
*/
|
||||
|
||||
TclOODeleteContext(contextPtr);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_RestoreInterpState(interp, state);
|
||||
*objectPtr = (Tcl_Object) oPtr;
|
||||
/* This decrements the refcount of oPtr */
|
||||
|
||||
/*
|
||||
* This decrements the refcount of oPtr.
|
||||
*/
|
||||
|
||||
TclOODeleteContext(contextPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -1880,7 +1927,11 @@ Tcl_CopyObjectInstance(
|
||||
if (mixinPtr && mixinPtr != o2Ptr->selfCls) {
|
||||
TclOOAddToInstances(o2Ptr, mixinPtr);
|
||||
}
|
||||
/* For the reference just created in DUPLICATE */
|
||||
|
||||
/*
|
||||
* For the reference just created in DUPLICATE.
|
||||
*/
|
||||
|
||||
AddRef(mixinPtr->thisPtr);
|
||||
}
|
||||
|
||||
@@ -1910,7 +1961,8 @@ Tcl_CopyObjectInstance(
|
||||
*/
|
||||
|
||||
o2Ptr->flags = oPtr->flags & ~(
|
||||
OBJECT_DELETED | ROOT_OBJECT | ROOT_CLASS | FILTER_HANDLING);
|
||||
OBJECT_DELETED | ROOT_OBJECT | ROOT_CLASS | FILTER_HANDLING);
|
||||
|
||||
/*
|
||||
* Copy the object's metadata.
|
||||
*/
|
||||
@@ -1974,9 +2026,11 @@ Tcl_CopyObjectInstance(
|
||||
FOREACH(superPtr, cls2Ptr->superclasses) {
|
||||
TclOOAddToSubclasses(cls2Ptr, superPtr);
|
||||
|
||||
/* For the new item in cls2Ptr->superclasses that memcpy just
|
||||
* created
|
||||
/*
|
||||
* For the new item in cls2Ptr->superclasses that memcpy just
|
||||
* created.
|
||||
*/
|
||||
|
||||
AddRef(superPtr->thisPtr);
|
||||
}
|
||||
|
||||
@@ -2013,7 +2067,11 @@ Tcl_CopyObjectInstance(
|
||||
DUPLICATE(cls2Ptr->mixins, clsPtr->mixins, Class *);
|
||||
FOREACH(mixinPtr, cls2Ptr->mixins) {
|
||||
TclOOAddToMixinSubs(cls2Ptr, mixinPtr);
|
||||
/* For the copy just created in DUPLICATE */
|
||||
|
||||
/*
|
||||
* For the copy just created in DUPLICATE.
|
||||
*/
|
||||
|
||||
AddRef(mixinPtr->thisPtr);
|
||||
}
|
||||
|
||||
@@ -2614,7 +2672,7 @@ Tcl_ObjectContextInvokeNext(
|
||||
int savedSkip = contextPtr->skip;
|
||||
int result;
|
||||
|
||||
if (contextPtr->index+1 >= contextPtr->callPtr->numChain) {
|
||||
if (contextPtr->index + 1 >= contextPtr->callPtr->numChain) {
|
||||
/*
|
||||
* We're at the end of the chain; generate an error message unless the
|
||||
* interpreter is being torn down, in which case we might be getting
|
||||
@@ -2683,7 +2741,7 @@ TclNRObjectContextInvokeNext(
|
||||
{
|
||||
register CallContext *contextPtr = (CallContext *) context;
|
||||
|
||||
if (contextPtr->index+1 >= contextPtr->callPtr->numChain) {
|
||||
if (contextPtr->index + 1 >= contextPtr->callPtr->numChain) {
|
||||
/*
|
||||
* We're at the end of the chain; generate an error message unless the
|
||||
* interpreter is being torn down, in which case we might be getting
|
||||
|
||||
+22
-11
@@ -110,7 +110,11 @@ TclOODeleteContext(
|
||||
TclOODeleteChain(contextPtr->callPtr);
|
||||
if (oPtr != NULL) {
|
||||
TclStackFree(oPtr->fPtr->interp, contextPtr);
|
||||
/* Corresponding AddRef() in TclOO.c/TclOOObjectCmdCore */
|
||||
|
||||
/*
|
||||
* Corresponding AddRef() in TclOO.c/TclOOObjectCmdCore
|
||||
*/
|
||||
|
||||
TclOODecrRefCount(oPtr);
|
||||
}
|
||||
}
|
||||
@@ -265,7 +269,7 @@ TclOOInvokeContext(
|
||||
if (contextPtr->index == 0) {
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<contextPtr->callPtr->numChain ; i++) {
|
||||
for (i = 0 ; i < contextPtr->callPtr->numChain ; i++) {
|
||||
AddRef(contextPtr->callPtr->chain[i].mPtr);
|
||||
}
|
||||
|
||||
@@ -343,7 +347,7 @@ FinalizeMethodRefs(
|
||||
CallContext *contextPtr = data[0];
|
||||
int i;
|
||||
|
||||
for (i=0 ; i<contextPtr->callPtr->numChain ; i++) {
|
||||
for (i = 0 ; i < contextPtr->callPtr->numChain ; i++) {
|
||||
TclOODelMethodRef(contextPtr->callPtr->chain[i].mPtr);
|
||||
}
|
||||
return result;
|
||||
@@ -568,7 +572,10 @@ TclOOGetSortedClassMethodList(
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Comparator for GetSortedMethodList */
|
||||
/*
|
||||
* Comparator for GetSortedMethodList
|
||||
*/
|
||||
|
||||
static int
|
||||
CmpStr(
|
||||
const void *ptr1,
|
||||
@@ -577,7 +584,7 @@ CmpStr(
|
||||
const char **strPtr1 = (const char **) ptr1;
|
||||
const char **strPtr2 = (const char **) ptr2;
|
||||
|
||||
return TclpUtfNcmp2(*strPtr1, *strPtr2, strlen(*strPtr1)+1);
|
||||
return TclpUtfNcmp2(*strPtr1, *strPtr2, strlen(*strPtr1) + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -824,7 +831,7 @@ AddMethodToCallChain(
|
||||
* any leading filters.
|
||||
*/
|
||||
|
||||
for (i=cbPtr->filterLength ; i<callPtr->numChain ; i++) {
|
||||
for (i = cbPtr->filterLength ; i < callPtr->numChain ; i++) {
|
||||
if (callPtr->chain[i].mPtr == mPtr &&
|
||||
callPtr->chain[i].isFilter == (doneFilters != NULL)) {
|
||||
/*
|
||||
@@ -836,8 +843,8 @@ AddMethodToCallChain(
|
||||
|
||||
Class *declCls = callPtr->chain[i].filterDeclarer;
|
||||
|
||||
for (; i+1<callPtr->numChain ; i++) {
|
||||
callPtr->chain[i] = callPtr->chain[i+1];
|
||||
for (; i + 1 < callPtr->numChain ; i++) {
|
||||
callPtr->chain[i] = callPtr->chain[i + 1];
|
||||
}
|
||||
callPtr->chain[i].mPtr = mPtr;
|
||||
callPtr->chain[i].isFilter = (doneFilters != NULL);
|
||||
@@ -854,7 +861,7 @@ AddMethodToCallChain(
|
||||
|
||||
if (callPtr->numChain == CALL_CHAIN_STATIC_SIZE) {
|
||||
callPtr->chain =
|
||||
ckalloc(sizeof(struct MInvoke) * (callPtr->numChain+1));
|
||||
ckalloc(sizeof(struct MInvoke) * (callPtr->numChain + 1));
|
||||
memcpy(callPtr->chain, callPtr->staticChain,
|
||||
sizeof(struct MInvoke) * callPtr->numChain);
|
||||
} else if (callPtr->numChain > CALL_CHAIN_STATIC_SIZE) {
|
||||
@@ -1172,7 +1179,11 @@ TclOOGetCallContext(
|
||||
returnContext:
|
||||
contextPtr = TclStackAlloc(oPtr->fPtr->interp, sizeof(CallContext));
|
||||
contextPtr->oPtr = oPtr;
|
||||
/* Corresponding TclOODecrRefCount() in TclOODeleteContext */
|
||||
|
||||
/*
|
||||
* Corresponding TclOODecrRefCount() in TclOODeleteContext
|
||||
*/
|
||||
|
||||
AddRef(oPtr);
|
||||
contextPtr->callPtr = callPtr;
|
||||
contextPtr->skip = 2;
|
||||
@@ -1528,7 +1539,7 @@ TclOORenderCallChain(
|
||||
*/
|
||||
|
||||
objv = TclStackAlloc(interp, callPtr->numChain * sizeof(Tcl_Obj *));
|
||||
for (i=0 ; i<callPtr->numChain ; i++) {
|
||||
for (i = 0 ; i < callPtr->numChain ; i++) {
|
||||
struct MInvoke *miPtr = &callPtr->chain[i];
|
||||
|
||||
descObjs[0] = miPtr->isFilter
|
||||
|
||||
+63
-37
@@ -40,6 +40,12 @@ struct DeclaredSlot {
|
||||
{TCL_OO_METHOD_VERSION_CURRENT, "core method: " name " Setter", \
|
||||
setter, NULL, NULL}}
|
||||
|
||||
/*
|
||||
* A [string match] pattern used to determine if a method should be exported.
|
||||
*/
|
||||
|
||||
#define PUBLIC_PATTERN "[a-z]*"
|
||||
|
||||
/*
|
||||
* Forward declarations.
|
||||
*/
|
||||
@@ -232,7 +238,7 @@ TclOOObjectSetFilters(
|
||||
} else {
|
||||
filtersList = ckrealloc(oPtr->filters.list, size);
|
||||
}
|
||||
for (i=0 ; i<numFilters ; i++) {
|
||||
for (i = 0 ; i < numFilters ; i++) {
|
||||
filtersList[i] = filters[i];
|
||||
Tcl_IncrRefCount(filters[i]);
|
||||
}
|
||||
@@ -290,7 +296,7 @@ TclOOClassSetFilters(
|
||||
} else {
|
||||
filtersList = ckrealloc(classPtr->filters.list, size);
|
||||
}
|
||||
for (i=0 ; i<numFilters ; i++) {
|
||||
for (i = 0 ; i < numFilters ; i++) {
|
||||
filtersList[i] = filters[i];
|
||||
Tcl_IncrRefCount(filters[i]);
|
||||
}
|
||||
@@ -352,7 +358,11 @@ TclOOObjectSetMixins(
|
||||
FOREACH(mixinPtr, oPtr->mixins) {
|
||||
if (mixinPtr != oPtr->selfCls) {
|
||||
TclOOAddToInstances(oPtr, mixinPtr);
|
||||
/* For the new copy created by memcpy */
|
||||
|
||||
/*
|
||||
* For the new copy created by memcpy().
|
||||
*/
|
||||
|
||||
AddRef(mixinPtr->thisPtr);
|
||||
}
|
||||
}
|
||||
@@ -403,7 +413,11 @@ TclOOClassSetMixins(
|
||||
memcpy(classPtr->mixins.list, mixins, sizeof(Class *) * numMixins);
|
||||
FOREACH(mixinPtr, classPtr->mixins) {
|
||||
TclOOAddToMixinSubs(classPtr, mixinPtr);
|
||||
/* For the new copy created by memcpy */
|
||||
|
||||
/*
|
||||
* For the new copy created by memcpy.
|
||||
*/
|
||||
|
||||
AddRef(mixinPtr->thisPtr);
|
||||
}
|
||||
}
|
||||
@@ -556,15 +570,16 @@ TclOOUnknownDefinition(
|
||||
* Got one match, and only one match!
|
||||
*/
|
||||
|
||||
Tcl_Obj **newObjv = TclStackAlloc(interp, sizeof(Tcl_Obj*)*(objc-1));
|
||||
Tcl_Obj **newObjv =
|
||||
TclStackAlloc(interp, sizeof(Tcl_Obj*) * (objc - 1));
|
||||
int result;
|
||||
|
||||
newObjv[0] = Tcl_NewStringObj(matchedStr, -1);
|
||||
Tcl_IncrRefCount(newObjv[0]);
|
||||
if (objc > 2) {
|
||||
memcpy(newObjv+1, objv+2, sizeof(Tcl_Obj *) * (objc-2));
|
||||
memcpy(newObjv + 1, objv + 2, sizeof(Tcl_Obj *) * (objc - 2));
|
||||
}
|
||||
result = Tcl_EvalObjv(interp, objc-1, newObjv, 0);
|
||||
result = Tcl_EvalObjv(interp, objc - 1, newObjv, 0);
|
||||
Tcl_DecrRefCount(newObjv[0]);
|
||||
TclStackFree(interp, newObjv);
|
||||
return result;
|
||||
@@ -666,7 +681,9 @@ InitDefineContext(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/* framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules */
|
||||
/*
|
||||
* framePtrPtr is needed to satisfy GCC 3.3's strict aliasing rules.
|
||||
*/
|
||||
|
||||
(void) TclPushStackFrame(interp, (Tcl_CallFrame **) framePtrPtr,
|
||||
namespacePtr, FRAME_IS_OO_DEFINE);
|
||||
@@ -837,17 +854,20 @@ MagicDefinitionInvoke(
|
||||
obj2Ptr = Tcl_NewObj();
|
||||
cmd = FindCommand(interp, objv[cmdIndex], nsPtr);
|
||||
if (cmd == NULL) {
|
||||
/* punt this case! */
|
||||
/*
|
||||
* Punt this case!
|
||||
*/
|
||||
|
||||
Tcl_AppendObjToObj(obj2Ptr, objv[cmdIndex]);
|
||||
} else {
|
||||
Tcl_GetCommandFullName(interp, cmd, obj2Ptr);
|
||||
}
|
||||
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
|
||||
/* TODO: overflow? */
|
||||
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-offset, objv+offset);
|
||||
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc - offset, objv + offset);
|
||||
Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
|
||||
|
||||
result = Tcl_EvalObjv(interp, objc-cmdIndex, objs, TCL_EVAL_INVOKE);
|
||||
result = Tcl_EvalObjv(interp, objc - cmdIndex, objs, TCL_EVAL_INVOKE);
|
||||
if (isRoot) {
|
||||
TclResetRewriteEnsemble(interp, 1);
|
||||
}
|
||||
@@ -1157,6 +1177,8 @@ TclOODefineClassObjCmd(
|
||||
TclOODeleteDescendants(interp, oPtr);
|
||||
oPtr->flags &= ~DONT_DELETE;
|
||||
TclOOReleaseClassContents(interp, oPtr);
|
||||
ckfree(oPtr->classPtr);
|
||||
oPtr->classPtr = NULL;
|
||||
} else if (!wasClass && willBeClass) {
|
||||
TclOOAllocClass(interp, oPtr);
|
||||
}
|
||||
@@ -1275,7 +1297,7 @@ TclOODefineDeleteMethodObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
for (i=1 ; i<objc ; i++) {
|
||||
for (i = 1; i < objc; i++) {
|
||||
/*
|
||||
* Delete the method structure from the appropriate hash table.
|
||||
*/
|
||||
@@ -1399,7 +1421,7 @@ TclOODefineExportObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
for (i=1 ; i<objc ; i++) {
|
||||
for (i = 1; i < objc; i++) {
|
||||
/*
|
||||
* Exporting is done by adding the PUBLIC_METHOD flag to the method
|
||||
* record. If there is no such method in this object or class (i.e.
|
||||
@@ -1490,14 +1512,14 @@ TclOODefineForwardObjCmd(
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
isPublic = Tcl_StringMatch(TclGetString(objv[1]), "[a-z]*")
|
||||
isPublic = Tcl_StringMatch(TclGetString(objv[1]), PUBLIC_PATTERN)
|
||||
? PUBLIC_METHOD : 0;
|
||||
|
||||
/*
|
||||
* Create the method structure.
|
||||
*/
|
||||
|
||||
prefixObj = Tcl_NewListObj(objc-2, objv+2);
|
||||
prefixObj = Tcl_NewListObj(objc - 2, objv + 2);
|
||||
if (isInstanceForward) {
|
||||
mPtr = TclOONewForwardInstanceMethod(interp, oPtr, isPublic, objv[1],
|
||||
prefixObj);
|
||||
@@ -1548,7 +1570,7 @@ TclOODefineMethodObjCmd(
|
||||
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
isPublic = Tcl_StringMatch(TclGetString(objv[1]), "[a-z]*")
|
||||
isPublic = Tcl_StringMatch(TclGetString(objv[1]), PUBLIC_PATTERN)
|
||||
? PUBLIC_METHOD : 0;
|
||||
|
||||
/*
|
||||
@@ -1666,7 +1688,7 @@ TclOODefineUnexportObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
for (i=1 ; i<objc ; i++) {
|
||||
for (i = 1; i < objc; i++) {
|
||||
/*
|
||||
* Unexporting is done by removing the PUBLIC_METHOD flag from the
|
||||
* method record. If there is no such method in this object or class
|
||||
@@ -1801,7 +1823,7 @@ TclOODefineSlots(
|
||||
Tcl_IncrRefCount(setName);
|
||||
for (slotInfoPtr = slots ; slotInfoPtr->name ; slotInfoPtr++) {
|
||||
Tcl_Object slotObject = Tcl_NewObjectInstance(fPtr->interp,
|
||||
(Tcl_Class) slotCls, slotInfoPtr->name, NULL,-1,NULL,0);
|
||||
(Tcl_Class) slotCls, slotInfoPtr->name, NULL, -1, NULL, 0);
|
||||
|
||||
if (slotObject == NULL) {
|
||||
continue;
|
||||
@@ -1872,7 +1894,7 @@ ClassFilterSet(
|
||||
int filterc;
|
||||
Tcl_Obj **filterv;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"filterList");
|
||||
return TCL_ERROR;
|
||||
@@ -1955,7 +1977,7 @@ ClassMixinSet(
|
||||
Tcl_Obj **mixinv;
|
||||
Class **mixins;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"mixinList");
|
||||
return TCL_ERROR;
|
||||
@@ -1976,7 +1998,7 @@ ClassMixinSet(
|
||||
|
||||
mixins = TclStackAlloc(interp, sizeof(Class *) * mixinc);
|
||||
|
||||
for (i=0 ; i<mixinc ; i++) {
|
||||
for (i = 0; i < mixinc; i++) {
|
||||
mixins[i] = GetClassInOuterContext(interp, mixinv[i],
|
||||
"may only mix in classes");
|
||||
if (mixins[i] == NULL) {
|
||||
@@ -2059,7 +2081,7 @@ ClassSuperSet(
|
||||
Tcl_Obj **superv;
|
||||
Class **superclasses, *superPtr;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"superclassList");
|
||||
return TCL_ERROR;
|
||||
@@ -2106,14 +2128,14 @@ ClassSuperSet(
|
||||
superc = 1;
|
||||
AddRef(superclasses[0]->thisPtr);
|
||||
} else {
|
||||
for (i=0 ; i<superc ; i++) {
|
||||
for (i = 0; i < superc; i++) {
|
||||
superclasses[i] = GetClassInOuterContext(interp, superv[i],
|
||||
"only a class can be a superclass");
|
||||
if (superclasses[i] == NULL) {
|
||||
i--;
|
||||
goto failedAfterAlloc;
|
||||
}
|
||||
for (j=0 ; j<i ; j++) {
|
||||
for (j = 0; j < i; j++) {
|
||||
if (superclasses[j] == superclasses[i]) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"class should only be a direct superclass once",
|
||||
@@ -2133,8 +2155,12 @@ ClassSuperSet(
|
||||
ckfree(superclasses);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
/* Corresponding TclOODecrRefCount() is near the end of this
|
||||
* function */
|
||||
|
||||
/*
|
||||
* Corresponding TclOODecrRefCount() is near the end of this
|
||||
* function.
|
||||
*/
|
||||
|
||||
AddRef(superclasses[i]->thisPtr);
|
||||
}
|
||||
}
|
||||
@@ -2220,7 +2246,7 @@ ClassVarsSet(
|
||||
Tcl_Obj **varv, *variableObj;
|
||||
int i;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"filterList");
|
||||
return TCL_ERROR;
|
||||
@@ -2239,7 +2265,7 @@ ClassVarsSet(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
for (i=0 ; i<varc ; i++) {
|
||||
for (i = 0; i < varc; i++) {
|
||||
const char *varName = Tcl_GetString(varv[i]);
|
||||
|
||||
if (strstr(varName, "::") != NULL) {
|
||||
@@ -2258,7 +2284,7 @@ ClassVarsSet(
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0 ; i<varc ; i++) {
|
||||
for (i = 0; i < varc; i++) {
|
||||
Tcl_IncrRefCount(varv[i]);
|
||||
}
|
||||
FOREACH(variableObj, oPtr->classPtr->variables) {
|
||||
@@ -2283,7 +2309,7 @@ ClassVarsSet(
|
||||
Tcl_HashTable uniqueTable;
|
||||
|
||||
Tcl_InitObjHashTable(&uniqueTable);
|
||||
for (i=n=0 ; i<varc ; i++) {
|
||||
for (i = n = 0; i < varc; i++) {
|
||||
Tcl_CreateHashEntry(&uniqueTable, varv[i], &created);
|
||||
if (created) {
|
||||
oPtr->classPtr->variables.list[n++] = varv[i];
|
||||
@@ -2355,7 +2381,7 @@ ObjFilterSet(
|
||||
int filterc;
|
||||
Tcl_Obj **filterv;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"filterList");
|
||||
return TCL_ERROR;
|
||||
@@ -2428,7 +2454,7 @@ ObjMixinSet(
|
||||
Class **mixins;
|
||||
int i;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"mixinList");
|
||||
return TCL_ERROR;
|
||||
@@ -2443,7 +2469,7 @@ ObjMixinSet(
|
||||
|
||||
mixins = TclStackAlloc(interp, sizeof(Class *) * mixinc);
|
||||
|
||||
for (i=0 ; i<mixinc ; i++) {
|
||||
for (i = 0; i < mixinc; i++) {
|
||||
mixins[i] = GetClassInOuterContext(interp, mixinv[i],
|
||||
"may only mix in classes");
|
||||
if (mixins[i] == NULL) {
|
||||
@@ -2507,7 +2533,7 @@ ObjVarsSet(
|
||||
int varc, i;
|
||||
Tcl_Obj **varv, *variableObj;
|
||||
|
||||
if (Tcl_ObjectContextSkippedArgs(context)+1 != objc) {
|
||||
if (Tcl_ObjectContextSkippedArgs(context) + 1 != objc) {
|
||||
Tcl_WrongNumArgs(interp, Tcl_ObjectContextSkippedArgs(context), objv,
|
||||
"variableList");
|
||||
return TCL_ERROR;
|
||||
@@ -2520,7 +2546,7 @@ ObjVarsSet(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
for (i=0 ; i<varc ; i++) {
|
||||
for (i = 0; i < varc; i++) {
|
||||
const char *varName = Tcl_GetString(varv[i]);
|
||||
|
||||
if (strstr(varName, "::") != NULL) {
|
||||
@@ -2538,7 +2564,7 @@ ObjVarsSet(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
for (i=0 ; i<varc ; i++) {
|
||||
for (i = 0; i < varc; i++) {
|
||||
Tcl_IncrRefCount(varv[i]);
|
||||
}
|
||||
|
||||
@@ -2563,7 +2589,7 @@ ObjVarsSet(
|
||||
Tcl_HashTable uniqueTable;
|
||||
|
||||
Tcl_InitObjHashTable(&uniqueTable);
|
||||
for (i=n=0 ; i<varc ; i++) {
|
||||
for (i = n = 0; i < varc; i++) {
|
||||
Tcl_CreateHashEntry(&uniqueTable, varv[i], &created);
|
||||
if (created) {
|
||||
oPtr->variables.list[n++] = varv[i];
|
||||
|
||||
+8
-6
@@ -114,12 +114,14 @@ TclOOInitInfo(
|
||||
*/
|
||||
|
||||
infoCmd = Tcl_FindCommand(interp, "info", NULL, TCL_GLOBAL_ONLY);
|
||||
Tcl_GetEnsembleMappingDict(NULL, infoCmd, &mapDict);
|
||||
Tcl_DictObjPut(NULL, mapDict, Tcl_NewStringObj("object", -1),
|
||||
Tcl_NewStringObj("::oo::InfoObject", -1));
|
||||
Tcl_DictObjPut(NULL, mapDict, Tcl_NewStringObj("class", -1),
|
||||
Tcl_NewStringObj("::oo::InfoClass", -1));
|
||||
Tcl_SetEnsembleMappingDict(interp, infoCmd, mapDict);
|
||||
if (infoCmd) {
|
||||
Tcl_GetEnsembleMappingDict(NULL, infoCmd, &mapDict);
|
||||
Tcl_DictObjPut(NULL, mapDict, Tcl_NewStringObj("object", -1),
|
||||
Tcl_NewStringObj("::oo::InfoObject", -1));
|
||||
Tcl_DictObjPut(NULL, mapDict, Tcl_NewStringObj("class", -1),
|
||||
Tcl_NewStringObj("::oo::InfoClass", -1));
|
||||
Tcl_SetEnsembleMappingDict(interp, infoCmd, mapDict);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -563,7 +563,7 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr);
|
||||
#define FOREACH(var,ary) \
|
||||
for(i=0 ; i<(ary).num; i++) if ((ary).list[i] == NULL) { \
|
||||
continue; \
|
||||
} else if (var = (ary).list[i], 1)
|
||||
} else if (var = (ary).list[i], 1)
|
||||
|
||||
/*
|
||||
* Convenience macros for iterating through hash tables. FOREACH_HASH_DECLS
|
||||
|
||||
@@ -970,10 +970,8 @@ ProcedureMethodVarResolver(
|
||||
* Must not retain reference to resolved information. [Bug 3105999]
|
||||
*/
|
||||
|
||||
if (rPtr != NULL) {
|
||||
rPtr->deleteProc(rPtr);
|
||||
}
|
||||
return (*varPtr? TCL_OK : TCL_CONTINUE);
|
||||
rPtr->deleteProc(rPtr);
|
||||
return (*varPtr ? TCL_OK : TCL_CONTINUE);
|
||||
}
|
||||
|
||||
static Tcl_Var
|
||||
|
||||
+6
-6
@@ -2476,7 +2476,7 @@ Tcl_SetIntObj(
|
||||
* Success.
|
||||
*
|
||||
* TCL_ERROR
|
||||
*
|
||||
*
|
||||
* An error occurred during conversion or the integral value can not
|
||||
* be represented as an integer (it might be too large). An error
|
||||
* message is left in the interpreter's result if 'interp' is not
|
||||
@@ -2804,8 +2804,8 @@ Tcl_GetLongFromObj(
|
||||
mp_int big;
|
||||
|
||||
UNPACK_BIGNUM(objPtr, big);
|
||||
if ((size_t) big.used <= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1)
|
||||
/ DIGIT_BIT) {
|
||||
if ((size_t) big.used <= (CHAR_BIT * sizeof(long) + MP_DIGIT_BIT - 1)
|
||||
/ MP_DIGIT_BIT) {
|
||||
unsigned long value = 0, numBytes = sizeof(long);
|
||||
long scratch;
|
||||
unsigned char *bytes = (unsigned char *) &scratch;
|
||||
@@ -3104,7 +3104,7 @@ Tcl_GetWideIntFromObj(
|
||||
|
||||
UNPACK_BIGNUM(objPtr, big);
|
||||
if ((size_t) big.used <= (CHAR_BIT * sizeof(Tcl_WideInt)
|
||||
+ DIGIT_BIT - 1) / DIGIT_BIT) {
|
||||
+ MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
|
||||
Tcl_WideUInt value = 0;
|
||||
unsigned long numBytes = sizeof(Tcl_WideInt);
|
||||
Tcl_WideInt scratch;
|
||||
@@ -3523,7 +3523,7 @@ Tcl_SetBignumObj(
|
||||
Tcl_Panic("%s called with shared object", "Tcl_SetBignumObj");
|
||||
}
|
||||
if ((size_t) bignumValue->used
|
||||
<= (CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT) {
|
||||
<= (CHAR_BIT * sizeof(long) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
|
||||
unsigned long value = 0, numBytes = sizeof(long);
|
||||
long scratch;
|
||||
unsigned char *bytes = (unsigned char *) &scratch;
|
||||
@@ -3548,7 +3548,7 @@ Tcl_SetBignumObj(
|
||||
tooLargeForLong:
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
if ((size_t) bignumValue->used
|
||||
<= (CHAR_BIT * sizeof(Tcl_WideInt) + DIGIT_BIT - 1) / DIGIT_BIT) {
|
||||
<= (CHAR_BIT * sizeof(Tcl_WideInt) + MP_DIGIT_BIT - 1) / MP_DIGIT_BIT) {
|
||||
Tcl_WideUInt value = 0;
|
||||
unsigned long numBytes = sizeof(Tcl_WideInt);
|
||||
Tcl_WideInt scratch;
|
||||
|
||||
+6
-6
@@ -613,7 +613,7 @@ Tcl_ParseCommand(
|
||||
|
||||
int
|
||||
TclIsSpaceProc(
|
||||
char byte)
|
||||
int byte)
|
||||
{
|
||||
return CHAR_TYPE(byte) & (TYPE_SPACE) || byte == '\n';
|
||||
}
|
||||
@@ -642,7 +642,7 @@ TclIsSpaceProc(
|
||||
|
||||
int
|
||||
TclIsBareword(
|
||||
char byte)
|
||||
int byte)
|
||||
{
|
||||
if (byte < '0' || byte > 'z') {
|
||||
return 0;
|
||||
@@ -844,7 +844,7 @@ TclParseBackslash(
|
||||
Tcl_UniChar unichar = 0;
|
||||
int result;
|
||||
int count;
|
||||
char buf[TCL_UTF_MAX];
|
||||
char buf[TCL_UTF_MAX] = "";
|
||||
|
||||
if (numBytes == 0) {
|
||||
if (readPtr != NULL) {
|
||||
@@ -993,8 +993,8 @@ TclParseBackslash(
|
||||
}
|
||||
count = Tcl_UniCharToUtf(result, dst);
|
||||
#if TCL_UTF_MAX > 3
|
||||
if (!count) {
|
||||
count = Tcl_UniCharToUtf(-1, dst);
|
||||
if ((result >= 0xD800) && (count < 3)) {
|
||||
count += Tcl_UniCharToUtf(-1, dst + count);
|
||||
}
|
||||
#endif
|
||||
return count;
|
||||
@@ -2217,7 +2217,7 @@ TclSubstTokens(
|
||||
Tcl_Obj *appendObj = NULL;
|
||||
const char *append = NULL;
|
||||
int appendByteLength = 0;
|
||||
char utfCharBytes[TCL_UTF_MAX];
|
||||
char utfCharBytes[TCL_UTF_MAX] = "";
|
||||
|
||||
switch (tokenPtr->type) {
|
||||
case TCL_TOKEN_TEXT:
|
||||
|
||||
+1
-1
@@ -12,6 +12,6 @@
|
||||
#define TYPE_CLOSE_BRACK 0x20
|
||||
#define TYPE_BRACE 0x40
|
||||
|
||||
#define CHAR_TYPE(c) (tclCharTypeTable+128)[(int)(c)]
|
||||
#define CHAR_TYPE(c) (tclCharTypeTable+128)[(unsigned char)(c)]
|
||||
|
||||
MODULE_SCOPE const char tclCharTypeTable[];
|
||||
|
||||
+42
-36
@@ -829,7 +829,7 @@ Tcl_FSJoinPath(
|
||||
* reference count. */
|
||||
int elements) /* Number of elements to use (-1 = all) */
|
||||
{
|
||||
Tcl_Obj *copy, *res;
|
||||
Tcl_Obj *res;
|
||||
int objc;
|
||||
Tcl_Obj **objv;
|
||||
|
||||
@@ -838,17 +838,17 @@ Tcl_FSJoinPath(
|
||||
}
|
||||
|
||||
elements = ((elements >= 0) && (elements <= objc)) ? elements : objc;
|
||||
copy = TclListObjCopy(NULL, listObj);
|
||||
Tcl_ListObjGetElements(NULL, listObj, &objc, &objv);
|
||||
res = TclJoinPath(elements, objv);
|
||||
Tcl_DecrRefCount(copy);
|
||||
res = TclJoinPath(elements, objv, 0);
|
||||
return res;
|
||||
}
|
||||
|
||||
Tcl_Obj *
|
||||
TclJoinPath(
|
||||
int elements,
|
||||
Tcl_Obj * const objv[])
|
||||
int elements, /* Number of elements to use (-1 = all) */
|
||||
Tcl_Obj * const objv[], /* Path elements to join */
|
||||
int forceRelative) /* If non-zero, assume all more paths are
|
||||
* relative (e. g. simple normalization) */
|
||||
{
|
||||
Tcl_Obj *res = NULL;
|
||||
int i;
|
||||
@@ -879,10 +879,13 @@ TclJoinPath(
|
||||
|
||||
if ((elt->typePtr == &tclFsPathType)
|
||||
&& !((elt->bytes != NULL) && (elt->bytes[0] == '\0'))
|
||||
&& TclGetPathType(elt, NULL, NULL, NULL) == TCL_PATH_ABSOLUTE) {
|
||||
Tcl_Obj *tailObj = objv[1];
|
||||
Tcl_PathType type = TclGetPathType(tailObj, NULL, NULL, NULL);
|
||||
&& TclGetPathType(elt, NULL, NULL, NULL) == TCL_PATH_ABSOLUTE) {
|
||||
Tcl_Obj *tailObj = objv[1];
|
||||
Tcl_PathType type;
|
||||
|
||||
/* if forceRelative - second path is relative */
|
||||
type = forceRelative ? TCL_PATH_RELATIVE :
|
||||
TclGetPathType(tailObj, NULL, NULL, NULL);
|
||||
if (type == TCL_PATH_RELATIVE) {
|
||||
const char *str;
|
||||
int len;
|
||||
@@ -960,7 +963,9 @@ TclJoinPath(
|
||||
|
||||
strElt = Tcl_GetStringFromObj(elt, &strEltLen);
|
||||
driveNameLength = 0;
|
||||
type = TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName);
|
||||
/* if forceRelative - all paths excepting first one are relative */
|
||||
type = (forceRelative && (i > 0)) ? TCL_PATH_RELATIVE :
|
||||
TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName);
|
||||
if (type != TCL_PATH_RELATIVE) {
|
||||
/*
|
||||
* Zero out the current result.
|
||||
@@ -1359,6 +1364,7 @@ TclNewFSPathObj(
|
||||
count = 0;
|
||||
state = 1;
|
||||
}
|
||||
break;
|
||||
case 1: /* Scanning for next dirsep */
|
||||
switch (*p) {
|
||||
case '/':
|
||||
@@ -2359,36 +2365,29 @@ SetFsPathFromAny(
|
||||
* Handle tilde substitutions, if needed.
|
||||
*/
|
||||
|
||||
if (name[0] == '~') {
|
||||
if (len && name[0] == '~') {
|
||||
Tcl_DString temp;
|
||||
int split;
|
||||
char separator = '/';
|
||||
|
||||
/*
|
||||
* We have multiple cases '~/foo/bar...', '~user/foo/bar...', etc.
|
||||
* split becomes value 1 for '~/...' as well as for '~'.
|
||||
*/
|
||||
split = FindSplitPos(name, separator);
|
||||
if (split != len) {
|
||||
/*
|
||||
* We have multiple pieces '~user/foo/bar...'
|
||||
*/
|
||||
|
||||
name[split] = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* Do some tilde substitution.
|
||||
*/
|
||||
|
||||
if (name[1] == '\0') {
|
||||
if (split == 1) {
|
||||
/*
|
||||
* We have just '~'
|
||||
* We have just '~' (or '~/...')
|
||||
*/
|
||||
|
||||
const char *dir;
|
||||
Tcl_DString dirString;
|
||||
|
||||
if (split != len) {
|
||||
name[split] = separator;
|
||||
}
|
||||
|
||||
dir = TclGetEnv("HOME", &dirString);
|
||||
if (dir == NULL) {
|
||||
if (interp) {
|
||||
@@ -2408,23 +2407,26 @@ SetFsPathFromAny(
|
||||
* We have a user name '~user'
|
||||
*/
|
||||
|
||||
const char *expandedUser;
|
||||
Tcl_DString userName;
|
||||
|
||||
Tcl_DStringInit(&userName);
|
||||
Tcl_DStringAppend(&userName, name+1, split-1);
|
||||
expandedUser = Tcl_DStringValue(&userName);
|
||||
|
||||
Tcl_DStringInit(&temp);
|
||||
if (TclpGetUserHome(name+1, &temp) == NULL) {
|
||||
if (TclpGetUserHome(expandedUser, &temp) == NULL) {
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"user \"%s\" doesn't exist", name+1));
|
||||
"user \"%s\" doesn't exist", expandedUser));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "PATH", "NOUSER",
|
||||
NULL);
|
||||
}
|
||||
Tcl_DStringFree(&userName);
|
||||
Tcl_DStringFree(&temp);
|
||||
if (split != len) {
|
||||
name[split] = separator;
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (split != len) {
|
||||
name[split] = separator;
|
||||
}
|
||||
Tcl_DStringFree(&userName);
|
||||
}
|
||||
|
||||
transPtr = TclDStringToObj(&temp);
|
||||
@@ -2461,13 +2463,17 @@ SetFsPathFromAny(
|
||||
|
||||
pair[0] = transPtr;
|
||||
pair[1] = Tcl_NewStringObj(name+split+1, -1);
|
||||
transPtr = TclJoinPath(2, pair);
|
||||
Tcl_DecrRefCount(pair[0]);
|
||||
Tcl_DecrRefCount(pair[1]);
|
||||
transPtr = TclJoinPath(2, pair, 1);
|
||||
if (transPtr != pair[0]) {
|
||||
Tcl_DecrRefCount(pair[0]);
|
||||
}
|
||||
if (transPtr != pair[1]) {
|
||||
Tcl_DecrRefCount(pair[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
transPtr = TclJoinPath(1, &pathPtr);
|
||||
transPtr = TclJoinPath(1, &pathPtr, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+19
-21
@@ -40,10 +40,7 @@ typedef struct PkgAvail {
|
||||
*/
|
||||
|
||||
typedef struct Package {
|
||||
char *version; /* Version that has been supplied in this
|
||||
* interpreter via "package provide"
|
||||
* (malloc'ed). NULL means the package doesn't
|
||||
* exist in this interpreter yet. */
|
||||
Tcl_Obj *version;
|
||||
PkgAvail *availPtr; /* First in list of all available versions of
|
||||
* this package. */
|
||||
const void *clientData; /* Client data. */
|
||||
@@ -150,12 +147,13 @@ Tcl_PkgProvideEx(
|
||||
|
||||
pkgPtr = FindPackage(interp, name);
|
||||
if (pkgPtr->version == NULL) {
|
||||
DupString(pkgPtr->version, version);
|
||||
pkgPtr->version = Tcl_NewStringObj(version, -1);
|
||||
Tcl_IncrRefCount(pkgPtr->version);
|
||||
pkgPtr->clientData = clientData;
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
if (CheckVersionAndConvert(interp, pkgPtr->version, &pvi,
|
||||
if (CheckVersionAndConvert(interp, Tcl_GetString(pkgPtr->version), &pvi,
|
||||
NULL) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
} else if (CheckVersionAndConvert(interp, version, &vi, NULL) != TCL_OK) {
|
||||
@@ -175,7 +173,7 @@ Tcl_PkgProvideEx(
|
||||
}
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"conflicting versions provided for package \"%s\": %s, then %s",
|
||||
name, pkgPtr->version, version));
|
||||
name, Tcl_GetString(pkgPtr->version), version));
|
||||
Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -318,7 +316,7 @@ Tcl_PkgRequireEx(
|
||||
|
||||
if (version == NULL) {
|
||||
if (Tcl_PkgRequireProc(interp, name, 0, NULL, clientDataPtr) == TCL_OK) {
|
||||
result = Tcl_GetStringResult(interp);
|
||||
result = Tcl_GetString(Tcl_GetObjResult(interp));
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
} else {
|
||||
@@ -332,7 +330,7 @@ Tcl_PkgRequireEx(
|
||||
}
|
||||
Tcl_IncrRefCount(ov);
|
||||
if (Tcl_PkgRequireProc(interp, name, 1, &ov, clientDataPtr) == TCL_OK) {
|
||||
result = Tcl_GetStringResult(interp);
|
||||
result = Tcl_GetString(Tcl_GetObjResult(interp));
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
TclDecrRefCount(ov);
|
||||
@@ -474,7 +472,8 @@ PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
*/
|
||||
|
||||
if (reqc != 0) {
|
||||
CheckVersionAndConvert(interp, reqPtr->pkgPtr->version, &pkgVersionI, NULL);
|
||||
CheckVersionAndConvert(interp, Tcl_GetString(reqPtr->pkgPtr->version),
|
||||
&pkgVersionI, NULL);
|
||||
satisfies = SomeRequirementSatisfied(pkgVersionI, reqc, reqv);
|
||||
|
||||
ckfree(pkgVersionI);
|
||||
@@ -482,7 +481,7 @@ PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
if (!satisfies) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"version conflict for package \"%s\": have %s, need",
|
||||
name, reqPtr->pkgPtr->version));
|
||||
name, Tcl_GetString(reqPtr->pkgPtr->version)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "PACKAGE", "VERSIONCONFLICT",
|
||||
NULL);
|
||||
AddRequirementsToResult(interp, reqc, reqv);
|
||||
@@ -495,7 +494,7 @@ PkgRequireCoreFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
|
||||
*ptr = reqPtr->pkgPtr->clientData;
|
||||
}
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(reqPtr->pkgPtr->version, -1));
|
||||
Tcl_SetObjResult(interp, reqPtr->pkgPtr->version);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -511,7 +510,7 @@ SelectPackage(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
PkgAvail *availPtr, *bestPtr, *bestStablePtr;
|
||||
char *availVersion, *bestVersion, *bestStableVersion;
|
||||
/* Internal rep. of versions */
|
||||
int availStable, satisfies;
|
||||
int availStable, satisfies;
|
||||
Require *reqPtr = data[0];
|
||||
int reqc = PTR2INT(data[1]);
|
||||
Tcl_Obj **const reqv = data[2];
|
||||
@@ -694,8 +693,8 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
} else {
|
||||
char *pvi, *vi;
|
||||
|
||||
if (CheckVersionAndConvert(interp, reqPtr->pkgPtr->version, &pvi,
|
||||
NULL) != TCL_OK) {
|
||||
if (TCL_OK != CheckVersionAndConvert(interp,
|
||||
Tcl_GetString(reqPtr->pkgPtr->version), &pvi, NULL)) {
|
||||
result = TCL_ERROR;
|
||||
} else if (CheckVersionAndConvert(interp,
|
||||
versionToProvide, &vi, NULL) != TCL_OK) {
|
||||
@@ -712,7 +711,7 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
"attempt to provide package %s %s failed:"
|
||||
" package %s %s provided instead",
|
||||
name, versionToProvide,
|
||||
name, reqPtr->pkgPtr->version));
|
||||
name, Tcl_GetString(reqPtr->pkgPtr->version)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "PACKAGE",
|
||||
"WRONGPROVIDE", NULL);
|
||||
}
|
||||
@@ -750,7 +749,7 @@ SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) {
|
||||
*/
|
||||
|
||||
if (reqPtr->pkgPtr->version != NULL) {
|
||||
ckfree(reqPtr->pkgPtr->version);
|
||||
Tcl_DecrRefCount(reqPtr->pkgPtr->version);
|
||||
reqPtr->pkgPtr->version = NULL;
|
||||
}
|
||||
reqPtr->pkgPtr->clientData = NULL;
|
||||
@@ -926,7 +925,7 @@ TclNRPackageObjCmd(
|
||||
pkgPtr = Tcl_GetHashValue(hPtr);
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
if (pkgPtr->version != NULL) {
|
||||
ckfree(pkgPtr->version);
|
||||
Tcl_DecrRefCount(pkgPtr->version);
|
||||
}
|
||||
while (pkgPtr->availPtr != NULL) {
|
||||
availPtr = pkgPtr->availPtr;
|
||||
@@ -1084,8 +1083,7 @@ TclNRPackageObjCmd(
|
||||
if (hPtr != NULL) {
|
||||
pkgPtr = Tcl_GetHashValue(hPtr);
|
||||
if (pkgPtr->version != NULL) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj(pkgPtr->version, -1));
|
||||
Tcl_SetObjResult(interp, pkgPtr->version);
|
||||
}
|
||||
}
|
||||
return TCL_OK;
|
||||
@@ -1378,7 +1376,7 @@ TclFreePackageInfo(
|
||||
hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
|
||||
pkgPtr = Tcl_GetHashValue(hPtr);
|
||||
if (pkgPtr->version != NULL) {
|
||||
ckfree(pkgPtr->version);
|
||||
Tcl_DecrRefCount(pkgPtr->version);
|
||||
}
|
||||
while (pkgPtr->availPtr != NULL) {
|
||||
availPtr = pkgPtr->availPtr;
|
||||
|
||||
@@ -39,5 +39,8 @@
|
||||
# define LLONG_MAX (~LLONG_MIN)
|
||||
#endif
|
||||
|
||||
#define UWIDE_MAX ((Tcl_WideUInt)-1)
|
||||
#define WIDE_MAX ((Tcl_WideInt)(UWIDE_MAX >> 1))
|
||||
#define WIDE_MIN ((Tcl_WideInt)((Tcl_WideUInt)WIDE_MAX+1))
|
||||
|
||||
#endif /* _TCLPORT */
|
||||
|
||||
+26
-30
@@ -371,11 +371,9 @@ TclCreateProc(
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
|
||||
register Proc *procPtr;
|
||||
int i, result, numArgs, plen;
|
||||
const char *bytes, *argname, *argnamei;
|
||||
char argnamelast;
|
||||
int i, result, numArgs;
|
||||
register CompiledLocal *localPtr = NULL;
|
||||
Tcl_Obj *defPtr, *errorObj, **argArray;
|
||||
Tcl_Obj **argArray;
|
||||
int precompiled = 0;
|
||||
|
||||
if (bodyPtr->typePtr == &tclProcBodyType) {
|
||||
@@ -412,6 +410,7 @@ TclCreateProc(
|
||||
*/
|
||||
|
||||
if (Tcl_IsShared(bodyPtr)) {
|
||||
const char *bytes;
|
||||
int length;
|
||||
Tcl_Obj *sharedBodyPtr = bodyPtr;
|
||||
|
||||
@@ -474,7 +473,8 @@ TclCreateProc(
|
||||
}
|
||||
|
||||
for (i = 0; i < numArgs; i++) {
|
||||
int fieldCount, nameLength, valueLength;
|
||||
const char *argname, *argnamei, *argnamelast;
|
||||
int fieldCount, nameLength;
|
||||
Tcl_Obj **fieldValues;
|
||||
|
||||
/*
|
||||
@@ -487,7 +487,7 @@ TclCreateProc(
|
||||
goto procError;
|
||||
}
|
||||
if (fieldCount > 2) {
|
||||
errorObj = Tcl_NewStringObj(
|
||||
Tcl_Obj *errorObj = Tcl_NewStringObj(
|
||||
"too many fields in argument specifier \"", -1);
|
||||
Tcl_AppendObjToObj(errorObj, argArray[i]);
|
||||
Tcl_AppendToObj(errorObj, "\"", -1);
|
||||
@@ -504,24 +504,17 @@ TclCreateProc(
|
||||
goto procError;
|
||||
}
|
||||
|
||||
argname = Tcl_GetStringFromObj(fieldValues[0], &plen);
|
||||
nameLength = Tcl_NumUtfChars(argname, plen);
|
||||
if (fieldCount == 2) {
|
||||
const char * value = TclGetString(fieldValues[1]);
|
||||
valueLength = Tcl_NumUtfChars(value, fieldValues[1]->length);
|
||||
} else {
|
||||
valueLength = 0;
|
||||
}
|
||||
argname = Tcl_GetStringFromObj(fieldValues[0], &nameLength);
|
||||
|
||||
/*
|
||||
* Check that the formal parameter name is a scalar.
|
||||
*/
|
||||
|
||||
argnamei = argname;
|
||||
argnamelast = argname[plen-1];
|
||||
while (plen--) {
|
||||
if (argnamei[0] == '(') {
|
||||
if (argnamelast == ')') { /* We have an array element. */
|
||||
argnamelast = Tcl_UtfPrev(argname + nameLength, argname);
|
||||
while (argnamei < argnamelast) {
|
||||
if (*argnamei == '(') {
|
||||
if (*argnamelast == ')') { /* We have an array element. */
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"formal parameter \"%s\" is an array element",
|
||||
Tcl_GetString(fieldValues[0])));
|
||||
@@ -529,8 +522,9 @@ TclCreateProc(
|
||||
"FORMALARGUMENTFORMAT", NULL);
|
||||
goto procError;
|
||||
}
|
||||
} else if ((argnamei[0] == ':') && (argnamei[1] == ':')) {
|
||||
errorObj = Tcl_NewStringObj("formal parameter \"", -1);
|
||||
} else if (*argnamei == ':' && *(argnamei+1) == ':') {
|
||||
Tcl_Obj *errorObj = Tcl_NewStringObj(
|
||||
"formal parameter \"", -1);
|
||||
Tcl_AppendObjToObj(errorObj, fieldValues[0]);
|
||||
Tcl_AppendToObj(errorObj, "\" is not a simple name", -1);
|
||||
Tcl_SetObjResult(interp, errorObj);
|
||||
@@ -554,7 +548,7 @@ TclCreateProc(
|
||||
*/
|
||||
|
||||
if ((localPtr->nameLength != nameLength)
|
||||
|| (Tcl_UtfNcmp(localPtr->name, argname, nameLength))
|
||||
|| (memcmp(localPtr->name, argname, nameLength) != 0)
|
||||
|| (localPtr->frameIndex != i)
|
||||
|| !(localPtr->flags & VAR_ARGUMENT)
|
||||
|| (localPtr->defValuePtr == NULL && fieldCount == 2)
|
||||
@@ -572,14 +566,17 @@ TclCreateProc(
|
||||
*/
|
||||
|
||||
if (localPtr->defValuePtr != NULL) {
|
||||
int tmpLength;
|
||||
int tmpLength, valueLength;
|
||||
const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr,
|
||||
&tmpLength);
|
||||
const char *value = TclGetStringFromObj(fieldValues[1],
|
||||
&valueLength);
|
||||
|
||||
if ((valueLength != tmpLength) ||
|
||||
Tcl_UtfNcmp(Tcl_GetString(fieldValues[1]), tmpPtr, tmpLength)) {
|
||||
errorObj = Tcl_ObjPrintf(
|
||||
"procedure \"%s\": formal parameter \"" ,procName);
|
||||
if ((valueLength != tmpLength)
|
||||
|| memcmp(value, tmpPtr, tmpLength) != 0
|
||||
) {
|
||||
Tcl_Obj *errorObj = Tcl_ObjPrintf(
|
||||
"procedure \"%s\": formal parameter \"", procName);
|
||||
Tcl_AppendObjToObj(errorObj, fieldValues[0]);
|
||||
Tcl_AppendToObj(errorObj, "\" has "
|
||||
"default value inconsistent with precompiled body", -1);
|
||||
@@ -626,7 +623,7 @@ TclCreateProc(
|
||||
if ((i == numArgs - 1)
|
||||
&& (localPtr->nameLength == 4)
|
||||
&& (localPtr->name[0] == 'a')
|
||||
&& (strcmp(localPtr->name, "args") == 0)) {
|
||||
&& (memcmp(localPtr->name, "args", 4) == 0)) {
|
||||
localPtr->flags |= VAR_IS_ARGS;
|
||||
}
|
||||
}
|
||||
@@ -644,9 +641,8 @@ TclCreateProc(
|
||||
localPtr = procPtr->firstLocalPtr;
|
||||
procPtr->firstLocalPtr = localPtr->nextPtr;
|
||||
|
||||
defPtr = localPtr->defValuePtr;
|
||||
if (defPtr != NULL) {
|
||||
Tcl_DecrRefCount(defPtr);
|
||||
if (localPtr->defValuePtr != NULL) {
|
||||
Tcl_DecrRefCount(localPtr->defValuePtr);
|
||||
}
|
||||
|
||||
ckfree(localPtr);
|
||||
|
||||
+4
-4
@@ -134,7 +134,7 @@ BuildCharSet(
|
||||
* as well as the dash.
|
||||
*/
|
||||
|
||||
if (*format == ']') {
|
||||
if (*format == ']' || !cset->ranges) {
|
||||
cset->chars[cset->nchars++] = start;
|
||||
cset->chars[cset->nchars++] = ch;
|
||||
} else {
|
||||
@@ -260,7 +260,7 @@ ValidateFormat(
|
||||
Tcl_UniChar ch = 0;
|
||||
int objIndex, xpgSize, nspace = numVars;
|
||||
int *nassign = TclStackAlloc(interp, nspace * sizeof(int));
|
||||
char buf[TCL_UTF_MAX+1];
|
||||
char buf[TCL_UTF_MAX+1] = "";
|
||||
Tcl_Obj *errorMsg; /* Place to build an error messages. Note that
|
||||
* these are messy operations because we do
|
||||
* not want to use the formatting engine;
|
||||
@@ -888,8 +888,8 @@ Tcl_ScanObjCmd(
|
||||
offset = TclUtfToUniChar(string, &sch);
|
||||
i = (int)sch;
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!offset) {
|
||||
offset = Tcl_UtfToUniChar(string, &sch);
|
||||
if ((sch >= 0xD800) && (offset < 3)) {
|
||||
offset += TclUtfToUniChar(string+offset, &sch);
|
||||
i = (((i<<10) & 0x0FFC00) + 0x10000) + (sch & 0x3FF);
|
||||
}
|
||||
#endif
|
||||
|
||||
+20
-20
@@ -1855,15 +1855,15 @@ RefineApproximation(
|
||||
*/
|
||||
|
||||
msb = binExponent + M2; /* 1008 */
|
||||
nDigits = msb / DIGIT_BIT + 1;
|
||||
nDigits = msb / MP_DIGIT_BIT + 1;
|
||||
mp_init_size(&twoMv, nDigits);
|
||||
i = (msb % DIGIT_BIT + 1);
|
||||
i = (msb % MP_DIGIT_BIT + 1);
|
||||
twoMv.used = nDigits;
|
||||
significand *= SafeLdExp(1.0, i);
|
||||
while (--nDigits >= 0) {
|
||||
twoMv.dp[nDigits] = (mp_digit) significand;
|
||||
significand -= (mp_digit) significand;
|
||||
significand = SafeLdExp(significand, DIGIT_BIT);
|
||||
significand = SafeLdExp(significand, MP_DIGIT_BIT);
|
||||
}
|
||||
for (i = 0; i <= 8; ++i) {
|
||||
if (M5 & (1 << i)) {
|
||||
@@ -3162,7 +3162,7 @@ ShouldBankerRoundUpPowD(
|
||||
int isodd) /* 1 if the digit is odd, 0 if even. */
|
||||
{
|
||||
int i;
|
||||
static const mp_digit topbit = 1 << (DIGIT_BIT - 1);
|
||||
static const mp_digit topbit = ((mp_digit)1) << (MP_DIGIT_BIT - 1);
|
||||
|
||||
if (b->used < sd || (b->dp[sd-1] & topbit) == 0) {
|
||||
return 0;
|
||||
@@ -3294,7 +3294,7 @@ ShorteningBignumConversionPowD(
|
||||
*/
|
||||
|
||||
TclBNInitBignumFromWideUInt(&b, bw);
|
||||
mp_init_set_int(&mminus, 1);
|
||||
mp_init_set(&mminus, 1);
|
||||
MulPow5(&b, b5, &b);
|
||||
mp_mul_2d(&b, b2, &b);
|
||||
|
||||
@@ -3690,7 +3690,7 @@ ShorteningBignumConversion(
|
||||
|
||||
TclBNInitBignumFromWideUInt(&b, bw);
|
||||
mp_mul_2d(&b, b2, &b);
|
||||
mp_init_set_int(&S, 1);
|
||||
mp_init_set(&S, 1);
|
||||
MulPow5(&S, s5, &S); mp_mul_2d(&S, s2, &S);
|
||||
|
||||
/*
|
||||
@@ -3708,7 +3708,7 @@ ShorteningBignumConversion(
|
||||
* mminus = 2**m2minus * 5**m5
|
||||
*/
|
||||
|
||||
mp_init_set_int(&mminus, minit);
|
||||
mp_init_set(&mminus, minit);
|
||||
mp_mul_2d(&mminus, m2minus, &mminus);
|
||||
if (m2plus > m2minus) {
|
||||
mp_init_copy(&mplus, &mminus);
|
||||
@@ -3903,7 +3903,7 @@ StrictBignumConversion(
|
||||
mp_init_multi(&temp, &dig, NULL);
|
||||
TclBNInitBignumFromWideUInt(&b, bw);
|
||||
mp_mul_2d(&b, b2, &b);
|
||||
mp_init_set_int(&S, 1);
|
||||
mp_init_set(&S, 1);
|
||||
MulPow5(&S, s5, &S); mp_mul_2d(&S, s2, &S);
|
||||
|
||||
/*
|
||||
@@ -4268,8 +4268,8 @@ TclDoubleDigits(
|
||||
* in the denominator' case.
|
||||
*/
|
||||
|
||||
if (s2 % DIGIT_BIT != 0) {
|
||||
int delta = DIGIT_BIT - (s2 % DIGIT_BIT);
|
||||
if (s2 % MP_DIGIT_BIT != 0) {
|
||||
int delta = MP_DIGIT_BIT - (s2 % MP_DIGIT_BIT);
|
||||
|
||||
b2 += delta;
|
||||
m2plus += delta;
|
||||
@@ -4277,7 +4277,7 @@ TclDoubleDigits(
|
||||
s2 += delta;
|
||||
}
|
||||
return ShorteningBignumConversionPowD(&d, convType, bw, b2, b5,
|
||||
m2plus, m2minus, m5, s2/DIGIT_BIT, k, len, ilim, ilim1,
|
||||
m2plus, m2minus, m5, s2/MP_DIGIT_BIT, k, len, ilim, ilim1,
|
||||
decpt, endPtr);
|
||||
} else {
|
||||
/*
|
||||
@@ -4324,14 +4324,14 @@ TclDoubleDigits(
|
||||
* in the denominator' case.
|
||||
*/
|
||||
|
||||
if (s2 % DIGIT_BIT != 0) {
|
||||
int delta = DIGIT_BIT - (s2 % DIGIT_BIT);
|
||||
if (s2 % MP_DIGIT_BIT != 0) {
|
||||
int delta = MP_DIGIT_BIT - (s2 % MP_DIGIT_BIT);
|
||||
|
||||
b2 += delta;
|
||||
s2 += delta;
|
||||
}
|
||||
return StrictBignumConversionPowD(&d, convType, bw, b2, b5,
|
||||
s2/DIGIT_BIT, k, len, ilim, ilim1, decpt, endPtr);
|
||||
s2/MP_DIGIT_BIT, k, len, ilim, ilim1, decpt, endPtr);
|
||||
} else {
|
||||
/*
|
||||
* There are no helpful special cases, but at least we know in
|
||||
@@ -4456,7 +4456,7 @@ TclInitDoubleConversion(void)
|
||||
+ 0.5 * log(10.)) / log(10.));
|
||||
minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG)
|
||||
* log((double) FLT_RADIX) / log(10.));
|
||||
log10_DIGIT_MAX = (int) floor(DIGIT_BIT * log(2.) / log(10.));
|
||||
log10_DIGIT_MAX = (int) floor(MP_DIGIT_BIT * log(2.) / log(10.));
|
||||
|
||||
/*
|
||||
* Nokia 770's software-emulated floating point is "middle endian": the
|
||||
@@ -4660,7 +4660,7 @@ TclBignumToDouble(
|
||||
|
||||
r = 0.0;
|
||||
for (i=b.used-1 ; i>=0 ; --i) {
|
||||
r = ldexp(r, DIGIT_BIT) + b.dp[i];
|
||||
r = ldexp(r, MP_DIGIT_BIT) + b.dp[i];
|
||||
}
|
||||
mp_clear(&b);
|
||||
|
||||
@@ -4720,7 +4720,7 @@ TclCeil(
|
||||
mp_int d;
|
||||
mp_init(&d);
|
||||
mp_div_2d(a, -shift, &b, &d);
|
||||
exact = mp_iszero(&d);
|
||||
exact = d.used == 0;
|
||||
mp_clear(&d);
|
||||
} else {
|
||||
mp_copy(a, &b);
|
||||
@@ -4729,7 +4729,7 @@ TclCeil(
|
||||
mp_add_d(&b, 1, &b);
|
||||
}
|
||||
for (i=b.used-1 ; i>=0 ; --i) {
|
||||
r = ldexp(r, DIGIT_BIT) + b.dp[i];
|
||||
r = ldexp(r, MP_DIGIT_BIT) + b.dp[i];
|
||||
}
|
||||
r = ldexp(r, bits - mantBits);
|
||||
}
|
||||
@@ -4779,7 +4779,7 @@ TclFloor(
|
||||
mp_copy(a, &b);
|
||||
}
|
||||
for (i=b.used-1 ; i>=0 ; --i) {
|
||||
r = ldexp(r, DIGIT_BIT) + b.dp[i];
|
||||
r = ldexp(r, MP_DIGIT_BIT) + b.dp[i];
|
||||
}
|
||||
r = ldexp(r, bits - mantBits);
|
||||
}
|
||||
@@ -4841,7 +4841,7 @@ BignumToBiasedFrExp(
|
||||
|
||||
r = 0.0;
|
||||
for (i=b.used-1; i>=0; --i) {
|
||||
r = ldexp(r, DIGIT_BIT) + b.dp[i];
|
||||
r = ldexp(r, MP_DIGIT_BIT) + b.dp[i];
|
||||
}
|
||||
mp_clear(&b);
|
||||
|
||||
|
||||
+12
-12
@@ -503,7 +503,7 @@ TclCheckEmptyString (
|
||||
Tcl_DictObjSize(NULL, objPtr, &length);
|
||||
return length == 0;
|
||||
}
|
||||
|
||||
|
||||
if (objPtr->bytes == NULL) {
|
||||
return TCL_EMPTYSTRING_UNKNOWN;
|
||||
}
|
||||
@@ -2002,9 +2002,9 @@ Tcl_AppendFormatToObj(
|
||||
}
|
||||
length = Tcl_UniCharToUtf(code, buf);
|
||||
#if TCL_UTF_MAX > 3
|
||||
if (!length) {
|
||||
/* Special case for handling upper surrogates. */
|
||||
length = Tcl_UniCharToUtf(-1, buf);
|
||||
if ((code >= 0xD800) && (length < 3)) {
|
||||
/* Special case for handling high surrogates. */
|
||||
length += Tcl_UniCharToUtf(-1, buf + length);
|
||||
}
|
||||
#endif
|
||||
segment = Tcl_NewStringObj(buf, length);
|
||||
@@ -2044,7 +2044,7 @@ Tcl_AppendFormatToObj(
|
||||
if (Tcl_GetBignumFromObj(interp,segment,&big) != TCL_OK) {
|
||||
goto error;
|
||||
}
|
||||
mp_mod_2d(&big, (int) CHAR_BIT*sizeof(Tcl_WideInt), &big);
|
||||
mp_mod_2d(&big, CHAR_BIT*sizeof(Tcl_WideInt), &big);
|
||||
objPtr = Tcl_NewBignumObj(&big);
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
Tcl_GetWideIntFromObj(NULL, objPtr, &w);
|
||||
@@ -2059,7 +2059,7 @@ Tcl_AppendFormatToObj(
|
||||
if (Tcl_GetBignumFromObj(interp,segment,&big) != TCL_OK) {
|
||||
goto error;
|
||||
}
|
||||
mp_mod_2d(&big, (int) CHAR_BIT * sizeof(long), &big);
|
||||
mp_mod_2d(&big, CHAR_BIT * sizeof(long), &big);
|
||||
objPtr = Tcl_NewBignumObj(&big);
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
TclGetLongFromObj(NULL, objPtr, &l);
|
||||
@@ -2218,11 +2218,11 @@ Tcl_AppendFormatToObj(
|
||||
}
|
||||
#endif
|
||||
} else if (useBig && big.used) {
|
||||
int leftover = (big.used * DIGIT_BIT) % numBits;
|
||||
mp_digit mask = (~(mp_digit)0) << (DIGIT_BIT-leftover);
|
||||
int leftover = (big.used * MP_DIGIT_BIT) % numBits;
|
||||
mp_digit mask = (~(mp_digit)0) << (MP_DIGIT_BIT-leftover);
|
||||
|
||||
numDigits = 1 +
|
||||
(((Tcl_WideInt) big.used * DIGIT_BIT) / numBits);
|
||||
(((Tcl_WideInt) big.used * MP_DIGIT_BIT) / numBits);
|
||||
while ((mask & big.dp[big.used-1]) == 0) {
|
||||
numDigits--;
|
||||
mask >>= numBits;
|
||||
@@ -2258,9 +2258,9 @@ Tcl_AppendFormatToObj(
|
||||
|
||||
if (useBig && big.used) {
|
||||
if (index < big.used && (size_t) shift <
|
||||
CHAR_BIT*sizeof(Tcl_WideUInt) - DIGIT_BIT) {
|
||||
CHAR_BIT*sizeof(Tcl_WideUInt) - MP_DIGIT_BIT) {
|
||||
bits |= ((Tcl_WideUInt) big.dp[index++]) << shift;
|
||||
shift += DIGIT_BIT;
|
||||
shift += MP_DIGIT_BIT;
|
||||
}
|
||||
shift -= numBits;
|
||||
}
|
||||
@@ -3176,7 +3176,7 @@ ExtendStringRepWithUnicode(
|
||||
copyBytes:
|
||||
dst = objPtr->bytes + origLength;
|
||||
for (i = 0; i < numChars; i++) {
|
||||
dst += Tcl_UniCharToUtf((int) unicode[i], dst);
|
||||
dst += Tcl_UniCharToUtf(unicode[i], dst);
|
||||
}
|
||||
*dst = '\0';
|
||||
objPtr->length = dst - objPtr->bytes;
|
||||
|
||||
@@ -51,6 +51,12 @@
|
||||
#undef TclWinGetServByName
|
||||
#undef TclWinGetSockOpt
|
||||
#undef TclWinSetSockOpt
|
||||
#undef TclBN_mp_tc_and
|
||||
#undef TclBN_mp_tc_or
|
||||
#undef TclBN_mp_tc_xor
|
||||
#define TclBN_mp_tc_and TclBN_mp_and
|
||||
#define TclBN_mp_tc_or TclBN_mp_or
|
||||
#define TclBN_mp_tc_xor TclBN_mp_xor
|
||||
|
||||
/* See bug 510001: TclSockMinimumBuffers needs plat imp */
|
||||
#ifdef _WIN64
|
||||
@@ -188,11 +194,68 @@ Tcl_WinUtfToTChar(
|
||||
int len,
|
||||
Tcl_DString *dsPtr)
|
||||
{
|
||||
#if TCL_UTF_MAX > 4
|
||||
Tcl_UniChar ch = 0;
|
||||
wchar_t *w, *wString;
|
||||
const char *p, *end;
|
||||
int oldLength;
|
||||
#endif
|
||||
|
||||
Tcl_DStringInit(dsPtr);
|
||||
if (!string) {
|
||||
return NULL;
|
||||
}
|
||||
#if TCL_UTF_MAX > 4
|
||||
|
||||
if (len < 0) {
|
||||
len = strlen(string);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unicode string length in Tcl_UniChars will be <= UTF-8 string length in
|
||||
* bytes.
|
||||
*/
|
||||
|
||||
oldLength = Tcl_DStringLength(dsPtr);
|
||||
|
||||
Tcl_DStringSetLength(dsPtr,
|
||||
oldLength + (int) ((len + 1) * sizeof(wchar_t)));
|
||||
wString = (wchar_t *) (Tcl_DStringValue(dsPtr) + oldLength);
|
||||
|
||||
w = wString;
|
||||
p = string;
|
||||
end = string + len - 4;
|
||||
while (p < end) {
|
||||
p += TclUtfToUniChar(p, &ch);
|
||||
if (ch > 0xFFFF) {
|
||||
*w++ = (wchar_t) (0xD800 + ((ch -= 0x10000) >> 10));
|
||||
*w++ = (wchar_t) (0xDC00 | (ch & 0x3FF));
|
||||
} else {
|
||||
*w++ = ch;
|
||||
}
|
||||
}
|
||||
end += 4;
|
||||
while (p < end) {
|
||||
if (Tcl_UtfCharComplete(p, end-p)) {
|
||||
p += TclUtfToUniChar(p, &ch);
|
||||
} else {
|
||||
ch = UCHAR(*p++);
|
||||
}
|
||||
if (ch > 0xFFFF) {
|
||||
*w++ = (wchar_t) (0xD800 + ((ch -= 0x10000) >> 10));
|
||||
*w++ = (wchar_t) (0xDC00 | (ch & 0x3FF));
|
||||
} else {
|
||||
*w++ = ch;
|
||||
}
|
||||
}
|
||||
*w = '\0';
|
||||
Tcl_DStringSetLength(dsPtr,
|
||||
oldLength + ((char *) w - (char *) wString));
|
||||
|
||||
return (char *)wString;
|
||||
#else
|
||||
return (char *)Tcl_UtfToUniCharDString(string, len, dsPtr);
|
||||
#endif
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -201,6 +264,12 @@ Tcl_WinTCharToUtf(
|
||||
int len,
|
||||
Tcl_DString *dsPtr)
|
||||
{
|
||||
#if TCL_UTF_MAX > 4
|
||||
const wchar_t *w, *wEnd;
|
||||
char *p, *result;
|
||||
int oldLength, blen = 1;
|
||||
#endif
|
||||
|
||||
Tcl_DStringInit(dsPtr);
|
||||
if (!string) {
|
||||
return NULL;
|
||||
@@ -210,7 +279,36 @@ Tcl_WinTCharToUtf(
|
||||
} else {
|
||||
len /= 2;
|
||||
}
|
||||
#if TCL_UTF_MAX > 4
|
||||
oldLength = Tcl_DStringLength(dsPtr);
|
||||
Tcl_DStringSetLength(dsPtr, oldLength + (len + 1) * 4);
|
||||
result = Tcl_DStringValue(dsPtr) + oldLength;
|
||||
|
||||
p = result;
|
||||
wEnd = (wchar_t *)string + len;
|
||||
for (w = (wchar_t *)string; w < wEnd; ) {
|
||||
if (!blen && ((*w & 0xFC00) != 0xDC00)) {
|
||||
/* Special case for handling high surrogates. */
|
||||
p += Tcl_UniCharToUtf(-1, p);
|
||||
}
|
||||
blen = Tcl_UniCharToUtf(*w, p);
|
||||
p += blen;
|
||||
if ((*w >= 0xD800) && (blen < 3)) {
|
||||
/* Indication that high surrogate is handled */
|
||||
blen = 0;
|
||||
}
|
||||
w++;
|
||||
}
|
||||
if (!blen) {
|
||||
/* Special case for handling high surrogates. */
|
||||
p += Tcl_UniCharToUtf(-1, p);
|
||||
}
|
||||
Tcl_DStringSetLength(dsPtr, oldLength + (p - result));
|
||||
|
||||
return result;
|
||||
#else
|
||||
return Tcl_UniCharToUtfDString((Tcl_UniChar *)string, len, dsPtr);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(TCL_WIDE_INT_IS_LONG)
|
||||
@@ -761,6 +859,17 @@ const TclTomMathStubs tclTomMathStubs = {
|
||||
TclBNInitBignumFromLong, /* 64 */
|
||||
TclBNInitBignumFromWideInt, /* 65 */
|
||||
TclBNInitBignumFromWideUInt, /* 66 */
|
||||
TclBN_mp_expt_d_ex, /* 67 */
|
||||
0, /* 68 */
|
||||
0, /* 69 */
|
||||
TclBN_mp_set_long, /* 70 */
|
||||
0, /* 71 */
|
||||
0, /* 72 */
|
||||
TclBN_mp_tc_and, /* 73 */
|
||||
TclBN_mp_tc_or, /* 74 */
|
||||
TclBN_mp_tc_xor, /* 75 */
|
||||
TclBN_mp_signed_rsh, /* 76 */
|
||||
TclBN_mp_get_bit, /* 77 */
|
||||
};
|
||||
|
||||
static const TclStubHooks tclStubHooks = {
|
||||
|
||||
+61
-4
@@ -220,6 +220,9 @@ static void SpecialFree(char *blockPtr);
|
||||
static int StaticInitProc(Tcl_Interp *interp);
|
||||
static int TestasyncCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int argc, const char **argv);
|
||||
static int TestpurebytesobjObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
static int TestbytestringObjCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[]);
|
||||
@@ -570,6 +573,7 @@ Tcltest_Init(
|
||||
Tcl_CreateObjCommand(interp, "gettimes", GetTimesObjCmd, NULL, NULL);
|
||||
Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "testpurebytesobj", TestpurebytesobjObjCmd, NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "testbytestring", TestbytestringObjCmd, NULL, NULL);
|
||||
Tcl_CreateObjCommand(interp, "testwrongnumargs", TestWrongNumArgsObjCmd,
|
||||
NULL, NULL);
|
||||
@@ -948,8 +952,10 @@ AsyncHandlerProc(
|
||||
|
||||
Tcl_MutexLock(&asyncTestMutex);
|
||||
for (asyncPtr = firstHandler; asyncPtr != NULL;
|
||||
asyncPtr = asyncPtr->nextPtr) {
|
||||
if (asyncPtr->id == id) break;
|
||||
asyncPtr = asyncPtr->nextPtr) {
|
||||
if (asyncPtr->id == id) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Tcl_MutexUnlock(&asyncTestMutex);
|
||||
|
||||
@@ -2081,7 +2087,7 @@ TestevalexObjCmd(
|
||||
|
||||
flags = 0;
|
||||
if (objc == 3) {
|
||||
const char *global = Tcl_GetStringFromObj(objv[2], &length);
|
||||
const char *global = Tcl_GetString(objv[2]);
|
||||
if (strcmp(global, "global") != 0) {
|
||||
Tcl_AppendResult(interp, "bad value \"", global,
|
||||
"\": must be global", NULL);
|
||||
@@ -4343,7 +4349,7 @@ TesttranslatefilenameCmd(
|
||||
*
|
||||
* TestupvarCmd --
|
||||
*
|
||||
* This procedure implements the "testupvar2" command. It is used
|
||||
* This procedure implements the "testupvar" command. It is used
|
||||
* to test Tcl_UpVar and Tcl_UpVar2.
|
||||
*
|
||||
* Results:
|
||||
@@ -4956,6 +4962,57 @@ NoopObjCmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TestpurebytesobjObjCmd --
|
||||
*
|
||||
* This object-based procedure constructs a pure bytes object
|
||||
* without type and with internal representation containing NULL's.
|
||||
*
|
||||
* If no argument supplied it returns empty object with tclEmptyStringRep,
|
||||
* otherwise it returns this as pure bytes object with bytes value equal
|
||||
* string.
|
||||
*
|
||||
* Results:
|
||||
* Returns the TCL_OK result code.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
TestpurebytesobjObjCmd(
|
||||
ClientData unused, /* Not used. */
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* The argument objects. */
|
||||
{
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
if (objc > 2) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?string?");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
objPtr = Tcl_NewObj();
|
||||
/*
|
||||
objPtr->internalRep.twoPtrValue.ptr1 = NULL;
|
||||
objPtr->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
*/
|
||||
memset(&objPtr->internalRep, 0, sizeof(objPtr->internalRep));
|
||||
if (objc == 2) {
|
||||
const char *s = Tcl_GetString(objv[1]);
|
||||
objPtr->length = objv[1]->length;
|
||||
objPtr->bytes = ckalloc(objPtr->length + 1);
|
||||
memcpy(objPtr->bytes, s, objPtr->length);
|
||||
objPtr->bytes[objPtr->length] = 0;
|
||||
}
|
||||
Tcl_SetObjResult(interp, objPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -290,9 +290,9 @@ TestbignumobjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (!Tcl_IsShared(varPtr[varIndex])) {
|
||||
Tcl_SetIntObj(varPtr[varIndex], mp_iseven(&bignumValue));
|
||||
Tcl_SetIntObj(varPtr[varIndex], !mp_isodd(&bignumValue));
|
||||
} else {
|
||||
SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(mp_iseven(&bignumValue)));
|
||||
SetVarToObj(varPtr, varIndex, Tcl_NewIntObj(!mp_isodd(&bignumValue)));
|
||||
}
|
||||
mp_clear(&bignumValue);
|
||||
break;
|
||||
|
||||
@@ -21,13 +21,14 @@
|
||||
*/
|
||||
|
||||
static const char packageName[] = "procbodytest";
|
||||
static const char packageVersion[] = "1.0";
|
||||
static const char packageVersion[] = "1.1";
|
||||
|
||||
/*
|
||||
* Name of the commands exported by this package
|
||||
*/
|
||||
|
||||
static const char procCommand[] = "proc";
|
||||
static const char checkCommand[] = "check";
|
||||
|
||||
/*
|
||||
* this struct describes an entry in the table of command names and command
|
||||
@@ -46,6 +47,8 @@ typedef struct CmdTable {
|
||||
|
||||
static int ProcBodyTestProcObjCmd(ClientData dummy,
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
|
||||
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);
|
||||
@@ -57,11 +60,13 @@ static int RegisterCommand(Tcl_Interp* interp,
|
||||
|
||||
static const CmdTable commands[] = {
|
||||
{ procCommand, ProcBodyTestProcObjCmd, 1 },
|
||||
{ checkCommand, ProcBodyTestCheckObjCmd, 1 },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
static const CmdTable safeCommands[] = {
|
||||
{ procCommand, ProcBodyTestProcObjCmd, 1 },
|
||||
{ checkCommand, ProcBodyTestCheckObjCmd, 1 },
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -300,6 +305,46 @@ ProcBodyTestProcObjCmd(
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* ProcBodyTestCheckObjCmd --
|
||||
*
|
||||
* Implements the "procbodytest::check" command. Here is the command
|
||||
* description:
|
||||
* procbodytest::check
|
||||
*
|
||||
* Performs an internal check that the Tcl_PkgPresent() command returns
|
||||
* the same version number as was registered when the procbodytest package
|
||||
* was provided. Places a boolean in the interp result indicating the
|
||||
* test outcome.
|
||||
*
|
||||
* Results:
|
||||
* Returns a standard Tcl code.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
ProcBodyTestCheckObjCmd(
|
||||
ClientData dummy, /* context; not used */
|
||||
Tcl_Interp *interp, /* the current interpreter */
|
||||
int objc, /* argument count */
|
||||
Tcl_Obj *const objv[]) /* arguments */
|
||||
{
|
||||
const char *version;
|
||||
|
||||
if (objc != 1) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
version = Tcl_PkgPresent(interp, packageName, packageVersion, 1);
|
||||
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
|
||||
strcmp(version, packageVersion) == 0));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
|
||||
+13
-7
@@ -310,8 +310,8 @@ TclCreateAbsoluteTimerHandler(
|
||||
timerHandlerPtr->token = (Tcl_TimerToken) INT2PTR(tsdPtr->lastTimerId);
|
||||
|
||||
/*
|
||||
* Add the event to the queue in the correct position
|
||||
* (ordered by event firing time).
|
||||
* Add the event to the queue in the correct position (ordered by event
|
||||
* firing time).
|
||||
*/
|
||||
|
||||
for (tPtr2 = tsdPtr->firstTimerHandlerPtr, prevPtr = NULL; tPtr2 != NULL;
|
||||
@@ -1019,8 +1019,8 @@ AfterDelay(
|
||||
|
||||
Tcl_GetTime(&now);
|
||||
endTime = now;
|
||||
endTime.sec += (long)(ms/1000);
|
||||
endTime.usec += ((int)(ms%1000))*1000;
|
||||
endTime.sec += (long)(ms / 1000);
|
||||
endTime.usec += ((int)(ms % 1000)) * 1000;
|
||||
if (endTime.usec >= 1000000) {
|
||||
endTime.sec++;
|
||||
endTime.usec -= 1000000;
|
||||
@@ -1053,11 +1053,17 @@ AfterDelay(
|
||||
if (diff > TCL_TIME_MAXIMUM_SLICE) {
|
||||
diff = TCL_TIME_MAXIMUM_SLICE;
|
||||
}
|
||||
if (diff == 0 && TCL_TIME_BEFORE(now, endTime)) diff = 1;
|
||||
if (diff == 0 && TCL_TIME_BEFORE(now, endTime)) {
|
||||
diff = 1;
|
||||
}
|
||||
if (diff > 0) {
|
||||
Tcl_Sleep((long) diff);
|
||||
if (diff < SLEEP_OFFLOAD_GETTIMEOFDAY) break;
|
||||
} else break;
|
||||
if (diff < SLEEP_OFFLOAD_GETTIMEOFDAY) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
diff = TCL_TIME_DIFF_MS(iPtr->limit.time, now);
|
||||
#ifndef TCL_WIDE_INT_IS_LONG
|
||||
|
||||
+61
-34
@@ -30,13 +30,13 @@ declare 1 {
|
||||
}
|
||||
|
||||
declare 2 {
|
||||
int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_add(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 3 {
|
||||
int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c)
|
||||
int TclBN_mp_add_d(const mp_int *a, mp_digit b, mp_int *c)
|
||||
}
|
||||
declare 4 {
|
||||
int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_and(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 5 {
|
||||
void TclBN_mp_clamp(mp_int *a)
|
||||
@@ -63,25 +63,25 @@ declare 12 {
|
||||
int TclBN_mp_count_bits(const mp_int *a)
|
||||
}
|
||||
declare 13 {
|
||||
int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q, mp_int *r)
|
||||
int TclBN_mp_div(const mp_int *a, const mp_int *b, mp_int *q, mp_int *r)
|
||||
}
|
||||
declare 14 {
|
||||
int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q, mp_digit *r)
|
||||
int TclBN_mp_div_d(const mp_int *a, mp_digit b, mp_int *q, mp_digit *r)
|
||||
}
|
||||
declare 15 {
|
||||
int TclBN_mp_div_2(mp_int *a, mp_int *q)
|
||||
int TclBN_mp_div_2(const mp_int *a, mp_int *q)
|
||||
}
|
||||
declare 16 {
|
||||
int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q, mp_int *r)
|
||||
}
|
||||
declare 17 {
|
||||
int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r)
|
||||
int TclBN_mp_div_3(const mp_int *a, mp_int *q, mp_digit *r)
|
||||
}
|
||||
declare 18 {
|
||||
void TclBN_mp_exch(mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 19 {
|
||||
int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c)
|
||||
int TclBN_mp_expt_d(const mp_int *a, mp_digit b, mp_int *c)
|
||||
}
|
||||
declare 20 {
|
||||
int TclBN_mp_grow(mp_int *a, int size)
|
||||
@@ -90,7 +90,7 @@ declare 21 {
|
||||
int TclBN_mp_init(mp_int *a)
|
||||
}
|
||||
declare 22 {
|
||||
int TclBN_mp_init_copy(mp_int *a, mp_int *b)
|
||||
int TclBN_mp_init_copy(mp_int *a, const mp_int *b)
|
||||
}
|
||||
declare 23 {
|
||||
int TclBN_mp_init_multi(mp_int *a, ...)
|
||||
@@ -105,19 +105,19 @@ declare 26 {
|
||||
int TclBN_mp_lshd(mp_int *a, int shift)
|
||||
}
|
||||
declare 27 {
|
||||
int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r)
|
||||
int TclBN_mp_mod(const mp_int *a, const mp_int *b, mp_int *r)
|
||||
}
|
||||
declare 28 {
|
||||
int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r)
|
||||
}
|
||||
declare 29 {
|
||||
int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p)
|
||||
int TclBN_mp_mul(const mp_int *a, const mp_int *b, mp_int *p)
|
||||
}
|
||||
declare 30 {
|
||||
int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p)
|
||||
int TclBN_mp_mul_d(const mp_int *a, mp_digit b, mp_int *p)
|
||||
}
|
||||
declare 31 {
|
||||
int TclBN_mp_mul_2(mp_int *a, mp_int *p)
|
||||
int TclBN_mp_mul_2(const mp_int *a, mp_int *p)
|
||||
}
|
||||
declare 32 {
|
||||
int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p)
|
||||
@@ -126,10 +126,10 @@ declare 33 {
|
||||
int TclBN_mp_neg(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 34 {
|
||||
int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_or(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 35 {
|
||||
int TclBN_mp_radix_size(mp_int *a, int radix, int *size)
|
||||
int TclBN_mp_radix_size(const mp_int *a, int radix, int *size)
|
||||
}
|
||||
declare 36 {
|
||||
int TclBN_mp_read_radix(mp_int *a, const char *str, int radix)
|
||||
@@ -144,32 +144,32 @@ declare 39 {
|
||||
void TclBN_mp_set(mp_int *a, mp_digit b)
|
||||
}
|
||||
declare 40 {
|
||||
int TclBN_mp_sqr(mp_int *a, mp_int *b)
|
||||
int TclBN_mp_sqr(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 41 {
|
||||
int TclBN_mp_sqrt(mp_int *a, mp_int *b)
|
||||
int TclBN_mp_sqrt(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 42 {
|
||||
int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_sub(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 43 {
|
||||
int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c)
|
||||
int TclBN_mp_sub_d(const mp_int *a, mp_digit b, mp_int *c)
|
||||
}
|
||||
declare 44 {
|
||||
int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b)
|
||||
int TclBN_mp_to_unsigned_bin(const mp_int *a, unsigned char *b)
|
||||
}
|
||||
declare 45 {
|
||||
int TclBN_mp_to_unsigned_bin_n(mp_int *a, unsigned char *b,
|
||||
int TclBN_mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b,
|
||||
unsigned long *outlen)
|
||||
}
|
||||
declare 46 {
|
||||
int TclBN_mp_toradix_n(mp_int *a, char *str, int radix, int maxlen)
|
||||
int TclBN_mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen)
|
||||
}
|
||||
declare 47 {
|
||||
int TclBN_mp_unsigned_bin_size(mp_int *a)
|
||||
int TclBN_mp_unsigned_bin_size(const mp_int *a)
|
||||
}
|
||||
declare 48 {
|
||||
int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_xor(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 49 {
|
||||
void TclBN_mp_zero(mp_int *a)
|
||||
@@ -182,34 +182,34 @@ declare 50 {
|
||||
void TclBN_reverse(unsigned char *s, int len)
|
||||
}
|
||||
declare 51 {
|
||||
int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs)
|
||||
int TclBN_fast_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs)
|
||||
}
|
||||
declare 52 {
|
||||
int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b)
|
||||
int TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 53 {
|
||||
int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_karatsuba_mul(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 54 {
|
||||
int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b)
|
||||
int TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 55 {
|
||||
int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_mp_toom_mul(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 56 {
|
||||
int TclBN_mp_toom_sqr(mp_int *a, mp_int *b)
|
||||
int TclBN_mp_toom_sqr(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 57 {
|
||||
int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_s_mp_add(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 58 {
|
||||
int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c, int digs)
|
||||
int TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b, mp_int *c, int digs)
|
||||
}
|
||||
declare 59 {
|
||||
int TclBN_s_mp_sqr(mp_int *a, mp_int *b)
|
||||
int TclBN_s_mp_sqr(const mp_int *a, mp_int *b)
|
||||
}
|
||||
declare 60 {
|
||||
int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c)
|
||||
int TclBN_s_mp_sub(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 61 {
|
||||
int TclBN_mp_init_set_int(mp_int *a, unsigned long i)
|
||||
@@ -233,6 +233,33 @@ declare 66 {
|
||||
void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal)
|
||||
}
|
||||
|
||||
# Added in libtommath 1.0
|
||||
declare 67 {
|
||||
int TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b, mp_int *c, int fast)
|
||||
}
|
||||
declare 70 {
|
||||
int TclBN_mp_set_long(mp_int *a, unsigned long i)
|
||||
}
|
||||
|
||||
# Added in libtommath 1.1.0
|
||||
declare 73 {
|
||||
int TclBN_mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 74 {
|
||||
int TclBN_mp_tc_or(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 75 {
|
||||
int TclBN_mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c)
|
||||
}
|
||||
declare 76 {
|
||||
int TclBN_mp_signed_rsh(const mp_int *a, int b, mp_int *c)
|
||||
}
|
||||
|
||||
declare 77 {
|
||||
int TclBN_mp_get_bit(const mp_int *a, int b)
|
||||
}
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: tcl
|
||||
# End:
|
||||
|
||||
+280
-262
File diff suppressed because it is too large
Load Diff
+163
-86
@@ -36,24 +36,20 @@
|
||||
#define TclBNRealloc(x,s) ((void*)ckrealloc((char*)(x),(size_t)(s)))
|
||||
/* MODULE_SCOPE void TclBNFree( void* ); */
|
||||
#define TclBNFree(x) (ckfree((char*)(x)))
|
||||
/* MODULE_SCOPE void* TclBNCalloc( size_t, size_t ); */
|
||||
/* unused - no macro */
|
||||
|
||||
#define XMALLOC(x) TclBNAlloc(x)
|
||||
#define XFREE(x) TclBNFree(x)
|
||||
#define XREALLOC(x,n) TclBNRealloc(x,n)
|
||||
#define XCALLOC(n,x) TclBNCalloc(n,x)
|
||||
#define XMALLOC(size) TclBNAlloc(size)
|
||||
#define XFREE(mem, size) TclBNFree(mem)
|
||||
#define XREALLOC(mem, oldsize, newsize) TclBNRealloc(mem, newsize)
|
||||
|
||||
|
||||
/* Rename the global symbols in libtommath to avoid linkage conflicts */
|
||||
|
||||
#define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff
|
||||
#define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff
|
||||
#define TOOM_MUL_CUTOFF TclBNToomMulCutoff
|
||||
#define TOOM_SQR_CUTOFF TclBNToomSqrCutoff
|
||||
|
||||
#define bn_reverse TclBN_reverse
|
||||
#define s_mp_reverse TclBN_reverse
|
||||
#define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs
|
||||
#define s_mp_mul_digs_fast TclBN_fast_s_mp_mul_digs
|
||||
#define fast_s_mp_sqr TclBN_fast_s_mp_sqr
|
||||
#define s_mp_sqr_fast TclBN_fast_s_mp_sqr
|
||||
#define mp_add TclBN_mp_add
|
||||
#define mp_add_d TclBN_mp_add_d
|
||||
#define mp_and TclBN_mp_and
|
||||
@@ -73,6 +69,9 @@
|
||||
#define mp_div_d TclBN_mp_div_d
|
||||
#define mp_exch TclBN_mp_exch
|
||||
#define mp_expt_d TclBN_mp_expt_d
|
||||
#define mp_expt_d_ex TclBN_mp_expt_d_ex
|
||||
#define mp_get_bit TclBN_mp_get_bit
|
||||
#define s_mp_get_bit TclBN_mp_get_bit
|
||||
#define mp_grow TclBN_mp_grow
|
||||
#define mp_init TclBN_mp_init
|
||||
#define mp_init_copy TclBN_mp_init_copy
|
||||
@@ -81,7 +80,9 @@
|
||||
#define mp_init_set_int TclBN_mp_init_set_int
|
||||
#define mp_init_size TclBN_mp_init_size
|
||||
#define mp_karatsuba_mul TclBN_mp_karatsuba_mul
|
||||
#define s_mp_karatsuba_mul TclBN_mp_karatsuba_mul
|
||||
#define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr
|
||||
#define s_mp_karatsuba_sqr TclBN_mp_karatsuba_sqr
|
||||
#define mp_lshd TclBN_mp_lshd
|
||||
#define mp_mod TclBN_mp_mod
|
||||
#define mp_mod_2d TclBN_mp_mod_2d
|
||||
@@ -94,18 +95,25 @@
|
||||
#define mp_radix_size TclBN_mp_radix_size
|
||||
#define mp_read_radix TclBN_mp_read_radix
|
||||
#define mp_rshd TclBN_mp_rshd
|
||||
#define mp_s_rmap TclBNMpSRmap
|
||||
#define mp_set TclBN_mp_set
|
||||
#define mp_set_int TclBN_mp_set_int
|
||||
#define mp_set_long TclBN_mp_set_long
|
||||
#define mp_shrink TclBN_mp_shrink
|
||||
#define mp_sqr TclBN_mp_sqr
|
||||
#define mp_sqrt TclBN_mp_sqrt
|
||||
#define mp_sub TclBN_mp_sub
|
||||
#define mp_sub_d TclBN_mp_sub_d
|
||||
#define mp_signed_rsh TclBN_mp_signed_rsh
|
||||
#define mp_tc_and TclBN_mp_and
|
||||
#define mp_tc_div_2d TclBN_mp_signed_rsh
|
||||
#define mp_tc_or TclBN_mp_or
|
||||
#define mp_tc_xor TclBN_mp_xor
|
||||
#define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin
|
||||
#define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n
|
||||
#define mp_toom_mul TclBN_mp_toom_mul
|
||||
#define s_mp_toom_mul TclBN_mp_toom_mul
|
||||
#define mp_toom_sqr TclBN_mp_toom_sqr
|
||||
#define s_mp_toom_sqr TclBN_mp_toom_sqr
|
||||
#define mp_toradix_n TclBN_mp_toradix_n
|
||||
#define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size
|
||||
#define mp_xor TclBN_mp_xor
|
||||
@@ -147,11 +155,14 @@ EXTERN int TclBN_epoch(void);
|
||||
/* 1 */
|
||||
EXTERN int TclBN_revision(void);
|
||||
/* 2 */
|
||||
EXTERN int TclBN_mp_add(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_add(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 3 */
|
||||
EXTERN int TclBN_mp_add_d(mp_int *a, mp_digit b, mp_int *c);
|
||||
EXTERN int TclBN_mp_add_d(const mp_int *a, mp_digit b,
|
||||
mp_int *c);
|
||||
/* 4 */
|
||||
EXTERN int TclBN_mp_and(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_and(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 5 */
|
||||
EXTERN void TclBN_mp_clamp(mp_int *a);
|
||||
/* 6 */
|
||||
@@ -169,28 +180,30 @@ EXTERN int TclBN_mp_copy(const mp_int *a, mp_int *b);
|
||||
/* 12 */
|
||||
EXTERN int TclBN_mp_count_bits(const mp_int *a);
|
||||
/* 13 */
|
||||
EXTERN int TclBN_mp_div(mp_int *a, mp_int *b, mp_int *q,
|
||||
mp_int *r);
|
||||
EXTERN int TclBN_mp_div(const mp_int *a, const mp_int *b,
|
||||
mp_int *q, mp_int *r);
|
||||
/* 14 */
|
||||
EXTERN int TclBN_mp_div_d(mp_int *a, mp_digit b, mp_int *q,
|
||||
mp_digit *r);
|
||||
EXTERN int TclBN_mp_div_d(const mp_int *a, mp_digit b,
|
||||
mp_int *q, mp_digit *r);
|
||||
/* 15 */
|
||||
EXTERN int TclBN_mp_div_2(mp_int *a, mp_int *q);
|
||||
EXTERN int TclBN_mp_div_2(const mp_int *a, mp_int *q);
|
||||
/* 16 */
|
||||
EXTERN int TclBN_mp_div_2d(const mp_int *a, int b, mp_int *q,
|
||||
mp_int *r);
|
||||
/* 17 */
|
||||
EXTERN int TclBN_mp_div_3(mp_int *a, mp_int *q, mp_digit *r);
|
||||
EXTERN int TclBN_mp_div_3(const mp_int *a, mp_int *q,
|
||||
mp_digit *r);
|
||||
/* 18 */
|
||||
EXTERN void TclBN_mp_exch(mp_int *a, mp_int *b);
|
||||
/* 19 */
|
||||
EXTERN int TclBN_mp_expt_d(mp_int *a, mp_digit b, mp_int *c);
|
||||
EXTERN int TclBN_mp_expt_d(const mp_int *a, mp_digit b,
|
||||
mp_int *c);
|
||||
/* 20 */
|
||||
EXTERN int TclBN_mp_grow(mp_int *a, int size);
|
||||
/* 21 */
|
||||
EXTERN int TclBN_mp_init(mp_int *a);
|
||||
/* 22 */
|
||||
EXTERN int TclBN_mp_init_copy(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_mp_init_copy(mp_int *a, const mp_int *b);
|
||||
/* 23 */
|
||||
EXTERN int TclBN_mp_init_multi(mp_int *a, ...);
|
||||
/* 24 */
|
||||
@@ -200,23 +213,28 @@ EXTERN int TclBN_mp_init_size(mp_int *a, int size);
|
||||
/* 26 */
|
||||
EXTERN int TclBN_mp_lshd(mp_int *a, int shift);
|
||||
/* 27 */
|
||||
EXTERN int TclBN_mp_mod(mp_int *a, mp_int *b, mp_int *r);
|
||||
EXTERN int TclBN_mp_mod(const mp_int *a, const mp_int *b,
|
||||
mp_int *r);
|
||||
/* 28 */
|
||||
EXTERN int TclBN_mp_mod_2d(const mp_int *a, int b, mp_int *r);
|
||||
/* 29 */
|
||||
EXTERN int TclBN_mp_mul(mp_int *a, mp_int *b, mp_int *p);
|
||||
EXTERN int TclBN_mp_mul(const mp_int *a, const mp_int *b,
|
||||
mp_int *p);
|
||||
/* 30 */
|
||||
EXTERN int TclBN_mp_mul_d(mp_int *a, mp_digit b, mp_int *p);
|
||||
EXTERN int TclBN_mp_mul_d(const mp_int *a, mp_digit b,
|
||||
mp_int *p);
|
||||
/* 31 */
|
||||
EXTERN int TclBN_mp_mul_2(mp_int *a, mp_int *p);
|
||||
EXTERN int TclBN_mp_mul_2(const mp_int *a, mp_int *p);
|
||||
/* 32 */
|
||||
EXTERN int TclBN_mp_mul_2d(const mp_int *a, int d, mp_int *p);
|
||||
/* 33 */
|
||||
EXTERN int TclBN_mp_neg(const mp_int *a, mp_int *b);
|
||||
/* 34 */
|
||||
EXTERN int TclBN_mp_or(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_or(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 35 */
|
||||
EXTERN int TclBN_mp_radix_size(mp_int *a, int radix, int *size);
|
||||
EXTERN int TclBN_mp_radix_size(const mp_int *a, int radix,
|
||||
int *size);
|
||||
/* 36 */
|
||||
EXTERN int TclBN_mp_read_radix(mp_int *a, const char *str,
|
||||
int radix);
|
||||
@@ -227,52 +245,59 @@ EXTERN int TclBN_mp_shrink(mp_int *a);
|
||||
/* 39 */
|
||||
EXTERN void TclBN_mp_set(mp_int *a, mp_digit b);
|
||||
/* 40 */
|
||||
EXTERN int TclBN_mp_sqr(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_mp_sqr(const mp_int *a, mp_int *b);
|
||||
/* 41 */
|
||||
EXTERN int TclBN_mp_sqrt(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_mp_sqrt(const mp_int *a, mp_int *b);
|
||||
/* 42 */
|
||||
EXTERN int TclBN_mp_sub(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_sub(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 43 */
|
||||
EXTERN int TclBN_mp_sub_d(mp_int *a, mp_digit b, mp_int *c);
|
||||
EXTERN int TclBN_mp_sub_d(const mp_int *a, mp_digit b,
|
||||
mp_int *c);
|
||||
/* 44 */
|
||||
EXTERN int TclBN_mp_to_unsigned_bin(mp_int *a, unsigned char *b);
|
||||
EXTERN int TclBN_mp_to_unsigned_bin(const mp_int *a,
|
||||
unsigned char *b);
|
||||
/* 45 */
|
||||
EXTERN int TclBN_mp_to_unsigned_bin_n(mp_int *a,
|
||||
EXTERN int TclBN_mp_to_unsigned_bin_n(const mp_int *a,
|
||||
unsigned char *b, unsigned long *outlen);
|
||||
/* 46 */
|
||||
EXTERN int TclBN_mp_toradix_n(mp_int *a, char *str, int radix,
|
||||
int maxlen);
|
||||
EXTERN int TclBN_mp_toradix_n(const mp_int *a, char *str,
|
||||
int radix, int maxlen);
|
||||
/* 47 */
|
||||
EXTERN int TclBN_mp_unsigned_bin_size(mp_int *a);
|
||||
EXTERN int TclBN_mp_unsigned_bin_size(const mp_int *a);
|
||||
/* 48 */
|
||||
EXTERN int TclBN_mp_xor(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_xor(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 49 */
|
||||
EXTERN void TclBN_mp_zero(mp_int *a);
|
||||
/* 50 */
|
||||
EXTERN void TclBN_reverse(unsigned char *s, int len);
|
||||
/* 51 */
|
||||
EXTERN int TclBN_fast_s_mp_mul_digs(mp_int *a, mp_int *b,
|
||||
mp_int *c, int digs);
|
||||
EXTERN int TclBN_fast_s_mp_mul_digs(const mp_int *a,
|
||||
const mp_int *b, mp_int *c, int digs);
|
||||
/* 52 */
|
||||
EXTERN int TclBN_fast_s_mp_sqr(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_fast_s_mp_sqr(const mp_int *a, mp_int *b);
|
||||
/* 53 */
|
||||
EXTERN int TclBN_mp_karatsuba_mul(mp_int *a, mp_int *b,
|
||||
mp_int *c);
|
||||
EXTERN int TclBN_mp_karatsuba_mul(const mp_int *a,
|
||||
const mp_int *b, mp_int *c);
|
||||
/* 54 */
|
||||
EXTERN int TclBN_mp_karatsuba_sqr(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_mp_karatsuba_sqr(const mp_int *a, mp_int *b);
|
||||
/* 55 */
|
||||
EXTERN int TclBN_mp_toom_mul(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_mp_toom_mul(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 56 */
|
||||
EXTERN int TclBN_mp_toom_sqr(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_mp_toom_sqr(const mp_int *a, mp_int *b);
|
||||
/* 57 */
|
||||
EXTERN int TclBN_s_mp_add(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_s_mp_add(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 58 */
|
||||
EXTERN int TclBN_s_mp_mul_digs(mp_int *a, mp_int *b, mp_int *c,
|
||||
int digs);
|
||||
EXTERN int TclBN_s_mp_mul_digs(const mp_int *a, const mp_int *b,
|
||||
mp_int *c, int digs);
|
||||
/* 59 */
|
||||
EXTERN int TclBN_s_mp_sqr(mp_int *a, mp_int *b);
|
||||
EXTERN int TclBN_s_mp_sqr(const mp_int *a, mp_int *b);
|
||||
/* 60 */
|
||||
EXTERN int TclBN_s_mp_sub(mp_int *a, mp_int *b, mp_int *c);
|
||||
EXTERN int TclBN_s_mp_sub(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 61 */
|
||||
EXTERN int TclBN_mp_init_set_int(mp_int *a, unsigned long i);
|
||||
/* 62 */
|
||||
@@ -287,6 +312,29 @@ EXTERN void TclBNInitBignumFromWideInt(mp_int *bignum,
|
||||
/* 66 */
|
||||
EXTERN void TclBNInitBignumFromWideUInt(mp_int *bignum,
|
||||
Tcl_WideUInt initVal);
|
||||
/* 67 */
|
||||
EXTERN int TclBN_mp_expt_d_ex(const mp_int *a, mp_digit b,
|
||||
mp_int *c, int fast);
|
||||
/* Slot 68 is reserved */
|
||||
/* Slot 69 is reserved */
|
||||
/* 70 */
|
||||
EXTERN int TclBN_mp_set_long(mp_int *a, unsigned long i);
|
||||
/* Slot 71 is reserved */
|
||||
/* Slot 72 is reserved */
|
||||
/* 73 */
|
||||
EXTERN int TclBN_mp_tc_and(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 74 */
|
||||
EXTERN int TclBN_mp_tc_or(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 75 */
|
||||
EXTERN int TclBN_mp_tc_xor(const mp_int *a, const mp_int *b,
|
||||
mp_int *c);
|
||||
/* 76 */
|
||||
EXTERN int TclBN_mp_signed_rsh(const mp_int *a, int b,
|
||||
mp_int *c);
|
||||
/* 77 */
|
||||
EXTERN int TclBN_mp_get_bit(const mp_int *a, int b);
|
||||
|
||||
typedef struct TclTomMathStubs {
|
||||
int magic;
|
||||
@@ -294,9 +342,9 @@ typedef struct TclTomMathStubs {
|
||||
|
||||
int (*tclBN_epoch) (void); /* 0 */
|
||||
int (*tclBN_revision) (void); /* 1 */
|
||||
int (*tclBN_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 2 */
|
||||
int (*tclBN_mp_add_d) (mp_int *a, mp_digit b, mp_int *c); /* 3 */
|
||||
int (*tclBN_mp_and) (mp_int *a, mp_int *b, mp_int *c); /* 4 */
|
||||
int (*tclBN_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 2 */
|
||||
int (*tclBN_mp_add_d) (const mp_int *a, mp_digit b, mp_int *c); /* 3 */
|
||||
int (*tclBN_mp_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 4 */
|
||||
void (*tclBN_mp_clamp) (mp_int *a); /* 5 */
|
||||
void (*tclBN_mp_clear) (mp_int *a); /* 6 */
|
||||
void (*tclBN_mp_clear_multi) (mp_int *a, ...); /* 7 */
|
||||
@@ -305,60 +353,71 @@ typedef struct TclTomMathStubs {
|
||||
int (*tclBN_mp_cmp_mag) (const mp_int *a, const mp_int *b); /* 10 */
|
||||
int (*tclBN_mp_copy) (const mp_int *a, mp_int *b); /* 11 */
|
||||
int (*tclBN_mp_count_bits) (const mp_int *a); /* 12 */
|
||||
int (*tclBN_mp_div) (mp_int *a, mp_int *b, mp_int *q, mp_int *r); /* 13 */
|
||||
int (*tclBN_mp_div_d) (mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */
|
||||
int (*tclBN_mp_div_2) (mp_int *a, mp_int *q); /* 15 */
|
||||
int (*tclBN_mp_div) (const mp_int *a, const mp_int *b, mp_int *q, mp_int *r); /* 13 */
|
||||
int (*tclBN_mp_div_d) (const mp_int *a, mp_digit b, mp_int *q, mp_digit *r); /* 14 */
|
||||
int (*tclBN_mp_div_2) (const mp_int *a, mp_int *q); /* 15 */
|
||||
int (*tclBN_mp_div_2d) (const mp_int *a, int b, mp_int *q, mp_int *r); /* 16 */
|
||||
int (*tclBN_mp_div_3) (mp_int *a, mp_int *q, mp_digit *r); /* 17 */
|
||||
int (*tclBN_mp_div_3) (const mp_int *a, mp_int *q, mp_digit *r); /* 17 */
|
||||
void (*tclBN_mp_exch) (mp_int *a, mp_int *b); /* 18 */
|
||||
int (*tclBN_mp_expt_d) (mp_int *a, mp_digit b, mp_int *c); /* 19 */
|
||||
int (*tclBN_mp_expt_d) (const mp_int *a, mp_digit b, mp_int *c); /* 19 */
|
||||
int (*tclBN_mp_grow) (mp_int *a, int size); /* 20 */
|
||||
int (*tclBN_mp_init) (mp_int *a); /* 21 */
|
||||
int (*tclBN_mp_init_copy) (mp_int *a, mp_int *b); /* 22 */
|
||||
int (*tclBN_mp_init_copy) (mp_int *a, const mp_int *b); /* 22 */
|
||||
int (*tclBN_mp_init_multi) (mp_int *a, ...); /* 23 */
|
||||
int (*tclBN_mp_init_set) (mp_int *a, mp_digit b); /* 24 */
|
||||
int (*tclBN_mp_init_size) (mp_int *a, int size); /* 25 */
|
||||
int (*tclBN_mp_lshd) (mp_int *a, int shift); /* 26 */
|
||||
int (*tclBN_mp_mod) (mp_int *a, mp_int *b, mp_int *r); /* 27 */
|
||||
int (*tclBN_mp_mod) (const mp_int *a, const mp_int *b, mp_int *r); /* 27 */
|
||||
int (*tclBN_mp_mod_2d) (const mp_int *a, int b, mp_int *r); /* 28 */
|
||||
int (*tclBN_mp_mul) (mp_int *a, mp_int *b, mp_int *p); /* 29 */
|
||||
int (*tclBN_mp_mul_d) (mp_int *a, mp_digit b, mp_int *p); /* 30 */
|
||||
int (*tclBN_mp_mul_2) (mp_int *a, mp_int *p); /* 31 */
|
||||
int (*tclBN_mp_mul) (const mp_int *a, const mp_int *b, mp_int *p); /* 29 */
|
||||
int (*tclBN_mp_mul_d) (const mp_int *a, mp_digit b, mp_int *p); /* 30 */
|
||||
int (*tclBN_mp_mul_2) (const mp_int *a, mp_int *p); /* 31 */
|
||||
int (*tclBN_mp_mul_2d) (const mp_int *a, int d, mp_int *p); /* 32 */
|
||||
int (*tclBN_mp_neg) (const mp_int *a, mp_int *b); /* 33 */
|
||||
int (*tclBN_mp_or) (mp_int *a, mp_int *b, mp_int *c); /* 34 */
|
||||
int (*tclBN_mp_radix_size) (mp_int *a, int radix, int *size); /* 35 */
|
||||
int (*tclBN_mp_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 34 */
|
||||
int (*tclBN_mp_radix_size) (const mp_int *a, int radix, int *size); /* 35 */
|
||||
int (*tclBN_mp_read_radix) (mp_int *a, const char *str, int radix); /* 36 */
|
||||
void (*tclBN_mp_rshd) (mp_int *a, int shift); /* 37 */
|
||||
int (*tclBN_mp_shrink) (mp_int *a); /* 38 */
|
||||
void (*tclBN_mp_set) (mp_int *a, mp_digit b); /* 39 */
|
||||
int (*tclBN_mp_sqr) (mp_int *a, mp_int *b); /* 40 */
|
||||
int (*tclBN_mp_sqrt) (mp_int *a, mp_int *b); /* 41 */
|
||||
int (*tclBN_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 42 */
|
||||
int (*tclBN_mp_sub_d) (mp_int *a, mp_digit b, mp_int *c); /* 43 */
|
||||
int (*tclBN_mp_to_unsigned_bin) (mp_int *a, unsigned char *b); /* 44 */
|
||||
int (*tclBN_mp_to_unsigned_bin_n) (mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */
|
||||
int (*tclBN_mp_toradix_n) (mp_int *a, char *str, int radix, int maxlen); /* 46 */
|
||||
int (*tclBN_mp_unsigned_bin_size) (mp_int *a); /* 47 */
|
||||
int (*tclBN_mp_xor) (mp_int *a, mp_int *b, mp_int *c); /* 48 */
|
||||
int (*tclBN_mp_sqr) (const mp_int *a, mp_int *b); /* 40 */
|
||||
int (*tclBN_mp_sqrt) (const mp_int *a, mp_int *b); /* 41 */
|
||||
int (*tclBN_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 42 */
|
||||
int (*tclBN_mp_sub_d) (const mp_int *a, mp_digit b, mp_int *c); /* 43 */
|
||||
int (*tclBN_mp_to_unsigned_bin) (const mp_int *a, unsigned char *b); /* 44 */
|
||||
int (*tclBN_mp_to_unsigned_bin_n) (const mp_int *a, unsigned char *b, unsigned long *outlen); /* 45 */
|
||||
int (*tclBN_mp_toradix_n) (const mp_int *a, char *str, int radix, int maxlen); /* 46 */
|
||||
int (*tclBN_mp_unsigned_bin_size) (const mp_int *a); /* 47 */
|
||||
int (*tclBN_mp_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 48 */
|
||||
void (*tclBN_mp_zero) (mp_int *a); /* 49 */
|
||||
void (*tclBN_reverse) (unsigned char *s, int len); /* 50 */
|
||||
int (*tclBN_fast_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 51 */
|
||||
int (*tclBN_fast_s_mp_sqr) (mp_int *a, mp_int *b); /* 52 */
|
||||
int (*tclBN_mp_karatsuba_mul) (mp_int *a, mp_int *b, mp_int *c); /* 53 */
|
||||
int (*tclBN_mp_karatsuba_sqr) (mp_int *a, mp_int *b); /* 54 */
|
||||
int (*tclBN_mp_toom_mul) (mp_int *a, mp_int *b, mp_int *c); /* 55 */
|
||||
int (*tclBN_mp_toom_sqr) (mp_int *a, mp_int *b); /* 56 */
|
||||
int (*tclBN_s_mp_add) (mp_int *a, mp_int *b, mp_int *c); /* 57 */
|
||||
int (*tclBN_s_mp_mul_digs) (mp_int *a, mp_int *b, mp_int *c, int digs); /* 58 */
|
||||
int (*tclBN_s_mp_sqr) (mp_int *a, mp_int *b); /* 59 */
|
||||
int (*tclBN_s_mp_sub) (mp_int *a, mp_int *b, mp_int *c); /* 60 */
|
||||
int (*tclBN_fast_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 51 */
|
||||
int (*tclBN_fast_s_mp_sqr) (const mp_int *a, mp_int *b); /* 52 */
|
||||
int (*tclBN_mp_karatsuba_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 53 */
|
||||
int (*tclBN_mp_karatsuba_sqr) (const mp_int *a, mp_int *b); /* 54 */
|
||||
int (*tclBN_mp_toom_mul) (const mp_int *a, const mp_int *b, mp_int *c); /* 55 */
|
||||
int (*tclBN_mp_toom_sqr) (const mp_int *a, mp_int *b); /* 56 */
|
||||
int (*tclBN_s_mp_add) (const mp_int *a, const mp_int *b, mp_int *c); /* 57 */
|
||||
int (*tclBN_s_mp_mul_digs) (const mp_int *a, const mp_int *b, mp_int *c, int digs); /* 58 */
|
||||
int (*tclBN_s_mp_sqr) (const mp_int *a, mp_int *b); /* 59 */
|
||||
int (*tclBN_s_mp_sub) (const mp_int *a, const mp_int *b, mp_int *c); /* 60 */
|
||||
int (*tclBN_mp_init_set_int) (mp_int *a, unsigned long i); /* 61 */
|
||||
int (*tclBN_mp_set_int) (mp_int *a, unsigned long i); /* 62 */
|
||||
int (*tclBN_mp_cnt_lsb) (const mp_int *a); /* 63 */
|
||||
void (*tclBNInitBignumFromLong) (mp_int *bignum, long initVal); /* 64 */
|
||||
void (*tclBNInitBignumFromWideInt) (mp_int *bignum, Tcl_WideInt initVal); /* 65 */
|
||||
void (*tclBNInitBignumFromWideUInt) (mp_int *bignum, Tcl_WideUInt initVal); /* 66 */
|
||||
int (*tclBN_mp_expt_d_ex) (const mp_int *a, mp_digit b, mp_int *c, int fast); /* 67 */
|
||||
void (*reserved68)(void);
|
||||
void (*reserved69)(void);
|
||||
int (*tclBN_mp_set_long) (mp_int *a, unsigned long i); /* 70 */
|
||||
void (*reserved71)(void);
|
||||
void (*reserved72)(void);
|
||||
int (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
|
||||
int (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
|
||||
int (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
|
||||
int (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c); /* 76 */
|
||||
int (*tclBN_mp_get_bit) (const mp_int *a, int b); /* 77 */
|
||||
} TclTomMathStubs;
|
||||
|
||||
extern const TclTomMathStubs *tclTomMathStubsPtr;
|
||||
@@ -507,6 +566,24 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
|
||||
(tclTomMathStubsPtr->tclBNInitBignumFromWideInt) /* 65 */
|
||||
#define TclBNInitBignumFromWideUInt \
|
||||
(tclTomMathStubsPtr->tclBNInitBignumFromWideUInt) /* 66 */
|
||||
#define TclBN_mp_expt_d_ex \
|
||||
(tclTomMathStubsPtr->tclBN_mp_expt_d_ex) /* 67 */
|
||||
/* Slot 68 is reserved */
|
||||
/* Slot 69 is reserved */
|
||||
#define TclBN_mp_set_long \
|
||||
(tclTomMathStubsPtr->tclBN_mp_set_long) /* 70 */
|
||||
/* Slot 71 is reserved */
|
||||
/* Slot 72 is reserved */
|
||||
#define TclBN_mp_tc_and \
|
||||
(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
|
||||
#define TclBN_mp_tc_or \
|
||||
(tclTomMathStubsPtr->tclBN_mp_tc_or) /* 74 */
|
||||
#define TclBN_mp_tc_xor \
|
||||
(tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
|
||||
#define TclBN_mp_signed_rsh \
|
||||
(tclTomMathStubsPtr->tclBN_mp_signed_rsh) /* 76 */
|
||||
#define TclBN_mp_get_bit \
|
||||
(tclTomMathStubsPtr->tclBN_mp_get_bit) /* 77 */
|
||||
|
||||
#endif /* defined(USE_TCL_STUBS) */
|
||||
|
||||
|
||||
@@ -89,81 +89,6 @@ TclBN_revision(void)
|
||||
{
|
||||
return TCLTOMMATH_REVISION;
|
||||
}
|
||||
#if 0
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclBNAlloc --
|
||||
*
|
||||
* Allocate memory for libtommath.
|
||||
*
|
||||
* Results:
|
||||
* Returns a pointer to the allocated block.
|
||||
*
|
||||
* This procedure is a wrapper around Tcl_Alloc, needed because of a
|
||||
* mismatched type signature between Tcl_Alloc and malloc.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern void *
|
||||
TclBNAlloc(
|
||||
size_t x)
|
||||
{
|
||||
return (void *) ckalloc((unsigned int) x);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclBNRealloc --
|
||||
*
|
||||
* Change the size of an allocated block of memory in libtommath
|
||||
*
|
||||
* Results:
|
||||
* Returns a pointer to the allocated block.
|
||||
*
|
||||
* This procedure is a wrapper around Tcl_Realloc, needed because of a
|
||||
* mismatched type signature between Tcl_Realloc and realloc.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void *
|
||||
TclBNRealloc(
|
||||
void *p,
|
||||
size_t s)
|
||||
{
|
||||
return (void *) ckrealloc((char *) p, (unsigned int) s);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclBNFree --
|
||||
*
|
||||
* Free allocated memory in libtommath.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Memory is freed.
|
||||
*
|
||||
* This function is simply a wrapper around Tcl_Free, needed in libtommath
|
||||
* because of a type mismatch between free and Tcl_Free.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
extern void
|
||||
TclBNFree(
|
||||
void *p)
|
||||
{
|
||||
ckree((char *) p);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -194,8 +119,7 @@ TclBNInitBignumFromLong(
|
||||
* Allocate enough memory to hold the largest possible long
|
||||
*/
|
||||
|
||||
status = mp_init_size(a,
|
||||
(CHAR_BIT * sizeof(long) + DIGIT_BIT - 1) / DIGIT_BIT);
|
||||
status = mp_init(a);
|
||||
if (status != MP_OKAY) {
|
||||
Tcl_Panic("initialization failure in TclBNInitBignumFromLong");
|
||||
}
|
||||
@@ -281,13 +205,12 @@ TclBNInitBignumFromWideUInt(
|
||||
* Allocate enough memory to hold the largest possible Tcl_WideUInt.
|
||||
*/
|
||||
|
||||
status = mp_init_size(a,
|
||||
(CHAR_BIT * sizeof(Tcl_WideUInt) + DIGIT_BIT - 1) / DIGIT_BIT);
|
||||
status = mp_init(a);
|
||||
if (status != MP_OKAY) {
|
||||
Tcl_Panic("initialization failure in TclBNInitBignumFromWideUInt");
|
||||
}
|
||||
|
||||
a->sign = MP_ZPOS;
|
||||
a->sign = 0;
|
||||
|
||||
/*
|
||||
* Store the magnitude in the bignum.
|
||||
|
||||
+4
-12
@@ -537,9 +537,7 @@ TraceExecutionObjCmd(
|
||||
|
||||
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
|
||||
tcmdPtr->stepTrace = NULL;
|
||||
if (tcmdPtr->startCmd != NULL) {
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
if (tcmdPtr->flags & TCL_TRACE_EXEC_IN_PROGRESS) {
|
||||
/*
|
||||
@@ -1349,9 +1347,7 @@ TraceCommandProc(
|
||||
if (tcmdPtr->stepTrace != NULL) {
|
||||
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
|
||||
tcmdPtr->stepTrace = NULL;
|
||||
if (tcmdPtr->startCmd != NULL) {
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
if (tcmdPtr->flags & TCL_TRACE_EXEC_IN_PROGRESS) {
|
||||
/*
|
||||
@@ -1814,9 +1810,7 @@ TraceExecutionProc(
|
||||
&& (strcmp(command, tcmdPtr->startCmd) == 0)) {
|
||||
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
|
||||
tcmdPtr->stepTrace = NULL;
|
||||
if (tcmdPtr->startCmd != NULL) {
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1941,9 +1935,7 @@ TraceExecutionProc(
|
||||
if (tcmdPtr->stepTrace != NULL) {
|
||||
Tcl_DeleteTrace(interp, tcmdPtr->stepTrace);
|
||||
tcmdPtr->stepTrace = NULL;
|
||||
if (tcmdPtr->startCmd != NULL) {
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
ckfree(tcmdPtr->startCmd);
|
||||
}
|
||||
}
|
||||
if (call) {
|
||||
|
||||
+871
-839
File diff suppressed because it is too large
Load Diff
+78
-69
@@ -69,11 +69,11 @@ static const unsigned char totalBytes[256] = {
|
||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
||||
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
|
||||
#if TCL_UTF_MAX > 3
|
||||
4,4,4,4,4,4,4,4,
|
||||
4,4,4,4,4,
|
||||
#else
|
||||
1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,
|
||||
#endif
|
||||
1,1,1,1,1,1,1,1
|
||||
1,1,1,1,1,1,1,1,1,1,1
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -158,23 +158,22 @@ Tcl_UniCharToUtf(
|
||||
if ((ch & 0xF800) == 0xD800) {
|
||||
if (ch & 0x0400) {
|
||||
/* Low surrogate */
|
||||
if (((buf[0] & 0xF8) == 0xF0) && ((buf[1] & 0xC0) == 0x80)
|
||||
&& ((buf[2] & 0xCF) == 0)) {
|
||||
/* Previous Tcl_UniChar was a High surrogate, so combine */
|
||||
buf[3] = (char) ((ch & 0x3F) | 0x80);
|
||||
buf[2] |= (char) (((ch >> 6) & 0x0F) | 0x80);
|
||||
return 4;
|
||||
if (((buf[0] & 0xC0) == 0x80) && ((buf[1] & 0xCF) == 0)) {
|
||||
/* Previous Tcl_UniChar was a high surrogate, so combine */
|
||||
buf[2] = (char) ((ch & 0x3F) | 0x80);
|
||||
buf[1] |= (char) (((ch >> 6) & 0x0F) | 0x80);
|
||||
return 3;
|
||||
}
|
||||
/* Previous Tcl_UniChar was not a High surrogate, so just output */
|
||||
/* Previous Tcl_UniChar was not a high surrogate, so just output */
|
||||
} else {
|
||||
/* High surrogate */
|
||||
ch += 0x40;
|
||||
/* Fill buffer with specific 3-byte (invalid) byte combination,
|
||||
so following Low surrogate can recognize it and combine */
|
||||
so following low surrogate can recognize it and combine */
|
||||
buf[2] = (char) ((ch << 4) & 0x30);
|
||||
buf[1] = (char) (((ch >> 2) & 0x3F) | 0x80);
|
||||
buf[0] = (char) (((ch >> 8) & 0x07) | 0xF0);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -190,11 +189,14 @@ Tcl_UniCharToUtf(
|
||||
return 4;
|
||||
}
|
||||
} else if (ch == -1) {
|
||||
if (((buf[0] & 0xF8) == 0xF0) && ((buf[1] & 0xC0) == 0x80)
|
||||
&& ((buf[2] & 0xCF) == 0)) {
|
||||
ch = 0xD7C0 + ((buf[0] & 0x07) << 8) + ((buf[1] & 0x3F) << 2)
|
||||
+ ((buf[2] & 0x30) >> 4);
|
||||
goto three;
|
||||
if (((buf[0] & 0xC0) == 0x80) && ((buf[1] & 0xCF) == 0)
|
||||
&& ((buf[-1] & 0xF8) == 0xF0)) {
|
||||
ch = 0xD7C0 + ((buf[-1] & 0x07) << 8) + ((buf[0] & 0x3F) << 2)
|
||||
+ ((buf[1] & 0x30) >> 4);
|
||||
buf[1] = (char) ((ch | 0x80) & 0xBF);
|
||||
buf[0] = (char) (((ch >> 6) | 0x80) & 0xBF);
|
||||
buf[-1] = (char) ((ch >> 12) | 0xE0);
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -298,7 +300,7 @@ Tcl_UtfToUniChar(
|
||||
register Tcl_UniChar *chPtr)/* Filled with the Tcl_UniChar represented by
|
||||
* the UTF-8 string. */
|
||||
{
|
||||
register int byte;
|
||||
Tcl_UniChar byte;
|
||||
|
||||
/*
|
||||
* Unroll 1 to 3 (or 4) byte UTF-8 sequences.
|
||||
@@ -312,7 +314,21 @@ Tcl_UtfToUniChar(
|
||||
* characters representing themselves.
|
||||
*/
|
||||
|
||||
*chPtr = (Tcl_UniChar) byte;
|
||||
#if TCL_UTF_MAX == 4
|
||||
/* If *chPtr contains a high surrogate (produced by a previous
|
||||
* Tcl_UtfToUniChar() call) and the next 3 bytes are UTF-8 continuation
|
||||
* bytes, then we must produce a follow-up low surrogate. We only
|
||||
* do that if the high surrogate matches the bits we encounter.
|
||||
*/
|
||||
if ((byte >= 0x80)
|
||||
&& (((((byte - 0x10) << 2) & 0xFC) | 0xD800) == (*chPtr & 0xFCFC))
|
||||
&& ((src[1] & 0xF0) == (((*chPtr << 4) & 0x30) | 0x80))
|
||||
&& ((src[2] & 0xC0) == 0x80)) {
|
||||
*chPtr = ((src[1] & 0x0F) << 6) + (src[2] & 0x3F) + 0xDC00;
|
||||
return 3;
|
||||
}
|
||||
#endif
|
||||
*chPtr = byte;
|
||||
return 1;
|
||||
} else if (byte < 0xE0) {
|
||||
if ((src[1] & 0xC0) == 0x80) {
|
||||
@@ -320,7 +336,7 @@ Tcl_UtfToUniChar(
|
||||
* Two-byte-character lead-byte followed by a trail-byte.
|
||||
*/
|
||||
|
||||
*chPtr = (Tcl_UniChar) (((byte & 0x1F) << 6) | (src[1] & 0x3F));
|
||||
*chPtr = (((byte & 0x1F) << 6) | (src[1] & 0x3F));
|
||||
if ((unsigned)(*chPtr - 1) >= (UNICODE_SELF - 1)) {
|
||||
return 2;
|
||||
}
|
||||
@@ -336,7 +352,7 @@ Tcl_UtfToUniChar(
|
||||
* Three-byte-character lead byte followed by two trail bytes.
|
||||
*/
|
||||
|
||||
*chPtr = (Tcl_UniChar) (((byte & 0x0F) << 12)
|
||||
*chPtr = (((byte & 0x0F) << 12)
|
||||
| ((src[1] & 0x3F) << 6) | (src[2] & 0x3F));
|
||||
if (*chPtr > 0x7FF) {
|
||||
return 3;
|
||||
@@ -355,26 +371,19 @@ Tcl_UtfToUniChar(
|
||||
* Four-byte-character lead byte followed by three trail bytes.
|
||||
*/
|
||||
#if TCL_UTF_MAX == 4
|
||||
Tcl_UniChar surrogate;
|
||||
|
||||
byte = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
|
||||
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)) - 0x10000;
|
||||
surrogate = (Tcl_UniChar) (0xD800 + (byte >> 10));
|
||||
if (byte & 0x100000) {
|
||||
Tcl_UniChar high = (((byte & 0x07) << 8) | ((src[1] & 0x3F) << 2)
|
||||
| ((src[2] & 0x3F) >> 4)) - 0x40;
|
||||
if (high >= 0x400) {
|
||||
/* out of range, < 0x10000 or > 0x10ffff */
|
||||
} else if (*chPtr != surrogate) {
|
||||
/* produce high surrogate, but don't advance source pointer */
|
||||
*chPtr = surrogate;
|
||||
return 0;
|
||||
} else {
|
||||
/* produce low surrogate, and advance source pointer */
|
||||
*chPtr = (Tcl_UniChar) (0xDC00 | (byte & 0x3FF));
|
||||
return 4;
|
||||
/* produce high surrogate, advance source pointer */
|
||||
*chPtr = 0xD800 + high;
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
*chPtr = (Tcl_UniChar) (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
|
||||
*chPtr = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
|
||||
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
|
||||
if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
|
||||
if ((*chPtr - 0x10000) <= 0xFFFFF) {
|
||||
return 4;
|
||||
}
|
||||
#endif
|
||||
@@ -387,7 +396,7 @@ Tcl_UtfToUniChar(
|
||||
}
|
||||
#endif
|
||||
|
||||
*chPtr = (Tcl_UniChar) byte;
|
||||
*chPtr = byte;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -578,8 +587,8 @@ Tcl_UtfFindFirst(
|
||||
len = TclUtfToUniChar(src, &find);
|
||||
fullchar = find;
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!len) {
|
||||
len += TclUtfToUniChar(src, &find);
|
||||
if ((ch >= 0xD800) && (len < 3)) {
|
||||
len += TclUtfToUniChar(src + len, &find);
|
||||
fullchar = (((fullchar & 0x3ff) << 10) | (find & 0x3ff)) + 0x10000;
|
||||
}
|
||||
#endif
|
||||
@@ -626,8 +635,8 @@ Tcl_UtfFindLast(
|
||||
len = TclUtfToUniChar(src, &find);
|
||||
fullchar = find;
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!len) {
|
||||
len += TclUtfToUniChar(src, &find);
|
||||
if ((ch >= 0xD800) && (len < 3)) {
|
||||
len += TclUtfToUniChar(src + len, &find);
|
||||
fullchar = (((fullchar & 0x3ff) << 10) | (find & 0x3ff)) + 0x10000;
|
||||
}
|
||||
#endif
|
||||
@@ -669,8 +678,8 @@ Tcl_UtfNext(
|
||||
int len = TclUtfToUniChar(src, &ch);
|
||||
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (len == 0) {
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
if ((ch >= 0xD800) && (len < 3)) {
|
||||
len += TclUtfToUniChar(src + len, &ch);
|
||||
}
|
||||
#endif
|
||||
return src + len;
|
||||
@@ -779,15 +788,15 @@ Tcl_UtfAtIndex(
|
||||
register int index) /* The position of the desired character. */
|
||||
{
|
||||
Tcl_UniChar ch = 0;
|
||||
int len = 1;
|
||||
int len = 0;
|
||||
|
||||
while (index-- > 0) {
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
src += len;
|
||||
}
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (!len) {
|
||||
/* Index points at character following High Surrogate */
|
||||
if ((ch >= 0xD800) && (len < 3)) {
|
||||
/* Index points at character following high Surrogate */
|
||||
src += TclUtfToUniChar(src, &ch);
|
||||
}
|
||||
#endif
|
||||
@@ -871,7 +880,7 @@ Tcl_UtfToUpper(
|
||||
{
|
||||
Tcl_UniChar ch = 0, upChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
int len;
|
||||
|
||||
/*
|
||||
* Iterate over the string until we hit the terminating null.
|
||||
@@ -879,7 +888,7 @@ Tcl_UtfToUpper(
|
||||
|
||||
src = dst = str;
|
||||
while (*src) {
|
||||
bytes = TclUtfToUniChar(src, &ch);
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
upChar = Tcl_UniCharToUpper(ch);
|
||||
|
||||
/*
|
||||
@@ -888,13 +897,13 @@ Tcl_UtfToUpper(
|
||||
* char to dst if its size is <= the original char.
|
||||
*/
|
||||
|
||||
if (bytes < UtfCount(upChar)) {
|
||||
memcpy(dst, src, (size_t) bytes);
|
||||
dst += bytes;
|
||||
if (len < UtfCount(upChar)) {
|
||||
memcpy(dst, src, len);
|
||||
dst += len;
|
||||
} else {
|
||||
dst += Tcl_UniCharToUtf(upChar, dst);
|
||||
}
|
||||
src += bytes;
|
||||
src += len;
|
||||
}
|
||||
*dst = '\0';
|
||||
return (dst - str);
|
||||
@@ -924,7 +933,7 @@ Tcl_UtfToLower(
|
||||
{
|
||||
Tcl_UniChar ch = 0, lowChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
int len;
|
||||
|
||||
/*
|
||||
* Iterate over the string until we hit the terminating null.
|
||||
@@ -932,7 +941,7 @@ Tcl_UtfToLower(
|
||||
|
||||
src = dst = str;
|
||||
while (*src) {
|
||||
bytes = TclUtfToUniChar(src, &ch);
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
lowChar = Tcl_UniCharToLower(ch);
|
||||
|
||||
/*
|
||||
@@ -941,13 +950,13 @@ Tcl_UtfToLower(
|
||||
* char to dst if its size is <= the original char.
|
||||
*/
|
||||
|
||||
if (bytes < UtfCount(lowChar)) {
|
||||
memcpy(dst, src, (size_t) bytes);
|
||||
dst += bytes;
|
||||
if (len < UtfCount(lowChar)) {
|
||||
memcpy(dst, src, len);
|
||||
dst += len;
|
||||
} else {
|
||||
dst += Tcl_UniCharToUtf(lowChar, dst);
|
||||
}
|
||||
src += bytes;
|
||||
src += len;
|
||||
}
|
||||
*dst = '\0';
|
||||
return (dst - str);
|
||||
@@ -978,7 +987,7 @@ Tcl_UtfToTitle(
|
||||
{
|
||||
Tcl_UniChar ch = 0, titleChar, lowChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
int len;
|
||||
|
||||
/*
|
||||
* Capitalize the first character and then lowercase the rest of the
|
||||
@@ -988,32 +997,32 @@ Tcl_UtfToTitle(
|
||||
src = dst = str;
|
||||
|
||||
if (*src) {
|
||||
bytes = TclUtfToUniChar(src, &ch);
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
titleChar = Tcl_UniCharToTitle(ch);
|
||||
|
||||
if (bytes < UtfCount(titleChar)) {
|
||||
memcpy(dst, src, (size_t) bytes);
|
||||
dst += bytes;
|
||||
if (len < UtfCount(titleChar)) {
|
||||
memcpy(dst, src, len);
|
||||
dst += len;
|
||||
} else {
|
||||
dst += Tcl_UniCharToUtf(titleChar, dst);
|
||||
}
|
||||
src += bytes;
|
||||
src += len;
|
||||
}
|
||||
while (*src) {
|
||||
bytes = TclUtfToUniChar(src, &ch);
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
lowChar = ch;
|
||||
/* Special exception for Georgian Asomtavruli chars, no titlecase. */
|
||||
if ((unsigned)(lowChar - 0x1C90) >= 0x30) {
|
||||
lowChar = Tcl_UniCharToLower(lowChar);
|
||||
}
|
||||
|
||||
if (bytes < UtfCount(lowChar)) {
|
||||
memcpy(dst, src, (size_t) bytes);
|
||||
dst += bytes;
|
||||
if (len < UtfCount(lowChar)) {
|
||||
memcpy(dst, src, len);
|
||||
dst += len;
|
||||
} else {
|
||||
dst += Tcl_UniCharToUtf(lowChar, dst);
|
||||
}
|
||||
src += bytes;
|
||||
src += len;
|
||||
}
|
||||
*dst = '\0';
|
||||
return (dst - str);
|
||||
|
||||
+28
-11
@@ -1046,6 +1046,23 @@ TclScanElement(
|
||||
return 2;
|
||||
}
|
||||
|
||||
#if COMPAT
|
||||
/*
|
||||
* We have an established history in TclConvertElement() when quoting
|
||||
* because of a leading hash character to force what would be the
|
||||
* CONVERT_MASK mode into the CONVERT_BRACE mode. That is, we format
|
||||
* the element #{a"b} like this:
|
||||
* {#{a"b}}
|
||||
* and not like this:
|
||||
* \#{a\"b}
|
||||
* This is inconsistent with [list x{a"b}], but we will not change that now.
|
||||
* Set that preference here so that we compute a tight size requirement.
|
||||
*/
|
||||
if ((*src == '#') && !(*flagPtr & TCL_DONT_QUOTE_HASH)) {
|
||||
preferBrace = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((*p == '{') || (*p == '"')) {
|
||||
/*
|
||||
* Must escape or protect so leading character of value is not
|
||||
@@ -1632,7 +1649,7 @@ Tcl_Backslash(
|
||||
int *readPtr) /* Fill in with number of characters read from
|
||||
* src, unless NULL. */
|
||||
{
|
||||
char buf[TCL_UTF_MAX];
|
||||
char buf[TCL_UTF_MAX] = "";
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
Tcl_UtfBackslash(src, readPtr, buf);
|
||||
@@ -1669,7 +1686,7 @@ UtfWellFormedEnd(
|
||||
if (Tcl_UtfCharComplete(p, l - p)) {
|
||||
return bytes;
|
||||
}
|
||||
/*
|
||||
/*
|
||||
* Malformed utf-8 end, be sure we've NTS to safe compare of end-character,
|
||||
* avoid segfault by access violation out of range.
|
||||
*/
|
||||
@@ -3650,21 +3667,21 @@ TclFormatInt(
|
||||
*
|
||||
* Value
|
||||
* TCL_OK
|
||||
*
|
||||
*
|
||||
* The index is stored at the address given by by 'indexPtr'. If
|
||||
* 'objPtr' has the value "end", the value stored is 'endValue'.
|
||||
*
|
||||
*
|
||||
* TCL_ERROR
|
||||
*
|
||||
*
|
||||
* The value of 'objPtr' does not have one of the expected formats. If
|
||||
* 'interp' is non-NULL, an error message is left in the interpreter's
|
||||
* result object.
|
||||
*
|
||||
*
|
||||
* Effect
|
||||
*
|
||||
*
|
||||
* The object referenced by 'objPtr' is converted, as needed, to an
|
||||
* integer, wide integer, or end-based-index object.
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -3822,7 +3839,7 @@ GetEndOffsetFromObj(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -4000,12 +4017,12 @@ TclIndexEncode(
|
||||
/* usual case, the absolute index value encodes itself */
|
||||
} else if (TCL_OK == GetEndOffsetFromObj(objPtr, 0, &idx)) {
|
||||
/*
|
||||
* We parsed an end+offset index value.
|
||||
* We parsed an end+offset index value.
|
||||
* idx holds the offset value in the range INT_MIN...INT_MAX.
|
||||
*/
|
||||
if (idx > 0) {
|
||||
/*
|
||||
* All end+postive or end-negative expressions
|
||||
* All end+postive or end-negative expressions
|
||||
* always indicate "after the end".
|
||||
*/
|
||||
idx = after;
|
||||
|
||||
+1
-1
@@ -1488,7 +1488,7 @@ Tcl_ZlibStreamGet(
|
||||
count = 0;
|
||||
for (i=0; i<listLen; i++) {
|
||||
Tcl_ListObjIndex(NULL, zshPtr->outData, i, &itemObj);
|
||||
itemPtr = Tcl_GetByteArrayFromObj(itemObj, &itemLen);
|
||||
(void) Tcl_GetByteArrayFromObj(itemObj, &itemLen);
|
||||
if (i == 0) {
|
||||
count += itemLen - zshPtr->outPos;
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
if {[info commands package] == ""} {
|
||||
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
|
||||
}
|
||||
package require -exact Tcl 8.6.8
|
||||
package require -exact Tcl 8.6.9
|
||||
|
||||
# Compute the auto path to use in this interpreter.
|
||||
# The values on the path come from several locations:
|
||||
|
||||
+1
-1
@@ -40,5 +40,5 @@ namespace eval ::tcl::clock {
|
||||
::msgcat::mcset ja LOCALE_DATE_FORMAT "%EY\u5e74%m\u6708%d\u65e5"
|
||||
::msgcat::mcset ja LOCALE_TIME_FORMAT "%H\u6642%M\u5206%S\u79d2"
|
||||
::msgcat::mcset ja LOCALE_DATE_TIME_FORMAT "%EY\u5e74%m\u6708%d\u65e5 (%a) %H\u6642%M\u5206%S\u79d2 %z"
|
||||
::msgcat::mcset ja LOCALE_ERAS "\u007b-9223372036854775808 \u897f\u66a6 0\u007d \u007b-3061011600 \u660e\u6cbb 1867\u007d \u007b-1812186000 \u5927\u6b63 1911\u007d \u007b-1357635600 \u662d\u548c 1925\u007d \u007b600220800 \u5e73\u6210 1988\u007d"
|
||||
::msgcat::mcset ja LOCALE_ERAS "{-9223372036854775808 \u897f\u66a6 0} {-3061011600 \u660e\u6cbb 1867} {-1812186000 \u5927\u6b63 1911} {-1357635600 \u662d\u548c 1925} {600220800 \u5e73\u6210 1988} {1556668800 \u4ee4\u548c 2018}"
|
||||
}
|
||||
|
||||
@@ -73,3 +73,6 @@ set auto_index(::tcl::tm::Defaults) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::UnknownHandler) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::roots) [list source [file join $dir tm.tcl]]
|
||||
set auto_index(::tcl::tm::path) [list source [file join $dir tm.tcl]]
|
||||
if {[namespace exists ::tcl::unsupported]} {
|
||||
set auto_index(timerate) {namespace import ::tcl::unsupported::timerate}
|
||||
}
|
||||
|
||||
@@ -2752,6 +2752,7 @@ proc tcltest::runAllTests { {shell ""} } {
|
||||
variable numTests
|
||||
variable failFiles
|
||||
variable DefaultValue
|
||||
set failFilesAccum {}
|
||||
|
||||
FillFilesExisted
|
||||
if {[llength [info level 0]] == 1} {
|
||||
@@ -2841,6 +2842,7 @@ proc tcltest::runAllTests { {shell ""} } {
|
||||
}
|
||||
if {$Failed > 0} {
|
||||
lappend failFiles $testFile
|
||||
lappend failFilesAccum $testFile
|
||||
}
|
||||
} elseif {[regexp [join {
|
||||
{^Number of tests skipped }
|
||||
@@ -2887,7 +2889,7 @@ proc tcltest::runAllTests { {shell ""} } {
|
||||
puts [outputChannel] ""
|
||||
puts [outputChannel] [string repeat ~ 44]
|
||||
}
|
||||
return [info exists testFileFailures]
|
||||
return [expr {[info exists testFileFailures] || [llength $failFilesAccum]}]
|
||||
}
|
||||
|
||||
#####################################################################
|
||||
|
||||
@@ -56,5 +56,147 @@ set TZData(:Africa/Casablanca) {
|
||||
{1521943200 3600 1 +00}
|
||||
{1526176800 0 0 +00}
|
||||
{1529200800 3600 1 +00}
|
||||
{1540598400 3600 0 +01}
|
||||
{1540695600 3600 0 +01}
|
||||
{1557021600 0 1 +01}
|
||||
{1560045600 3600 0 +01}
|
||||
{1587261600 0 1 +01}
|
||||
{1590285600 3600 0 +01}
|
||||
{1618106400 0 1 +01}
|
||||
{1621130400 3600 0 +01}
|
||||
{1648346400 0 1 +01}
|
||||
{1651975200 3600 0 +01}
|
||||
{1679191200 0 1 +01}
|
||||
{1682215200 3600 0 +01}
|
||||
{1710036000 0 1 +01}
|
||||
{1713060000 3600 0 +01}
|
||||
{1740276000 0 1 +01}
|
||||
{1743904800 3600 0 +01}
|
||||
{1771120800 0 1 +01}
|
||||
{1774144800 3600 0 +01}
|
||||
{1801965600 0 1 +01}
|
||||
{1804989600 3600 0 +01}
|
||||
{1832205600 0 1 +01}
|
||||
{1835229600 3600 0 +01}
|
||||
{1863050400 0 1 +01}
|
||||
{1866074400 3600 0 +01}
|
||||
{1893290400 0 1 +01}
|
||||
{1896919200 3600 0 +01}
|
||||
{1924135200 0 1 +01}
|
||||
{1927159200 3600 0 +01}
|
||||
{1954980000 0 1 +01}
|
||||
{1958004000 3600 0 +01}
|
||||
{1985220000 0 1 +01}
|
||||
{1988848800 3600 0 +01}
|
||||
{2016064800 0 1 +01}
|
||||
{2019088800 3600 0 +01}
|
||||
{2046304800 0 1 +01}
|
||||
{2049933600 3600 0 +01}
|
||||
{2077149600 0 1 +01}
|
||||
{2080173600 3600 0 +01}
|
||||
{2107994400 0 1 +01}
|
||||
{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}
|
||||
}
|
||||
|
||||
@@ -45,5 +45,147 @@ set TZData(:Africa/El_Aaiun) {
|
||||
{1521943200 3600 1 +00}
|
||||
{1526176800 0 0 +00}
|
||||
{1529200800 3600 1 +00}
|
||||
{1540598400 3600 0 +01}
|
||||
{1540695600 3600 0 +01}
|
||||
{1557021600 0 1 +01}
|
||||
{1560045600 3600 0 +01}
|
||||
{1587261600 0 1 +01}
|
||||
{1590285600 3600 0 +01}
|
||||
{1618106400 0 1 +01}
|
||||
{1621130400 3600 0 +01}
|
||||
{1648346400 0 1 +01}
|
||||
{1651975200 3600 0 +01}
|
||||
{1679191200 0 1 +01}
|
||||
{1682215200 3600 0 +01}
|
||||
{1710036000 0 1 +01}
|
||||
{1713060000 3600 0 +01}
|
||||
{1740276000 0 1 +01}
|
||||
{1743904800 3600 0 +01}
|
||||
{1771120800 0 1 +01}
|
||||
{1774144800 3600 0 +01}
|
||||
{1801965600 0 1 +01}
|
||||
{1804989600 3600 0 +01}
|
||||
{1832205600 0 1 +01}
|
||||
{1835229600 3600 0 +01}
|
||||
{1863050400 0 1 +01}
|
||||
{1866074400 3600 0 +01}
|
||||
{1893290400 0 1 +01}
|
||||
{1896919200 3600 0 +01}
|
||||
{1924135200 0 1 +01}
|
||||
{1927159200 3600 0 +01}
|
||||
{1954980000 0 1 +01}
|
||||
{1958004000 3600 0 +01}
|
||||
{1985220000 0 1 +01}
|
||||
{1988848800 3600 0 +01}
|
||||
{2016064800 0 1 +01}
|
||||
{2019088800 3600 0 +01}
|
||||
{2046304800 0 1 +01}
|
||||
{2049933600 3600 0 +01}
|
||||
{2077149600 0 1 +01}
|
||||
{2080173600 3600 0 +01}
|
||||
{2107994400 0 1 +01}
|
||||
{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}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ set TZData(:Africa/Sao_Tome) {
|
||||
{-2713912016 -2205 0 LMT}
|
||||
{-1830384000 0 0 GMT}
|
||||
{1514768400 3600 0 WAT}
|
||||
{1546304400 0 0 GMT}
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ set TZData(:America/Metlakatla) {
|
||||
{1489316400 -28800 1 AKDT}
|
||||
{1509876000 -32400 0 AKST}
|
||||
{1520766000 -28800 1 AKDT}
|
||||
{1541325600 -32400 0 AKST}
|
||||
{1541329200 -28800 0 PST}
|
||||
{1547978400 -32400 0 AKST}
|
||||
{1552215600 -28800 1 AKDT}
|
||||
{1572775200 -32400 0 AKST}
|
||||
{1583665200 -28800 1 AKDT}
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
+85
-81
@@ -40,6 +40,10 @@ set TZData(:Asia/Gaza) {
|
||||
{150843600 7200 0 IST}
|
||||
{167176800 10800 1 IDT}
|
||||
{178664400 7200 0 IST}
|
||||
{334015200 10800 1 IDT}
|
||||
{337644000 7200 0 IST}
|
||||
{452556000 10800 1 IDT}
|
||||
{462232800 7200 0 IST}
|
||||
{482277600 10800 1 IDT}
|
||||
{495579600 7200 0 IST}
|
||||
{516751200 10800 1 IDT}
|
||||
@@ -113,166 +117,166 @@ set TZData(:Asia/Gaza) {
|
||||
{1509141600 7200 0 EET}
|
||||
{1521846000 10800 1 EEST}
|
||||
{1540591200 7200 0 EET}
|
||||
{1553295600 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}
|
||||
{1711148400 10800 1 EEST}
|
||||
{1711663200 10800 1 EEST}
|
||||
{1729893600 7200 0 EET}
|
||||
{1742598000 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}
|
||||
{1900450800 10800 1 EEST}
|
||||
{1900965600 10800 1 EEST}
|
||||
{1919196000 7200 0 EET}
|
||||
{1931900400 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}
|
||||
{2089753200 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}
|
||||
{2247606000 10800 1 EEST}
|
||||
{2248120800 10800 1 EEST}
|
||||
{2266351200 7200 0 EET}
|
||||
{2279055600 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}
|
||||
{2436908400 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}
|
||||
{2594761200 10800 1 EEST}
|
||||
{2595276000 10800 1 EEST}
|
||||
{2613506400 7200 0 EET}
|
||||
{2626210800 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}
|
||||
{2784063600 10800 1 EEST}
|
||||
{2784578400 10800 1 EEST}
|
||||
{2802808800 7200 0 EET}
|
||||
{2815513200 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}
|
||||
{2973366000 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}
|
||||
{3131218800 10800 1 EEST}
|
||||
{3131733600 10800 1 EEST}
|
||||
{3149964000 7200 0 EET}
|
||||
{3162668400 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}
|
||||
{3320521200 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}
|
||||
{3478374000 10800 1 EEST}
|
||||
{3478888800 10800 1 EEST}
|
||||
{3497119200 7200 0 EET}
|
||||
{3509823600 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}
|
||||
{3667676400 10800 1 EEST}
|
||||
{3668191200 10800 1 EEST}
|
||||
{3686421600 7200 0 EET}
|
||||
{3699126000 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}
|
||||
{3856978800 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}
|
||||
{4014831600 10800 1 EEST}
|
||||
{4015346400 10800 1 EEST}
|
||||
{4033576800 7200 0 EET}
|
||||
{4046281200 10800 1 EEST}
|
||||
{4046796000 10800 1 EEST}
|
||||
{4065026400 7200 0 EET}
|
||||
{4078335600 10800 1 EEST}
|
||||
{4078245600 10800 1 EEST}
|
||||
{4097080800 7200 0 EET}
|
||||
}
|
||||
|
||||
+85
-81
@@ -40,6 +40,10 @@ set TZData(:Asia/Hebron) {
|
||||
{150843600 7200 0 IST}
|
||||
{167176800 10800 1 IDT}
|
||||
{178664400 7200 0 IST}
|
||||
{334015200 10800 1 IDT}
|
||||
{337644000 7200 0 IST}
|
||||
{452556000 10800 1 IDT}
|
||||
{462232800 7200 0 IST}
|
||||
{482277600 10800 1 IDT}
|
||||
{495579600 7200 0 IST}
|
||||
{516751200 10800 1 IDT}
|
||||
@@ -112,166 +116,166 @@ set TZData(:Asia/Hebron) {
|
||||
{1509141600 7200 0 EET}
|
||||
{1521846000 10800 1 EEST}
|
||||
{1540591200 7200 0 EET}
|
||||
{1553295600 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}
|
||||
{1711148400 10800 1 EEST}
|
||||
{1711663200 10800 1 EEST}
|
||||
{1729893600 7200 0 EET}
|
||||
{1742598000 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}
|
||||
{1900450800 10800 1 EEST}
|
||||
{1900965600 10800 1 EEST}
|
||||
{1919196000 7200 0 EET}
|
||||
{1931900400 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}
|
||||
{2089753200 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}
|
||||
{2247606000 10800 1 EEST}
|
||||
{2248120800 10800 1 EEST}
|
||||
{2266351200 7200 0 EET}
|
||||
{2279055600 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}
|
||||
{2436908400 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}
|
||||
{2594761200 10800 1 EEST}
|
||||
{2595276000 10800 1 EEST}
|
||||
{2613506400 7200 0 EET}
|
||||
{2626210800 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}
|
||||
{2784063600 10800 1 EEST}
|
||||
{2784578400 10800 1 EEST}
|
||||
{2802808800 7200 0 EET}
|
||||
{2815513200 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}
|
||||
{2973366000 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}
|
||||
{3131218800 10800 1 EEST}
|
||||
{3131733600 10800 1 EEST}
|
||||
{3149964000 7200 0 EET}
|
||||
{3162668400 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}
|
||||
{3320521200 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}
|
||||
{3478374000 10800 1 EEST}
|
||||
{3478888800 10800 1 EEST}
|
||||
{3497119200 7200 0 EET}
|
||||
{3509823600 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}
|
||||
{3667676400 10800 1 EEST}
|
||||
{3668191200 10800 1 EEST}
|
||||
{3686421600 7200 0 EET}
|
||||
{3699126000 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}
|
||||
{3856978800 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}
|
||||
{4014831600 10800 1 EEST}
|
||||
{4015346400 10800 1 EEST}
|
||||
{4033576800 7200 0 EET}
|
||||
{4046281200 10800 1 EEST}
|
||||
{4046796000 10800 1 EEST}
|
||||
{4065026400 7200 0 EET}
|
||||
{4078335600 10800 1 EEST}
|
||||
{4078245600 10800 1 EEST}
|
||||
{4097080800 7200 0 EET}
|
||||
}
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
|
||||
set TZData(:Asia/Hong_Kong) {
|
||||
{-9223372036854775808 27402 0 LMT}
|
||||
{-2056693002 28800 0 HKT}
|
||||
{-907389000 32400 1 HKST}
|
||||
{-891667800 28800 0 HKT}
|
||||
{-884246400 32400 0 JST}
|
||||
{-766746000 28800 0 HKT}
|
||||
{-747981000 32400 1 HKST}
|
||||
{-728544600 28800 0 HKT}
|
||||
{-2056690800 28800 0 HKT}
|
||||
{-900910800 32400 1 HKST}
|
||||
{-891579600 30600 0 HKT}
|
||||
{-884248200 32400 0 JST}
|
||||
{-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}
|
||||
{-542352600 28800 0 HKT}
|
||||
{-541657800 28800 0 HKT}
|
||||
{-528352200 32400 1 HKST}
|
||||
{-510211800 28800 0 HKT}
|
||||
{-498112200 32400 1 HKST}
|
||||
|
||||
@@ -39,6 +39,10 @@ set TZData(:Asia/Jerusalem) {
|
||||
{150843600 7200 0 IST}
|
||||
{167176800 10800 1 IDT}
|
||||
{178664400 7200 0 IST}
|
||||
{334015200 10800 1 IDT}
|
||||
{337644000 7200 0 IST}
|
||||
{452556000 10800 1 IDT}
|
||||
{462232800 7200 0 IST}
|
||||
{482277600 10800 1 IDT}
|
||||
{495579600 7200 0 IST}
|
||||
{516751200 10800 1 IDT}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Asia/Qostanay) {
|
||||
{-9223372036854775808 15268 0 LMT}
|
||||
{-1441167268 14400 0 +04}
|
||||
{-1247544000 18000 0 +05}
|
||||
{354913200 21600 1 +06}
|
||||
{370720800 21600 0 +06}
|
||||
{386445600 18000 0 +05}
|
||||
{386449200 21600 1 +05}
|
||||
{402256800 18000 0 +05}
|
||||
{417985200 21600 1 +05}
|
||||
{433792800 18000 0 +05}
|
||||
{449607600 21600 1 +05}
|
||||
{465339600 18000 0 +05}
|
||||
{481064400 21600 1 +05}
|
||||
{496789200 18000 0 +05}
|
||||
{512514000 21600 1 +05}
|
||||
{528238800 18000 0 +05}
|
||||
{543963600 21600 1 +05}
|
||||
{559688400 18000 0 +05}
|
||||
{575413200 21600 1 +05}
|
||||
{591138000 18000 0 +05}
|
||||
{606862800 21600 1 +05}
|
||||
{622587600 18000 0 +05}
|
||||
{638312400 21600 1 +05}
|
||||
{654642000 18000 0 +05}
|
||||
{670366800 14400 0 +04}
|
||||
{670370400 18000 1 +04}
|
||||
{686095200 14400 0 +04}
|
||||
{695772000 18000 0 +05}
|
||||
{701816400 21600 1 +05}
|
||||
{717541200 18000 0 +05}
|
||||
{733266000 21600 1 +05}
|
||||
{748990800 18000 0 +05}
|
||||
{764715600 21600 1 +05}
|
||||
{780440400 18000 0 +05}
|
||||
{796165200 21600 1 +05}
|
||||
{811890000 18000 0 +05}
|
||||
{828219600 21600 1 +05}
|
||||
{846363600 18000 0 +05}
|
||||
{859669200 21600 1 +05}
|
||||
{877813200 18000 0 +05}
|
||||
{891118800 21600 1 +05}
|
||||
{909262800 18000 0 +05}
|
||||
{922568400 21600 1 +05}
|
||||
{941317200 18000 0 +05}
|
||||
{954018000 21600 1 +05}
|
||||
{972766800 18000 0 +05}
|
||||
{985467600 21600 1 +05}
|
||||
{1004216400 18000 0 +05}
|
||||
{1017522000 21600 1 +05}
|
||||
{1035666000 18000 0 +05}
|
||||
{1048971600 21600 1 +05}
|
||||
{1067115600 18000 0 +05}
|
||||
{1080421200 21600 1 +05}
|
||||
{1099170000 21600 0 +06}
|
||||
}
|
||||
@@ -54,4 +54,5 @@ set TZData(:Asia/Qyzylorda) {
|
||||
{1067115600 18000 0 +05}
|
||||
{1080421200 21600 1 +05}
|
||||
{1099170000 21600 0 +06}
|
||||
{1545328800 18000 0 +05}
|
||||
}
|
||||
|
||||
+38
-38
@@ -102,106 +102,106 @@ set TZData(:Asia/Tehran) {
|
||||
{2105551800 12600 0 +0330}
|
||||
{2121193800 16200 1 +0330}
|
||||
{2137087800 12600 0 +0330}
|
||||
{2152729800 16200 1 +0330}
|
||||
{2168623800 12600 0 +0330}
|
||||
{2184265800 16200 1 +0330}
|
||||
{2200159800 12600 0 +0330}
|
||||
{2152816200 16200 1 +0330}
|
||||
{2168710200 12600 0 +0330}
|
||||
{2184352200 16200 1 +0330}
|
||||
{2200246200 12600 0 +0330}
|
||||
{2215888200 16200 1 +0330}
|
||||
{2231782200 12600 0 +0330}
|
||||
{2247424200 16200 1 +0330}
|
||||
{2263318200 12600 0 +0330}
|
||||
{2278960200 16200 1 +0330}
|
||||
{2294854200 12600 0 +0330}
|
||||
{2310496200 16200 1 +0330}
|
||||
{2326390200 12600 0 +0330}
|
||||
{2279046600 16200 1 +0330}
|
||||
{2294940600 12600 0 +0330}
|
||||
{2310582600 16200 1 +0330}
|
||||
{2326476600 12600 0 +0330}
|
||||
{2342118600 16200 1 +0330}
|
||||
{2358012600 12600 0 +0330}
|
||||
{2373654600 16200 1 +0330}
|
||||
{2389548600 12600 0 +0330}
|
||||
{2405190600 16200 1 +0330}
|
||||
{2421084600 12600 0 +0330}
|
||||
{2436726600 16200 1 +0330}
|
||||
{2452620600 12600 0 +0330}
|
||||
{2405277000 16200 1 +0330}
|
||||
{2421171000 12600 0 +0330}
|
||||
{2436813000 16200 1 +0330}
|
||||
{2452707000 12600 0 +0330}
|
||||
{2468349000 16200 1 +0330}
|
||||
{2484243000 12600 0 +0330}
|
||||
{2499885000 16200 1 +0330}
|
||||
{2515779000 12600 0 +0330}
|
||||
{2531421000 16200 1 +0330}
|
||||
{2547315000 12600 0 +0330}
|
||||
{2562957000 16200 1 +0330}
|
||||
{2578851000 12600 0 +0330}
|
||||
{2531507400 16200 1 +0330}
|
||||
{2547401400 12600 0 +0330}
|
||||
{2563043400 16200 1 +0330}
|
||||
{2578937400 12600 0 +0330}
|
||||
{2594579400 16200 1 +0330}
|
||||
{2610473400 12600 0 +0330}
|
||||
{2626115400 16200 1 +0330}
|
||||
{2642009400 12600 0 +0330}
|
||||
{2657651400 16200 1 +0330}
|
||||
{2673545400 12600 0 +0330}
|
||||
{2689187400 16200 1 +0330}
|
||||
{2705081400 12600 0 +0330}
|
||||
{2657737800 16200 1 +0330}
|
||||
{2673631800 12600 0 +0330}
|
||||
{2689273800 16200 1 +0330}
|
||||
{2705167800 12600 0 +0330}
|
||||
{2720809800 16200 1 +0330}
|
||||
{2736703800 12600 0 +0330}
|
||||
{2752345800 16200 1 +0330}
|
||||
{2768239800 12600 0 +0330}
|
||||
{2783881800 16200 1 +0330}
|
||||
{2799775800 12600 0 +0330}
|
||||
{2815417800 16200 1 +0330}
|
||||
{2831311800 12600 0 +0330}
|
||||
{2783968200 16200 1 +0330}
|
||||
{2799862200 12600 0 +0330}
|
||||
{2815504200 16200 1 +0330}
|
||||
{2831398200 12600 0 +0330}
|
||||
{2847040200 16200 1 +0330}
|
||||
{2862934200 12600 0 +0330}
|
||||
{2878576200 16200 1 +0330}
|
||||
{2894470200 12600 0 +0330}
|
||||
{2910112200 16200 1 +0330}
|
||||
{2926006200 12600 0 +0330}
|
||||
{2941648200 16200 1 +0330}
|
||||
{2957542200 12600 0 +0330}
|
||||
{2941734600 16200 1 +0330}
|
||||
{2957628600 12600 0 +0330}
|
||||
{2973270600 16200 1 +0330}
|
||||
{2989164600 12600 0 +0330}
|
||||
{3004806600 16200 1 +0330}
|
||||
{3020700600 12600 0 +0330}
|
||||
{3036342600 16200 1 +0330}
|
||||
{3052236600 12600 0 +0330}
|
||||
{3067878600 16200 1 +0330}
|
||||
{3083772600 12600 0 +0330}
|
||||
{3067965000 16200 1 +0330}
|
||||
{3083859000 12600 0 +0330}
|
||||
{3099501000 16200 1 +0330}
|
||||
{3115395000 12600 0 +0330}
|
||||
{3131037000 16200 1 +0330}
|
||||
{3146931000 12600 0 +0330}
|
||||
{3162573000 16200 1 +0330}
|
||||
{3178467000 12600 0 +0330}
|
||||
{3194109000 16200 1 +0330}
|
||||
{3210003000 12600 0 +0330}
|
||||
{3194195400 16200 1 +0330}
|
||||
{3210089400 12600 0 +0330}
|
||||
{3225731400 16200 1 +0330}
|
||||
{3241625400 12600 0 +0330}
|
||||
{3257267400 16200 1 +0330}
|
||||
{3273161400 12600 0 +0330}
|
||||
{3288803400 16200 1 +0330}
|
||||
{3304697400 12600 0 +0330}
|
||||
{3320339400 16200 1 +0330}
|
||||
{3336233400 12600 0 +0330}
|
||||
{3320425800 16200 1 +0330}
|
||||
{3336319800 12600 0 +0330}
|
||||
{3351961800 16200 1 +0330}
|
||||
{3367855800 12600 0 +0330}
|
||||
{3383497800 16200 1 +0330}
|
||||
{3399391800 12600 0 +0330}
|
||||
{3415033800 16200 1 +0330}
|
||||
{3430927800 12600 0 +0330}
|
||||
{3446569800 16200 1 +0330}
|
||||
{3462463800 12600 0 +0330}
|
||||
{3446656200 16200 1 +0330}
|
||||
{3462550200 12600 0 +0330}
|
||||
{3478192200 16200 1 +0330}
|
||||
{3494086200 12600 0 +0330}
|
||||
{3509728200 16200 1 +0330}
|
||||
{3525622200 12600 0 +0330}
|
||||
{3541264200 16200 1 +0330}
|
||||
{3557158200 12600 0 +0330}
|
||||
{3572800200 16200 1 +0330}
|
||||
{3588694200 12600 0 +0330}
|
||||
{3572886600 16200 1 +0330}
|
||||
{3588780600 12600 0 +0330}
|
||||
{3604422600 16200 1 +0330}
|
||||
{3620316600 12600 0 +0330}
|
||||
{3635958600 16200 1 +0330}
|
||||
{3651852600 12600 0 +0330}
|
||||
{3667494600 16200 1 +0330}
|
||||
{3683388600 12600 0 +0330}
|
||||
{3699030600 16200 1 +0330}
|
||||
{3714924600 12600 0 +0330}
|
||||
{3699117000 16200 1 +0330}
|
||||
{3715011000 12600 0 +0330}
|
||||
{3730653000 16200 1 +0330}
|
||||
{3746547000 12600 0 +0330}
|
||||
{3762189000 16200 1 +0330}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Etc/UCT) {
|
||||
{-9223372036854775808 0 0 UCT}
|
||||
if {![info exists TZData(Etc/UTC)]} {
|
||||
LoadTimeZoneFile Etc/UTC
|
||||
}
|
||||
set TZData(:Etc/UCT) $TZData(:Etc/UTC)
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Pacific/Chuuk) {
|
||||
{-9223372036854775808 36428 0 LMT}
|
||||
{-9223372036854775808 -49972 0 LMT}
|
||||
{-3944628428 36428 0 LMT}
|
||||
{-2177489228 36000 0 +10}
|
||||
{-1743674400 32400 0 +09}
|
||||
{-1606813200 36000 0 +10}
|
||||
{-907408800 32400 0 +09}
|
||||
{-770634000 36000 0 +10}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user