Compare commits
799
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b843bcbb | ||
|
|
7426076e0f | ||
|
|
ca4e244cca | ||
|
|
1dd572d476 | ||
|
|
20ace1aa6c | ||
|
|
ef42e37c44 | ||
|
|
42b0b497a1 | ||
|
|
46dcc60e41 | ||
|
|
c5f7f66ceb | ||
|
|
b31d886479 | ||
|
|
c08798d0f4 | ||
|
|
04eb2cc696 | ||
|
|
2b516939bd | ||
|
|
47b385e3db | ||
|
|
4ef7c0c4b8 | ||
|
|
119519c4df | ||
|
|
52948a790c | ||
|
|
792c57a7fb | ||
|
|
073e6715d1 | ||
|
|
c611835152 | ||
|
|
22657ad365 | ||
|
|
02838226fe | ||
|
|
1c6b1c9e6c | ||
|
|
6c8d9886b5 | ||
|
|
45bfcbb267 | ||
|
|
c18f5f7f8c | ||
|
|
31226696c3 | ||
|
|
5d50502a29 | ||
|
|
925f00c5ca | ||
|
|
5c38cce8df | ||
|
|
6efbc1b278 | ||
|
|
40b6b98401 | ||
|
|
5021d1c11f | ||
|
|
ca87000eac | ||
|
|
56bcf3dcbe | ||
|
|
7faef9ce70 | ||
|
|
81262438a7 | ||
|
|
b9537d1098 | ||
|
|
25f6837582 | ||
|
|
5aef206d2d | ||
|
|
24656c2805 | ||
|
|
33f4149ee5 | ||
|
|
95e7615fc4 | ||
|
|
ba6fe47daa | ||
|
|
cf560b3fb9 | ||
|
|
507af3b425 | ||
|
|
72eb4e4229 | ||
|
|
ce9fb3bcfb | ||
|
|
8494cde084 | ||
|
|
9ab6f4a7c5 | ||
|
|
7be69be5fe | ||
|
|
23d30205a5 | ||
|
|
dbd4edc3d5 | ||
|
|
a1de562f5c | ||
|
|
6a1c2d8f52 | ||
|
|
ecaf98ffad | ||
|
|
a01390fa0b | ||
|
|
1faa0cca77 | ||
|
|
e872538a2e | ||
|
|
7561bdb176 | ||
|
|
ac4faee232 | ||
|
|
af98d8fa20 | ||
|
|
d61473e631 | ||
|
|
5db223f8ec | ||
|
|
9dabd6f1ac | ||
|
|
002511bea4 | ||
|
|
8b3ccee931 | ||
|
|
553147da53 | ||
|
|
c05419204a | ||
|
|
42eb37a48c | ||
|
|
b82707b4a1 | ||
|
|
2031d40f81 | ||
|
|
d748e3debf | ||
|
|
0846deb770 | ||
|
|
f632ecb406 | ||
|
|
5d7537b823 | ||
|
|
fd98096770 | ||
|
|
4cca4b0b1c | ||
|
|
edee881fb2 | ||
|
|
d762cb9331 | ||
|
|
a06b13bb4a | ||
|
|
c78879e707 | ||
|
|
94c928a859 | ||
|
|
9faf91402b | ||
|
|
10775523d9 | ||
|
|
7b36aa11b6 | ||
|
|
532559323e | ||
|
|
2e1db6850f | ||
|
|
d9baa9e3de | ||
|
|
53b2a5fdf9 | ||
|
|
89be5d2d3d | ||
|
|
3251fdbab4 | ||
|
|
196f704d08 | ||
|
|
3b293d276c | ||
|
|
4aa0db664d | ||
|
|
b81e0a5459 | ||
|
|
4f69a6f297 | ||
|
|
ae31cee4ae | ||
|
|
768fa22c43 | ||
|
|
1a21edb592 | ||
|
|
62c5b0bfb7 | ||
|
|
a58f5f14b0 | ||
|
|
7b53037339 | ||
|
|
b8c736d82c | ||
|
|
d8d1a902ef | ||
|
|
ba427c0bc2 | ||
|
|
b1af92a6e9 | ||
|
|
b58aa65f02 | ||
|
|
f029161eb7 | ||
|
|
635dd1a696 | ||
|
|
25b3cffdd2 | ||
|
|
ae11579286 | ||
|
|
975b7c5dcb | ||
|
|
ef8a00717e | ||
|
|
b3838ea445 | ||
|
|
36c94773b4 | ||
|
|
fdb4ca1567 | ||
|
|
6c7ad3b118 | ||
|
|
4d23589861 | ||
|
|
a7d6b92abf | ||
|
|
5cb9dc5ddc | ||
|
|
c157333a7d | ||
|
|
f9ded1a928 | ||
|
|
99e3536c5d | ||
|
|
521b3bfb0e | ||
|
|
111352203a | ||
|
|
a744c509d4 | ||
|
|
e648065fe1 | ||
|
|
6d6996d99f | ||
|
|
4813d492ca | ||
|
|
426dd171f6 | ||
|
|
11af978f51 | ||
|
|
cdb467ed61 | ||
|
|
8b03ef0b29 | ||
|
|
71b0ad990c | ||
|
|
dabfa1a053 | ||
|
|
8f6442b0c9 | ||
|
|
da196c3345 | ||
|
|
85f19595dc | ||
|
|
18f90309e4 | ||
|
|
82fb7b1d55 | ||
|
|
513b2d5031 | ||
|
|
bfe8928bed | ||
|
|
ba490472b5 | ||
|
|
d0d0e3642f | ||
|
|
bc23abb929 | ||
|
|
481aa42029 | ||
|
|
b816a585c0 | ||
|
|
7bf0253a43 | ||
|
|
73116e2c54 | ||
|
|
66e2117d20 | ||
|
|
0bc6d7d341 | ||
|
|
d6fedf7854 | ||
|
|
191fa0458a | ||
|
|
21920649b5 | ||
|
|
9faff5cc94 | ||
|
|
a4ac44fccc | ||
|
|
3795a0f7dc | ||
|
|
ec4cf7a995 | ||
|
|
ddf4a5f158 | ||
|
|
2a569c94ef | ||
|
|
6932d0c2d0 | ||
|
|
9c802c440b | ||
|
|
e4f687d978 | ||
|
|
826db93d76 | ||
|
|
d8dac38437 | ||
|
|
b432766202 | ||
|
|
52aada907a | ||
|
|
5b4f454e1c | ||
|
|
42dae31b61 | ||
|
|
86f51a0a0b | ||
|
|
7129a50b10 | ||
|
|
e57b9fe9c3 | ||
|
|
13eb211d5a | ||
|
|
e37308d78c | ||
|
|
b5e5883c33 | ||
|
|
096106f202 | ||
|
|
ff294480b9 | ||
|
|
02892b17b9 | ||
|
|
d942525e22 | ||
|
|
976fff1b3a | ||
|
|
95cac7dd26 | ||
|
|
eddb2b2801 | ||
|
|
ef78b1558f | ||
|
|
c1e4942181 | ||
|
|
b1432e6e0d | ||
|
|
948fd24ddb | ||
|
|
0fd21c5dd0 | ||
|
|
8a4e71640b | ||
|
|
338c669267 | ||
|
|
654f4d3b58 | ||
|
|
23ef10a6a4 | ||
|
|
91e64fb475 | ||
|
|
e9cf2c8707 | ||
|
|
e82a18be40 | ||
|
|
49cb764a5a | ||
|
|
8f9ddfae66 | ||
|
|
a53281f50b | ||
|
|
2ba1a5f081 | ||
|
|
bfdd211de9 | ||
|
|
b71ebc2746 | ||
|
|
f39cef2590 | ||
|
|
4e1d89f819 | ||
|
|
a1a443ef1d | ||
|
|
66386bc18b | ||
|
|
0666836834 | ||
|
|
0c93e6a978 | ||
|
|
124340611e | ||
|
|
43d67c651c | ||
|
|
797aa89a30 | ||
|
|
90d13253bd | ||
|
|
1c1ee1c59d | ||
|
|
0bcca87681 | ||
|
|
4245f0e5a3 | ||
|
|
90a23f176d | ||
|
|
2e64df7857 | ||
|
|
78bce4ec93 | ||
|
|
10a5b6e4c7 | ||
|
|
3e4ac217aa | ||
|
|
ae54d4dd89 | ||
|
|
2eebbe64ab | ||
|
|
a65db858ff | ||
|
|
dc6366fef8 | ||
|
|
b669079dd6 | ||
|
|
0824522016 | ||
|
|
8b9fe0fa53 | ||
|
|
e0becc6161 | ||
|
|
2a62e1f0dd | ||
|
|
00c7d174e4 | ||
|
|
197060f097 | ||
|
|
f9c4e3a8b2 | ||
|
|
640c0098d1 | ||
|
|
c432e303c0 | ||
|
|
a6680c4b9f | ||
|
|
bc7b50deb0 | ||
|
|
b3caf035b4 | ||
|
|
5f892535a1 | ||
|
|
9d2a40a826 | ||
|
|
d13a3cd502 | ||
|
|
1412e9b9f0 | ||
|
|
870cb82c96 | ||
|
|
386c7ea2d3 | ||
|
|
c381a17784 | ||
|
|
79f559fdb5 | ||
|
|
1a3ade0a6f | ||
|
|
2a1443e0e0 | ||
|
|
369b286297 | ||
|
|
14225bf184 | ||
|
|
84e2b419ac | ||
|
|
64adc99e08 | ||
|
|
46a5d4b5fa | ||
|
|
7dc710b2f4 | ||
|
|
da2f3cbd20 | ||
|
|
67e92c7ada | ||
|
|
2a94e80188 | ||
|
|
874327229c | ||
|
|
1b232cf14c | ||
|
|
b2b0452937 | ||
|
|
1684b35abb | ||
|
|
6065eb2868 | ||
|
|
50f633ff28 | ||
|
|
973b944b33 | ||
|
|
7c58993680 | ||
|
|
822d3017ef | ||
|
|
e18b1490d5 | ||
|
|
a90bc45a54 | ||
|
|
b6c0957a8f | ||
|
|
0423cdcf31 | ||
|
|
2afe485f41 | ||
|
|
742323f725 | ||
|
|
008001c3b5 | ||
|
|
7e8c940ac1 | ||
|
|
e977d6e7af | ||
|
|
03a9eaa951 | ||
|
|
c3e9fc9aed | ||
|
|
0a9238b48a | ||
|
|
95b74de5c2 | ||
|
|
4c3d010bff | ||
|
|
bf454b34d5 | ||
|
|
aed83779fd | ||
|
|
af07dcfdda | ||
|
|
82a4bb8618 | ||
|
|
d9c7aa01ef | ||
|
|
44ce8c245f | ||
|
|
fac57136f2 | ||
|
|
b07c7ad8ae | ||
|
|
c3c5a80a02 | ||
|
|
d9033672db | ||
|
|
4e5e2be585 | ||
|
|
dbfc7435e6 | ||
|
|
f768eb3bf2 | ||
|
|
6559f4084e | ||
|
|
9cc14dacd9 | ||
|
|
5a3d2ddfed | ||
|
|
59ee35fd38 | ||
|
|
330034ec02 | ||
|
|
3920a8f42a | ||
|
|
0dfd2bdc9d | ||
|
|
809aebe98e | ||
|
|
366778e86e | ||
|
|
a8faa8e87d | ||
|
|
6ab05e04d1 | ||
|
|
7b395ecf51 | ||
|
|
da371061f6 | ||
|
|
954b5db3bb | ||
|
|
ec21e9f7de | ||
|
|
cbbee69874 | ||
|
|
4b553938e3 | ||
|
|
67319477f1 | ||
|
|
4d9dcbbcbc | ||
|
|
c837d06e2b | ||
|
|
026e32d86a | ||
|
|
d9a19f9512 | ||
|
|
66a9d2307a | ||
|
|
3516771eb6 | ||
|
|
a76725bab7 | ||
|
|
1e2cce6389 | ||
|
|
e2ee6601c9 | ||
|
|
b2223e8eaf | ||
|
|
5da6b8e3c3 | ||
|
|
61814ba324 | ||
|
|
a0fa55773b | ||
|
|
60da2df16c | ||
|
|
41c34da9da | ||
|
|
f27f0773c4 | ||
|
|
6ea0113127 | ||
|
|
f8f170cfd3 | ||
|
|
38e64470ca | ||
|
|
5ba7f2ce37 | ||
|
|
ebaccb9022 | ||
|
|
b0b713c9dc | ||
|
|
78241e0ee7 | ||
|
|
0faf7ec075 | ||
|
|
d3cc950d62 | ||
|
|
98005a91dc | ||
|
|
a333cf0f8e | ||
|
|
6db74fe6eb | ||
|
|
1f207f9a0d | ||
|
|
9d428d86eb | ||
|
|
008d15c04e | ||
|
|
d48c9ac13e | ||
|
|
8fb4c52383 | ||
|
|
0b20d5aff1 | ||
|
|
18fb378072 | ||
|
|
d1e2a1ab3c | ||
|
|
c0cffed37f | ||
|
|
f87e100731 | ||
|
|
63b8879b83 | ||
|
|
c74a13788a | ||
|
|
d74dc7638c | ||
|
|
81696e00bb | ||
|
|
949e577fe0 | ||
|
|
a7a483bf2a | ||
|
|
237a5ad333 | ||
|
|
6de2b2c1d6 | ||
|
|
4a0240f153 | ||
|
|
2a8ceac888 | ||
|
|
dac15673b8 | ||
|
|
0a6e6c4977 | ||
|
|
6e31c76fb5 | ||
|
|
bc27d6bcb6 | ||
|
|
1e0a98c9aa | ||
|
|
2ecf92f50b | ||
|
|
b8b4026cbf | ||
|
|
42b1c58705 | ||
|
|
27f09fdb5c | ||
|
|
837f6c4dc0 | ||
|
|
ba62d5de6e | ||
|
|
3bbc297ec7 | ||
|
|
d33fc57550 | ||
|
|
53f5424bb2 | ||
|
|
415503775a | ||
|
|
cb8b6e12a2 | ||
|
|
df72732868 | ||
|
|
728edc0cbf | ||
|
|
1dfa3c7740 | ||
|
|
2c5609394c | ||
|
|
7894a24f8f | ||
|
|
33ac44d5e4 | ||
|
|
4288b3bee9 | ||
|
|
5a60ace74d | ||
|
|
24512e7131 | ||
|
|
1f58beed10 | ||
|
|
649be23ea6 | ||
|
|
d9708a0e08 | ||
|
|
ccb5ae0529 | ||
|
|
5ae2506499 | ||
|
|
f833c48881 | ||
|
|
12d41d9775 | ||
|
|
a8896d0fd0 | ||
|
|
b184464e94 | ||
|
|
dd5c058db2 | ||
|
|
9cfb05d5b2 | ||
|
|
a77ee23ce2 | ||
|
|
0343f605e6 | ||
|
|
c74a310d21 | ||
|
|
500e1529f1 | ||
|
|
c08af43916 | ||
|
|
c8a85bbc05 | ||
|
|
95b85f336a | ||
|
|
106d95266d | ||
|
|
31489aa2fa | ||
|
|
5a7f45638f | ||
|
|
50abb43dbe | ||
|
|
0d62ec8715 | ||
|
|
72bac6d72c | ||
|
|
ef9867bd58 | ||
|
|
94f27cdf49 | ||
|
|
3405e90b04 | ||
|
|
4d0d124928 | ||
|
|
d2d5e829ae | ||
|
|
c84fb00aed | ||
|
|
7972edd0e2 | ||
|
|
c0b6a93d8f | ||
|
|
59dd8794c5 | ||
|
|
19d02aa031 | ||
|
|
4ee4ed8efe | ||
|
|
f748e43a22 | ||
|
|
bff9eb8b3b | ||
|
|
842fb667f5 | ||
|
|
39c9836950 | ||
|
|
d9174b0f8d | ||
|
|
f1806f6f50 | ||
|
|
a76f86e565 | ||
|
|
51448d4167 | ||
|
|
ce85e0375a | ||
|
|
d04ef78cd6 | ||
|
|
e50b4e4c59 | ||
|
|
a11e803c73 | ||
|
|
3c0ca65978 | ||
|
|
6cda753ae0 | ||
|
|
c5a0eca4bc | ||
|
|
1d1c1fb982 | ||
|
|
e245507505 | ||
|
|
ca67362ec8 | ||
|
|
e7e044e968 | ||
|
|
5ba73ded05 | ||
|
|
c4ac9665cb | ||
|
|
a64794ef40 | ||
|
|
0f77e154ab | ||
|
|
7e5d03d4cc | ||
|
|
8886d91a73 | ||
|
|
138fdcf62c | ||
|
|
0bb9723a64 | ||
|
|
bef79e3c75 | ||
|
|
1ce12936bb | ||
|
|
4addfd1f1e | ||
|
|
45952551e2 | ||
|
|
58462852c6 | ||
|
|
8edc9b3888 | ||
|
|
24b2e0513d | ||
|
|
18aaf57faf | ||
|
|
aa198f54a8 | ||
|
|
a1b8aa387d | ||
|
|
7a961752a9 | ||
|
|
4391b633d9 | ||
|
|
5bef9acff1 | ||
|
|
d6c7097242 | ||
|
|
f284e2a2d8 | ||
|
|
bc48d7a26e | ||
|
|
8c301f2c53 | ||
|
|
6b05e4086f | ||
|
|
622fa7382f | ||
|
|
b17bb4724c | ||
|
|
b2c3781bb0 | ||
|
|
d2a2b049b7 | ||
|
|
131bf290a5 | ||
|
|
8958065cc3 | ||
|
|
ae9355b9f2 | ||
|
|
1f8db5d00d | ||
|
|
56de8426b7 | ||
|
|
e502bcacc7 | ||
|
|
a79de57d37 | ||
|
|
891c0fbcaa | ||
|
|
6b3bcba42d | ||
|
|
7d93750b87 | ||
|
|
ded4be46c9 | ||
|
|
15f8c1d28b | ||
|
|
d80b660921 | ||
|
|
5d7d542b25 | ||
|
|
36fcd880b6 | ||
|
|
a019958ca7 | ||
|
|
4b1d6e9ae2 | ||
|
|
dfa6b32e11 | ||
|
|
7a0c0b2034 | ||
|
|
ca8b1a6887 | ||
|
|
c5b5c4f8a4 | ||
|
|
2d5ed059a0 | ||
|
|
55cc9137eb | ||
|
|
f9753a5e41 | ||
|
|
d03849d2cd | ||
|
|
b2befe7629 | ||
|
|
a5a978ca98 | ||
|
|
eea655f851 | ||
|
|
f67437d6f3 | ||
|
|
447a4d740e | ||
|
|
cef8229a3a | ||
|
|
e91c9f74d8 | ||
|
|
6cd7c9e3c2 | ||
|
|
9548cf370e | ||
|
|
e5a0178736 | ||
|
|
69ac37dbae | ||
|
|
27e907b473 | ||
|
|
c31e41a91d | ||
|
|
300b6e7e76 | ||
|
|
5a103eaacb | ||
|
|
9634f3a9ed | ||
|
|
28121876fd | ||
|
|
3dab933938 | ||
|
|
f68a36c8be | ||
|
|
1080644af8 | ||
|
|
3e959978b2 | ||
|
|
34de786a93 | ||
|
|
74cf960de8 | ||
|
|
1a5bf4932e | ||
|
|
80965aae21 | ||
|
|
d516bc4611 | ||
|
|
1900149ee6 | ||
|
|
6dc3f732c1 | ||
|
|
9ca4f08e3a | ||
|
|
51748fd064 | ||
|
|
93fa9836fd | ||
|
|
d72c457096 | ||
|
|
24aa257810 | ||
|
|
55a1074384 | ||
|
|
21178dbbd4 | ||
|
|
d15e74d08c | ||
|
|
867a57806b | ||
|
|
6a34b586f6 | ||
|
|
54c6432df5 | ||
|
|
0fb01a32c6 | ||
|
|
a68d5e71e2 | ||
|
|
d00000e816 | ||
|
|
170a21862b | ||
|
|
85c05d7a3d | ||
|
|
ed4c583b06 | ||
|
|
6a3c75c37f | ||
|
|
9a87f872f4 | ||
|
|
74275b1fb2 | ||
|
|
3116cddfd5 | ||
|
|
092e5f9f72 | ||
|
|
14a73a2125 | ||
|
|
01f391fe61 | ||
|
|
0f9d17b141 | ||
|
|
9d536c3831 | ||
|
|
20ba5858ce | ||
|
|
6944eab64c | ||
|
|
0ef6cc44a3 | ||
|
|
2e6ebdc591 | ||
|
|
4076c637ad | ||
|
|
7b46c41c05 | ||
|
|
f5300c9a09 | ||
|
|
ce9541840d | ||
|
|
284f73c56c | ||
|
|
7b28b96939 | ||
|
|
4968ffa1ce | ||
|
|
105dbed51f | ||
|
|
ddde6c7c50 | ||
|
|
7a073b3366 | ||
|
|
184e43e860 | ||
|
|
4469be4f10 | ||
|
|
fbc66143c5 | ||
|
|
fe7a8b7742 | ||
|
|
126f9f6dda | ||
|
|
a267b4feeb | ||
|
|
fd14473a4c | ||
|
|
2e97ff6575 | ||
|
|
60d91fb699 | ||
|
|
0b00b0f11d | ||
|
|
872d25e128 | ||
|
|
436a48c900 | ||
|
|
62043b6882 | ||
|
|
c36fa478b2 | ||
|
|
f5846ef8f5 | ||
|
|
74efc29448 | ||
|
|
a6b22dc4b3 | ||
|
|
8f0f3b1165 | ||
|
|
b2fe600f53 | ||
|
|
32439d945e | ||
|
|
14086d3b4a | ||
|
|
1c7b977c44 | ||
|
|
77334ba0ad | ||
|
|
f3e9e16aa8 | ||
|
|
ff752c7b91 | ||
|
|
a890c6f587 | ||
|
|
b07f60b43b | ||
|
|
c6e1d19c9e | ||
|
|
e1b9a033d7 | ||
|
|
d6b88eb797 | ||
|
|
4cbc02c80f | ||
|
|
3239564179 | ||
|
|
d2ed22d022 | ||
|
|
d12caa5cd9 | ||
|
|
558466820c | ||
|
|
fbd6220149 | ||
|
|
4c66b6ec43 | ||
|
|
ad1c9644ec | ||
|
|
c7522c3f93 | ||
|
|
6a866ef98b | ||
|
|
cd5e1b2e6c | ||
|
|
191d1f5847 | ||
|
|
007dfc95a9 | ||
|
|
c453ac8b82 | ||
|
|
792b2f5aff | ||
|
|
16510ceb16 | ||
|
|
585d7c7548 | ||
|
|
70d6ba8746 | ||
|
|
5573c07b32 | ||
|
|
e03ac7f9c6 | ||
|
|
5da91af337 | ||
|
|
32835dc33e | ||
|
|
abf853d0bb | ||
|
|
dc58da9c45 | ||
|
|
b437bfcd3a | ||
|
|
21d39f41b1 | ||
|
|
614375d561 | ||
|
|
f4cb160b56 | ||
|
|
1bca425d6d | ||
|
|
e2dae42575 | ||
|
|
dc471da433 | ||
|
|
18da054782 | ||
|
|
f0a6c93a0e | ||
|
|
5efd0904e3 | ||
|
|
8e84ff6bb0 | ||
|
|
2f0f646a07 | ||
|
|
143111498e | ||
|
|
8b4623feb4 | ||
|
|
66ebfaa06d | ||
|
|
10cc2ae8fd | ||
|
|
42dd6088a6 | ||
|
|
2d455c75b9 | ||
|
|
abe4d4223d | ||
|
|
176e98222e | ||
|
|
29dd909281 | ||
|
|
2dd98970cf | ||
|
|
529ef6feb2 | ||
|
|
9934337df5 | ||
|
|
63505a86ca | ||
|
|
6203b90b2a | ||
|
|
e0b98db0d7 | ||
|
|
daf1875e01 | ||
|
|
de7a5967d0 | ||
|
|
e52c7c3a41 | ||
|
|
ff9ac0bfbd | ||
|
|
9c7a5755f2 | ||
|
|
b4eda6649f | ||
|
|
eb3d10d523 | ||
|
|
7754129cab | ||
|
|
515f8ab044 | ||
|
|
d2518017c7 | ||
|
|
4e9c7a9ae0 | ||
|
|
e4e7ee53a4 | ||
|
|
13384df4af | ||
|
|
8f94fc24ac | ||
|
|
af346e6e70 | ||
|
|
f5ba1ba55f | ||
|
|
62933f5324 | ||
|
|
7c1a9c588c | ||
|
|
33683032c2 | ||
|
|
12039fa008 | ||
|
|
4b57621b7a | ||
|
|
1fd08ea7d0 | ||
|
|
ccd2ac73e9 | ||
|
|
707c03da77 | ||
|
|
6d64f87088 | ||
|
|
25c9cb2e55 | ||
|
|
2310d12319 | ||
|
|
5131efcb13 | ||
|
|
599cd8496e | ||
|
|
bd7c6ae5d3 | ||
|
|
c2350850a9 | ||
|
|
41c87a4bf5 | ||
|
|
a41449f1cd | ||
|
|
7c405a789e | ||
|
|
20aa103e7b | ||
|
|
8d65c702fa | ||
|
|
527f510103 | ||
|
|
8320295018 | ||
|
|
640839dd01 | ||
|
|
132576b7dd | ||
|
|
c297ad4104 | ||
|
|
424c53931b | ||
|
|
a3ea58d94b | ||
|
|
3674905dbd | ||
|
|
9336a020ee | ||
|
|
b0874b989e | ||
|
|
aa59356ae9 | ||
|
|
0e71e665cb | ||
|
|
9e72f54150 | ||
|
|
5ef498d3ec | ||
|
|
b78fe450ce | ||
|
|
ebf3d00e75 | ||
|
|
2a491f190d | ||
|
|
2ae930bbe4 | ||
|
|
6d4603bb45 | ||
|
|
bf70c2d93b | ||
|
|
fabaafee56 | ||
|
|
57b2b2606f | ||
|
|
9fccffbdfa | ||
|
|
3df7fe883e | ||
|
|
1ff4bd27f4 | ||
|
|
2f8db2f926 | ||
|
|
7974d5f010 | ||
|
|
9b6113c6b1 | ||
|
|
946598bb9f | ||
|
|
8a3c1f7a68 | ||
|
|
b456ce6d74 | ||
|
|
5aa22835cf | ||
|
|
294105b452 | ||
|
|
e16ffc4a1e | ||
|
|
5db5b84aef | ||
|
|
5ad300bf4a | ||
|
|
6ebde0d075 | ||
|
|
5c49161ab0 | ||
|
|
4a20ed377e | ||
|
|
232f84b9dc | ||
|
|
c355f9a6cf | ||
|
|
a6fb6b32ca | ||
|
|
b988139b8a | ||
|
|
11766bbb13 | ||
|
|
355be4d5f2 | ||
|
|
78d1e3a624 | ||
|
|
0bdd633abc | ||
|
|
d36655ac53 | ||
|
|
ca4bfa2564 | ||
|
|
6487dd7257 | ||
|
|
01abe6a8b4 | ||
|
|
5f8f24a948 | ||
|
|
5ea6733979 | ||
|
|
bb0f1f8083 | ||
|
|
178df447b7 | ||
|
|
daf02b80dd | ||
|
|
0cbabbe0d8 | ||
|
|
26e99bad85 | ||
|
|
105bdf44be | ||
|
|
c43ea691ad | ||
|
|
573a1e9219 | ||
|
|
a9fa4bed1f | ||
|
|
d3517188b2 | ||
|
|
02669f7c03 | ||
|
|
a8ddc9d2a2 | ||
|
|
de7e7bc0ba | ||
|
|
ba767ab772 | ||
|
|
a24682c16d | ||
|
|
94394a076d | ||
|
|
bde9c622c0 | ||
|
|
887f84bb45 | ||
|
|
21b4101075 | ||
|
|
6187c67f3b | ||
|
|
55031f3989 | ||
|
|
778ad9fdfa | ||
|
|
9aebf1d8a6 | ||
|
|
98974ab123 | ||
|
|
e396c1dd36 | ||
|
|
82fccbc6dc | ||
|
|
3c3ebea410 | ||
|
|
9b1a7da59b | ||
|
|
d307130311 | ||
|
|
59f20f23bd | ||
|
|
c0d3b18e36 | ||
|
|
77a24f6300 | ||
|
|
aabe2cbb33 | ||
|
|
1391eda7db | ||
|
|
776820c81f | ||
|
|
cb0acd5a7d | ||
|
|
4717ea14fd | ||
|
|
05de893f6f | ||
|
|
e0f543167d | ||
|
|
e9f9cac4be | ||
|
|
e9e4041670 | ||
|
|
3185a0b150 | ||
|
|
a2a0ca2a17 | ||
|
|
b19862400b | ||
|
|
a5055aa3db | ||
|
|
2ceb66085c | ||
|
|
e59865fa40 | ||
|
|
02131d1f1b | ||
|
|
08666ed474 | ||
|
|
b488f3edf6 | ||
|
|
1a08f93391 | ||
|
|
e732b20a4d | ||
|
|
afff904993 | ||
|
|
1f6c360968 | ||
|
|
ccb97d88ff | ||
|
|
1b03667a27 | ||
|
|
5c24bebd2b | ||
|
|
e51e79f343 | ||
|
|
03fd40904f | ||
|
|
13bcd282e3 | ||
|
|
26e714137a | ||
|
|
63b8d1466d | ||
|
|
3c4cc0a001 | ||
|
|
d64611a414 | ||
|
|
a457b16dfc | ||
|
|
9372c6c29f | ||
|
|
7ad70bd837 | ||
|
|
8c52e2d45d | ||
|
|
d61a4c1757 | ||
|
|
9244b6ed08 |
+1
-1
@@ -1939,7 +1939,7 @@
|
||||
2008-07-28 Jan Nijtmans <nijtmans@users.sf.net>
|
||||
|
||||
* doc/FileSystem.3: CONSTified many functions using
|
||||
* generic/tcl.decls: Tcl_FileSystem which all are supposed
|
||||
* generic/tcl.decls: Tcl_Filesystem which all are supposed
|
||||
* generic/tclDecls.h: to be a constant, but this was not
|
||||
* generic/tclFileSystem.h: reflected in the API: Tcl_FSData,
|
||||
* generic/tclIOUtil.c: Tcl_FSGetInternalRep, Tcl_FSRegister,
|
||||
|
||||
@@ -9232,7 +9232,7 @@ See RFC 2045
|
||||
2020-09-17 (bug)[835c93] Support TIP 525 exit code for -singleproc 1 (nijtmans)
|
||||
=> tcltest 2.5.3
|
||||
|
||||
2020-09-25 (new) force -eofchar \032 when evaluating library scripts (nijtmans)
|
||||
2020-09-25 (new) force -eofchar \x1A when evaluating library scripts (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2020-09-29 (bug)[0063cb] http::geturl -headers must be dict (oehlmann,nijtmans)
|
||||
@@ -9375,3 +9375,54 @@ in this changeset (new minor version) rather than bug fixes:
|
||||
2021-10-27 tzdata updated to Olson's tzdata2021e (nijtmans)
|
||||
|
||||
- Released 8.6.12, Nov 5, 2021 - details at https://core.tcl-lang.org/tcl/ -
|
||||
|
||||
2021-12-08 (update) tcltest package to version 2.5.4
|
||||
|
||||
2022-01-13 (bug)[26f132] Crash when sizeof(int) < sizeof(void *) (Plan 9 port)
|
||||
|
||||
2022-01-19 (TIP 623)[e9a271] Tcl_GetRange index args < 0 (petasis,nijtmans)
|
||||
|
||||
2022-03-08 (bug) test string-5.22 (porter)
|
||||
|
||||
2022-03-11 (bug)[8a7ec8] fat binary compile on Mac M1 (davis, nijtmans)
|
||||
|
||||
2022-04-04 (bug)[e5ed1b] numeric IPv6 in URLs (nijtmans)
|
||||
=> http 2.9.6
|
||||
|
||||
2022-04-26 (bug)[27520c] test error-9.6 (goth,sebres)
|
||||
|
||||
2022-05-04 (bug)[8eb64b] http package tolerant again invalid reply header
|
||||
|
||||
2022-05-11 (bug)[6898f9] http package failed detection of shiftjis charset
|
||||
|
||||
2022-05-25 (bug)[76ad7a] tests string-6.13[23] (mistachkin, nijtmans)
|
||||
|
||||
2022-06-20 (bug)[55bf73] Avoid connection reuse after response code 101.
|
||||
=> http 2.9.8
|
||||
|
||||
2022-07-22 (bug)[713653] FP rounding exposed by x86 musl (rubicon,sebres)
|
||||
|
||||
2022-07-22 More portable notation of microseconds in verbose output (sebres)
|
||||
=> tcltest 2.5.5
|
||||
|
||||
2022-07-27 (bug)[b3977d] Process CR-LF split across packets (nadkarni,sebres)
|
||||
|
||||
2022-07-29 (bug)[4eb3a1] crash due to undetected bytecode invalidity (nadkarni)
|
||||
|
||||
2022-08-23 (new)[371080] Portability to CHERI-enabled Morello processor (jrtc27)
|
||||
|
||||
2022-09-06 (bug)[55a02f] Fallback init env(HOME) from USERPROFILE (nadkarni)
|
||||
|
||||
2022-09-13 (bug)[1073da] crash writing invalid utf-8 (nijtmans)
|
||||
|
||||
2022-09-14 (new) Update to Unicode-15 (nijtmans)
|
||||
|
||||
2022-10-14 tzdata updated to Olson's tzdata2022e (nijtmans)
|
||||
|
||||
Update bundled zlib to 1.2.13
|
||||
|
||||
Update bundled libtommath
|
||||
|
||||
Many code fixes to avoid overflow or undefined behavior. Thanks chrstphrchvz.
|
||||
|
||||
- Released 8.6.13, Nov 22, 2022 - details at https://core.tcl-lang.org/tcl/ -
|
||||
|
||||
+6
-6
@@ -20,7 +20,7 @@ Tcl_Obj *
|
||||
\fBTcl_SetBooleanObj\fR(\fIobjPtr, intValue\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetBooleanFromObj\fR(\fIinterp, objPtr, intPtr\fR)
|
||||
\fBTcl_GetBooleanFromObj\fR(\fIinterp, objPtr, boolPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetBoolFromObj\fR(\fIinterp, objPtr, flags. charPtr\fR)
|
||||
@@ -35,7 +35,7 @@ retrieve a boolean value.
|
||||
If a boolean value cannot be retrieved,
|
||||
an error message is left in the interpreter's result value
|
||||
unless \fIinterp\fR is NULL.
|
||||
.AP int *intPtr out
|
||||
.AP "bool \&| int" *boolPtr out
|
||||
Points to place where \fBTcl_GetBooleanFromObj\fR
|
||||
stores the boolean value (0 or 1) obtained from \fIobjPtr\fR.
|
||||
.AP char *charPtr out
|
||||
@@ -71,13 +71,13 @@ any former value stored in \fI*objPtr\fR.
|
||||
from the value stored in \fI*objPtr\fR.
|
||||
If \fIobjPtr\fR holds a string value recognized by \fBTcl_GetBoolean\fR,
|
||||
then the recognized boolean value is written at the address given
|
||||
by \fIintPtr\fR.
|
||||
by \fIboolPtr\fR.
|
||||
If \fIobjPtr\fR holds any value recognized as
|
||||
a number by Tcl, then if that value is zero a 0 is written at
|
||||
the address given by \fIintPtr\fR and if that
|
||||
value is non-zero a 1 is written at the address given by \fIintPtr\fR.
|
||||
the address given by \fIboolPtr\fR and if that
|
||||
value is non-zero a 1 is written at the address given by \fIboolPtr\fR.
|
||||
In all cases where a value is written at the address given
|
||||
by \fIintPtr\fR, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fR.
|
||||
by \fIboolPtr\fR, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fR.
|
||||
If the value of \fIobjPtr\fR does not meet any of the conditions
|
||||
above, then \fBTCL_ERROR\fR is returned and an error message is
|
||||
left in the interpreter's result unless \fIinterp\fR is NULL.
|
||||
|
||||
+19
-5
@@ -47,7 +47,7 @@ details of the calling sequence.
|
||||
.AP Tcl_CmdTraceProc *proc in
|
||||
Procedure to call for each command that is executed. See below for
|
||||
details on the calling sequence.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIobjProc\fR, \fIobjProc2\fR or \fIproc\fR.
|
||||
.AP Tcl_CmdObjTraceDeleteProc *deleteProc in
|
||||
Procedure to call when the trace is deleted. See below for details of
|
||||
@@ -72,7 +72,7 @@ interpreter.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
\fBClientData\fR \fIclientData\fR,
|
||||
\fBvoid *\fR \fIclientData\fR,
|
||||
\fBTcl_Interp\fR* \fIinterp\fR,
|
||||
int \fIlevel\fR,
|
||||
const char *\fIcommand\fR,
|
||||
@@ -81,6 +81,20 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
\fBTcl_Obj\fR *const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
\fIobjProc2\fR should have arguments and result that match the type,
|
||||
\fBTcl_CmdObjTraceProc2\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_CmdObjTraceProc2\fR(
|
||||
\fBvoid *\fR \fIclientData\fR,
|
||||
\fBTcl_Interp\fR* \fIinterp\fR,
|
||||
size_t \fIlevel\fR,
|
||||
const char *\fIcommand\fR,
|
||||
\fBTcl_Command\fR \fIcommandToken\fR,
|
||||
size_t \fIobjc\fR,
|
||||
\fBTcl_Obj\fR *const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR and \fIinterp\fR parameters are copies of the
|
||||
corresponding arguments given to \fBTcl_CreateTrace\fR.
|
||||
\fIClientData\fR typically points to an application-specific data
|
||||
@@ -146,7 +160,7 @@ When \fBTcl_DeleteTrace\fR is called, the interpreter invokes the
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdObjTraceDeleteProc\fR(
|
||||
\fBClientData\fR \fIclientData\fR);
|
||||
\fBvoid *\fR \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter will be the same as the
|
||||
@@ -162,12 +176,12 @@ match the type \fBTcl_CmdTraceProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdTraceProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIlevel\fR,
|
||||
char *\fIcommand\fR,
|
||||
Tcl_CmdProc *\fIcmdProc\fR,
|
||||
ClientData \fIcmdClientData\fR,
|
||||
void *\fIcmdClientData\fR,
|
||||
int \fIargc\fR,
|
||||
const char *\fIargv\fR[]);
|
||||
.CE
|
||||
|
||||
@@ -41,6 +41,10 @@ char *
|
||||
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
|
||||
.sp
|
||||
\fBTcl_DStringGetResult\fR(\fIinterp, dsPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
\fBTcl_DStringToObj\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_DString newLength in/out
|
||||
.AP Tcl_DString *dsPtr in/out
|
||||
@@ -142,12 +146,25 @@ a pointer from \fIdsPtr\fR to the interpreter's result.
|
||||
This saves the cost of allocating new memory and copying the string.
|
||||
\fBTcl_DStringResult\fR also reinitializes the dynamic string to
|
||||
an empty string.
|
||||
Since the dynamic string is reinitialized, there is no need to
|
||||
further call \fBTcl_DStringFree\fR on it and it can be reused without
|
||||
calling \fBTcl_DStringInit\fR.
|
||||
.PP
|
||||
\fBTcl_DStringGetResult\fR does the opposite of \fBTcl_DStringResult\fR.
|
||||
It sets the value of \fIdsPtr\fR to the result of \fIinterp\fR and
|
||||
it clears \fIinterp\fR's result.
|
||||
If possible it does this by moving a pointer rather than by copying
|
||||
the string.
|
||||
.PP
|
||||
\fBTcl_DStringToObj\fR returns a \fBTcl_Obj\fR containing the value of
|
||||
the dynamic string given by \fIdsPtr\fR. It does this by moving
|
||||
a pointer from \fIdsPtr\fR to a newly allocated \fBTcl_Obj\fR
|
||||
and reinitializing to dynamic string to an empty string.
|
||||
This saves the cost of allocating new memory and copying the string.
|
||||
Since the dynamic string is reinitialized, there is no need to
|
||||
further call \fBTcl_DStringFree\fR on it and it can be reused without
|
||||
calling \fBTcl_DStringInit\fR.
|
||||
The returned \fBTcl_Obj\fR has a reference count of 0.
|
||||
|
||||
.SH KEYWORDS
|
||||
append, dynamic string, free, result
|
||||
|
||||
+3
-3
@@ -347,7 +347,7 @@ typedef struct Tcl_EncodingType {
|
||||
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
|
||||
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
|
||||
Tcl_EncodingFreeProc *\fIfreeProc\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
void *\fIclientData\fR;
|
||||
int \fInullSize\fR;
|
||||
} \fBTcl_EncodingType\fR;
|
||||
.CE
|
||||
@@ -378,7 +378,7 @@ type \fBTcl_EncodingConvertProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_EncodingConvertProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
const char *\fIsrc\fR,
|
||||
int \fIsrcLen\fR,
|
||||
int \fIflags\fR,
|
||||
@@ -410,7 +410,7 @@ The callback procedure \fIfreeProc\fR, if non-NULL, should match the type
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EncodingFreeProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
This \fIfreeProc\fR function is called when the encoding is deleted. The
|
||||
|
||||
+6
-1
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers
|
||||
Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_GetWideUIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -40,6 +40,9 @@ int
|
||||
int
|
||||
\fBTcl_GetWideIntFromObj\fR(\fIinterp, objPtr, widePtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetWideUIntFromObj\fR(\fIinterp, objPtr, uwidePtr\fR)
|
||||
.sp
|
||||
.sp
|
||||
\fB#include <tclTomMath.h>\fR
|
||||
.sp
|
||||
@@ -82,6 +85,8 @@ Points to place to store the integer value retrieved from \fIobjPtr\fR.
|
||||
Points to place to store the long integer value retrieved from \fIobjPtr\fR.
|
||||
.AP Tcl_WideInt *widePtr out
|
||||
Points to place to store the wide integer value retrieved from \fIobjPtr\fR.
|
||||
.AP Tcl_WideUInt *uwidePtr out
|
||||
Points to place to store the unsigned wide integer value retrieved from \fIobjPtr\fR.
|
||||
.AP mp_int *bigValue in/out
|
||||
Points to a multi-precision integer structure declared by the LibTomMath
|
||||
library.
|
||||
|
||||
+1
-3
@@ -239,9 +239,7 @@ The C variable, or each element of the C array, is of type \fBTcl_WideUInt\fR
|
||||
(which is an unsigned integer type at least 64-bits wide on all platforms that
|
||||
can support it.)
|
||||
Any value written into the Tcl variable must have a proper unsigned
|
||||
integer form acceptable to \fBTcl_GetWideIntFromObj\fR (it will be
|
||||
cast to unsigned);
|
||||
.\" FIXME! Use bignums instead.
|
||||
wideinteger form acceptable to \fBTcl_GetWideUIntFromObj\fR;
|
||||
attempts to write non-integer values into \fIvarName\fR will be
|
||||
rejected with Tcl errors. Incomplete integer representations (like
|
||||
the empty string, '+', '-' or the hex/octal/decimal/binary prefix) are accepted
|
||||
|
||||
+12
-12
@@ -406,10 +406,10 @@ to UTF-8 based on the channel's encoding and storing the produced data in
|
||||
\fIreadObjPtr\fR's string representation. The return value of
|
||||
\fBTcl_ReadChars\fR is the number of characters, up to \fIcharsToRead\fR,
|
||||
that were stored in \fIreadObjPtr\fR. If an error occurs while reading, the
|
||||
return value is \-1 and \fBTcl_ReadChars\fR records a POSIX error code that
|
||||
return value is TCL_INDEX_NONE and \fBTcl_ReadChars\fR records a POSIX error code that
|
||||
can be retrieved with \fBTcl_GetErrno\fR.
|
||||
.PP
|
||||
Setting \fIcharsToRead\fR to \fB\-1\fR will cause the command to read
|
||||
Setting \fIcharsToRead\fR to TCL_INDEX_NONE will cause the command to read
|
||||
all characters currently available (non-blocking) or everything until
|
||||
eof (blocking mode).
|
||||
.PP
|
||||
@@ -471,14 +471,14 @@ character(s) are read and discarded.
|
||||
.PP
|
||||
If a line was successfully read, the return value is greater than or equal
|
||||
to zero and indicates the number of bytes stored in \fIlineObjPtr\fR. If an
|
||||
error occurs, \fBTcl_GetsObj\fR returns \-1 and records a POSIX error code
|
||||
error occurs, \fBTcl_GetsObj\fR returns TCL_INDEX_NONE and records a POSIX error code
|
||||
that can be retrieved with \fBTcl_GetErrno\fR. \fBTcl_GetsObj\fR also
|
||||
returns \-1 if the end of the file is reached; the \fBTcl_Eof\fR procedure
|
||||
returns TCL_INDEX_NONE if the end of the file is reached; the \fBTcl_Eof\fR procedure
|
||||
can be used to distinguish an error from an end-of-file condition.
|
||||
.PP
|
||||
If the channel is in nonblocking mode, the return value can also be \-1 if
|
||||
no data was available or the data that was available did not contain an
|
||||
end-of-line character. When \-1 is returned, the \fBTcl_InputBlocked\fR
|
||||
If the channel is in nonblocking mode, the return value can also be TCL_INDEX_NONE
|
||||
if no data was available or the data that was available did not contain an
|
||||
end-of-line character. When TCL_INDEX_NONE is returned, the \fBTcl_InputBlocked\fR
|
||||
procedure may be invoked to determine if the channel is blocked because
|
||||
of input unavailability.
|
||||
.PP
|
||||
@@ -496,7 +496,7 @@ head of the queue. If \fIchannel\fR has a
|
||||
.QW sticky
|
||||
EOF set, no data will be
|
||||
added to the input queue. \fBTcl_Ungets\fR returns \fIinputLen\fR or
|
||||
\-1 if an error occurs.
|
||||
TCL_INDEX_NONE if an error occurs.
|
||||
.SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE"
|
||||
.PP
|
||||
\fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at
|
||||
@@ -513,10 +513,10 @@ to appear as soon as a complete line is accepted for output, set the
|
||||
\fB\-buffering\fR option on the channel to \fBline\fR mode.
|
||||
.PP
|
||||
The return value of \fBTcl_WriteChars\fR is a count of how many bytes were
|
||||
accepted for output to the channel. This is either greater than zero to
|
||||
indicate success or \-1 to indicate that an error occurred. If an error
|
||||
occurs, \fBTcl_WriteChars\fR records a POSIX error code that may be
|
||||
retrieved with \fBTcl_GetErrno\fR.
|
||||
accepted for output to the channel. This is either TCL_INDEX_NONE to
|
||||
indicate that an error occurred or another number greater than
|
||||
zero to indicate success. If an error occurs, \fBTcl_WriteChars\fR records
|
||||
a POSIX error code that may be retrieved with \fBTcl_GetErrno\fR.
|
||||
.PP
|
||||
Newline characters in the output data are translated to platform-specific
|
||||
end-of-line sequences according to the \fB\-translation\fR option for the
|
||||
|
||||
+3
-1
@@ -24,7 +24,7 @@ Tcl_Channel
|
||||
\fBTcl_OpenTcpServer\fR(\fIinterp, port, myaddr, proc, clientData\fR)
|
||||
.sp
|
||||
Tcl_Channel
|
||||
\fBTcl_OpenTcpServerEx\fR(\fIinterp, service, myaddr, flags, proc, clientData\fR)
|
||||
\fBTcl_OpenTcpServerEx\fR(\fIinterp, service, myaddr, flags, backlog, proc, clientData\fR)
|
||||
.sp
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_TcpAcceptProc clientData
|
||||
@@ -47,6 +47,8 @@ for the local end of the connection. If NULL, a default interface is
|
||||
chosen.
|
||||
.AP int async in
|
||||
If nonzero, the client socket is connected asynchronously to the server.
|
||||
.AP int backlog in
|
||||
Length of OS listen backlog queue. Use -1 for default value.
|
||||
.AP "unsigned int" flags in
|
||||
ORed combination of \fBTCL_TCPSERVER\fR flags that specify additional
|
||||
informations about the socket being created.
|
||||
|
||||
+3
-4
@@ -144,15 +144,14 @@ interface with the operating system,
|
||||
.TP
|
||||
\fB\-eofchar\fR \fIchar\fR
|
||||
.TP
|
||||
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
|
||||
\fB\-eofchar\fR \fB{\fIchar outChar\fB}\fR
|
||||
.
|
||||
\fIchar\fR signals the end of the data when it is encountered in the input.
|
||||
For output, the character is added when the channel is closed. If \fIchar\fR
|
||||
For output, \fIoutChar\fR is added when the channel is closed. If \fIchar\fR
|
||||
is the empty string, there is no special character that marks the end of the
|
||||
data. For read-write channels, one end-of-file character for input and another
|
||||
for output may be given. When only one end-of-file character is given it is
|
||||
applied to both input and output. For a read-write channel two values are
|
||||
returned even if they are are identical.
|
||||
applied to input only.
|
||||
|
||||
The default value is the empty string, except that under Windows the default
|
||||
value for reading is Control-z (\ex1A). The acceptable range is \ex01 -
|
||||
|
||||
+2
-2
@@ -186,9 +186,9 @@ Surprising results
|
||||
may be obtained when crossing a point at which a leap second is
|
||||
inserted or removed; the \fBclock add\fR command simply ignores
|
||||
leap seconds and therefore assumes that times come in sequence,
|
||||
23:59:58, 23:59:59, 00:00:00. (This assumption is handled by
|
||||
23:59:58, 23:59:59, 00:00:00. This assumption is handled by
|
||||
the fact that Tcl's model of time reacts to leap seconds by speeding
|
||||
or slowing the clock by a minuscule amount until Tcl's time
|
||||
or slowing the clock by a miniscule amount until Tcl's time
|
||||
is back in step with the world.
|
||||
.PP
|
||||
The fact that adding and subtracting hours is defined in terms of
|
||||
|
||||
+81
-38
@@ -28,52 +28,76 @@ formats.
|
||||
Performs one of several encoding related operations, depending on
|
||||
\fIoption\fR. The legal \fIoption\fRs are:
|
||||
.TP
|
||||
\fBencoding convertfrom\fR ?\fB-nocomplain\fR? ?\fB-failindex var\fR?
|
||||
?\fIencoding\fR? \fIdata\fR
|
||||
\fBencoding convertfrom\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
|
||||
\fBencoding convertfrom\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
|
||||
.
|
||||
Convert \fIdata\fR to a Unicode string from the specified \fIencoding\fR. The
|
||||
characters in \fIdata\fR are 8 bit binary data. The resulting
|
||||
sequence of bytes is a string created by applying the given \fIencoding\fR
|
||||
to the data. If \fIencoding\fR is not specified, the current
|
||||
system encoding is used.
|
||||
.
|
||||
The call fails on convertion errors, like an incomplete utf-8 sequence.
|
||||
The option \fB-failindex\fR is followed by a variable name. The variable
|
||||
is set to \fI-1\fR if no conversion error occured. It is set to the
|
||||
first error location in \fIdata\fR in case of a conversion error. All data
|
||||
until this error location is transformed and retured. This option may not
|
||||
be used together with \fB-nocomplain\fR.
|
||||
.
|
||||
The call does not fail on conversion errors, if the option
|
||||
\fB-nocomplain\fR is given. In this case, any error locations are replaced
|
||||
by \fB?\fR. Incomplete sequences are written verbatim to the output string.
|
||||
The purpose of this switch is to gain compatibility to prior versions of TCL.
|
||||
It is not recommended for any other usage.
|
||||
system encoding is used. If at least one of \fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
|
||||
is provided, this makes the \fIencoding\fR argument mandatory.
|
||||
.VS "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.PP
|
||||
.RS
|
||||
The command does not fail on encoding errors. Instead, any not convertable bytes
|
||||
(like incomplete UTF-8 sequences, see example below) are put as byte values into
|
||||
the output stream.
|
||||
.PP
|
||||
If the option \fB-failindex\fR with a variable name is given, the error reporting
|
||||
is changed in the following manner:
|
||||
in case of a conversion error, the position of the input byte causing the error
|
||||
is returned in the given variable. The return value of the command are the
|
||||
converted characters until the first error position.
|
||||
In case of no error, the value \fI-1\fR is written to the variable. This option
|
||||
may not be used together with \fB-nocomplain\fR.
|
||||
.PP
|
||||
The option \fB-nocomplain\fR has no effect and is available for compatibility with
|
||||
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
|
||||
This switch restores the TCL8.7 behaviour.
|
||||
.PP
|
||||
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
|
||||
encoder, it disallows invalid byte sequences and surrogates (which -
|
||||
otherwise - are just passed through). This option may not be used together
|
||||
with \fB-nocomplain\fR.
|
||||
.VE "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.RE
|
||||
.TP
|
||||
\fBencoding convertto\fR ?\fB-nocomplain\fR? ?\fB-failindex var\fR?
|
||||
?\fIencoding\fR? \fIstring\fR
|
||||
\fBencoding convertto\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
|
||||
\fBencoding convertto\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
|
||||
.
|
||||
Convert \fIstring\fR from Unicode to the specified \fIencoding\fR.
|
||||
The result is a sequence of bytes that represents the converted
|
||||
string. Each byte is stored in the lower 8-bits of a Unicode
|
||||
character (indeed, the resulting string is a binary string as far as
|
||||
Tcl is concerned, at least initially). If \fIencoding\fR is not
|
||||
specified, the current system encoding is used.
|
||||
.
|
||||
The call fails on convertion errors, like a Unicode character not representable
|
||||
in the given \fIencoding\fR.
|
||||
.
|
||||
The option \fB-failindex\fR is followed by a variable name. The variable
|
||||
is set to \fI-1\fR if no conversion error occured. It is set to the
|
||||
first error location in \fIdata\fR in case of a conversion error. All data
|
||||
until this error location is transformed and retured. This option may not
|
||||
be used together with \fB-nocomplain\fR.
|
||||
.
|
||||
The call does not fail on conversion errors, if the option
|
||||
\fB-nocomplain\fR is given. In this case, any error locations are replaced
|
||||
by \fB?\fR. Incomplete sequences are written verbatim to the output string.
|
||||
The purpose of this switch is to gain compatibility to prior versions of TCL.
|
||||
It is not recommended for any other usage.
|
||||
specified, the current system encoding is used. If at least one of
|
||||
\fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
|
||||
is provided, this makes the \fIencoding\fR argument mandatory.
|
||||
.VS "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.PP
|
||||
.RS
|
||||
The command does not fail on encoding errors. Instead, the replacement character
|
||||
\fB?\fR is output for any not representable character (like the dot \fB\\U2022\fR
|
||||
in \fBiso-8859-1\fR encoding, see example below).
|
||||
.PP
|
||||
If the option \fB-failindex\fR with a variable name is given, the error reporting
|
||||
is changed in the following manner:
|
||||
in case of a conversion error, the position of the input character causing the error
|
||||
is returned in the given variable. The return value of the command are the
|
||||
converted bytes until the first error position. No error condition is raised.
|
||||
In case of no error, the value \fI-1\fR is written to the variable. This option
|
||||
may not be used together with \fB-nocomplain\fR.
|
||||
.PP
|
||||
The option \fB-nocomplain\fR has no effect and is available for compatibility with
|
||||
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
|
||||
This switch restores the TCL8.7 behaviour.
|
||||
.PP
|
||||
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
|
||||
encoder, it disallows surrogates (which - otherwise - are just passed through). This
|
||||
option may not be used together with \fB-nocomplain\fR.
|
||||
.VE "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.RE
|
||||
.TP
|
||||
\fBencoding dirs\fR ?\fIdirectoryList\fR?
|
||||
.
|
||||
@@ -104,7 +128,7 @@ omitted then the command returns the current system encoding. The
|
||||
system encoding is used whenever Tcl passes strings to system calls.
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
The following example converts a byte sequence in Japanese euc-jp encoding to a TCL string:
|
||||
Example 1: convert a byte sequence in Japanese euc-jp encoding to a TCL string:
|
||||
.PP
|
||||
.CS
|
||||
set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"]
|
||||
@@ -113,8 +137,9 @@ set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"]
|
||||
The result is the unicode codepoint:
|
||||
.QW "\eu306F" ,
|
||||
which is the Hiragana letter HA.
|
||||
.VS "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.PP
|
||||
The following example detects the error location in an incomplete UTF-8 sequence:
|
||||
Example 2: detect the error location in an incomplete UTF-8 sequence:
|
||||
.PP
|
||||
.CS
|
||||
% set s [\fBencoding convertfrom\fR -failindex i utf-8 "A\exC3"]
|
||||
@@ -123,7 +148,15 @@ A
|
||||
1
|
||||
.CE
|
||||
.PP
|
||||
The following example detects the error location while transforming to ISO8859-1
|
||||
Example 3: return the incomplete UTF-8 sequence by raw bytes:
|
||||
.PP
|
||||
.CS
|
||||
% set s [\fBencoding convertfrom\fR -nocomplain utf-8 "A\exC3"]
|
||||
.CE
|
||||
The result is "A" followed by the byte \exC3. The option \fB-nocomplain\fR
|
||||
has no effect, but assures to get the same result with TCL9.
|
||||
.PP
|
||||
Example 4: detect the error location while transforming to ISO8859-1
|
||||
(ISO-Latin 1):
|
||||
.PP
|
||||
.CS
|
||||
@@ -133,8 +166,18 @@ A
|
||||
1
|
||||
.CE
|
||||
.PP
|
||||
Example 5: replace a not representable character by the replacement character:
|
||||
.PP
|
||||
.CS
|
||||
% set s [\fBencoding convertto\fR -nocomplain utf-8 "A\eu0141"]
|
||||
A?
|
||||
.CE
|
||||
The option \fB-nocomplain\fR has no effect, but assures to get the same result
|
||||
with TCL9.
|
||||
.VE "TCL8.7 TIP346, TIP607, TIP601"
|
||||
.PP
|
||||
.SH "SEE ALSO"
|
||||
Tcl_GetEncoding(3)
|
||||
Tcl_GetEncoding(3), fconfigure(n)
|
||||
.SH KEYWORDS
|
||||
encoding, unicode
|
||||
.\" Local Variables:
|
||||
|
||||
+26
-1
@@ -103,7 +103,7 @@ system, as returned by \fBencoding system\fR.
|
||||
.TP
|
||||
\fB\-eofchar\fR \fIchar\fR
|
||||
.TP
|
||||
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
|
||||
\fB\-eofchar\fR \fB{\fIchar outChar\fB}\fR
|
||||
.
|
||||
This option supports DOS file systems that use Control-z (\ex1A) as an
|
||||
end of file marker. If \fIchar\fR is not an empty string, then this
|
||||
@@ -122,6 +122,31 @@ reading and the empty string for writing.
|
||||
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7F;
|
||||
attempting to set \fB\-eofchar\fR to a value outside of this range will
|
||||
generate an error.
|
||||
.VS "TCL8.7 TIP633"
|
||||
.TP
|
||||
\fB\-nocomplainencoding\fR \fIbool\fR
|
||||
.
|
||||
Reporting mode of encoding errors.
|
||||
If set to a \fItrue\fR value, encoding errors are resolved by a replacement
|
||||
character (output) or verbatim bytes (input). No error is thrown.
|
||||
This is the only available mode in Tcl 8.7.
|
||||
.RS
|
||||
.PP
|
||||
Starting from TCL 9.0, this value may be set to a \fIfalse\fR value to throw errors
|
||||
in case of encoding errors.
|
||||
.RE
|
||||
.VE "TCL8.7 TIP633"
|
||||
.VS "TCL8.7 TIP346"
|
||||
.TP
|
||||
\fB\-strictencoding\fR \fIbool\fR
|
||||
.
|
||||
Activate additional stricter encoding application rules.
|
||||
Default value is \fIfalse\fR.
|
||||
.RS
|
||||
.PP
|
||||
See the \fI\-strict\fR option of the \fBencoding\fR command for more information.
|
||||
.VE "TCL8.7 TIP346"
|
||||
.RE
|
||||
.TP
|
||||
\fB\-translation\fR \fImode\fR
|
||||
.TP
|
||||
|
||||
+40
-11
@@ -172,14 +172,15 @@ fresh socket, overriding the \fB\-keepalive\fR option of
|
||||
command \fBhttp::geturl\fR. See the \fBPERSISTENT SOCKETS\fR section for
|
||||
details. The default is 0.
|
||||
.TP
|
||||
\fB\-proxyhost\fR \fIhostname\fR
|
||||
\fB\-proxyauth\fR \fIstring\fR
|
||||
.
|
||||
The name of the proxy host, if any. If this value is the
|
||||
empty string, the URL host is contacted directly.
|
||||
.TP
|
||||
\fB\-proxyport\fR \fInumber\fR
|
||||
.
|
||||
The proxy port number.
|
||||
If non-empty, the string is supplied to the proxy server as the value of the
|
||||
request header Proxy-Authorization. This option can be used for HTTP Basic
|
||||
Authentication. If the proxy server requires authentication by another
|
||||
technique, e.g. Digest Authentication, the \fB\-proxyauth\fR option is not
|
||||
useful. In that case the caller must expect a 407 response from the proxy,
|
||||
compute the authentication value to be supplied, and use the \fB\-headers\fR
|
||||
option to supply it as the value of the Proxy-Authorization header.
|
||||
.TP
|
||||
\fB\-proxyfilter\fR \fIcommand\fR
|
||||
.
|
||||
@@ -188,18 +189,46 @@ The command is a callback that is made during
|
||||
to determine if a proxy is required for a given host. One argument, a
|
||||
host name, is added to \fIcommand\fR when it is invoked. If a proxy
|
||||
is required, the callback should return a two-element list containing
|
||||
the proxy server and proxy port. Otherwise the filter should return
|
||||
an empty list. The default filter returns the values of the
|
||||
\fB\-proxyhost\fR and \fB\-proxyport\fR settings if they are
|
||||
non-empty.
|
||||
the proxy server and proxy port. Otherwise the filter command should return
|
||||
an empty list.
|
||||
.RS
|
||||
.PP
|
||||
The default value of \fB\-proxyfilter\fR is \fBhttp::ProxyRequired\fR, and
|
||||
this command returns the values of the \fB\-proxyhost\fR and
|
||||
\fB\-proxyport\fR settings if they are non-empty. The options
|
||||
\fB\-proxyhost\fR, \fB\-proxyport\fR, and \fB\-proxynot\fR are used only
|
||||
by \fBhttp::ProxyRequired\fR, and nowhere else in \fB::http::geturl\fR.
|
||||
A user-supplied \fB\-proxyfilter\fR command may use these options, or
|
||||
alternatively it may obtain values from elsewhere in the calling script.
|
||||
In the latter case, any values provided for \fB\-proxyhost\fR,
|
||||
\fB\-proxyport\fR, and \fB\-proxynot\fR are unused.
|
||||
.PP
|
||||
The \fB::http::geturl\fR command runs the \fB\-proxyfilter\fR callback inside
|
||||
a \fBcatch\fR command. Therefore an error in the callback command does
|
||||
not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
|
||||
details.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-proxyhost\fR \fIhostname\fR
|
||||
.
|
||||
The host name or IP address of the proxy server, if any. If this value is
|
||||
the empty string, the URL host is contacted directly. See
|
||||
\fB\-proxyfilter\fR for how the value is used.
|
||||
.TP
|
||||
\fB\-proxynot\fR \fIlist\fR
|
||||
.
|
||||
A Tcl list of domain names and IP addresses that should be accessed directly,
|
||||
not through the proxy server. The target hostname is compared with each list
|
||||
element using a case-insensitive \fBstring match\fR. It is often convenient
|
||||
to use the wildcard "*" at the start of a domain name (e.g. *.example.com) or
|
||||
at the end of an IP address (e.g. 192.168.0.*). See \fB\-proxyfilter\fR for
|
||||
how the value is used.
|
||||
.TP
|
||||
\fB\-proxyport\fR \fInumber\fR
|
||||
.
|
||||
The port number of the proxy server. See \fB\-proxyfilter\fR for how the
|
||||
value is used.
|
||||
.TP
|
||||
\fB\-repost\fR \fIboolean\fR
|
||||
.
|
||||
Specifies what to do if a POST request over a persistent connection fails
|
||||
|
||||
+2
-3
@@ -468,7 +468,7 @@ Examples of use with "Sync Mode" off: any of these commands will set the
|
||||
safe::interpConfigure foo -accessPath {}
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
.PP
|
||||
Example of use with "Sync Mode" off: when initializing a safe interpreter
|
||||
with a non-empty access path, the ::auto_path will be set to {} unless its
|
||||
own value is also specified:
|
||||
@@ -506,7 +506,7 @@ own value is also specified:
|
||||
}
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
.PP
|
||||
Example of use with "Sync Mode" off: the command
|
||||
\fBsafe::interpAddToAccessPath\fR does not change the safe interpreter's
|
||||
::auto_path, and so any necessary change must be made by the script:
|
||||
@@ -520,7 +520,6 @@ Example of use with "Sync Mode" off: the command
|
||||
safe::interpConfigure foo -autoPath $childAutoPath
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
.SH "SEE ALSO"
|
||||
interp(n), library(n), load(n), package(n), pkg_mkIndex(n), source(n),
|
||||
tm(n), unknown(n)
|
||||
|
||||
+139
-123
@@ -86,10 +86,10 @@ declare 15 {
|
||||
void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...)
|
||||
}
|
||||
declare 16 {
|
||||
void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, int length)
|
||||
void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, Tcl_Size length)
|
||||
}
|
||||
declare 17 {
|
||||
Tcl_Obj *Tcl_ConcatObj(int objc, Tcl_Obj *const objv[])
|
||||
Tcl_Obj *Tcl_ConcatObj(Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 18 {
|
||||
int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
@@ -109,14 +109,14 @@ declare 22 {deprecated {No longer in use, changed to macro}} {
|
||||
}
|
||||
declare 23 {
|
||||
Tcl_Obj *Tcl_DbNewByteArrayObj(const unsigned char *bytes,
|
||||
int numBytes, const char *file, int line)
|
||||
Tcl_Size numBytes, const char *file, int line)
|
||||
}
|
||||
declare 24 {
|
||||
Tcl_Obj *Tcl_DbNewDoubleObj(double doubleValue, const char *file,
|
||||
int line)
|
||||
}
|
||||
declare 25 {
|
||||
Tcl_Obj *Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv,
|
||||
Tcl_Obj *Tcl_DbNewListObj(Tcl_Size objc, Tcl_Obj *const *objv,
|
||||
const char *file, int line)
|
||||
}
|
||||
declare 26 {deprecated {No longer in use, changed to macro}} {
|
||||
@@ -126,7 +126,7 @@ declare 27 {
|
||||
Tcl_Obj *Tcl_DbNewObj(const char *file, int line)
|
||||
}
|
||||
declare 28 {
|
||||
Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, int length,
|
||||
Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, Tcl_Size length,
|
||||
const char *file, int line)
|
||||
}
|
||||
declare 29 {
|
||||
@@ -188,7 +188,7 @@ declare 45 {
|
||||
int *objcPtr, Tcl_Obj ***objvPtr)
|
||||
}
|
||||
declare 46 {
|
||||
int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, int index,
|
||||
int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size index,
|
||||
Tcl_Obj **objPtrPtr)
|
||||
}
|
||||
declare 47 {
|
||||
@@ -196,14 +196,14 @@ declare 47 {
|
||||
int *lengthPtr)
|
||||
}
|
||||
declare 48 {
|
||||
int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, int first,
|
||||
int count, int objc, Tcl_Obj *const objv[])
|
||||
int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size first,
|
||||
Tcl_Size count, Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 49 {deprecated {No longer in use, changed to macro}} {
|
||||
Tcl_Obj *Tcl_NewBooleanObj(int intValue)
|
||||
}
|
||||
declare 50 {
|
||||
Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char *bytes, int numBytes)
|
||||
Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char *bytes, Tcl_Size numBytes)
|
||||
}
|
||||
declare 51 {
|
||||
Tcl_Obj *Tcl_NewDoubleObj(double doubleValue)
|
||||
@@ -212,7 +212,7 @@ declare 52 {deprecated {No longer in use, changed to macro}} {
|
||||
Tcl_Obj *Tcl_NewIntObj(int intValue)
|
||||
}
|
||||
declare 53 {
|
||||
Tcl_Obj *Tcl_NewListObj(int objc, Tcl_Obj *const objv[])
|
||||
Tcl_Obj *Tcl_NewListObj(Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 54 {deprecated {No longer in use, changed to macro}} {
|
||||
Tcl_Obj *Tcl_NewLongObj(long longValue)
|
||||
@@ -221,17 +221,17 @@ declare 55 {
|
||||
Tcl_Obj *Tcl_NewObj(void)
|
||||
}
|
||||
declare 56 {
|
||||
Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length)
|
||||
Tcl_Obj *Tcl_NewStringObj(const char *bytes, Tcl_Size length)
|
||||
}
|
||||
declare 57 {deprecated {No longer in use, changed to macro}} {
|
||||
void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int intValue)
|
||||
}
|
||||
declare 58 {
|
||||
unsigned char *Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int numBytes)
|
||||
unsigned char *Tcl_SetByteArrayLength(Tcl_Obj *objPtr, Tcl_Size numBytes)
|
||||
}
|
||||
declare 59 {
|
||||
void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, const unsigned char *bytes,
|
||||
int numBytes)
|
||||
Tcl_Size numBytes)
|
||||
}
|
||||
declare 60 {
|
||||
void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue)
|
||||
@@ -240,16 +240,16 @@ declare 61 {deprecated {No longer in use, changed to macro}} {
|
||||
void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue)
|
||||
}
|
||||
declare 62 {
|
||||
void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[])
|
||||
void Tcl_SetListObj(Tcl_Obj *objPtr, Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 63 {deprecated {No longer in use, changed to macro}} {
|
||||
void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue)
|
||||
}
|
||||
declare 64 {
|
||||
void Tcl_SetObjLength(Tcl_Obj *objPtr, int length)
|
||||
void Tcl_SetObjLength(Tcl_Obj *objPtr, Tcl_Size length)
|
||||
}
|
||||
declare 65 {
|
||||
void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, int length)
|
||||
void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, Tcl_Size length)
|
||||
}
|
||||
declare 66 {deprecated {No longer in use, changed to macro}} {
|
||||
void Tcl_AddErrorInfo(Tcl_Interp *interp, const char *message)
|
||||
@@ -308,23 +308,23 @@ declare 82 {
|
||||
int Tcl_CommandComplete(const char *cmd)
|
||||
}
|
||||
declare 83 {
|
||||
char *Tcl_Concat(int argc, const char *const *argv)
|
||||
char *Tcl_Concat(Tcl_Size argc, const char *const *argv)
|
||||
}
|
||||
declare 84 {
|
||||
int Tcl_ConvertElement(const char *src, char *dst, int flags)
|
||||
Tcl_Size Tcl_ConvertElement(const char *src, char *dst, int flags)
|
||||
}
|
||||
declare 85 {
|
||||
int Tcl_ConvertCountedElement(const char *src, int length, char *dst,
|
||||
Tcl_Size Tcl_ConvertCountedElement(const char *src, Tcl_Size length, char *dst,
|
||||
int flags)
|
||||
}
|
||||
declare 86 {
|
||||
int Tcl_CreateAlias(Tcl_Interp *childInterp, const char *childCmd,
|
||||
Tcl_Interp *target, const char *targetCmd, int argc,
|
||||
Tcl_Interp *target, const char *targetCmd, Tcl_Size argc,
|
||||
const char *const *argv)
|
||||
}
|
||||
declare 87 {
|
||||
int Tcl_CreateAliasObj(Tcl_Interp *childInterp, const char *childCmd,
|
||||
Tcl_Interp *target, const char *targetCmd, int objc,
|
||||
Tcl_Interp *target, const char *targetCmd, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 88 {
|
||||
@@ -374,7 +374,7 @@ declare 98 {
|
||||
Tcl_TimerProc *proc, void *clientData)
|
||||
}
|
||||
declare 99 {
|
||||
Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level,
|
||||
Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, Tcl_Size level,
|
||||
Tcl_CmdTraceProc *proc, void *clientData)
|
||||
}
|
||||
declare 100 {
|
||||
@@ -414,7 +414,7 @@ declare 110 {
|
||||
void Tcl_DeleteInterp(Tcl_Interp *interp)
|
||||
}
|
||||
declare 111 {
|
||||
void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr)
|
||||
void Tcl_DetachPids(Tcl_Size numPids, Tcl_Pid *pidPtr)
|
||||
}
|
||||
declare 112 {
|
||||
void Tcl_DeleteTimerHandler(Tcl_TimerToken token)
|
||||
@@ -433,7 +433,7 @@ declare 116 {
|
||||
void Tcl_DoWhenIdle(Tcl_IdleProc *proc, void *clientData)
|
||||
}
|
||||
declare 117 {
|
||||
char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length)
|
||||
char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, Tcl_Size length)
|
||||
}
|
||||
declare 118 {
|
||||
char *Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element)
|
||||
@@ -454,7 +454,7 @@ declare 123 {
|
||||
void Tcl_DStringResult(Tcl_Interp *interp, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 124 {
|
||||
void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length)
|
||||
void Tcl_DStringSetLength(Tcl_DString *dsPtr, Tcl_Size length)
|
||||
}
|
||||
declare 125 {
|
||||
void Tcl_DStringStartSublist(Tcl_DString *dsPtr)
|
||||
@@ -547,7 +547,7 @@ declare 151 {
|
||||
int *modePtr)
|
||||
}
|
||||
declare 152 {
|
||||
int Tcl_GetChannelBufferSize(Tcl_Channel chan)
|
||||
Tcl_Size Tcl_GetChannelBufferSize(Tcl_Channel chan)
|
||||
}
|
||||
declare 153 {
|
||||
int Tcl_GetChannelHandle(Tcl_Channel chan, int direction,
|
||||
@@ -609,10 +609,10 @@ declare 168 {
|
||||
Tcl_PathType Tcl_GetPathType(const char *path)
|
||||
}
|
||||
declare 169 {
|
||||
int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr)
|
||||
Tcl_Size Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 170 {
|
||||
int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr)
|
||||
Tcl_Size Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 171 {
|
||||
int Tcl_GetServiceMode(void)
|
||||
@@ -664,7 +664,7 @@ declare 185 {
|
||||
}
|
||||
# Obsolete, use Tcl_FSJoinPath
|
||||
declare 186 {
|
||||
char *Tcl_JoinPath(int argc, const char *const *argv,
|
||||
char *Tcl_JoinPath(Tcl_Size argc, const char *const *argv,
|
||||
Tcl_DString *resultPtr)
|
||||
}
|
||||
declare 187 {
|
||||
@@ -687,7 +687,7 @@ declare 191 {
|
||||
Tcl_Channel Tcl_MakeTcpClientChannel(void *tcpSocket)
|
||||
}
|
||||
declare 192 {
|
||||
char *Tcl_Merge(int argc, const char *const *argv)
|
||||
char *Tcl_Merge(Tcl_Size argc, const char *const *argv)
|
||||
}
|
||||
declare 193 {
|
||||
Tcl_HashEntry *Tcl_NextHashEntry(Tcl_HashSearch *searchPtr)
|
||||
@@ -704,7 +704,7 @@ declare 196 {
|
||||
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags)
|
||||
}
|
||||
declare 197 {
|
||||
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
|
||||
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, Tcl_Size argc,
|
||||
const char **argv, int flags)
|
||||
}
|
||||
# This is obsolete, use Tcl_FSOpenFileChannel
|
||||
@@ -714,7 +714,7 @@ declare 198 {
|
||||
}
|
||||
declare 199 {
|
||||
Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port,
|
||||
const char *address, const char *myaddr, int myport, int async)
|
||||
const char *address, const char *myaddr, int myport, int flags)
|
||||
}
|
||||
declare 200 {
|
||||
Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port,
|
||||
@@ -737,7 +737,7 @@ declare 205 {
|
||||
void Tcl_QueueEvent(Tcl_Event *evPtr, int position)
|
||||
}
|
||||
declare 206 {
|
||||
int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead)
|
||||
Tcl_Size Tcl_Read(Tcl_Channel chan, char *bufPtr, Tcl_Size toRead)
|
||||
}
|
||||
declare 207 {
|
||||
void Tcl_ReapDetachedProcs(void)
|
||||
@@ -766,7 +766,7 @@ declare 214 {
|
||||
const char *pattern)
|
||||
}
|
||||
declare 215 {
|
||||
void Tcl_RegExpRange(Tcl_RegExp regexp, int index,
|
||||
void Tcl_RegExpRange(Tcl_RegExp regexp, Tcl_Size index,
|
||||
const char **startPtr, const char **endPtr)
|
||||
}
|
||||
declare 216 {
|
||||
@@ -776,10 +776,10 @@ declare 217 {
|
||||
void Tcl_ResetResult(Tcl_Interp *interp)
|
||||
}
|
||||
declare 218 {
|
||||
int Tcl_ScanElement(const char *src, int *flagPtr)
|
||||
Tcl_Size Tcl_ScanElement(const char *src, int *flagPtr)
|
||||
}
|
||||
declare 219 {
|
||||
int Tcl_ScanCountedElement(const char *src, int length, int *flagPtr)
|
||||
Tcl_Size Tcl_ScanCountedElement(const char *src, Tcl_Size length, int *flagPtr)
|
||||
}
|
||||
declare 220 {deprecated {}} {
|
||||
int Tcl_SeekOld(Tcl_Channel chan, int offset, int mode)
|
||||
@@ -795,7 +795,7 @@ declare 223 {
|
||||
Tcl_InterpDeleteProc *proc, void *clientData)
|
||||
}
|
||||
declare 224 {
|
||||
void Tcl_SetChannelBufferSize(Tcl_Channel chan, int sz)
|
||||
void Tcl_SetChannelBufferSize(Tcl_Channel chan, Tcl_Size sz)
|
||||
}
|
||||
declare 225 {
|
||||
int Tcl_SetChannelOption(Tcl_Interp *interp, Tcl_Channel chan,
|
||||
@@ -818,7 +818,7 @@ declare 230 {nostub {Don't use this function in a stub-enabled extension}} {
|
||||
const char *Tcl_SetPanicProc(TCL_NORETURN1 Tcl_PanicProc *panicProc)
|
||||
}
|
||||
declare 231 {
|
||||
int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth)
|
||||
Tcl_Size Tcl_SetRecursionLimit(Tcl_Interp *interp, Tcl_Size depth)
|
||||
}
|
||||
declare 232 {
|
||||
void Tcl_SetResult(Tcl_Interp *interp, char *result,
|
||||
@@ -884,7 +884,7 @@ declare 249 {
|
||||
Tcl_DString *bufferPtr)
|
||||
}
|
||||
declare 250 {
|
||||
int Tcl_Ungets(Tcl_Channel chan, const char *str, int len, int atHead)
|
||||
Tcl_Size Tcl_Ungets(Tcl_Channel chan, const char *str, Tcl_Size len, int atHead)
|
||||
}
|
||||
declare 251 {
|
||||
void Tcl_UnlinkVar(Tcl_Interp *interp, const char *varName)
|
||||
@@ -932,10 +932,10 @@ declare 262 {
|
||||
void *prevClientData)
|
||||
}
|
||||
declare 263 {
|
||||
int Tcl_Write(Tcl_Channel chan, const char *s, int slen)
|
||||
Tcl_Size Tcl_Write(Tcl_Channel chan, const char *s, Tcl_Size slen)
|
||||
}
|
||||
declare 264 {
|
||||
void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc,
|
||||
void Tcl_WrongNumArgs(Tcl_Interp *interp, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[], const char *message)
|
||||
}
|
||||
declare 265 {
|
||||
@@ -1047,11 +1047,11 @@ declare 290 {deprecated {Use Tcl_DiscardInterpState}} {
|
||||
void Tcl_DiscardResult(Tcl_SavedResult *statePtr)
|
||||
}
|
||||
declare 291 {
|
||||
int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes,
|
||||
int Tcl_EvalEx(Tcl_Interp *interp, const char *script, Tcl_Size numBytes,
|
||||
int flags)
|
||||
}
|
||||
declare 292 {
|
||||
int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
|
||||
int Tcl_EvalObjv(Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[],
|
||||
int flags)
|
||||
}
|
||||
declare 293 {
|
||||
@@ -1062,13 +1062,13 @@ declare 294 {
|
||||
}
|
||||
declare 295 {
|
||||
int Tcl_ExternalToUtf(Tcl_Interp *interp, Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, int flags,
|
||||
Tcl_EncodingState *statePtr, char *dst, int dstLen,
|
||||
const char *src, Tcl_Size srcLen, int flags,
|
||||
Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen,
|
||||
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
|
||||
}
|
||||
declare 296 {
|
||||
char *Tcl_ExternalToUtfDString(Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, Tcl_DString *dsPtr)
|
||||
const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 297 {
|
||||
void Tcl_FinalizeThread(void)
|
||||
@@ -1093,11 +1093,11 @@ declare 303 {
|
||||
}
|
||||
declare 304 {
|
||||
int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
const void *tablePtr, int offset, const char *msg, int flags,
|
||||
const void *tablePtr, Tcl_Size offset, const char *msg, int flags,
|
||||
void *indexPtr)
|
||||
}
|
||||
declare 305 {
|
||||
void *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size)
|
||||
void *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, Tcl_Size size)
|
||||
}
|
||||
declare 306 {
|
||||
Tcl_Obj *Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1,
|
||||
@@ -1120,11 +1120,11 @@ declare 311 {
|
||||
const Tcl_Time *timePtr)
|
||||
}
|
||||
declare 312 {
|
||||
int Tcl_NumUtfChars(const char *src, int length)
|
||||
Tcl_Size Tcl_NumUtfChars(const char *src, Tcl_Size length)
|
||||
}
|
||||
declare 313 {
|
||||
int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
|
||||
int charsToRead, int appendFlag)
|
||||
Tcl_Size Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
|
||||
Tcl_Size charsToRead, int appendFlag)
|
||||
}
|
||||
declare 314 {deprecated {Use Tcl_RestoreInterpState}} {
|
||||
void Tcl_RestoreResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr)
|
||||
@@ -1147,7 +1147,7 @@ declare 319 {
|
||||
int position)
|
||||
}
|
||||
declare 320 {
|
||||
int Tcl_UniCharAtIndex(const char *src, int index)
|
||||
int Tcl_UniCharAtIndex(const char *src, Tcl_Size index)
|
||||
}
|
||||
declare 321 {
|
||||
int Tcl_UniCharToLower(int ch)
|
||||
@@ -1162,13 +1162,13 @@ declare 324 {
|
||||
int Tcl_UniCharToUtf(int ch, char *buf)
|
||||
}
|
||||
declare 325 {
|
||||
const char *Tcl_UtfAtIndex(const char *src, int index)
|
||||
const char *Tcl_UtfAtIndex(const char *src, Tcl_Size index)
|
||||
}
|
||||
declare 326 {
|
||||
int TclUtfCharComplete(const char *src, int length)
|
||||
int TclUtfCharComplete(const char *src, Tcl_Size length)
|
||||
}
|
||||
declare 327 {
|
||||
int Tcl_UtfBackslash(const char *src, int *readPtr, char *dst)
|
||||
Tcl_Size Tcl_UtfBackslash(const char *src, int *readPtr, char *dst)
|
||||
}
|
||||
declare 328 {
|
||||
const char *Tcl_UtfFindFirst(const char *src, int ch)
|
||||
@@ -1184,13 +1184,13 @@ declare 331 {
|
||||
}
|
||||
declare 332 {
|
||||
int Tcl_UtfToExternal(Tcl_Interp *interp, Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, int flags,
|
||||
Tcl_EncodingState *statePtr, char *dst, int dstLen,
|
||||
const char *src, Tcl_Size srcLen, int flags,
|
||||
Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen,
|
||||
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
|
||||
}
|
||||
declare 333 {
|
||||
char *Tcl_UtfToExternalDString(Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, Tcl_DString *dsPtr)
|
||||
const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 334 {
|
||||
int Tcl_UtfToLower(char *src)
|
||||
@@ -1205,10 +1205,10 @@ declare 337 {
|
||||
int Tcl_UtfToUpper(char *src)
|
||||
}
|
||||
declare 338 {
|
||||
int Tcl_WriteChars(Tcl_Channel chan, const char *src, int srcLen)
|
||||
Tcl_Size Tcl_WriteChars(Tcl_Channel chan, const char *src, Tcl_Size srcLen)
|
||||
}
|
||||
declare 339 {
|
||||
int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr)
|
||||
Tcl_Size Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 340 {
|
||||
char *Tcl_GetString(Tcl_Obj *objPtr)
|
||||
@@ -1247,7 +1247,7 @@ declare 351 {
|
||||
int Tcl_UniCharIsWordChar(int ch)
|
||||
}
|
||||
declare 352 {
|
||||
int Tcl_Char16Len(const unsigned short *uniStr)
|
||||
Tcl_Size Tcl_Char16Len(const unsigned short *uniStr)
|
||||
}
|
||||
declare 353 {deprecated {Use Tcl_UtfNcmp}} {
|
||||
int Tcl_UniCharNcmp(const unsigned short *ucs, const unsigned short *uct,
|
||||
@@ -1255,11 +1255,11 @@ declare 353 {deprecated {Use Tcl_UtfNcmp}} {
|
||||
}
|
||||
declare 354 {
|
||||
char *Tcl_Char16ToUtfDString(const unsigned short *uniStr,
|
||||
int uniLength, Tcl_DString *dsPtr)
|
||||
Tcl_Size uniLength, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 355 {
|
||||
unsigned short *Tcl_UtfToChar16DString(const char *src,
|
||||
int length, Tcl_DString *dsPtr)
|
||||
Tcl_Size length, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 356 {
|
||||
Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp, Tcl_Obj *patObj,
|
||||
@@ -1274,29 +1274,29 @@ declare 358 {
|
||||
}
|
||||
declare 359 {
|
||||
void Tcl_LogCommandInfo(Tcl_Interp *interp, const char *script,
|
||||
const char *command, int length)
|
||||
const char *command, Tcl_Size length)
|
||||
}
|
||||
declare 360 {
|
||||
int Tcl_ParseBraces(Tcl_Interp *interp, const char *start,
|
||||
int numBytes, Tcl_Parse *parsePtr, int append,
|
||||
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append,
|
||||
const char **termPtr)
|
||||
}
|
||||
declare 361 {
|
||||
int Tcl_ParseCommand(Tcl_Interp *interp, const char *start,
|
||||
int numBytes, int nested, Tcl_Parse *parsePtr)
|
||||
Tcl_Size numBytes, int nested, Tcl_Parse *parsePtr)
|
||||
}
|
||||
declare 362 {
|
||||
int Tcl_ParseExpr(Tcl_Interp *interp, const char *start,
|
||||
int numBytes, Tcl_Parse *parsePtr)
|
||||
Tcl_Size numBytes, Tcl_Parse *parsePtr)
|
||||
}
|
||||
declare 363 {
|
||||
int Tcl_ParseQuotedString(Tcl_Interp *interp, const char *start,
|
||||
int numBytes, Tcl_Parse *parsePtr, int append,
|
||||
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append,
|
||||
const char **termPtr)
|
||||
}
|
||||
declare 364 {
|
||||
int Tcl_ParseVarName(Tcl_Interp *interp, const char *start,
|
||||
int numBytes, Tcl_Parse *parsePtr, int append)
|
||||
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append)
|
||||
}
|
||||
# These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir,
|
||||
# Tcl_FSAccess and Tcl_FSStat
|
||||
@@ -1335,33 +1335,33 @@ declare 375 {
|
||||
}
|
||||
declare 376 {
|
||||
int Tcl_RegExpExecObj(Tcl_Interp *interp, Tcl_RegExp regexp,
|
||||
Tcl_Obj *textObj, int offset, int nmatches, int flags)
|
||||
Tcl_Obj *textObj, Tcl_Size offset, Tcl_Size nmatches, int flags)
|
||||
}
|
||||
declare 377 {
|
||||
void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr)
|
||||
}
|
||||
declare 378 {
|
||||
Tcl_Obj *Tcl_NewUnicodeObj(const unsigned short *unicode, int numChars)
|
||||
Tcl_Obj *Tcl_NewUnicodeObj(const unsigned short *unicode, Tcl_Size numChars)
|
||||
}
|
||||
declare 379 {
|
||||
void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const unsigned short *unicode,
|
||||
int numChars)
|
||||
Tcl_Size numChars)
|
||||
}
|
||||
declare 380 {
|
||||
int Tcl_GetCharLength(Tcl_Obj *objPtr)
|
||||
Tcl_Size Tcl_GetCharLength(Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 381 {
|
||||
int Tcl_GetUniChar(Tcl_Obj *objPtr, int index)
|
||||
int Tcl_GetUniChar(Tcl_Obj *objPtr, Tcl_Size index)
|
||||
}
|
||||
declare 382 {deprecated {No longer in use, changed to macro}} {
|
||||
unsigned short *Tcl_GetUnicode(Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 383 {
|
||||
Tcl_Obj *Tcl_GetRange(Tcl_Obj *objPtr, int first, int last)
|
||||
Tcl_Obj *Tcl_GetRange(Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last)
|
||||
}
|
||||
declare 384 {
|
||||
void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, const unsigned short *unicode,
|
||||
int length)
|
||||
Tcl_Size length)
|
||||
}
|
||||
declare 385 {
|
||||
int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *textObj,
|
||||
@@ -1381,7 +1381,7 @@ declare 389 {
|
||||
}
|
||||
declare 390 {
|
||||
int Tcl_ProcObjCmd(void *clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const objv[])
|
||||
Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 391 {
|
||||
void Tcl_ConditionFinalize(Tcl_Condition *condPtr)
|
||||
@@ -1391,15 +1391,15 @@ declare 392 {
|
||||
}
|
||||
declare 393 {
|
||||
int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc,
|
||||
void *clientData, int stackSize, int flags)
|
||||
void *clientData, Tcl_Size stackSize, int flags)
|
||||
}
|
||||
|
||||
# Introduced in 8.3.2
|
||||
declare 394 {
|
||||
int Tcl_ReadRaw(Tcl_Channel chan, char *dst, int bytesToRead)
|
||||
Tcl_Size Tcl_ReadRaw(Tcl_Channel chan, char *dst, Tcl_Size bytesToRead)
|
||||
}
|
||||
declare 395 {
|
||||
int Tcl_WriteRaw(Tcl_Channel chan, const char *src, int srcLen)
|
||||
Tcl_Size Tcl_WriteRaw(Tcl_Channel chan, const char *src, Tcl_Size srcLen)
|
||||
}
|
||||
declare 396 {
|
||||
Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan)
|
||||
@@ -1534,7 +1534,7 @@ declare 431 {
|
||||
const char *file, int line)
|
||||
}
|
||||
declare 432 {
|
||||
int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length)
|
||||
int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, Tcl_Size length)
|
||||
}
|
||||
|
||||
# TIP#10 (thread-aware channels) akupries
|
||||
@@ -1640,7 +1640,7 @@ declare 459 {
|
||||
int Tcl_FSConvertToPathType(Tcl_Interp *interp, Tcl_Obj *pathPtr)
|
||||
}
|
||||
declare 460 {
|
||||
Tcl_Obj *Tcl_FSJoinPath(Tcl_Obj *listObj, int elements)
|
||||
Tcl_Obj *Tcl_FSJoinPath(Tcl_Obj *listObj, Tcl_Size elements)
|
||||
}
|
||||
declare 461 {
|
||||
Tcl_Obj *Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr)
|
||||
@@ -1652,7 +1652,7 @@ declare 463 {
|
||||
Tcl_Obj *Tcl_FSGetNormalizedPath(Tcl_Interp *interp, Tcl_Obj *pathPtr)
|
||||
}
|
||||
declare 464 {
|
||||
Tcl_Obj *Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc,
|
||||
Tcl_Obj *Tcl_FSJoinToPath(Tcl_Obj *pathPtr, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 465 {
|
||||
@@ -1712,7 +1712,7 @@ declare 480 {
|
||||
# TIP#56 (evaluate a parsed script) msofer
|
||||
declare 481 {
|
||||
int Tcl_EvalTokensStandard(Tcl_Interp *interp, Tcl_Token *tokenPtr,
|
||||
int count)
|
||||
Tcl_Size count)
|
||||
}
|
||||
|
||||
# TIP#73 (access to current time) kbk
|
||||
@@ -1722,7 +1722,7 @@ declare 482 {
|
||||
|
||||
# TIP#32 (object-enabled traces) kbk
|
||||
declare 483 {
|
||||
Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level, int flags,
|
||||
Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, Tcl_Size level, int flags,
|
||||
Tcl_CmdObjTraceProc *objProc, void *clientData,
|
||||
Tcl_CmdObjTraceDeleteProc *delProc)
|
||||
}
|
||||
@@ -1798,11 +1798,11 @@ declare 500 {
|
||||
}
|
||||
declare 501 {
|
||||
int Tcl_DictObjPutKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr,
|
||||
int keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr)
|
||||
Tcl_Size keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr)
|
||||
}
|
||||
declare 502 {
|
||||
int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr,
|
||||
int keyc, Tcl_Obj *const *keyv)
|
||||
Tcl_Size keyc, Tcl_Obj *const *keyv)
|
||||
}
|
||||
declare 503 {
|
||||
Tcl_Obj *Tcl_NewDictObj(void)
|
||||
@@ -1895,7 +1895,7 @@ declare 524 {
|
||||
int Tcl_LimitExceeded(Tcl_Interp *interp)
|
||||
}
|
||||
declare 525 {
|
||||
void Tcl_LimitSetCommands(Tcl_Interp *interp, int commandLimit)
|
||||
void Tcl_LimitSetCommands(Tcl_Interp *interp, Tcl_Size commandLimit)
|
||||
}
|
||||
declare 526 {
|
||||
void Tcl_LimitSetTime(Tcl_Interp *interp, Tcl_Time *timeLimitPtr)
|
||||
@@ -2084,7 +2084,7 @@ declare 572 {
|
||||
# TIP#268 (extended version numbers and requirements) akupries
|
||||
declare 573 {
|
||||
int Tcl_PkgRequireProc(Tcl_Interp *interp, const char *name,
|
||||
int objc, Tcl_Obj *const objv[], void *clientDataPtr)
|
||||
Tcl_Size objc, Tcl_Obj *const objv[], void *clientDataPtr)
|
||||
}
|
||||
|
||||
# TIP#270 (utility C routines for string formatting) dgp
|
||||
@@ -2093,15 +2093,15 @@ declare 574 {
|
||||
}
|
||||
declare 575 {
|
||||
void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr, const char *bytes,
|
||||
int length, int limit, const char *ellipsis)
|
||||
Tcl_Size length, Tcl_Size limit, const char *ellipsis)
|
||||
}
|
||||
declare 576 {
|
||||
Tcl_Obj *Tcl_Format(Tcl_Interp *interp, const char *format, int objc,
|
||||
Tcl_Obj *Tcl_Format(Tcl_Interp *interp, const char *format, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 577 {
|
||||
int Tcl_AppendFormatToObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
const char *format, int objc, Tcl_Obj *const objv[])
|
||||
const char *format, Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
declare 578 {
|
||||
Tcl_Obj *Tcl_ObjPrintf(const char *format, ...)
|
||||
@@ -2138,11 +2138,11 @@ declare 584 {
|
||||
int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags)
|
||||
}
|
||||
declare 585 {
|
||||
int Tcl_NREvalObjv(Tcl_Interp *interp, int objc,
|
||||
int Tcl_NREvalObjv(Tcl_Interp *interp, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[], int flags)
|
||||
}
|
||||
declare 586 {
|
||||
int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc,
|
||||
int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, Tcl_Size objc,
|
||||
Tcl_Obj *const objv[], int flags)
|
||||
}
|
||||
declare 587 {
|
||||
@@ -2154,7 +2154,7 @@ declare 587 {
|
||||
# classic objProc
|
||||
declare 588 {
|
||||
int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc,
|
||||
void *clientData, int objc, Tcl_Obj *const objv[])
|
||||
void *clientData, Tcl_Size objc, Tcl_Obj *const objv[])
|
||||
}
|
||||
|
||||
# TIP#316 (Tcl_StatBuf reader functions) dkf
|
||||
@@ -2245,15 +2245,15 @@ declare 610 {
|
||||
}
|
||||
declare 611 {
|
||||
int Tcl_ZlibInflate(Tcl_Interp *interp, int format, Tcl_Obj *data,
|
||||
int buffersize, Tcl_Obj *gzipHeaderDictObj)
|
||||
Tcl_Size buffersize, Tcl_Obj *gzipHeaderDictObj)
|
||||
}
|
||||
declare 612 {
|
||||
unsigned int Tcl_ZlibCRC32(unsigned int crc, const unsigned char *buf,
|
||||
int len)
|
||||
Tcl_Size len)
|
||||
}
|
||||
declare 613 {
|
||||
unsigned int Tcl_ZlibAdler32(unsigned int adler, const unsigned char *buf,
|
||||
int len)
|
||||
Tcl_Size len)
|
||||
}
|
||||
declare 614 {
|
||||
int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format,
|
||||
@@ -2273,7 +2273,7 @@ declare 618 {
|
||||
}
|
||||
declare 619 {
|
||||
int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, Tcl_Obj *data,
|
||||
int count)
|
||||
Tcl_Size count)
|
||||
}
|
||||
declare 620 {
|
||||
int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle)
|
||||
@@ -2327,11 +2327,11 @@ declare 630 {
|
||||
|
||||
# ----- BASELINE -- FOR -- 8.6.0 ----- #
|
||||
|
||||
# TIP #456
|
||||
# TIP #456/#468
|
||||
declare 631 {
|
||||
Tcl_Channel Tcl_OpenTcpServerEx(Tcl_Interp *interp, const char *service,
|
||||
const char *host, unsigned int flags, Tcl_TcpAcceptProc *acceptProc,
|
||||
void *callbackData)
|
||||
const char *host, unsigned int flags, int backlog,
|
||||
Tcl_TcpAcceptProc *acceptProc, void *callbackData)
|
||||
}
|
||||
|
||||
# TIP #430
|
||||
@@ -2385,12 +2385,12 @@ declare 643 {
|
||||
# TIP#312 New Tcl_LinkArray() function
|
||||
declare 644 {
|
||||
int Tcl_LinkArray(Tcl_Interp *interp, const char *varName, void *addr,
|
||||
int type, int size)
|
||||
int type, Tcl_Size size)
|
||||
}
|
||||
|
||||
declare 645 {
|
||||
int Tcl_GetIntForIndex(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
int endValue, int *indexPtr)
|
||||
Tcl_Size endValue, Tcl_Size *indexPtr)
|
||||
}
|
||||
|
||||
# TIP #548
|
||||
@@ -2399,11 +2399,11 @@ declare 646 {
|
||||
}
|
||||
declare 647 {
|
||||
char *Tcl_UniCharToUtfDString(const int *uniStr,
|
||||
int uniLength, Tcl_DString *dsPtr)
|
||||
Tcl_Size uniLength, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 648 {
|
||||
int *Tcl_UtfToUniCharDString(const char *src,
|
||||
int length, Tcl_DString *dsPtr)
|
||||
Tcl_Size length, Tcl_DString *dsPtr)
|
||||
}
|
||||
|
||||
# TIP #568
|
||||
@@ -2430,7 +2430,7 @@ declare 653 {
|
||||
|
||||
# TIP #575
|
||||
declare 654 {
|
||||
int Tcl_UtfCharComplete(const char *src, int length)
|
||||
int Tcl_UtfCharComplete(const char *src, Tcl_Size length)
|
||||
}
|
||||
declare 655 {
|
||||
const char *Tcl_UtfNext(const char *src)
|
||||
@@ -2442,12 +2442,12 @@ declare 657 {
|
||||
int Tcl_UniCharIsUnicode(int ch)
|
||||
}
|
||||
declare 658 {
|
||||
int Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, int flags, Tcl_DString *dsPtr)
|
||||
Tcl_Size Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding,
|
||||
const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr)
|
||||
}
|
||||
declare 659 {
|
||||
int Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding,
|
||||
const char *src, int srcLen, int flags, Tcl_DString *dsPtr)
|
||||
Tcl_Size Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding,
|
||||
const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr)
|
||||
}
|
||||
|
||||
# TIP #511
|
||||
@@ -2484,22 +2484,22 @@ declare 667 {
|
||||
|
||||
# TIP #617
|
||||
declare 668 {
|
||||
int Tcl_UniCharLen(const int *uniStr)
|
||||
Tcl_Size Tcl_UniCharLen(const int *uniStr)
|
||||
}
|
||||
declare 669 {
|
||||
int TclNumUtfChars(const char *src, int length)
|
||||
Tcl_Size TclNumUtfChars(const char *src, Tcl_Size length)
|
||||
}
|
||||
declare 670 {
|
||||
int TclGetCharLength(Tcl_Obj *objPtr)
|
||||
Tcl_Size TclGetCharLength(Tcl_Obj *objPtr)
|
||||
}
|
||||
declare 671 {
|
||||
const char *TclUtfAtIndex(const char *src, int index)
|
||||
const char *TclUtfAtIndex(const char *src, Tcl_Size index)
|
||||
}
|
||||
declare 672 {
|
||||
Tcl_Obj *TclGetRange(Tcl_Obj *objPtr, int first, int last)
|
||||
Tcl_Obj *TclGetRange(Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last)
|
||||
}
|
||||
declare 673 {
|
||||
int TclGetUniChar(Tcl_Obj *objPtr, int index)
|
||||
int TclGetUniChar(Tcl_Obj *objPtr, Tcl_Size index)
|
||||
}
|
||||
|
||||
declare 674 {
|
||||
@@ -2517,7 +2517,7 @@ declare 676 {
|
||||
Tcl_CmdDeleteProc *deleteProc)
|
||||
}
|
||||
declare 677 {
|
||||
Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp, int level, int flags,
|
||||
Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp, Tcl_Size level, int flags,
|
||||
Tcl_CmdObjTraceProc2 *objProc2, void *clientData,
|
||||
Tcl_CmdObjTraceDeleteProc *delProc)
|
||||
}
|
||||
@@ -2547,11 +2547,26 @@ declare 682 {
|
||||
int Tcl_RemoveChannelMode(Tcl_Interp *interp, Tcl_Channel chan, int mode)
|
||||
}
|
||||
|
||||
# ----- BASELINE -- FOR -- 8.7.0 ----- #
|
||||
|
||||
# TIP 643
|
||||
declare 683 {
|
||||
int Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
|
||||
Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
|
||||
}
|
||||
|
||||
# TIP #650
|
||||
declare 684 {
|
||||
int Tcl_GetWideUIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
Tcl_WideUInt *uwidePtr)
|
||||
}
|
||||
|
||||
# TIP 651
|
||||
declare 685 {
|
||||
Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr)
|
||||
}
|
||||
|
||||
# ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- #
|
||||
|
||||
declare 687 {
|
||||
void TclUnusedStubEntry(void)
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
@@ -2602,10 +2617,10 @@ declare 2 macosx {
|
||||
# Public functions that are not accessible via the stubs table.
|
||||
|
||||
export {
|
||||
void Tcl_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc)
|
||||
void Tcl_Main(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc)
|
||||
}
|
||||
export {
|
||||
void Tcl_MainEx(int argc, char **argv, Tcl_AppInitProc *appInitProc,
|
||||
void Tcl_MainEx(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc,
|
||||
Tcl_Interp *interp)
|
||||
}
|
||||
export {
|
||||
@@ -2643,6 +2658,7 @@ export {
|
||||
const char *TclZipfs_AppHook(int *argc, char ***argv)
|
||||
}
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: tcl
|
||||
# End:
|
||||
|
||||
+117
-120
@@ -48,10 +48,10 @@ extern "C" {
|
||||
*/
|
||||
|
||||
#if !defined(TCL_MAJOR_VERSION)
|
||||
#define TCL_MAJOR_VERSION 8
|
||||
# define TCL_MAJOR_VERSION 8
|
||||
#endif
|
||||
#if TCL_MAJOR_VERSION != 8
|
||||
#error "This header-file is for Tcl 8 only"
|
||||
# error "This header-file is for Tcl 8 only"
|
||||
#endif
|
||||
#define TCL_MINOR_VERSION 7
|
||||
#define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE
|
||||
@@ -156,7 +156,7 @@ extern "C" {
|
||||
# endif
|
||||
#else
|
||||
# define TCL_FORMAT_PRINTF(a,b)
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1310)
|
||||
# if defined(_MSC_VER)
|
||||
# define TCL_NORETURN _declspec(noreturn)
|
||||
# define TCL_NOINLINE __declspec(noinline)
|
||||
# else
|
||||
@@ -323,10 +323,7 @@ typedef long LONG;
|
||||
* Miscellaneous declarations.
|
||||
*/
|
||||
|
||||
#ifndef _CLIENTDATA
|
||||
typedef void *ClientData;
|
||||
# define _CLIENTDATA
|
||||
#endif
|
||||
typedef void *ClientData;
|
||||
|
||||
/*
|
||||
* Darwin specific configure overrides (to support fat compiles, where
|
||||
@@ -407,30 +404,35 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
|
||||
#define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
|
||||
#define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
|
||||
|
||||
#if TCL_MAJOR_VERSION > 8
|
||||
typedef size_t Tcl_Size;
|
||||
#else
|
||||
typedef int Tcl_Size;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# if defined(_WIN64) || defined(_USE_64BIT_TIME_T)
|
||||
# if TCL_MAJOR_VERSION > 8 || defined(_WIN64) || defined(_USE_64BIT_TIME_T)
|
||||
typedef struct __stat64 Tcl_StatBuf;
|
||||
# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T)
|
||||
# elif defined(_USE_32BIT_TIME_T)
|
||||
typedef struct _stati64 Tcl_StatBuf;
|
||||
# else
|
||||
typedef struct _stat32i64 Tcl_StatBuf;
|
||||
# endif /* _MSC_VER < 1400 */
|
||||
# endif
|
||||
#elif defined(__CYGWIN__)
|
||||
typedef struct {
|
||||
dev_t st_dev;
|
||||
unsigned st_dev;
|
||||
unsigned short st_ino;
|
||||
unsigned short st_mode;
|
||||
short st_nlink;
|
||||
short st_uid;
|
||||
short st_gid;
|
||||
/* Here is a 2-byte gap */
|
||||
dev_t st_rdev;
|
||||
unsigned st_rdev;
|
||||
/* Here is a 4-byte gap */
|
||||
long long st_size;
|
||||
struct {long tv_sec;} st_atim;
|
||||
struct {long tv_sec;} st_mtim;
|
||||
struct {long tv_sec;} st_ctim;
|
||||
/* Here is a 4-byte gap */
|
||||
} Tcl_StatBuf;
|
||||
#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__)
|
||||
typedef struct stat64 Tcl_StatBuf;
|
||||
@@ -499,9 +501,9 @@ typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
|
||||
*/
|
||||
|
||||
#if defined _WIN32
|
||||
typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData);
|
||||
typedef unsigned (__stdcall Tcl_ThreadCreateProc) (void *clientData);
|
||||
#else
|
||||
typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
|
||||
typedef void (Tcl_ThreadCreateProc) (void *clientData);
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -665,67 +667,67 @@ struct Tcl_Obj;
|
||||
*/
|
||||
|
||||
typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
|
||||
typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef int (Tcl_AsyncProc) (void *clientData, Tcl_Interp *interp,
|
||||
int code);
|
||||
typedef void (Tcl_ChannelProc) (ClientData clientData, int mask);
|
||||
typedef void (Tcl_CloseProc) (ClientData data);
|
||||
typedef void (Tcl_CmdDeleteProc) (ClientData clientData);
|
||||
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef void (Tcl_ChannelProc) (void *clientData, int mask);
|
||||
typedef void (Tcl_CloseProc) (void *data);
|
||||
typedef void (Tcl_CmdDeleteProc) (void *clientData);
|
||||
typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
|
||||
int argc, const char *argv[]);
|
||||
typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
|
||||
int level, char *command, Tcl_CmdProc *proc,
|
||||
ClientData cmdClientData, int argc, const char *argv[]);
|
||||
typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
void *cmdClientData, int argc, const char *argv[]);
|
||||
typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
|
||||
int level, const char *command, Tcl_Command commandInfo, int objc,
|
||||
struct Tcl_Obj *const *objv);
|
||||
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
|
||||
int level, const char *command, Tcl_Command commandInfo, size_t objc,
|
||||
size_t level, const char *command, Tcl_Command commandInfo, size_t objc,
|
||||
struct Tcl_Obj *const *objv);
|
||||
typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData);
|
||||
typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
|
||||
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
|
||||
struct Tcl_Obj *dupPtr);
|
||||
typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src,
|
||||
typedef int (Tcl_EncodingConvertProc) (void *clientData, const char *src,
|
||||
int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
|
||||
int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
|
||||
typedef void (Tcl_EncodingFreeProc) (ClientData clientData);
|
||||
typedef void (Tcl_EncodingFreeProc) (void *clientData);
|
||||
typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
|
||||
typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags);
|
||||
typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData);
|
||||
typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags);
|
||||
typedef void (Tcl_ExitProc) (ClientData clientData);
|
||||
typedef void (Tcl_FileProc) (ClientData clientData, int mask);
|
||||
typedef void (Tcl_FileFreeProc) (ClientData clientData);
|
||||
typedef void (Tcl_EventCheckProc) (void *clientData, int flags);
|
||||
typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, void *clientData);
|
||||
typedef void (Tcl_EventSetupProc) (void *clientData, int flags);
|
||||
typedef void (Tcl_ExitProc) (void *clientData);
|
||||
typedef void (Tcl_FileProc) (void *clientData, int mask);
|
||||
typedef void (Tcl_FileFreeProc) (void *clientData);
|
||||
typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
|
||||
typedef void (Tcl_FreeProc) (char *blockPtr);
|
||||
typedef void (Tcl_IdleProc) (ClientData clientData);
|
||||
typedef void (Tcl_InterpDeleteProc) (ClientData clientData,
|
||||
typedef void (Tcl_IdleProc) (void *clientData);
|
||||
typedef void (Tcl_InterpDeleteProc) (void *clientData,
|
||||
Tcl_Interp *interp);
|
||||
typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef int (Tcl_MathProc) (void *clientData, Tcl_Interp *interp,
|
||||
Tcl_Value *args, Tcl_Value *resultPtr);
|
||||
typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData);
|
||||
typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
|
||||
typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
|
||||
int objc, struct Tcl_Obj *const *objv);
|
||||
typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
|
||||
size_t objc, struct Tcl_Obj *const *objv);
|
||||
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
|
||||
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
|
||||
typedef void (Tcl_PanicProc) (const char *format, ...);
|
||||
typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan,
|
||||
typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
|
||||
char *address, int port);
|
||||
typedef void (Tcl_TimerProc) (ClientData clientData);
|
||||
typedef void (Tcl_TimerProc) (void *clientData);
|
||||
typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
|
||||
typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
|
||||
typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef char * (Tcl_VarTraceProc) (void *clientData, Tcl_Interp *interp,
|
||||
const char *part1, const char *part2, int flags);
|
||||
typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp,
|
||||
typedef void (Tcl_CommandTraceProc) (void *clientData, Tcl_Interp *interp,
|
||||
const char *oldName, const char *newName, int flags);
|
||||
typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
|
||||
ClientData clientData);
|
||||
void *clientData);
|
||||
typedef void (Tcl_DeleteFileHandlerProc) (int fd);
|
||||
typedef void (Tcl_AlertNotifierProc) (ClientData clientData);
|
||||
typedef void (Tcl_AlertNotifierProc) (void *clientData);
|
||||
typedef void (Tcl_ServiceModeHookProc) (int mode);
|
||||
typedef ClientData (Tcl_InitNotifierProc) (void);
|
||||
typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData);
|
||||
typedef void *(Tcl_InitNotifierProc) (void);
|
||||
typedef void (Tcl_FinalizeNotifierProc) (void *clientData);
|
||||
typedef void (Tcl_MainLoopProc) (void);
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
@@ -757,6 +759,7 @@ typedef struct Tcl_ObjType {
|
||||
* to this type. Frees the internal rep of the
|
||||
* old type. Returns TCL_ERROR on failure. */
|
||||
} Tcl_ObjType;
|
||||
#define TCL_OBJTYPE_V0 /* just empty */
|
||||
|
||||
/*
|
||||
* The following structure stores an internal representation (internalrep) for
|
||||
@@ -788,7 +791,7 @@ typedef union Tcl_ObjInternalRep { /* The internal representation: */
|
||||
*/
|
||||
|
||||
typedef struct Tcl_Obj {
|
||||
int refCount; /* When 0 the object will be freed. */
|
||||
Tcl_Size refCount; /* When 0 the object will be freed. */
|
||||
char *bytes; /* This points to the first byte of the
|
||||
* object's string representation. The array
|
||||
* must be followed by a null byte (i.e., at
|
||||
@@ -800,7 +803,7 @@ typedef struct Tcl_Obj {
|
||||
* should use Tcl_GetStringFromObj or
|
||||
* Tcl_GetString to get a pointer to the byte
|
||||
* array as a readonly value. */
|
||||
int length; /* The number of bytes at *bytes, not
|
||||
Tcl_Size length; /* The number of bytes at *bytes, not
|
||||
* including the terminating null. */
|
||||
const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
|
||||
* corresponds to the type of the object's
|
||||
@@ -843,7 +846,7 @@ typedef struct Tcl_Namespace {
|
||||
* is an synonym. */
|
||||
char *fullName; /* The namespace's fully qualified name. This
|
||||
* starts with ::. */
|
||||
ClientData clientData; /* Arbitrary value associated with this
|
||||
void *clientData; /* Arbitrary value associated with this
|
||||
* namespace. */
|
||||
Tcl_NamespaceDeleteProc *deleteProc;
|
||||
/* Function invoked when deleting the
|
||||
@@ -880,14 +883,14 @@ typedef struct Tcl_Namespace {
|
||||
typedef struct Tcl_CallFrame {
|
||||
Tcl_Namespace *nsPtr;
|
||||
int dummy1;
|
||||
int dummy2;
|
||||
Tcl_Size dummy2;
|
||||
void *dummy3;
|
||||
void *dummy4;
|
||||
void *dummy5;
|
||||
int dummy6;
|
||||
Tcl_Size dummy6;
|
||||
void *dummy7;
|
||||
void *dummy8;
|
||||
int dummy9;
|
||||
Tcl_Size dummy9;
|
||||
void *dummy10;
|
||||
void *dummy11;
|
||||
void *dummy12;
|
||||
@@ -943,9 +946,9 @@ typedef struct Tcl_CmdInfo {
|
||||
typedef struct Tcl_DString {
|
||||
char *string; /* Points to beginning of string: either
|
||||
* staticSpace below or a malloced array. */
|
||||
int length; /* Number of non-NULL characters in the
|
||||
Tcl_Size length; /* Number of non-NULL characters in the
|
||||
* string. */
|
||||
int spaceAvl; /* Total number of bytes available for the
|
||||
Tcl_Size spaceAvl; /* Total number of bytes available for the
|
||||
* string and its terminating NULL char. */
|
||||
char staticSpace[TCL_DSTRING_STATIC_SIZE];
|
||||
/* Space to use in common case where string is
|
||||
@@ -960,8 +963,8 @@ typedef struct Tcl_DString {
|
||||
|
||||
/*
|
||||
* Definitions for the maximum number of digits of precision that may be
|
||||
* specified in the "tcl_precision" variable, and the number of bytes of
|
||||
* buffer space required by Tcl_PrintDouble.
|
||||
* produced by Tcl_PrintDouble, and the number of bytes of buffer space
|
||||
* required by Tcl_PrintDouble.
|
||||
*/
|
||||
|
||||
#define TCL_MAX_PREC 17
|
||||
@@ -1020,8 +1023,11 @@ typedef struct Tcl_DString {
|
||||
* TCL_COMBINE Combine surrogates (default in Tcl 8.x)
|
||||
*/
|
||||
|
||||
#define TCL_COMBINE 0
|
||||
|
||||
#if TCL_MAJOR_VERSION > 8
|
||||
# define TCL_COMBINE 0x1000000
|
||||
#else
|
||||
# define TCL_COMBINE 0
|
||||
#endif
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
* Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
|
||||
@@ -1150,8 +1156,12 @@ typedef struct Tcl_DString {
|
||||
*/
|
||||
|
||||
#ifndef TCL_HASH_TYPE
|
||||
#if TCL_MAJOR_VERSION > 8
|
||||
# define TCL_HASH_TYPE size_t
|
||||
#else
|
||||
# define TCL_HASH_TYPE unsigned
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct Tcl_HashKeyType Tcl_HashKeyType;
|
||||
typedef struct Tcl_HashTable Tcl_HashTable;
|
||||
@@ -1175,7 +1185,7 @@ struct Tcl_HashEntry {
|
||||
void *hash; /* Hash value, stored as pointer to ensure
|
||||
* that the offsets of the fields in this
|
||||
* structure are not changed. */
|
||||
ClientData clientData; /* Application stores something here with
|
||||
void *clientData; /* Application stores something here with
|
||||
* Tcl_SetHashValue. */
|
||||
union { /* Key has one of these forms: */
|
||||
char *oneWordValue; /* One-word value for key. */
|
||||
@@ -1263,11 +1273,11 @@ struct Tcl_HashTable {
|
||||
Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
|
||||
/* Bucket array used for small tables (to
|
||||
* avoid mallocs and frees). */
|
||||
int numBuckets; /* Total number of buckets allocated at
|
||||
Tcl_Size numBuckets; /* Total number of buckets allocated at
|
||||
* **bucketPtr. */
|
||||
int numEntries; /* Total number of entries present in
|
||||
Tcl_Size numEntries; /* Total number of entries present in
|
||||
* table. */
|
||||
int rebuildSize; /* Enlarge table when numEntries gets to be
|
||||
Tcl_Size rebuildSize; /* Enlarge table when numEntries gets to be
|
||||
* this large. */
|
||||
int downShift; /* Shift count used in hashing function.
|
||||
* Designed to use high-order bits of
|
||||
@@ -1293,7 +1303,7 @@ struct Tcl_HashTable {
|
||||
|
||||
typedef struct Tcl_HashSearch {
|
||||
Tcl_HashTable *tablePtr; /* Table being searched. */
|
||||
int nextIndex; /* Index of next bucket to be enumerated after
|
||||
Tcl_Size nextIndex; /* Index of next bucket to be enumerated after
|
||||
* present one. */
|
||||
Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
|
||||
* bucket. */
|
||||
@@ -1401,8 +1411,8 @@ typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr);
|
||||
* TIP #233 (Virtualized Time)
|
||||
*/
|
||||
|
||||
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData);
|
||||
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
|
||||
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, void *clientData);
|
||||
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, void *clientData);
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
@@ -1463,35 +1473,35 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
|
||||
* Typedefs for the various operations in a channel type:
|
||||
*/
|
||||
|
||||
typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode);
|
||||
typedef int (Tcl_DriverCloseProc) (ClientData instanceData,
|
||||
typedef int (Tcl_DriverBlockModeProc) (void *instanceData, int mode);
|
||||
typedef int (Tcl_DriverCloseProc) (void *instanceData,
|
||||
Tcl_Interp *interp);
|
||||
typedef int (Tcl_DriverClose2Proc) (ClientData instanceData,
|
||||
typedef int (Tcl_DriverClose2Proc) (void *instanceData,
|
||||
Tcl_Interp *interp, int flags);
|
||||
typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf,
|
||||
typedef int (Tcl_DriverInputProc) (void *instanceData, char *buf,
|
||||
int toRead, int *errorCodePtr);
|
||||
typedef int (Tcl_DriverOutputProc) (ClientData instanceData,
|
||||
typedef int (Tcl_DriverOutputProc) (void *instanceData,
|
||||
const char *buf, int toWrite, int *errorCodePtr);
|
||||
typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset,
|
||||
typedef int (Tcl_DriverSeekProc) (void *instanceData, long offset,
|
||||
int mode, int *errorCodePtr);
|
||||
typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData,
|
||||
typedef int (Tcl_DriverSetOptionProc) (void *instanceData,
|
||||
Tcl_Interp *interp, const char *optionName,
|
||||
const char *value);
|
||||
typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData,
|
||||
typedef int (Tcl_DriverGetOptionProc) (void *instanceData,
|
||||
Tcl_Interp *interp, const char *optionName,
|
||||
Tcl_DString *dsPtr);
|
||||
typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask);
|
||||
typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData,
|
||||
int direction, ClientData *handlePtr);
|
||||
typedef int (Tcl_DriverFlushProc) (ClientData instanceData);
|
||||
typedef int (Tcl_DriverHandlerProc) (ClientData instanceData,
|
||||
typedef void (Tcl_DriverWatchProc) (void *instanceData, int mask);
|
||||
typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
|
||||
int direction, void **handlePtr);
|
||||
typedef int (Tcl_DriverFlushProc) (void *instanceData);
|
||||
typedef int (Tcl_DriverHandlerProc) (void *instanceData,
|
||||
int interestMask);
|
||||
typedef long long (Tcl_DriverWideSeekProc) (ClientData instanceData,
|
||||
typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
|
||||
long long offset, int mode, int *errorCodePtr);
|
||||
/*
|
||||
* TIP #218, Channel Thread Actions
|
||||
*/
|
||||
typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData,
|
||||
typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
|
||||
int action);
|
||||
/*
|
||||
* TIP #208, File Truncation (etc.)
|
||||
@@ -1678,13 +1688,13 @@ typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
|
||||
typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
|
||||
Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
|
||||
typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
|
||||
ClientData *clientDataPtr);
|
||||
void **clientDataPtr);
|
||||
typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
|
||||
typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
|
||||
typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData);
|
||||
typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData);
|
||||
typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData);
|
||||
typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
|
||||
typedef void (Tcl_FSFreeInternalRepProc) (void *clientData);
|
||||
typedef void *(Tcl_FSDupInternalRepProc) (void *clientData);
|
||||
typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (void *clientData);
|
||||
typedef void *(Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
|
||||
|
||||
typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
|
||||
|
||||
@@ -1714,7 +1724,7 @@ typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
|
||||
|
||||
typedef struct Tcl_Filesystem {
|
||||
const char *typeName; /* The name of the filesystem. */
|
||||
int structureLength; /* Length of this structure, so future binary
|
||||
Tcl_Size structureLength; /* Length of this structure, so future binary
|
||||
* compatibility can be assured. */
|
||||
Tcl_FSVersion version; /* Version of the filesystem type. */
|
||||
Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
|
||||
@@ -1876,8 +1886,8 @@ typedef struct Tcl_Token {
|
||||
int type; /* Type of token, such as TCL_TOKEN_WORD; see
|
||||
* below for valid types. */
|
||||
const char *start; /* First character in token. */
|
||||
int size; /* Number of bytes in token. */
|
||||
int numComponents; /* If this token is composed of other tokens,
|
||||
Tcl_Size size; /* Number of bytes in token. */
|
||||
Tcl_Size numComponents; /* If this token is composed of other tokens,
|
||||
* this field tells how many of them there are
|
||||
* (including components of components, etc.).
|
||||
* The component tokens immediately follow
|
||||
@@ -1991,25 +2001,25 @@ typedef struct Tcl_Token {
|
||||
typedef struct Tcl_Parse {
|
||||
const char *commentStart; /* Pointer to # that begins the first of one
|
||||
* or more comments preceding the command. */
|
||||
int commentSize; /* Number of bytes in comments (up through
|
||||
Tcl_Size commentSize; /* Number of bytes in comments (up through
|
||||
* newline character that terminates the last
|
||||
* comment). If there were no comments, this
|
||||
* field is 0. */
|
||||
const char *commandStart; /* First character in first word of
|
||||
* command. */
|
||||
int commandSize; /* Number of bytes in command, including first
|
||||
Tcl_Size commandSize; /* Number of bytes in command, including first
|
||||
* character of first word, up through the
|
||||
* terminating newline, close bracket, or
|
||||
* semicolon. */
|
||||
int numWords; /* Total number of words in command. May be
|
||||
Tcl_Size numWords; /* Total number of words in command. May be
|
||||
* 0. */
|
||||
Tcl_Token *tokenPtr; /* Pointer to first token representing the
|
||||
* words of the command. Initially points to
|
||||
* staticTokens, but may change to point to
|
||||
* malloc-ed space if command exceeds space in
|
||||
* staticTokens. */
|
||||
int numTokens; /* Total number of tokens in command. */
|
||||
int tokensAvailable; /* Total number of tokens available at
|
||||
Tcl_Size numTokens; /* Total number of tokens in command. */
|
||||
Tcl_Size tokensAvailable; /* Total number of tokens available at
|
||||
* *tokenPtr. */
|
||||
int errorType; /* One of the parsing error types defined
|
||||
* above. */
|
||||
@@ -2062,13 +2072,13 @@ typedef struct Tcl_EncodingType {
|
||||
Tcl_EncodingFreeProc *freeProc;
|
||||
/* If non-NULL, function to call when this
|
||||
* encoding is deleted. */
|
||||
ClientData clientData; /* Arbitrary value associated with encoding
|
||||
void *clientData; /* Arbitrary value associated with encoding
|
||||
* type. Passed to conversion functions. */
|
||||
int nullSize; /* Number of zero bytes that signify
|
||||
Tcl_Size nullSize; /* Number of zero bytes that signify
|
||||
* end-of-string in this encoding. This number
|
||||
* is used to determine the source string
|
||||
* length when the srcLen argument is
|
||||
* negative. Must be 1 or 2. */
|
||||
* negative. Must be 1, 2, or 4. */
|
||||
} Tcl_EncodingType;
|
||||
|
||||
/*
|
||||
@@ -2229,8 +2239,8 @@ typedef struct Tcl_Config {
|
||||
* command- or time-limit is exceeded by an interpreter.
|
||||
*/
|
||||
|
||||
typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp);
|
||||
typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData);
|
||||
typedef void (Tcl_LimitHandlerProc) (void *clientData, Tcl_Interp *interp);
|
||||
typedef void (Tcl_LimitHandlerDeleteProc) (void *clientData);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
@@ -2268,7 +2278,7 @@ typedef struct {
|
||||
* depends on type.*/
|
||||
const char *helpStr; /* Documentation message describing this
|
||||
* option. */
|
||||
ClientData clientData; /* Word to pass to function callbacks. */
|
||||
void *clientData; /* Word to pass to function callbacks. */
|
||||
} Tcl_ArgvInfo;
|
||||
|
||||
/*
|
||||
@@ -2291,9 +2301,9 @@ typedef struct {
|
||||
* argument types:
|
||||
*/
|
||||
|
||||
typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr,
|
||||
typedef int (Tcl_ArgvFuncProc)(void *clientData, Tcl_Obj *objPtr,
|
||||
void *dstPtr);
|
||||
typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
|
||||
typedef int (Tcl_ArgvGenFuncProc)(void *clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *const *objv, void *dstPtr);
|
||||
|
||||
/*
|
||||
@@ -2366,19 +2376,19 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
|
||||
#define TCL_TCPSERVER_REUSEPORT (1<<1)
|
||||
|
||||
/*
|
||||
* Constants for special int-typed values, see TIP #494
|
||||
* Constants for special Tcl_Size-typed values, see TIP #494
|
||||
*/
|
||||
|
||||
#define TCL_IO_FAILURE (-1)
|
||||
#define TCL_AUTO_LENGTH (-1)
|
||||
#define TCL_INDEX_NONE (-1)
|
||||
#define TCL_IO_FAILURE ((Tcl_Size)-1)
|
||||
#define TCL_AUTO_LENGTH ((Tcl_Size)-1)
|
||||
#define TCL_INDEX_NONE ((Tcl_Size)-1)
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
* Single public declaration for NRE.
|
||||
*/
|
||||
|
||||
typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp,
|
||||
typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp,
|
||||
int result);
|
||||
|
||||
/*
|
||||
@@ -2407,27 +2417,14 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
|
||||
#endif
|
||||
|
||||
#ifdef USE_TCL_STUBS
|
||||
#if TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
|
||||
# define Tcl_InitStubs(interp, version, exact) \
|
||||
(Tcl_InitStubs)(interp, version, \
|
||||
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
|
||||
TCL_STUB_MAGIC)
|
||||
#else
|
||||
# define Tcl_InitStubs(interp, version, exact) \
|
||||
(Tcl_InitStubs)(interp, TCL_PATCH_LEVEL, \
|
||||
1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
|
||||
TCL_STUB_MAGIC)
|
||||
#endif
|
||||
#else
|
||||
#if TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
|
||||
# define Tcl_InitStubs(interp, version, exact) \
|
||||
Tcl_PkgInitStubsCheck(interp, version, \
|
||||
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
|
||||
#else
|
||||
# define Tcl_InitStubs(interp, version, exact) \
|
||||
Tcl_PkgInitStubsCheck(interp, TCL_PATCH_LEVEL, \
|
||||
1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2437,7 +2434,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
|
||||
|
||||
#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
|
||||
((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp)()))
|
||||
EXTERN void Tcl_MainEx(int argc, char **argv,
|
||||
EXTERN void Tcl_MainEx(Tcl_Size argc, char **argv,
|
||||
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
|
||||
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
|
||||
const char *version, int exact);
|
||||
|
||||
+125
-104
@@ -41,7 +41,8 @@
|
||||
static void DupArithSeriesInternalRep (Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
|
||||
static void FreeArithSeriesInternalRep (Tcl_Obj *listPtr);
|
||||
static int SetArithSeriesFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr);
|
||||
static void UpdateStringOfArithSeries (Tcl_Obj *listPtr);
|
||||
static void UpdateStringOfArithSeries (Tcl_Obj *arithSeriesObj);
|
||||
static Tcl_Obj *ArithSeriesObjStep(Tcl_Obj *arithSeriesPtr);
|
||||
|
||||
/*
|
||||
* The structure below defines the arithmetic series Tcl object type by
|
||||
@@ -64,7 +65,7 @@ static void UpdateStringOfArithSeries (Tcl_Obj *listPtr);
|
||||
* And where the equivalent's list I-th element is calculated
|
||||
* as:
|
||||
*
|
||||
* LIST[i] = START+(STEP*i)
|
||||
* LIST[i] = START + (STEP * i)
|
||||
*
|
||||
* Zero elements ranges, like in the case of START=10 END=10 STEP=1
|
||||
* are valid and will be equivalent to the empty list.
|
||||
@@ -116,7 +117,7 @@ ArithSeriesLen(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step)
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclNewArithSeriesInt --
|
||||
* NewArithSeriesInt --
|
||||
*
|
||||
* Creates a new ArithSeries object. The returned object has
|
||||
* refcount = 0.
|
||||
@@ -131,17 +132,18 @@ ArithSeriesLen(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step)
|
||||
* None.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
static
|
||||
Tcl_Obj *
|
||||
TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_WideInt len)
|
||||
NewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_WideInt len)
|
||||
{
|
||||
Tcl_WideInt length = (len>=0 ? len : ArithSeriesLen(start, end, step));
|
||||
Tcl_Obj *arithSeriesPtr;
|
||||
Tcl_Obj *arithSeriesObj;
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
|
||||
TclNewObj(arithSeriesPtr);
|
||||
TclNewObj(arithSeriesObj);
|
||||
|
||||
if (length <= 0) {
|
||||
return arithSeriesPtr;
|
||||
return arithSeriesObj;
|
||||
}
|
||||
|
||||
arithSeriesRepPtr = (ArithSeries*) ckalloc(sizeof (ArithSeries));
|
||||
@@ -151,19 +153,19 @@ TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_W
|
||||
arithSeriesRepPtr->step = step;
|
||||
arithSeriesRepPtr->len = length;
|
||||
arithSeriesRepPtr->elements = NULL;
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
arithSeriesPtr->typePtr = &tclArithSeriesType;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
arithSeriesObj->typePtr = &tclArithSeriesType;
|
||||
if (length > 0)
|
||||
Tcl_InvalidateStringRep(arithSeriesPtr);
|
||||
Tcl_InvalidateStringRep(arithSeriesObj);
|
||||
|
||||
return arithSeriesPtr;
|
||||
return arithSeriesObj;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclNewArithSeriesDbl --
|
||||
* NewArithSeriesDbl --
|
||||
*
|
||||
* Creates a new ArithSeries object with doubles. The returned object has
|
||||
* refcount = 0.
|
||||
@@ -178,17 +180,18 @@ TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_W
|
||||
* None.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
static
|
||||
Tcl_Obj *
|
||||
TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
|
||||
NewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
|
||||
{
|
||||
Tcl_WideInt length = (len>=0 ? len : ArithSeriesLen(start, end, step));
|
||||
Tcl_Obj *arithSeriesPtr;
|
||||
Tcl_Obj *arithSeriesObj;
|
||||
ArithSeriesDbl *arithSeriesRepPtr;
|
||||
|
||||
TclNewObj(arithSeriesPtr);
|
||||
TclNewObj(arithSeriesObj);
|
||||
|
||||
if (length <= 0) {
|
||||
return arithSeriesPtr;
|
||||
return arithSeriesObj;
|
||||
}
|
||||
|
||||
arithSeriesRepPtr = (ArithSeriesDbl*) ckalloc(sizeof (ArithSeriesDbl));
|
||||
@@ -198,13 +201,13 @@ TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
|
||||
arithSeriesRepPtr->step = step;
|
||||
arithSeriesRepPtr->len = length;
|
||||
arithSeriesRepPtr->elements = NULL;
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
arithSeriesPtr->typePtr = &tclArithSeriesType;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
arithSeriesObj->typePtr = &tclArithSeriesType;
|
||||
if (length > 0)
|
||||
Tcl_InvalidateStringRep(arithSeriesPtr);
|
||||
Tcl_InvalidateStringRep(arithSeriesObj);
|
||||
|
||||
return arithSeriesPtr;
|
||||
return arithSeriesObj;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -227,7 +230,11 @@ TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
assignNumber(int useDoubles, Tcl_WideInt *intNumberPtr, double *dblNumberPtr, Tcl_Obj *numberObj)
|
||||
assignNumber(
|
||||
int useDoubles,
|
||||
Tcl_WideInt *intNumberPtr,
|
||||
double *dblNumberPtr,
|
||||
Tcl_Obj *numberObj)
|
||||
{
|
||||
void *clientData;
|
||||
int tcl_number_type;
|
||||
@@ -270,6 +277,7 @@ assignNumber(int useDoubles, Tcl_WideInt *intNumberPtr, double *dblNumberPtr, Tc
|
||||
* None.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclNewArithSeriesObj(
|
||||
Tcl_Interp *interp, /* For error reporting */
|
||||
@@ -351,8 +359,8 @@ TclNewArithSeriesObj(
|
||||
|
||||
if (arithSeriesObj) {
|
||||
*arithSeriesObj = (useDoubles)
|
||||
? TclNewArithSeriesDbl(dstart, dend, dstep, len)
|
||||
: TclNewArithSeriesInt(start, end, step, len);
|
||||
? NewArithSeriesDbl(dstart, dend, dstep, len)
|
||||
: NewArithSeriesInt(start, end, step, len);
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -360,7 +368,7 @@ TclNewArithSeriesObj(
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclArithSeriesObjStep --
|
||||
* ArithSeriesObjStep --
|
||||
*
|
||||
* Return a Tcl_Obj with the step value from the give ArithSeries Obj.
|
||||
* refcount = 0.
|
||||
@@ -375,26 +383,23 @@ TclNewArithSeriesObj(
|
||||
* None.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
/*
|
||||
* TclArithSeriesObjStep --
|
||||
*/
|
||||
int
|
||||
TclArithSeriesObjStep(
|
||||
Tcl_Obj *arithSeriesPtr,
|
||||
Tcl_Obj **stepObj)
|
||||
Tcl_Obj *
|
||||
ArithSeriesObjStep(
|
||||
Tcl_Obj *arithSeriesObj)
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
Tcl_Obj *stepObj;
|
||||
|
||||
if (arithSeriesPtr->typePtr != &tclArithSeriesType) {
|
||||
Tcl_Panic("TclArithSeriesObjIndex called with a not ArithSeries Obj.");
|
||||
if (arithSeriesObj->typePtr != &tclArithSeriesType) {
|
||||
Tcl_Panic("ArithSeriesObjStep called with a not ArithSeries Obj.");
|
||||
}
|
||||
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesPtr);
|
||||
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesObj);
|
||||
if (arithSeriesRepPtr->isDouble) {
|
||||
*stepObj = Tcl_NewDoubleObj(((ArithSeriesDbl*)(arithSeriesRepPtr))->step);
|
||||
TclNewDoubleObj(stepObj, ((ArithSeriesDbl*)(arithSeriesRepPtr))->step);
|
||||
} else {
|
||||
*stepObj = Tcl_NewWideIntObj(arithSeriesRepPtr->step);
|
||||
TclNewIntObj(stepObj, arithSeriesRepPtr->step);
|
||||
}
|
||||
return TCL_OK;
|
||||
return stepObj;
|
||||
}
|
||||
|
||||
|
||||
@@ -405,13 +410,11 @@ TclArithSeriesObjStep(
|
||||
*
|
||||
* Returns the element with the specified index in the list
|
||||
* represented by the specified Arithmetic Sequence object.
|
||||
* If the index is out of range, TCL_ERROR is returned,
|
||||
* otherwise TCL_OK is returned and the integer value of the
|
||||
* element is stored in *element.
|
||||
* If the index is out of range, NULL is returned.
|
||||
*
|
||||
* Results:
|
||||
*
|
||||
* TCL_OK on success, TCL_ERROR on index out of range.
|
||||
* The element on success, NULL on index out of range.
|
||||
*
|
||||
* Side Effects:
|
||||
*
|
||||
@@ -420,27 +423,35 @@ TclArithSeriesObjStep(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **elementObj)
|
||||
Tcl_Obj *
|
||||
TclArithSeriesObjIndex(
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *arithSeriesObj,
|
||||
Tcl_Size index)
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
|
||||
if (arithSeriesPtr->typePtr != &tclArithSeriesType) {
|
||||
if (arithSeriesObj->typePtr != &tclArithSeriesType) {
|
||||
Tcl_Panic("TclArithSeriesObjIndex called with a not ArithSeries Obj.");
|
||||
}
|
||||
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesPtr);
|
||||
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesObj);
|
||||
if (index < 0 || index >= arithSeriesRepPtr->len) {
|
||||
return TCL_ERROR;
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_ObjPrintf("index %d is out of bounds 0 to %"
|
||||
"d", index, (arithSeriesRepPtr->len-1)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* List[i] = Start + (Step * index) */
|
||||
if (arithSeriesRepPtr->isDouble) {
|
||||
*elementObj = Tcl_NewDoubleObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
|
||||
return Tcl_NewDoubleObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
|
||||
} else {
|
||||
*elementObj = Tcl_NewWideIntObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
|
||||
return Tcl_NewWideIntObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -458,10 +469,10 @@ TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **ele
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr)
|
||||
Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesObj)
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr = (ArithSeries*)
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr1;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr1;
|
||||
return arithSeriesRepPtr->len;
|
||||
}
|
||||
|
||||
@@ -477,17 +488,17 @@ Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr)
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* Frees arithSeriesPtr's ArithSeries* internal representation and
|
||||
* Frees arithSeriesObj's ArithSeries* internal representation and
|
||||
* sets listPtr's internalRep.twoPtrValue.ptr1 to NULL.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesPtr)
|
||||
FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesObj)
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr =
|
||||
(ArithSeries *) arithSeriesPtr->internalRep.twoPtrValue.ptr1;
|
||||
(ArithSeries *) arithSeriesObj->internalRep.twoPtrValue.ptr1;
|
||||
if (arithSeriesRepPtr->elements) {
|
||||
Tcl_WideInt i;
|
||||
Tcl_Obj**elmts = arithSeriesRepPtr->elements;
|
||||
@@ -499,7 +510,7 @@ FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesPtr)
|
||||
ckfree((char *) arithSeriesRepPtr->elements);
|
||||
}
|
||||
ckfree((char *) arithSeriesRepPtr);
|
||||
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = NULL;
|
||||
arithSeriesObj->internalRep.twoPtrValue.ptr1 = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -568,10 +579,10 @@ DupArithSeriesInternalRep(
|
||||
*/
|
||||
|
||||
static void
|
||||
UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
|
||||
UpdateStringOfArithSeries(Tcl_Obj *arithSeriesObj)
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr =
|
||||
(ArithSeries*) arithSeriesPtr->internalRep.twoPtrValue.ptr1;
|
||||
(ArithSeries*) arithSeriesObj->internalRep.twoPtrValue.ptr1;
|
||||
char *elem, *p;
|
||||
Tcl_Obj *elemObj;
|
||||
Tcl_WideInt i;
|
||||
@@ -582,7 +593,7 @@ UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
|
||||
* Pass 1: estimate space.
|
||||
*/
|
||||
for (i = 0; i < arithSeriesRepPtr->len; i++) {
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, i, &elemObj);
|
||||
elemObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, i);
|
||||
elem = TclGetStringFromObj(elemObj, &slen);
|
||||
Tcl_DecrRefCount(elemObj);
|
||||
slen += 1; /* + 1 is for the space or the nul-term */
|
||||
@@ -593,17 +604,17 @@ UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
|
||||
* Pass 2: generate the string repr.
|
||||
*/
|
||||
|
||||
p = Tcl_InitStringRep(arithSeriesPtr, NULL, length);
|
||||
p = Tcl_InitStringRep(arithSeriesObj, NULL, length);
|
||||
for (i = 0; i < arithSeriesRepPtr->len; i++) {
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, i, &elemObj);
|
||||
elemObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, i);
|
||||
elem = TclGetStringFromObj(elemObj, &slen);
|
||||
strcpy(p, elem);
|
||||
p[slen] = ' ';
|
||||
p += slen+1;
|
||||
Tcl_DecrRefCount(elemObj);
|
||||
}
|
||||
if (length > 0) arithSeriesPtr->bytes[length-1] = '\0';
|
||||
arithSeriesPtr->length = length-1;
|
||||
if (length > 0) arithSeriesObj->bytes[length-1] = '\0';
|
||||
arithSeriesObj->length = length-1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -649,8 +660,8 @@ SetArithSeriesFromAny(
|
||||
* Results:
|
||||
*
|
||||
* Normally returns a pointer to a new Tcl_Obj, that contains the same
|
||||
* arithSeries value as *arithSeriesPtr does. The returned Tcl_Obj has a
|
||||
* refCount of zero. If *arithSeriesPtr does not hold an arithSeries,
|
||||
* arithSeries value as *arithSeriesObj does. The returned Tcl_Obj has a
|
||||
* refCount of zero. If *arithSeriesObj does not hold an arithSeries,
|
||||
* NULL is returned, and if interp is non-NULL, an error message is
|
||||
* recorded there.
|
||||
*
|
||||
@@ -663,15 +674,15 @@ SetArithSeriesFromAny(
|
||||
Tcl_Obj *
|
||||
TclArithSeriesObjCopy(
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *arithSeriesPtr) /* List object for which an element array is
|
||||
Tcl_Obj *arithSeriesObj) /* List object for which an element array is
|
||||
* to be returned. */
|
||||
{
|
||||
Tcl_Obj *copyPtr;
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
|
||||
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
|
||||
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
|
||||
if (NULL == arithSeriesRepPtr) {
|
||||
if (SetArithSeriesFromAny(interp, arithSeriesPtr) != TCL_OK) {
|
||||
if (SetArithSeriesFromAny(interp, arithSeriesObj) != TCL_OK) {
|
||||
/* We know this is going to panic, but it's the message we want */
|
||||
return NULL;
|
||||
}
|
||||
@@ -679,7 +690,7 @@ TclArithSeriesObjCopy(
|
||||
|
||||
TclNewObj(copyPtr);
|
||||
TclInvalidateStringRep(copyPtr);
|
||||
DupArithSeriesInternalRep(arithSeriesPtr, copyPtr);
|
||||
DupArithSeriesInternalRep(arithSeriesObj, copyPtr);
|
||||
return copyPtr;
|
||||
}
|
||||
|
||||
@@ -689,7 +700,7 @@ TclArithSeriesObjCopy(
|
||||
* TclArithSeriesObjRange --
|
||||
*
|
||||
* Makes a slice of an ArithSeries value.
|
||||
* *arithSeriesPtr must be known to be a valid list.
|
||||
* *arithSeriesObj must be known to be a valid list.
|
||||
*
|
||||
* Results:
|
||||
* Returns a pointer to the sliced series.
|
||||
@@ -705,14 +716,14 @@ TclArithSeriesObjCopy(
|
||||
Tcl_Obj *
|
||||
TclArithSeriesObjRange(
|
||||
Tcl_Interp *interp, /* For error message(s) */
|
||||
Tcl_Obj *arithSeriesPtr, /* List object to take a range from. */
|
||||
int fromIdx, /* Index of first element to include. */
|
||||
int toIdx) /* Index of last element to include. */
|
||||
Tcl_Obj *arithSeriesObj, /* List object to take a range from. */
|
||||
Tcl_Size fromIdx, /* Index of first element to include. */
|
||||
Tcl_Size toIdx) /* Index of last element to include. */
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
Tcl_Obj *startObj, *endObj, *stepObj;
|
||||
|
||||
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
|
||||
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
|
||||
|
||||
if (fromIdx < 0) {
|
||||
fromIdx = 0;
|
||||
@@ -723,15 +734,21 @@ TclArithSeriesObjRange(
|
||||
return obj;
|
||||
}
|
||||
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, fromIdx, &startObj);
|
||||
startObj = TclArithSeriesObjIndex(interp, arithSeriesObj, fromIdx);
|
||||
if (startObj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
Tcl_IncrRefCount(startObj);
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, toIdx, &endObj);
|
||||
endObj = TclArithSeriesObjIndex(interp, arithSeriesObj, toIdx);
|
||||
if (endObj == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
Tcl_IncrRefCount(endObj);
|
||||
TclArithSeriesObjStep(arithSeriesPtr, &stepObj);
|
||||
stepObj = ArithSeriesObjStep(arithSeriesObj);
|
||||
Tcl_IncrRefCount(stepObj);
|
||||
|
||||
if (Tcl_IsShared(arithSeriesPtr) ||
|
||||
((arithSeriesPtr->refCount > 1))) {
|
||||
if (Tcl_IsShared(arithSeriesObj) ||
|
||||
((arithSeriesObj->refCount > 1))) {
|
||||
Tcl_Obj *newSlicePtr;
|
||||
if (TclNewArithSeriesObj(interp, &newSlicePtr,
|
||||
arithSeriesRepPtr->isDouble, startObj, endObj,
|
||||
@@ -753,10 +770,10 @@ TclArithSeriesObjRange(
|
||||
* string-canonizing effect of [lrange 0 end].
|
||||
*/
|
||||
|
||||
TclInvalidateStringRep(arithSeriesPtr);
|
||||
TclInvalidateStringRep(arithSeriesObj);
|
||||
|
||||
if (arithSeriesRepPtr->isDouble) {
|
||||
ArithSeriesDbl *arithSeriesDblRepPtr = (ArithSeriesDbl*)arithSeriesPtr;
|
||||
ArithSeriesDbl *arithSeriesDblRepPtr = (ArithSeriesDbl*)arithSeriesObj;
|
||||
double start, end, step;
|
||||
Tcl_GetDoubleFromObj(NULL, startObj, &start);
|
||||
Tcl_GetDoubleFromObj(NULL, endObj, &end);
|
||||
@@ -783,7 +800,7 @@ TclArithSeriesObjRange(
|
||||
Tcl_DecrRefCount(endObj);
|
||||
Tcl_DecrRefCount(stepObj);
|
||||
|
||||
return arithSeriesPtr;
|
||||
return arithSeriesObj;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -818,9 +835,9 @@ TclArithSeriesObjRange(
|
||||
int
|
||||
TclArithSeriesGetElements(
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *objPtr, /* AbstractList object for which an element
|
||||
Tcl_Obj *objPtr, /* ArithSeries object for which an element
|
||||
* array is to be returned. */
|
||||
ListSizeT *objcPtr, /* Where to store the count of objects
|
||||
Tcl_Size *objcPtr, /* Where to store the count of objects
|
||||
* referenced by objv. */
|
||||
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
|
||||
* pointers to the list's objects. */
|
||||
@@ -850,13 +867,8 @@ TclArithSeriesGetElements(
|
||||
}
|
||||
arithSeriesRepPtr->elements = objv;
|
||||
for (i = 0; i < objc; i++) {
|
||||
if (TclArithSeriesObjIndex(objPtr, i, &objv[i]) != TCL_OK) {
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(
|
||||
interp,
|
||||
Tcl_NewStringObj("indexing error", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
|
||||
}
|
||||
objv[i] = TclArithSeriesObjIndex(interp, objPtr, i);
|
||||
if (objv[i] == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_IncrRefCount(objv[i]);
|
||||
@@ -885,7 +897,7 @@ TclArithSeriesGetElements(
|
||||
* TclArithSeriesObjReverse --
|
||||
*
|
||||
* Reverse the order of the ArithSeries value.
|
||||
* *arithSeriesPtr must be known to be a valid list.
|
||||
* *arithSeriesObj must be known to be a valid list.
|
||||
*
|
||||
* Results:
|
||||
* Returns a pointer to the reordered series.
|
||||
@@ -901,7 +913,7 @@ TclArithSeriesGetElements(
|
||||
Tcl_Obj *
|
||||
TclArithSeriesObjReverse(
|
||||
Tcl_Interp *interp, /* For error message(s) */
|
||||
Tcl_Obj *arithSeriesPtr) /* List object to reverse. */
|
||||
Tcl_Obj *arithSeriesObj) /* List object to reverse. */
|
||||
{
|
||||
ArithSeries *arithSeriesRepPtr;
|
||||
Tcl_Obj *startObj, *endObj, *stepObj;
|
||||
@@ -910,16 +922,16 @@ TclArithSeriesObjReverse(
|
||||
double dstart, dend, dstep;
|
||||
int isDouble;
|
||||
|
||||
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
|
||||
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
|
||||
|
||||
isDouble = arithSeriesRepPtr->isDouble;
|
||||
len = arithSeriesRepPtr->len;
|
||||
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, (len-1), &startObj);
|
||||
startObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, (len-1));
|
||||
Tcl_IncrRefCount(startObj);
|
||||
TclArithSeriesObjIndex(arithSeriesPtr, 0, &endObj);
|
||||
endObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, 0);
|
||||
Tcl_IncrRefCount(endObj);
|
||||
TclArithSeriesObjStep(arithSeriesPtr, &stepObj);
|
||||
stepObj = ArithSeriesObjStep(arithSeriesObj);
|
||||
Tcl_IncrRefCount(stepObj);
|
||||
|
||||
if (isDouble) {
|
||||
@@ -936,9 +948,10 @@ TclArithSeriesObjReverse(
|
||||
TclSetIntObj(stepObj, step);
|
||||
}
|
||||
|
||||
if (Tcl_IsShared(arithSeriesPtr) ||
|
||||
((arithSeriesPtr->refCount > 1))) {
|
||||
Tcl_Obj *lenObj = Tcl_NewWideIntObj(len);
|
||||
if (Tcl_IsShared(arithSeriesObj) ||
|
||||
((arithSeriesObj->refCount > 1))) {
|
||||
Tcl_Obj *lenObj;
|
||||
TclNewIntObj(lenObj, len);
|
||||
if (TclNewArithSeriesObj(interp, &resultObj,
|
||||
isDouble, startObj, endObj, stepObj, lenObj) != TCL_OK) {
|
||||
resultObj = NULL;
|
||||
@@ -950,7 +963,7 @@ TclArithSeriesObjReverse(
|
||||
* In-place is possible.
|
||||
*/
|
||||
|
||||
TclInvalidateStringRep(arithSeriesPtr);
|
||||
TclInvalidateStringRep(arithSeriesObj);
|
||||
|
||||
if (isDouble) {
|
||||
ArithSeriesDbl *arithSeriesDblRepPtr =
|
||||
@@ -972,7 +985,7 @@ TclArithSeriesObjReverse(
|
||||
}
|
||||
arithSeriesRepPtr->elements = NULL;
|
||||
|
||||
resultObj = arithSeriesPtr;
|
||||
resultObj = arithSeriesObj;
|
||||
}
|
||||
|
||||
Tcl_DecrRefCount(startObj);
|
||||
@@ -981,3 +994,11 @@ TclArithSeriesObjReverse(
|
||||
|
||||
return resultObj;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* End:
|
||||
*/
|
||||
|
||||
+20
-19
@@ -15,43 +15,44 @@
|
||||
* Note that the len can in theory be always computed by start,end,step
|
||||
* but it's faster to cache it inside the internal representation.
|
||||
*/
|
||||
typedef struct ArithSeries {
|
||||
typedef struct {
|
||||
Tcl_Size len;
|
||||
Tcl_Obj **elements;
|
||||
int isDouble;
|
||||
Tcl_WideInt start;
|
||||
Tcl_WideInt end;
|
||||
Tcl_WideInt step;
|
||||
Tcl_WideInt len;
|
||||
} ArithSeries;
|
||||
typedef struct {
|
||||
Tcl_Size len;
|
||||
Tcl_Obj **elements;
|
||||
int isDouble;
|
||||
} ArithSeries;
|
||||
typedef struct ArithSeriesDbl {
|
||||
double start;
|
||||
double end;
|
||||
double step;
|
||||
Tcl_WideInt len;
|
||||
Tcl_Obj **elements;
|
||||
int isDouble;
|
||||
} ArithSeriesDbl;
|
||||
|
||||
|
||||
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjCopy(Tcl_Interp *interp,
|
||||
Tcl_Obj *arithSeriesPtr);
|
||||
MODULE_SCOPE int TclArithSeriesObjStep(Tcl_Obj *arithSeriesPtr,
|
||||
Tcl_Obj **stepObj);
|
||||
MODULE_SCOPE int TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr,
|
||||
Tcl_WideInt index, Tcl_Obj **elementObj);
|
||||
MODULE_SCOPE Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr);
|
||||
MODULE_SCOPE Tcl_Obj *TclArithSeriesObjIndex(Tcl_Interp *, Tcl_Obj *,
|
||||
Tcl_Size index);
|
||||
MODULE_SCOPE Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjRange(Tcl_Interp *interp,
|
||||
Tcl_Obj *arithSeriesPtr, int fromIdx, int toIdx);
|
||||
Tcl_Obj *arithSeriesPtr, Tcl_Size fromIdx, Tcl_Size toIdx);
|
||||
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjReverse(Tcl_Interp *interp,
|
||||
Tcl_Obj *arithSeriesPtr);
|
||||
MODULE_SCOPE int TclArithSeriesGetElements(Tcl_Interp *interp,
|
||||
Tcl_Obj *objPtr, int *objcPtr, Tcl_Obj ***objvPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclNewArithSeriesInt(Tcl_WideInt start,
|
||||
Tcl_WideInt end, Tcl_WideInt step,
|
||||
Tcl_WideInt len);
|
||||
MODULE_SCOPE Tcl_Obj * TclNewArithSeriesDbl(double start, double end,
|
||||
double step, Tcl_WideInt len);
|
||||
Tcl_Obj *objPtr, Tcl_Size *objcPtr, Tcl_Obj ***objvPtr);
|
||||
MODULE_SCOPE int TclNewArithSeriesObj(Tcl_Interp *interp,
|
||||
Tcl_Obj **arithSeriesObj, int useDoubles,
|
||||
Tcl_Obj *startObj, Tcl_Obj *endObj,
|
||||
Tcl_Obj *stepObj, Tcl_Obj *lenObj);
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* End:
|
||||
*/
|
||||
|
||||
@@ -1985,7 +1985,7 @@ CreateMirrorJumpTable(
|
||||
* table. */
|
||||
int i;
|
||||
|
||||
if (TclListObjGetElementsM(interp, jumps, &objc, &objv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, jumps, &objc) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (objc % 2 != 0) {
|
||||
@@ -1997,6 +1997,9 @@ CreateMirrorJumpTable(
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, jumps, &objc, &objv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the jumptable.
|
||||
|
||||
+2
-2
@@ -310,6 +310,7 @@ static const CmdInfo builtInCmds[] = {
|
||||
{"join", Tcl_JoinObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lappend", Tcl_LappendObjCmd, TclCompileLappendCmd, NULL, CMD_IS_SAFE},
|
||||
{"lassign", Tcl_LassignObjCmd, TclCompileLassignCmd, NULL, CMD_IS_SAFE},
|
||||
{"ledit", Tcl_LeditObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lindex", Tcl_LindexObjCmd, TclCompileLindexCmd, NULL, CMD_IS_SAFE},
|
||||
{"linsert", Tcl_LinsertObjCmd, TclCompileLinsertCmd, NULL, CMD_IS_SAFE},
|
||||
{"list", Tcl_ListObjCmd, TclCompileListCmd, NULL, CMD_IS_SAFE|CMD_COMPILES_EXPANDED},
|
||||
@@ -322,10 +323,9 @@ static const CmdInfo builtInCmds[] = {
|
||||
{"lreplace", Tcl_LreplaceObjCmd, TclCompileLreplaceCmd, NULL, CMD_IS_SAFE},
|
||||
{"lreverse", Tcl_LreverseObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lsearch", Tcl_LsearchObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lseq", Tcl_LseqObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lseq", Tcl_LseqObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, CMD_IS_SAFE},
|
||||
{"lsort", Tcl_LsortObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"ledit", Tcl_LeditObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"package", Tcl_PackageObjCmd, NULL, TclNRPackageObjCmd, CMD_IS_SAFE},
|
||||
{"proc", Tcl_ProcObjCmd, NULL, NULL, CMD_IS_SAFE},
|
||||
{"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, CMD_IS_SAFE},
|
||||
|
||||
+11
-3
@@ -1125,11 +1125,10 @@ BinaryFormatCmd(
|
||||
* The macro evals its args more than once: avoid arg++
|
||||
*/
|
||||
|
||||
if (TclListObjGetElementsM(interp, objv[arg], &listc,
|
||||
&listv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, objv[arg], &listc
|
||||
) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
arg++;
|
||||
|
||||
if (count == BINARY_ALL) {
|
||||
count = listc;
|
||||
@@ -1139,6 +1138,11 @@ BinaryFormatCmd(
|
||||
-1));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, objv[arg], &listc,
|
||||
&listv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
arg++;
|
||||
}
|
||||
offset += count*size;
|
||||
break;
|
||||
@@ -2194,7 +2198,11 @@ FormatNumber(
|
||||
*/
|
||||
|
||||
if (fabs(dvalue) > (double) FLT_MAX) {
|
||||
if (fabs(dvalue) > (FLT_MAX + pow(2, (FLT_MAX_EXP - FLT_MANT_DIG - 1)))) {
|
||||
fvalue = (dvalue >= 0.0) ? INFINITY : -INFINITY; // c99
|
||||
} else {
|
||||
fvalue = (dvalue >= 0.0) ? FLT_MAX : -FLT_MAX;
|
||||
}
|
||||
} else {
|
||||
fvalue = (float) dvalue;
|
||||
}
|
||||
|
||||
+9
-3
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclTomMath.h"
|
||||
|
||||
/*
|
||||
* Windows has mktime. The configurators do not check.
|
||||
@@ -1804,14 +1805,16 @@ ClockMillisecondsObjCmd(
|
||||
Tcl_Obj *const *objv) /* Parameter values */
|
||||
{
|
||||
Tcl_Time now;
|
||||
Tcl_Obj *timeObj;
|
||||
|
||||
if (objc != 1) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_GetTime(&now);
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)
|
||||
now.sec * 1000 + now.usec / 1000));
|
||||
TclNewUIntObj(timeObj, (Tcl_WideUInt)
|
||||
now.sec * 1000 + now.usec / 1000);
|
||||
Tcl_SetObjResult(interp, timeObj);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -1992,13 +1995,16 @@ ClockSecondsObjCmd(
|
||||
Tcl_Obj *const *objv) /* Parameter values */
|
||||
{
|
||||
Tcl_Time now;
|
||||
Tcl_Obj *timeObj;
|
||||
|
||||
if (objc != 1) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_GetTime(&now);
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec));
|
||||
TclNewUIntObj(timeObj, (Tcl_WideUInt)now.sec);
|
||||
|
||||
Tcl_SetObjResult(interp, timeObj);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
+74
-23
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclIO.h"
|
||||
#ifdef _WIN32
|
||||
# include "tclWinInt.h"
|
||||
#endif
|
||||
@@ -563,18 +564,22 @@ EncodingConvertfromObjCmd(
|
||||
* Possible combinations:
|
||||
* 1) data -> objc = 2
|
||||
* 2) encoding data -> objc = 3
|
||||
* 3) -nocomplain data -> objc = 3
|
||||
* 4) -nocomplain encoding data -> objc = 4
|
||||
* 5) -strict data -> objc = 3
|
||||
* 6) -strict encoding data -> objc = 4
|
||||
* 7) -failindex val data -> objc = 4
|
||||
* 8) -failindex val encoding data -> objc = 5
|
||||
* 3) -nocomplain encoding data -> objc = 4
|
||||
* 4) -strict -failindex val encoding data -> objc = 6
|
||||
* 5) -strict encoding data -> objc = 4
|
||||
* 6) -failindex val encoding data -> objc = 5
|
||||
* 7) -failindex val -strict encoding data -> objc = 6
|
||||
*/
|
||||
|
||||
if (objc == 2) {
|
||||
encoding = Tcl_GetEncoding(interp, NULL);
|
||||
data = objv[1];
|
||||
} else if (objc > 2 && objc < 6) {
|
||||
} else if (objc == 3) {
|
||||
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
data = objv[2];
|
||||
} else if (objc > 3 && objc < 7) {
|
||||
int objcUnprocessed = objc;
|
||||
data = objv[objc - 1];
|
||||
bytesPtr = Tcl_GetString(objv[1]);
|
||||
@@ -586,15 +591,31 @@ EncodingConvertfromObjCmd(
|
||||
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
|
||||
flags = TCL_ENCODING_STRICT;
|
||||
objcUnprocessed--;
|
||||
bytesPtr = Tcl_GetString(objv[2]);
|
||||
if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
|
||||
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
|
||||
/* at least three additional arguments needed */
|
||||
if (objc < 6) {
|
||||
goto encConvFromError;
|
||||
}
|
||||
failVarObj = objv[3];
|
||||
objcUnprocessed -= 2;
|
||||
}
|
||||
} else if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
|
||||
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
|
||||
/* at least two additional arguments needed */
|
||||
if (objc < 4) {
|
||||
/* at least three additional arguments needed */
|
||||
if (objc < 5) {
|
||||
goto encConvFromError;
|
||||
}
|
||||
failVarObj = objv[2];
|
||||
flags = TCL_ENCODING_STOPONERROR;
|
||||
flags = ENCODING_FAILINDEX;
|
||||
objcUnprocessed -= 2;
|
||||
bytesPtr = Tcl_GetString(objv[3]);
|
||||
if (bytesPtr[0] == '-' && bytesPtr[1] == 's'
|
||||
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
|
||||
flags = TCL_ENCODING_STRICT;
|
||||
objcUnprocessed --;
|
||||
}
|
||||
}
|
||||
switch (objcUnprocessed) {
|
||||
case 3:
|
||||
@@ -610,7 +631,9 @@ EncodingConvertfromObjCmd(
|
||||
}
|
||||
} else {
|
||||
encConvFromError:
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain? ?-strict? ?-failindex var? ?encoding? data");
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
|
||||
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -654,7 +677,7 @@ EncodingConvertfromObjCmd(
|
||||
* truncate the string at the first null byte.
|
||||
*/
|
||||
|
||||
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
|
||||
Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds));
|
||||
|
||||
/*
|
||||
* We're done with the encoding
|
||||
@@ -704,16 +727,22 @@ EncodingConverttoObjCmd(
|
||||
* Possible combinations:
|
||||
* 1) data -> objc = 2
|
||||
* 2) encoding data -> objc = 3
|
||||
* 3) -nocomplain data -> objc = 3
|
||||
* 4) -nocomplain encoding data -> objc = 4
|
||||
* 5) -failindex val data -> objc = 4
|
||||
* 3) -nocomplain encoding data -> objc = 4
|
||||
* 4) -strict -failindex val encoding data -> objc = 6
|
||||
* 5) -strict encoding data -> objc = 4
|
||||
* 6) -failindex val encoding data -> objc = 5
|
||||
* 7) -failindex val -strict encoding data -> objc = 6
|
||||
*/
|
||||
|
||||
if (objc == 2) {
|
||||
encoding = Tcl_GetEncoding(interp, NULL);
|
||||
data = objv[1];
|
||||
} else if (objc > 2 && objc < 6) {
|
||||
} else if (objc == 3) {
|
||||
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
data = objv[2];
|
||||
} else if (objc > 3 && objc < 7) {
|
||||
int objcUnprocessed = objc;
|
||||
data = objv[objc - 1];
|
||||
stringPtr = Tcl_GetString(objv[1]);
|
||||
@@ -725,15 +754,31 @@ EncodingConverttoObjCmd(
|
||||
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
|
||||
flags = TCL_ENCODING_STRICT;
|
||||
objcUnprocessed--;
|
||||
stringPtr = Tcl_GetString(objv[2]);
|
||||
if (stringPtr[0] == '-' && stringPtr[1] == 'f'
|
||||
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
|
||||
/* at least three additional arguments needed */
|
||||
if (objc < 6) {
|
||||
goto encConvToError;
|
||||
}
|
||||
failVarObj = objv[3];
|
||||
objcUnprocessed -= 2;
|
||||
}
|
||||
} else if (stringPtr[0] == '-' && stringPtr[1] == 'f'
|
||||
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
|
||||
/* at least two additional arguments needed */
|
||||
if (objc < 4) {
|
||||
/* at least three additional arguments needed */
|
||||
if (objc < 5) {
|
||||
goto encConvToError;
|
||||
}
|
||||
failVarObj = objv[2];
|
||||
flags = TCL_ENCODING_STOPONERROR;
|
||||
objcUnprocessed -= 2;
|
||||
stringPtr = Tcl_GetString(objv[3]);
|
||||
if (stringPtr[0] == '-' && stringPtr[1] == 's'
|
||||
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
|
||||
flags = TCL_ENCODING_STRICT;
|
||||
objcUnprocessed --;
|
||||
}
|
||||
}
|
||||
switch (objcUnprocessed) {
|
||||
case 3:
|
||||
@@ -749,7 +794,10 @@ EncodingConverttoObjCmd(
|
||||
}
|
||||
} else {
|
||||
encConvToError:
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain? ?-strict? ?-failindex var? ?encoding? data");
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
|
||||
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
|
||||
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -2060,7 +2108,7 @@ PathNativeNameCmd(
|
||||
if (Tcl_TranslateFileName(interp, TclGetString(objv[1]), &ds) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
|
||||
Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -2860,8 +2908,8 @@ EachloopCmd(
|
||||
result = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
TclListObjGetElementsM(NULL, statePtr->vCopyList[i],
|
||||
&statePtr->varcList[i], &statePtr->varvList[i]);
|
||||
TclListObjLengthM(NULL, statePtr->vCopyList[i],
|
||||
&statePtr->varcList[i]);
|
||||
if (statePtr->varcList[i] < 1) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"%s varlist is empty",
|
||||
@@ -2872,6 +2920,8 @@ EachloopCmd(
|
||||
result = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
TclListObjGetElementsM(NULL, statePtr->vCopyList[i],
|
||||
&statePtr->varcList[i], &statePtr->varvList[i]);
|
||||
|
||||
/* Values */
|
||||
if (TclHasInternalRep(objv[2+i*2],&tclArithSeriesType)) {
|
||||
@@ -3020,7 +3070,8 @@ ForeachAssignments(
|
||||
k = statePtr->index[i]++;
|
||||
if (k < statePtr->argcList[i]) {
|
||||
if (isarithseries) {
|
||||
if (TclArithSeriesObjIndex(statePtr->aCopyList[i], k, &valuePtr) != TCL_OK) {
|
||||
valuePtr = TclArithSeriesObjIndex(interp, statePtr->aCopyList[i], k);
|
||||
if (valuePtr == NULL) {
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
|
||||
"\n (setting %s loop variable \"%s\")",
|
||||
(statePtr->resultList != NULL ? "lmap" : "foreach"),
|
||||
|
||||
+15
-8
@@ -20,6 +20,7 @@
|
||||
#include "tclInt.h"
|
||||
#include "tclRegexp.h"
|
||||
#include "tclArithSeries.h"
|
||||
#include "tclTomMath.h"
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -2231,8 +2232,8 @@ Tcl_JoinObjCmd(
|
||||
if (listLen == 1) {
|
||||
/* One element; return it */
|
||||
if (isArithSeries) {
|
||||
Tcl_Obj *valueObj;
|
||||
if (TclArithSeriesObjIndex(objv[1], 0, &valueObj) != TCL_OK) {
|
||||
Tcl_Obj *valueObj = TclArithSeriesObjIndex(interp, objv[1], 0);
|
||||
if (valueObj == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetObjResult(interp, valueObj);
|
||||
@@ -2266,7 +2267,8 @@ Tcl_JoinObjCmd(
|
||||
|
||||
Tcl_AppendObjToObj(resObjPtr, joinObjPtr);
|
||||
}
|
||||
if (TclArithSeriesObjIndex(objv[1], i, &valueObj) != TCL_OK) {
|
||||
valueObj = TclArithSeriesObjIndex(interp, objv[1], i);
|
||||
if (valueObj == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_AppendObjToObj(resObjPtr, valueObj);
|
||||
@@ -2573,6 +2575,7 @@ Tcl_LlengthObjCmd(
|
||||
/* Argument objects. */
|
||||
{
|
||||
int listLen, result;
|
||||
Tcl_Obj *objPtr;
|
||||
|
||||
if (objc != 2) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "list");
|
||||
@@ -2589,7 +2592,8 @@ Tcl_LlengthObjCmd(
|
||||
* length.
|
||||
*/
|
||||
|
||||
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(listLen));
|
||||
TclNewUIntObj(objPtr, listLen);
|
||||
Tcl_SetObjResult(interp, objPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -3152,7 +3156,7 @@ Tcl_LreverseObjCmd(
|
||||
} /* end ArithSeries */
|
||||
|
||||
/* True List */
|
||||
if (TclListObjGetElementsM(interp, objv[1], &elemc, &elemv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, objv[1], &elemc) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -3164,6 +3168,9 @@ Tcl_LreverseObjCmd(
|
||||
Tcl_SetObjResult(interp, objv[1]);
|
||||
return TCL_OK;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, objv[1], &elemc, &elemv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
if (Tcl_IsShared(objv[1])
|
||||
|| ListObjRepIsShared(objv[1])) { /* Bug 1675044 */
|
||||
@@ -3607,7 +3614,7 @@ Tcl_LsearchObjCmd(
|
||||
if (allMatches || inlineReturn) {
|
||||
Tcl_ResetResult(interp);
|
||||
} else {
|
||||
TclNewIndexObj(itemPtr, TCL_INDEX_NONE);
|
||||
TclNewIntObj(itemPtr, -1);
|
||||
Tcl_SetObjResult(interp, itemPtr);
|
||||
}
|
||||
goto done;
|
||||
@@ -4103,10 +4110,10 @@ SequenceIdentifyArgument(
|
||||
exprValueObj = argPtr;
|
||||
} else {
|
||||
if (floor(dvalue) == dvalue) {
|
||||
exprValueObj = Tcl_NewWideIntObj(value);
|
||||
TclNewIntObj(exprValueObj, value);
|
||||
keyword = TCL_NUMBER_INT;
|
||||
} else {
|
||||
exprValueObj = Tcl_NewDoubleObj(dvalue);
|
||||
TclNewDoubleObj(exprValueObj, dvalue);
|
||||
keyword = TCL_NUMBER_DOUBLE;
|
||||
}
|
||||
}
|
||||
|
||||
+9
-6
@@ -2673,7 +2673,7 @@ StringEqualCmd(
|
||||
*/
|
||||
|
||||
objv += objc-2;
|
||||
match = TclStringCmp(objv[0], objv[1], 0, nocase, reqlength);
|
||||
match = TclStringCmp(objv[0], objv[1], 1, nocase, reqlength);
|
||||
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(match ? 0 : 1));
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -3610,7 +3610,7 @@ TclNRSwitchObjCmd(
|
||||
Tcl_Obj **listv;
|
||||
|
||||
blist = objv[0];
|
||||
if (TclListObjGetElementsM(interp, objv[0], &objc, &listv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, objv[0], &objc) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -3623,6 +3623,9 @@ TclNRSwitchObjCmd(
|
||||
"?-option ...? string {?pattern body ...? ?default body?}");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, objv[0], &objc, &listv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
objv = listv;
|
||||
splitObjs = 1;
|
||||
}
|
||||
@@ -3775,7 +3778,7 @@ TclNRSwitchObjCmd(
|
||||
TclNewIndexObj(rangeObjAry[0], info.matches[j].start);
|
||||
TclNewIndexObj(rangeObjAry[1], info.matches[j].end-1);
|
||||
} else {
|
||||
TclNewIndexObj(rangeObjAry[1], TCL_INDEX_NONE);
|
||||
TclNewIntObj(rangeObjAry[1], -1);
|
||||
rangeObjAry[0] = rangeObjAry[1];
|
||||
}
|
||||
|
||||
@@ -4099,9 +4102,9 @@ Tcl_TimeObjCmd(
|
||||
* Use int obj since we know time is not fractional. [Bug 1202178]
|
||||
*/
|
||||
|
||||
objs[0] = Tcl_NewWideIntObj((count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
|
||||
TclNewIntObj(objs[0], (count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
|
||||
} else {
|
||||
objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
|
||||
TclNewDoubleObj(objs[0], totalMicroSec/count);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4586,7 +4589,7 @@ Tcl_TimeRateObjCmd(
|
||||
if (measureOverhead > ((double) usec) / count) {
|
||||
measureOverhead = ((double) usec) / count;
|
||||
}
|
||||
objs[0] = Tcl_NewDoubleObj(measureOverhead);
|
||||
TclNewDoubleObj(objs[0], measureOverhead);
|
||||
TclNewLiteralStringObj(objs[1], "\xC2\xB5s/#-overhead"); /* mics */
|
||||
objs += 2;
|
||||
}
|
||||
|
||||
+28
-28
@@ -122,7 +122,7 @@ TclCompileAppendCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -279,7 +279,7 @@ TclCompileArraySetCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -452,7 +452,7 @@ TclCompileArrayUnsetCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -816,7 +816,7 @@ TclCompileClockReadingCmd(
|
||||
TCL_UNUSED(Tcl_Interp *),
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ TclCompileDictIncrCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1228,7 +1228,7 @@ TclCompileDictUnsetCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1281,7 +1281,7 @@ TclCompileDictCreateCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1374,7 +1374,7 @@ TclCompileDictMergeCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1488,7 +1488,7 @@ TclCompileDictForCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1501,7 +1501,7 @@ TclCompileDictMapCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1514,7 +1514,7 @@ CompileDictEachCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr, /* Holds resulting instructions. */
|
||||
int collect) /* Flag == TCL_EACH_COLLECT to collect and
|
||||
@@ -1743,7 +1743,7 @@ TclCompileDictUpdateCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1894,7 +1894,7 @@ TclCompileDictAppendCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1949,7 +1949,7 @@ TclCompileDictLappendCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1994,7 +1994,7 @@ TclCompileDictWithCmd(
|
||||
Tcl_Interp *interp, /* Used for looking up stuff. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -2263,9 +2263,9 @@ TclCompileDictWithCmd(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static ClientData
|
||||
static void *
|
||||
DupDictUpdateInfo(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
DictUpdateInfo *dui1Ptr, *dui2Ptr;
|
||||
size_t len;
|
||||
@@ -2279,14 +2279,14 @@ DupDictUpdateInfo(
|
||||
|
||||
static void
|
||||
FreeDictUpdateInfo(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
ckfree(clientData);
|
||||
}
|
||||
|
||||
static void
|
||||
PrintDictUpdateInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *appendObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
@@ -2304,7 +2304,7 @@ PrintDictUpdateInfo(
|
||||
|
||||
static void
|
||||
DisassembleDictUpdateInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *dictObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
@@ -2610,7 +2610,7 @@ TclCompileForeachCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -2882,9 +2882,9 @@ CompileEachloopCmd(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static ClientData
|
||||
static void *
|
||||
DupForeachInfo(
|
||||
ClientData clientData) /* The foreach command's compilation auxiliary
|
||||
void *clientData) /* The foreach command's compilation auxiliary
|
||||
* data to duplicate. */
|
||||
{
|
||||
ForeachInfo *srcPtr = (ForeachInfo *)clientData;
|
||||
@@ -2933,7 +2933,7 @@ DupForeachInfo(
|
||||
|
||||
static void
|
||||
FreeForeachInfo(
|
||||
ClientData clientData) /* The foreach command's compilation auxiliary
|
||||
void *clientData) /* The foreach command's compilation auxiliary
|
||||
* data to free. */
|
||||
{
|
||||
ForeachInfo *infoPtr = (ForeachInfo *)clientData;
|
||||
@@ -2967,7 +2967,7 @@ FreeForeachInfo(
|
||||
|
||||
static void
|
||||
PrintForeachInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *appendObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
@@ -3007,7 +3007,7 @@ PrintForeachInfo(
|
||||
|
||||
static void
|
||||
PrintNewForeachInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *appendObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
@@ -3037,7 +3037,7 @@ PrintNewForeachInfo(
|
||||
|
||||
static void
|
||||
DisassembleForeachInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *dictObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
@@ -3084,7 +3084,7 @@ DisassembleForeachInfo(
|
||||
|
||||
static void
|
||||
DisassembleNewForeachInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *dictObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
|
||||
+47
-174
@@ -181,7 +181,8 @@ TclCompileIfCmd(
|
||||
* determined. */
|
||||
Tcl_Token *tokenPtr, *testTokenPtr;
|
||||
int jumpIndex = 0; /* Avoid compiler warning. */
|
||||
int jumpFalseDist, numWords, wordIdx, numBytes, j, code;
|
||||
int numBytes, j;
|
||||
int jumpFalseDist, numWords, wordIdx, code;
|
||||
const char *word;
|
||||
int realCond = 1; /* Set to 0 for static conditions:
|
||||
* "if 0 {..}" */
|
||||
@@ -580,7 +581,7 @@ TclCompileInfoCommandsCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr)
|
||||
{
|
||||
@@ -1355,84 +1356,34 @@ TclCompileLinsertCmd(
|
||||
CompileEnv *envPtr) /* Holds the resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr, *listTokenPtr;
|
||||
int idx, i;
|
||||
Tcl_Token *tokenPtr;
|
||||
int i;
|
||||
|
||||
if (parsePtr->numWords < 3) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
listTokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
|
||||
/*
|
||||
* Parse the index. Will only compile if it is constant and not an
|
||||
* _integer_ less than zero (since we reserve negative indices here for
|
||||
* end-relative indexing) or an end-based index greater than 'end' itself.
|
||||
*/
|
||||
|
||||
tokenPtr = TokenAfter(listTokenPtr);
|
||||
|
||||
/*
|
||||
* NOTE: This command treats all inserts at indices before the list
|
||||
* the same as inserts at the start of the list, and all inserts
|
||||
* after the list the same as inserts at the end of the list. We
|
||||
* make that transformation here so we can use the optimized bytecode
|
||||
* as much as possible.
|
||||
*/
|
||||
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_END,
|
||||
&idx) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* There are four main cases. If there are no values to insert, this is
|
||||
* just a confirm-listiness check. If the index is '0', this is a prepend.
|
||||
* If the index is 'end' (== TCL_INDEX_END), this is an append. Otherwise,
|
||||
* this is a splice (== split, insert values as list, concat-3).
|
||||
*/
|
||||
|
||||
CompileWord(envPtr, listTokenPtr, interp, 1);
|
||||
if (parsePtr->numWords == 3) {
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
|
||||
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
/* Push list, insertion index onto the stack */
|
||||
tokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, 1);
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, 2);
|
||||
|
||||
/* Push new elements to be inserted */
|
||||
for (i=3 ; i<parsePtr->numWords ; i++) {
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, i);
|
||||
}
|
||||
TclEmitInstInt4( INST_LIST, i - 3, envPtr);
|
||||
|
||||
if (idx == (int)TCL_INDEX_START) {
|
||||
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
} else if (idx == (int)TCL_INDEX_END) {
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
} else {
|
||||
/*
|
||||
* Here we handle two ranges for idx. First when idx > 0, we
|
||||
* want the first half of the split to end at index idx-1 and
|
||||
* the second half to start at index idx.
|
||||
* Second when idx < TCL_INDEX_END, indicating "end-N" indexing,
|
||||
* we want the first half of the split to end at index end-N and
|
||||
* the second half to start at index end-N+1. We accomplish this
|
||||
* with a pre-adjustment of the end-N value.
|
||||
* The root of this is that the commands [lrange] and [linsert]
|
||||
* differ in their interpretation of the "end" index.
|
||||
*/
|
||||
|
||||
if (idx < (int)TCL_INDEX_END) {
|
||||
idx++;
|
||||
}
|
||||
TclEmitInstInt4( INST_OVER, 1, envPtr);
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
|
||||
TclEmitInt4( idx - 1, envPtr);
|
||||
TclEmitInstInt4( INST_REVERSE, 3, envPtr);
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, idx, envPtr);
|
||||
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
}
|
||||
/* First operand is count of arguments */
|
||||
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
|
||||
/*
|
||||
* Second operand is bitmask
|
||||
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
|
||||
* TCL_LREPLACE4_SINGLE_INDEX - second index is not present
|
||||
* indicating this is a pure insert
|
||||
*/
|
||||
TclEmitInt1(TCL_LREPLACE4_SINGLE_INDEX, envPtr);
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -1457,116 +1408,34 @@ TclCompileLreplaceCmd(
|
||||
CompileEnv *envPtr) /* Holds the resulting instructions. */
|
||||
{
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *tokenPtr, *listTokenPtr;
|
||||
int idx1, idx2, i;
|
||||
int emptyPrefix=1, suffixStart = 0;
|
||||
Tcl_Token *tokenPtr;
|
||||
int i;
|
||||
|
||||
if (parsePtr->numWords < 4) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
listTokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
|
||||
tokenPtr = TokenAfter(listTokenPtr);
|
||||
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_NONE,
|
||||
&idx1) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/* Push list, first, last onto the stack */
|
||||
tokenPtr = TokenAfter(parsePtr->tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, 1);
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_NONE, TCL_INDEX_END,
|
||||
&idx2) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
CompileWord(envPtr, tokenPtr, interp, 2);
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
CompileWord(envPtr, tokenPtr, interp, 3);
|
||||
|
||||
/*
|
||||
* General structure of the [lreplace] result is
|
||||
* prefix replacement suffix
|
||||
* In a few cases we can predict various parts will be empty and
|
||||
* take advantage.
|
||||
*
|
||||
* The proper suffix begins with the greater of indices idx1 or
|
||||
* idx2 + 1. If we cannot tell at compile time which is greater,
|
||||
* we must defer to direct evaluation.
|
||||
*/
|
||||
|
||||
if (idx1 == (int)TCL_INDEX_NONE) {
|
||||
suffixStart = (int)TCL_INDEX_NONE;
|
||||
} else if (idx2 == (int)TCL_INDEX_NONE) {
|
||||
suffixStart = idx1;
|
||||
} else if (idx2 == (int)TCL_INDEX_END) {
|
||||
suffixStart = (int)TCL_INDEX_NONE;
|
||||
} else if (((idx2 < (int)TCL_INDEX_END) && (idx1 <= (int)TCL_INDEX_END))
|
||||
|| ((idx2 >= (int)TCL_INDEX_START) && (idx1 >= (int)TCL_INDEX_START))) {
|
||||
suffixStart = (idx1 > idx2 + 1) ? idx1 : idx2 + 1;
|
||||
} else {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/* All paths start with computing/pushing the original value. */
|
||||
CompileWord(envPtr, listTokenPtr, interp, 1);
|
||||
|
||||
/*
|
||||
* Push all the replacement values next so any errors raised in
|
||||
* creating them get raised first.
|
||||
*/
|
||||
if (parsePtr->numWords > 4) {
|
||||
/* Push the replacement arguments */
|
||||
/* Push new elements to be inserted */
|
||||
for (i=4 ; i<parsePtr->numWords ; i++) {
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
for (i=4 ; i<parsePtr->numWords ; i++) {
|
||||
CompileWord(envPtr, tokenPtr, interp, i);
|
||||
tokenPtr = TokenAfter(tokenPtr);
|
||||
}
|
||||
|
||||
/* Make a list of them... */
|
||||
TclEmitInstInt4( INST_LIST, i - 4, envPtr);
|
||||
|
||||
emptyPrefix = 0;
|
||||
CompileWord(envPtr, tokenPtr, interp, i);
|
||||
}
|
||||
|
||||
if ((idx1 == suffixStart) && (parsePtr->numWords == 4)) {
|
||||
/*
|
||||
* This is a "no-op". Example: [lreplace {a b c} 2 0]
|
||||
* We still do a list operation to get list-verification
|
||||
* and canonicalization side effects.
|
||||
*/
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
|
||||
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
if (idx1 != (int)TCL_INDEX_START) {
|
||||
/* Prefix may not be empty; generate bytecode to push it */
|
||||
if (emptyPrefix) {
|
||||
TclEmitOpcode( INST_DUP, envPtr);
|
||||
} else {
|
||||
TclEmitInstInt4( INST_OVER, 1, envPtr);
|
||||
}
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
|
||||
TclEmitInt4( idx1 - 1, envPtr);
|
||||
if (!emptyPrefix) {
|
||||
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
}
|
||||
emptyPrefix = 0;
|
||||
}
|
||||
|
||||
if (!emptyPrefix) {
|
||||
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
|
||||
}
|
||||
|
||||
if (suffixStart == (int)TCL_INDEX_NONE) {
|
||||
TclEmitOpcode( INST_POP, envPtr);
|
||||
if (emptyPrefix) {
|
||||
PushStringLiteral(envPtr, "");
|
||||
}
|
||||
} else {
|
||||
/* Suffix may not be empty; generate bytecode to push it */
|
||||
TclEmitInstInt4( INST_LIST_RANGE_IMM, suffixStart, envPtr);
|
||||
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
|
||||
if (!emptyPrefix) {
|
||||
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
|
||||
}
|
||||
}
|
||||
/* First operand is count of arguments */
|
||||
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
|
||||
/*
|
||||
* Second operand is bitmask
|
||||
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
|
||||
*/
|
||||
TclEmitInt1(TCL_LREPLACE4_END_IS_LAST, envPtr);
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -2056,7 +1925,8 @@ TclCompileRegexpCmd(
|
||||
DefineLineInformation; /* TIP #280 */
|
||||
Tcl_Token *varTokenPtr; /* Pointer to the Tcl_Token representing the
|
||||
* parse of the RE or string. */
|
||||
int i, len, nocase, exact, sawLast, simple;
|
||||
int len;
|
||||
int i, nocase, exact, sawLast, simple;
|
||||
const char *str;
|
||||
|
||||
/*
|
||||
@@ -2242,7 +2112,8 @@ TclCompileRegsubCmd(
|
||||
Tcl_Obj *patternObj = NULL, *replacementObj = NULL;
|
||||
Tcl_DString pattern;
|
||||
const char *bytes;
|
||||
int len, exact, quantified, result = TCL_ERROR;
|
||||
int exact, quantified, result = TCL_ERROR;
|
||||
int len;
|
||||
|
||||
if (parsePtr->numWords < 5 || parsePtr->numWords > 6) {
|
||||
return TCL_ERROR;
|
||||
@@ -2396,7 +2267,8 @@ TclCompileReturnCmd(
|
||||
* General syntax: [return ?-option value ...? ?result?]
|
||||
* An even number of words means an explicit result argument is present.
|
||||
*/
|
||||
int level, code, objc, size, status = TCL_OK;
|
||||
int level, code, objc, status = TCL_OK;
|
||||
int size;
|
||||
int numWords = parsePtr->numWords;
|
||||
int explicitResult = (0 == (numWords % 2));
|
||||
int numOptionWords = numWords - 1 - explicitResult;
|
||||
@@ -2506,7 +2378,7 @@ TclCompileReturnCmd(
|
||||
ExceptionRange range = envPtr->exceptArrayPtr[index];
|
||||
|
||||
if ((range.type == CATCH_EXCEPTION_RANGE)
|
||||
&& (range.catchOffset == -1)) {
|
||||
&& (range.catchOffset == TCL_INDEX_NONE)) {
|
||||
enclosingCatch = 1;
|
||||
break;
|
||||
}
|
||||
@@ -2832,7 +2704,8 @@ IndexTailVarIfKnown(
|
||||
{
|
||||
Tcl_Obj *tailPtr;
|
||||
const char *tailName, *p;
|
||||
int len, n = varTokenPtr->numComponents;
|
||||
int n = varTokenPtr->numComponents;
|
||||
int len;
|
||||
Tcl_Token *lastTokenPtr;
|
||||
int full, localIndex;
|
||||
|
||||
|
||||
+11
-11
@@ -497,7 +497,7 @@ TclCompileStringIsCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -788,7 +788,7 @@ TclCompileStringMatchCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -908,7 +908,7 @@ TclCompileStringMapCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1325,7 +1325,7 @@ TclCompileStringToUpperCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1347,7 +1347,7 @@ TclCompileStringToLowerCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -1369,7 +1369,7 @@ TclCompileStringToTitleCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -2547,9 +2547,9 @@ IssueSwitchJumpTable(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static ClientData
|
||||
static void *
|
||||
DupJumptableInfo(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
JumptableInfo *jtPtr = (JumptableInfo *)clientData;
|
||||
JumptableInfo *newJtPtr = (JumptableInfo *)ckalloc(sizeof(JumptableInfo));
|
||||
@@ -2569,7 +2569,7 @@ DupJumptableInfo(
|
||||
|
||||
static void
|
||||
FreeJumptableInfo(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
JumptableInfo *jtPtr = (JumptableInfo *)clientData;
|
||||
|
||||
@@ -2579,7 +2579,7 @@ FreeJumptableInfo(
|
||||
|
||||
static void
|
||||
PrintJumptableInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *appendObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
unsigned int pcOffset)
|
||||
@@ -2608,7 +2608,7 @@ PrintJumptableInfo(
|
||||
|
||||
static void
|
||||
DisassembleJumptableInfo(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Obj *dictObj,
|
||||
TCL_UNUSED(ByteCode *),
|
||||
TCL_UNUSED(unsigned int))
|
||||
|
||||
@@ -2787,7 +2787,7 @@ TclVariadicOpCmd(
|
||||
nodes[1].p.parent = 0;
|
||||
} else {
|
||||
if (lexeme == DIVIDE) {
|
||||
litObjv[0] = Tcl_NewDoubleObj(1.0);
|
||||
TclNewDoubleObj(litObjv[0], 1.0);
|
||||
} else {
|
||||
TclNewIntObj(litObjv[0], occdPtr->i.identity);
|
||||
}
|
||||
|
||||
@@ -675,6 +675,13 @@ InstructionDesc const tclInstructionTable[] = {
|
||||
/* String Less or equal: push (stknext <= stktop) */
|
||||
{"strge", 1, -1, 0, {OPERAND_NONE}},
|
||||
/* String Greater or equal: push (stknext >= stktop) */
|
||||
{"lreplace4", 6, INT_MIN, 2, {OPERAND_UINT4, OPERAND_UINT1}},
|
||||
/* Operands: number of arguments, flags
|
||||
* flags: Combination of TCL_LREPLACE4_* flags
|
||||
* Stack: ... listobj index1 ?index2? new1 ... newN => ... newlistobj
|
||||
* where index2 is present only if TCL_LREPLACE_SINGLE_INDEX is not
|
||||
* set in flags.
|
||||
*/
|
||||
|
||||
{NULL, 0, 0, 0, {OPERAND_NONE}}
|
||||
};
|
||||
|
||||
+86
-79
@@ -87,22 +87,22 @@ typedef enum {
|
||||
* to a catch PC offset. */
|
||||
} ExceptionRangeType;
|
||||
|
||||
typedef struct ExceptionRange {
|
||||
typedef struct {
|
||||
ExceptionRangeType type; /* The kind of ExceptionRange. */
|
||||
int nestingLevel; /* Static depth of the exception range. Used
|
||||
Tcl_Size nestingLevel; /* Static depth of the exception range. Used
|
||||
* to find the most deeply-nested range
|
||||
* surrounding a PC at runtime. */
|
||||
int codeOffset; /* Offset of the first instruction byte of the
|
||||
Tcl_Size codeOffset; /* Offset of the first instruction byte of the
|
||||
* code range. */
|
||||
int numCodeBytes; /* Number of bytes in the code range. */
|
||||
int breakOffset; /* If LOOP_EXCEPTION_RANGE, the target PC
|
||||
Tcl_Size numCodeBytes; /* Number of bytes in the code range. */
|
||||
Tcl_Size breakOffset; /* If LOOP_EXCEPTION_RANGE, the target PC
|
||||
* offset for a break command in the range. */
|
||||
int continueOffset; /* If LOOP_EXCEPTION_RANGE and not TCL_INDEX_NONE, the
|
||||
Tcl_Size continueOffset; /* If LOOP_EXCEPTION_RANGE and not TCL_INDEX_NONE, the
|
||||
* target PC offset for a continue command in
|
||||
* the code range. Otherwise, ignore this
|
||||
* range when processing a continue
|
||||
* command. */
|
||||
int catchOffset; /* If a CATCH_EXCEPTION_RANGE, the target PC
|
||||
Tcl_Size catchOffset; /* If a CATCH_EXCEPTION_RANGE, the target PC
|
||||
* offset for any "exception" in range. */
|
||||
} ExceptionRange;
|
||||
|
||||
@@ -118,21 +118,21 @@ typedef struct ExceptionAux {
|
||||
* one (see [for] next-clause) then we must
|
||||
* not pick up the range when scanning for a
|
||||
* target to continue to. */
|
||||
int stackDepth; /* The stack depth at the point where the
|
||||
Tcl_Size stackDepth; /* The stack depth at the point where the
|
||||
* exception range was created. This is used
|
||||
* to calculate the number of POPs required to
|
||||
* restore the stack to its prior state. */
|
||||
int expandTarget; /* The number of expansions expected on the
|
||||
Tcl_Size expandTarget; /* The number of expansions expected on the
|
||||
* auxData stack at the time the loop starts;
|
||||
* we can't currently discard them except by
|
||||
* doing INST_INVOKE_EXPANDED; this is a known
|
||||
* problem. */
|
||||
int expandTargetDepth; /* The stack depth expected at the outermost
|
||||
Tcl_Size expandTargetDepth; /* The stack depth expected at the outermost
|
||||
* expansion within the loop. Not meaningful
|
||||
* if there are no open expansions between the
|
||||
* looping level and the point of jump
|
||||
* issue. */
|
||||
int numBreakTargets; /* The number of [break]s that want to be
|
||||
Tcl_Size numBreakTargets; /* The number of [break]s that want to be
|
||||
* targeted to the place where this loop
|
||||
* exception will be bound to. */
|
||||
TCL_HASH_TYPE *breakTargets; /* The offsets of the INST_JUMP4 instructions
|
||||
@@ -141,8 +141,8 @@ typedef struct ExceptionAux {
|
||||
* TclFixupForwardJump) can cause the contents
|
||||
* of this array to be updated. When
|
||||
* numBreakTargets==0, this is NULL. */
|
||||
int allocBreakTargets; /* The size of the breakTargets array. */
|
||||
int numContinueTargets; /* The number of [continue]s that want to be
|
||||
Tcl_Size allocBreakTargets; /* The size of the breakTargets array. */
|
||||
Tcl_Size numContinueTargets; /* The number of [continue]s that want to be
|
||||
* targeted to the place where this loop
|
||||
* exception will be bound to. */
|
||||
TCL_HASH_TYPE *continueTargets; /* The offsets of the INST_JUMP4 instructions
|
||||
@@ -151,7 +151,7 @@ typedef struct ExceptionAux {
|
||||
* TclFixupForwardJump) can cause the contents
|
||||
* of this array to be updated. When
|
||||
* numContinueTargets==0, this is NULL. */
|
||||
int allocContinueTargets; /* The size of the continueTargets array. */
|
||||
Tcl_Size allocContinueTargets; /* The size of the continueTargets array. */
|
||||
} ExceptionAux;
|
||||
|
||||
/*
|
||||
@@ -162,11 +162,11 @@ typedef struct ExceptionAux {
|
||||
* source offset is not monotonic.
|
||||
*/
|
||||
|
||||
typedef struct CmdLocation {
|
||||
int codeOffset; /* Offset of first byte of command code. */
|
||||
int numCodeBytes; /* Number of bytes for command's code. */
|
||||
int srcOffset; /* Offset of first char of the command. */
|
||||
int numSrcBytes; /* Number of command source chars. */
|
||||
typedef struct {
|
||||
Tcl_Size codeOffset; /* Offset of first byte of command code. */
|
||||
Tcl_Size numCodeBytes; /* Number of bytes for command's code. */
|
||||
Tcl_Size srcOffset; /* Offset of first char of the command. */
|
||||
Tcl_Size numSrcBytes; /* Number of command source chars. */
|
||||
} CmdLocation;
|
||||
|
||||
/*
|
||||
@@ -180,9 +180,9 @@ typedef struct CmdLocation {
|
||||
* frame and associated information, like the path of a sourced file.
|
||||
*/
|
||||
|
||||
typedef struct ECL {
|
||||
int srcOffset; /* Command location to find the entry. */
|
||||
int nline; /* Number of words in the command */
|
||||
typedef struct {
|
||||
Tcl_Size srcOffset; /* Command location to find the entry. */
|
||||
Tcl_Size nline; /* Number of words in the command */
|
||||
int *line; /* Line information for all words in the
|
||||
* command. */
|
||||
int **next; /* Transient information used by the compiler
|
||||
@@ -190,7 +190,7 @@ typedef struct ECL {
|
||||
* lines. */
|
||||
} ECL;
|
||||
|
||||
typedef struct ExtCmdLoc {
|
||||
typedef struct {
|
||||
int type; /* Context type. */
|
||||
int start; /* Starting line for compiled script. Needed
|
||||
* for the extended recompile check in
|
||||
@@ -198,8 +198,8 @@ typedef struct ExtCmdLoc {
|
||||
Tcl_Obj *path; /* Path of the sourced file the command is
|
||||
* in. */
|
||||
ECL *loc; /* Command word locations (lines). */
|
||||
int nloc; /* Number of allocated entries in 'loc'. */
|
||||
int nuloc; /* Number of used entries in 'loc'. */
|
||||
Tcl_Size nloc; /* Number of allocated entries in 'loc'. */
|
||||
Tcl_Size nuloc; /* Number of used entries in 'loc'. */
|
||||
} ExtCmdLoc;
|
||||
|
||||
/*
|
||||
@@ -217,7 +217,7 @@ typedef struct ExtCmdLoc {
|
||||
* the AuxData structure.
|
||||
*/
|
||||
|
||||
typedef void *(AuxDataDupProc) (void *clientData);
|
||||
typedef void *(AuxDataDupProc) (void *clientData);
|
||||
typedef void (AuxDataFreeProc) (void *clientData);
|
||||
typedef void (AuxDataPrintProc)(void *clientData,
|
||||
Tcl_Obj *appendObj, struct ByteCode *codePtr,
|
||||
@@ -290,21 +290,21 @@ typedef struct CompileEnv {
|
||||
* SetByteCodeFromAny. This pointer is not
|
||||
* owned by the CompileEnv and must not be
|
||||
* freed or changed by it. */
|
||||
int numSrcBytes; /* Number of bytes in source. */
|
||||
Tcl_Size numSrcBytes; /* Number of bytes in source. */
|
||||
Proc *procPtr; /* If a procedure is being compiled, a pointer
|
||||
* to its Proc structure; otherwise NULL. Used
|
||||
* to compile local variables. Set from
|
||||
* information provided by ObjInterpProc in
|
||||
* tclProc.c. */
|
||||
int numCommands; /* Number of commands compiled. */
|
||||
int exceptDepth; /* Current exception range nesting level; TCL_INDEX_NONE
|
||||
Tcl_Size numCommands; /* Number of commands compiled. */
|
||||
Tcl_Size exceptDepth; /* Current exception range nesting level; TCL_INDEX_NONE
|
||||
* if not in any range currently. */
|
||||
int maxExceptDepth; /* Max nesting level of exception ranges; TCL_INDEX_NONE
|
||||
Tcl_Size maxExceptDepth; /* Max nesting level of exception ranges; TCL_INDEX_NONE
|
||||
* if no ranges have been compiled. */
|
||||
int maxStackDepth; /* Maximum number of stack elements needed to
|
||||
Tcl_Size maxStackDepth; /* Maximum number of stack elements needed to
|
||||
* execute the code. Set by compilation
|
||||
* procedures before returning. */
|
||||
int currStackDepth; /* Current stack depth. */
|
||||
Tcl_Size currStackDepth; /* Current stack depth. */
|
||||
LiteralTable localLitTable; /* Contains LiteralEntry's describing all Tcl
|
||||
* objects referenced by this compiled code.
|
||||
* Indexed by the string representations of
|
||||
@@ -318,18 +318,18 @@ typedef struct CompileEnv {
|
||||
* codeStart points into the heap.*/
|
||||
LiteralEntry *literalArrayPtr;
|
||||
/* Points to start of LiteralEntry array. */
|
||||
int literalArrayNext; /* Index of next free object array entry. */
|
||||
int literalArrayEnd; /* Index just after last obj array entry. */
|
||||
Tcl_Size literalArrayNext; /* Index of next free object array entry. */
|
||||
Tcl_Size literalArrayEnd; /* Index just after last obj array entry. */
|
||||
int mallocedLiteralArray; /* 1 if object array was expanded and objArray
|
||||
* points into the heap, else 0. */
|
||||
ExceptionRange *exceptArrayPtr;
|
||||
/* Points to start of the ExceptionRange
|
||||
* array. */
|
||||
int exceptArrayNext; /* Next free ExceptionRange array index.
|
||||
Tcl_Size exceptArrayNext; /* Next free ExceptionRange array index.
|
||||
* exceptArrayNext is the number of ranges and
|
||||
* (exceptArrayNext-1) is the index of the
|
||||
* current range's array entry. */
|
||||
int exceptArrayEnd; /* Index after the last ExceptionRange array
|
||||
Tcl_Size exceptArrayEnd; /* Index after the last ExceptionRange array
|
||||
* entry. */
|
||||
int mallocedExceptArray; /* 1 if ExceptionRange array was expanded and
|
||||
* exceptArrayPtr points in heap, else 0. */
|
||||
@@ -342,15 +342,15 @@ typedef struct CompileEnv {
|
||||
* numCommands is the index of the next entry
|
||||
* to use; (numCommands-1) is the entry index
|
||||
* for the last command. */
|
||||
int cmdMapEnd; /* Index after last CmdLocation entry. */
|
||||
Tcl_Size cmdMapEnd; /* Index after last CmdLocation entry. */
|
||||
int mallocedCmdMap; /* 1 if command map array was expanded and
|
||||
* cmdMapPtr points in the heap, else 0. */
|
||||
AuxData *auxDataArrayPtr; /* Points to auxiliary data array start. */
|
||||
int auxDataArrayNext; /* Next free compile aux data array index.
|
||||
Tcl_Size auxDataArrayNext; /* Next free compile aux data array index.
|
||||
* auxDataArrayNext is the number of aux data
|
||||
* items and (auxDataArrayNext-1) is index of
|
||||
* current aux data array entry. */
|
||||
int auxDataArrayEnd; /* Index after last aux data array entry. */
|
||||
Tcl_Size auxDataArrayEnd; /* Index after last aux data array entry. */
|
||||
int mallocedAuxDataArray; /* 1 if aux data array was expanded and
|
||||
* auxDataArrayPtr points in heap else 0. */
|
||||
unsigned char staticCodeSpace[COMPILEENV_INIT_CODE_BYTES];
|
||||
@@ -369,7 +369,7 @@ typedef struct CompileEnv {
|
||||
/* TIP #280 */
|
||||
ExtCmdLoc *extCmdMapPtr; /* Extended command location information for
|
||||
* 'info frame'. */
|
||||
int line; /* First line of the script, based on the
|
||||
Tcl_Size line; /* First line of the script, based on the
|
||||
* invoking context, then the line of the
|
||||
* command currently compiled. */
|
||||
int atCmdStart; /* Flag to say whether an INST_START_CMD
|
||||
@@ -378,7 +378,7 @@ typedef struct CompileEnv {
|
||||
* inefficient. If set to 2, that instruction
|
||||
* should not be issued at all (by the generic
|
||||
* part of the command compiler). */
|
||||
int expandCount; /* Number of INST_EXPAND_START instructions
|
||||
Tcl_Size expandCount; /* Number of INST_EXPAND_START instructions
|
||||
* encountered that have not yet been paired
|
||||
* with a corresponding
|
||||
* INST_INVOKE_EXPANDED. */
|
||||
@@ -417,7 +417,7 @@ typedef struct ByteCode {
|
||||
* procs are specific to an interpreter so the
|
||||
* code emitted will depend on the
|
||||
* interpreter. */
|
||||
int compileEpoch; /* Value of iPtr->compileEpoch when this
|
||||
Tcl_Size compileEpoch; /* Value of iPtr->compileEpoch when this
|
||||
* ByteCode was compiled. Used to invalidate
|
||||
* code when, e.g., commands with compile
|
||||
* procs are redefined. */
|
||||
@@ -425,11 +425,11 @@ typedef struct ByteCode {
|
||||
* compiled. If the code is executed if a
|
||||
* different namespace, it must be
|
||||
* recompiled. */
|
||||
int nsEpoch; /* Value of nsPtr->resolverEpoch when this
|
||||
Tcl_Size nsEpoch; /* Value of nsPtr->resolverEpoch when this
|
||||
* ByteCode was compiled. Used to invalidate
|
||||
* code when new namespace resolution rules
|
||||
* are put into effect. */
|
||||
int refCount; /* Reference count: set 1 when created plus 1
|
||||
Tcl_Size refCount; /* Reference count: set 1 when created plus 1
|
||||
* for each execution of the code currently
|
||||
* active. This structure can be freed when
|
||||
* refCount becomes zero. */
|
||||
@@ -449,17 +449,17 @@ typedef struct ByteCode {
|
||||
* itself. Does not include heap space for
|
||||
* literal Tcl objects or storage referenced
|
||||
* by AuxData entries. */
|
||||
int numCommands; /* Number of commands compiled. */
|
||||
int numSrcBytes; /* Number of source bytes compiled. */
|
||||
int numCodeBytes; /* Number of code bytes. */
|
||||
int numLitObjects; /* Number of objects in literal array. */
|
||||
int numExceptRanges; /* Number of ExceptionRange array elems. */
|
||||
int numAuxDataItems; /* Number of AuxData items. */
|
||||
int numCmdLocBytes; /* Number of bytes needed for encoded command
|
||||
Tcl_Size numCommands; /* Number of commands compiled. */
|
||||
Tcl_Size numSrcBytes; /* Number of source bytes compiled. */
|
||||
Tcl_Size numCodeBytes; /* Number of code bytes. */
|
||||
Tcl_Size numLitObjects; /* Number of objects in literal array. */
|
||||
Tcl_Size numExceptRanges; /* Number of ExceptionRange array elems. */
|
||||
Tcl_Size numAuxDataItems; /* Number of AuxData items. */
|
||||
Tcl_Size numCmdLocBytes; /* Number of bytes needed for encoded command
|
||||
* location information. */
|
||||
int maxExceptDepth; /* Maximum nesting level of ExceptionRanges;
|
||||
Tcl_Size maxExceptDepth; /* Maximum nesting level of ExceptionRanges;
|
||||
* TCL_INDEX_NONE if no ranges were compiled. */
|
||||
int maxStackDepth; /* Maximum number of stack elements needed to
|
||||
Tcl_Size maxStackDepth; /* Maximum number of stack elements needed to
|
||||
* execute the code. */
|
||||
unsigned char *codeStart; /* Points to the first byte of the code. This
|
||||
* is just after the final ByteCode member
|
||||
@@ -536,7 +536,7 @@ typedef struct ByteCode {
|
||||
* Opcodes for the Tcl bytecode instructions. These must correspond to the
|
||||
* entries in the table of instruction descriptions, tclInstructionTable, in
|
||||
* tclCompile.c. Also, the order and number of the expression opcodes (e.g.,
|
||||
* INST_LOR) must match the entries in the array operatorStrings in
|
||||
* INST_BITOR) must match the entries in the array operatorStrings in
|
||||
* tclExecute.c.
|
||||
*/
|
||||
|
||||
@@ -848,8 +848,10 @@ typedef struct ByteCode {
|
||||
#define INST_STR_LE 193
|
||||
#define INST_STR_GE 194
|
||||
|
||||
#define INST_LREPLACE4 195
|
||||
|
||||
/* The last opcode */
|
||||
#define LAST_INST_OPCODE 194
|
||||
#define LAST_INST_OPCODE 195
|
||||
|
||||
/*
|
||||
* Table describing the Tcl bytecode instructions: their name (for displaying
|
||||
@@ -887,7 +889,7 @@ typedef enum InstOperandType {
|
||||
|
||||
typedef struct InstructionDesc {
|
||||
const char *name; /* Name of instruction. */
|
||||
int numBytes; /* Total number of bytes for instruction. */
|
||||
Tcl_Size numBytes; /* Total number of bytes for instruction. */
|
||||
int stackEffect; /* The worst-case balance stack effect of the
|
||||
* instruction, used for stack requirements
|
||||
* computations. The value INT_MIN signals
|
||||
@@ -975,8 +977,8 @@ typedef struct JumpFixup {
|
||||
|
||||
typedef struct JumpFixupArray {
|
||||
JumpFixup *fixup; /* Points to start of jump fixup array. */
|
||||
int next; /* Index of next free array entry. */
|
||||
int end; /* Index of last usable entry in array. */
|
||||
Tcl_Size next; /* Index of next free array entry. */
|
||||
Tcl_Size end; /* Index of last usable entry in array. */
|
||||
int mallocedArray; /* 1 if array was expanded and fixups points
|
||||
* into the heap, else 0. */
|
||||
JumpFixup staticFixupSpace[JUMPFIXUP_INIT_ENTRIES];
|
||||
@@ -991,8 +993,8 @@ typedef struct JumpFixupArray {
|
||||
*/
|
||||
|
||||
typedef struct ForeachVarList {
|
||||
int numVars; /* The number of variables in the list. */
|
||||
int varIndexes[TCLFLEXARRAY];/* An array of the indexes ("slot numbers")
|
||||
Tcl_Size numVars; /* The number of variables in the list. */
|
||||
Tcl_Size varIndexes[TCLFLEXARRAY];/* An array of the indexes ("slot numbers")
|
||||
* for each variable in the procedure's array
|
||||
* of local variables. Only scalar variables
|
||||
* are supported. The actual size of this
|
||||
@@ -1008,11 +1010,11 @@ typedef struct ForeachVarList {
|
||||
*/
|
||||
|
||||
typedef struct ForeachInfo {
|
||||
int numLists; /* The number of both the variable and value
|
||||
Tcl_Size numLists; /* The number of both the variable and value
|
||||
* lists of the foreach command. */
|
||||
int firstValueTemp; /* Index of the first temp var in a proc frame
|
||||
Tcl_Size firstValueTemp; /* Index of the first temp var in a proc frame
|
||||
* used to point to a value list. */
|
||||
int loopCtTemp; /* Index of temp var in a proc frame holding
|
||||
Tcl_Size loopCtTemp; /* Index of temp var in a proc frame holding
|
||||
* the loop's iteration count. Used to
|
||||
* determine next value list element to assign
|
||||
* each loop var. */
|
||||
@@ -1046,8 +1048,8 @@ MODULE_SCOPE const AuxDataType tclJumptableInfoType;
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int length; /* Size of array */
|
||||
int varIndices[TCLFLEXARRAY]; /* Array of variable indices to manage when
|
||||
Tcl_Size length; /* Size of array */
|
||||
Tcl_Size varIndices[TCLFLEXARRAY]; /* Array of variable indices to manage when
|
||||
* processing the start and end of a [dict
|
||||
* update]. There is really more than one
|
||||
* entry, and the structure is allocated to
|
||||
@@ -1212,7 +1214,6 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
|
||||
MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
Tcl_Interp *interp, int objc,
|
||||
Tcl_Obj *const objv[], int isLambda);
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
@@ -1260,10 +1261,10 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
|
||||
#define TclCheckStackDepth(depth, envPtr) \
|
||||
do { \
|
||||
int _dd = (depth); \
|
||||
if (_dd != (envPtr)->currStackDepth) { \
|
||||
Tcl_Panic("bad stack depth computations: is %i, should be %i", \
|
||||
(envPtr)->currStackDepth, _dd); \
|
||||
size_t _dd = (depth); \
|
||||
if (_dd != (size_t)(envPtr)->currStackDepth) { \
|
||||
Tcl_Panic("bad stack depth computations: is %" TCL_Z_MODIFIER "u, should be %" TCL_Z_MODIFIER "u", \
|
||||
(size_t)(envPtr)->currStackDepth, _dd); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -1505,7 +1506,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
(*((p)+3))))
|
||||
|
||||
/*
|
||||
* Macros used to compute the minimum and maximum of two integers. The ANSI C
|
||||
* Macros used to compute the minimum and maximum of two values. The ANSI C
|
||||
* "prototypes" for these macros are:
|
||||
*
|
||||
* int TclMin(int i, int j);
|
||||
@@ -1551,7 +1552,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
#define PushLiteral(envPtr, string, length) \
|
||||
TclEmitPush(TclRegisterLiteral((envPtr), (string), (length), 0), (envPtr))
|
||||
#define PushStringLiteral(envPtr, string) \
|
||||
PushLiteral((envPtr), (string), (int) (sizeof(string "") - 1))
|
||||
PushLiteral((envPtr), (string), sizeof(string "") - 1)
|
||||
|
||||
/*
|
||||
* Macro to advance to the next token; it is more mnemonic than the address
|
||||
@@ -1567,7 +1568,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
* Macro to get the offset to the next instruction to be issued. The ANSI C
|
||||
* "prototype" for this macro is:
|
||||
*
|
||||
* static int CurrentOffset(CompileEnv *envPtr);
|
||||
* static ptrdiff_t CurrentOffset(CompileEnv *envPtr);
|
||||
*/
|
||||
|
||||
#define CurrentOffset(envPtr) \
|
||||
@@ -1580,9 +1581,9 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
* of LOOP ranges is an interesting datum for debugging purposes, and that is
|
||||
* what we compute now.
|
||||
*
|
||||
* static int ExceptionRangeStarts(CompileEnv *envPtr, int index);
|
||||
* static void ExceptionRangeEnds(CompileEnv *envPtr, int index);
|
||||
* static void ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);
|
||||
* static int ExceptionRangeStarts(CompileEnv *envPtr, Tcl_Size index);
|
||||
* static void ExceptionRangeEnds(CompileEnv *envPtr, Tcl_Size index);
|
||||
* static void ExceptionRangeTarget(CompileEnv *envPtr, Tcl_Size index, LABEL);
|
||||
*/
|
||||
|
||||
#define ExceptionRangeStarts(envPtr, index) \
|
||||
@@ -1641,7 +1642,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
|
||||
#define DefineLineInformation \
|
||||
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
|
||||
int eclIndex = mapPtr->nuloc - 1
|
||||
Tcl_Size eclIndex = mapPtr->nuloc - 1
|
||||
|
||||
#define SetLineInformation(word) \
|
||||
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
|
||||
@@ -1682,6 +1683,12 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
|
||||
#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */
|
||||
#define TCL_NO_ELEMENT 2 /* Do not push the array element. */
|
||||
|
||||
/*
|
||||
* Flags bits used by lreplace4 instruction
|
||||
*/
|
||||
#define TCL_LREPLACE4_END_IS_LAST 1 /* "end" refers to last element */
|
||||
#define TCL_LREPLACE4_SINGLE_INDEX 2 /* Second index absent (pure insert) */
|
||||
|
||||
/*
|
||||
* DTrace probe macros (NOPs if DTrace support is not enabled).
|
||||
*/
|
||||
@@ -1819,8 +1826,8 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi);
|
||||
FILE *tclDTraceDebugLog = NULL; \
|
||||
void TclDTraceOpenDebugLog(void) { \
|
||||
char n[35]; \
|
||||
sprintf(n, "/tmp/tclDTraceDebug-%lu.log", \
|
||||
(unsigned long) getpid()); \
|
||||
sprintf(n, "/tmp/tclDTraceDebug-%" TCL_Z_MODIFIER "u.log", \
|
||||
(size_t) getpid()); \
|
||||
tclDTraceDebugLog = fopen(n, "a"); \
|
||||
}
|
||||
|
||||
|
||||
+309
-256
File diff suppressed because it is too large
Load Diff
+37
-27
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclIO.h"
|
||||
|
||||
typedef size_t (LengthProc)(const char *src);
|
||||
|
||||
@@ -33,13 +34,13 @@ typedef struct {
|
||||
Tcl_EncodingFreeProc *freeProc;
|
||||
/* If non-NULL, function to call when this
|
||||
* encoding is deleted. */
|
||||
void *clientData; /* Arbitrary value associated with encoding
|
||||
* type. Passed to conversion functions. */
|
||||
int nullSize; /* Number of 0x00 bytes that signify
|
||||
* end-of-string in this encoding. This number
|
||||
* is used to determine the source string
|
||||
* length when the srcLen argument is
|
||||
* negative. This number can be 1, 2, or 4. */
|
||||
void *clientData; /* Arbitrary value associated with encoding
|
||||
* type. Passed to conversion functions. */
|
||||
LengthProc *lengthProc; /* Function to compute length of
|
||||
* null-terminated strings in this encoding.
|
||||
* If nullSize is 1, this is strlen; if
|
||||
@@ -562,7 +563,7 @@ TclInitEncodingSubsystem(void)
|
||||
type.nullSize = 1;
|
||||
type.clientData = INT2PTR(TCL_ENCODING_UTF);
|
||||
Tcl_CreateEncoding(&type);
|
||||
type.clientData = INT2PTR(0);
|
||||
type.clientData = INT2PTR(TCL_ENCODING_NOCOMPLAIN);
|
||||
type.encodingName = "cesu-8";
|
||||
Tcl_CreateEncoding(&type);
|
||||
|
||||
@@ -571,13 +572,13 @@ TclInitEncodingSubsystem(void)
|
||||
type.freeProc = NULL;
|
||||
type.nullSize = 2;
|
||||
type.encodingName = "ucs-2le";
|
||||
type.clientData = INT2PTR(TCL_ENCODING_LE);
|
||||
type.clientData = INT2PTR(TCL_ENCODING_LE|TCL_ENCODING_NOCOMPLAIN);
|
||||
Tcl_CreateEncoding(&type);
|
||||
type.encodingName = "ucs-2be";
|
||||
type.clientData = INT2PTR(0);
|
||||
type.clientData = INT2PTR(TCL_ENCODING_NOCOMPLAIN);
|
||||
Tcl_CreateEncoding(&type);
|
||||
type.encodingName = "ucs-2";
|
||||
type.clientData = INT2PTR(isLe.c);
|
||||
type.clientData = INT2PTR(isLe.c|TCL_ENCODING_NOCOMPLAIN);
|
||||
Tcl_CreateEncoding(&type);
|
||||
|
||||
type.toUtfProc = Utf32ToUtfProc;
|
||||
@@ -888,7 +889,7 @@ FreeEncoding(
|
||||
*
|
||||
* Tcl_GetEncodingName --
|
||||
*
|
||||
* Given an encoding, return the name that was used to constuct the
|
||||
* Given an encoding, return the name that was used to construct the
|
||||
* encoding.
|
||||
*
|
||||
* Results:
|
||||
@@ -991,7 +992,7 @@ Tcl_GetEncodingNames(
|
||||
* string termination.
|
||||
*
|
||||
* Results:
|
||||
* The name of the encoding.
|
||||
* The number of nul bytes used for the string termination.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
@@ -2386,12 +2387,12 @@ UtfToUtfProc(
|
||||
|
||||
*dst++ = *src++;
|
||||
} else if ((UCHAR(*src) == 0xC0) && (src + 1 < srcEnd)
|
||||
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) {
|
||||
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX))) {
|
||||
/*
|
||||
* If in input mode, and -strict is specified: This is an error.
|
||||
* If in input mode, and -strict or -failindex is specified: This is an error.
|
||||
*/
|
||||
if (flags & TCL_ENCODING_MODIFIED) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
result = TCL_CONVERT_SYNTAX;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2413,6 +2414,10 @@ UtfToUtfProc(
|
||||
result = TCL_CONVERT_MULTIBYTE;
|
||||
break;
|
||||
}
|
||||
if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX)) {
|
||||
result = TCL_CONVERT_SYNTAX;
|
||||
break;
|
||||
}
|
||||
ch = UCHAR(*src++);
|
||||
} else {
|
||||
char chbuf[2];
|
||||
@@ -2424,8 +2429,8 @@ UtfToUtfProc(
|
||||
int low;
|
||||
const char *saveSrc = src;
|
||||
size_t len = TclUtfToUCS4(src, &ch);
|
||||
if ((len < 2) && (ch != 0) && STOPONERROR
|
||||
&& (flags & TCL_ENCODING_MODIFIED)) {
|
||||
if ((len < 2) && (ch != 0) && (flags & TCL_ENCODING_MODIFIED)
|
||||
&& (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) {
|
||||
result = TCL_CONVERT_SYNTAX;
|
||||
break;
|
||||
}
|
||||
@@ -2464,15 +2469,15 @@ UtfToUtfProc(
|
||||
src += len;
|
||||
dst += Tcl_UniCharToUtf(ch, dst);
|
||||
ch = low;
|
||||
} else if (!Tcl_UniCharIsUnicode(ch)) {
|
||||
if (STOPONERROR) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
src = saveSrc;
|
||||
break;
|
||||
}
|
||||
if (!(flags & TCL_ENCODING_MODIFIED)) {
|
||||
ch = 0xFFFD;
|
||||
}
|
||||
} else if (STOPONERROR && !(flags & TCL_ENCODING_MODIFIED) && (((ch & ~0x7FF) == 0xD800))) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
src = saveSrc;
|
||||
break;
|
||||
} else if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT)
|
||||
&& (flags & TCL_ENCODING_MODIFIED) && ((ch & ~0x7FF) == 0xD800)) {
|
||||
result = TCL_CONVERT_SYNTAX;
|
||||
src = saveSrc;
|
||||
break;
|
||||
}
|
||||
dst += Tcl_UniCharToUtf(ch, dst);
|
||||
}
|
||||
@@ -2560,6 +2565,13 @@ Utf32ToUtfProc(
|
||||
} else {
|
||||
ch = (src[0] & 0xFF) << 24 | (src[1] & 0xFF) << 16 | (src[2] & 0xFF) << 8 | (src[3] & 0xFF);
|
||||
}
|
||||
if ((unsigned)ch > 0x10FFFF || (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT)
|
||||
&& ((ch & ~0x7FF) == 0xD800))) {
|
||||
if (STOPONERROR) {
|
||||
result = TCL_CONVERT_SYNTAX;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Special case for 1-byte utf chars for speed. Make sure we work with
|
||||
@@ -2650,12 +2662,11 @@ UtfToUtf32Proc(
|
||||
break;
|
||||
}
|
||||
len = TclUtfToUCS4(src, &ch);
|
||||
if (!Tcl_UniCharIsUnicode(ch)) {
|
||||
if ((ch & ~0x7FF) == 0xD800) {
|
||||
if (STOPONERROR) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
ch = 0xFFFD;
|
||||
}
|
||||
src += len;
|
||||
if (flags & TCL_ENCODING_LE) {
|
||||
@@ -2853,12 +2864,11 @@ UtfToUtf16Proc(
|
||||
break;
|
||||
}
|
||||
len = TclUtfToUCS4(src, &ch);
|
||||
if (!Tcl_UniCharIsUnicode(ch)) {
|
||||
if ((ch & ~0x7FF) == 0xD800) {
|
||||
if (STOPONERROR) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
ch = 0xFFFD;
|
||||
}
|
||||
src += len;
|
||||
if (flags & TCL_ENCODING_LE) {
|
||||
@@ -3190,7 +3200,7 @@ TableFromUtfProc(
|
||||
word = fromUnicode[(ch >> 8)][ch & 0xFF];
|
||||
|
||||
if ((word == 0) && (ch != 0)) {
|
||||
if ((STOPONERROR) && (flags & TCL_ENCODING_CHAR_LIMIT)) {
|
||||
if (STOPONERROR) {
|
||||
result = TCL_CONVERT_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
+24
-16
@@ -562,8 +562,8 @@ TclNamespaceEnsembleCmd(
|
||||
continue;
|
||||
}
|
||||
do {
|
||||
if (TclListObjGetElementsM(interp, listObj, &len,
|
||||
&listv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, listObj, &len
|
||||
) != TCL_OK) {
|
||||
Tcl_DictObjDone(&search);
|
||||
if (patchedDict) {
|
||||
Tcl_DecrRefCount(patchedDict);
|
||||
@@ -582,6 +582,14 @@ TclNamespaceEnsembleCmd(
|
||||
}
|
||||
goto freeMapAndError;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, listObj, &len,
|
||||
&listv) != TCL_OK) {
|
||||
Tcl_DictObjDone(&search);
|
||||
if (patchedDict) {
|
||||
Tcl_DecrRefCount(patchedDict);
|
||||
}
|
||||
goto freeMapAndError;
|
||||
}
|
||||
cmd = TclGetString(listv[0]);
|
||||
if (!(cmd[0] == ':' && cmd[1] == ':')) {
|
||||
Tcl_Obj *newList = Tcl_DuplicateObj(listObj);
|
||||
@@ -2903,7 +2911,7 @@ TclCompileEnsemble(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3460,7 +3468,7 @@ CompileBasicNArgCommand(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3480,7 +3488,7 @@ TclCompileBasic0ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3502,7 +3510,7 @@ TclCompileBasic1ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3524,7 +3532,7 @@ TclCompileBasic2ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3546,7 +3554,7 @@ TclCompileBasic3ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3568,7 +3576,7 @@ TclCompileBasic0Or1ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3590,7 +3598,7 @@ TclCompileBasic1Or2ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3612,7 +3620,7 @@ TclCompileBasic2Or3ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3634,7 +3642,7 @@ TclCompileBasic0To2ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3656,7 +3664,7 @@ TclCompileBasic1To3ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3678,7 +3686,7 @@ TclCompileBasicMin0ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3700,7 +3708,7 @@ TclCompileBasicMin1ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
@@ -3722,7 +3730,7 @@ TclCompileBasicMin2ArgCmd(
|
||||
Tcl_Interp *interp, /* Used for error reporting. */
|
||||
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
|
||||
* created by Tcl_ParseCommand. */
|
||||
Command *cmdPtr, /* Points to defintion of command being
|
||||
Command *cmdPtr, /* Points to definition of command being
|
||||
* compiled. */
|
||||
CompileEnv *envPtr) /* Holds resulting instructions. */
|
||||
{
|
||||
|
||||
+100
-8
@@ -4876,7 +4876,8 @@ TEBCresume(
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
if (TclArithSeriesObjIndex(valuePtr, index, &objResultPtr) != TCL_OK) {
|
||||
objResultPtr = TclArithSeriesObjIndex(interp, valuePtr, index);
|
||||
if (objResultPtr == NULL) {
|
||||
CACHE_STACK_INFO();
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
@@ -4941,7 +4942,8 @@ TEBCresume(
|
||||
|
||||
/* Compute value @ index */
|
||||
if (index >= 0 && index < length) {
|
||||
if (TclArithSeriesObjIndex(valuePtr, index, &objResultPtr) != TCL_OK) {
|
||||
objResultPtr = TclArithSeriesObjIndex(interp, valuePtr, index);
|
||||
if (objResultPtr == NULL) {
|
||||
CACHE_STACK_INFO();
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
@@ -5187,7 +5189,7 @@ TEBCresume(
|
||||
|
||||
do {
|
||||
if (isArithSeries) {
|
||||
TclArithSeriesObjIndex(value2Ptr, i, &o);
|
||||
o = TclArithSeriesObjIndex(NULL, value2Ptr, i);
|
||||
} else {
|
||||
Tcl_ListObjIndex(NULL, value2Ptr, i, &o);
|
||||
}
|
||||
@@ -5244,11 +5246,101 @@ TEBCresume(
|
||||
NEXT_INST_F(1, 1, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* End of INST_LIST and related instructions.
|
||||
* -----------------------------------------------------------------
|
||||
* Start of string-related instructions.
|
||||
*/
|
||||
case INST_LREPLACE4:
|
||||
{
|
||||
int numToDelete, numNewElems, end_indicator;
|
||||
int haveSecondIndex, flags;
|
||||
Tcl_Obj *fromIdxObj, *toIdxObj;
|
||||
opnd = TclGetInt4AtPtr(pc + 1);
|
||||
flags = TclGetInt1AtPtr(pc + 5);
|
||||
|
||||
/* Stack: ... listobj index1 ?index2? new1 ... newN */
|
||||
valuePtr = OBJ_AT_DEPTH(opnd-1);
|
||||
|
||||
/* haveSecondIndex==0 => pure insert */
|
||||
haveSecondIndex = (flags & TCL_LREPLACE4_SINGLE_INDEX) == 0;
|
||||
numNewElems = opnd - 2 - haveSecondIndex;
|
||||
|
||||
/* end_indicator==1 => "end" is last element's index, 0=>index beyond */
|
||||
end_indicator = (flags & TCL_LREPLACE4_END_IS_LAST) != 0;
|
||||
fromIdxObj = OBJ_AT_DEPTH(opnd - 2);
|
||||
toIdxObj = haveSecondIndex ? OBJ_AT_DEPTH(opnd - 3) : NULL;
|
||||
if (Tcl_ListObjLength(interp, valuePtr, &length) != TCL_OK) {
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
|
||||
DECACHE_STACK_INFO();
|
||||
|
||||
if (TclGetIntForIndexM(
|
||||
interp, fromIdxObj, length - end_indicator, &fromIdx)
|
||||
!= TCL_OK) {
|
||||
CACHE_STACK_INFO();
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
if (fromIdx == TCL_INDEX_NONE) {
|
||||
fromIdx = 0;
|
||||
}
|
||||
else if (fromIdx > length) {
|
||||
fromIdx = length;
|
||||
}
|
||||
numToDelete = 0;
|
||||
if (toIdxObj) {
|
||||
if (TclGetIntForIndexM(
|
||||
interp, toIdxObj, length - end_indicator, &toIdx)
|
||||
!= TCL_OK) {
|
||||
CACHE_STACK_INFO();
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
if (toIdx > length) {
|
||||
toIdx = length;
|
||||
}
|
||||
if (toIdx >= fromIdx) {
|
||||
numToDelete = toIdx - fromIdx + 1;
|
||||
}
|
||||
}
|
||||
|
||||
CACHE_STACK_INFO();
|
||||
|
||||
if (Tcl_IsShared(valuePtr)) {
|
||||
objResultPtr = Tcl_DuplicateObj(valuePtr);
|
||||
if (Tcl_ListObjReplace(interp,
|
||||
objResultPtr,
|
||||
fromIdx,
|
||||
numToDelete,
|
||||
numNewElems,
|
||||
&OBJ_AT_DEPTH(numNewElems - 1))
|
||||
!= TCL_OK) {
|
||||
TRACE_ERROR(interp);
|
||||
Tcl_DecrRefCount(objResultPtr);
|
||||
goto gotError;
|
||||
}
|
||||
TRACE_APPEND(("\"%.30s\"\n", O2S(objResultPtr)));
|
||||
NEXT_INST_V(6, opnd, 1);
|
||||
}
|
||||
else {
|
||||
if (Tcl_ListObjReplace(interp,
|
||||
valuePtr,
|
||||
fromIdx,
|
||||
numToDelete,
|
||||
numNewElems,
|
||||
&OBJ_AT_DEPTH(numNewElems - 1))
|
||||
!= TCL_OK) {
|
||||
TRACE_ERROR(interp);
|
||||
goto gotError;
|
||||
}
|
||||
TRACE_APPEND(("\"%.30s\"\n", O2S(valuePtr)));
|
||||
NEXT_INST_V(6, opnd - 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* End of INST_LIST and related instructions.
|
||||
* -----------------------------------------------------------------
|
||||
* Start of string-related instructions.
|
||||
*/
|
||||
|
||||
case INST_STR_EQ:
|
||||
case INST_STR_NEQ: /* String (in)equality check */
|
||||
|
||||
@@ -454,7 +454,7 @@ TclpGetNativePathType(
|
||||
if ((rootEnd != path) && (driveNameLengthPtr != NULL)) {
|
||||
*driveNameLengthPtr = rootEnd - path;
|
||||
if (driveNameRef != NULL) {
|
||||
*driveNameRef = TclDStringToObj(&ds);
|
||||
*driveNameRef = Tcl_DStringToObj(&ds);
|
||||
Tcl_IncrRefCount(*driveNameRef);
|
||||
}
|
||||
}
|
||||
@@ -734,7 +734,7 @@ SplitWinPath(
|
||||
*/
|
||||
|
||||
if (p != path) {
|
||||
Tcl_ListObjAppendElement(NULL, result, TclDStringToObj(&buf));
|
||||
Tcl_ListObjAppendElement(NULL, result, Tcl_DStringToObj(&buf));
|
||||
}
|
||||
Tcl_DStringFree(&buf);
|
||||
|
||||
@@ -1767,7 +1767,7 @@ TclGlob(
|
||||
if (head != Tcl_DStringValue(&buffer)) {
|
||||
Tcl_DStringAppend(&buffer, head, -1);
|
||||
}
|
||||
pathPrefix = TclDStringToObj(&buffer);
|
||||
pathPrefix = Tcl_DStringToObj(&buffer);
|
||||
Tcl_IncrRefCount(pathPrefix);
|
||||
globFlags |= TCL_GLOBMODE_DIR;
|
||||
if (c != '\0') {
|
||||
@@ -2427,7 +2427,7 @@ DoGlob(
|
||||
*/
|
||||
|
||||
if (pathPtr == NULL) {
|
||||
joinedPtr = TclDStringToObj(&append);
|
||||
joinedPtr = Tcl_DStringToObj(&append);
|
||||
} else if (flags) {
|
||||
joinedPtr = TclNewFSPathObj(pathPtr, Tcl_DStringValue(&append),
|
||||
Tcl_DStringLength(&append));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tclFileSystem.h --
|
||||
*
|
||||
* This file contains the common defintions and prototypes for use by
|
||||
* This file contains the common definitions and prototypes for use by
|
||||
* Tcl's filesystem and path handling layers.
|
||||
*
|
||||
* Copyright (c) 2003 Vince Darley.
|
||||
|
||||
+123
-82
@@ -125,12 +125,12 @@ typedef struct {
|
||||
* ChannelState exists per set of stacked
|
||||
* channels. */
|
||||
Tcl_Channel stdinChannel; /* Static variable for the stdin channel. */
|
||||
int stdinInitialized;
|
||||
Tcl_Channel stdoutChannel; /* Static variable for the stdout channel. */
|
||||
int stdoutInitialized;
|
||||
Tcl_Channel stderrChannel; /* Static variable for the stderr channel. */
|
||||
int stderrInitialized;
|
||||
Tcl_Encoding binaryEncoding;
|
||||
int stdinInitialized;
|
||||
int stdoutInitialized;
|
||||
int stderrInitialized;
|
||||
} ThreadSpecificData;
|
||||
|
||||
static Tcl_ThreadDataKey dataKey;
|
||||
@@ -393,13 +393,13 @@ ChanClose(
|
||||
* Results:
|
||||
* The return value of the driver inputProc,
|
||||
* - number of bytes stored at dst, ot
|
||||
* - -1 on error, with a Posix error code available to the caller by
|
||||
* - TCL_INDEX_NONE on error, with a Posix error code available to the caller by
|
||||
* calling Tcl_GetErrno().
|
||||
*
|
||||
* Side effects:
|
||||
* The CHANNEL_BLOCKED and CHANNEL_EOF flags of the channel state are set
|
||||
* as appropriate. On EOF, the inputEncodingFlags are set to perform
|
||||
* ending operations on decoding.
|
||||
* The CHANNEL_ENCODING_ERROR, CHANNEL_BLOCKED and CHANNEL_EOF flags
|
||||
* of the channel state are set as appropriate. On EOF, the
|
||||
* inputEncodingFlags are set to perform ending operations on decoding.
|
||||
*
|
||||
* TODO - Is this really the right place for that?
|
||||
*
|
||||
@@ -431,7 +431,7 @@ ChanRead(
|
||||
ResetFlag(chanPtr->state, CHANNEL_BLOCKED | CHANNEL_EOF);
|
||||
chanPtr->state->inputEncodingFlags &= ~TCL_ENCODING_END;
|
||||
if (WillRead(chanPtr) < 0) {
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
bytesRead = chanPtr->typePtr->inputProc(chanPtr->instanceData,
|
||||
@@ -486,14 +486,14 @@ ChanSeek(
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
if (offset<LONG_MIN || offset>LONG_MAX) {
|
||||
*errnoPtr = EOVERFLOW;
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
return Tcl_ChannelSeekProc(chanPtr->typePtr)(chanPtr->instanceData,
|
||||
offset, mode, errnoPtr);
|
||||
#else
|
||||
*errnoPtr = EINVAL;
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1237,7 +1237,7 @@ Tcl_UnregisterChannel(
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"illegal recursive call to close through close-handler"
|
||||
" of channel", -1));
|
||||
" of channel", TCL_INDEX_NONE));
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -2720,7 +2720,7 @@ CheckForDeadChannel(
|
||||
Tcl_SetErrno(EINVAL);
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"unable to access channel: invalid channel", -1));
|
||||
"unable to access channel: invalid channel", TCL_INDEX_NONE));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -2918,7 +2918,7 @@ FlushChannel(
|
||||
if (interp != NULL && !TclChanCaughtErrorBypass(interp,
|
||||
(Tcl_Channel) chanPtr)) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3493,7 +3493,7 @@ Tcl_Close(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"illegal recursive call to close through close-handler"
|
||||
" of channel", -1));
|
||||
" of channel", TCL_INDEX_NONE));
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -3606,7 +3606,7 @@ Tcl_Close(
|
||||
Tcl_SetErrno(stickyError);
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -3624,7 +3624,7 @@ Tcl_Close(
|
||||
&& 0 == TclGetCharLength(Tcl_GetObjResult(interp))) {
|
||||
Tcl_SetErrno(result);
|
||||
Tcl_SetObjResult(interp,
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
|
||||
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
|
||||
}
|
||||
if (result != 0) {
|
||||
return TCL_ERROR;
|
||||
@@ -3696,7 +3696,7 @@ Tcl_CloseEx(
|
||||
|
||||
if (chanPtr != statePtr->topChanPtr) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"half-close not applicable to stack of transformations", -1));
|
||||
"half-close not applicable to stack of transformations", TCL_INDEX_NONE));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -3729,7 +3729,7 @@ Tcl_CloseEx(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"illegal recursive call to close through close-handler"
|
||||
" of channel", -1));
|
||||
" of channel", TCL_INDEX_NONE));
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -4111,7 +4111,7 @@ Tcl_Write(
|
||||
chanPtr = statePtr->topChanPtr;
|
||||
|
||||
if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) {
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
if (srcLen < 0) {
|
||||
@@ -4208,7 +4208,7 @@ Tcl_WriteChars(
|
||||
Tcl_Channel chan, /* The channel to buffer output for. */
|
||||
const char *src, /* UTF-8 characters to queue in output
|
||||
* buffer. */
|
||||
int len) /* Length of string in bytes, or < 0 for
|
||||
int len) /* Length of string in bytes, or TCL_INDEX_NONE for
|
||||
* strlen(). */
|
||||
{
|
||||
Channel *chanPtr = (Channel *) chan;
|
||||
@@ -4330,7 +4330,7 @@ WillRead(
|
||||
|
||||
DiscardInputQueued(chanPtr->state, 0);
|
||||
Tcl_SetErrno(EINVAL);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
if (((Tcl_ChannelWideSeekProc(chanPtr->typePtr) != NULL)
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
@@ -4348,7 +4348,7 @@ WillRead(
|
||||
*/
|
||||
|
||||
if (FlushChannel(NULL, chanPtr, 0) != 0) {
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -4365,7 +4365,7 @@ WillRead(
|
||||
* ready e.g. if it contains a newline and we are in line buffering mode.
|
||||
*
|
||||
* Results:
|
||||
* The number of bytes written or -1 in case of error. If -1,
|
||||
* The number of bytes written or TCL_INDEX_NONE in case of error. If TCL_INDEX_NONE,
|
||||
* Tcl_GetErrno will return the error code.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -4394,7 +4394,7 @@ Write(
|
||||
}
|
||||
|
||||
/*
|
||||
* Transfer encoding strict/nocomplain option to the encoding flags
|
||||
* Transfer encoding nocomplain/strict option to the encoding flags
|
||||
*/
|
||||
|
||||
if (GotFlag(statePtr, CHANNEL_ENCODING_STRICT)) {
|
||||
@@ -4466,7 +4466,7 @@ Write(
|
||||
* current output encoding and strict encoding is active.
|
||||
*/
|
||||
|
||||
if (result == TCL_CONVERT_UNKNOWN) {
|
||||
if (result == TCL_CONVERT_UNKNOWN || result == TCL_CONVERT_SYNTAX) {
|
||||
encodingError = 1;
|
||||
result = TCL_OK;
|
||||
}
|
||||
@@ -4546,7 +4546,7 @@ Write(
|
||||
|
||||
if (IsBufferFull(bufPtr)) {
|
||||
if (FlushChannel(NULL, chanPtr, 0) != 0) {
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
flushed += statePtr->bufSize;
|
||||
|
||||
@@ -4569,7 +4569,7 @@ Write(
|
||||
if (((flushed < total) && GotFlag(statePtr, CHANNEL_UNBUFFERED)) ||
|
||||
(needNlFlush && GotFlag(statePtr, CHANNEL_LINEBUFFERED))) {
|
||||
if (FlushChannel(NULL, chanPtr, 0) != 0) {
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4577,7 +4577,7 @@ Write(
|
||||
|
||||
if (encodingError) {
|
||||
Tcl_SetErrno(EILSEQ);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
return total;
|
||||
}
|
||||
@@ -4590,8 +4590,8 @@ Write(
|
||||
* Reads a complete line of input from the channel into a Tcl_DString.
|
||||
*
|
||||
* Results:
|
||||
* Length of line read (in characters) or -1 if error, EOF, or blocked.
|
||||
* If -1, use Tcl_GetErrno() to retrieve the POSIX error code for the
|
||||
* Length of line read (in characters) or TCL_INDEX_NONE if error, EOF, or blocked.
|
||||
* If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error code for the
|
||||
* error or condition that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -4631,8 +4631,8 @@ Tcl_Gets(
|
||||
* converted to UTF-8 using the encoding specified by the channel.
|
||||
*
|
||||
* Results:
|
||||
* Number of characters accumulated in the object or -1 if error,
|
||||
* blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
|
||||
* Number of characters accumulated in the object or TCL_INDEX_NONE if error,
|
||||
* blocked, or EOF. If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error
|
||||
* code for the error or condition that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -4655,11 +4655,18 @@ Tcl_GetsObj(
|
||||
ChannelState *statePtr = chanPtr->state;
|
||||
/* State info for channel */
|
||||
ChannelBuffer *bufPtr;
|
||||
int inEofChar, skip, copiedTotal, oldLength, oldFlags, oldRemoved;
|
||||
int inEofChar, skip, copiedTotal, oldFlags, oldRemoved;
|
||||
int oldLength;
|
||||
Tcl_Encoding encoding;
|
||||
char *dst, *dstEnd, *eol, *eof;
|
||||
Tcl_EncodingState oldState;
|
||||
|
||||
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
|
||||
UpdateInterest(chanPtr);
|
||||
Tcl_SetErrno(EILSEQ);
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
if (CheckChannelErrors(statePtr, TCL_READABLE) != 0) {
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
@@ -5030,6 +5037,7 @@ Tcl_GetsObj(
|
||||
done:
|
||||
assert(!GotFlag(statePtr, CHANNEL_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|
||||
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
|
||||
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
|
||||
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
|
||||
@@ -5063,8 +5071,8 @@ Tcl_GetsObj(
|
||||
* may be called when an -eofchar is set on the channel.
|
||||
*
|
||||
* Results:
|
||||
* Number of characters accumulated in the object or -1 if error,
|
||||
* blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
|
||||
* Number of characters accumulated in the object or TCL_INDEX_NONE if error,
|
||||
* blocked, or EOF. If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error
|
||||
* code for the error or condition that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -5212,12 +5220,12 @@ TclGetsObjBinary(
|
||||
if ((dst == dstEnd) && (byteLen == oldLength)) {
|
||||
/*
|
||||
* If we didn't append any bytes before encountering EOF,
|
||||
* caller needs to see -1.
|
||||
* caller needs to see TCL_INDEX_NONE.
|
||||
*/
|
||||
|
||||
byteArray = Tcl_SetByteArrayLength(objPtr, oldLength);
|
||||
CommonGetsCleanup(chanPtr);
|
||||
copiedTotal = -1;
|
||||
copiedTotal = TCL_INDEX_NONE;
|
||||
ResetFlag(statePtr, CHANNEL_BLOCKED);
|
||||
goto done;
|
||||
}
|
||||
@@ -5306,7 +5314,7 @@ TclGetsObjBinary(
|
||||
*/
|
||||
|
||||
SetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
|
||||
copiedTotal = -1;
|
||||
copiedTotal = TCL_INDEX_NONE;
|
||||
|
||||
/*
|
||||
* Update the notifier state so we don't block while there is still data
|
||||
@@ -5516,6 +5524,11 @@ FilterInputBytes(
|
||||
&statePtr->inputEncodingState, dst, spaceLeft, &gsPtr->rawRead,
|
||||
&gsPtr->bytesWrote, &gsPtr->charsWrote);
|
||||
|
||||
if (result == TCL_CONVERT_UNKNOWN || result == TCL_CONVERT_SYNTAX) {
|
||||
SetFlag(statePtr, CHANNEL_ENCODING_ERROR);
|
||||
result = TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure that if we go through 'gets', that we reset the
|
||||
* TCL_ENCODING_START flag still. [Bug #523988]
|
||||
@@ -5735,7 +5748,7 @@ CommonGetsCleanup(
|
||||
* No encoding conversions are applied to the bytes being read.
|
||||
*
|
||||
* Results:
|
||||
* The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
|
||||
* The number of bytes read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
|
||||
* retrieve the error code for the error that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -5780,7 +5793,7 @@ Tcl_Read(
|
||||
* No encoding conversions are applied to the bytes being read.
|
||||
*
|
||||
* Results:
|
||||
* The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
|
||||
* The number of bytes read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
|
||||
* retrieve the error code for the error that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -5868,7 +5881,7 @@ Tcl_ReadRaw(
|
||||
*/
|
||||
|
||||
if (!GotFlag(statePtr, CHANNEL_BLOCKED) || copied == 0) {
|
||||
copied = -1;
|
||||
copied = TCL_INDEX_NONE;
|
||||
}
|
||||
} else if (nread > 0) {
|
||||
/*
|
||||
@@ -5898,7 +5911,7 @@ Tcl_ReadRaw(
|
||||
* object.
|
||||
*
|
||||
* Results:
|
||||
* The number of characters read, or -1 on error. Use Tcl_GetErrno() to
|
||||
* The number of characters read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
|
||||
* retrieve the error code for the error that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -5912,7 +5925,7 @@ Tcl_ReadChars(
|
||||
Tcl_Channel chan, /* The channel to read. */
|
||||
Tcl_Obj *objPtr, /* Input data is stored in this object. */
|
||||
int toRead, /* Maximum number of characters to store, or
|
||||
* -1 to read all available data (up to EOF or
|
||||
* TCL_INDEX_NONE to read all available data (up to EOF or
|
||||
* when channel blocks). */
|
||||
int appendFlag) /* If non-zero, data read from the channel
|
||||
* will be appended to the object. Otherwise,
|
||||
@@ -5936,7 +5949,7 @@ Tcl_ReadChars(
|
||||
*/
|
||||
|
||||
UpdateInterest(chanPtr);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
return DoReadChars(chanPtr, objPtr, toRead, appendFlag);
|
||||
@@ -5954,7 +5967,7 @@ Tcl_ReadChars(
|
||||
* object.
|
||||
*
|
||||
* Results:
|
||||
* The number of characters read, or -1 on error. Use Tcl_GetErrno() to
|
||||
* The number of characters read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
|
||||
* retrieve the error code for the error that occurred.
|
||||
*
|
||||
* Side effects:
|
||||
@@ -5968,7 +5981,7 @@ DoReadChars(
|
||||
Channel *chanPtr, /* The channel to read. */
|
||||
Tcl_Obj *objPtr, /* Input data is stored in this object. */
|
||||
int toRead, /* Maximum number of characters to store, or
|
||||
* -1 to read all available data (up to EOF or
|
||||
* TCL_INDEX_NONE to read all available data (up to EOF or
|
||||
* when channel blocks). */
|
||||
int appendFlag) /* If non-zero, data read from the channel
|
||||
* will be appended to the object. Otherwise,
|
||||
@@ -6010,6 +6023,12 @@ DoReadChars(
|
||||
}
|
||||
}
|
||||
|
||||
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
|
||||
/* TODO: We don't need this call? */
|
||||
UpdateInterest(chanPtr);
|
||||
Tcl_SetErrno(EILSEQ);
|
||||
return -1;
|
||||
}
|
||||
/*
|
||||
* Early out when next read will see eofchar.
|
||||
*
|
||||
@@ -6058,7 +6077,7 @@ DoReadChars(
|
||||
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
|
||||
statePtr->inputEncodingFlags &= ~TCL_ENCODING_END;
|
||||
for (copied = 0; (unsigned) toRead > 0; ) {
|
||||
copiedNow = -1;
|
||||
copiedNow = TCL_INDEX_NONE;
|
||||
if (statePtr->inQueueHead != NULL) {
|
||||
if (binaryMode) {
|
||||
copiedNow = ReadBytes(statePtr, objPtr, toRead);
|
||||
@@ -6098,7 +6117,7 @@ DoReadChars(
|
||||
}
|
||||
if (result != 0) {
|
||||
if (!GotFlag(statePtr, CHANNEL_BLOCKED)) {
|
||||
copied = -1;
|
||||
copied = TCL_INDEX_NONE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -6136,6 +6155,7 @@ DoReadChars(
|
||||
|
||||
assert(!GotFlag(statePtr, CHANNEL_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|
||||
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
|
||||
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
|
||||
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
|
||||
@@ -6159,7 +6179,7 @@ DoReadChars(
|
||||
*
|
||||
* Results:
|
||||
* The return value is the number of bytes appended to the object, or
|
||||
* -1 to indicate that zero bytes were read due to an EOF.
|
||||
* TCL_INDEX_NONE to indicate that zero bytes were read due to an EOF.
|
||||
*
|
||||
* Side effects:
|
||||
* The storage of bytes in objPtr can cause (re-)allocation of memory.
|
||||
@@ -6228,7 +6248,7 @@ ReadChars(
|
||||
* allocated to hold data, not how many bytes
|
||||
* of data have been stored in the object. */
|
||||
int charsToRead, /* Maximum number of characters to store, or
|
||||
* -1 to get all available characters.
|
||||
* TCL_INDEX_NONE to get all available characters.
|
||||
* Characters are obtained from the first
|
||||
* buffer in the queue -- even if this number
|
||||
* is larger than the number of characters
|
||||
@@ -6344,6 +6364,11 @@ ReadChars(
|
||||
flags, &statePtr->inputEncodingState,
|
||||
dst, dstLimit, &srcRead, &dstDecoded, &numChars);
|
||||
|
||||
if (code == TCL_CONVERT_UNKNOWN || code == TCL_CONVERT_SYNTAX) {
|
||||
SetFlag(statePtr, CHANNEL_ENCODING_ERROR);
|
||||
code = TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the translation transformation in place. Read no more than
|
||||
* the dstDecoded bytes the encoding transformation actually produced.
|
||||
@@ -6371,12 +6396,12 @@ ReadChars(
|
||||
* the stopping, but the value of dstRead does not include it.
|
||||
*
|
||||
* Also rather bizarre, our caller can only notice an EOF
|
||||
* condition if we return the value -1 as the number of chars
|
||||
* condition if we return the value TCL_INDEX_NONE as the number of chars
|
||||
* read. This forces us to perform a 2-call dance where the
|
||||
* first call can read all the chars up to the eof char, and
|
||||
* the second call is solely for consuming the encoded eof
|
||||
* char then pointed at by src so that we can return that
|
||||
* magic -1 value. This seems really wasteful, especially
|
||||
* magic TCL_INDEX_NONE value. This seems really wasteful, especially
|
||||
* since the first decoding pass of each call is likely to
|
||||
* decode many bytes beyond that eof char that's all we care
|
||||
* about.
|
||||
@@ -6391,7 +6416,7 @@ ReadChars(
|
||||
*/
|
||||
|
||||
Tcl_SetObjLength(objPtr, numBytes);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -6566,7 +6591,7 @@ ReadChars(
|
||||
SetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
|
||||
}
|
||||
Tcl_SetObjLength(objPtr, numBytes);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7563,7 +7588,7 @@ Tcl_Eof(
|
||||
ChannelState *statePtr = ((Channel *) chan)->state;
|
||||
/* State of real channel structure. */
|
||||
|
||||
return GotFlag(statePtr, CHANNEL_EOF) ? 1 : 0;
|
||||
return (GotFlag(statePtr, CHANNEL_EOF) && !GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -7837,17 +7862,17 @@ Tcl_BadChannelOption(
|
||||
{
|
||||
if (interp != NULL) {
|
||||
const char *genericopt =
|
||||
"blocking buffering buffersize encoding eofchar translation";
|
||||
"blocking buffering buffersize encoding eofchar nocomplainencoding strictencoding translation";
|
||||
const char **argv;
|
||||
int argc, i;
|
||||
Tcl_DString ds;
|
||||
Tcl_Obj *errObj;
|
||||
|
||||
Tcl_DStringInit(&ds);
|
||||
Tcl_DStringAppend(&ds, genericopt, -1);
|
||||
Tcl_DStringAppend(&ds, genericopt, TCL_INDEX_NONE);
|
||||
if (optionList && (*optionList)) {
|
||||
TclDStringAppendLiteral(&ds, " ");
|
||||
Tcl_DStringAppend(&ds, optionList, -1);
|
||||
Tcl_DStringAppend(&ds, optionList, TCL_INDEX_NONE);
|
||||
}
|
||||
if (Tcl_SplitList(interp, Tcl_DStringValue(&ds),
|
||||
&argc, &argv) != TCL_OK) {
|
||||
@@ -8156,7 +8181,7 @@ Tcl_SetChannelOption(
|
||||
/* State info for channel */
|
||||
size_t len; /* Length of optionName string. */
|
||||
int argc;
|
||||
const char **argv;
|
||||
const char **argv = NULL;
|
||||
|
||||
/*
|
||||
* If the channel is in the middle of a background copy, fail.
|
||||
@@ -8166,7 +8191,7 @@ Tcl_SetChannelOption(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"unable to set channel options: background copy in"
|
||||
" progress", -1));
|
||||
" progress", TCL_INDEX_NONE));
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -8217,7 +8242,7 @@ Tcl_SetChannelOption(
|
||||
} else if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -buffering: must be one of"
|
||||
" full, line, or none", -1));
|
||||
" full, line, or none", TCL_INDEX_NONE));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
return TCL_OK;
|
||||
@@ -8258,26 +8283,29 @@ Tcl_SetChannelOption(
|
||||
statePtr->inputEncodingFlags = TCL_ENCODING_START;
|
||||
statePtr->outputEncodingState = NULL;
|
||||
statePtr->outputEncodingFlags = TCL_ENCODING_START;
|
||||
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
|
||||
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
|
||||
UpdateInterest(chanPtr);
|
||||
return TCL_OK;
|
||||
} else if (HaveOpt(2, "-eofchar")) {
|
||||
if (Tcl_SplitList(interp, newValue, &argc, &argv) == TCL_ERROR) {
|
||||
if (!newValue[0] || (!(newValue[0] & 0x80) && !newValue[1])) {
|
||||
if (GotFlag(statePtr, TCL_READABLE)) {
|
||||
statePtr->inEofChar = newValue[0];
|
||||
}
|
||||
statePtr->outEofChar = 0;
|
||||
} else if (Tcl_SplitList(interp, newValue, &argc, &argv) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (argc == 0) {
|
||||
} else if (argc == 0) {
|
||||
statePtr->inEofChar = 0;
|
||||
statePtr->outEofChar = 0;
|
||||
} else if (argc == 1 || argc == 2) {
|
||||
int outIndex = (argc - 1);
|
||||
int inValue = (int) argv[0][0];
|
||||
int outValue = (int) argv[outIndex][0];
|
||||
int outValue = (argc == 2) ? (int) argv[1][0] : 0;
|
||||
|
||||
if (inValue & 0x80 || outValue & 0x80) {
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -eofchar: must be non-NUL ASCII"
|
||||
" character", -1));
|
||||
" character", TCL_INDEX_NONE));
|
||||
}
|
||||
ckfree(argv);
|
||||
return TCL_ERROR;
|
||||
@@ -8292,7 +8320,7 @@ Tcl_SetChannelOption(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -eofchar: should be a list of zero,"
|
||||
" one, or two elements", -1));
|
||||
" one, or two elements", TCL_INDEX_NONE));
|
||||
}
|
||||
ckfree(argv);
|
||||
return TCL_ERROR;
|
||||
@@ -8336,6 +8364,7 @@ Tcl_SetChannelOption(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
|
||||
return TCL_OK;
|
||||
} else if (HaveOpt(1, "-strictencoding")) {
|
||||
int newMode;
|
||||
@@ -8349,6 +8378,7 @@ Tcl_SetChannelOption(
|
||||
} else {
|
||||
ResetFlag(statePtr, CHANNEL_ENCODING_STRICT);
|
||||
}
|
||||
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
|
||||
return TCL_OK;
|
||||
} else if (HaveOpt(1, "-translation")) {
|
||||
const char *readMode, *writeMode;
|
||||
@@ -8367,7 +8397,7 @@ Tcl_SetChannelOption(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -translation: must be a one or two"
|
||||
" element list", -1));
|
||||
" element list", TCL_INDEX_NONE));
|
||||
}
|
||||
ckfree(argv);
|
||||
return TCL_ERROR;
|
||||
@@ -8397,7 +8427,7 @@ Tcl_SetChannelOption(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -translation: must be one of "
|
||||
"auto, binary, cr, lf, crlf, or platform", -1));
|
||||
"auto, binary, cr, lf, crlf, or platform", TCL_INDEX_NONE));
|
||||
}
|
||||
ckfree(argv);
|
||||
return TCL_ERROR;
|
||||
@@ -8447,7 +8477,7 @@ Tcl_SetChannelOption(
|
||||
if (interp) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"bad value for -translation: must be one of "
|
||||
"auto, binary, cr, lf, crlf, or platform", -1));
|
||||
"auto, binary, cr, lf, crlf, or platform", TCL_INDEX_NONE));
|
||||
}
|
||||
ckfree(argv);
|
||||
return TCL_ERROR;
|
||||
@@ -9442,7 +9472,9 @@ TclCopyChannel(
|
||||
moveBytes = inStatePtr->inEofChar == '\0' /* No eofChar to stop input */
|
||||
&& inStatePtr->inputTranslation == TCL_TRANSLATE_LF
|
||||
&& outStatePtr->outputTranslation == TCL_TRANSLATE_LF
|
||||
&& inStatePtr->encoding == outStatePtr->encoding;
|
||||
&& inStatePtr->encoding == outStatePtr->encoding
|
||||
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
|
||||
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
|
||||
|
||||
/*
|
||||
* Allocate a new CopyState to maintain info about the current copy in
|
||||
@@ -9769,7 +9801,9 @@ CopyData(
|
||||
|
||||
inBinary = (inStatePtr->encoding == NULL);
|
||||
outBinary = (outStatePtr->encoding == NULL);
|
||||
sameEncoding = (inStatePtr->encoding == outStatePtr->encoding);
|
||||
sameEncoding = inStatePtr->encoding == outStatePtr->encoding
|
||||
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
|
||||
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
|
||||
|
||||
if (!(inBinary || sameEncoding)) {
|
||||
TclNewObj(bufObj);
|
||||
@@ -10052,7 +10086,7 @@ CopyData(
|
||||
*
|
||||
* Results:
|
||||
* The number of bytes actually stored (<= bytesToRead),
|
||||
* or -1 if there is an error in reading the channel. Use
|
||||
* or TCL_INDEX_NONE if there is an error in reading the channel. Use
|
||||
* Tcl_GetErrno() to retrieve the error code for the error
|
||||
* that occurred.
|
||||
*
|
||||
@@ -10061,7 +10095,7 @@ CopyData(
|
||||
* - EOF is reached on the channel; or
|
||||
* - the channel is non-blocking, and we've read all we can
|
||||
* without blocking.
|
||||
* - a channel reading error occurs (and we return -1)
|
||||
* - a channel reading error occurs (and we return TCL_INDEX_NONE)
|
||||
*
|
||||
* Side effects:
|
||||
* May cause input to be buffered.
|
||||
@@ -10093,6 +10127,11 @@ DoRead(
|
||||
* too. Keep on keeping on for now.
|
||||
*/
|
||||
|
||||
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
|
||||
UpdateInterest(chanPtr);
|
||||
Tcl_SetErrno(EILSEQ);
|
||||
return -1;
|
||||
}
|
||||
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
|
||||
SetFlag(statePtr, CHANNEL_EOF);
|
||||
assert(statePtr->inputEncodingFlags & TCL_ENCODING_END);
|
||||
@@ -10160,7 +10199,7 @@ DoRead(
|
||||
|
||||
UpdateInterest(chanPtr);
|
||||
TclChannelRelease((Tcl_Channel)chanPtr);
|
||||
return -1;
|
||||
return TCL_INDEX_NONE;
|
||||
}
|
||||
|
||||
assert(IsBufferFull(bufPtr));
|
||||
@@ -10190,10 +10229,10 @@ DoRead(
|
||||
}
|
||||
|
||||
/*
|
||||
* 1) We're @EOF because we saw eof char.
|
||||
* 1) We're @EOF because we saw eof char, or there was an encoding error.
|
||||
*/
|
||||
|
||||
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
|
||||
if (GotFlag(statePtr, CHANNEL_STICKY_EOF|CHANNEL_ENCODING_ERROR)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -10278,6 +10317,7 @@ DoRead(
|
||||
|
||||
assert(!GotFlag(statePtr, CHANNEL_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|
||||
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|
||||
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
|
||||
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
|
||||
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
|
||||
@@ -10568,7 +10608,7 @@ Tcl_GetChannelNamesEx(
|
||||
&& (pattern[2] == 'd'))) {
|
||||
if ((Tcl_FindHashEntry(hTblPtr, pattern) != NULL)
|
||||
&& (Tcl_ListObjAppendElement(interp, resultPtr,
|
||||
Tcl_NewStringObj(pattern, -1)) != TCL_OK)) {
|
||||
Tcl_NewStringObj(pattern, TCL_INDEX_NONE)) != TCL_OK)) {
|
||||
goto error;
|
||||
}
|
||||
goto done;
|
||||
@@ -10595,7 +10635,7 @@ Tcl_GetChannelNamesEx(
|
||||
|
||||
if (((pattern == NULL) || Tcl_StringMatch(name, pattern)) &&
|
||||
(Tcl_ListObjAppendElement(interp, resultPtr,
|
||||
Tcl_NewStringObj(name, -1)) != TCL_OK)) {
|
||||
Tcl_NewStringObj(name, TCL_INDEX_NONE)) != TCL_OK)) {
|
||||
error:
|
||||
TclDecrRefCount(resultPtr);
|
||||
return TCL_ERROR;
|
||||
@@ -11551,8 +11591,8 @@ DumpFlags(
|
||||
char *str,
|
||||
int flags)
|
||||
{
|
||||
char buf[20];
|
||||
int i = 0;
|
||||
char buf[24];
|
||||
|
||||
#define ChanFlag(chr, bit) (buf[i++] = ((flags & (bit)) ? (chr) : '_'))
|
||||
|
||||
@@ -11565,6 +11605,7 @@ DumpFlags(
|
||||
ChanFlag('c', CHANNEL_CLOSED);
|
||||
ChanFlag('E', CHANNEL_EOF);
|
||||
ChanFlag('S', CHANNEL_STICKY_EOF);
|
||||
ChanFlag('U', CHANNEL_ENCODING_ERROR);
|
||||
ChanFlag('B', CHANNEL_BLOCKED);
|
||||
ChanFlag('/', INPUT_SAW_CR);
|
||||
ChanFlag('D', CHANNEL_DEAD);
|
||||
|
||||
+11
-8
@@ -36,12 +36,12 @@
|
||||
*/
|
||||
|
||||
typedef struct ChannelBuffer {
|
||||
int refCount; /* Current uses count */
|
||||
int nextAdded; /* The next position into which a character
|
||||
Tcl_Size refCount; /* Current uses count */
|
||||
Tcl_Size nextAdded; /* The next position into which a character
|
||||
* will be put in the buffer. */
|
||||
int nextRemoved; /* Position of next byte to be removed from
|
||||
Tcl_Size nextRemoved; /* Position of next byte to be removed from
|
||||
* the buffer. */
|
||||
int bufLength; /* How big is the buffer? */
|
||||
Tcl_Size bufLength; /* How big is the buffer? */
|
||||
struct ChannelBuffer *nextPtr;
|
||||
/* Next buffer in chain. */
|
||||
char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real
|
||||
@@ -113,7 +113,7 @@ typedef struct Channel {
|
||||
ChannelBuffer *inQueueHead; /* Points at first buffer in input queue. */
|
||||
ChannelBuffer *inQueueTail; /* Points at last buffer in input queue. */
|
||||
|
||||
int refCount;
|
||||
Tcl_Size refCount;
|
||||
} Channel;
|
||||
|
||||
/*
|
||||
@@ -163,7 +163,7 @@ typedef struct ChannelState {
|
||||
int unreportedError; /* Non-zero if an error report was deferred
|
||||
* because it happened in the background. The
|
||||
* value is the POSIX error code. */
|
||||
int refCount; /* How many interpreters hold references to
|
||||
Tcl_Size refCount; /* How many interpreters hold references to
|
||||
* this IO channel? */
|
||||
struct CloseCallback *closeCbPtr;
|
||||
/* Callbacks registered to be called when the
|
||||
@@ -186,7 +186,7 @@ typedef struct ChannelState {
|
||||
EventScriptRecord *scriptRecordPtr;
|
||||
/* Chain of all scripts registered for event
|
||||
* handlers ("fileevent") on this channel. */
|
||||
int bufSize; /* What size buffers to allocate? */
|
||||
Tcl_Size bufSize; /* What size buffers to allocate? */
|
||||
Tcl_TimerToken timer; /* Handle to wakeup timer for this channel. */
|
||||
struct CopyState *csPtrR; /* State of background copy for which channel
|
||||
* is input, or NULL. */
|
||||
@@ -271,10 +271,12 @@ typedef struct ChannelState {
|
||||
* delivered for buffered data until
|
||||
* the state of the channel
|
||||
* changes. */
|
||||
#define CHANNEL_ENCODING_ERROR (1<<15) /* set if channel
|
||||
* encountered an encoding error */
|
||||
#define CHANNEL_RAW_MODE (1<<16) /* When set, notes that the Raw API is
|
||||
* being used. */
|
||||
#define CHANNEL_ENCODING_NOCOMPLAIN (1<<17) /* set if option
|
||||
* -nocomplaincoding is set to 1 */
|
||||
* -nocomplainencoding is set to 1 */
|
||||
#define CHANNEL_ENCODING_STRICT (1<<18) /* set if option
|
||||
* -strictencoding is set to 1 */
|
||||
#define CHANNEL_INCLOSE (1<<19) /* Channel is currently being closed.
|
||||
@@ -282,6 +284,7 @@ typedef struct ChannelState {
|
||||
* usable, but it may not be closed
|
||||
* again from within the close
|
||||
* handler. */
|
||||
#define ENCODING_FAILINDEX (1<<20) /* Internal flag, fail on Invalid bytes only */
|
||||
#define CHANNEL_CLOSEDWRITE (1<<21) /* Channel write side has been closed.
|
||||
* No further Tcl-level write IO on
|
||||
* the channel is allowed. */
|
||||
|
||||
+53
-43
@@ -15,7 +15,7 @@
|
||||
* Callback structure for accept callback in a TCP server.
|
||||
*/
|
||||
|
||||
typedef struct AcceptCallback {
|
||||
typedef struct {
|
||||
Tcl_Obj *script; /* Script to invoke. */
|
||||
Tcl_Interp *interp; /* Interpreter in which to run it. */
|
||||
} AcceptCallback;
|
||||
@@ -44,7 +44,7 @@ static void RegisterTcpServerInterpCleanup(
|
||||
Tcl_Interp *interp,
|
||||
AcceptCallback *acceptCallbackPtr);
|
||||
static Tcl_InterpDeleteProc TcpAcceptCallbacksDeleteProc;
|
||||
static void TcpServerCloseProc(ClientData callbackData);
|
||||
static void TcpServerCloseProc(void *callbackData);
|
||||
static void UnregisterTcpServerInterpCleanupProc(
|
||||
Tcl_Interp *interp,
|
||||
AcceptCallback *acceptCallbackPtr);
|
||||
@@ -67,7 +67,7 @@ static void UnregisterTcpServerInterpCleanupProc(
|
||||
|
||||
static void
|
||||
FinalizeIOCmdTSD(
|
||||
TCL_UNUSED(ClientData))
|
||||
TCL_UNUSED(void *))
|
||||
{
|
||||
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
|
||||
|
||||
@@ -97,7 +97,7 @@ FinalizeIOCmdTSD(
|
||||
|
||||
int
|
||||
Tcl_PutsObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -223,7 +223,7 @@ Tcl_PutsObjCmd(
|
||||
|
||||
int
|
||||
Tcl_FlushObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -287,7 +287,7 @@ Tcl_FlushObjCmd(
|
||||
|
||||
int
|
||||
Tcl_GetsObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -335,7 +335,7 @@ Tcl_GetsObjCmd(
|
||||
code = TCL_ERROR;
|
||||
goto done;
|
||||
}
|
||||
lineLen = -1;
|
||||
lineLen = TCL_INDEX_NONE;
|
||||
}
|
||||
if (objc == 3) {
|
||||
if (Tcl_ObjSetVar2(interp, objv[2], NULL, linePtr,
|
||||
@@ -371,7 +371,7 @@ Tcl_GetsObjCmd(
|
||||
|
||||
int
|
||||
Tcl_ReadObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -514,7 +514,7 @@ Tcl_ReadObjCmd(
|
||||
|
||||
int
|
||||
Tcl_SeekObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -589,7 +589,7 @@ Tcl_SeekObjCmd(
|
||||
|
||||
int
|
||||
Tcl_TellObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -651,7 +651,7 @@ Tcl_TellObjCmd(
|
||||
|
||||
int
|
||||
Tcl_CloseObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -759,7 +759,7 @@ Tcl_CloseObjCmd(
|
||||
|
||||
int
|
||||
Tcl_FconfigureObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -834,7 +834,7 @@ Tcl_FconfigureObjCmd(
|
||||
|
||||
int
|
||||
Tcl_EofObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -873,7 +873,7 @@ Tcl_EofObjCmd(
|
||||
|
||||
int
|
||||
Tcl_ExecObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -883,8 +883,8 @@ Tcl_ExecObjCmd(
|
||||
* on the _Tcl_ stack. */
|
||||
const char *string;
|
||||
Tcl_Channel chan;
|
||||
int argc, background, i, index, keepNewline, result, skip, length;
|
||||
int ignoreStderr;
|
||||
int argc, background, i, index, keepNewline, result, skip, ignoreStderr;
|
||||
int length;
|
||||
static const char *const options[] = {
|
||||
"-ignorestderr", "-keepnewline", "--", NULL
|
||||
};
|
||||
@@ -1040,7 +1040,7 @@ Tcl_ExecObjCmd(
|
||||
|
||||
int
|
||||
Tcl_FblockedObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1086,7 +1086,7 @@ Tcl_FblockedObjCmd(
|
||||
|
||||
int
|
||||
Tcl_OpenObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1144,7 +1144,8 @@ Tcl_OpenObjCmd(
|
||||
if (!pipeline) {
|
||||
chan = Tcl_FSOpenFileChannel(interp, objv[1], modeString, prot);
|
||||
} else {
|
||||
int mode, seekFlag, cmdObjc, binary;
|
||||
int mode, seekFlag, binary;
|
||||
int cmdObjc;
|
||||
const char **cmdArgv;
|
||||
|
||||
if (Tcl_SplitList(interp, what+1, &cmdObjc, &cmdArgv) != TCL_OK) {
|
||||
@@ -1209,7 +1210,7 @@ Tcl_OpenObjCmd(
|
||||
|
||||
static void
|
||||
TcpAcceptCallbacksDeleteProc(
|
||||
ClientData clientData, /* Data which was passed when the assocdata
|
||||
void *clientData, /* Data which was passed when the assocdata
|
||||
* was registered. */
|
||||
TCL_UNUSED(Tcl_Interp *))
|
||||
{
|
||||
@@ -1337,7 +1338,7 @@ UnregisterTcpServerInterpCleanupProc(
|
||||
|
||||
static void
|
||||
AcceptCallbackProc(
|
||||
ClientData callbackData, /* The data stored when the callback was
|
||||
void *callbackData, /* The data stored when the callback was
|
||||
* created in the call to
|
||||
* Tcl_OpenTcpServer. */
|
||||
Tcl_Channel chan, /* Channel for the newly accepted
|
||||
@@ -1428,7 +1429,7 @@ AcceptCallbackProc(
|
||||
|
||||
static void
|
||||
TcpServerCloseProc(
|
||||
ClientData callbackData) /* The data passed in the call to
|
||||
void *callbackData) /* The data passed in the call to
|
||||
* Tcl_CreateCloseHandler. */
|
||||
{
|
||||
AcceptCallback *acceptCallbackPtr = (AcceptCallback *)callbackData;
|
||||
@@ -1461,29 +1462,27 @@ TcpServerCloseProc(
|
||||
|
||||
int
|
||||
Tcl_SocketObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
static const char *const socketOptions[] = {
|
||||
"-async", "-myaddr", "-myport", "-reuseaddr", "-reuseport", "-server",
|
||||
NULL
|
||||
"-async", "-backlog", "-myaddr", "-myport", "-reuseaddr",
|
||||
"-reuseport", "-server", NULL
|
||||
};
|
||||
enum socketOptionsEnum {
|
||||
SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR, SKT_REUSEPORT,
|
||||
SKT_SERVER
|
||||
SKT_ASYNC, SKT_BACKLOG, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR,
|
||||
SKT_REUSEPORT, SKT_SERVER
|
||||
};
|
||||
int optionIndex, a, server = 0, myport = 0, async = 0, reusep = -1,
|
||||
reusea = -1;
|
||||
reusea = -1, backlog = -1;
|
||||
unsigned int flags = 0;
|
||||
const char *host, *port, *myaddr = NULL;
|
||||
Tcl_Obj *script = NULL;
|
||||
Tcl_Channel chan;
|
||||
|
||||
if (TclpHasSockets(interp) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
TclInitSockets();
|
||||
|
||||
for (a = 1; a < objc; a++) {
|
||||
const char *arg = Tcl_GetString(objv[a]);
|
||||
@@ -1565,6 +1564,17 @@ Tcl_SocketObjCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
break;
|
||||
case SKT_BACKLOG:
|
||||
a++;
|
||||
if (a >= objc) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"no argument given for -backlog option", -1));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (Tcl_GetIntFromObj(interp, objv[a], &backlog) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Tcl_Panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
|
||||
}
|
||||
@@ -1585,18 +1595,18 @@ Tcl_SocketObjCmd(
|
||||
wrongNumArgs:
|
||||
iPtr = (Interp *) interp;
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"?-myaddr addr? ?-myport myport? ?-async? host port");
|
||||
"?-async? ?-myaddr addr? ?-myport myport? host port");
|
||||
iPtr->flags |= INTERP_ALTERNATE_WRONG_ARGS;
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"-server command ?-reuseaddr boolean? ?-reuseport boolean? "
|
||||
"?-myaddr addr? port");
|
||||
"-server command ?-backlog count? ?-myaddr addr? "
|
||||
"?-reuseaddr boolean? ?-reuseport boolean? port");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
if (!server && (reusea != -1 || reusep != -1)) {
|
||||
if (!server && (reusea != -1 || reusep != -1 || backlog != -1)) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"options -reuseaddr and -reuseport are only valid for servers",
|
||||
-1));
|
||||
"options -backlog, -reuseaddr, and -reuseport are only valid "
|
||||
"for servers", -1));
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -1641,7 +1651,7 @@ Tcl_SocketObjCmd(
|
||||
acceptCallbackPtr->script = script;
|
||||
acceptCallbackPtr->interp = interp;
|
||||
|
||||
chan = Tcl_OpenTcpServerEx(interp, port, host, flags,
|
||||
chan = Tcl_OpenTcpServerEx(interp, port, host, flags, backlog,
|
||||
AcceptCallbackProc, acceptCallbackPtr);
|
||||
if (chan == NULL) {
|
||||
Tcl_DecrRefCount(script);
|
||||
@@ -1703,7 +1713,7 @@ Tcl_SocketObjCmd(
|
||||
|
||||
int
|
||||
Tcl_FcopyObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1798,7 +1808,7 @@ Tcl_FcopyObjCmd(
|
||||
|
||||
static int
|
||||
ChanPendingObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1860,7 +1870,7 @@ ChanPendingObjCmd(
|
||||
|
||||
static int
|
||||
ChanTruncateObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1933,7 +1943,7 @@ ChanTruncateObjCmd(
|
||||
|
||||
static int
|
||||
ChanPipeObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -1984,7 +1994,7 @@ ChanPipeObjCmd(
|
||||
|
||||
int
|
||||
TclChannelNamesCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
|
||||
+2
-2
@@ -318,8 +318,8 @@ Tcl_OpenTcpServer(
|
||||
char portbuf[TCL_INTEGER_SPACE];
|
||||
|
||||
TclFormatInt(portbuf, port);
|
||||
return Tcl_OpenTcpServerEx(interp, portbuf, host, TCL_TCPSERVER_REUSEADDR,
|
||||
acceptProc, callbackData);
|
||||
return Tcl_OpenTcpServerEx(interp, portbuf, host, -1,
|
||||
TCL_TCPSERVER_REUSEADDR, acceptProc, callbackData);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -321,7 +321,7 @@ declare 131 {
|
||||
Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc,
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc)
|
||||
}
|
||||
declare 132 {
|
||||
declare 132 {deprecated {}} {
|
||||
int TclpHasSockets(Tcl_Interp *interp)
|
||||
}
|
||||
declare 133 {deprecated {}} {
|
||||
@@ -701,7 +701,7 @@ declare 258 {
|
||||
|
||||
# TIP 625: for unit testing - create list objects with span
|
||||
declare 260 {
|
||||
Tcl_Obj *TclListTestObj(int length, int leadingSpace, int endSpace)
|
||||
Tcl_Obj *TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace)
|
||||
}
|
||||
|
||||
# TIP 625: for unit testing - check list invariants
|
||||
|
||||
+116
-86
@@ -184,7 +184,7 @@ typedef struct Tcl_ResolvedVarInfo {
|
||||
} Tcl_ResolvedVarInfo;
|
||||
|
||||
typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp,
|
||||
const char *name, int length, Tcl_Namespace *context,
|
||||
const char *name, Tcl_Size length, Tcl_Namespace *context,
|
||||
Tcl_ResolvedVarInfo **rPtr);
|
||||
|
||||
typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name,
|
||||
@@ -290,15 +290,15 @@ typedef struct Namespace {
|
||||
* NULL, there are no children. */
|
||||
#endif
|
||||
unsigned long nsId; /* Unique id for the namespace. */
|
||||
Tcl_Interp *interp; /* The interpreter containing this
|
||||
Tcl_Interp *interp; /* The interpreter containing this
|
||||
* namespace. */
|
||||
int flags; /* OR-ed combination of the namespace status
|
||||
* flags NS_DYING and NS_DEAD listed below. */
|
||||
int activationCount; /* Number of "activations" or active call
|
||||
Tcl_Size activationCount; /* Number of "activations" or active call
|
||||
* frames for this namespace that are on the
|
||||
* Tcl call stack. The namespace won't be
|
||||
* freed until activationCount becomes zero. */
|
||||
int refCount; /* Count of references by namespaceName
|
||||
Tcl_Size refCount; /* Count of references by namespaceName
|
||||
* objects. The namespace can't be freed until
|
||||
* refCount becomes zero. */
|
||||
Tcl_HashTable cmdTable; /* Contains all the commands currently
|
||||
@@ -319,16 +319,16 @@ typedef struct Namespace {
|
||||
* commands; however, no namespace qualifiers
|
||||
* are allowed. NULL if no export patterns are
|
||||
* registered. */
|
||||
int numExportPatterns; /* Number of export patterns currently
|
||||
Tcl_Size numExportPatterns; /* Number of export patterns currently
|
||||
* registered using "namespace export". */
|
||||
int maxExportPatterns; /* Mumber of export patterns for which space
|
||||
Tcl_Size maxExportPatterns; /* Number of export patterns for which space
|
||||
* is currently allocated. */
|
||||
int cmdRefEpoch; /* Incremented if a newly added command
|
||||
Tcl_Size cmdRefEpoch; /* Incremented if a newly added command
|
||||
* shadows a command for which this namespace
|
||||
* has already cached a Command* pointer; this
|
||||
* causes all its cached Command* pointers to
|
||||
* be invalidated. */
|
||||
int resolverEpoch; /* Incremented whenever (a) the name
|
||||
Tcl_Size resolverEpoch; /* Incremented whenever (a) the name
|
||||
* resolution rules change for this namespace
|
||||
* or (b) a newly added command shadows a
|
||||
* command that is compiled to bytecodes. This
|
||||
@@ -355,7 +355,7 @@ typedef struct Namespace {
|
||||
* LookupCompiledLocal to resolve variable
|
||||
* references within the namespace at compile
|
||||
* time. */
|
||||
int exportLookupEpoch; /* Incremented whenever a command is added to
|
||||
Tcl_Size exportLookupEpoch; /* Incremented whenever a command is added to
|
||||
* a namespace, removed from a namespace or
|
||||
* the exports of a namespace are changed.
|
||||
* Allows TIP#112-driven command lists to be
|
||||
@@ -366,7 +366,7 @@ typedef struct Namespace {
|
||||
Tcl_Obj *unknownHandlerPtr; /* A script fragment to be used when command
|
||||
* resolution in this namespace fails. TIP
|
||||
* 181. */
|
||||
int commandPathLength; /* The length of the explicit path. */
|
||||
Tcl_Size commandPathLength; /* The length of the explicit path. */
|
||||
NamespacePathEntry *commandPathArray;
|
||||
/* The explicit path of the namespace as an
|
||||
* array. */
|
||||
@@ -455,7 +455,7 @@ typedef struct EnsembleConfig {
|
||||
* if the command has been deleted (or never
|
||||
* existed; the global namespace never has an
|
||||
* ensemble command.) */
|
||||
int epoch; /* The epoch at which this ensemble's table of
|
||||
Tcl_Size epoch; /* The epoch at which this ensemble's table of
|
||||
* exported commands is valid. */
|
||||
char **subcommandArrayPtr; /* Array of ensemble subcommand names. At all
|
||||
* consistent points, this will have the same
|
||||
@@ -512,7 +512,7 @@ typedef struct EnsembleConfig {
|
||||
* core, presumably because the ensemble
|
||||
* itself has been updated. */
|
||||
Tcl_Obj *parameterList; /* List of ensemble parameter names. */
|
||||
int numParameters; /* Cached number of parameters. This is either
|
||||
Tcl_Size numParameters; /* Cached number of parameters. This is either
|
||||
* 0 (if the parameterList field is NULL) or
|
||||
* the length of the list in the parameterList
|
||||
* field. */
|
||||
@@ -568,7 +568,7 @@ typedef struct CommandTrace {
|
||||
struct CommandTrace *nextPtr;
|
||||
/* Next in list of traces associated with a
|
||||
* particular command. */
|
||||
int refCount; /* Used to ensure this structure is not
|
||||
Tcl_Size refCount; /* Used to ensure this structure is not
|
||||
* deleted too early. Keeps track of how many
|
||||
* pieces of code have a pointer to this
|
||||
* structure. */
|
||||
@@ -641,7 +641,7 @@ typedef struct Var {
|
||||
|
||||
typedef struct VarInHash {
|
||||
Var var;
|
||||
int refCount; /* Counts number of active uses of this
|
||||
Tcl_Size refCount; /* Counts number of active uses of this
|
||||
* variable: 1 for the entry in the hash
|
||||
* table, 1 for each additional variable whose
|
||||
* linkPtr points here, 1 for each nested
|
||||
@@ -946,9 +946,9 @@ typedef struct CompiledLocal {
|
||||
/* Next compiler-recognized local variable for
|
||||
* this procedure, or NULL if this is the last
|
||||
* local. */
|
||||
int nameLength; /* The number of bytes in local variable's name.
|
||||
Tcl_Size 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
|
||||
Tcl_Size frameIndex; /* Index in the array of compiler-assigned
|
||||
* variables in the procedure call frame. */
|
||||
int flags; /* Flag bits for the local variable. Same as
|
||||
* the flags for the Var structure above,
|
||||
@@ -980,7 +980,7 @@ typedef struct CompiledLocal {
|
||||
typedef struct Proc {
|
||||
struct Interp *iPtr; /* Interpreter for which this command is
|
||||
* defined. */
|
||||
int refCount; /* Reference count: 1 if still present in
|
||||
Tcl_Size refCount; /* Reference count: 1 if still present in
|
||||
* command table plus 1 for each call to the
|
||||
* procedure that is currently active. This
|
||||
* structure can be freed when refCount
|
||||
@@ -991,8 +991,8 @@ typedef struct Proc {
|
||||
* procedure. */
|
||||
Tcl_Obj *bodyPtr; /* Points to the ByteCode object for
|
||||
* procedure's body command. */
|
||||
int numArgs; /* Number of formal parameters. */
|
||||
int numCompiledLocals; /* Count of local variables recognized by the
|
||||
Tcl_Size numArgs; /* Number of formal parameters. */
|
||||
Tcl_Size numCompiledLocals; /* Count of local variables recognized by the
|
||||
* compiler including arguments and
|
||||
* temporaries. */
|
||||
CompiledLocal *firstLocalPtr;
|
||||
@@ -1019,7 +1019,7 @@ typedef void (ProcErrorProc)(Tcl_Interp *interp, Tcl_Obj *procNameObj);
|
||||
*/
|
||||
|
||||
typedef struct Trace {
|
||||
int level; /* Only trace commands at nesting level less
|
||||
Tcl_Size level; /* Only trace commands at nesting level less
|
||||
* than or equal to this. */
|
||||
Tcl_CmdObjTraceProc *proc; /* Procedure to call to trace command. */
|
||||
void *clientData; /* Arbitrary value to pass to proc. */
|
||||
@@ -1097,8 +1097,8 @@ typedef struct AssocData {
|
||||
*/
|
||||
|
||||
typedef struct LocalCache {
|
||||
int refCount;
|
||||
int numVars;
|
||||
Tcl_Size refCount;
|
||||
Tcl_Size numVars;
|
||||
Tcl_Obj *varName0;
|
||||
} LocalCache;
|
||||
|
||||
@@ -1118,7 +1118,7 @@ typedef struct CallFrame {
|
||||
* If FRAME_IS_PROC is set, the frame was
|
||||
* pushed to execute a Tcl procedure and may
|
||||
* have local vars. */
|
||||
int objc; /* This and objv below describe the arguments
|
||||
Tcl_Size objc; /* This and objv below describe the arguments
|
||||
* for this procedure call. */
|
||||
Tcl_Obj *const *objv; /* Array of argument objects. */
|
||||
struct CallFrame *callerPtr;
|
||||
@@ -1132,7 +1132,7 @@ typedef struct CallFrame {
|
||||
* callerPtr unless an "uplevel" command or
|
||||
* something equivalent was active in the
|
||||
* caller). */
|
||||
int level; /* Level of this procedure, for "uplevel"
|
||||
Tcl_Size level; /* Level of this procedure, for "uplevel"
|
||||
* purposes (i.e. corresponds to nesting of
|
||||
* callerVarPtr's, not callerPtr's). 1 for
|
||||
* outermost procedure, 0 for top-level. */
|
||||
@@ -1146,8 +1146,8 @@ typedef struct CallFrame {
|
||||
* recognized by the compiler, or created at
|
||||
* execution time through, e.g., upvar.
|
||||
* Initially NULL and created if needed. */
|
||||
int numCompiledLocals; /* Count of local variables recognized by the
|
||||
* compiler including arguments. */
|
||||
Tcl_Size numCompiledLocals; /* Count of local variables recognized
|
||||
* by the compiler including arguments. */
|
||||
Var *compiledLocals; /* Points to the array of local variables
|
||||
* recognized by the compiler. The compiler
|
||||
* emits code that refers to these variables
|
||||
@@ -1208,7 +1208,7 @@ typedef struct CmdFrame {
|
||||
int level; /* Number of frames in stack, prevent O(n)
|
||||
* scan of list. */
|
||||
int *line; /* Lines the words of the command start on. */
|
||||
int nline;
|
||||
Tcl_Size nline;
|
||||
CallFrame *framePtr; /* Procedure activation record, may be
|
||||
* NULL. */
|
||||
struct CmdFrame *nextPtr; /* Link to calling frame. */
|
||||
@@ -1252,7 +1252,7 @@ typedef struct CmdFrame {
|
||||
} data;
|
||||
Tcl_Obj *cmdObj;
|
||||
const char *cmd; /* The executed command, if possible... */
|
||||
int len; /* ... and its length. */
|
||||
Tcl_Size len; /* ... and its length. */
|
||||
const struct CFWordBC *litarg;
|
||||
/* Link to set of literal arguments which have
|
||||
* ben pushed on the lineLABCPtr stack by
|
||||
@@ -1262,16 +1262,16 @@ typedef struct CmdFrame {
|
||||
|
||||
typedef struct CFWord {
|
||||
CmdFrame *framePtr; /* CmdFrame to access. */
|
||||
int word; /* Index of the word in the command. */
|
||||
int refCount; /* Number of times the word is on the
|
||||
Tcl_Size word; /* Index of the word in the command. */
|
||||
Tcl_Size refCount; /* Number of times the word is on the
|
||||
* stack. */
|
||||
} CFWord;
|
||||
|
||||
typedef struct CFWordBC {
|
||||
CmdFrame *framePtr; /* CmdFrame to access. */
|
||||
int pc; /* Instruction pointer of a command in
|
||||
Tcl_Size pc; /* Instruction pointer of a command in
|
||||
* ExtCmdLoc.loc[.] */
|
||||
int word; /* Index of word in
|
||||
Tcl_Size word; /* Index of word in
|
||||
* ExtCmdLoc.loc[cmd]->line[.] */
|
||||
struct CFWordBC *prevPtr; /* Previous entry in stack for same Tcl_Obj. */
|
||||
struct CFWordBC *nextPtr; /* Next entry for same command call. See
|
||||
@@ -1300,7 +1300,7 @@ typedef struct CFWordBC {
|
||||
#define CLL_END (-1)
|
||||
|
||||
typedef struct ContLineLoc {
|
||||
int num; /* Number of entries in loc, not counting the
|
||||
Tcl_Size num; /* Number of entries in loc, not counting the
|
||||
* final -1 marker entry. */
|
||||
int loc[TCLFLEXARRAY];/* Table of locations, as character offsets.
|
||||
* The table is allocated as part of the
|
||||
@@ -1350,7 +1350,7 @@ typedef struct {
|
||||
* proc field is NULL. */
|
||||
} ExtraFrameInfoField;
|
||||
typedef struct {
|
||||
int length; /* Length of array. */
|
||||
Tcl_Size length; /* Length of array. */
|
||||
ExtraFrameInfoField fields[2];
|
||||
/* Really as long as necessary, but this is
|
||||
* long enough for nearly anything. */
|
||||
@@ -1428,7 +1428,9 @@ struct CompileEnv;
|
||||
* sake of old code only.
|
||||
*/
|
||||
|
||||
#define TCL_OUT_LINE_COMPILE TCL_ERROR
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
# define TCL_OUT_LINE_COMPILE TCL_ERROR
|
||||
#endif
|
||||
|
||||
typedef int (CompileProc)(Tcl_Interp *interp, Tcl_Parse *parsePtr,
|
||||
struct Command *cmdPtr, struct CompileEnv *compEnvPtr);
|
||||
@@ -1481,13 +1483,13 @@ typedef struct CoroutineData {
|
||||
CorContext running;
|
||||
Tcl_HashTable *lineLABCPtr; /* See Interp.lineLABCPtr */
|
||||
void *stackLevel;
|
||||
int auxNumLevels; /* While the coroutine is running the
|
||||
Tcl_Size auxNumLevels; /* While the coroutine is running the
|
||||
* numLevels of the create/resume command is
|
||||
* stored here; for suspended coroutines it
|
||||
* holds the nesting numLevels at yield. */
|
||||
int nargs; /* Number of args required for resuming this
|
||||
* coroutine; -2 means "0 or 1" (default), -1
|
||||
* means "any" */
|
||||
Tcl_Size nargs; /* Number of args required for resuming this
|
||||
* coroutine; COROUTINE_ARGUMENTS_SINGLE_OPTIONAL means "0 or 1"
|
||||
* (default), COROUTINE_ARGUMENTS_ARBITRARY means "any" */
|
||||
Tcl_Obj *yieldPtr; /* The command to yield to. Stored here in
|
||||
* order to reset splice point in
|
||||
* TclNRCoroutineActivateCallback if the
|
||||
@@ -1531,7 +1533,7 @@ typedef struct LiteralEntry {
|
||||
* NULL if end of chain. */
|
||||
Tcl_Obj *objPtr; /* Points to Tcl object that holds the
|
||||
* literal's bytes and length. */
|
||||
int refCount; /* If in an interpreter's global literal
|
||||
Tcl_Size refCount; /* If in an interpreter's global literal
|
||||
* table, the number of ByteCode structures
|
||||
* that share the literal object; the literal
|
||||
* entry can be freed when refCount drops to
|
||||
@@ -1673,12 +1675,12 @@ typedef struct Command {
|
||||
* recreated). */
|
||||
Namespace *nsPtr; /* Points to the namespace containing this
|
||||
* command. */
|
||||
int refCount; /* 1 if in command hashtable plus 1 for each
|
||||
Tcl_Size refCount; /* 1 if in command hashtable plus 1 for each
|
||||
* reference from a CmdName Tcl object
|
||||
* representing a command's name in a ByteCode
|
||||
* instruction sequence. This structure can be
|
||||
* freed when refCount becomes zero. */
|
||||
int cmdEpoch; /* Incremented to invalidate any references
|
||||
Tcl_Size cmdEpoch; /* Incremented to invalidate any references
|
||||
* that point to this command when it is
|
||||
* renamed, deleted, hidden, or exposed. */
|
||||
CompileProc *compileProc; /* Procedure called to compile command. NULL
|
||||
@@ -1730,7 +1732,9 @@ typedef struct Command {
|
||||
*/
|
||||
|
||||
#define CMD_DYING 0x01
|
||||
#define CMD_IS_DELETED 0x01 /* Same as CMD_DYING (Deprecated) */
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
# define CMD_IS_DELETED 0x01 /* Same as CMD_DYING */
|
||||
#endif
|
||||
#define CMD_TRACE_ACTIVE 0x02
|
||||
#define CMD_HAS_EXEC_TRACES 0x04
|
||||
#define CMD_COMPILES_EXPANDED 0x08
|
||||
@@ -1869,18 +1873,17 @@ typedef struct Interp {
|
||||
* contains one optimizer, which can be
|
||||
* selectively overridden by extensions. */
|
||||
} extra;
|
||||
|
||||
/*
|
||||
* Information related to procedures and variables. See tclProc.c and
|
||||
* tclVar.c for usage.
|
||||
*/
|
||||
|
||||
int numLevels; /* Keeps track of how many nested calls to
|
||||
Tcl_Size numLevels; /* Keeps track of how many nested calls to
|
||||
* Tcl_Eval are in progress for this
|
||||
* interpreter. It's used to delay deletion of
|
||||
* the table until all Tcl_Eval invocations
|
||||
* are completed. */
|
||||
int maxNestingDepth; /* If numLevels exceeds this value then Tcl
|
||||
Tcl_Size maxNestingDepth; /* If numLevels exceeds this value then Tcl
|
||||
* assumes that infinite recursion has
|
||||
* occurred and it generates an error. */
|
||||
CallFrame *framePtr; /* Points to top-most in stack of all nested
|
||||
@@ -1933,7 +1936,7 @@ typedef struct Interp {
|
||||
* Miscellaneous information:
|
||||
*/
|
||||
|
||||
int cmdCount; /* Total number of times a command procedure
|
||||
Tcl_Size cmdCount; /* Total number of times a command procedure
|
||||
* has been called for this interpreter. */
|
||||
int evalFlags; /* Flags to control next call to Tcl_Eval.
|
||||
* Normally zero, but may be set before
|
||||
@@ -1945,7 +1948,7 @@ typedef struct Interp {
|
||||
* compiled by the interpreter. Indexed by the
|
||||
* string representations of literals. Used to
|
||||
* avoid creating duplicate objects. */
|
||||
int compileEpoch; /* Holds the current "compilation epoch" for
|
||||
Tcl_Size compileEpoch; /* Holds the current "compilation epoch" for
|
||||
* this interpreter. This is incremented to
|
||||
* invalidate existing ByteCodes when, e.g., a
|
||||
* command with a compile procedure is
|
||||
@@ -1995,7 +1998,7 @@ typedef struct Interp {
|
||||
/* First in list of active traces for interp,
|
||||
* or NULL if no active traces. */
|
||||
|
||||
int tracesForbiddingInline; /* Count of traces (in the list headed by
|
||||
Tcl_Size tracesForbiddingInline; /* Count of traces (in the list headed by
|
||||
* tracePtr) that forbid inline bytecode
|
||||
* compilation. */
|
||||
|
||||
@@ -2025,7 +2028,7 @@ typedef struct Interp {
|
||||
* as flag values the same as the 'active'
|
||||
* field. */
|
||||
|
||||
int cmdCount; /* Limit for how many commands to execute in
|
||||
Tcl_Size cmdCount; /* Limit for how many commands to execute in
|
||||
* the interpreter. */
|
||||
LimitHandler *cmdHandlers;
|
||||
/* Handlers to execute when the limit is
|
||||
@@ -2061,9 +2064,9 @@ typedef struct Interp {
|
||||
* *root* ensemble command? (Nested ensembles
|
||||
* don't rewrite this.) NULL if we're not
|
||||
* processing an ensemble. */
|
||||
int numRemovedObjs; /* How many arguments have been stripped off
|
||||
Tcl_Size numRemovedObjs; /* How many arguments have been stripped off
|
||||
* because of ensemble processing. */
|
||||
int numInsertedObjs; /* How many of the current arguments were
|
||||
Tcl_Size numInsertedObjs; /* How many of the current arguments were
|
||||
* inserted by an ensemble. */
|
||||
} ensembleRewrite;
|
||||
|
||||
@@ -2392,7 +2395,7 @@ struct TclMaxAlignment {
|
||||
*/
|
||||
|
||||
#define TclOOM(ptr, size) \
|
||||
((size) && ((ptr)||(Tcl_Panic("unable to alloc %u bytes", (size)),1)))
|
||||
((size) && ((ptr)||(Tcl_Panic("unable to alloc %" TCL_Z_MODIFIER "u bytes", (size_t)(size)),1)))
|
||||
|
||||
/*
|
||||
* The following enum values are used to specify the runtime platform setting
|
||||
@@ -2436,25 +2439,14 @@ typedef enum TclEolTranslation {
|
||||
#define TCL_INVOKE_NO_UNKNOWN (1<<1)
|
||||
#define TCL_INVOKE_NO_TRACEBACK (1<<2)
|
||||
|
||||
/*
|
||||
* ListSizeT is the type for holding list element counts. It's defined
|
||||
* simplify sharing source between Tcl8 and Tcl9.
|
||||
*/
|
||||
#if TCL_MAJOR_VERSION > 8
|
||||
|
||||
typedef size_t ListSizeT;
|
||||
|
||||
/*
|
||||
* SSIZE_MAX, NOT SIZE_MAX as negative differences need to be expressed
|
||||
* between values of the ListSizeT type so limit the range to signed
|
||||
* between values of the Tcl_Size type so limit the range to signed
|
||||
*/
|
||||
#define ListSizeT_MAX ((ListSizeT)PTRDIFF_MAX)
|
||||
|
||||
# define ListSizeT_MAX ((Tcl_Size)PTRDIFF_MAX)
|
||||
#else
|
||||
|
||||
typedef int ListSizeT;
|
||||
#define ListSizeT_MAX INT_MAX
|
||||
|
||||
# define ListSizeT_MAX INT_MAX
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2483,9 +2475,9 @@ typedef int ListSizeT;
|
||||
*
|
||||
*/
|
||||
typedef struct ListStore {
|
||||
ListSizeT firstUsed; /* Index of first slot in use within slots[] */
|
||||
ListSizeT numUsed; /* Number of slots in use (starting firstUsed) */
|
||||
ListSizeT numAllocated; /* Total number of slots[] array slots. */
|
||||
Tcl_Size firstUsed; /* Index of first slot in use within slots[] */
|
||||
Tcl_Size numUsed; /* Number of slots in use (starting firstUsed) */
|
||||
Tcl_Size numAllocated; /* Total number of slots[] array slots. */
|
||||
size_t refCount; /* Number of references to this instance */
|
||||
int flags; /* LISTSTORE_* flags */
|
||||
Tcl_Obj *slots[TCLFLEXARRAY]; /* Variable size array. Grown as needed */
|
||||
@@ -2497,7 +2489,7 @@ typedef struct ListStore {
|
||||
|
||||
/* Max number of elements that can be contained in a list */
|
||||
#define LIST_MAX \
|
||||
((ListSizeT)(((size_t)ListSizeT_MAX - offsetof(ListStore, slots)) \
|
||||
((Tcl_Size)(((size_t)ListSizeT_MAX - offsetof(ListStore, slots)) \
|
||||
/ sizeof(Tcl_Obj *)))
|
||||
/* Memory size needed for a ListStore to hold numSlots_ elements */
|
||||
#define LIST_SIZE(numSlots_) \
|
||||
@@ -2508,8 +2500,8 @@ typedef struct ListStore {
|
||||
* See comments above for ListStore
|
||||
*/
|
||||
typedef struct ListSpan {
|
||||
ListSizeT spanStart; /* Starting index of the span */
|
||||
ListSizeT spanLength; /* Number of elements in the span */
|
||||
Tcl_Size spanStart; /* Starting index of the span */
|
||||
Tcl_Size spanLength; /* Number of elements in the span */
|
||||
size_t refCount; /* Count of references to this span record */
|
||||
} ListSpan;
|
||||
#ifndef LIST_SPAN_THRESHOLD /* May be set on build line */
|
||||
@@ -2835,7 +2827,7 @@ typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, TCL_HASH_TYPE *len
|
||||
*/
|
||||
|
||||
typedef struct ProcessGlobalValue {
|
||||
int epoch; /* Epoch counter to detect changes in the
|
||||
Tcl_Size epoch; /* Epoch counter to detect changes in the
|
||||
* global value. */
|
||||
TCL_HASH_TYPE numBytes; /* Length of the global string. */
|
||||
char *value; /* The global string value. */
|
||||
@@ -3009,7 +3001,7 @@ typedef struct ForIterData {
|
||||
Tcl_Obj *body; /* Loop body. */
|
||||
Tcl_Obj *next; /* Loop step script, NULL for 'while'. */
|
||||
const char *msg; /* Error message part. */
|
||||
int word; /* Index of the body script in the command */
|
||||
Tcl_Size word; /* Index of the body script in the command */
|
||||
} ForIterData;
|
||||
|
||||
/* TIP #357 - Structure doing the bookkeeping of handles for Tcl_LoadFile
|
||||
@@ -3138,7 +3130,6 @@ MODULE_SCOPE char * TclDStringAppendObj(Tcl_DString *dsPtr,
|
||||
Tcl_Obj *objPtr);
|
||||
MODULE_SCOPE char * TclDStringAppendDString(Tcl_DString *dsPtr,
|
||||
Tcl_DString *toAppendPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclDStringToObj(Tcl_DString *dsPtr);
|
||||
MODULE_SCOPE Tcl_Obj *const *TclFetchEnsembleRoot(Tcl_Interp *interp,
|
||||
Tcl_Obj *const *objv, int objc, int *objcPtr);
|
||||
MODULE_SCOPE Tcl_Obj *const *TclEnsembleGetRewriteValues(Tcl_Interp *interp);
|
||||
@@ -3230,7 +3221,7 @@ MODULE_SCOPE int MakeTildeRelativePath(Tcl_Interp *interp, const char *user,
|
||||
const char *subPath, Tcl_DString *dsPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclGetHomeDirObj(Tcl_Interp *interp, const char *user);
|
||||
MODULE_SCOPE Tcl_Obj * TclResolveTildePath(Tcl_Interp *interp,
|
||||
Tcl_Obj *pathObj);
|
||||
Tcl_Obj *pathObj);
|
||||
MODULE_SCOPE Tcl_Obj * TclResolveTildePathList(Tcl_Obj *pathsObj);
|
||||
MODULE_SCOPE int TclJoinThread(Tcl_ThreadId id, int *result);
|
||||
MODULE_SCOPE void TclLimitRemoveAllHandlers(Tcl_Interp *interp);
|
||||
@@ -3242,11 +3233,11 @@ MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n,
|
||||
int *lines, Tcl_Obj *const *elems);
|
||||
MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclListObjRange(Tcl_Obj *listPtr, int fromIdx,
|
||||
int toIdx);
|
||||
MODULE_SCOPE int TclListObjAppendElements(Tcl_Interp *interp,
|
||||
Tcl_Obj *toObj, int elemCount,
|
||||
Tcl_Obj *const elemObjv[]);
|
||||
MODULE_SCOPE Tcl_Obj * TclListObjRange(Tcl_Obj *listPtr, int fromIdx,
|
||||
int toIdx);
|
||||
MODULE_SCOPE Tcl_Obj * TclLsetList(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Obj *indexPtr, Tcl_Obj *valuePtr);
|
||||
MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
@@ -3255,7 +3246,6 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name,
|
||||
const EnsembleImplMap map[]);
|
||||
MODULE_SCOPE int TclMakeSafe(Tcl_Interp *interp);
|
||||
|
||||
MODULE_SCOPE int TclMaxListLength(const char *bytes, int numBytes,
|
||||
const char **endPtr);
|
||||
MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc,
|
||||
@@ -3305,6 +3295,11 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
|
||||
MODULE_SCOPE void TclpFinalizeNotifier(void *clientData);
|
||||
MODULE_SCOPE void TclpFinalizePipes(void);
|
||||
MODULE_SCOPE void TclpFinalizeSockets(void);
|
||||
#ifdef _WIN32
|
||||
MODULE_SCOPE void TclInitSockets(void);
|
||||
#else
|
||||
#define TclInitSockets() /* do nothing */
|
||||
#endif
|
||||
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
|
||||
struct addrinfo **addrlist,
|
||||
const char *host, int port, int willBind,
|
||||
@@ -4201,8 +4196,8 @@ MODULE_SCOPE int TclIndexEncode(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
MODULE_SCOPE int TclIndexDecode(int encoded, int endValue);
|
||||
|
||||
/* Constants used in index value encoding routines. */
|
||||
#define TCL_INDEX_END (-2)
|
||||
#define TCL_INDEX_START (0)
|
||||
#define TCL_INDEX_END ((Tcl_Size)-2)
|
||||
#define TCL_INDEX_START ((Tcl_Size)0)
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -4474,7 +4469,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
|
||||
*
|
||||
* The ANSI C "prototype" for this macro is:
|
||||
*
|
||||
* MODULE_SCOPE void TclInitStringRep(Tcl_Obj *objPtr, char *bytePtr, int len);
|
||||
* MODULE_SCOPE void TclInitStringRep(Tcl_Obj *objPtr, char *bytePtr, size_t len);
|
||||
*
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
@@ -4708,7 +4703,7 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[];
|
||||
* of counting along a string of all one-byte characters. The ANSI C
|
||||
* "prototype" for this macro is:
|
||||
*
|
||||
* MODULE_SCOPE void TclNumUtfChars(int numChars, const char *bytes,
|
||||
* MODULE_SCOPE void TclNumUtfCharsM(int numChars, const char *bytes,
|
||||
* int numBytes);
|
||||
*----------------------------------------------------------------
|
||||
*/
|
||||
@@ -4858,6 +4853,26 @@ MODULE_SCOPE Tcl_LibraryInitProc Procbodytest_SafeInit;
|
||||
TCL_DTRACE_OBJ_CREATE(objPtr); \
|
||||
} while (0)
|
||||
|
||||
#define TclNewUIntObj(objPtr, uw) \
|
||||
do { \
|
||||
TclIncrObjsAllocated(); \
|
||||
TclAllocObjStorage(objPtr); \
|
||||
(objPtr)->refCount = 0; \
|
||||
(objPtr)->bytes = NULL; \
|
||||
Tcl_WideUInt uw_ = (uw); \
|
||||
if (uw_ > WIDE_MAX) { \
|
||||
mp_int bignumValue_; \
|
||||
if (mp_init_u64(&bignumValue_, uw_) != MP_OKAY) { \
|
||||
Tcl_Panic("%s: memory overflow", "TclNewUIntObj"); \
|
||||
} \
|
||||
TclSetBignumInternalRep((objPtr), &bignumValue_); \
|
||||
} else { \
|
||||
(objPtr)->internalRep.wideValue = (Tcl_WideInt)(uw_); \
|
||||
(objPtr)->typePtr = &tclIntType; \
|
||||
} \
|
||||
TCL_DTRACE_OBJ_CREATE(objPtr); \
|
||||
} while (0)
|
||||
|
||||
#define TclNewIndexObj(objPtr, w) \
|
||||
TclNewIntObj(objPtr, w)
|
||||
|
||||
@@ -4886,6 +4901,21 @@ MODULE_SCOPE Tcl_LibraryInitProc Procbodytest_SafeInit;
|
||||
#define TclNewIntObj(objPtr, w) \
|
||||
(objPtr) = Tcl_NewWideIntObj(w)
|
||||
|
||||
#define TclNewUIntObj(objPtr, uw) \
|
||||
do { \
|
||||
Tcl_WideUInt uw_ = (uw); \
|
||||
if (uw_ > WIDE_MAX) { \
|
||||
mp_int bignumValue_; \
|
||||
if (mp_init_u64(&bignumValue_, uw_) == MP_OKAY) { \
|
||||
(objPtr) = Tcl_NewBignumObj(&bignumValue_); \
|
||||
} else { \
|
||||
(objPtr) = NULL; \
|
||||
} \
|
||||
} else { \
|
||||
(objPtr) = Tcl_NewWideIntObj(uw_); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TclNewIndexObj(objPtr, w) \
|
||||
TclNewIntObj(objPtr, w)
|
||||
|
||||
@@ -5186,8 +5216,8 @@ typedef struct NRE_callback {
|
||||
* Other externals.
|
||||
*/
|
||||
|
||||
MODULE_SCOPE size_t TclEnvEpoch; /* Epoch of the tcl environment
|
||||
* (if changed with tcl-env). */
|
||||
MODULE_SCOPE size_t TclEnvEpoch; /* Epoch of the tcl environment
|
||||
* (if changed with tcl-env). */
|
||||
|
||||
#endif /* _TCLINT */
|
||||
|
||||
|
||||
@@ -354,7 +354,8 @@ EXTERN void Tcl_SetNamespaceResolvers(
|
||||
Tcl_ResolveVarProc *varProc,
|
||||
Tcl_ResolveCompiledVarProc *compiledVarProc);
|
||||
/* 132 */
|
||||
EXTERN int TclpHasSockets(Tcl_Interp *interp);
|
||||
TCL_DEPRECATED("")
|
||||
int TclpHasSockets(Tcl_Interp *interp);
|
||||
/* 133 */
|
||||
TCL_DEPRECATED("")
|
||||
struct tm * TclpGetDate(const time_t *time, int useGMT);
|
||||
@@ -659,8 +660,8 @@ EXTERN Tcl_Obj * TclpCreateTemporaryDirectory(Tcl_Obj *dirObj,
|
||||
Tcl_Obj *basenameObj);
|
||||
/* Slot 259 is reserved */
|
||||
/* 260 */
|
||||
EXTERN Tcl_Obj * TclListTestObj(int length, int leadingSpace,
|
||||
int endSpace);
|
||||
EXTERN Tcl_Obj * TclListTestObj(size_t length, size_t leadingSpace,
|
||||
size_t endSpace);
|
||||
/* 261 */
|
||||
EXTERN void TclListObjValidate(Tcl_Interp *interp,
|
||||
Tcl_Obj *listObj);
|
||||
@@ -801,7 +802,7 @@ typedef struct TclIntStubs {
|
||||
int (*tcl_PushCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame); /* 129 */
|
||||
int (*tcl_RemoveInterpResolvers) (Tcl_Interp *interp, const char *name); /* 130 */
|
||||
void (*tcl_SetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 131 */
|
||||
int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */
|
||||
TCL_DEPRECATED_API("") int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */
|
||||
TCL_DEPRECATED_API("") struct tm * (*tclpGetDate) (const time_t *time, int useGMT); /* 133 */
|
||||
void (*reserved134)(void);
|
||||
void (*reserved135)(void);
|
||||
@@ -929,7 +930,7 @@ typedef struct TclIntStubs {
|
||||
void (*tclStaticLibrary) (Tcl_Interp *interp, const char *prefix, Tcl_LibraryInitProc *initProc, Tcl_LibraryInitProc *safeInitProc); /* 257 */
|
||||
Tcl_Obj * (*tclpCreateTemporaryDirectory) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* 258 */
|
||||
void (*reserved259)(void);
|
||||
Tcl_Obj * (*tclListTestObj) (int length, int leadingSpace, int endSpace); /* 260 */
|
||||
Tcl_Obj * (*tclListTestObj) (size_t length, size_t leadingSpace, size_t endSpace); /* 260 */
|
||||
void (*tclListObjValidate) (Tcl_Interp *interp, Tcl_Obj *listObj); /* 261 */
|
||||
} TclIntStubs;
|
||||
|
||||
|
||||
+1
-1
@@ -333,7 +333,7 @@ int
|
||||
Tcl_Init(
|
||||
Tcl_Interp *interp) /* Interpreter to initialize. */
|
||||
{
|
||||
PkgName pkgName = {NULL, "Tcl"};
|
||||
PkgName pkgName = {NULL, "tcl"};
|
||||
PkgName **names = (PkgName **)TclInitPkgFiles(interp);
|
||||
int result = TCL_ERROR;
|
||||
|
||||
|
||||
+13
-53
@@ -526,56 +526,14 @@ GetUWide(
|
||||
Tcl_Obj *objPtr,
|
||||
Tcl_WideUInt *uwidePtr)
|
||||
{
|
||||
Tcl_WideInt *widePtr = (Tcl_WideInt *) uwidePtr;
|
||||
void *clientData;
|
||||
int type, intValue;
|
||||
if (Tcl_GetWideUIntFromObj(NULL, objPtr, uwidePtr) != TCL_OK) {
|
||||
int intValue;
|
||||
|
||||
if (Tcl_GetNumberFromObj(NULL, objPtr, &clientData, &type) == TCL_OK) {
|
||||
if (type == TCL_NUMBER_INT) {
|
||||
*widePtr = *((const Tcl_WideInt *) clientData);
|
||||
return (*widePtr < 0);
|
||||
} else if (type == TCL_NUMBER_BIG) {
|
||||
mp_int *numPtr = (mp_int *)clientData;
|
||||
Tcl_WideUInt value = 0;
|
||||
union {
|
||||
Tcl_WideUInt value;
|
||||
unsigned char bytes[sizeof(Tcl_WideUInt)];
|
||||
} scratch;
|
||||
size_t numBytes;
|
||||
unsigned char *bytes = scratch.bytes;
|
||||
|
||||
if (numPtr->sign || (MP_OKAY != mp_to_ubin(numPtr,
|
||||
bytes, sizeof(Tcl_WideUInt), &numBytes))) {
|
||||
/*
|
||||
* If the sign bit is set (a negative value) or if the value
|
||||
* can't possibly fit in the bits of an unsigned wide, there's
|
||||
* no point in doing further conversion.
|
||||
*/
|
||||
return 1;
|
||||
}
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
while (numBytes-- > 0) {
|
||||
value = (value << CHAR_BIT) | *bytes++;
|
||||
}
|
||||
#else /* !WORDS_BIGENDIAN */
|
||||
/*
|
||||
* Little-endian can read the value directly.
|
||||
*/
|
||||
value = scratch.value;
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
*uwidePtr = value;
|
||||
return 0;
|
||||
if (GetInvalidIntFromObj(objPtr, &intValue) != TCL_OK) {
|
||||
return 1;
|
||||
}
|
||||
*uwidePtr = intValue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Evil edge case fallback.
|
||||
*/
|
||||
|
||||
if (GetInvalidIntFromObj(objPtr, &intValue) != TCL_OK) {
|
||||
return 1;
|
||||
}
|
||||
*uwidePtr = intValue;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1324,7 +1282,7 @@ ObjValue(
|
||||
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
|
||||
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
|
||||
for (i=0; i < linkPtr->numElems; i++) {
|
||||
objv[i] = Tcl_NewDoubleObj(linkPtr->lastValue.dPtr[i]);
|
||||
TclNewDoubleObj(objv[i], linkPtr->lastValue.dPtr[i]);
|
||||
}
|
||||
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
|
||||
ckfree(objv);
|
||||
@@ -1443,7 +1401,7 @@ ObjValue(
|
||||
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
|
||||
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
|
||||
for (i=0; i < linkPtr->numElems; i++) {
|
||||
objv[i] = Tcl_NewDoubleObj(linkPtr->lastValue.fPtr[i]);
|
||||
TclNewDoubleObj(objv[i], linkPtr->lastValue.fPtr[i]);
|
||||
}
|
||||
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
|
||||
ckfree(objv);
|
||||
@@ -1451,20 +1409,22 @@ ObjValue(
|
||||
}
|
||||
linkPtr->lastValue.f = LinkedVar(float);
|
||||
return Tcl_NewDoubleObj(linkPtr->lastValue.f);
|
||||
case TCL_LINK_WIDE_UINT:
|
||||
case TCL_LINK_WIDE_UINT: {
|
||||
if (linkPtr->flags & LINK_ALLOC_LAST) {
|
||||
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
|
||||
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
|
||||
for (i=0; i < linkPtr->numElems; i++) {
|
||||
TclNewIntObj(objv[i], (Tcl_WideInt)
|
||||
linkPtr->lastValue.uwPtr[i]);
|
||||
TclNewUIntObj(objv[i], linkPtr->lastValue.uwPtr[i]);
|
||||
}
|
||||
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
|
||||
ckfree(objv);
|
||||
return resultObj;
|
||||
}
|
||||
linkPtr->lastValue.uw = LinkedVar(Tcl_WideUInt);
|
||||
return Tcl_NewWideIntObj((Tcl_WideInt) linkPtr->lastValue.uw);
|
||||
Tcl_Obj *uwObj;
|
||||
TclNewUIntObj(uwObj, linkPtr->lastValue.uw);
|
||||
return uwObj;
|
||||
}
|
||||
|
||||
case TCL_LINK_STRING:
|
||||
p = LinkedVar(char *);
|
||||
|
||||
+99
-101
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include "tclInt.h"
|
||||
#include "tclTomMath.h"
|
||||
#include "tclArithSeries.h"
|
||||
|
||||
/*
|
||||
@@ -48,13 +49,13 @@
|
||||
*/
|
||||
#define LIST_INDEX_ASSERT(idxarg_) \
|
||||
do { \
|
||||
ListSizeT idx_ = (idxarg_); /* To guard against ++ etc. */ \
|
||||
Tcl_Size idx_ = (idxarg_); /* To guard against ++ etc. */ \
|
||||
LIST_ASSERT(idx_ >= 0 && idx_ < LIST_MAX); \
|
||||
} while (0)
|
||||
/* Ditto for counts except upper limit is different */
|
||||
#define LIST_COUNT_ASSERT(countarg_) \
|
||||
do { \
|
||||
ListSizeT count_ = (countarg_); /* To guard against ++ etc. */ \
|
||||
Tcl_Size count_ = (countarg_); /* To guard against ++ etc. */ \
|
||||
LIST_ASSERT(count_ >= 0 && count_ <= LIST_MAX); \
|
||||
} while (0)
|
||||
|
||||
@@ -121,21 +122,21 @@
|
||||
*/
|
||||
static int MemoryAllocationError(Tcl_Interp *, size_t size);
|
||||
static int ListLimitExceededError(Tcl_Interp *);
|
||||
static ListStore *ListStoreNew(ListSizeT objc, Tcl_Obj *const objv[], int flags);
|
||||
static int ListRepInit(ListSizeT objc, Tcl_Obj *const objv[], int flags, ListRep *);
|
||||
static ListStore *ListStoreNew(Tcl_Size objc, Tcl_Obj *const objv[], int flags);
|
||||
static int ListRepInit(Tcl_Size objc, Tcl_Obj *const objv[], int flags, ListRep *);
|
||||
static int ListRepInitAttempt(Tcl_Interp *,
|
||||
ListSizeT objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[],
|
||||
ListRep *);
|
||||
static void ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags);
|
||||
static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr);
|
||||
static int TclListObjGetRep(Tcl_Interp *, Tcl_Obj *listPtr, ListRep *repPtr);
|
||||
static void ListRepRange(ListRep *srcRepPtr,
|
||||
ListSizeT rangeStart,
|
||||
ListSizeT rangeEnd,
|
||||
Tcl_Size rangeStart,
|
||||
Tcl_Size rangeEnd,
|
||||
int preserveSrcRep,
|
||||
ListRep *rangeRepPtr);
|
||||
static ListStore *ListStoreReallocate(ListStore *storePtr, ListSizeT numSlots);
|
||||
static ListStore *ListStoreReallocate(ListStore *storePtr, Tcl_Size numSlots);
|
||||
static void ListRepValidate(const ListRep *repPtr, const char *file,
|
||||
int lineNum);
|
||||
static void DupListInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
|
||||
@@ -237,8 +238,8 @@ const Tcl_ObjType tclListType = {
|
||||
*/
|
||||
static inline ListSpan *
|
||||
ListSpanNew(
|
||||
ListSizeT firstSlot, /* Starting slot index of the span */
|
||||
ListSizeT numSlots) /* Number of slots covered by the span */
|
||||
Tcl_Size firstSlot, /* Starting slot index of the span */
|
||||
Tcl_Size numSlots) /* Number of slots covered by the span */
|
||||
{
|
||||
ListSpan *spanPtr = (ListSpan *) ckalloc(sizeof(*spanPtr));
|
||||
spanPtr->refCount = 0;
|
||||
@@ -295,9 +296,9 @@ ListSpanDecrRefs(ListSpan *spanPtr)
|
||||
*/
|
||||
static inline int
|
||||
ListSpanMerited(
|
||||
ListSizeT length, /* Length of the proposed span */
|
||||
ListSizeT usedStorageLength, /* Number of slots currently in used */
|
||||
ListSizeT allocatedStorageLength) /* Length of the currently allocation */
|
||||
Tcl_Size length, /* Length of the proposed span */
|
||||
Tcl_Size usedStorageLength, /* Number of slots currently in used */
|
||||
Tcl_Size allocatedStorageLength) /* Length of the currently allocation */
|
||||
{
|
||||
/*
|
||||
TODO
|
||||
@@ -338,8 +339,8 @@ ListSpanMerited(
|
||||
*
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
static inline ListSizeT
|
||||
ListStoreUpSize(ListSizeT numSlotsRequested) {
|
||||
static inline Tcl_Size
|
||||
ListStoreUpSize(Tcl_Size numSlotsRequested) {
|
||||
/* TODO -how much extra? May be double only for smaller requests? */
|
||||
return numSlotsRequested < (LIST_MAX / 2) ? 2 * numSlotsRequested
|
||||
: LIST_MAX;
|
||||
@@ -391,8 +392,8 @@ ListRepFreeUnreferenced(const ListRep *repPtr)
|
||||
static inline void
|
||||
ObjArrayIncrRefs(
|
||||
Tcl_Obj * const *objv, /* Pointer to the array */
|
||||
ListSizeT startIdx, /* Starting index of subarray within objv */
|
||||
ListSizeT count) /* Number of elements in the subarray */
|
||||
Tcl_Size startIdx, /* Starting index of subarray within objv */
|
||||
Tcl_Size count) /* Number of elements in the subarray */
|
||||
{
|
||||
Tcl_Obj * const *end;
|
||||
LIST_INDEX_ASSERT(startIdx);
|
||||
@@ -423,8 +424,8 @@ ObjArrayIncrRefs(
|
||||
static inline void
|
||||
ObjArrayDecrRefs(
|
||||
Tcl_Obj * const *objv, /* Pointer to the array */
|
||||
ListSizeT startIdx, /* Starting index of subarray within objv */
|
||||
ListSizeT count) /* Number of elements in the subarray */
|
||||
Tcl_Size startIdx, /* Starting index of subarray within objv */
|
||||
Tcl_Size count) /* Number of elements in the subarray */
|
||||
{
|
||||
Tcl_Obj * const *end;
|
||||
LIST_INDEX_ASSERT(startIdx);
|
||||
@@ -455,7 +456,7 @@ ObjArrayDecrRefs(
|
||||
static inline void
|
||||
ObjArrayCopy(
|
||||
Tcl_Obj **to, /* Destination */
|
||||
ListSizeT count, /* Number of pointers to copy */
|
||||
Tcl_Size count, /* Number of pointers to copy */
|
||||
Tcl_Obj *const from[]) /* Source array of Tcl_Obj* */
|
||||
{
|
||||
Tcl_Obj **end;
|
||||
@@ -547,7 +548,7 @@ ListLimitExceededError(Tcl_Interp *interp)
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
static inline void
|
||||
ListRepUnsharedShiftDown(ListRep *repPtr, ListSizeT shiftCount)
|
||||
ListRepUnsharedShiftDown(ListRep *repPtr, Tcl_Size shiftCount)
|
||||
{
|
||||
ListStore *storePtr;
|
||||
|
||||
@@ -602,7 +603,7 @@ ListRepUnsharedShiftDown(ListRep *repPtr, ListSizeT shiftCount)
|
||||
*/
|
||||
#if 0
|
||||
static inline void
|
||||
ListRepUnsharedShiftUp(ListRep *repPtr, ListSizeT shiftCount)
|
||||
ListRepUnsharedShiftUp(ListRep *repPtr, Tcl_Size shiftCount)
|
||||
{
|
||||
ListStore *storePtr;
|
||||
|
||||
@@ -750,12 +751,12 @@ TclListObjValidate(Tcl_Interp *interp, Tcl_Obj *listObj)
|
||||
*/
|
||||
static ListStore *
|
||||
ListStoreNew(
|
||||
ListSizeT objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[],
|
||||
int flags)
|
||||
{
|
||||
ListStore *storePtr;
|
||||
ListSizeT capacity;
|
||||
Tcl_Size capacity;
|
||||
|
||||
/*
|
||||
* First check to see if we'd overflow and try to allocate an object
|
||||
@@ -793,7 +794,7 @@ ListStoreNew(
|
||||
if (capacity == objc) {
|
||||
storePtr->firstUsed = 0;
|
||||
} else {
|
||||
ListSizeT extra = capacity - objc;
|
||||
Tcl_Size extra = capacity - objc;
|
||||
int spaceFlags = flags & LISTREP_SPACE_FLAGS;
|
||||
if (spaceFlags == LISTREP_SPACE_ONLY_BACK) {
|
||||
storePtr->firstUsed = 0;
|
||||
@@ -840,9 +841,9 @@ ListStoreNew(
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
ListStore *
|
||||
ListStoreReallocate (ListStore *storePtr, ListSizeT numSlots)
|
||||
ListStoreReallocate (ListStore *storePtr, Tcl_Size numSlots)
|
||||
{
|
||||
ListSizeT newCapacity;
|
||||
Tcl_Size newCapacity;
|
||||
ListStore *newStorePtr;
|
||||
|
||||
newCapacity = ListStoreUpSize(numSlots);
|
||||
@@ -893,7 +894,7 @@ ListStoreReallocate (ListStore *storePtr, ListSizeT numSlots)
|
||||
*/
|
||||
static int
|
||||
ListRepInit(
|
||||
ListSizeT objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[],
|
||||
int flags,
|
||||
ListRep *repPtr
|
||||
@@ -949,7 +950,7 @@ ListRepInit(
|
||||
static int
|
||||
ListRepInitAttempt(
|
||||
Tcl_Interp *interp,
|
||||
ListSizeT objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[],
|
||||
ListRep *repPtr)
|
||||
{
|
||||
@@ -990,7 +991,7 @@ static void
|
||||
ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags)
|
||||
{
|
||||
Tcl_Obj **fromObjs;
|
||||
ListSizeT numFrom;
|
||||
Tcl_Size numFrom;
|
||||
|
||||
ListRepElements(fromRepPtr, numFrom, fromObjs);
|
||||
ListRepInit(numFrom, fromObjs, flags | LISTREP_PANIC_ON_FAIL, toRepPtr);
|
||||
@@ -1018,7 +1019,7 @@ ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags)
|
||||
*/
|
||||
static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr)
|
||||
{
|
||||
ListSizeT count;
|
||||
Tcl_Size count;
|
||||
ListStore *storePtr;
|
||||
ListSpan *spanPtr;
|
||||
|
||||
@@ -1091,7 +1092,7 @@ static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr)
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_NewListObj(
|
||||
ListSizeT objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Size objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
|
||||
{
|
||||
return Tcl_DbNewListObj(objc, objv, "unknown", 0);
|
||||
@@ -1101,7 +1102,7 @@ Tcl_NewListObj(
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_NewListObj(
|
||||
ListSizeT objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Size objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
|
||||
{
|
||||
ListRep listRep;
|
||||
@@ -1153,7 +1154,7 @@ Tcl_NewListObj(
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_DbNewListObj(
|
||||
ListSizeT objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Size objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */
|
||||
const char *file, /* The name of the source file calling this
|
||||
* function; used for debugging. */
|
||||
@@ -1179,7 +1180,7 @@ Tcl_DbNewListObj(
|
||||
|
||||
Tcl_Obj *
|
||||
Tcl_DbNewListObj(
|
||||
ListSizeT objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Size objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */
|
||||
TCL_UNUSED(const char *) /*file*/,
|
||||
TCL_UNUSED(int) /*line*/)
|
||||
@@ -1209,15 +1210,15 @@ Tcl_DbNewListObj(
|
||||
*/
|
||||
Tcl_Obj *
|
||||
TclNewListObj2(
|
||||
ListSizeT objc1, /* Count of objects referenced by objv1. */
|
||||
Tcl_Size objc1, /* Count of objects referenced by objv1. */
|
||||
Tcl_Obj *const objv1[], /* First array of pointers to Tcl objects. */
|
||||
ListSizeT objc2, /* Count of objects referenced by objv2. */
|
||||
Tcl_Size objc2, /* Count of objects referenced by objv2. */
|
||||
Tcl_Obj *const objv2[] /* Second array of pointers to Tcl objects. */
|
||||
)
|
||||
{
|
||||
Tcl_Obj *listObj;
|
||||
ListStore *storePtr;
|
||||
ListSizeT objc = objc1 + objc2;
|
||||
Tcl_Size objc = objc1 + objc2;
|
||||
|
||||
listObj = Tcl_NewListObj(objc, NULL);
|
||||
if (objc == 0) {
|
||||
@@ -1313,7 +1314,7 @@ TclListObjGetRep(
|
||||
void
|
||||
Tcl_SetListObj(
|
||||
Tcl_Obj *objPtr, /* Object whose internal rep to init. */
|
||||
ListSizeT objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Size objc, /* Count of objects referenced by objv. */
|
||||
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
|
||||
{
|
||||
if (Tcl_IsShared(objPtr)) {
|
||||
@@ -1413,17 +1414,17 @@ TclListObjCopy(
|
||||
static void
|
||||
ListRepRange(
|
||||
ListRep *srcRepPtr, /* Contains source of the range */
|
||||
ListSizeT rangeStart, /* Index of first element to include */
|
||||
ListSizeT rangeEnd, /* Index of last element to include */
|
||||
Tcl_Size rangeStart, /* Index of first element to include */
|
||||
Tcl_Size rangeEnd, /* Index of last element to include */
|
||||
int preserveSrcRep, /* If true, srcRepPtr contents must not be
|
||||
modified (generally because a shared Tcl_Obj
|
||||
references it) */
|
||||
ListRep *rangeRepPtr) /* Output. Must NOT be == srcRepPtr */
|
||||
{
|
||||
Tcl_Obj **srcElems;
|
||||
ListSizeT numSrcElems = ListRepLength(srcRepPtr);
|
||||
ListSizeT rangeLen;
|
||||
ListSizeT numAfterRangeEnd;
|
||||
Tcl_Size numSrcElems = ListRepLength(srcRepPtr);
|
||||
Tcl_Size rangeLen;
|
||||
Tcl_Size numAfterRangeEnd;
|
||||
|
||||
LISTREP_CHECK(srcRepPtr);
|
||||
|
||||
@@ -1490,7 +1491,7 @@ ListRepRange(
|
||||
srcRepPtr->storePtr->numUsed,
|
||||
srcRepPtr->storePtr->numAllocated)) {
|
||||
/* Option 2 - because span would be most efficient */
|
||||
ListSizeT spanStart = ListRepStart(srcRepPtr) + rangeStart;
|
||||
Tcl_Size spanStart = ListRepStart(srcRepPtr) + rangeStart;
|
||||
if (!preserveSrcRep && srcRepPtr->spanPtr
|
||||
&& srcRepPtr->spanPtr->refCount <= 1) {
|
||||
/* If span is not shared reuse it */
|
||||
@@ -1602,8 +1603,8 @@ ListRepRange(
|
||||
Tcl_Obj *
|
||||
TclListObjRange(
|
||||
Tcl_Obj *listObj, /* List object to take a range from. */
|
||||
ListSizeT rangeStart, /* Index of first element to include. */
|
||||
ListSizeT rangeEnd) /* Index of last element to include. */
|
||||
Tcl_Size rangeStart, /* Index of first element to include. */
|
||||
Tcl_Size rangeEnd) /* Index of last element to include. */
|
||||
{
|
||||
ListRep listRep;
|
||||
ListRep resultRep;
|
||||
@@ -1660,7 +1661,7 @@ Tcl_ListObjGetElements(
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *objPtr, /* List object for which an element array is
|
||||
* to be returned. */
|
||||
ListSizeT *objcPtr, /* Where to store the count of objects
|
||||
Tcl_Size *objcPtr, /* Where to store the count of objects
|
||||
* referenced by objv. */
|
||||
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
|
||||
* pointers to the list's objects. */
|
||||
@@ -1705,7 +1706,7 @@ Tcl_ListObjAppendList(
|
||||
Tcl_Obj *toObj, /* List object to append elements to. */
|
||||
Tcl_Obj *fromObj) /* List obj with elements to append. */
|
||||
{
|
||||
ListSizeT objc;
|
||||
Tcl_Size objc;
|
||||
Tcl_Obj **objv;
|
||||
|
||||
if (Tcl_IsShared(toObj)) {
|
||||
@@ -1749,13 +1750,13 @@ Tcl_ListObjAppendList(
|
||||
int TclListObjAppendElements (
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *toObj, /* List object to append */
|
||||
ListSizeT elemCount, /* Number of elements in elemObjs[] */
|
||||
Tcl_Size elemCount, /* Number of elements in elemObjs[] */
|
||||
Tcl_Obj * const elemObjv[]) /* Objects to append to toObj's list. */
|
||||
{
|
||||
ListRep listRep;
|
||||
Tcl_Obj **toObjv;
|
||||
ListSizeT toLen;
|
||||
ListSizeT finalLen;
|
||||
Tcl_Size toLen;
|
||||
Tcl_Size finalLen;
|
||||
|
||||
if (Tcl_IsShared(toObj)) {
|
||||
Tcl_Panic("%s called with shared object", "TclListObjAppendElements");
|
||||
@@ -1780,7 +1781,7 @@ Tcl_ListObjAppendList(
|
||||
* reference counts on the elements which is a substantial cost
|
||||
* if the list is not small.
|
||||
*/
|
||||
ListSizeT numTailFree;
|
||||
Tcl_Size numTailFree;
|
||||
|
||||
ListRepFreeUnreferenced(&listRep); /* Collect garbage before checking room */
|
||||
|
||||
@@ -1812,7 +1813,7 @@ Tcl_ListObjAppendList(
|
||||
if (numTailFree < elemCount) {
|
||||
/* Not enough room at back. Move some to front */
|
||||
/* T:listrep-3.5 */
|
||||
ListSizeT shiftCount = elemCount - numTailFree;
|
||||
Tcl_Size shiftCount = elemCount - numTailFree;
|
||||
/* Divide remaining space between front and back */
|
||||
shiftCount += (listRep.storePtr->numAllocated - finalLen) / 2;
|
||||
LIST_ASSERT(shiftCount <= listRep.storePtr->firstUsed);
|
||||
@@ -1940,11 +1941,11 @@ int
|
||||
Tcl_ListObjIndex(
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *listObj, /* List object to index into. */
|
||||
ListSizeT index, /* Index of element to return. */
|
||||
Tcl_Size index, /* Index of element to return. */
|
||||
Tcl_Obj **objPtrPtr) /* The resulting Tcl_Obj* is stored here. */
|
||||
{
|
||||
Tcl_Obj **elemObjs;
|
||||
ListSizeT numElems;
|
||||
Tcl_Size numElems;
|
||||
|
||||
/*
|
||||
* TODO
|
||||
@@ -1993,7 +1994,7 @@ int
|
||||
Tcl_ListObjLength(
|
||||
Tcl_Interp *interp, /* Used to report errors if not NULL. */
|
||||
Tcl_Obj *listObj, /* List object whose #elements to return. */
|
||||
ListSizeT *lenPtr) /* The resulting int is stored here. */
|
||||
Tcl_Size *lenPtr) /* The resulting length is stored here. */
|
||||
{
|
||||
ListRep listRep;
|
||||
|
||||
@@ -2057,17 +2058,17 @@ int
|
||||
Tcl_ListObjReplace(
|
||||
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
|
||||
Tcl_Obj *listObj, /* List object whose elements to replace. */
|
||||
ListSizeT first, /* Index of first element to replace. */
|
||||
ListSizeT numToDelete, /* Number of elements to replace. */
|
||||
ListSizeT numToInsert, /* Number of objects to insert. */
|
||||
Tcl_Size first, /* Index of first element to replace. */
|
||||
Tcl_Size numToDelete, /* Number of elements to replace. */
|
||||
Tcl_Size numToInsert, /* Number of objects to insert. */
|
||||
Tcl_Obj *const insertObjs[])/* Tcl objects to insert */
|
||||
{
|
||||
ListRep listRep;
|
||||
ListSizeT origListLen;
|
||||
Tcl_Size origListLen;
|
||||
int lenChange;
|
||||
int leadSegmentLen;
|
||||
int tailSegmentLen;
|
||||
ListSizeT numFreeSlots;
|
||||
Tcl_Size numFreeSlots;
|
||||
int leadShift;
|
||||
int tailShift;
|
||||
Tcl_Obj **listObjs;
|
||||
@@ -2186,7 +2187,7 @@ Tcl_ListObjReplace(
|
||||
ListRepStart(&listRep) == listRep.storePtr->firstUsed && /* (ii) */
|
||||
numToInsert <= listRep.storePtr->firstUsed /* (iii) */
|
||||
) {
|
||||
ListSizeT newLen;
|
||||
Tcl_Size newLen;
|
||||
LIST_ASSERT(numToInsert); /* Else would have returned above */
|
||||
listRep.storePtr->firstUsed -= numToInsert;
|
||||
ObjArrayCopy(&listRep.storePtr->slots[listRep.storePtr->firstUsed],
|
||||
@@ -2393,7 +2394,7 @@ Tcl_ListObjReplace(
|
||||
if (finalFreeSpace > 1 && (tailSpace == 0 || tailSegmentLen == 0)) {
|
||||
int postShiftLeadSpace = leadSpace - lenChange;
|
||||
if (postShiftLeadSpace > (finalFreeSpace/2)) {
|
||||
ListSizeT extraShift = postShiftLeadSpace - (finalFreeSpace / 2);
|
||||
Tcl_Size extraShift = postShiftLeadSpace - (finalFreeSpace / 2);
|
||||
leadShift -= extraShift;
|
||||
tailShift = -extraShift; /* Move tail to the front as well */
|
||||
}
|
||||
@@ -2411,7 +2412,7 @@ Tcl_ListObjReplace(
|
||||
int postShiftTailSpace = tailSpace - lenChange;
|
||||
if (postShiftTailSpace > (finalFreeSpace/2)) {
|
||||
/* T:listrep-1.{1,3,14,18,21},3.{2,3,26,27} */
|
||||
ListSizeT extraShift = postShiftTailSpace - (finalFreeSpace / 2);
|
||||
Tcl_Size extraShift = postShiftTailSpace - (finalFreeSpace / 2);
|
||||
tailShift += extraShift;
|
||||
leadShift = extraShift; /* Move head to the back as well */
|
||||
}
|
||||
@@ -2456,7 +2457,7 @@ Tcl_ListObjReplace(
|
||||
/* Will happen when we have to make room at bottom */
|
||||
if (tailShift != 0 && tailSegmentLen != 0) {
|
||||
/* T:listrep-1.{1,3,14,18},3.{2,3,26,27} */
|
||||
ListSizeT tailStart = leadSegmentLen + numToDelete;
|
||||
Tcl_Size tailStart = leadSegmentLen + numToDelete;
|
||||
memmove(&listObjs[tailStart + tailShift],
|
||||
&listObjs[tailStart],
|
||||
tailSegmentLen * sizeof(Tcl_Obj *));
|
||||
@@ -2476,7 +2477,7 @@ Tcl_ListObjReplace(
|
||||
}
|
||||
if (tailShift != 0 && tailSegmentLen != 0) {
|
||||
/* T:listrep-1.{7,17},3.{8:11,13,14,21,22,35,37,39:41} */
|
||||
ListSizeT tailStart = leadSegmentLen + numToDelete;
|
||||
Tcl_Size tailStart = leadSegmentLen + numToDelete;
|
||||
memmove(&listObjs[tailStart + tailShift],
|
||||
&listObjs[tailStart],
|
||||
tailSegmentLen * sizeof(Tcl_Obj *));
|
||||
@@ -2546,10 +2547,10 @@ TclLindexList(
|
||||
Tcl_Obj *listObj, /* List being unpacked. */
|
||||
Tcl_Obj *argObj) /* Index or index list. */
|
||||
{
|
||||
ListSizeT index; /* Index into the list. */
|
||||
Tcl_Size index; /* Index into the list. */
|
||||
Tcl_Obj *indexListCopy;
|
||||
Tcl_Obj **indexObjs;
|
||||
ListSizeT numIndexObjs;
|
||||
Tcl_Size numIndexObjs;
|
||||
|
||||
/*
|
||||
* Determine whether argPtr designates a list or a single index. We have
|
||||
@@ -2623,38 +2624,38 @@ Tcl_Obj *
|
||||
TclLindexFlat(
|
||||
Tcl_Interp *interp, /* Tcl interpreter. */
|
||||
Tcl_Obj *listObj, /* Tcl object representing the list. */
|
||||
ListSizeT indexCount, /* Count of indices. */
|
||||
Tcl_Size indexCount, /* Count of indices. */
|
||||
Tcl_Obj *const indexArray[])/* Array of pointers to Tcl objects that
|
||||
* represent the indices in the list. */
|
||||
{
|
||||
ListSizeT i;
|
||||
Tcl_Size i;
|
||||
|
||||
/* Handle ArithSeries as special case */
|
||||
if (TclHasInternalRep(listObj,&tclArithSeriesType)) {
|
||||
Tcl_WideInt listLen = TclArithSeriesObjLength(listObj);
|
||||
ListSizeT index;
|
||||
Tcl_Size listLen = TclArithSeriesObjLength(listObj);
|
||||
Tcl_Size index;
|
||||
Tcl_Obj *elemObj = NULL;
|
||||
for (i=0 ; i<indexCount && listObj ; i++) {
|
||||
if (TclGetIntForIndexM(interp, indexArray[i], /*endValue*/ listLen-1,
|
||||
&index) == TCL_OK) {
|
||||
}
|
||||
if (i==0) {
|
||||
TclArithSeriesObjIndex(listObj, index, &elemObj);
|
||||
elemObj = TclArithSeriesObjIndex(NULL, listObj, index);
|
||||
} else if (index > 0) {
|
||||
/* ArithSeries cannot be a list of lists */
|
||||
Tcl_DecrRefCount(elemObj);
|
||||
TclNewObj(elemObj);
|
||||
Tcl_IncrRefCount(elemObj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Tcl_IncrRefCount(elemObj);
|
||||
return elemObj;
|
||||
}
|
||||
|
||||
Tcl_IncrRefCount(listObj);
|
||||
|
||||
for (i=0 ; i<indexCount && listObj ; i++) {
|
||||
ListSizeT index, listLen = 0;
|
||||
Tcl_Size index, listLen = 0;
|
||||
Tcl_Obj **elemPtrs = NULL, *sublistCopy;
|
||||
|
||||
/*
|
||||
@@ -2736,10 +2737,10 @@ TclLsetList(
|
||||
Tcl_Obj *indexArgObj, /* Index or index-list arg to 'lset'. */
|
||||
Tcl_Obj *valueObj) /* Value arg to 'lset' or NULL to 'lpop'. */
|
||||
{
|
||||
ListSizeT indexCount = 0; /* Number of indices in the index list. */
|
||||
Tcl_Size indexCount = 0; /* Number of indices in the index list. */
|
||||
Tcl_Obj **indices = NULL; /* Vector of indices in the index list. */
|
||||
Tcl_Obj *retValueObj; /* Pointer to the list to be returned. */
|
||||
ListSizeT index; /* Current index in the list - discarded. */
|
||||
Tcl_Size index; /* Current index in the list - discarded. */
|
||||
Tcl_Obj *indexListCopy;
|
||||
|
||||
/*
|
||||
@@ -2817,17 +2818,17 @@ Tcl_Obj *
|
||||
TclLsetFlat(
|
||||
Tcl_Interp *interp, /* Tcl interpreter. */
|
||||
Tcl_Obj *listObj, /* Pointer to the list being modified. */
|
||||
ListSizeT indexCount, /* Number of index args. */
|
||||
Tcl_Size indexCount, /* Number of index args. */
|
||||
Tcl_Obj *const indexArray[],
|
||||
/* Index args. */
|
||||
Tcl_Obj *valueObj) /* Value arg to 'lset' or NULL to 'lpop'. */
|
||||
{
|
||||
ListSizeT index, len;
|
||||
Tcl_Size index, len;
|
||||
int result;
|
||||
Tcl_Obj *subListObj, *retValueObj;
|
||||
Tcl_Obj *pendingInvalidates[10];
|
||||
Tcl_Obj **pendingInvalidatesPtr = pendingInvalidates;
|
||||
ListSizeT numPendingInvalidates = 0;
|
||||
Tcl_Size numPendingInvalidates = 0;
|
||||
|
||||
/*
|
||||
* If there are no indices, simply return the new value. (Without
|
||||
@@ -2876,7 +2877,7 @@ TclLsetFlat(
|
||||
*/
|
||||
|
||||
do {
|
||||
ListSizeT elemCount;
|
||||
Tcl_Size elemCount;
|
||||
Tcl_Obj *parentList, **elemPtrs;
|
||||
|
||||
/*
|
||||
@@ -3080,13 +3081,13 @@ TclListObjSetElement(
|
||||
* if not NULL. */
|
||||
Tcl_Obj *listObj, /* List object in which element should be
|
||||
* stored. */
|
||||
ListSizeT index, /* Index of element to store. */
|
||||
Tcl_Size index, /* Index of element to store. */
|
||||
Tcl_Obj *valueObj) /* Tcl object to store in the designated list
|
||||
* element. */
|
||||
{
|
||||
ListRep listRep;
|
||||
Tcl_Obj **elemPtrs; /* Pointers to elements of the list. */
|
||||
ListSizeT elemCount; /* Number of elements in the list. */
|
||||
Tcl_Size elemCount; /* Number of elements in the list. */
|
||||
|
||||
/* Ensure that the listObj parameter designates an unshared list. */
|
||||
|
||||
@@ -3242,7 +3243,7 @@ SetListFromAny(
|
||||
Tcl_Obj *keyPtr, *valuePtr;
|
||||
Tcl_DictSearch search;
|
||||
int done;
|
||||
ListSizeT size;
|
||||
Tcl_Size size;
|
||||
|
||||
/*
|
||||
* Create the new list representation. Note that we do not need to do
|
||||
@@ -3284,7 +3285,7 @@ SetListFromAny(
|
||||
* because it can be done an order of magnitude faster
|
||||
* and may occur frequently.
|
||||
*/
|
||||
ListSizeT j, size = TclArithSeriesObjLength(objPtr);
|
||||
Tcl_Size j, size = TclArithSeriesObjLength(objPtr);
|
||||
|
||||
/* TODO - leave space in front and/or back? */
|
||||
if (ListRepInitAttempt(
|
||||
@@ -3300,13 +3301,14 @@ SetListFromAny(
|
||||
listRep.storePtr->numUsed = size;
|
||||
elemPtrs = listRep.storePtr->slots;
|
||||
for (j = 0; j < size; j++) {
|
||||
if (TclArithSeriesObjIndex(objPtr, j, &elemPtrs[j]) != TCL_OK) {
|
||||
elemPtrs[j] = TclArithSeriesObjIndex(interp, objPtr, j);
|
||||
if (elemPtrs[j] == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
ListSizeT estCount, length;
|
||||
Tcl_Size estCount, length;
|
||||
const char *limit, *nextElem = TclGetStringFromObj(objPtr, &length);
|
||||
|
||||
/*
|
||||
@@ -3333,7 +3335,7 @@ SetListFromAny(
|
||||
while (nextElem < limit) {
|
||||
const char *elemStart;
|
||||
char *check;
|
||||
ListSizeT elemSize;
|
||||
Tcl_Size elemSize;
|
||||
int literal;
|
||||
|
||||
if (TCL_OK != TclFindElement(interp, nextElem, limit - nextElem,
|
||||
@@ -3417,7 +3419,7 @@ UpdateStringOfList(
|
||||
{
|
||||
# define LOCAL_SIZE 64
|
||||
char localFlags[LOCAL_SIZE], *flagPtr = NULL;
|
||||
ListSizeT numElems, i, length;
|
||||
Tcl_Size numElems, i, length;
|
||||
TCL_HASH_TYPE bytesNeeded = 0;
|
||||
const char *elem, *start;
|
||||
char *dst;
|
||||
@@ -3514,17 +3516,10 @@ UpdateStringOfList(
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
Tcl_Obj *
|
||||
TclListTestObj (int length, int leadingSpace, int endSpace)
|
||||
TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace)
|
||||
{
|
||||
if (length < 0)
|
||||
length = 0;
|
||||
if (leadingSpace < 0)
|
||||
leadingSpace = 0;
|
||||
if (endSpace < 0)
|
||||
endSpace = 0;
|
||||
|
||||
ListRep listRep;
|
||||
ListSizeT capacity;
|
||||
size_t capacity;
|
||||
Tcl_Obj *listObj;
|
||||
|
||||
TclNewObj(listObj);
|
||||
@@ -3534,13 +3529,16 @@ TclListTestObj (int length, int leadingSpace, int endSpace)
|
||||
if (capacity == 0) {
|
||||
return listObj;
|
||||
}
|
||||
if (capacity > LIST_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ListRepInit(capacity, NULL, 0, &listRep);
|
||||
|
||||
ListStore *storePtr = listRep.storePtr;
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < length; ++i) {
|
||||
storePtr->slots[i + leadingSpace] = Tcl_NewIntObj(i);
|
||||
TclNewUIntObj(storePtr->slots[i + leadingSpace], i);
|
||||
Tcl_IncrRefCount(storePtr->slots[i + leadingSpace]);
|
||||
}
|
||||
storePtr->firstUsed = leadingSpace;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ NewNativeObj(
|
||||
#else
|
||||
Tcl_ExternalToUtfDString(NULL, (char *)string, -1, &ds);
|
||||
#endif
|
||||
return TclDStringToObj(&ds);
|
||||
return Tcl_DStringToObj(&ds);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1249,7 +1249,7 @@ TclOOSelfObjCmd(
|
||||
}
|
||||
case SELF_CALL:
|
||||
result[0] = TclOORenderCallChain(interp, contextPtr->callPtr);
|
||||
TclNewIntObj(result[1], contextPtr->index);
|
||||
TclNewIndexObj(result[1], contextPtr->index);
|
||||
Tcl_SetObjResult(interp, Tcl_NewListObj(2, result));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ static const char *tclOOSetupScript =
|
||||
"\t\t\t\t}]\n"
|
||||
"\t\t}\n"
|
||||
"\t}\n"
|
||||
"\tproc define::classmethod {name {args {}} {body {}}} {\n"
|
||||
"\tproc define::classmethod {name args} {\n"
|
||||
"\t\t::set argc [::llength [::info level 0]]\n"
|
||||
"\t\t::if {$argc == 3} {\n"
|
||||
"\t\t\t::return -code error -errorcode {TCL WRONGARGS} [::format \\\n"
|
||||
@@ -125,7 +125,7 @@ static const char *tclOOSetupScript =
|
||||
"\t\t}\n"
|
||||
"\t\t::set cls [::uplevel 1 self]\n"
|
||||
"\t\t::if {$argc == 4} {\n"
|
||||
"\t\t\t::oo::define [::oo::DelegateName $cls] method $name $args $body\n"
|
||||
"\t\t\t::oo::define [::oo::DelegateName $cls] method $name {*}$args\n"
|
||||
"\t\t}\n"
|
||||
"\t\t::tailcall forward $name myclass $name\n"
|
||||
"\t}\n"
|
||||
|
||||
@@ -2217,6 +2217,8 @@ Tcl_GetBoolFromObj(
|
||||
} else if (flags == (int)sizeof(short)) {
|
||||
*(short *)charPtr = result;
|
||||
return TCL_OK;
|
||||
} else {
|
||||
Tcl_Panic("Wrong bool var for %s", "Tcl_GetBoolFromObj");
|
||||
}
|
||||
}
|
||||
*charPtr = result;
|
||||
@@ -3396,6 +3398,90 @@ Tcl_GetWideIntFromObj(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_GetWideUIntFromObj --
|
||||
*
|
||||
* Attempt to return a unsigned wide integer from the Tcl object "objPtr". If the
|
||||
* object is not already a wide int object or a bignum object, an attempt will
|
||||
* be made to convert it to one.
|
||||
*
|
||||
* Results:
|
||||
* The return value is a standard Tcl object result. If an error occurs
|
||||
* during conversion, an error message is left in the interpreter's
|
||||
* result unless "interp" is NULL.
|
||||
*
|
||||
* Side effects:
|
||||
* If the object is not already an int object, the conversion will free
|
||||
* any old internal representation.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
Tcl_GetWideUIntFromObj(
|
||||
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
|
||||
Tcl_Obj *objPtr, /* Object from which to get a wide int. */
|
||||
Tcl_WideUInt *wideUIntPtr)
|
||||
/* Place to store resulting long. */
|
||||
{
|
||||
do {
|
||||
if (objPtr->typePtr == &tclIntType) {
|
||||
if (objPtr->internalRep.wideValue < 0) {
|
||||
wideUIntOutOfRange:
|
||||
if (interp != NULL) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"expected unsigned integer but got \"%s\"",
|
||||
TclGetString(objPtr)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
*wideUIntPtr = (Tcl_WideUInt)objPtr->internalRep.wideValue;
|
||||
return TCL_OK;
|
||||
}
|
||||
if (objPtr->typePtr == &tclDoubleType) {
|
||||
goto wideUIntOutOfRange;
|
||||
}
|
||||
if (objPtr->typePtr == &tclBignumType) {
|
||||
/*
|
||||
* Must check for those bignum values that can fit in a
|
||||
* Tcl_WideUInt, even when auto-narrowing is enabled.
|
||||
*/
|
||||
|
||||
mp_int big;
|
||||
Tcl_WideUInt value = 0;
|
||||
size_t numBytes;
|
||||
Tcl_WideUInt scratch;
|
||||
unsigned char *bytes = (unsigned char *) &scratch;
|
||||
|
||||
TclUnpackBignum(objPtr, big);
|
||||
if (big.sign == MP_NEG) {
|
||||
goto wideUIntOutOfRange;
|
||||
}
|
||||
if (mp_to_ubin(&big, bytes, sizeof(Tcl_WideUInt), &numBytes) == MP_OKAY) {
|
||||
while (numBytes-- > 0) {
|
||||
value = (value << CHAR_BIT) | *bytes++;
|
||||
}
|
||||
*wideUIntPtr = (Tcl_WideUInt)value;
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
if (interp != NULL) {
|
||||
const char *s = "integer value too large to represent";
|
||||
Tcl_Obj *msg = Tcl_NewStringObj(s, -1);
|
||||
|
||||
Tcl_SetObjResult(interp, msg);
|
||||
Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL);
|
||||
}
|
||||
return TCL_ERROR;
|
||||
}
|
||||
} while (TclParseNumber(interp, objPtr, "integer", NULL, -1, NULL,
|
||||
TCL_PARSE_INTEGER_ONLY)==TCL_OK);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -2295,7 +2295,7 @@ SetFsPathFromAny(
|
||||
Tcl_DStringFree(&userName);
|
||||
}
|
||||
|
||||
transPtr = TclDStringToObj(&temp);
|
||||
transPtr = Tcl_DStringToObj(&temp);
|
||||
|
||||
if (split != len) {
|
||||
/*
|
||||
@@ -2657,7 +2657,7 @@ TclGetHomeDirObj(
|
||||
if (MakeTildeRelativePath(interp, user, NULL, &dirString) != TCL_OK) {
|
||||
return NULL;
|
||||
}
|
||||
return TclDStringToObj(&dirString);
|
||||
return Tcl_DStringToObj(&dirString);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2729,7 +2729,7 @@ TclResolveTildePath(
|
||||
}
|
||||
Tcl_DStringFree(&userName);
|
||||
}
|
||||
return TclDStringToObj(&resolvedPath);
|
||||
return Tcl_DStringToObj(&resolvedPath);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ typedef struct PkgAvail {
|
||||
typedef struct PkgName {
|
||||
struct PkgName *nextPtr; /* Next in list of package names being
|
||||
* initialized. */
|
||||
char name[1];
|
||||
char name[TCLFLEXARRAY];
|
||||
} PkgName;
|
||||
|
||||
typedef struct PkgFiles {
|
||||
@@ -828,7 +828,7 @@ SelectPackage(
|
||||
* Push "ifneeded" package name in "tclPkgFiles" assocdata.
|
||||
*/
|
||||
|
||||
pkgName = (PkgName *)ckalloc(sizeof(PkgName) + strlen(name));
|
||||
pkgName = (PkgName *)ckalloc(offsetof(PkgName, name) + 1 + strlen(name));
|
||||
pkgName->nextPtr = pkgFiles->names;
|
||||
strcpy(pkgName->name, name);
|
||||
pkgFiles->names = pkgName;
|
||||
|
||||
+59
-45
@@ -84,7 +84,7 @@ const Tcl_ObjType tclProcBodyType = {
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* The [upvar]/[uplevel] level reference type. Uses the longValue field
|
||||
* The [upvar]/[uplevel] level reference type. Uses the wideValue field
|
||||
* to remember the integer value of a parsed #<integer> format.
|
||||
*
|
||||
* Uses the default behaviour throughout, and never disposes of the string
|
||||
@@ -151,9 +151,9 @@ static const Tcl_ObjType lambdaType = {
|
||||
#undef TclObjInterpProc
|
||||
int
|
||||
Tcl_ProcObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Size objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
@@ -339,7 +339,7 @@ Tcl_ProcObjCmd(
|
||||
}
|
||||
|
||||
if ((procArgs[0] == 'a') && (strncmp(procArgs, "args", 4) == 0)) {
|
||||
int numBytes;
|
||||
Tcl_Size numBytes;
|
||||
|
||||
procArgs +=4;
|
||||
while (*procArgs != '\0') {
|
||||
@@ -405,10 +405,10 @@ TclCreateProc(
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
|
||||
Proc *procPtr = NULL;
|
||||
int i, result, numArgs;
|
||||
Tcl_Size i, numArgs;
|
||||
CompiledLocal *localPtr = NULL;
|
||||
Tcl_Obj **argArray;
|
||||
int precompiled = 0;
|
||||
int precompiled = 0, result;
|
||||
|
||||
ProcGetInternalRep(bodyPtr, procPtr);
|
||||
if (procPtr != NULL) {
|
||||
@@ -445,7 +445,7 @@ TclCreateProc(
|
||||
|
||||
if (Tcl_IsShared(bodyPtr)) {
|
||||
const char *bytes;
|
||||
int length;
|
||||
Tcl_Size length;
|
||||
Tcl_Obj *sharedBodyPtr = bodyPtr;
|
||||
|
||||
bytes = TclGetStringFromObj(bodyPtr, &length);
|
||||
@@ -508,7 +508,7 @@ TclCreateProc(
|
||||
|
||||
for (i = 0; i < numArgs; i++) {
|
||||
const char *argname, *argnamei, *argnamelast;
|
||||
int fieldCount, nameLength;
|
||||
Tcl_Size fieldCount, nameLength;
|
||||
Tcl_Obj **fieldValues;
|
||||
|
||||
/*
|
||||
@@ -600,10 +600,9 @@ TclCreateProc(
|
||||
*/
|
||||
|
||||
if (localPtr->defValuePtr != NULL) {
|
||||
const char *tmpPtr = TclGetString(localPtr->defValuePtr);
|
||||
size_t tmpLength = localPtr->defValuePtr->length;
|
||||
const char *value = TclGetString(fieldValues[1]);
|
||||
size_t valueLength = fieldValues[1]->length;
|
||||
Tcl_Size tmpLength, valueLength;
|
||||
const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, &tmpLength);
|
||||
const char *value = TclGetStringFromObj(fieldValues[1], &valueLength);
|
||||
|
||||
if ((valueLength != tmpLength)
|
||||
|| memcmp(value, tmpPtr, tmpLength) != 0
|
||||
@@ -866,7 +865,7 @@ badLevel:
|
||||
|
||||
static int
|
||||
Uplevel_Callback(
|
||||
ClientData data[],
|
||||
void *data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
@@ -887,7 +886,7 @@ Uplevel_Callback(
|
||||
|
||||
int
|
||||
Tcl_UplevelObjCmd(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -897,7 +896,7 @@ Tcl_UplevelObjCmd(
|
||||
|
||||
int
|
||||
TclNRUplevelObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -920,7 +919,8 @@ TclNRUplevelObjCmd(
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "?level? command ?arg ...?");
|
||||
return TCL_ERROR;
|
||||
} else if (!TclHasStringRep(objv[1]) && objc == 2) {
|
||||
int status ,llength;
|
||||
int status;
|
||||
Tcl_Size llength;
|
||||
status = TclListObjLengthM(interp, objv[1], &llength);
|
||||
if (status == TCL_OK && llength > 1) {
|
||||
/* the first argument can't interpreted as a level. Avoid
|
||||
@@ -1141,6 +1141,7 @@ ProcWrongNumArgs(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
void
|
||||
TclInitCompiledLocals(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
@@ -1167,6 +1168,7 @@ TclInitCompiledLocals(
|
||||
|
||||
InitResolvedLocals(interp, codePtr, varPtr, nsPtr);
|
||||
}
|
||||
#endif /* TCL_NO_DEPRECATED */
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -1299,7 +1301,7 @@ TclFreeLocalCache(
|
||||
Tcl_Interp *interp,
|
||||
LocalCache *localCachePtr)
|
||||
{
|
||||
int i;
|
||||
Tcl_Size i;
|
||||
Tcl_Obj **namePtrPtr = &localCachePtr->varName0;
|
||||
|
||||
for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) {
|
||||
@@ -1319,8 +1321,8 @@ InitLocalCache(
|
||||
{
|
||||
Interp *iPtr = procPtr->iPtr;
|
||||
ByteCode *codePtr;
|
||||
int localCt = procPtr->numCompiledLocals;
|
||||
int numArgs = procPtr->numArgs, i = 0;
|
||||
Tcl_Size localCt = procPtr->numCompiledLocals;
|
||||
Tcl_Size numArgs = procPtr->numArgs, i = 0;
|
||||
|
||||
Tcl_Obj **namePtr;
|
||||
Var *varPtr;
|
||||
@@ -1483,7 +1485,7 @@ InitArgsAndLocals(
|
||||
|
||||
varPtr->flags = 0;
|
||||
if (defPtr && defPtr->flags & VAR_IS_ARGS) {
|
||||
Tcl_Obj *listPtr = Tcl_NewListObj(argCt-i, argObjs+i);
|
||||
Tcl_Obj *listPtr = Tcl_NewListObj((argCt>i)? argCt-i : 0, argObjs+i);
|
||||
|
||||
varPtr->value.objPtr = listPtr;
|
||||
Tcl_IncrRefCount(listPtr); /* Local var is a reference. */
|
||||
@@ -1553,11 +1555,11 @@ InitArgsAndLocals(
|
||||
|
||||
int
|
||||
TclPushProcCallFrame(
|
||||
ClientData clientData, /* Record describing procedure to be
|
||||
void *clientData, /* Record describing procedure to be
|
||||
* interpreted. */
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
int objc, /* Count of number of arguments to this
|
||||
Tcl_Size objc, /* Count of number of arguments to this
|
||||
* procedure. */
|
||||
Tcl_Obj *const objv[], /* Argument value objects. */
|
||||
int isLambda) /* 1 if this is a call by ApplyObjCmd: it
|
||||
@@ -1648,7 +1650,7 @@ TclPushProcCallFrame(
|
||||
|
||||
int
|
||||
TclObjInterpProc(
|
||||
ClientData clientData, /* Record describing procedure to be
|
||||
void *clientData, /* Record describing procedure to be
|
||||
* interpreted. */
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
@@ -1665,7 +1667,7 @@ TclObjInterpProc(
|
||||
|
||||
int
|
||||
TclNRInterpProc(
|
||||
ClientData clientData, /* Record describing procedure to be
|
||||
void *clientData, /* Record describing procedure to be
|
||||
* interpreted. */
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
@@ -1684,7 +1686,7 @@ TclNRInterpProc(
|
||||
|
||||
static int
|
||||
NRInterpProc2(
|
||||
ClientData clientData, /* Record describing procedure to be
|
||||
void *clientData, /* Record describing procedure to be
|
||||
* interpreted. */
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
@@ -1703,7 +1705,7 @@ NRInterpProc2(
|
||||
|
||||
static int
|
||||
ObjInterpProc2(
|
||||
ClientData clientData, /* Record describing procedure to be
|
||||
void *clientData, /* Record describing procedure to be
|
||||
* interpreted. */
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
@@ -1742,7 +1744,7 @@ TclNRInterpProcCore(
|
||||
Tcl_Interp *interp,/* Interpreter in which procedure was
|
||||
* invoked. */
|
||||
Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
|
||||
int skip, /* Number of initial arguments to be skipped,
|
||||
Tcl_Size skip, /* Number of initial arguments to be skipped,
|
||||
* i.e., words in the "command name". */
|
||||
ProcErrorProc *errorProc) /* How to convert results from the script into
|
||||
* results of the overall procedure. */
|
||||
@@ -1766,7 +1768,7 @@ TclNRInterpProcCore(
|
||||
#if defined(TCL_COMPILE_DEBUG)
|
||||
if (tclTraceExec >= 1) {
|
||||
CallFrame *framePtr = iPtr->varFramePtr;
|
||||
int i;
|
||||
Tcl_Size i;
|
||||
|
||||
if (framePtr->isProcCallFrame & FRAME_IS_LAMBDA) {
|
||||
fprintf(stdout, "Calling lambda ");
|
||||
@@ -1784,9 +1786,9 @@ TclNRInterpProcCore(
|
||||
|
||||
#ifdef USE_DTRACE
|
||||
if (TCL_DTRACE_PROC_ARGS_ENABLED()) {
|
||||
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
const char *a[10];
|
||||
int i;
|
||||
Tcl_Size i;
|
||||
|
||||
for (i = 0 ; i < 10 ; i++) {
|
||||
a[i] = (l < iPtr->varFramePtr->objc ?
|
||||
@@ -1805,7 +1807,7 @@ TclNRInterpProcCore(
|
||||
TclDecrRefCount(info);
|
||||
}
|
||||
if (TCL_DTRACE_PROC_ENTRY_ENABLED()) {
|
||||
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
|
||||
TCL_DTRACE_PROC_ENTRY(l < iPtr->varFramePtr->objc ?
|
||||
TclGetString(iPtr->varFramePtr->objv[l]) : NULL,
|
||||
@@ -1813,7 +1815,7 @@ TclNRInterpProcCore(
|
||||
(Tcl_Obj **)(iPtr->varFramePtr->objv + l + 1));
|
||||
}
|
||||
if (TCL_DTRACE_PROC_ENTRY_ENABLED()) {
|
||||
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
|
||||
TCL_DTRACE_PROC_ENTRY(l < iPtr->varFramePtr->objc ?
|
||||
TclGetString(iPtr->varFramePtr->objv[l]) : NULL,
|
||||
@@ -1836,7 +1838,7 @@ TclNRInterpProcCore(
|
||||
|
||||
static int
|
||||
InterpProcNR2(
|
||||
ClientData data[],
|
||||
void *data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
@@ -1847,7 +1849,7 @@ InterpProcNR2(
|
||||
ProcErrorProc *errorProc = (ProcErrorProc *)data[1];
|
||||
|
||||
if (TCL_DTRACE_PROC_RETURN_ENABLED()) {
|
||||
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
|
||||
TCL_DTRACE_PROC_RETURN(l < iPtr->varFramePtr->objc ?
|
||||
TclGetString(iPtr->varFramePtr->objv[l]) : NULL, result);
|
||||
@@ -1870,7 +1872,7 @@ InterpProcNR2(
|
||||
|
||||
done:
|
||||
if (TCL_DTRACE_PROC_RESULT_ENABLED()) {
|
||||
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
|
||||
Tcl_Obj *r = Tcl_GetObjResult(interp);
|
||||
|
||||
TCL_DTRACE_PROC_RESULT(l < iPtr->varFramePtr->objc ?
|
||||
@@ -2128,13 +2130,14 @@ MakeProcError(
|
||||
Tcl_Obj *procNameObj) /* Name of the procedure. Used for error
|
||||
* messages and trace information. */
|
||||
{
|
||||
int overflow, limit = 60, nameLen;
|
||||
int overflow, limit = 60;
|
||||
Tcl_Size nameLen;
|
||||
const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
|
||||
|
||||
overflow = (nameLen > limit);
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
|
||||
"\n (procedure \"%.*s%s\" line %d)",
|
||||
(overflow ? limit : nameLen), procName,
|
||||
(overflow ? limit : (int)nameLen), procName,
|
||||
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
|
||||
}
|
||||
|
||||
@@ -2160,7 +2163,7 @@ MakeProcError(
|
||||
|
||||
void
|
||||
TclProcDeleteProc(
|
||||
ClientData clientData) /* Procedure to be deleted. */
|
||||
void *clientData) /* Procedure to be deleted. */
|
||||
{
|
||||
Proc *procPtr = (Proc *)clientData;
|
||||
|
||||
@@ -2317,7 +2320,8 @@ TclUpdateReturnInfo(
|
||||
* of a function exported by a DLL exist.
|
||||
*
|
||||
* Results:
|
||||
* Returns the internal address of the TclObjInterpProc function.
|
||||
* Returns the internal address of the TclObjInterpProc/ObjInterpProc2
|
||||
* functions.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
@@ -2490,7 +2494,8 @@ SetLambdaFromAny(
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
const char *name;
|
||||
Tcl_Obj *argsPtr, *bodyPtr, *nsObjPtr, **objv;
|
||||
int isNew, objc, result;
|
||||
int isNew, result;
|
||||
Tcl_Size objc;
|
||||
CmdFrame *cfPtr = NULL;
|
||||
Proc *procPtr;
|
||||
|
||||
@@ -2503,6 +2508,14 @@ SetLambdaFromAny(
|
||||
* length is not 2, then it cannot be converted to lambdaType.
|
||||
*/
|
||||
|
||||
result = TclListObjLengthM(NULL, objPtr, &objc);
|
||||
if ((result != TCL_OK) || ((objc != 2) && (objc != 3))) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"can't interpret \"%s\" as a lambda expression",
|
||||
Tcl_GetString(objPtr)));
|
||||
Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
result = TclListObjGetElementsM(NULL, objPtr, &objc, &objv);
|
||||
if ((result != TCL_OK) || ((objc != 2) && (objc != 3))) {
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
@@ -2697,7 +2710,7 @@ TclGetLambdaFromObj(
|
||||
|
||||
int
|
||||
Tcl_ApplyObjCmd(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -2707,7 +2720,7 @@ Tcl_ApplyObjCmd(
|
||||
|
||||
int
|
||||
TclNRApplyObjCmd(
|
||||
TCL_UNUSED(ClientData),
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
@@ -2776,7 +2789,7 @@ TclNRApplyObjCmd(
|
||||
|
||||
static int
|
||||
ApplyNR2(
|
||||
ClientData data[],
|
||||
void *data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
@@ -2811,13 +2824,14 @@ MakeLambdaError(
|
||||
Tcl_Obj *procNameObj) /* Name of the procedure. Used for error
|
||||
* messages and trace information. */
|
||||
{
|
||||
int overflow, limit = 60, nameLen;
|
||||
int overflow, limit = 60;
|
||||
Tcl_Size nameLen;
|
||||
const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
|
||||
|
||||
overflow = (nameLen > limit);
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
|
||||
"\n (lambda term \"%.*s%s\" line %d)",
|
||||
(overflow ? limit : nameLen), procName,
|
||||
(overflow ? limit : (int)nameLen), procName,
|
||||
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -959,7 +959,7 @@ CompileRegexp(
|
||||
|
||||
if (TclReToGlob(NULL, string, length, &stringBuf, &exact,
|
||||
NULL) == TCL_OK) {
|
||||
regexpPtr->globObjPtr = TclDStringToObj(&stringBuf);
|
||||
regexpPtr->globObjPtr = Tcl_DStringToObj(&stringBuf);
|
||||
Tcl_IncrRefCount(regexpPtr->globObjPtr);
|
||||
} else {
|
||||
regexpPtr->globObjPtr = NULL;
|
||||
|
||||
+2
-2
@@ -993,7 +993,7 @@ Tcl_ScanObjCmd(
|
||||
* Scan a floating point number
|
||||
*/
|
||||
|
||||
objPtr = Tcl_NewDoubleObj(0.0);
|
||||
TclNewDoubleObj(objPtr, 0.0);
|
||||
Tcl_IncrRefCount(objPtr);
|
||||
if (width == 0) {
|
||||
width = ~0;
|
||||
@@ -1090,7 +1090,7 @@ Tcl_ScanObjCmd(
|
||||
if (code == TCL_OK) {
|
||||
if (underflow && (nconversions == 0)) {
|
||||
if (numVars) {
|
||||
TclNewIndexObj(objPtr, TCL_INDEX_NONE);
|
||||
TclNewIntObj(objPtr, -1);
|
||||
} else {
|
||||
if (objPtr) {
|
||||
Tcl_SetListObj(objPtr, 0, NULL);
|
||||
|
||||
+31
-30
@@ -261,34 +261,35 @@ static const int log2pow5[27] = {
|
||||
};
|
||||
#define N_LOG2POW5 27
|
||||
|
||||
static const Tcl_WideUInt wuipow5[27] = {
|
||||
(Tcl_WideUInt) 1, /* 5**0 */
|
||||
(Tcl_WideUInt) 5,
|
||||
(Tcl_WideUInt) 25,
|
||||
(Tcl_WideUInt) 125,
|
||||
(Tcl_WideUInt) 625,
|
||||
(Tcl_WideUInt) 3125, /* 5**5 */
|
||||
(Tcl_WideUInt) 3125*5,
|
||||
(Tcl_WideUInt) 3125*25,
|
||||
(Tcl_WideUInt) 3125*125,
|
||||
(Tcl_WideUInt) 3125*625,
|
||||
(Tcl_WideUInt) 3125*3125, /* 5**10 */
|
||||
(Tcl_WideUInt) 3125*3125*5,
|
||||
(Tcl_WideUInt) 3125*3125*25,
|
||||
(Tcl_WideUInt) 3125*3125*125,
|
||||
(Tcl_WideUInt) 3125*3125*625,
|
||||
(Tcl_WideUInt) 3125*3125*3125, /* 5**15 */
|
||||
(Tcl_WideUInt) 3125*3125*3125*5,
|
||||
(Tcl_WideUInt) 3125*3125*3125*25,
|
||||
(Tcl_WideUInt) 3125*3125*3125*125,
|
||||
(Tcl_WideUInt) 3125*3125*3125*625,
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125, /* 5**20 */
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*5,
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*25,
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*125,
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*625,
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*3125, /* 5**25 */
|
||||
(Tcl_WideUInt) 3125*3125*3125*3125*3125*5 /* 5**26 */
|
||||
static const Tcl_WideUInt wuipow5[] = {
|
||||
(Tcl_WideUInt) 1U, /* 5**0 */
|
||||
(Tcl_WideUInt) 5U,
|
||||
(Tcl_WideUInt) 25U,
|
||||
(Tcl_WideUInt) 125U,
|
||||
(Tcl_WideUInt) 625U,
|
||||
(Tcl_WideUInt) 3125U, /* 5**5 */
|
||||
(Tcl_WideUInt) 3125U*5U,
|
||||
(Tcl_WideUInt) 3125U*25U,
|
||||
(Tcl_WideUInt) 3125U*125U,
|
||||
(Tcl_WideUInt) 3125U*625U,
|
||||
(Tcl_WideUInt) 3125U*3125U, /* 5**10 */
|
||||
(Tcl_WideUInt) 3125U*3125U*5U,
|
||||
(Tcl_WideUInt) 3125U*3125U*25U,
|
||||
(Tcl_WideUInt) 3125U*3125U*125U,
|
||||
(Tcl_WideUInt) 3125U*3125U*625U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U, /* 5**15 */
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*5U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*25U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*125U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*625U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U, /* 5**20 */
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*5U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*25U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*125U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*625U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U, /* 5**25 */
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*5U,
|
||||
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*25U /* 5**27 */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -4552,7 +4553,7 @@ TclDoubleDigits(
|
||||
++m2plus;
|
||||
}
|
||||
|
||||
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
|
||||
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
|
||||
/*
|
||||
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
|
||||
* then all our intermediate calculations can be done using exact
|
||||
@@ -4609,7 +4610,7 @@ TclDoubleDigits(
|
||||
s2 -= b2; b2 = 0;
|
||||
}
|
||||
|
||||
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
|
||||
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
|
||||
/*
|
||||
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
|
||||
* then all our intermediate calculations can be done using exact
|
||||
|
||||
+21
-10
@@ -3859,9 +3859,10 @@ TclStringCmp(
|
||||
Tcl_Obj *value2Ptr,
|
||||
int checkEq, /* comparison is only for equality */
|
||||
int nocase, /* comparison is not case sensitive */
|
||||
int reqlength) /* requested length */
|
||||
int reqlength) /* requested length in characters;
|
||||
* TCL_INDEX_NONE to compare whole strings */
|
||||
{
|
||||
char *s1, *s2;
|
||||
const char *s1, *s2;
|
||||
int empty, length, match, s1len, s2len;
|
||||
memCmpFn_t memCmpFn;
|
||||
|
||||
@@ -3886,10 +3887,10 @@ TclStringCmp(
|
||||
} else if (TclHasInternalRep(value1Ptr, &tclUniCharStringType)
|
||||
&& TclHasInternalRep(value2Ptr, &tclUniCharStringType)) {
|
||||
/*
|
||||
* Do a unicode-specific comparison if both of the args are of
|
||||
* String type. If the char length == byte length, we can do a
|
||||
* memcmp. In benchmark testing this proved the most efficient
|
||||
* check between the unicode and string comparison operations.
|
||||
* Do a Unicode-specific comparison if both of the args are of String
|
||||
* type. If the char length == byte length, we can do a memcmp. In
|
||||
* benchmark testing this proved the most efficient check between the
|
||||
* Unicode and string comparison operations.
|
||||
*/
|
||||
|
||||
if (nocase) {
|
||||
@@ -3903,6 +3904,9 @@ TclStringCmp(
|
||||
&& (value1Ptr->bytes != NULL)
|
||||
&& (s2len == value2Ptr->length)
|
||||
&& (value2Ptr->bytes != NULL)) {
|
||||
/* each byte represents one character so s1l3n, s2l3n, and
|
||||
* reqlength are in both bytes and characters
|
||||
*/
|
||||
s1 = value1Ptr->bytes;
|
||||
s2 = value2Ptr->bytes;
|
||||
memCmpFn = memcmp;
|
||||
@@ -3919,6 +3923,9 @@ TclStringCmp(
|
||||
memCmpFn = memcmp;
|
||||
s1len *= sizeof(Tcl_UniChar);
|
||||
s2len *= sizeof(Tcl_UniChar);
|
||||
if (reqlength > 0) {
|
||||
reqlength *= sizeof(Tcl_UniChar);
|
||||
}
|
||||
} else {
|
||||
memCmpFn = (memCmpFn_t)(void *)TclUniCharNcmp;
|
||||
}
|
||||
@@ -3960,7 +3967,7 @@ TclStringCmp(
|
||||
s1 = TclGetStringFromObj(value1Ptr, &s1len);
|
||||
s2 = TclGetStringFromObj(value2Ptr, &s2len);
|
||||
}
|
||||
if (!nocase && checkEq) {
|
||||
if (!nocase && checkEq && reqlength < 0) {
|
||||
/*
|
||||
* When we have equal-length we can check only for
|
||||
* (in)equality. We can use memcmp in all (n)eq cases because
|
||||
@@ -3988,19 +3995,23 @@ TclStringCmp(
|
||||
}
|
||||
}
|
||||
|
||||
/* At this point s1len, s2len, and reqlength should by now have been
|
||||
* adjusted so that they are all in the units expected by the selected
|
||||
* comparison function.
|
||||
*/
|
||||
length = (s1len < s2len) ? s1len : s2len;
|
||||
if (reqlength > 0 && reqlength < length) {
|
||||
length = reqlength;
|
||||
} else if (reqlength < 0) {
|
||||
/*
|
||||
* The requested length is negative, so we ignore it by setting it
|
||||
* to length + 1 so we correct the match var.
|
||||
* The requested length is negative, so ignore it by setting it
|
||||
* to length + 1 to correct the match var.
|
||||
*/
|
||||
|
||||
reqlength = length + 1;
|
||||
}
|
||||
|
||||
if (checkEq && (s1len != s2len)) {
|
||||
if (checkEq && reqlength < 0 && (s1len != s2len)) {
|
||||
match = 1; /* This will be reversed below. */
|
||||
} else {
|
||||
/*
|
||||
|
||||
+12
-7
@@ -31,6 +31,10 @@
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#ifndef _TCLSTRINGREP
|
||||
#define _TCLSTRINGREP
|
||||
|
||||
|
||||
/*
|
||||
* The following structure is the internal rep for a String object. It keeps
|
||||
@@ -42,15 +46,15 @@
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
int numChars; /* The number of chars in the string. -1 means
|
||||
* this value has not been calculated. >= 0
|
||||
* means that there is a valid Unicode rep, or
|
||||
* that the number of UTF bytes == the number
|
||||
* of chars. */
|
||||
int allocated; /* The amount of space actually allocated for
|
||||
Tcl_Size numChars; /* The number of chars in the string.
|
||||
* TCL_INDEX_NONE means this value has not been
|
||||
* calculated. Any other means that there is a valid
|
||||
* Unicode rep, or that the number of UTF bytes ==
|
||||
* the number of chars. */
|
||||
Tcl_Size allocated; /* The amount of space actually allocated for
|
||||
* the UTF string (minus 1 byte for the
|
||||
* termination char). */
|
||||
int maxChars; /* Max number of chars that can fit in the
|
||||
Tcl_Size maxChars; /* Max number of chars that can fit in the
|
||||
* space allocated for the unicode array. */
|
||||
int hasUnicode; /* Boolean determining whether the string has
|
||||
* a Unicode representation. */
|
||||
@@ -84,6 +88,7 @@ typedef struct {
|
||||
((objPtr)->internalRep.twoPtrValue.ptr2 = NULL), \
|
||||
((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (stringPtr))
|
||||
|
||||
#endif /* _TCLSTRINGREP */
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
|
||||
+12
-2
@@ -232,6 +232,8 @@ int TclParseArgsObjv(Tcl_Interp *interp,
|
||||
#define TclBN_mp_mul_2d mp_mul_2d
|
||||
#define TclBN_mp_neg mp_neg
|
||||
#define TclBN_mp_or mp_or
|
||||
#define TclBN_mp_pack mp_pack
|
||||
#define TclBN_mp_pack_count mp_pack_count
|
||||
#define TclBN_mp_radix_size mp_radix_size
|
||||
#define TclBN_mp_reverse mp_reverse
|
||||
#define TclBN_mp_read_radix mp_read_radix
|
||||
@@ -380,6 +382,7 @@ mp_err TclBN_mp_mul_d(const mp_int *a, unsigned int b, mp_int *c) {
|
||||
# define TclGetLoadedPackages 0
|
||||
# undef TclSetPreInitScript
|
||||
# define TclSetPreInitScript 0
|
||||
# define TclInitCompiledLocals 0
|
||||
#else
|
||||
|
||||
#define TclGuessPackageName guessPackageName
|
||||
@@ -794,6 +797,7 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
|
||||
# undef TclBN_s_mp_sub
|
||||
# define TclBN_s_mp_sub 0
|
||||
# define Tcl_MakeSafe 0
|
||||
# define TclpHasSockets 0
|
||||
#else /* TCL_NO_DEPRECATED */
|
||||
# define Tcl_SeekOld seekOld
|
||||
# define Tcl_TellOld tellOld
|
||||
@@ -817,6 +821,8 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
|
||||
# define TclpGmtime_unix TclpGmtime
|
||||
# define Tcl_MakeSafe TclMakeSafe
|
||||
|
||||
int TclpHasSockets(TCL_UNUSED(Tcl_Interp *)) {return TCL_OK;}
|
||||
|
||||
static int
|
||||
seekOld(
|
||||
Tcl_Channel chan, /* The channel on which to seek. */
|
||||
@@ -1321,12 +1327,12 @@ const TclTomMathStubs tclTomMathStubs = {
|
||||
TclBN_mp_get_mag_u64, /* 69 */
|
||||
TclBN_mp_set_i64, /* 70 */
|
||||
TclBN_mp_unpack, /* 71 */
|
||||
0, /* 72 */
|
||||
TclBN_mp_pack, /* 72 */
|
||||
TclBN_mp_tc_and, /* 73 */
|
||||
TclBN_mp_tc_or, /* 74 */
|
||||
TclBN_mp_tc_xor, /* 75 */
|
||||
TclBN_mp_signed_rsh, /* 76 */
|
||||
0, /* 77 */
|
||||
TclBN_mp_pack_count, /* 77 */
|
||||
TclBN_mp_to_ubin, /* 78 */
|
||||
TclBN_mp_div_ld, /* 79 */
|
||||
TclBN_mp_to_radix, /* 80 */
|
||||
@@ -2049,6 +2055,10 @@ const TclStubs tclStubs = {
|
||||
Tcl_GetNumber, /* 681 */
|
||||
Tcl_RemoveChannelMode, /* 682 */
|
||||
Tcl_GetEncodingNulLength, /* 683 */
|
||||
Tcl_GetWideUIntFromObj, /* 684 */
|
||||
Tcl_DStringToObj, /* 685 */
|
||||
0, /* 686 */
|
||||
TclUnusedStubEntry, /* 687 */
|
||||
};
|
||||
|
||||
/* !END!: Do not edit above this line. */
|
||||
|
||||
+57
-24
@@ -20,10 +20,12 @@
|
||||
#ifndef USE_TCL_STUBS
|
||||
# define USE_TCL_STUBS
|
||||
#endif
|
||||
#undef TCL_UTF_MAX
|
||||
#ifdef TCL_NO_DEPRECATED
|
||||
# define TCL_UTF_MAX 4
|
||||
#else
|
||||
# define TCL_NO_DEPRECATED
|
||||
# define TCL_UTF_MAX 3
|
||||
#endif
|
||||
#include "tclInt.h"
|
||||
#ifdef TCL_WITH_EXTERNAL_TOMMATH
|
||||
@@ -298,7 +300,7 @@ static Tcl_ObjCmdProc TestprintObjCmd;
|
||||
static Tcl_ObjCmdProc TestregexpObjCmd;
|
||||
static Tcl_ObjCmdProc TestreturnObjCmd;
|
||||
static void TestregexpXflags(const char *string,
|
||||
int length, int *cflagsPtr, int *eflagsPtr);
|
||||
size_t length, int *cflagsPtr, int *eflagsPtr);
|
||||
#ifndef TCL_NO_DEPRECATED
|
||||
static Tcl_ObjCmdProc TestsaveresultCmd;
|
||||
static void TestsaveresultFree(char *blockPtr);
|
||||
@@ -552,7 +554,7 @@ Tcltest_Init(
|
||||
{
|
||||
Tcl_CmdInfo info;
|
||||
Tcl_Obj **objv, *objPtr;
|
||||
size_t objc;
|
||||
Tcl_Size objc;
|
||||
int index;
|
||||
static const char *const specialOptions[] = {
|
||||
"-appinitprocerror", "-appinitprocdeleteinterp",
|
||||
@@ -997,7 +999,8 @@ AsyncHandlerProc(
|
||||
{
|
||||
TestAsyncHandler *asyncPtr;
|
||||
int id = PTR2INT(clientData);
|
||||
const char *listArgv[4], *cmd;
|
||||
const char *listArgv[4];
|
||||
char *cmd;
|
||||
char string[TCL_INTEGER_SPACE];
|
||||
|
||||
Tcl_MutexLock(&asyncTestMutex);
|
||||
@@ -1934,6 +1937,11 @@ TestdstringCmd(
|
||||
goto wrongNumArgs;
|
||||
}
|
||||
Tcl_DStringResult(interp, &dstring);
|
||||
} else if (strcmp(argv[1], "toobj") == 0) {
|
||||
if (argc != 2) {
|
||||
goto wrongNumArgs;
|
||||
}
|
||||
Tcl_SetObjResult(interp, Tcl_DStringToObj(&dstring));
|
||||
} else if (strcmp(argv[1], "trunc") == 0) {
|
||||
if (argc != 3) {
|
||||
goto wrongNumArgs;
|
||||
@@ -1949,8 +1957,8 @@ TestdstringCmd(
|
||||
Tcl_DStringStartSublist(&dstring);
|
||||
} else {
|
||||
Tcl_AppendResult(interp, "bad option \"", argv[1],
|
||||
"\": must be append, element, end, free, get, length, "
|
||||
"result, trunc, or start", NULL);
|
||||
"\": must be append, element, end, free, get, gresult, length, "
|
||||
"result, start, toobj, or trunc", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
return TCL_OK;
|
||||
@@ -3114,12 +3122,29 @@ TestlinkCmd(
|
||||
tmp = Tcl_NewWideIntObj(longVar);
|
||||
Tcl_AppendElement(interp, Tcl_GetString(tmp));
|
||||
Tcl_DecrRefCount(tmp);
|
||||
tmp = Tcl_NewWideIntObj((long)ulongVar);
|
||||
#ifdef TCL_WIDE_INT_IS_LONG
|
||||
if (ulongVar > WIDE_MAX) {
|
||||
mp_int bignumValue;
|
||||
if (mp_init_u64(&bignumValue, ulongVar) != MP_OKAY) {
|
||||
Tcl_Panic("%s: memory overflow", "Tcl_SetWideUIntObj");
|
||||
}
|
||||
tmp = Tcl_NewBignumObj(&bignumValue);
|
||||
} else
|
||||
#endif /* TCL_WIDE_INT_IS_LONG */
|
||||
tmp = Tcl_NewWideIntObj((Tcl_WideInt)ulongVar);
|
||||
Tcl_AppendElement(interp, Tcl_GetString(tmp));
|
||||
Tcl_DecrRefCount(tmp);
|
||||
Tcl_PrintDouble(NULL, (double)floatVar, buffer);
|
||||
Tcl_AppendElement(interp, buffer);
|
||||
tmp = Tcl_NewWideIntObj((Tcl_WideInt)uwideVar);
|
||||
if (uwideVar > WIDE_MAX) {
|
||||
mp_int bignumValue;
|
||||
if (mp_init_u64(&bignumValue, uwideVar) != MP_OKAY) {
|
||||
Tcl_Panic("%s: memory overflow", "Tcl_SetWideUIntObj");
|
||||
}
|
||||
tmp = Tcl_NewBignumObj(&bignumValue);
|
||||
} else {
|
||||
tmp = Tcl_NewWideIntObj((Tcl_WideInt)uwideVar);
|
||||
}
|
||||
Tcl_AppendElement(interp, Tcl_GetString(tmp));
|
||||
Tcl_DecrRefCount(tmp);
|
||||
} else if (strcmp(argv[1], "set") == 0) {
|
||||
@@ -3525,24 +3550,28 @@ TestlistrepCmd(
|
||||
Tcl_WrongNumArgs(interp, 2, objv, "length ?leadSpace endSpace?");
|
||||
return TCL_ERROR;
|
||||
} else {
|
||||
int length;
|
||||
int leadSpace = 0;
|
||||
int endSpace = 0;
|
||||
if (Tcl_GetIntFromObj(interp, objv[2], &length) != TCL_OK) {
|
||||
Tcl_WideUInt length;
|
||||
Tcl_WideUInt leadSpace = 0;
|
||||
Tcl_WideUInt endSpace = 0;
|
||||
if (Tcl_GetWideUIntFromObj(interp, objv[2], &length) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (objc > 3) {
|
||||
if (Tcl_GetIntFromObj(interp, objv[3], &leadSpace) != TCL_OK) {
|
||||
if (Tcl_GetWideUIntFromObj(interp, objv[3], &leadSpace) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (objc > 4) {
|
||||
if (Tcl_GetIntFromObj(interp, objv[4], &endSpace)
|
||||
if (Tcl_GetWideUIntFromObj(interp, objv[4], &endSpace)
|
||||
!= TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
resultObj = TclListTestObj(length, leadSpace, endSpace);
|
||||
if (resultObj == NULL) {
|
||||
Tcl_AppendResult(interp, "List capacity exceeded", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -3559,7 +3588,7 @@ TestlistrepCmd(
|
||||
return TCL_ERROR;
|
||||
} else {
|
||||
Tcl_Obj **objs;
|
||||
ListSizeT nobjs;
|
||||
Tcl_Size nobjs;
|
||||
ListRep listRep;
|
||||
Tcl_Obj *listRepObjs[4];
|
||||
|
||||
@@ -4340,11 +4369,11 @@ TestregexpObjCmd(
|
||||
static void
|
||||
TestregexpXflags(
|
||||
const char *string, /* The string of flags. */
|
||||
int length, /* The length of the string in bytes. */
|
||||
size_t length, /* The length of the string in bytes. */
|
||||
int *cflagsPtr, /* compile flags word */
|
||||
int *eflagsPtr) /* exec flags word */
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int cflags, eflags;
|
||||
|
||||
cflags = *cflagsPtr;
|
||||
@@ -5362,12 +5391,17 @@ TestsetbytearraylengthObjCmd(
|
||||
if (TCL_OK != Tcl_GetIntFromObj(interp, objv[2], &n)) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (Tcl_IsShared(objv[1])) {
|
||||
obj = Tcl_DuplicateObj(objv[1]);
|
||||
} else {
|
||||
obj = objv[1];
|
||||
obj = objv[1];
|
||||
if (Tcl_IsShared(obj)) {
|
||||
obj = Tcl_DuplicateObj(obj);
|
||||
}
|
||||
if (Tcl_SetByteArrayLength(obj, n) == NULL) {
|
||||
if (obj != objv[1]) {
|
||||
Tcl_DecrRefCount(obj);
|
||||
}
|
||||
Tcl_AppendResult(interp, "expected bytes", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_SetByteArrayLength(obj, n);
|
||||
Tcl_SetObjResult(interp, obj);
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -6651,15 +6685,14 @@ TestWrongNumArgsObjCmd(
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int i;
|
||||
int length;
|
||||
int i, length;
|
||||
const char *msg;
|
||||
|
||||
if (objc < 3) {
|
||||
goto insufArgs;
|
||||
}
|
||||
|
||||
if (Tcl_GetIntFromObj(interp, objv[1], &i) != TCL_OK) {
|
||||
if (Tcl_GetIntForIndex(interp, objv[1], TCL_INDEX_NONE, &i) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -247,6 +247,10 @@ declare 71 {
|
||||
mp_err MP_WUR TclBN_mp_unpack(mp_int *rop, size_t count, mp_order order, size_t size,
|
||||
mp_endian endian, size_t nails, const void *op)
|
||||
}
|
||||
declare 72 {
|
||||
mp_err MP_WUR TclBN_mp_pack(void *rop, size_t maxcount, size_t *written, mp_order order,
|
||||
size_t size, mp_endian endian, size_t nails, const mp_int *op)
|
||||
}
|
||||
|
||||
# Added in libtommath 1.1.0
|
||||
declare 73 {deprecated {merged with mp_and}} {
|
||||
@@ -261,6 +265,9 @@ declare 75 {deprecated {merged with mp_xor}} {
|
||||
declare 76 {
|
||||
mp_err MP_WUR TclBN_mp_signed_rsh(const mp_int *a, int b, mp_int *c)
|
||||
}
|
||||
declare 77 {
|
||||
size_t MP_WUR TclBN_mp_pack_count(const mp_int *a, size_t nails, size_t size)
|
||||
}
|
||||
|
||||
# Added in libtommath 1.2.0
|
||||
declare 78 {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#ifdef MP_NO_STDINT
|
||||
# ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#else
|
||||
# else
|
||||
# include "../compat/stdint.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -125,6 +125,8 @@ MODULE_SCOPE mp_err TclBN_mp_set_int(mp_int *a, unsigned long b);
|
||||
#define mp_mul_2d TclBN_mp_mul_2d
|
||||
#define mp_neg TclBN_mp_neg
|
||||
#define mp_or TclBN_mp_or
|
||||
#define mp_pack TclBN_mp_pack
|
||||
#define mp_pack_count TclBN_mp_pack_count
|
||||
#define mp_radix_size TclBN_mp_radix_size
|
||||
#define mp_read_radix TclBN_mp_read_radix
|
||||
#define mp_rshd TclBN_mp_rshd
|
||||
@@ -394,7 +396,11 @@ EXTERN mp_err TclBN_mp_unpack(mp_int *rop, size_t count,
|
||||
mp_order order, size_t size,
|
||||
mp_endian endian, size_t nails,
|
||||
const void *op) MP_WUR;
|
||||
/* Slot 72 is reserved */
|
||||
/* 72 */
|
||||
EXTERN mp_err TclBN_mp_pack(void *rop, size_t maxcount,
|
||||
size_t *written, mp_order order, size_t size,
|
||||
mp_endian endian, size_t nails,
|
||||
const mp_int *op) MP_WUR;
|
||||
/* 73 */
|
||||
TCL_DEPRECATED("merged with mp_and")
|
||||
mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b,
|
||||
@@ -410,7 +416,9 @@ mp_err TclBN_mp_tc_xor(const mp_int *a, const mp_int *b,
|
||||
/* 76 */
|
||||
EXTERN mp_err TclBN_mp_signed_rsh(const mp_int *a, int b,
|
||||
mp_int *c) MP_WUR;
|
||||
/* Slot 77 is reserved */
|
||||
/* 77 */
|
||||
EXTERN size_t TclBN_mp_pack_count(const mp_int *a, size_t nails,
|
||||
size_t size) MP_WUR;
|
||||
/* 78 */
|
||||
EXTERN int TclBN_mp_to_ubin(const mp_int *a, unsigned char *buf,
|
||||
size_t maxlen, size_t *written) MP_WUR;
|
||||
@@ -497,12 +505,12 @@ typedef struct TclTomMathStubs {
|
||||
uint64_t (*tclBN_mp_get_mag_u64) (const mp_int *a) MP_WUR; /* 69 */
|
||||
void (*tclBN_mp_set_i64) (mp_int *a, int64_t i); /* 70 */
|
||||
mp_err (*tclBN_mp_unpack) (mp_int *rop, size_t count, mp_order order, size_t size, mp_endian endian, size_t nails, const void *op) MP_WUR; /* 71 */
|
||||
void (*reserved72)(void);
|
||||
mp_err (*tclBN_mp_pack) (void *rop, size_t maxcount, size_t *written, mp_order order, size_t size, mp_endian endian, size_t nails, const mp_int *op) MP_WUR; /* 72 */
|
||||
TCL_DEPRECATED_API("merged with mp_and") mp_err (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
|
||||
TCL_DEPRECATED_API("merged with mp_or") mp_err (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
|
||||
TCL_DEPRECATED_API("merged with mp_xor") mp_err (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
|
||||
mp_err (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c) MP_WUR; /* 76 */
|
||||
void (*reserved77)(void);
|
||||
size_t (*tclBN_mp_pack_count) (const mp_int *a, size_t nails, size_t size) MP_WUR; /* 77 */
|
||||
int (*tclBN_mp_to_ubin) (const mp_int *a, unsigned char *buf, size_t maxlen, size_t *written) MP_WUR; /* 78 */
|
||||
mp_err (*tclBN_mp_div_ld) (const mp_int *a, uint64_t b, mp_int *q, uint64_t *r) MP_WUR; /* 79 */
|
||||
int (*tclBN_mp_to_radix) (const mp_int *a, char *str, size_t maxlen, size_t *written, int radix) MP_WUR; /* 80 */
|
||||
@@ -664,7 +672,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
|
||||
(tclTomMathStubsPtr->tclBN_mp_set_i64) /* 70 */
|
||||
#define TclBN_mp_unpack \
|
||||
(tclTomMathStubsPtr->tclBN_mp_unpack) /* 71 */
|
||||
/* Slot 72 is reserved */
|
||||
#define TclBN_mp_pack \
|
||||
(tclTomMathStubsPtr->tclBN_mp_pack) /* 72 */
|
||||
#define TclBN_mp_tc_and \
|
||||
(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
|
||||
#define TclBN_mp_tc_or \
|
||||
@@ -673,7 +682,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
|
||||
(tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
|
||||
#define TclBN_mp_signed_rsh \
|
||||
(tclTomMathStubsPtr->tclBN_mp_signed_rsh) /* 76 */
|
||||
/* Slot 77 is reserved */
|
||||
#define TclBN_mp_pack_count \
|
||||
(tclTomMathStubsPtr->tclBN_mp_pack_count) /* 77 */
|
||||
#define TclBN_mp_to_ubin \
|
||||
(tclTomMathStubsPtr->tclBN_mp_to_ubin) /* 78 */
|
||||
#define TclBN_mp_div_ld \
|
||||
|
||||
+136
-117
@@ -21,8 +21,8 @@
|
||||
typedef struct {
|
||||
int flags; /* Operations for which Tcl command is to be
|
||||
* invoked. */
|
||||
size_t length; /* Number of non-NUL chars. in command. */
|
||||
char command[1]; /* Space for Tcl command to invoke. Actual
|
||||
Tcl_Size length; /* Number of non-NUL chars. in command. */
|
||||
char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
|
||||
* size will be as large as necessary to hold
|
||||
* command. This field must be the last in the
|
||||
* structure, so that it can be larger than 1
|
||||
@@ -41,10 +41,10 @@ typedef struct {
|
||||
typedef struct {
|
||||
int flags; /* Operations for which Tcl command is to be
|
||||
* invoked. */
|
||||
size_t length; /* Number of non-NUL chars. in command. */
|
||||
Tcl_Size length; /* Number of non-NUL chars. in command. */
|
||||
Tcl_Trace stepTrace; /* Used for execution traces, when tracing
|
||||
* inside the given command */
|
||||
int startLevel; /* Used for bookkeeping with step execution
|
||||
Tcl_Size startLevel; /* Used for bookkeeping with step execution
|
||||
* traces, store the level at which the step
|
||||
* trace was invoked */
|
||||
char *startCmd; /* Used for bookkeeping with step execution
|
||||
@@ -56,7 +56,7 @@ typedef struct {
|
||||
* deleted too early. Keeps track of how many
|
||||
* pieces of code have a pointer to this
|
||||
* structure. */
|
||||
char command[1]; /* Space for Tcl command to invoke. Actual
|
||||
char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
|
||||
* size will be as large as necessary to hold
|
||||
* command. This field must be the last in the
|
||||
* structure, so that it can be larger than 1
|
||||
@@ -92,8 +92,15 @@ typedef struct {
|
||||
* Forward declarations for functions defined in this file:
|
||||
*/
|
||||
|
||||
typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, int optionIndex,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
/* 'OLD' options are pre-Tcl-8.4 style */
|
||||
enum traceOptionsEnum {
|
||||
TRACE_ADD, TRACE_INFO, TRACE_REMOVE
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
,TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
|
||||
#endif
|
||||
};
|
||||
typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, enum traceOptionsEnum optionIndex,
|
||||
Tcl_Size objc, Tcl_Obj *const objv[]);
|
||||
|
||||
static Tcl_TraceTypeObjCmd TraceVariableObjCmd;
|
||||
static Tcl_TraceTypeObjCmd TraceCommandObjCmd;
|
||||
@@ -120,19 +127,19 @@ static Tcl_TraceTypeObjCmd *const traceSubCmds[] = {
|
||||
*/
|
||||
|
||||
static int CallTraceFunction(Tcl_Interp *interp, Trace *tracePtr,
|
||||
Command *cmdPtr, const char *command, int numChars,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
static char * TraceVarProc(ClientData clientData, Tcl_Interp *interp,
|
||||
Command *cmdPtr, const char *command, Tcl_Size numChars,
|
||||
Tcl_Size objc, Tcl_Obj *const objv[]);
|
||||
static char * TraceVarProc(void *clientData, Tcl_Interp *interp,
|
||||
const char *name1, const char *name2, int flags);
|
||||
static void TraceCommandProc(ClientData clientData,
|
||||
static void TraceCommandProc(void *clientData,
|
||||
Tcl_Interp *interp, const char *oldName,
|
||||
const char *newName, int flags);
|
||||
static Tcl_CmdObjTraceProc TraceExecutionProc;
|
||||
static int StringTraceProc(ClientData clientData,
|
||||
Tcl_Interp *interp, int level,
|
||||
static int StringTraceProc(void *clientData,
|
||||
Tcl_Interp *interp, Tcl_Size level,
|
||||
const char *command, Tcl_Command commandInfo,
|
||||
int objc, Tcl_Obj *const objv[]);
|
||||
static void StringTraceDeleteProc(ClientData clientData);
|
||||
Tcl_Size objc, Tcl_Obj *const objv[]);
|
||||
static void StringTraceDeleteProc(void *clientData);
|
||||
static void DisposeTraceResult(int flags, char *result);
|
||||
static int TraceVarEx(Tcl_Interp *interp, const char *part1,
|
||||
const char *part2, VarTrace *tracePtr);
|
||||
@@ -143,7 +150,7 @@ static int TraceVarEx(Tcl_Interp *interp, const char *part1,
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
ClientData clientData; /* Client data from Tcl_CreateTrace */
|
||||
void *clientData; /* Client data from Tcl_CreateTrace */
|
||||
Tcl_CmdTraceProc *proc; /* Trace function from Tcl_CreateTrace */
|
||||
} StringTraceData;
|
||||
|
||||
@@ -185,10 +192,9 @@ int
|
||||
Tcl_TraceObjCmd(
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Size objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int optionIndex;
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
const char *name;
|
||||
const char *flagOps, *p;
|
||||
@@ -201,13 +207,7 @@ Tcl_TraceObjCmd(
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
/* 'OLD' options are pre-Tcl-8.4 style */
|
||||
enum traceOptionsEnum {
|
||||
TRACE_ADD, TRACE_INFO, TRACE_REMOVE,
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
|
||||
#endif
|
||||
};
|
||||
int optionIndex;
|
||||
|
||||
if (objc < 2) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
|
||||
@@ -237,7 +237,7 @@ Tcl_TraceObjCmd(
|
||||
0, &typeIndex) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
return traceSubCmds[typeIndex](interp, optionIndex, objc, objv);
|
||||
return traceSubCmds[typeIndex](interp, (enum traceOptionsEnum)optionIndex, objc, objv);
|
||||
}
|
||||
case TRACE_INFO: {
|
||||
/*
|
||||
@@ -260,7 +260,7 @@ Tcl_TraceObjCmd(
|
||||
0, &typeIndex) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
return traceSubCmds[typeIndex](interp, optionIndex, objc, objv);
|
||||
return traceSubCmds[typeIndex](interp, (enum traceOptionsEnum)optionIndex, objc, objv);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ Tcl_TraceObjCmd(
|
||||
return code;
|
||||
}
|
||||
case TRACE_OLD_VINFO: {
|
||||
ClientData clientData;
|
||||
void *clientData;
|
||||
char ops[5];
|
||||
Tcl_Obj *resultListPtr, *pairObjPtr, *elemObjPtr;
|
||||
|
||||
@@ -397,16 +397,12 @@ Tcl_TraceObjCmd(
|
||||
static int
|
||||
TraceExecutionObjCmd(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int optionIndex, /* Add, info or remove */
|
||||
int objc, /* Number of arguments. */
|
||||
enum traceOptionsEnum optionIndex, /* Add, info or remove */
|
||||
Tcl_Size objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int commandLength, index;
|
||||
const char *name, *command;
|
||||
size_t length;
|
||||
enum traceOptions {
|
||||
TRACE_ADD, TRACE_INFO, TRACE_REMOVE
|
||||
};
|
||||
Tcl_Size length;
|
||||
static const char *const opStrings[] = {
|
||||
"enter", "leave", "enterstep", "leavestep", NULL
|
||||
};
|
||||
@@ -414,12 +410,13 @@ TraceExecutionObjCmd(
|
||||
TRACE_EXEC_ENTER, TRACE_EXEC_LEAVE,
|
||||
TRACE_EXEC_ENTER_STEP, TRACE_EXEC_LEAVE_STEP
|
||||
};
|
||||
int index;
|
||||
|
||||
switch ((enum traceOptions) optionIndex) {
|
||||
switch (optionIndex) {
|
||||
case TRACE_ADD:
|
||||
case TRACE_REMOVE: {
|
||||
int flags = 0;
|
||||
int i, listLen, result;
|
||||
int flags = 0, result;
|
||||
Tcl_Size i, listLen;
|
||||
Tcl_Obj **elemPtrs;
|
||||
|
||||
if (objc != 6) {
|
||||
@@ -432,7 +429,7 @@ TraceExecutionObjCmd(
|
||||
* pointer to its array of element pointers.
|
||||
*/
|
||||
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
result = TclListObjLengthM(interp, objv[4], &listLen);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -444,6 +441,10 @@ TraceExecutionObjCmd(
|
||||
NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
for (i = 0; i < listLen; i++) {
|
||||
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
|
||||
"operation", TCL_EXACT, &index) != TCL_OK) {
|
||||
@@ -464,9 +465,8 @@ TraceExecutionObjCmd(
|
||||
break;
|
||||
}
|
||||
}
|
||||
command = TclGetStringFromObj(objv[5], &commandLength);
|
||||
length = (size_t) commandLength;
|
||||
if ((enum traceOptions) optionIndex == TRACE_ADD) {
|
||||
command = TclGetStringFromObj(objv[5], &length);
|
||||
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
|
||||
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
|
||||
offsetof(TraceCommandInfo, command) + 1 + length);
|
||||
|
||||
@@ -495,7 +495,7 @@ TraceExecutionObjCmd(
|
||||
* first one that matches.
|
||||
*/
|
||||
|
||||
ClientData clientData;
|
||||
void *clientData;
|
||||
|
||||
/*
|
||||
* First ensure the name given is valid.
|
||||
@@ -519,7 +519,7 @@ TraceExecutionObjCmd(
|
||||
&& ((tcmdPtr->flags & (TCL_TRACE_ANY_EXEC |
|
||||
TCL_TRACE_RENAME | TCL_TRACE_DELETE)) == flags)
|
||||
&& (strncmp(command, tcmdPtr->command,
|
||||
(size_t) length) == 0)) {
|
||||
length) == 0)) {
|
||||
flags |= TCL_TRACE_DELETE;
|
||||
if (flags & (TCL_TRACE_ENTER_DURING_EXEC |
|
||||
TCL_TRACE_LEAVE_DURING_EXEC)) {
|
||||
@@ -554,7 +554,7 @@ TraceExecutionObjCmd(
|
||||
break;
|
||||
}
|
||||
case TRACE_INFO: {
|
||||
ClientData clientData;
|
||||
void *clientData;
|
||||
Tcl_Obj *resultListPtr;
|
||||
|
||||
if (objc != 4) {
|
||||
@@ -574,7 +574,7 @@ TraceExecutionObjCmd(
|
||||
|
||||
resultListPtr = Tcl_NewListObj(0, NULL);
|
||||
FOREACH_COMMAND_TRACE(interp, name, clientData) {
|
||||
int numOps = 0;
|
||||
Tcl_Size numOps = 0;
|
||||
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
|
||||
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
|
||||
|
||||
@@ -619,6 +619,10 @@ TraceExecutionObjCmd(
|
||||
Tcl_SetObjResult(interp, resultListPtr);
|
||||
break;
|
||||
}
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
default:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -645,22 +649,21 @@ TraceExecutionObjCmd(
|
||||
static int
|
||||
TraceCommandObjCmd(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int optionIndex, /* Add, info or remove */
|
||||
int objc, /* Number of arguments. */
|
||||
enum traceOptionsEnum optionIndex, /* Add, info or remove */
|
||||
Tcl_Size objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int commandLength, index;
|
||||
const char *name, *command;
|
||||
size_t length;
|
||||
enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE };
|
||||
Tcl_Size length;
|
||||
static const char *const opStrings[] = { "delete", "rename", NULL };
|
||||
enum operations { TRACE_CMD_DELETE, TRACE_CMD_RENAME };
|
||||
int index;
|
||||
|
||||
switch ((enum traceOptions) optionIndex) {
|
||||
switch (optionIndex) {
|
||||
case TRACE_ADD:
|
||||
case TRACE_REMOVE: {
|
||||
int flags = 0;
|
||||
int i, listLen, result;
|
||||
int flags = 0, result;
|
||||
Tcl_Size i, listLen;
|
||||
Tcl_Obj **elemPtrs;
|
||||
|
||||
if (objc != 6) {
|
||||
@@ -673,7 +676,7 @@ TraceCommandObjCmd(
|
||||
* pointer to its array of element pointers.
|
||||
*/
|
||||
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
result = TclListObjLengthM(interp, objv[4], &listLen);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -685,7 +688,10 @@ TraceCommandObjCmd(
|
||||
NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
for (i = 0; i < listLen; i++) {
|
||||
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
|
||||
"operation", TCL_EXACT, &index) != TCL_OK) {
|
||||
@@ -701,9 +707,8 @@ TraceCommandObjCmd(
|
||||
}
|
||||
}
|
||||
|
||||
command = TclGetStringFromObj(objv[5], &commandLength);
|
||||
length = (size_t) commandLength;
|
||||
if ((enum traceOptions) optionIndex == TRACE_ADD) {
|
||||
command = TclGetStringFromObj(objv[5], &length);
|
||||
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
|
||||
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
|
||||
offsetof(TraceCommandInfo, command) + 1 + length);
|
||||
|
||||
@@ -728,7 +733,7 @@ TraceCommandObjCmd(
|
||||
* first one that matches.
|
||||
*/
|
||||
|
||||
ClientData clientData;
|
||||
void *clientData;
|
||||
|
||||
/*
|
||||
* First ensure the name given is valid.
|
||||
@@ -744,7 +749,7 @@ TraceCommandObjCmd(
|
||||
|
||||
if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags)
|
||||
&& (strncmp(command, tcmdPtr->command,
|
||||
(size_t) length) == 0)) {
|
||||
length) == 0)) {
|
||||
Tcl_UntraceCommand(interp, name, flags | TCL_TRACE_DELETE,
|
||||
TraceCommandProc, clientData);
|
||||
tcmdPtr->flags |= TCL_TRACE_DESTROYED;
|
||||
@@ -758,7 +763,7 @@ TraceCommandObjCmd(
|
||||
break;
|
||||
}
|
||||
case TRACE_INFO: {
|
||||
ClientData clientData;
|
||||
void *clientData;
|
||||
Tcl_Obj *resultListPtr;
|
||||
|
||||
if (objc != 4) {
|
||||
@@ -777,7 +782,7 @@ TraceCommandObjCmd(
|
||||
|
||||
resultListPtr = Tcl_NewListObj(0, NULL);
|
||||
FOREACH_COMMAND_TRACE(interp, name, clientData) {
|
||||
int numOps = 0;
|
||||
Tcl_Size numOps = 0;
|
||||
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
|
||||
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
|
||||
|
||||
@@ -813,6 +818,10 @@ TraceCommandObjCmd(
|
||||
Tcl_SetObjResult(interp, resultListPtr);
|
||||
break;
|
||||
}
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
default:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -839,27 +848,26 @@ TraceCommandObjCmd(
|
||||
static int
|
||||
TraceVariableObjCmd(
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int optionIndex, /* Add, info or remove */
|
||||
int objc, /* Number of arguments. */
|
||||
enum traceOptionsEnum optionIndex, /* Add, info or remove */
|
||||
Tcl_Size objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
int commandLength, index;
|
||||
const char *name, *command;
|
||||
size_t length;
|
||||
ClientData clientData;
|
||||
enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE };
|
||||
Tcl_Size length;
|
||||
void *clientData;
|
||||
static const char *const opStrings[] = {
|
||||
"array", "read", "unset", "write", NULL
|
||||
};
|
||||
enum operations {
|
||||
TRACE_VAR_ARRAY, TRACE_VAR_READ, TRACE_VAR_UNSET, TRACE_VAR_WRITE
|
||||
};
|
||||
int index;
|
||||
|
||||
switch ((enum traceOptions) optionIndex) {
|
||||
switch ((enum traceOptionsEnum) optionIndex) {
|
||||
case TRACE_ADD:
|
||||
case TRACE_REMOVE: {
|
||||
int flags = 0;
|
||||
int i, listLen, result;
|
||||
int flags = 0, result;
|
||||
Tcl_Size i, listLen;
|
||||
Tcl_Obj **elemPtrs;
|
||||
|
||||
if (objc != 6) {
|
||||
@@ -872,7 +880,7 @@ TraceVariableObjCmd(
|
||||
* pointer to its array of element pointers.
|
||||
*/
|
||||
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
result = TclListObjLengthM(interp, objv[4], &listLen);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -884,6 +892,10 @@ TraceVariableObjCmd(
|
||||
NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
for (i = 0; i < listLen ; i++) {
|
||||
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
|
||||
"operation", TCL_EXACT, &index) != TCL_OK) {
|
||||
@@ -904,9 +916,8 @@ TraceVariableObjCmd(
|
||||
break;
|
||||
}
|
||||
}
|
||||
command = TclGetStringFromObj(objv[5], &commandLength);
|
||||
length = (size_t) commandLength;
|
||||
if ((enum traceOptions) optionIndex == TRACE_ADD) {
|
||||
command = TclGetStringFromObj(objv[5], &length);
|
||||
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
|
||||
CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *)ckalloc(
|
||||
offsetof(CombinedTraceVarInfo, traceCmdInfo.command)
|
||||
+ 1 + length);
|
||||
@@ -947,7 +958,7 @@ TraceVariableObjCmd(
|
||||
#endif
|
||||
)==flags)
|
||||
&& (strncmp(command, tvarPtr->command,
|
||||
(size_t) length) == 0)) {
|
||||
length) == 0)) {
|
||||
Tcl_UntraceVar2(interp, name, NULL,
|
||||
flags | TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT,
|
||||
TraceVarProc, clientData);
|
||||
@@ -1005,6 +1016,10 @@ TraceVariableObjCmd(
|
||||
Tcl_SetObjResult(interp, resultListPtr);
|
||||
break;
|
||||
}
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
default:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -1034,13 +1049,13 @@ TraceVariableObjCmd(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
ClientData
|
||||
void *
|
||||
Tcl_CommandTraceInfo(
|
||||
Tcl_Interp *interp, /* Interpreter containing command. */
|
||||
const char *cmdName, /* Name of command. */
|
||||
TCL_UNUSED(int) /*flags*/,
|
||||
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
|
||||
ClientData prevClientData) /* If non-NULL, gives last value returned by
|
||||
void *prevClientData) /* If non-NULL, gives last value returned by
|
||||
* this function, so this call will return the
|
||||
* next trace after that one. If NULL, this
|
||||
* call will return the first trace. */
|
||||
@@ -1108,7 +1123,7 @@ Tcl_TraceCommand(
|
||||
* of the TRACE_*_EXEC flags */
|
||||
Tcl_CommandTraceProc *proc, /* Function to call when specified ops are
|
||||
* invoked upon cmdName. */
|
||||
ClientData clientData) /* Arbitrary argument to pass to proc. */
|
||||
void *clientData) /* Arbitrary argument to pass to proc. */
|
||||
{
|
||||
Command *cmdPtr;
|
||||
CommandTrace *tracePtr;
|
||||
@@ -1172,7 +1187,7 @@ Tcl_UntraceCommand(
|
||||
* TCL_TRACE_RENAME, TCL_TRACE_DELETE, and any
|
||||
* of the TRACE_*_EXEC flags */
|
||||
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
|
||||
ClientData clientData) /* Arbitrary argument to pass to proc. */
|
||||
void *clientData) /* Arbitrary argument to pass to proc. */
|
||||
{
|
||||
CommandTrace *tracePtr;
|
||||
CommandTrace *prevPtr;
|
||||
@@ -1277,7 +1292,7 @@ Tcl_UntraceCommand(
|
||||
|
||||
static void
|
||||
TraceCommandProc(
|
||||
ClientData clientData, /* Information about the command trace. */
|
||||
void *clientData, /* Information about the command trace. */
|
||||
Tcl_Interp *interp, /* Interpreter containing command. */
|
||||
const char *oldName, /* Name of command being changed. */
|
||||
const char *newName, /* New name of command. Empty string or NULL
|
||||
@@ -1300,7 +1315,7 @@ TraceCommandProc(
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&cmd);
|
||||
Tcl_DStringAppend(&cmd, tcmdPtr->command, (int) tcmdPtr->length);
|
||||
Tcl_DStringAppend(&cmd, tcmdPtr->command, tcmdPtr->length);
|
||||
Tcl_DStringAppendElement(&cmd, oldName);
|
||||
Tcl_DStringAppendElement(&cmd, (newName ? newName : ""));
|
||||
if (flags & TCL_TRACE_RENAME) {
|
||||
@@ -1418,17 +1433,17 @@ TclCheckExecutionTraces(
|
||||
Tcl_Interp *interp, /* The current interpreter. */
|
||||
const char *command, /* Pointer to beginning of the current command
|
||||
* string. */
|
||||
TCL_UNUSED(int) /*numChars*/,
|
||||
TCL_UNUSED(Tcl_Size) /*numChars*/,
|
||||
Command *cmdPtr, /* Points to command's Command struct. */
|
||||
int code, /* The current result code. */
|
||||
int traceFlags, /* Current tracing situation. */
|
||||
int objc, /* Number of arguments for the command. */
|
||||
Tcl_Size objc, /* Number of arguments for the command. */
|
||||
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
CommandTrace *tracePtr, *lastTracePtr;
|
||||
ActiveCommandTrace active;
|
||||
int curLevel;
|
||||
Tcl_Size curLevel;
|
||||
int traceCode = TCL_OK;
|
||||
Tcl_InterpState state = NULL;
|
||||
|
||||
@@ -1523,18 +1538,18 @@ TclCheckInterpTraces(
|
||||
Tcl_Interp *interp, /* The current interpreter. */
|
||||
const char *command, /* Pointer to beginning of the current command
|
||||
* string. */
|
||||
int numChars, /* The number of characters in 'command' which
|
||||
Tcl_Size numChars, /* The number of characters in 'command' which
|
||||
* are part of the command string. */
|
||||
Command *cmdPtr, /* Points to command's Command struct. */
|
||||
int code, /* The current result code. */
|
||||
int traceFlags, /* Current tracing situation. */
|
||||
int objc, /* Number of arguments for the command. */
|
||||
Tcl_Size objc, /* Number of arguments for the command. */
|
||||
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
Trace *tracePtr, *lastTracePtr;
|
||||
ActiveInterpTrace active;
|
||||
int curLevel;
|
||||
Tcl_Size curLevel;
|
||||
int traceCode = TCL_OK;
|
||||
Tcl_InterpState state = NULL;
|
||||
|
||||
@@ -1670,9 +1685,9 @@ CallTraceFunction(
|
||||
Command *cmdPtr, /* Points to command's Command struct. */
|
||||
const char *command, /* Points to the first character of the
|
||||
* command's source before substitutions. */
|
||||
int numChars, /* The number of characters in the command's
|
||||
Tcl_Size numChars, /* The number of characters in the command's
|
||||
* source. */
|
||||
int objc, /* Number of arguments for the command. */
|
||||
Tcl_Size objc, /* Number of arguments for the command. */
|
||||
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
@@ -1717,7 +1732,7 @@ CallTraceFunction(
|
||||
|
||||
static void
|
||||
CommandObjTraceDeleted(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
|
||||
|
||||
@@ -1753,12 +1768,12 @@ CommandObjTraceDeleted(
|
||||
|
||||
static int
|
||||
TraceExecutionProc(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int level,
|
||||
Tcl_Size level,
|
||||
const char *command,
|
||||
TCL_UNUSED(Tcl_Command),
|
||||
int objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
int call = 0;
|
||||
@@ -1813,10 +1828,11 @@ TraceExecutionProc(
|
||||
|
||||
if (call) {
|
||||
Tcl_DString cmd, sub;
|
||||
int i, saveInterpFlags;
|
||||
Tcl_Size i;
|
||||
int saveInterpFlags;
|
||||
|
||||
Tcl_DStringInit(&cmd);
|
||||
Tcl_DStringAppend(&cmd, tcmdPtr->command, (int)tcmdPtr->length);
|
||||
Tcl_DStringAppend(&cmd, tcmdPtr->command, tcmdPtr->length);
|
||||
|
||||
/*
|
||||
* Append command with arguments.
|
||||
@@ -1960,7 +1976,7 @@ TraceExecutionProc(
|
||||
|
||||
static char *
|
||||
TraceVarProc(
|
||||
ClientData clientData, /* Information about the variable trace. */
|
||||
void *clientData, /* Information about the variable trace. */
|
||||
Tcl_Interp *interp, /* Interpreter containing variable. */
|
||||
const char *name1, /* Name of variable or array. */
|
||||
const char *name2, /* Name of element within array; NULL means
|
||||
@@ -1984,14 +2000,14 @@ TraceVarProc(
|
||||
result = NULL;
|
||||
if ((tvarPtr->flags & flags) && !Tcl_InterpDeleted(interp)
|
||||
&& !Tcl_LimitExceeded(interp)) {
|
||||
if (tvarPtr->length != (size_t) 0) {
|
||||
if (tvarPtr->length) {
|
||||
/*
|
||||
* Generate a command to execute by appending list elements for
|
||||
* the two variable names and the operation.
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&cmd);
|
||||
Tcl_DStringAppend(&cmd, tvarPtr->command, (int) tvarPtr->length);
|
||||
Tcl_DStringAppend(&cmd, tvarPtr->command, tvarPtr->length);
|
||||
Tcl_DStringAppendElement(&cmd, name1);
|
||||
Tcl_DStringAppendElement(&cmd, (name2 ? name2 : ""));
|
||||
#ifndef TCL_REMOVE_OBSOLETE_TRACES
|
||||
@@ -2069,7 +2085,7 @@ TraceVarProc(
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_CreateObjTrace --
|
||||
* Tcl_CreateObjTrace/Tcl_CreateObjTrace2 --
|
||||
*
|
||||
* Arrange for a function to be called to trace command execution.
|
||||
*
|
||||
@@ -2082,7 +2098,7 @@ TraceVarProc(
|
||||
* called to execute a Tcl command. Calls to proc will have the following
|
||||
* form:
|
||||
*
|
||||
* void proc(ClientData clientData,
|
||||
* void proc(void * clientData,
|
||||
* Tcl_Interp * interp,
|
||||
* int level,
|
||||
* const char * command,
|
||||
@@ -2130,13 +2146,16 @@ typedef struct {
|
||||
static int traceWrapperProc(
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int level,
|
||||
Tcl_Size level,
|
||||
const char *command,
|
||||
Tcl_Command commandInfo,
|
||||
int objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
|
||||
if (objc < 0) {
|
||||
objc = -1; /* Signal Tcl_CmdObjTraceProc that objc is out of range */
|
||||
}
|
||||
return info->proc(info->clientData, interp, level, command, commandInfo, objc, objv);
|
||||
}
|
||||
|
||||
@@ -2153,7 +2172,7 @@ static void traceWrapperDelProc(void *clientData)
|
||||
Tcl_Trace
|
||||
Tcl_CreateObjTrace2(
|
||||
Tcl_Interp *interp, /* Tcl interpreter */
|
||||
int level, /* Maximum nesting level */
|
||||
Tcl_Size level, /* Maximum nesting level */
|
||||
int flags, /* Flags, see above */
|
||||
Tcl_CmdObjTraceProc2 *proc, /* Trace callback */
|
||||
void *clientData, /* Client data for the callback */
|
||||
@@ -2172,10 +2191,10 @@ Tcl_CreateObjTrace2(
|
||||
Tcl_Trace
|
||||
Tcl_CreateObjTrace(
|
||||
Tcl_Interp *interp, /* Tcl interpreter */
|
||||
int level, /* Maximum nesting level */
|
||||
Tcl_Size level, /* Maximum nesting level */
|
||||
int flags, /* Flags, see above */
|
||||
Tcl_CmdObjTraceProc *proc, /* Trace callback */
|
||||
ClientData clientData, /* Client data for the callback */
|
||||
void *clientData, /* Client data for the callback */
|
||||
Tcl_CmdObjTraceDeleteProc *delProc)
|
||||
/* Function to call when trace is deleted */
|
||||
{
|
||||
@@ -2235,12 +2254,12 @@ Tcl_CreateObjTrace(
|
||||
* void
|
||||
* proc(clientData, interp, level, command, cmdProc, cmdClientData,
|
||||
* argc, argv)
|
||||
* ClientData clientData;
|
||||
* void *clientData;
|
||||
* Tcl_Interp *interp;
|
||||
* int level;
|
||||
* char *command;
|
||||
* int (*cmdProc)();
|
||||
* ClientData cmdClientData;
|
||||
* void *cmdClientData;
|
||||
* int argc;
|
||||
* char **argv;
|
||||
* {
|
||||
@@ -2261,11 +2280,11 @@ Tcl_CreateObjTrace(
|
||||
Tcl_Trace
|
||||
Tcl_CreateTrace(
|
||||
Tcl_Interp *interp, /* Interpreter in which to create trace. */
|
||||
int level, /* Only call proc for commands at nesting
|
||||
Tcl_Size level, /* Only call proc for commands at nesting
|
||||
* level<=argument level (1=>top level). */
|
||||
Tcl_CmdTraceProc *proc, /* Function to call before executing each
|
||||
* command. */
|
||||
ClientData clientData) /* Arbitrary value word to pass to proc. */
|
||||
void *clientData) /* Arbitrary value word to pass to proc. */
|
||||
{
|
||||
StringTraceData *data = (StringTraceData *)ckalloc(sizeof(StringTraceData));
|
||||
|
||||
@@ -2293,18 +2312,18 @@ Tcl_CreateTrace(
|
||||
|
||||
static int
|
||||
StringTraceProc(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int level,
|
||||
Tcl_Size level,
|
||||
const char *command,
|
||||
Tcl_Command commandInfo,
|
||||
int objc,
|
||||
Tcl_Size objc,
|
||||
Tcl_Obj *const *objv)
|
||||
{
|
||||
StringTraceData *data = (StringTraceData *)clientData;
|
||||
Command *cmdPtr = (Command *) commandInfo;
|
||||
const char **argv; /* Args to pass to string trace proc */
|
||||
int i;
|
||||
Tcl_Size i;
|
||||
|
||||
/*
|
||||
* This is a bit messy because we have to emulate the old trace interface,
|
||||
@@ -2349,7 +2368,7 @@ StringTraceProc(
|
||||
|
||||
static void
|
||||
StringTraceDeleteProc(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
ckfree(clientData);
|
||||
}
|
||||
@@ -3239,7 +3258,7 @@ Tcl_TraceVar2(
|
||||
* TCL_NAMESPACE_ONLY. */
|
||||
Tcl_VarTraceProc *proc, /* Function to call when specified ops are
|
||||
* invoked upon varName. */
|
||||
ClientData clientData) /* Arbitrary argument to pass to proc. */
|
||||
void *clientData) /* Arbitrary argument to pass to proc. */
|
||||
{
|
||||
VarTrace *tracePtr;
|
||||
int result;
|
||||
|
||||
+3
-3
@@ -2973,7 +2973,7 @@ Tcl_DStringResult(
|
||||
Tcl_DString *dsPtr) /* Dynamic string that is to become the
|
||||
* result of interp. */
|
||||
{
|
||||
Tcl_SetObjResult(interp, TclDStringToObj(dsPtr));
|
||||
Tcl_SetObjResult(interp, Tcl_DStringToObj(dsPtr));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3087,7 +3087,7 @@ Tcl_DStringGetResult(
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclDStringToObj --
|
||||
* Tcl_DStringToObj --
|
||||
*
|
||||
* This function moves a dynamic string's contents to a new Tcl_Obj. Be
|
||||
* aware that this function does *not* check that the encoding of the
|
||||
@@ -3107,7 +3107,7 @@ Tcl_DStringGetResult(
|
||||
*/
|
||||
|
||||
Tcl_Obj *
|
||||
TclDStringToObj(
|
||||
Tcl_DStringToObj(
|
||||
Tcl_DString *dsPtr)
|
||||
{
|
||||
Tcl_Obj *result;
|
||||
|
||||
+6
-2
@@ -4161,8 +4161,7 @@ ArraySetCmd(
|
||||
int elemLen;
|
||||
Tcl_Obj **elemPtrs, *copyListObj;
|
||||
|
||||
result = TclListObjGetElementsM(interp, arrayElemObj,
|
||||
&elemLen, &elemPtrs);
|
||||
result = TclListObjLengthM(interp, arrayElemObj, &elemLen);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
@@ -4175,6 +4174,11 @@ ArraySetCmd(
|
||||
if (elemLen == 0) {
|
||||
goto ensureArray;
|
||||
}
|
||||
result = TclListObjGetElementsM(interp, arrayElemObj,
|
||||
&elemLen, &elemPtrs);
|
||||
if (result != TCL_OK) {
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* We needn't worry about traces invalidating arrayPtr: should that be
|
||||
|
||||
+5
-1
@@ -3044,7 +3044,7 @@ ZipFSMkZipOrImg(
|
||||
}
|
||||
}
|
||||
Tcl_IncrRefCount(list);
|
||||
if (TclListObjGetElementsM(interp, list, &lobjc, &lobjv) != TCL_OK) {
|
||||
if (TclListObjLengthM(interp, list, &lobjc) != TCL_OK) {
|
||||
Tcl_DecrRefCount(list);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -3060,6 +3060,10 @@ ZipFSMkZipOrImg(
|
||||
ZIPFS_ERROR_CODE(interp, "EMPTY");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (TclListObjGetElementsM(interp, list, &lobjc, &lobjv) != TCL_OK) {
|
||||
Tcl_DecrRefCount(list);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
out = Tcl_FSOpenFileChannel(interp, targetFile, "wb", 0755);
|
||||
if (out == NULL) {
|
||||
Tcl_DecrRefCount(list);
|
||||
|
||||
+2
-2
@@ -548,7 +548,7 @@ ExtractHeader(
|
||||
|
||||
Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->comment, -1,
|
||||
&tmp);
|
||||
SetValue(dictObj, "comment", TclDStringToObj(&tmp));
|
||||
SetValue(dictObj, "comment", Tcl_DStringToObj(&tmp));
|
||||
}
|
||||
SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc));
|
||||
if (headerPtr->name != Z_NULL) {
|
||||
@@ -565,7 +565,7 @@ ExtractHeader(
|
||||
|
||||
Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->name, -1,
|
||||
&tmp);
|
||||
SetValue(dictObj, "filename", TclDStringToObj(&tmp));
|
||||
SetValue(dictObj, "filename", Tcl_DStringToObj(&tmp));
|
||||
}
|
||||
if (headerPtr->os != 255) {
|
||||
SetValue(dictObj, "os", Tcl_NewWideIntObj(headerPtr->os));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# cookiejar.tcl --
|
||||
# idna.tcl --
|
||||
#
|
||||
# Implementation of IDNA (Internationalized Domain Names for
|
||||
# Applications) encoding/decoding system, built on a punycode engine
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
if {[info sharedlibextension] != ".dll"} return
|
||||
if {[package vsatisfies [package provide Tcl] 9.0-]} {
|
||||
package ifneeded dde 1.4.4 \
|
||||
package ifneeded dde 1.4.5 \
|
||||
[list load [file join $dir tcl9dde14.dll] Dde]
|
||||
} elseif {![package vsatisfies [package provide Tcl] 8.7]
|
||||
&& [::tcl::pkgconfig get debug]} {
|
||||
package ifneeded dde 1.4.4 \
|
||||
package ifneeded dde 1.4.5 \
|
||||
[list load [file join $dir tcldde14g.dll] Dde]
|
||||
} else {
|
||||
package ifneeded dde 1.4.4 \
|
||||
package ifneeded dde 1.4.5 \
|
||||
[list load [file join $dir tcldde14.dll] Dde]
|
||||
}
|
||||
|
||||
+471
-41
@@ -11,7 +11,7 @@
|
||||
package require Tcl 8.6-
|
||||
# Keep this in sync with pkgIndex.tcl and with the install directories in
|
||||
# Makefiles
|
||||
package provide http 2.10a4
|
||||
package provide http 2.10b1
|
||||
|
||||
namespace eval http {
|
||||
# Allow resourcing to not clobber existing data
|
||||
@@ -26,6 +26,8 @@ namespace eval http {
|
||||
-proxyhost {}
|
||||
-proxyport {}
|
||||
-proxyfilter http::ProxyRequired
|
||||
-proxynot {}
|
||||
-proxyauth {}
|
||||
-repost 0
|
||||
-threadlevel 0
|
||||
-urlencoding utf-8
|
||||
@@ -75,6 +77,7 @@ namespace eval http {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
if {[info exists socketMapping]} {
|
||||
# Close open sockets on re-init. Do not permit retries.
|
||||
foreach {url sock} [array get socketMapping] {
|
||||
@@ -99,6 +102,7 @@ namespace eval http {
|
||||
array unset socketClosing
|
||||
array unset socketPlayCmd
|
||||
array unset socketCoEvent
|
||||
array unset socketProxyId
|
||||
array set socketMapping {}
|
||||
array set socketRdState {}
|
||||
array set socketWrState {}
|
||||
@@ -108,6 +112,7 @@ namespace eval http {
|
||||
array set socketClosing {}
|
||||
array set socketPlayCmd {}
|
||||
array set socketCoEvent {}
|
||||
array set socketProxyId {}
|
||||
return
|
||||
}
|
||||
init
|
||||
@@ -217,6 +222,33 @@ namespace eval http {
|
||||
511 {Network Authentication Required}
|
||||
}]
|
||||
|
||||
variable failedProxyValues {
|
||||
binary
|
||||
body
|
||||
charset
|
||||
coding
|
||||
connection
|
||||
connectionRespFlag
|
||||
currentsize
|
||||
host
|
||||
http
|
||||
httpResponse
|
||||
meta
|
||||
method
|
||||
querylength
|
||||
queryoffset
|
||||
reasonPhrase
|
||||
requestHeaders
|
||||
requestLine
|
||||
responseCode
|
||||
state
|
||||
status
|
||||
tid
|
||||
totalsize
|
||||
transfer
|
||||
type
|
||||
}
|
||||
|
||||
namespace export geturl config reset wait formatQuery postError quoteString
|
||||
namespace export register unregister registerError
|
||||
namespace export requestLine requestHeaders requestHeaderValue
|
||||
@@ -378,6 +410,7 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -470,7 +503,9 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
|
||||
if {[info exists state(-command)] && (!$skipCB)
|
||||
&& (![info exists state(done-command-cb)])} {
|
||||
set state(done-command-cb) yes
|
||||
if {[catch {namespace eval :: $state(-command) $token} err] && $errormsg eq ""} {
|
||||
if { [catch {namespace eval :: $state(-command) $token} err]
|
||||
&& ($errormsg eq "")
|
||||
} {
|
||||
set state(error) [list $err $errorInfo $errorCode]
|
||||
set state(status) error
|
||||
}
|
||||
@@ -509,6 +544,7 @@ proc http::KeepSocket {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -711,6 +747,7 @@ proc http::CloseSocket {s {token {}}} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
set tk [namespace tail $token]
|
||||
|
||||
@@ -773,8 +810,9 @@ proc http::CloseQueuedQueries {connId {token {}}} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
##Log CloseQueuedQueries $connId
|
||||
##Log CloseQueuedQueries $connId $token
|
||||
if {![info exists socketMapping($connId)]} {
|
||||
# Command has already been called.
|
||||
# Don't come here again - especially recursively.
|
||||
@@ -834,6 +872,7 @@ proc http::Unset {connId} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
unset socketMapping($connId)
|
||||
unset socketRdState($connId)
|
||||
@@ -842,6 +881,7 @@ proc http::Unset {connId} {
|
||||
unset -nocomplain socketWrQueue($connId)
|
||||
unset -nocomplain socketClosing($connId)
|
||||
unset -nocomplain socketPlayCmd($connId)
|
||||
unset -nocomplain socketProxyId($connId)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -867,6 +907,7 @@ proc http::reset {token {why reset}} {
|
||||
set errorlist $state(error)
|
||||
unset state
|
||||
eval ::error $errorlist
|
||||
# i.e. error msg errorInfo errorCode
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -886,20 +927,22 @@ proc http::reset {token {why reset}} {
|
||||
proc http::geturl {url args} {
|
||||
variable urlTypes
|
||||
|
||||
# The value is set in the namespace header of this file. If the file has
|
||||
# not been modified the value is "::http::socket".
|
||||
set socketCmd [lindex $urlTypes(http) 1]
|
||||
|
||||
# - If ::tls::socketCmd has its default value "::socket", change it to the
|
||||
# new value $socketCmd.
|
||||
# new value ::http::socketForTls.
|
||||
# - If the old value is different, then it has been modified either by the
|
||||
# script or by the Tcl installation, and replaced by a new command. The
|
||||
# script or installation that modified ::tls::socketCmd is also
|
||||
# responsible for integrating ::http::socket into its own "new" command,
|
||||
# if it wishes to do so.
|
||||
# responsible for integrating ::http::socketForTls into its own "new"
|
||||
# command, if it wishes to do so.
|
||||
# - Commands that open a socket:
|
||||
# - ::socket - basic
|
||||
# - ::http::socket - can use a thread to avoid blockage by slow DNS
|
||||
# lookup. See http::config option -threadlevel.
|
||||
# - ::http::socketForTls - as ::http::socket, but can also open a socket
|
||||
# for HTTPS/TLS through a proxy.
|
||||
|
||||
if {[info exists ::tls::socketCmd] && ($::tls::socketCmd eq {::socket})} {
|
||||
set ::tls::socketCmd $socketCmd
|
||||
set ::tls::socketCmd ::http::socketForTls
|
||||
}
|
||||
|
||||
set token [CreateToken $url {*}$args]
|
||||
@@ -1023,6 +1066,7 @@ proc http::CreateToken {url args} {
|
||||
requestHeaders {}
|
||||
requestLine {}
|
||||
transfer {}
|
||||
proxyUsed none
|
||||
}
|
||||
set state(-keepalive) $defaultKeepalive
|
||||
set state(-strict) $strict
|
||||
@@ -1299,11 +1343,21 @@ proc http::CreateToken {url args} {
|
||||
set state(-keepalive) 0
|
||||
}
|
||||
|
||||
# If we are using the proxy, we must pass in the full URL that includes
|
||||
# the server name.
|
||||
if {$phost ne ""} {
|
||||
# Handle proxy requests here for http:// but not for https://
|
||||
# The proxying for https is done in the ::http::socketForTls command.
|
||||
# A proxy request for http:// needs the full URL in the HTTP request line,
|
||||
# including the server name.
|
||||
# The *tls* test below attempts to describe protocols in addition to
|
||||
# "https on port 443" that use HTTP over TLS.
|
||||
if {($phost ne "") && (![string match -nocase *tls* $defcmd])} {
|
||||
set srvurl $url
|
||||
set targetAddr [list $phost $pport]
|
||||
set state(proxyUsed) HttpProxy
|
||||
# The value of state(proxyUsed) none|HttpProxy depends only on the
|
||||
# all-transactions http::config settings and on the target URL.
|
||||
# Even if this is a persistent socket there is no need to change the
|
||||
# value of state(proxyUsed) for other transactions that use the socket:
|
||||
# they have the same value already.
|
||||
} else {
|
||||
set targetAddr [list $host $port]
|
||||
}
|
||||
@@ -1316,7 +1370,7 @@ proc http::CreateToken {url args} {
|
||||
}
|
||||
|
||||
set state(connArgs) [list $proto $phost $srvurl]
|
||||
set state(openCmd) [list {*}$defcmd {*}$sockopts {*}$targetAddr]
|
||||
set state(openCmd) [list {*}$defcmd {*}$sockopts -type $token {*}$targetAddr]
|
||||
|
||||
# See if we are supposed to use a previously opened channel.
|
||||
# - In principle, ANY call to http::geturl could use a previously opened
|
||||
@@ -1339,6 +1393,7 @@ proc http::CreateToken {url args} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
if {[info exists socketMapping($state(socketinfo))]} {
|
||||
# - If the connection is idle, it has a "fileevent readable" binding
|
||||
@@ -1361,6 +1416,7 @@ proc http::CreateToken {url args} {
|
||||
# causes a call to Finish.
|
||||
set reusing 1
|
||||
set sock $socketMapping($state(socketinfo))
|
||||
set state(proxyUsed) $socketProxyId($state(socketinfo))
|
||||
Log "reusing closing socket $sock for $state(socketinfo) - token $token"
|
||||
|
||||
set state(alreadyQueued) 1
|
||||
@@ -1395,6 +1451,7 @@ proc http::CreateToken {url args} {
|
||||
# - The socket may not yet exist, and be defined with a placeholder.
|
||||
set reusing 1
|
||||
set sock $socketMapping($state(socketinfo))
|
||||
set state(proxyUsed) $socketProxyId($state(socketinfo))
|
||||
if {[SockIsPlaceHolder $sock]} {
|
||||
set state(ReusingPlaceholder) 1
|
||||
lappend socketPhQueue($sock) $token
|
||||
@@ -1493,6 +1550,7 @@ proc http::AsyncTransaction {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
set sock $state(sock)
|
||||
|
||||
@@ -1569,9 +1627,15 @@ proc http::PreparePersistentConnection {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
set DoLater {-traceread 0 -tracewrite 0}
|
||||
set socketMapping($state(socketinfo)) $state(sock)
|
||||
set socketProxyId($state(socketinfo)) $state(proxyUsed)
|
||||
# - The value of state(proxyUsed) was set in http::CreateToken to either
|
||||
# "none" or "HttpProxy".
|
||||
# - $token is the first transaction to use this placeholder, so there are
|
||||
# no other tokens whose (proxyUsed) must be modified.
|
||||
|
||||
if {![info exists socketRdState($state(socketinfo))]} {
|
||||
set socketRdState($state(socketinfo)) {}
|
||||
@@ -1601,12 +1665,16 @@ proc http::PreparePersistentConnection {token} {
|
||||
set socketWrState($state(socketinfo)) $token
|
||||
}
|
||||
|
||||
# Value of socketPhQueue() may have already been set by ReplayCore.
|
||||
if {![info exists socketPhQueue($state(sock))]} {
|
||||
set socketPhQueue($state(sock)) {}
|
||||
}
|
||||
set socketRdQueue($state(socketinfo)) {}
|
||||
set socketWrQueue($state(socketinfo)) {}
|
||||
set socketPhQueue($state(socketinfo)) {}
|
||||
set socketClosing($state(socketinfo)) 0
|
||||
set socketPlayCmd($state(socketinfo)) {ReplayIfClose Wready {} {}}
|
||||
set socketCoEvent($state(socketinfo)) {}
|
||||
set socketProxyId($state(socketinfo)) {}
|
||||
|
||||
return $DoLater
|
||||
}
|
||||
@@ -1639,6 +1707,7 @@ proc http::OpenSocket {token DoLater} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
Log >K$tk Start OpenSocket coroutine
|
||||
|
||||
@@ -1663,12 +1732,14 @@ proc http::OpenSocket {token DoLater} {
|
||||
##Log pre socket opened, - token $token
|
||||
##Log $state(openCmd) - token $token
|
||||
set sock [namespace eval :: $state(openCmd)]
|
||||
|
||||
set state(sock) $sock
|
||||
# Normal return from $state(openCmd) always returns a valid socket.
|
||||
# A TLS proxy connection with 407 or other failure from the
|
||||
# proxy server raises an error.
|
||||
|
||||
# Initialisation of a new socket.
|
||||
##Log post socket opened, - token $token
|
||||
##Log socket opened, now fconfigure - token $token
|
||||
set state(sock) $sock
|
||||
set delay [expr {[clock milliseconds] - $pre}]
|
||||
if {$delay > 3000} {
|
||||
Log socket delay $delay - token $token
|
||||
@@ -1683,8 +1754,38 @@ proc http::OpenSocket {token DoLater} {
|
||||
|
||||
# Code above has set state(sock) $sock
|
||||
ConfigureNewSocket $token $sockOld $DoLater
|
||||
##Log OpenSocket success $sock - token $token
|
||||
} result errdict]} {
|
||||
Finish $token $result
|
||||
##Log OpenSocket failed $result - token $token
|
||||
# There may be other requests in the socketPhQueue.
|
||||
# Prepare socketPlayCmd so that Finish will replay them.
|
||||
if { ($state(-keepalive)) && (!$state(reusing))
|
||||
&& [info exists socketPhQueue($sockOld)]
|
||||
&& ($socketPhQueue($sockOld) ne {})
|
||||
} {
|
||||
if {$socketMapping($state(socketinfo)) ne $sockOld} {
|
||||
Log "WARNING: this code should not be reached.\
|
||||
{$socketMapping($state(socketinfo)) ne $sockOld}"
|
||||
}
|
||||
set socketPlayCmd($state(socketinfo)) [list ReplayIfClose Wready {} $socketPhQueue($sockOld)]
|
||||
set socketPhQueue($sockOld) {}
|
||||
}
|
||||
if {[string range $result 0 20] eq {proxy connect failed:}} {
|
||||
# - The HTTPS proxy did not create a socket. The pre-existing value
|
||||
# (a "placeholder socket") is unchanged.
|
||||
# - The proxy returned a valid HTTP response to the failed CONNECT
|
||||
# request, and http::SecureProxyConnect copied this to $token,
|
||||
# and also set ${token}(connection) set to "close".
|
||||
# - Remove the error message $result so that Finish delivers this
|
||||
# HTTP response to the caller.
|
||||
set result {}
|
||||
}
|
||||
Finish $token $result
|
||||
# Because socket creation failed, the placeholder "socket" must be
|
||||
# "closed" and (if persistent) removed from the persistent sockets
|
||||
# table. In the {proxy connect failed:} case Finish does this because
|
||||
# the value of ${token}(connection) is "close". In the other cases here,
|
||||
# it does so because $result is non-empty.
|
||||
}
|
||||
##Log Leaving http::OpenSocket coroutine [info coroutine] - token $token
|
||||
return
|
||||
@@ -1715,7 +1816,8 @@ proc http::OpenSocket {token DoLater} {
|
||||
#
|
||||
# Arguments:
|
||||
# token - connection token (name of an array)
|
||||
# sockOld - handle or placeholder used for a socket before the call to OpenSocket
|
||||
# sockOld - handle or placeholder used for a socket before the call to
|
||||
# OpenSocket
|
||||
# DoLater - dictionary of boolean values listing unfinished tasks
|
||||
#
|
||||
# Return Value: none
|
||||
@@ -1735,10 +1837,12 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
set reusing $state(reusing)
|
||||
set sock $state(sock)
|
||||
##Log " ConfigureNewSocket" $token $sockOld ... -- $sock
|
||||
set proxyUsed $state(proxyUsed)
|
||||
##Log " ConfigureNewSocket" $token $sockOld ... -- $reusing $sock $proxyUsed
|
||||
|
||||
if {(!$reusing) && ($sock ne $sockOld)} {
|
||||
# Replace the placeholder value sockOld with sock.
|
||||
@@ -1747,6 +1851,8 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
|
||||
&& ($socketMapping($state(socketinfo)) eq $sockOld)
|
||||
} {
|
||||
set socketMapping($state(socketinfo)) $sock
|
||||
set socketProxyId($state(socketinfo)) $proxyUsed
|
||||
# tokens that use the placeholder $sockOld are updated below.
|
||||
##Log set socketMapping($state(socketinfo)) $sock
|
||||
}
|
||||
|
||||
@@ -1786,6 +1892,7 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
|
||||
# 1. Amend the token's (sock).
|
||||
##Log set ${tok}(sock) $sock
|
||||
set ${tok}(sock) $sock
|
||||
set ${tok}(proxyUsed) $proxyUsed
|
||||
|
||||
# 2. Schedule the token's HTTP request.
|
||||
# Every token in socketPhQueue(*) has reusing 1 alreadyQueued 0.
|
||||
@@ -1816,7 +1923,7 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
|
||||
# waiting until the read(s) in progress are finished).
|
||||
# socketRdQueue($connId) List of tokens that are queued for reading later.
|
||||
# socketWrQueue($connId) List of tokens that are queued for writing later.
|
||||
# socketPhQueue($connId) List of tokens that are queued to use a placeholder
|
||||
# socketPhQueue($sock) List of tokens that are queued to use a placeholder
|
||||
# socket, when the real socket has not yet been created.
|
||||
# socketClosing($connId) (boolean) true iff a server response header indicates
|
||||
# that the server will close the connection at the end of
|
||||
@@ -1825,6 +1932,11 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
|
||||
# part-completed transactions if the socket closes early.
|
||||
# socketCoEvent($connId) Identifier for the "after idle" event that will launch
|
||||
# an OpenSocket coroutine to open or re-use a socket.
|
||||
# socketProxyId($connId) The type of proxy that this socket uses: values are
|
||||
# those of state(proxyUsed) i.e. none, HttpProxy,
|
||||
# SecureProxy, and SecureProxyFailed.
|
||||
# The value is not used for anything by http, its purpose
|
||||
# is to set the value of state() for caller information.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1880,6 +1992,7 @@ proc http::ScheduleRequest {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
set Unfinished 0
|
||||
|
||||
@@ -2025,6 +2138,7 @@ proc http::Connected {token proto phost srvurl} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -2083,9 +2197,15 @@ proc http::Connected {token proto phost srvurl} {
|
||||
Log ^B$tk begin sending request - token $token
|
||||
|
||||
if {[catch {
|
||||
set state(method) $how
|
||||
set state(requestHeaders) {}
|
||||
set state(requestLine) "$how $srvurl HTTP/$state(-protocol)"
|
||||
if {[info exists state(bypass)]} {
|
||||
set state(method) [lindex [split $state(bypass) { }] 0]
|
||||
set state(requestHeaders) {}
|
||||
set state(requestLine) $state(bypass)
|
||||
} else {
|
||||
set state(method) $how
|
||||
set state(requestHeaders) {}
|
||||
set state(requestLine) "$how $srvurl HTTP/$state(-protocol)"
|
||||
}
|
||||
puts $sock $state(requestLine)
|
||||
set hostValue [GetFieldValue $state(-headers) Host]
|
||||
if {$hostValue ne {}} {
|
||||
@@ -2119,6 +2239,11 @@ proc http::Connected {token proto phost srvurl} {
|
||||
# and "state(-keepalive) 0".
|
||||
set ConnVal close
|
||||
}
|
||||
# Proxy authorisation (cf. mod by Anders Ramdahl to autoproxy by
|
||||
# Pat Thoyts).
|
||||
if {($http(-proxyauth) ne {}) && ($state(proxyUsed) eq {HttpProxy})} {
|
||||
SendHeader $token Proxy-Authorization $http(-proxyauth)
|
||||
}
|
||||
# RFC7230 A.1 - "clients are encouraged not to send the
|
||||
# Proxy-Connection header field in any requests"
|
||||
set accept_encoding_seen 0
|
||||
@@ -2143,7 +2268,12 @@ proc http::Connected {token proto phost srvurl} {
|
||||
set contDone 1
|
||||
set state(querylength) $value
|
||||
}
|
||||
if {[string equal -nocase $key "connection"]} {
|
||||
if { [string equal -nocase $key "connection"]
|
||||
&& [info exists state(bypass)]
|
||||
} {
|
||||
# Value supplied in -headers overrides $ConnVal.
|
||||
set connection_seen 1
|
||||
} elseif {[string equal -nocase $key "connection"]} {
|
||||
# Remove "close" or "keep-alive" and use our own value.
|
||||
# In an upgrade request, the upgrade is not guaranteed.
|
||||
# Value "close" or "keep-alive" tells the server what to do
|
||||
@@ -2286,7 +2416,8 @@ proc http::Connected {token proto phost srvurl} {
|
||||
# If any other requests are in flight or pipelined/queued, they will
|
||||
# be discarded.
|
||||
} elseif {$state(status) eq ""} {
|
||||
# ...https handshake errors come here.
|
||||
# https handshake errors come here, for
|
||||
# Tcl 8.7 without http::SecureProxyConnect, and for Tcl 8.6.
|
||||
set msg [registerError $sock]
|
||||
registerError $sock {}
|
||||
if {$msg eq {}} {
|
||||
@@ -2347,6 +2478,7 @@ proc http::DoneRequest {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -2678,6 +2810,7 @@ proc http::ReplayIfDead {token doing} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -2921,6 +3054,7 @@ proc http::ReplayCore {newQueue} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
if {[llength $newQueue] == 0} {
|
||||
# Nothing to do.
|
||||
@@ -2940,6 +3074,7 @@ proc http::ReplayCore {newQueue} {
|
||||
|
||||
if {![ReInit $token]} {
|
||||
Log FAILED in http::ReplayCore - NO tmp vars
|
||||
Log ReplayCore reject $token
|
||||
Finish $token {cannot send this request again}
|
||||
return
|
||||
}
|
||||
@@ -2954,6 +3089,7 @@ proc http::ReplayCore {newQueue} {
|
||||
set state(reusing) 0
|
||||
set state(ReusingPlaceholder) 0
|
||||
set state(alreadyQueued) 0
|
||||
Log ReplayCore replay $token
|
||||
|
||||
# Give the socket a placeholder name before it is created.
|
||||
set sock HTTP_PLACEHOLDER_[incr TmpSockCounter]
|
||||
@@ -2966,7 +3102,9 @@ proc http::ReplayCore {newQueue} {
|
||||
set ${tok}(reusing) 1
|
||||
set ${tok}(sock) $sock
|
||||
lappend socketPhQueue($sock) $tok
|
||||
Log ReplayCore replay $tok
|
||||
} else {
|
||||
Log ReplayCore reject $tok
|
||||
set ${tok}(reusing) 1
|
||||
set ${tok}(sock) NONE
|
||||
Finish $tok {cannot send this request again}
|
||||
@@ -3121,6 +3259,7 @@ proc http::responseInfo {token} {
|
||||
currentPost STATE queryoffset
|
||||
totalSize STATE totalsize
|
||||
currentSize STATE currentsize
|
||||
proxyUsed STATE proxyUsed
|
||||
} {
|
||||
if {$origin eq {STATE}} {
|
||||
if {[info exists state($name)]} {
|
||||
@@ -3269,6 +3408,7 @@ proc http::Write {token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -3381,6 +3521,7 @@ proc http::Event {sock token} {
|
||||
variable socketClosing
|
||||
variable socketPlayCmd
|
||||
variable socketCoEvent
|
||||
variable socketProxyId
|
||||
|
||||
variable $token
|
||||
upvar 0 $token state
|
||||
@@ -3433,8 +3574,15 @@ proc http::Event {sock token} {
|
||||
# If any other requests are in flight or pipelined/queued,
|
||||
# they will be discarded.
|
||||
} else {
|
||||
# https handshake errors come here, for
|
||||
# Tcl 8.7 with http::SecureProxyConnect.
|
||||
set msg [registerError $sock]
|
||||
registerError $sock {}
|
||||
if {$msg eq {}} {
|
||||
set msg $nsl
|
||||
}
|
||||
Log ^X$tk end of response (error) - token $token
|
||||
Finish $token $nsl
|
||||
Finish $token $msg
|
||||
return
|
||||
}
|
||||
} elseif {$nsl >= 0} {
|
||||
@@ -3604,6 +3752,45 @@ proc http::Event {sock token} {
|
||||
set state(state) complete
|
||||
Eot $token
|
||||
return
|
||||
} elseif {
|
||||
($state(method) eq {CONNECT})
|
||||
&& [string is integer -strict $state(responseCode)]
|
||||
&& ($state(responseCode) >= 200)
|
||||
&& ($state(responseCode) < 300)
|
||||
} {
|
||||
# A successful CONNECT response has no body.
|
||||
# (An unsuccessful CONNECT has headers and body.)
|
||||
# The code below is abstracted from Eot/Finish, but
|
||||
# keeps the socket open.
|
||||
catch {fileevent $state(sock) readable {}}
|
||||
catch {fileevent $state(sock) writable {}}
|
||||
set state(state) complete
|
||||
set state(status) ok
|
||||
if {[info commands ${token}--EventCoroutine] ne {}} {
|
||||
rename ${token}--EventCoroutine {}
|
||||
}
|
||||
if {[info commands ${token}--SocketCoroutine] ne {}} {
|
||||
rename ${token}--SocketCoroutine {}
|
||||
}
|
||||
if {[info exists state(socketcoro)]} {
|
||||
Log $token Cancel socket after-idle event (Finish)
|
||||
after cancel $state(socketcoro)
|
||||
unset state(socketcoro)
|
||||
}
|
||||
if {[info exists state(after)]} {
|
||||
after cancel $state(after)
|
||||
unset state(after)
|
||||
}
|
||||
if { [info exists state(-command)]
|
||||
&& (![info exists state(done-command-cb)])
|
||||
} {
|
||||
set state(done-command-cb) yes
|
||||
if {[catch {namespace eval :: $state(-command) $token} err]} {
|
||||
set state(error) [list $err $errorInfo $errorCode]
|
||||
set state(status) error
|
||||
}
|
||||
}
|
||||
return
|
||||
} else {
|
||||
}
|
||||
|
||||
@@ -4305,7 +4492,7 @@ proc http::CopyDone {token count {error {}}} {
|
||||
# reason - "eof" means premature EOF (not EOF as the natural end of
|
||||
# the response)
|
||||
# - "" means completion of response, with or without EOF
|
||||
# - anything else describes an error confition other than
|
||||
# - anything else describes an error condition other than
|
||||
# premature EOF.
|
||||
#
|
||||
# Side Effects
|
||||
@@ -4537,17 +4724,23 @@ proc http::quoteString {string} {
|
||||
|
||||
proc http::ProxyRequired {host} {
|
||||
variable http
|
||||
if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} {
|
||||
if {
|
||||
![info exists http(-proxyport)] ||
|
||||
![string length $http(-proxyport)]
|
||||
} {
|
||||
set http(-proxyport) 8080
|
||||
}
|
||||
return [list $http(-proxyhost) $http(-proxyport)]
|
||||
} else {
|
||||
return
|
||||
if {(![info exists http(-proxyhost)]) || ($http(-proxyhost) eq {})} {
|
||||
return
|
||||
}
|
||||
if {![info exists http(-proxyport)] || ($http(-proxyport) eq {})} {
|
||||
set port 8080
|
||||
} else {
|
||||
set port $http(-proxyport)
|
||||
}
|
||||
|
||||
# Simple test (cf. autoproxy) for hosts that must be accessed directly,
|
||||
# not through the proxy server.
|
||||
foreach domain $http(-proxynot) {
|
||||
if {[string match -nocase $domain $host]} {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
return [list $http(-proxyhost) $port]
|
||||
}
|
||||
|
||||
# http::CharsetToEncoding --
|
||||
@@ -4730,6 +4923,243 @@ interp alias {} http::meta {} http::responseHeaders
|
||||
interp alias {} http::metaValue {} http::responseHeaderValue
|
||||
interp alias {} http::ncode {} http::responseCode
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Proc http::socketForTls
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command to use in place of ::socket as the value of ::tls::socketCmd.
|
||||
# This command does the same as http::socket, and also handles https connections
|
||||
# through a proxy server.
|
||||
#
|
||||
# Notes.
|
||||
# - The proxy server works differently for https and http. This implementation
|
||||
# is for https. The proxy for http is implemented in http::CreateToken (in
|
||||
# code that was previously part of http::geturl).
|
||||
# - This code implicitly uses the tls options set for https in a call to
|
||||
# http::register, and does not need to call commands tls::*. This simple
|
||||
# implementation is possible because tls uses a callback to ::socket that can
|
||||
# be redirected by changing the value of ::tls::socketCmd.
|
||||
#
|
||||
# Arguments:
|
||||
# args - as for ::socket
|
||||
#
|
||||
# Return Value: a socket identifier
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc http::socketForTls {args} {
|
||||
variable http
|
||||
set host [lindex $args end-1]
|
||||
set port [lindex $args end]
|
||||
if { ($http(-proxyfilter) ne {})
|
||||
&& (![catch {$http(-proxyfilter) $host} proxy])
|
||||
} {
|
||||
set phost [lindex $proxy 0]
|
||||
set pport [lindex $proxy 1]
|
||||
} else {
|
||||
set phost {}
|
||||
set pport {}
|
||||
}
|
||||
if {$phost eq ""} {
|
||||
set sock [::http::socket {*}$args]
|
||||
} else {
|
||||
set sock [::http::SecureProxyConnect {*}$args $phost $pport]
|
||||
}
|
||||
return $sock
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Proc http::SecureProxyConnect
|
||||
# ------------------------------------------------------------------------------
|
||||
# Command to open a socket through a proxy server to a remote server for use by
|
||||
# tls. The caller must perform the tls handshake.
|
||||
#
|
||||
# Notes
|
||||
# - Based on patch supplied by Melissa Chawla in ticket 1173760, and
|
||||
# Proxy-Authorization header cf. autoproxy by Pat Thoyts.
|
||||
# - Rewritten as a call to http::geturl, because response headers and body are
|
||||
# needed if the CONNECT request fails. CONNECT is implemented for this case
|
||||
# only, by state(bypass).
|
||||
# - FUTURE WORK: give http::geturl a -connect option for a general CONNECT.
|
||||
# - The request header Proxy-Connection is discouraged in RFC 7230 (June 2014),
|
||||
# RFC 9112 (June 2022).
|
||||
#
|
||||
# Arguments:
|
||||
# args - as for ::socket, ending in host, port; with proxy host, proxy
|
||||
# port appended.
|
||||
#
|
||||
# Return Value: a socket identifier
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
proc http::SecureProxyConnect {args} {
|
||||
variable http
|
||||
variable ConnectVar
|
||||
variable ConnectCounter
|
||||
variable failedProxyValues
|
||||
set varName ::http::ConnectVar([incr ConnectCounter])
|
||||
|
||||
# Extract (non-proxy) target from args.
|
||||
set host [lindex $args end-3]
|
||||
set port [lindex $args end-2]
|
||||
set args [lreplace $args end-3 end-2]
|
||||
|
||||
# Proxy server URL for connection.
|
||||
# This determines where the socket is opened.
|
||||
set phost [lindex $args end-1]
|
||||
set pport [lindex $args end]
|
||||
if {[string first : $phost] != -1} {
|
||||
# IPv6 address, wrap it in [] so we can append :pport
|
||||
set phost "\[${phost}\]"
|
||||
}
|
||||
set url http://${phost}:${pport}
|
||||
# Elements of args other than host and port are not used when
|
||||
# AsyncTransaction opens a socket. Those elements are -async and the
|
||||
# -type $tokenName for the https transaction. Option -async is used by
|
||||
# AsyncTransaction anyway, and -type $tokenName should not be propagated:
|
||||
# the proxy request adds its own -type value.
|
||||
|
||||
set targ [lsearch -exact $args -type]
|
||||
if {$targ != -1} {
|
||||
# Record in the token that this is a proxy call.
|
||||
set token [lindex $args $targ+1]
|
||||
upvar 0 ${token} state
|
||||
set tim $state(-timeout)
|
||||
set state(proxyUsed) SecureProxyFailed
|
||||
# This value is overwritten with "SecureProxy" below if the CONNECT is
|
||||
# successful. If it is unsuccessful, the socket will be closed
|
||||
# below, and so in this unsuccessful case there are no other transactions
|
||||
# whose (proxyUsed) must be updated.
|
||||
} else {
|
||||
set tim 0
|
||||
}
|
||||
if {$tim == 0} {
|
||||
# Do not use infinite timeout for the proxy.
|
||||
set tim 30000
|
||||
}
|
||||
|
||||
# Prepare and send a CONNECT request to the proxy, using
|
||||
# code similar to http::geturl.
|
||||
set requestHeaders [list Host $host]
|
||||
lappend requestHeaders Connection keep-alive
|
||||
if {$http(-proxyauth) != {}} {
|
||||
lappend requestHeaders Proxy-Authorization $http(-proxyauth)
|
||||
}
|
||||
|
||||
set token2 [CreateToken $url -keepalive 0 -timeout $tim \
|
||||
-headers $requestHeaders -command [list http::AllDone $varName]]
|
||||
variable $token2
|
||||
upvar 0 $token2 state2
|
||||
|
||||
# Kludges:
|
||||
# Setting this variable overrides the HTTP request line and also allows
|
||||
# -headers to override the Connection: header set by -keepalive.
|
||||
# The arguments "-keepalive 0" ensure that when Finish is called for an
|
||||
# unsuccessful request, the socket is always closed.
|
||||
set state2(bypass) "CONNECT $host:$port HTTP/1.1"
|
||||
|
||||
AsyncTransaction $token2
|
||||
|
||||
if {[info coroutine] ne {}} {
|
||||
# All callers in the http package are coroutines launched by
|
||||
# the event loop.
|
||||
# The cwait command requires a coroutine because it yields
|
||||
# to the caller; $varName is traced and the coroutine resumes
|
||||
# when the variable is written.
|
||||
cwait $varName
|
||||
} else {
|
||||
return -code error {code must run in a coroutine}
|
||||
# For testing with a non-coroutine caller outside the http package.
|
||||
# vwait $varName
|
||||
}
|
||||
unset $varName
|
||||
|
||||
if { ($state2(state) ne "complete")
|
||||
|| ($state2(status) ne "ok")
|
||||
|| (![string is integer -strict $state2(responseCode)])
|
||||
} {
|
||||
set msg {the HTTP request to the proxy server did not return a valid\
|
||||
and complete response}
|
||||
if {[info exists state2(error)]} {
|
||||
append msg ": " [lindex $state2(error) 0]
|
||||
}
|
||||
cleanup $token2
|
||||
return -code error $msg
|
||||
}
|
||||
|
||||
set code $state2(responseCode)
|
||||
|
||||
if {($code >= 200) && ($code < 300)} {
|
||||
# All OK. The caller in package tls will now call "tls::import $sock".
|
||||
# The cleanup command does not close $sock.
|
||||
# Other tidying was done in http::Event.
|
||||
|
||||
# If this is a persistent socket, any other transactions that are
|
||||
# already marked to use the socket will have their (proxyUsed) updated
|
||||
# when http::OpenSocket calls http::ConfigureNewSocket.
|
||||
set state(proxyUsed) SecureProxy
|
||||
set sock $state2(sock)
|
||||
cleanup $token2
|
||||
return $sock
|
||||
}
|
||||
|
||||
if {$targ != -1} {
|
||||
# Non-OK HTTP status code; token is known because option -type
|
||||
# (cf. targ) was passed through tcltls, and so the useful
|
||||
# parts of the proxy's response can be copied to state(*).
|
||||
# Do not copy state2(sock).
|
||||
# Return the proxy response to the caller of geturl.
|
||||
foreach name $failedProxyValues {
|
||||
if {[info exists state2($name)]} {
|
||||
set state($name) $state2($name)
|
||||
}
|
||||
}
|
||||
set state(connection) close
|
||||
set msg "proxy connect failed: $code"
|
||||
# - This error message will be detected by http::OpenSocket and will
|
||||
# cause it to present the proxy's HTTP response as that of the
|
||||
# original $token transaction, identified only by state(proxyUsed)
|
||||
# as the response of the proxy.
|
||||
# - The cases where this would mislead the caller of http::geturl are
|
||||
# given a different value of msg (below) so that http::OpenSocket will
|
||||
# treat them as errors, but will preserve the $token array for
|
||||
# inspection by the caller.
|
||||
# - Status code 305 (Proxy Required) was deprecated for security reasons
|
||||
# in RFC 2616 (June 1999) and in any case should never be served by a
|
||||
# proxy.
|
||||
# - Other 3xx responses from the proxy are inappropriate, and should not
|
||||
# occur.
|
||||
# - A 401 response from the proxy is inappropriate, and should not
|
||||
# occur. It would be confusing if returned to the caller.
|
||||
|
||||
if {($code >= 300) && ($code < 400)} {
|
||||
set msg "the proxy server responded to the HTTP request with an\
|
||||
inappropriate $code redirect"
|
||||
set loc [responseHeaderValue $token2 location]
|
||||
if {$loc ne {}} {
|
||||
append msg "to " $loc
|
||||
}
|
||||
} elseif {($code == 401)} {
|
||||
set msg "the proxy server responded to the HTTP request with an\
|
||||
inappropriate 401 request for target-host credentials"
|
||||
} else {
|
||||
}
|
||||
} else {
|
||||
set msg "connection to proxy failed with status code $code"
|
||||
}
|
||||
|
||||
# - ${token2}(sock) has already been closed because -keepalive 0.
|
||||
# - Error return does not pass the socket ID to the
|
||||
# $token transaction, which retains its socket placeholder.
|
||||
cleanup $token2
|
||||
return -code error $msg
|
||||
}
|
||||
|
||||
proc http::AllDone {varName args} {
|
||||
set $varName done
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Proc http::socket
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -4767,7 +5197,7 @@ proc http::socket {args} {
|
||||
|
||||
LoadThreadIfNeeded
|
||||
|
||||
set targ [lsearch -exact $args -token]
|
||||
set targ [lsearch -exact $args -type]
|
||||
if {$targ != -1} {
|
||||
set token [lindex $args $targ+1]
|
||||
set args [lreplace $args $targ $targ+1]
|
||||
@@ -4831,7 +5261,7 @@ proc http::socket {args} {
|
||||
}
|
||||
|
||||
# The commands below are dependencies of http::socket and
|
||||
# are not used elsewhere.
|
||||
# http::SecureProxyConnect and are not used elsewhere.
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Proc http::LoadThreadIfNeeded
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
|
||||
package ifneeded http 2.10a4 [list tclPkgSetup $dir http 2.10a4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
package ifneeded http 2.10b1 [list tclPkgSetup $dir http 2.10b1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ proc ::practcl::_pkgindex_directory {path} {
|
||||
# Read the file, and override assumptions as needed
|
||||
###
|
||||
set fin [open $file r]
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
|
||||
set dat [read $fin]
|
||||
close $fin
|
||||
# Look for a teapot style Package statement
|
||||
@@ -59,7 +59,7 @@ proc ::practcl::_pkgindex_directory {path} {
|
||||
foreach file [glob -nocomplain $path/*.tcl] {
|
||||
if { [file tail $file] == "version_info.tcl" } continue
|
||||
set fin [open $file r]
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
|
||||
set dat [read $fin]
|
||||
close $fin
|
||||
if {![regexp "package provide" $dat]} continue
|
||||
@@ -79,7 +79,7 @@ proc ::practcl::_pkgindex_directory {path} {
|
||||
return $buffer
|
||||
}
|
||||
set fin [open $pkgidxfile r]
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
|
||||
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
|
||||
set dat [read $fin]
|
||||
close $fin
|
||||
set trace 0
|
||||
|
||||
@@ -5,12 +5,12 @@ apply {{dir} {
|
||||
set ::test [info script]
|
||||
set isafe [interp issafe]
|
||||
foreach {safe package version file} {
|
||||
0 http 2.10a4 {http http.tcl}
|
||||
0 http 2.10b1 {http http.tcl}
|
||||
1 msgcat 1.7.1 {msgcat msgcat.tcl}
|
||||
1 opt 0.4.8 {opt optparse.tcl}
|
||||
0 cookiejar 0.2.0 {cookiejar cookiejar.tcl}
|
||||
0 tcl::idna 1.0.1 {cookiejar idna.tcl}
|
||||
0 platform 1.0.18 {platform platform.tcl}
|
||||
0 platform 1.0.19 {platform platform.tcl}
|
||||
0 platform::shell 1.1.4 {platform shell.tcl}
|
||||
1 tcltest 2.5.5 {tcltest tcltest.tcl}
|
||||
} {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package ifneeded platform 1.0.18 [list source [file join $dir platform.tcl]]
|
||||
package ifneeded platform 1.0.19 [list source [file join $dir platform.tcl]]
|
||||
package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]]
|
||||
|
||||
|
||||
@@ -364,6 +364,17 @@ proc ::platform::patterns {id} {
|
||||
foreach {major minor} [split $v .] break
|
||||
|
||||
set res {}
|
||||
if {$major eq 13} {
|
||||
# Add 13.0 to 13.minor to patterns.
|
||||
for {set j $minor} {$j >= 0} {incr j -1} {
|
||||
lappend res macosx${major}.${j}-${cpu}
|
||||
foreach a $alt {
|
||||
lappend res macosx${major}.${j}-$a
|
||||
}
|
||||
}
|
||||
set major 12
|
||||
set minor 5
|
||||
}
|
||||
if {$major eq 12} {
|
||||
# Add 12.0 to 12.minor to patterns.
|
||||
for {set j $minor} {$j >= 0} {incr j -1} {
|
||||
@@ -420,7 +431,7 @@ proc ::platform::patterns {id} {
|
||||
# ### ### ### ######### ######### #########
|
||||
## Ready
|
||||
|
||||
package provide platform 1.0.18
|
||||
package provide platform 1.0.19
|
||||
|
||||
# ### ### ### ######### ######### #########
|
||||
## Demo application
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.5-]} return
|
||||
if {[info sharedlibextension] != ".dll"} return
|
||||
if {[package vsatisfies [package provide Tcl] 9.0-]} {
|
||||
package ifneeded registry 1.3.6 \
|
||||
package ifneeded registry 1.3.7 \
|
||||
[list load [file join $dir tcl9registry13.dll] Registry]
|
||||
} else {
|
||||
package ifneeded registry 1.3.6 \
|
||||
package ifneeded registry 1.3.7 \
|
||||
[list load [file join $dir tclregistry13.dll] Registry]
|
||||
}
|
||||
|
||||
@@ -65,158 +65,4 @@ set TZData(:America/Bahia_Banderas) {
|
||||
{1635663600 -21600 0 CST}
|
||||
{1648972800 -18000 1 CDT}
|
||||
{1667113200 -21600 0 CST}
|
||||
{1680422400 -18000 1 CDT}
|
||||
{1698562800 -21600 0 CST}
|
||||
{1712476800 -18000 1 CDT}
|
||||
{1730012400 -21600 0 CST}
|
||||
{1743926400 -18000 1 CDT}
|
||||
{1761462000 -21600 0 CST}
|
||||
{1775376000 -18000 1 CDT}
|
||||
{1792911600 -21600 0 CST}
|
||||
{1806825600 -18000 1 CDT}
|
||||
{1824966000 -21600 0 CST}
|
||||
{1838275200 -18000 1 CDT}
|
||||
{1856415600 -21600 0 CST}
|
||||
{1869724800 -18000 1 CDT}
|
||||
{1887865200 -21600 0 CST}
|
||||
{1901779200 -18000 1 CDT}
|
||||
{1919314800 -21600 0 CST}
|
||||
{1933228800 -18000 1 CDT}
|
||||
{1950764400 -21600 0 CST}
|
||||
{1964678400 -18000 1 CDT}
|
||||
{1982818800 -21600 0 CST}
|
||||
{1996128000 -18000 1 CDT}
|
||||
{2014268400 -21600 0 CST}
|
||||
{2027577600 -18000 1 CDT}
|
||||
{2045718000 -21600 0 CST}
|
||||
{2059027200 -18000 1 CDT}
|
||||
{2077167600 -21600 0 CST}
|
||||
{2091081600 -18000 1 CDT}
|
||||
{2108617200 -21600 0 CST}
|
||||
{2122531200 -18000 1 CDT}
|
||||
{2140066800 -21600 0 CST}
|
||||
{2153980800 -18000 1 CDT}
|
||||
{2172121200 -21600 0 CST}
|
||||
{2185430400 -18000 1 CDT}
|
||||
{2203570800 -21600 0 CST}
|
||||
{2216880000 -18000 1 CDT}
|
||||
{2235020400 -21600 0 CST}
|
||||
{2248934400 -18000 1 CDT}
|
||||
{2266470000 -21600 0 CST}
|
||||
{2280384000 -18000 1 CDT}
|
||||
{2297919600 -21600 0 CST}
|
||||
{2311833600 -18000 1 CDT}
|
||||
{2329369200 -21600 0 CST}
|
||||
{2343283200 -18000 1 CDT}
|
||||
{2361423600 -21600 0 CST}
|
||||
{2374732800 -18000 1 CDT}
|
||||
{2392873200 -21600 0 CST}
|
||||
{2406182400 -18000 1 CDT}
|
||||
{2424322800 -21600 0 CST}
|
||||
{2438236800 -18000 1 CDT}
|
||||
{2455772400 -21600 0 CST}
|
||||
{2469686400 -18000 1 CDT}
|
||||
{2487222000 -21600 0 CST}
|
||||
{2501136000 -18000 1 CDT}
|
||||
{2519276400 -21600 0 CST}
|
||||
{2532585600 -18000 1 CDT}
|
||||
{2550726000 -21600 0 CST}
|
||||
{2564035200 -18000 1 CDT}
|
||||
{2582175600 -21600 0 CST}
|
||||
{2596089600 -18000 1 CDT}
|
||||
{2613625200 -21600 0 CST}
|
||||
{2627539200 -18000 1 CDT}
|
||||
{2645074800 -21600 0 CST}
|
||||
{2658988800 -18000 1 CDT}
|
||||
{2676524400 -21600 0 CST}
|
||||
{2690438400 -18000 1 CDT}
|
||||
{2708578800 -21600 0 CST}
|
||||
{2721888000 -18000 1 CDT}
|
||||
{2740028400 -21600 0 CST}
|
||||
{2753337600 -18000 1 CDT}
|
||||
{2771478000 -21600 0 CST}
|
||||
{2785392000 -18000 1 CDT}
|
||||
{2802927600 -21600 0 CST}
|
||||
{2816841600 -18000 1 CDT}
|
||||
{2834377200 -21600 0 CST}
|
||||
{2848291200 -18000 1 CDT}
|
||||
{2866431600 -21600 0 CST}
|
||||
{2879740800 -18000 1 CDT}
|
||||
{2897881200 -21600 0 CST}
|
||||
{2911190400 -18000 1 CDT}
|
||||
{2929330800 -21600 0 CST}
|
||||
{2942640000 -18000 1 CDT}
|
||||
{2960780400 -21600 0 CST}
|
||||
{2974694400 -18000 1 CDT}
|
||||
{2992230000 -21600 0 CST}
|
||||
{3006144000 -18000 1 CDT}
|
||||
{3023679600 -21600 0 CST}
|
||||
{3037593600 -18000 1 CDT}
|
||||
{3055734000 -21600 0 CST}
|
||||
{3069043200 -18000 1 CDT}
|
||||
{3087183600 -21600 0 CST}
|
||||
{3100492800 -18000 1 CDT}
|
||||
{3118633200 -21600 0 CST}
|
||||
{3132547200 -18000 1 CDT}
|
||||
{3150082800 -21600 0 CST}
|
||||
{3163996800 -18000 1 CDT}
|
||||
{3181532400 -21600 0 CST}
|
||||
{3195446400 -18000 1 CDT}
|
||||
{3212982000 -21600 0 CST}
|
||||
{3226896000 -18000 1 CDT}
|
||||
{3245036400 -21600 0 CST}
|
||||
{3258345600 -18000 1 CDT}
|
||||
{3276486000 -21600 0 CST}
|
||||
{3289795200 -18000 1 CDT}
|
||||
{3307935600 -21600 0 CST}
|
||||
{3321849600 -18000 1 CDT}
|
||||
{3339385200 -21600 0 CST}
|
||||
{3353299200 -18000 1 CDT}
|
||||
{3370834800 -21600 0 CST}
|
||||
{3384748800 -18000 1 CDT}
|
||||
{3402889200 -21600 0 CST}
|
||||
{3416198400 -18000 1 CDT}
|
||||
{3434338800 -21600 0 CST}
|
||||
{3447648000 -18000 1 CDT}
|
||||
{3465788400 -21600 0 CST}
|
||||
{3479702400 -18000 1 CDT}
|
||||
{3497238000 -21600 0 CST}
|
||||
{3511152000 -18000 1 CDT}
|
||||
{3528687600 -21600 0 CST}
|
||||
{3542601600 -18000 1 CDT}
|
||||
{3560137200 -21600 0 CST}
|
||||
{3574051200 -18000 1 CDT}
|
||||
{3592191600 -21600 0 CST}
|
||||
{3605500800 -18000 1 CDT}
|
||||
{3623641200 -21600 0 CST}
|
||||
{3636950400 -18000 1 CDT}
|
||||
{3655090800 -21600 0 CST}
|
||||
{3669004800 -18000 1 CDT}
|
||||
{3686540400 -21600 0 CST}
|
||||
{3700454400 -18000 1 CDT}
|
||||
{3717990000 -21600 0 CST}
|
||||
{3731904000 -18000 1 CDT}
|
||||
{3750044400 -21600 0 CST}
|
||||
{3763353600 -18000 1 CDT}
|
||||
{3781494000 -21600 0 CST}
|
||||
{3794803200 -18000 1 CDT}
|
||||
{3812943600 -21600 0 CST}
|
||||
{3826252800 -18000 1 CDT}
|
||||
{3844393200 -21600 0 CST}
|
||||
{3858307200 -18000 1 CDT}
|
||||
{3875842800 -21600 0 CST}
|
||||
{3889756800 -18000 1 CDT}
|
||||
{3907292400 -21600 0 CST}
|
||||
{3921206400 -18000 1 CDT}
|
||||
{3939346800 -21600 0 CST}
|
||||
{3952656000 -18000 1 CDT}
|
||||
{3970796400 -21600 0 CST}
|
||||
{3984105600 -18000 1 CDT}
|
||||
{4002246000 -21600 0 CST}
|
||||
{4016160000 -18000 1 CDT}
|
||||
{4033695600 -21600 0 CST}
|
||||
{4047609600 -18000 1 CDT}
|
||||
{4065145200 -21600 0 CST}
|
||||
{4079059200 -18000 1 CDT}
|
||||
{4096594800 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,5 @@ set TZData(:America/Bogota) {
|
||||
{-2707671824 -17776 0 BMT}
|
||||
{-1739041424 -18000 0 -05}
|
||||
{704869200 -14400 1 -05}
|
||||
{733896000 -18000 0 -05}
|
||||
{729057600 -18000 0 -05}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,22 @@ set TZData(:America/Cambridge_Bay) {
|
||||
{-880210800 -21600 1 MWT}
|
||||
{-769395600 -21600 1 MPT}
|
||||
{-765388800 -25200 0 MST}
|
||||
{-147891600 -18000 1 MDDT}
|
||||
{-131562000 -25200 0 MST}
|
||||
{73472400 -21600 1 MDT}
|
||||
{89193600 -25200 0 MST}
|
||||
{104922000 -21600 1 MDT}
|
||||
{120643200 -25200 0 MST}
|
||||
{136371600 -21600 1 MDT}
|
||||
{152092800 -25200 0 MST}
|
||||
{167821200 -21600 1 MDT}
|
||||
{183542400 -25200 0 MST}
|
||||
{199270800 -21600 1 MDT}
|
||||
{215596800 -25200 0 MST}
|
||||
{230720400 -21600 1 MDT}
|
||||
{247046400 -25200 0 MST}
|
||||
{262774800 -21600 1 MDT}
|
||||
{278496000 -25200 0 MST}
|
||||
{294224400 -21600 1 MDT}
|
||||
{309945600 -25200 0 MST}
|
||||
{325674000 -21600 1 MDT}
|
||||
{341395200 -25200 0 MST}
|
||||
{357123600 -21600 1 MDT}
|
||||
|
||||
@@ -63,159 +63,5 @@ set TZData(:America/Chihuahua) {
|
||||
{1617526800 -21600 1 MDT}
|
||||
{1635667200 -25200 0 MST}
|
||||
{1648976400 -21600 1 MDT}
|
||||
{1667116800 -25200 0 MST}
|
||||
{1680426000 -21600 1 MDT}
|
||||
{1698566400 -25200 0 MST}
|
||||
{1712480400 -21600 1 MDT}
|
||||
{1730016000 -25200 0 MST}
|
||||
{1743930000 -21600 1 MDT}
|
||||
{1761465600 -25200 0 MST}
|
||||
{1775379600 -21600 1 MDT}
|
||||
{1792915200 -25200 0 MST}
|
||||
{1806829200 -21600 1 MDT}
|
||||
{1824969600 -25200 0 MST}
|
||||
{1838278800 -21600 1 MDT}
|
||||
{1856419200 -25200 0 MST}
|
||||
{1869728400 -21600 1 MDT}
|
||||
{1887868800 -25200 0 MST}
|
||||
{1901782800 -21600 1 MDT}
|
||||
{1919318400 -25200 0 MST}
|
||||
{1933232400 -21600 1 MDT}
|
||||
{1950768000 -25200 0 MST}
|
||||
{1964682000 -21600 1 MDT}
|
||||
{1982822400 -25200 0 MST}
|
||||
{1996131600 -21600 1 MDT}
|
||||
{2014272000 -25200 0 MST}
|
||||
{2027581200 -21600 1 MDT}
|
||||
{2045721600 -25200 0 MST}
|
||||
{2059030800 -21600 1 MDT}
|
||||
{2077171200 -25200 0 MST}
|
||||
{2091085200 -21600 1 MDT}
|
||||
{2108620800 -25200 0 MST}
|
||||
{2122534800 -21600 1 MDT}
|
||||
{2140070400 -25200 0 MST}
|
||||
{2153984400 -21600 1 MDT}
|
||||
{2172124800 -25200 0 MST}
|
||||
{2185434000 -21600 1 MDT}
|
||||
{2203574400 -25200 0 MST}
|
||||
{2216883600 -21600 1 MDT}
|
||||
{2235024000 -25200 0 MST}
|
||||
{2248938000 -21600 1 MDT}
|
||||
{2266473600 -25200 0 MST}
|
||||
{2280387600 -21600 1 MDT}
|
||||
{2297923200 -25200 0 MST}
|
||||
{2311837200 -21600 1 MDT}
|
||||
{2329372800 -25200 0 MST}
|
||||
{2343286800 -21600 1 MDT}
|
||||
{2361427200 -25200 0 MST}
|
||||
{2374736400 -21600 1 MDT}
|
||||
{2392876800 -25200 0 MST}
|
||||
{2406186000 -21600 1 MDT}
|
||||
{2424326400 -25200 0 MST}
|
||||
{2438240400 -21600 1 MDT}
|
||||
{2455776000 -25200 0 MST}
|
||||
{2469690000 -21600 1 MDT}
|
||||
{2487225600 -25200 0 MST}
|
||||
{2501139600 -21600 1 MDT}
|
||||
{2519280000 -25200 0 MST}
|
||||
{2532589200 -21600 1 MDT}
|
||||
{2550729600 -25200 0 MST}
|
||||
{2564038800 -21600 1 MDT}
|
||||
{2582179200 -25200 0 MST}
|
||||
{2596093200 -21600 1 MDT}
|
||||
{2613628800 -25200 0 MST}
|
||||
{2627542800 -21600 1 MDT}
|
||||
{2645078400 -25200 0 MST}
|
||||
{2658992400 -21600 1 MDT}
|
||||
{2676528000 -25200 0 MST}
|
||||
{2690442000 -21600 1 MDT}
|
||||
{2708582400 -25200 0 MST}
|
||||
{2721891600 -21600 1 MDT}
|
||||
{2740032000 -25200 0 MST}
|
||||
{2753341200 -21600 1 MDT}
|
||||
{2771481600 -25200 0 MST}
|
||||
{2785395600 -21600 1 MDT}
|
||||
{2802931200 -25200 0 MST}
|
||||
{2816845200 -21600 1 MDT}
|
||||
{2834380800 -25200 0 MST}
|
||||
{2848294800 -21600 1 MDT}
|
||||
{2866435200 -25200 0 MST}
|
||||
{2879744400 -21600 1 MDT}
|
||||
{2897884800 -25200 0 MST}
|
||||
{2911194000 -21600 1 MDT}
|
||||
{2929334400 -25200 0 MST}
|
||||
{2942643600 -21600 1 MDT}
|
||||
{2960784000 -25200 0 MST}
|
||||
{2974698000 -21600 1 MDT}
|
||||
{2992233600 -25200 0 MST}
|
||||
{3006147600 -21600 1 MDT}
|
||||
{3023683200 -25200 0 MST}
|
||||
{3037597200 -21600 1 MDT}
|
||||
{3055737600 -25200 0 MST}
|
||||
{3069046800 -21600 1 MDT}
|
||||
{3087187200 -25200 0 MST}
|
||||
{3100496400 -21600 1 MDT}
|
||||
{3118636800 -25200 0 MST}
|
||||
{3132550800 -21600 1 MDT}
|
||||
{3150086400 -25200 0 MST}
|
||||
{3164000400 -21600 1 MDT}
|
||||
{3181536000 -25200 0 MST}
|
||||
{3195450000 -21600 1 MDT}
|
||||
{3212985600 -25200 0 MST}
|
||||
{3226899600 -21600 1 MDT}
|
||||
{3245040000 -25200 0 MST}
|
||||
{3258349200 -21600 1 MDT}
|
||||
{3276489600 -25200 0 MST}
|
||||
{3289798800 -21600 1 MDT}
|
||||
{3307939200 -25200 0 MST}
|
||||
{3321853200 -21600 1 MDT}
|
||||
{3339388800 -25200 0 MST}
|
||||
{3353302800 -21600 1 MDT}
|
||||
{3370838400 -25200 0 MST}
|
||||
{3384752400 -21600 1 MDT}
|
||||
{3402892800 -25200 0 MST}
|
||||
{3416202000 -21600 1 MDT}
|
||||
{3434342400 -25200 0 MST}
|
||||
{3447651600 -21600 1 MDT}
|
||||
{3465792000 -25200 0 MST}
|
||||
{3479706000 -21600 1 MDT}
|
||||
{3497241600 -25200 0 MST}
|
||||
{3511155600 -21600 1 MDT}
|
||||
{3528691200 -25200 0 MST}
|
||||
{3542605200 -21600 1 MDT}
|
||||
{3560140800 -25200 0 MST}
|
||||
{3574054800 -21600 1 MDT}
|
||||
{3592195200 -25200 0 MST}
|
||||
{3605504400 -21600 1 MDT}
|
||||
{3623644800 -25200 0 MST}
|
||||
{3636954000 -21600 1 MDT}
|
||||
{3655094400 -25200 0 MST}
|
||||
{3669008400 -21600 1 MDT}
|
||||
{3686544000 -25200 0 MST}
|
||||
{3700458000 -21600 1 MDT}
|
||||
{3717993600 -25200 0 MST}
|
||||
{3731907600 -21600 1 MDT}
|
||||
{3750048000 -25200 0 MST}
|
||||
{3763357200 -21600 1 MDT}
|
||||
{3781497600 -25200 0 MST}
|
||||
{3794806800 -21600 1 MDT}
|
||||
{3812947200 -25200 0 MST}
|
||||
{3826256400 -21600 1 MDT}
|
||||
{3844396800 -25200 0 MST}
|
||||
{3858310800 -21600 1 MDT}
|
||||
{3875846400 -25200 0 MST}
|
||||
{3889760400 -21600 1 MDT}
|
||||
{3907296000 -25200 0 MST}
|
||||
{3921210000 -21600 1 MDT}
|
||||
{3939350400 -25200 0 MST}
|
||||
{3952659600 -21600 1 MDT}
|
||||
{3970800000 -25200 0 MST}
|
||||
{3984109200 -21600 1 MDT}
|
||||
{4002249600 -25200 0 MST}
|
||||
{4016163600 -21600 1 MDT}
|
||||
{4033699200 -25200 0 MST}
|
||||
{4047613200 -21600 1 MDT}
|
||||
{4065148800 -25200 0 MST}
|
||||
{4079062800 -21600 1 MDT}
|
||||
{4096598400 -25200 0 MST}
|
||||
{1667120400 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,10 @@ set TZData(:America/Dawson) {
|
||||
{-880203600 -28800 1 YWT}
|
||||
{-769395600 -28800 1 YPT}
|
||||
{-765381600 -32400 0 YST}
|
||||
{-157734000 -32400 0 YST}
|
||||
{-147884400 -25200 1 YDDT}
|
||||
{-131554800 -32400 0 YST}
|
||||
{120646800 -28800 0 PST}
|
||||
{315561600 -28800 0 PST}
|
||||
{325677600 -25200 1 PDT}
|
||||
{341398800 -28800 0 PST}
|
||||
|
||||
@@ -3,8 +3,22 @@
|
||||
set TZData(:America/Inuvik) {
|
||||
{-9223372036854775808 0 0 -00}
|
||||
{-536457600 -28800 0 PST}
|
||||
{-147888000 -21600 1 PDDT}
|
||||
{-131558400 -28800 0 PST}
|
||||
{73476000 -25200 1 PDT}
|
||||
{89197200 -28800 0 PST}
|
||||
{104925600 -25200 1 PDT}
|
||||
{120646800 -28800 0 PST}
|
||||
{136375200 -25200 1 PDT}
|
||||
{152096400 -28800 0 PST}
|
||||
{167824800 -25200 1 PDT}
|
||||
{183546000 -28800 0 PST}
|
||||
{199274400 -25200 1 PDT}
|
||||
{215600400 -28800 0 PST}
|
||||
{230724000 -25200 1 PDT}
|
||||
{247050000 -28800 0 PST}
|
||||
{262778400 -25200 1 PDT}
|
||||
{278499600 -28800 0 PST}
|
||||
{294228000 -21600 0 MDT}
|
||||
{309945600 -25200 0 MST}
|
||||
{315558000 -25200 0 MST}
|
||||
{325674000 -21600 1 MDT}
|
||||
{341395200 -25200 0 MST}
|
||||
|
||||
@@ -5,8 +5,22 @@ set TZData(:America/Iqaluit) {
|
||||
{-865296000 -14400 0 EWT}
|
||||
{-769395600 -14400 1 EPT}
|
||||
{-765396000 -18000 0 EST}
|
||||
{-147898800 -10800 1 EDDT}
|
||||
{-131569200 -18000 0 EST}
|
||||
{73465200 -14400 1 EDT}
|
||||
{89186400 -18000 0 EST}
|
||||
{104914800 -14400 1 EDT}
|
||||
{120636000 -18000 0 EST}
|
||||
{136364400 -14400 1 EDT}
|
||||
{152085600 -18000 0 EST}
|
||||
{167814000 -14400 1 EDT}
|
||||
{183535200 -18000 0 EST}
|
||||
{199263600 -14400 1 EDT}
|
||||
{215589600 -18000 0 EST}
|
||||
{230713200 -14400 1 EDT}
|
||||
{247039200 -18000 0 EST}
|
||||
{262767600 -14400 1 EDT}
|
||||
{278488800 -18000 0 EST}
|
||||
{294217200 -14400 1 EDT}
|
||||
{309938400 -18000 0 EST}
|
||||
{325666800 -14400 1 EDT}
|
||||
{341388000 -18000 0 EST}
|
||||
{357116400 -14400 1 EDT}
|
||||
|
||||
@@ -65,158 +65,4 @@ set TZData(:America/Mazatlan) {
|
||||
{1635667200 -25200 0 MST}
|
||||
{1648976400 -21600 1 MDT}
|
||||
{1667116800 -25200 0 MST}
|
||||
{1680426000 -21600 1 MDT}
|
||||
{1698566400 -25200 0 MST}
|
||||
{1712480400 -21600 1 MDT}
|
||||
{1730016000 -25200 0 MST}
|
||||
{1743930000 -21600 1 MDT}
|
||||
{1761465600 -25200 0 MST}
|
||||
{1775379600 -21600 1 MDT}
|
||||
{1792915200 -25200 0 MST}
|
||||
{1806829200 -21600 1 MDT}
|
||||
{1824969600 -25200 0 MST}
|
||||
{1838278800 -21600 1 MDT}
|
||||
{1856419200 -25200 0 MST}
|
||||
{1869728400 -21600 1 MDT}
|
||||
{1887868800 -25200 0 MST}
|
||||
{1901782800 -21600 1 MDT}
|
||||
{1919318400 -25200 0 MST}
|
||||
{1933232400 -21600 1 MDT}
|
||||
{1950768000 -25200 0 MST}
|
||||
{1964682000 -21600 1 MDT}
|
||||
{1982822400 -25200 0 MST}
|
||||
{1996131600 -21600 1 MDT}
|
||||
{2014272000 -25200 0 MST}
|
||||
{2027581200 -21600 1 MDT}
|
||||
{2045721600 -25200 0 MST}
|
||||
{2059030800 -21600 1 MDT}
|
||||
{2077171200 -25200 0 MST}
|
||||
{2091085200 -21600 1 MDT}
|
||||
{2108620800 -25200 0 MST}
|
||||
{2122534800 -21600 1 MDT}
|
||||
{2140070400 -25200 0 MST}
|
||||
{2153984400 -21600 1 MDT}
|
||||
{2172124800 -25200 0 MST}
|
||||
{2185434000 -21600 1 MDT}
|
||||
{2203574400 -25200 0 MST}
|
||||
{2216883600 -21600 1 MDT}
|
||||
{2235024000 -25200 0 MST}
|
||||
{2248938000 -21600 1 MDT}
|
||||
{2266473600 -25200 0 MST}
|
||||
{2280387600 -21600 1 MDT}
|
||||
{2297923200 -25200 0 MST}
|
||||
{2311837200 -21600 1 MDT}
|
||||
{2329372800 -25200 0 MST}
|
||||
{2343286800 -21600 1 MDT}
|
||||
{2361427200 -25200 0 MST}
|
||||
{2374736400 -21600 1 MDT}
|
||||
{2392876800 -25200 0 MST}
|
||||
{2406186000 -21600 1 MDT}
|
||||
{2424326400 -25200 0 MST}
|
||||
{2438240400 -21600 1 MDT}
|
||||
{2455776000 -25200 0 MST}
|
||||
{2469690000 -21600 1 MDT}
|
||||
{2487225600 -25200 0 MST}
|
||||
{2501139600 -21600 1 MDT}
|
||||
{2519280000 -25200 0 MST}
|
||||
{2532589200 -21600 1 MDT}
|
||||
{2550729600 -25200 0 MST}
|
||||
{2564038800 -21600 1 MDT}
|
||||
{2582179200 -25200 0 MST}
|
||||
{2596093200 -21600 1 MDT}
|
||||
{2613628800 -25200 0 MST}
|
||||
{2627542800 -21600 1 MDT}
|
||||
{2645078400 -25200 0 MST}
|
||||
{2658992400 -21600 1 MDT}
|
||||
{2676528000 -25200 0 MST}
|
||||
{2690442000 -21600 1 MDT}
|
||||
{2708582400 -25200 0 MST}
|
||||
{2721891600 -21600 1 MDT}
|
||||
{2740032000 -25200 0 MST}
|
||||
{2753341200 -21600 1 MDT}
|
||||
{2771481600 -25200 0 MST}
|
||||
{2785395600 -21600 1 MDT}
|
||||
{2802931200 -25200 0 MST}
|
||||
{2816845200 -21600 1 MDT}
|
||||
{2834380800 -25200 0 MST}
|
||||
{2848294800 -21600 1 MDT}
|
||||
{2866435200 -25200 0 MST}
|
||||
{2879744400 -21600 1 MDT}
|
||||
{2897884800 -25200 0 MST}
|
||||
{2911194000 -21600 1 MDT}
|
||||
{2929334400 -25200 0 MST}
|
||||
{2942643600 -21600 1 MDT}
|
||||
{2960784000 -25200 0 MST}
|
||||
{2974698000 -21600 1 MDT}
|
||||
{2992233600 -25200 0 MST}
|
||||
{3006147600 -21600 1 MDT}
|
||||
{3023683200 -25200 0 MST}
|
||||
{3037597200 -21600 1 MDT}
|
||||
{3055737600 -25200 0 MST}
|
||||
{3069046800 -21600 1 MDT}
|
||||
{3087187200 -25200 0 MST}
|
||||
{3100496400 -21600 1 MDT}
|
||||
{3118636800 -25200 0 MST}
|
||||
{3132550800 -21600 1 MDT}
|
||||
{3150086400 -25200 0 MST}
|
||||
{3164000400 -21600 1 MDT}
|
||||
{3181536000 -25200 0 MST}
|
||||
{3195450000 -21600 1 MDT}
|
||||
{3212985600 -25200 0 MST}
|
||||
{3226899600 -21600 1 MDT}
|
||||
{3245040000 -25200 0 MST}
|
||||
{3258349200 -21600 1 MDT}
|
||||
{3276489600 -25200 0 MST}
|
||||
{3289798800 -21600 1 MDT}
|
||||
{3307939200 -25200 0 MST}
|
||||
{3321853200 -21600 1 MDT}
|
||||
{3339388800 -25200 0 MST}
|
||||
{3353302800 -21600 1 MDT}
|
||||
{3370838400 -25200 0 MST}
|
||||
{3384752400 -21600 1 MDT}
|
||||
{3402892800 -25200 0 MST}
|
||||
{3416202000 -21600 1 MDT}
|
||||
{3434342400 -25200 0 MST}
|
||||
{3447651600 -21600 1 MDT}
|
||||
{3465792000 -25200 0 MST}
|
||||
{3479706000 -21600 1 MDT}
|
||||
{3497241600 -25200 0 MST}
|
||||
{3511155600 -21600 1 MDT}
|
||||
{3528691200 -25200 0 MST}
|
||||
{3542605200 -21600 1 MDT}
|
||||
{3560140800 -25200 0 MST}
|
||||
{3574054800 -21600 1 MDT}
|
||||
{3592195200 -25200 0 MST}
|
||||
{3605504400 -21600 1 MDT}
|
||||
{3623644800 -25200 0 MST}
|
||||
{3636954000 -21600 1 MDT}
|
||||
{3655094400 -25200 0 MST}
|
||||
{3669008400 -21600 1 MDT}
|
||||
{3686544000 -25200 0 MST}
|
||||
{3700458000 -21600 1 MDT}
|
||||
{3717993600 -25200 0 MST}
|
||||
{3731907600 -21600 1 MDT}
|
||||
{3750048000 -25200 0 MST}
|
||||
{3763357200 -21600 1 MDT}
|
||||
{3781497600 -25200 0 MST}
|
||||
{3794806800 -21600 1 MDT}
|
||||
{3812947200 -25200 0 MST}
|
||||
{3826256400 -21600 1 MDT}
|
||||
{3844396800 -25200 0 MST}
|
||||
{3858310800 -21600 1 MDT}
|
||||
{3875846400 -25200 0 MST}
|
||||
{3889760400 -21600 1 MDT}
|
||||
{3907296000 -25200 0 MST}
|
||||
{3921210000 -21600 1 MDT}
|
||||
{3939350400 -25200 0 MST}
|
||||
{3952659600 -21600 1 MDT}
|
||||
{3970800000 -25200 0 MST}
|
||||
{3984109200 -21600 1 MDT}
|
||||
{4002249600 -25200 0 MST}
|
||||
{4016163600 -21600 1 MDT}
|
||||
{4033699200 -25200 0 MST}
|
||||
{4047613200 -21600 1 MDT}
|
||||
{4065148800 -25200 0 MST}
|
||||
{4079062800 -21600 1 MDT}
|
||||
{4096598400 -25200 0 MST}
|
||||
}
|
||||
|
||||
@@ -59,158 +59,4 @@ set TZData(:America/Merida) {
|
||||
{1635663600 -21600 0 CST}
|
||||
{1648972800 -18000 1 CDT}
|
||||
{1667113200 -21600 0 CST}
|
||||
{1680422400 -18000 1 CDT}
|
||||
{1698562800 -21600 0 CST}
|
||||
{1712476800 -18000 1 CDT}
|
||||
{1730012400 -21600 0 CST}
|
||||
{1743926400 -18000 1 CDT}
|
||||
{1761462000 -21600 0 CST}
|
||||
{1775376000 -18000 1 CDT}
|
||||
{1792911600 -21600 0 CST}
|
||||
{1806825600 -18000 1 CDT}
|
||||
{1824966000 -21600 0 CST}
|
||||
{1838275200 -18000 1 CDT}
|
||||
{1856415600 -21600 0 CST}
|
||||
{1869724800 -18000 1 CDT}
|
||||
{1887865200 -21600 0 CST}
|
||||
{1901779200 -18000 1 CDT}
|
||||
{1919314800 -21600 0 CST}
|
||||
{1933228800 -18000 1 CDT}
|
||||
{1950764400 -21600 0 CST}
|
||||
{1964678400 -18000 1 CDT}
|
||||
{1982818800 -21600 0 CST}
|
||||
{1996128000 -18000 1 CDT}
|
||||
{2014268400 -21600 0 CST}
|
||||
{2027577600 -18000 1 CDT}
|
||||
{2045718000 -21600 0 CST}
|
||||
{2059027200 -18000 1 CDT}
|
||||
{2077167600 -21600 0 CST}
|
||||
{2091081600 -18000 1 CDT}
|
||||
{2108617200 -21600 0 CST}
|
||||
{2122531200 -18000 1 CDT}
|
||||
{2140066800 -21600 0 CST}
|
||||
{2153980800 -18000 1 CDT}
|
||||
{2172121200 -21600 0 CST}
|
||||
{2185430400 -18000 1 CDT}
|
||||
{2203570800 -21600 0 CST}
|
||||
{2216880000 -18000 1 CDT}
|
||||
{2235020400 -21600 0 CST}
|
||||
{2248934400 -18000 1 CDT}
|
||||
{2266470000 -21600 0 CST}
|
||||
{2280384000 -18000 1 CDT}
|
||||
{2297919600 -21600 0 CST}
|
||||
{2311833600 -18000 1 CDT}
|
||||
{2329369200 -21600 0 CST}
|
||||
{2343283200 -18000 1 CDT}
|
||||
{2361423600 -21600 0 CST}
|
||||
{2374732800 -18000 1 CDT}
|
||||
{2392873200 -21600 0 CST}
|
||||
{2406182400 -18000 1 CDT}
|
||||
{2424322800 -21600 0 CST}
|
||||
{2438236800 -18000 1 CDT}
|
||||
{2455772400 -21600 0 CST}
|
||||
{2469686400 -18000 1 CDT}
|
||||
{2487222000 -21600 0 CST}
|
||||
{2501136000 -18000 1 CDT}
|
||||
{2519276400 -21600 0 CST}
|
||||
{2532585600 -18000 1 CDT}
|
||||
{2550726000 -21600 0 CST}
|
||||
{2564035200 -18000 1 CDT}
|
||||
{2582175600 -21600 0 CST}
|
||||
{2596089600 -18000 1 CDT}
|
||||
{2613625200 -21600 0 CST}
|
||||
{2627539200 -18000 1 CDT}
|
||||
{2645074800 -21600 0 CST}
|
||||
{2658988800 -18000 1 CDT}
|
||||
{2676524400 -21600 0 CST}
|
||||
{2690438400 -18000 1 CDT}
|
||||
{2708578800 -21600 0 CST}
|
||||
{2721888000 -18000 1 CDT}
|
||||
{2740028400 -21600 0 CST}
|
||||
{2753337600 -18000 1 CDT}
|
||||
{2771478000 -21600 0 CST}
|
||||
{2785392000 -18000 1 CDT}
|
||||
{2802927600 -21600 0 CST}
|
||||
{2816841600 -18000 1 CDT}
|
||||
{2834377200 -21600 0 CST}
|
||||
{2848291200 -18000 1 CDT}
|
||||
{2866431600 -21600 0 CST}
|
||||
{2879740800 -18000 1 CDT}
|
||||
{2897881200 -21600 0 CST}
|
||||
{2911190400 -18000 1 CDT}
|
||||
{2929330800 -21600 0 CST}
|
||||
{2942640000 -18000 1 CDT}
|
||||
{2960780400 -21600 0 CST}
|
||||
{2974694400 -18000 1 CDT}
|
||||
{2992230000 -21600 0 CST}
|
||||
{3006144000 -18000 1 CDT}
|
||||
{3023679600 -21600 0 CST}
|
||||
{3037593600 -18000 1 CDT}
|
||||
{3055734000 -21600 0 CST}
|
||||
{3069043200 -18000 1 CDT}
|
||||
{3087183600 -21600 0 CST}
|
||||
{3100492800 -18000 1 CDT}
|
||||
{3118633200 -21600 0 CST}
|
||||
{3132547200 -18000 1 CDT}
|
||||
{3150082800 -21600 0 CST}
|
||||
{3163996800 -18000 1 CDT}
|
||||
{3181532400 -21600 0 CST}
|
||||
{3195446400 -18000 1 CDT}
|
||||
{3212982000 -21600 0 CST}
|
||||
{3226896000 -18000 1 CDT}
|
||||
{3245036400 -21600 0 CST}
|
||||
{3258345600 -18000 1 CDT}
|
||||
{3276486000 -21600 0 CST}
|
||||
{3289795200 -18000 1 CDT}
|
||||
{3307935600 -21600 0 CST}
|
||||
{3321849600 -18000 1 CDT}
|
||||
{3339385200 -21600 0 CST}
|
||||
{3353299200 -18000 1 CDT}
|
||||
{3370834800 -21600 0 CST}
|
||||
{3384748800 -18000 1 CDT}
|
||||
{3402889200 -21600 0 CST}
|
||||
{3416198400 -18000 1 CDT}
|
||||
{3434338800 -21600 0 CST}
|
||||
{3447648000 -18000 1 CDT}
|
||||
{3465788400 -21600 0 CST}
|
||||
{3479702400 -18000 1 CDT}
|
||||
{3497238000 -21600 0 CST}
|
||||
{3511152000 -18000 1 CDT}
|
||||
{3528687600 -21600 0 CST}
|
||||
{3542601600 -18000 1 CDT}
|
||||
{3560137200 -21600 0 CST}
|
||||
{3574051200 -18000 1 CDT}
|
||||
{3592191600 -21600 0 CST}
|
||||
{3605500800 -18000 1 CDT}
|
||||
{3623641200 -21600 0 CST}
|
||||
{3636950400 -18000 1 CDT}
|
||||
{3655090800 -21600 0 CST}
|
||||
{3669004800 -18000 1 CDT}
|
||||
{3686540400 -21600 0 CST}
|
||||
{3700454400 -18000 1 CDT}
|
||||
{3717990000 -21600 0 CST}
|
||||
{3731904000 -18000 1 CDT}
|
||||
{3750044400 -21600 0 CST}
|
||||
{3763353600 -18000 1 CDT}
|
||||
{3781494000 -21600 0 CST}
|
||||
{3794803200 -18000 1 CDT}
|
||||
{3812943600 -21600 0 CST}
|
||||
{3826252800 -18000 1 CDT}
|
||||
{3844393200 -21600 0 CST}
|
||||
{3858307200 -18000 1 CDT}
|
||||
{3875842800 -21600 0 CST}
|
||||
{3889756800 -18000 1 CDT}
|
||||
{3907292400 -21600 0 CST}
|
||||
{3921206400 -18000 1 CDT}
|
||||
{3939346800 -21600 0 CST}
|
||||
{3952656000 -18000 1 CDT}
|
||||
{3970796400 -21600 0 CST}
|
||||
{3984105600 -18000 1 CDT}
|
||||
{4002246000 -21600 0 CST}
|
||||
{4016160000 -18000 1 CDT}
|
||||
{4033695600 -21600 0 CST}
|
||||
{4047609600 -18000 1 CDT}
|
||||
{4065145200 -21600 0 CST}
|
||||
{4079059200 -18000 1 CDT}
|
||||
{4096594800 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -71,158 +71,4 @@ set TZData(:America/Mexico_City) {
|
||||
{1635663600 -21600 0 CST}
|
||||
{1648972800 -18000 1 CDT}
|
||||
{1667113200 -21600 0 CST}
|
||||
{1680422400 -18000 1 CDT}
|
||||
{1698562800 -21600 0 CST}
|
||||
{1712476800 -18000 1 CDT}
|
||||
{1730012400 -21600 0 CST}
|
||||
{1743926400 -18000 1 CDT}
|
||||
{1761462000 -21600 0 CST}
|
||||
{1775376000 -18000 1 CDT}
|
||||
{1792911600 -21600 0 CST}
|
||||
{1806825600 -18000 1 CDT}
|
||||
{1824966000 -21600 0 CST}
|
||||
{1838275200 -18000 1 CDT}
|
||||
{1856415600 -21600 0 CST}
|
||||
{1869724800 -18000 1 CDT}
|
||||
{1887865200 -21600 0 CST}
|
||||
{1901779200 -18000 1 CDT}
|
||||
{1919314800 -21600 0 CST}
|
||||
{1933228800 -18000 1 CDT}
|
||||
{1950764400 -21600 0 CST}
|
||||
{1964678400 -18000 1 CDT}
|
||||
{1982818800 -21600 0 CST}
|
||||
{1996128000 -18000 1 CDT}
|
||||
{2014268400 -21600 0 CST}
|
||||
{2027577600 -18000 1 CDT}
|
||||
{2045718000 -21600 0 CST}
|
||||
{2059027200 -18000 1 CDT}
|
||||
{2077167600 -21600 0 CST}
|
||||
{2091081600 -18000 1 CDT}
|
||||
{2108617200 -21600 0 CST}
|
||||
{2122531200 -18000 1 CDT}
|
||||
{2140066800 -21600 0 CST}
|
||||
{2153980800 -18000 1 CDT}
|
||||
{2172121200 -21600 0 CST}
|
||||
{2185430400 -18000 1 CDT}
|
||||
{2203570800 -21600 0 CST}
|
||||
{2216880000 -18000 1 CDT}
|
||||
{2235020400 -21600 0 CST}
|
||||
{2248934400 -18000 1 CDT}
|
||||
{2266470000 -21600 0 CST}
|
||||
{2280384000 -18000 1 CDT}
|
||||
{2297919600 -21600 0 CST}
|
||||
{2311833600 -18000 1 CDT}
|
||||
{2329369200 -21600 0 CST}
|
||||
{2343283200 -18000 1 CDT}
|
||||
{2361423600 -21600 0 CST}
|
||||
{2374732800 -18000 1 CDT}
|
||||
{2392873200 -21600 0 CST}
|
||||
{2406182400 -18000 1 CDT}
|
||||
{2424322800 -21600 0 CST}
|
||||
{2438236800 -18000 1 CDT}
|
||||
{2455772400 -21600 0 CST}
|
||||
{2469686400 -18000 1 CDT}
|
||||
{2487222000 -21600 0 CST}
|
||||
{2501136000 -18000 1 CDT}
|
||||
{2519276400 -21600 0 CST}
|
||||
{2532585600 -18000 1 CDT}
|
||||
{2550726000 -21600 0 CST}
|
||||
{2564035200 -18000 1 CDT}
|
||||
{2582175600 -21600 0 CST}
|
||||
{2596089600 -18000 1 CDT}
|
||||
{2613625200 -21600 0 CST}
|
||||
{2627539200 -18000 1 CDT}
|
||||
{2645074800 -21600 0 CST}
|
||||
{2658988800 -18000 1 CDT}
|
||||
{2676524400 -21600 0 CST}
|
||||
{2690438400 -18000 1 CDT}
|
||||
{2708578800 -21600 0 CST}
|
||||
{2721888000 -18000 1 CDT}
|
||||
{2740028400 -21600 0 CST}
|
||||
{2753337600 -18000 1 CDT}
|
||||
{2771478000 -21600 0 CST}
|
||||
{2785392000 -18000 1 CDT}
|
||||
{2802927600 -21600 0 CST}
|
||||
{2816841600 -18000 1 CDT}
|
||||
{2834377200 -21600 0 CST}
|
||||
{2848291200 -18000 1 CDT}
|
||||
{2866431600 -21600 0 CST}
|
||||
{2879740800 -18000 1 CDT}
|
||||
{2897881200 -21600 0 CST}
|
||||
{2911190400 -18000 1 CDT}
|
||||
{2929330800 -21600 0 CST}
|
||||
{2942640000 -18000 1 CDT}
|
||||
{2960780400 -21600 0 CST}
|
||||
{2974694400 -18000 1 CDT}
|
||||
{2992230000 -21600 0 CST}
|
||||
{3006144000 -18000 1 CDT}
|
||||
{3023679600 -21600 0 CST}
|
||||
{3037593600 -18000 1 CDT}
|
||||
{3055734000 -21600 0 CST}
|
||||
{3069043200 -18000 1 CDT}
|
||||
{3087183600 -21600 0 CST}
|
||||
{3100492800 -18000 1 CDT}
|
||||
{3118633200 -21600 0 CST}
|
||||
{3132547200 -18000 1 CDT}
|
||||
{3150082800 -21600 0 CST}
|
||||
{3163996800 -18000 1 CDT}
|
||||
{3181532400 -21600 0 CST}
|
||||
{3195446400 -18000 1 CDT}
|
||||
{3212982000 -21600 0 CST}
|
||||
{3226896000 -18000 1 CDT}
|
||||
{3245036400 -21600 0 CST}
|
||||
{3258345600 -18000 1 CDT}
|
||||
{3276486000 -21600 0 CST}
|
||||
{3289795200 -18000 1 CDT}
|
||||
{3307935600 -21600 0 CST}
|
||||
{3321849600 -18000 1 CDT}
|
||||
{3339385200 -21600 0 CST}
|
||||
{3353299200 -18000 1 CDT}
|
||||
{3370834800 -21600 0 CST}
|
||||
{3384748800 -18000 1 CDT}
|
||||
{3402889200 -21600 0 CST}
|
||||
{3416198400 -18000 1 CDT}
|
||||
{3434338800 -21600 0 CST}
|
||||
{3447648000 -18000 1 CDT}
|
||||
{3465788400 -21600 0 CST}
|
||||
{3479702400 -18000 1 CDT}
|
||||
{3497238000 -21600 0 CST}
|
||||
{3511152000 -18000 1 CDT}
|
||||
{3528687600 -21600 0 CST}
|
||||
{3542601600 -18000 1 CDT}
|
||||
{3560137200 -21600 0 CST}
|
||||
{3574051200 -18000 1 CDT}
|
||||
{3592191600 -21600 0 CST}
|
||||
{3605500800 -18000 1 CDT}
|
||||
{3623641200 -21600 0 CST}
|
||||
{3636950400 -18000 1 CDT}
|
||||
{3655090800 -21600 0 CST}
|
||||
{3669004800 -18000 1 CDT}
|
||||
{3686540400 -21600 0 CST}
|
||||
{3700454400 -18000 1 CDT}
|
||||
{3717990000 -21600 0 CST}
|
||||
{3731904000 -18000 1 CDT}
|
||||
{3750044400 -21600 0 CST}
|
||||
{3763353600 -18000 1 CDT}
|
||||
{3781494000 -21600 0 CST}
|
||||
{3794803200 -18000 1 CDT}
|
||||
{3812943600 -21600 0 CST}
|
||||
{3826252800 -18000 1 CDT}
|
||||
{3844393200 -21600 0 CST}
|
||||
{3858307200 -18000 1 CDT}
|
||||
{3875842800 -21600 0 CST}
|
||||
{3889756800 -18000 1 CDT}
|
||||
{3907292400 -21600 0 CST}
|
||||
{3921206400 -18000 1 CDT}
|
||||
{3939346800 -21600 0 CST}
|
||||
{3952656000 -18000 1 CDT}
|
||||
{3970796400 -21600 0 CST}
|
||||
{3984105600 -18000 1 CDT}
|
||||
{4002246000 -21600 0 CST}
|
||||
{4016160000 -18000 1 CDT}
|
||||
{4033695600 -21600 0 CST}
|
||||
{4047609600 -18000 1 CDT}
|
||||
{4065145200 -21600 0 CST}
|
||||
{4079059200 -18000 1 CDT}
|
||||
{4096594800 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -61,158 +61,4 @@ set TZData(:America/Monterrey) {
|
||||
{1635663600 -21600 0 CST}
|
||||
{1648972800 -18000 1 CDT}
|
||||
{1667113200 -21600 0 CST}
|
||||
{1680422400 -18000 1 CDT}
|
||||
{1698562800 -21600 0 CST}
|
||||
{1712476800 -18000 1 CDT}
|
||||
{1730012400 -21600 0 CST}
|
||||
{1743926400 -18000 1 CDT}
|
||||
{1761462000 -21600 0 CST}
|
||||
{1775376000 -18000 1 CDT}
|
||||
{1792911600 -21600 0 CST}
|
||||
{1806825600 -18000 1 CDT}
|
||||
{1824966000 -21600 0 CST}
|
||||
{1838275200 -18000 1 CDT}
|
||||
{1856415600 -21600 0 CST}
|
||||
{1869724800 -18000 1 CDT}
|
||||
{1887865200 -21600 0 CST}
|
||||
{1901779200 -18000 1 CDT}
|
||||
{1919314800 -21600 0 CST}
|
||||
{1933228800 -18000 1 CDT}
|
||||
{1950764400 -21600 0 CST}
|
||||
{1964678400 -18000 1 CDT}
|
||||
{1982818800 -21600 0 CST}
|
||||
{1996128000 -18000 1 CDT}
|
||||
{2014268400 -21600 0 CST}
|
||||
{2027577600 -18000 1 CDT}
|
||||
{2045718000 -21600 0 CST}
|
||||
{2059027200 -18000 1 CDT}
|
||||
{2077167600 -21600 0 CST}
|
||||
{2091081600 -18000 1 CDT}
|
||||
{2108617200 -21600 0 CST}
|
||||
{2122531200 -18000 1 CDT}
|
||||
{2140066800 -21600 0 CST}
|
||||
{2153980800 -18000 1 CDT}
|
||||
{2172121200 -21600 0 CST}
|
||||
{2185430400 -18000 1 CDT}
|
||||
{2203570800 -21600 0 CST}
|
||||
{2216880000 -18000 1 CDT}
|
||||
{2235020400 -21600 0 CST}
|
||||
{2248934400 -18000 1 CDT}
|
||||
{2266470000 -21600 0 CST}
|
||||
{2280384000 -18000 1 CDT}
|
||||
{2297919600 -21600 0 CST}
|
||||
{2311833600 -18000 1 CDT}
|
||||
{2329369200 -21600 0 CST}
|
||||
{2343283200 -18000 1 CDT}
|
||||
{2361423600 -21600 0 CST}
|
||||
{2374732800 -18000 1 CDT}
|
||||
{2392873200 -21600 0 CST}
|
||||
{2406182400 -18000 1 CDT}
|
||||
{2424322800 -21600 0 CST}
|
||||
{2438236800 -18000 1 CDT}
|
||||
{2455772400 -21600 0 CST}
|
||||
{2469686400 -18000 1 CDT}
|
||||
{2487222000 -21600 0 CST}
|
||||
{2501136000 -18000 1 CDT}
|
||||
{2519276400 -21600 0 CST}
|
||||
{2532585600 -18000 1 CDT}
|
||||
{2550726000 -21600 0 CST}
|
||||
{2564035200 -18000 1 CDT}
|
||||
{2582175600 -21600 0 CST}
|
||||
{2596089600 -18000 1 CDT}
|
||||
{2613625200 -21600 0 CST}
|
||||
{2627539200 -18000 1 CDT}
|
||||
{2645074800 -21600 0 CST}
|
||||
{2658988800 -18000 1 CDT}
|
||||
{2676524400 -21600 0 CST}
|
||||
{2690438400 -18000 1 CDT}
|
||||
{2708578800 -21600 0 CST}
|
||||
{2721888000 -18000 1 CDT}
|
||||
{2740028400 -21600 0 CST}
|
||||
{2753337600 -18000 1 CDT}
|
||||
{2771478000 -21600 0 CST}
|
||||
{2785392000 -18000 1 CDT}
|
||||
{2802927600 -21600 0 CST}
|
||||
{2816841600 -18000 1 CDT}
|
||||
{2834377200 -21600 0 CST}
|
||||
{2848291200 -18000 1 CDT}
|
||||
{2866431600 -21600 0 CST}
|
||||
{2879740800 -18000 1 CDT}
|
||||
{2897881200 -21600 0 CST}
|
||||
{2911190400 -18000 1 CDT}
|
||||
{2929330800 -21600 0 CST}
|
||||
{2942640000 -18000 1 CDT}
|
||||
{2960780400 -21600 0 CST}
|
||||
{2974694400 -18000 1 CDT}
|
||||
{2992230000 -21600 0 CST}
|
||||
{3006144000 -18000 1 CDT}
|
||||
{3023679600 -21600 0 CST}
|
||||
{3037593600 -18000 1 CDT}
|
||||
{3055734000 -21600 0 CST}
|
||||
{3069043200 -18000 1 CDT}
|
||||
{3087183600 -21600 0 CST}
|
||||
{3100492800 -18000 1 CDT}
|
||||
{3118633200 -21600 0 CST}
|
||||
{3132547200 -18000 1 CDT}
|
||||
{3150082800 -21600 0 CST}
|
||||
{3163996800 -18000 1 CDT}
|
||||
{3181532400 -21600 0 CST}
|
||||
{3195446400 -18000 1 CDT}
|
||||
{3212982000 -21600 0 CST}
|
||||
{3226896000 -18000 1 CDT}
|
||||
{3245036400 -21600 0 CST}
|
||||
{3258345600 -18000 1 CDT}
|
||||
{3276486000 -21600 0 CST}
|
||||
{3289795200 -18000 1 CDT}
|
||||
{3307935600 -21600 0 CST}
|
||||
{3321849600 -18000 1 CDT}
|
||||
{3339385200 -21600 0 CST}
|
||||
{3353299200 -18000 1 CDT}
|
||||
{3370834800 -21600 0 CST}
|
||||
{3384748800 -18000 1 CDT}
|
||||
{3402889200 -21600 0 CST}
|
||||
{3416198400 -18000 1 CDT}
|
||||
{3434338800 -21600 0 CST}
|
||||
{3447648000 -18000 1 CDT}
|
||||
{3465788400 -21600 0 CST}
|
||||
{3479702400 -18000 1 CDT}
|
||||
{3497238000 -21600 0 CST}
|
||||
{3511152000 -18000 1 CDT}
|
||||
{3528687600 -21600 0 CST}
|
||||
{3542601600 -18000 1 CDT}
|
||||
{3560137200 -21600 0 CST}
|
||||
{3574051200 -18000 1 CDT}
|
||||
{3592191600 -21600 0 CST}
|
||||
{3605500800 -18000 1 CDT}
|
||||
{3623641200 -21600 0 CST}
|
||||
{3636950400 -18000 1 CDT}
|
||||
{3655090800 -21600 0 CST}
|
||||
{3669004800 -18000 1 CDT}
|
||||
{3686540400 -21600 0 CST}
|
||||
{3700454400 -18000 1 CDT}
|
||||
{3717990000 -21600 0 CST}
|
||||
{3731904000 -18000 1 CDT}
|
||||
{3750044400 -21600 0 CST}
|
||||
{3763353600 -18000 1 CDT}
|
||||
{3781494000 -21600 0 CST}
|
||||
{3794803200 -18000 1 CDT}
|
||||
{3812943600 -21600 0 CST}
|
||||
{3826252800 -18000 1 CDT}
|
||||
{3844393200 -21600 0 CST}
|
||||
{3858307200 -18000 1 CDT}
|
||||
{3875842800 -21600 0 CST}
|
||||
{3889756800 -18000 1 CDT}
|
||||
{3907292400 -21600 0 CST}
|
||||
{3921206400 -18000 1 CDT}
|
||||
{3939346800 -21600 0 CST}
|
||||
{3952656000 -18000 1 CDT}
|
||||
{3970796400 -21600 0 CST}
|
||||
{3984105600 -18000 1 CDT}
|
||||
{4002246000 -21600 0 CST}
|
||||
{4016160000 -18000 1 CDT}
|
||||
{4033695600 -21600 0 CST}
|
||||
{4047609600 -18000 1 CDT}
|
||||
{4065145200 -21600 0 CST}
|
||||
{4079059200 -18000 1 CDT}
|
||||
{4096594800 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -1,264 +1,5 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Nipigon) {
|
||||
{-9223372036854775808 -21184 0 LMT}
|
||||
{-2366734016 -18000 0 EST}
|
||||
{-1632070800 -14400 1 EDT}
|
||||
{-1615140000 -18000 0 EST}
|
||||
{-923252400 -14400 1 EDT}
|
||||
{-880218000 -14400 0 EWT}
|
||||
{-769395600 -14400 1 EPT}
|
||||
{-765396000 -18000 0 EST}
|
||||
{136364400 -14400 1 EDT}
|
||||
{152085600 -18000 0 EST}
|
||||
{167814000 -14400 1 EDT}
|
||||
{183535200 -18000 0 EST}
|
||||
{199263600 -14400 1 EDT}
|
||||
{215589600 -18000 0 EST}
|
||||
{230713200 -14400 1 EDT}
|
||||
{247039200 -18000 0 EST}
|
||||
{262767600 -14400 1 EDT}
|
||||
{278488800 -18000 0 EST}
|
||||
{294217200 -14400 1 EDT}
|
||||
{309938400 -18000 0 EST}
|
||||
{325666800 -14400 1 EDT}
|
||||
{341388000 -18000 0 EST}
|
||||
{357116400 -14400 1 EDT}
|
||||
{372837600 -18000 0 EST}
|
||||
{388566000 -14400 1 EDT}
|
||||
{404892000 -18000 0 EST}
|
||||
{420015600 -14400 1 EDT}
|
||||
{436341600 -18000 0 EST}
|
||||
{452070000 -14400 1 EDT}
|
||||
{467791200 -18000 0 EST}
|
||||
{483519600 -14400 1 EDT}
|
||||
{499240800 -18000 0 EST}
|
||||
{514969200 -14400 1 EDT}
|
||||
{530690400 -18000 0 EST}
|
||||
{544604400 -14400 1 EDT}
|
||||
{562140000 -18000 0 EST}
|
||||
{576054000 -14400 1 EDT}
|
||||
{594194400 -18000 0 EST}
|
||||
{607503600 -14400 1 EDT}
|
||||
{625644000 -18000 0 EST}
|
||||
{638953200 -14400 1 EDT}
|
||||
{657093600 -18000 0 EST}
|
||||
{671007600 -14400 1 EDT}
|
||||
{688543200 -18000 0 EST}
|
||||
{702457200 -14400 1 EDT}
|
||||
{719992800 -18000 0 EST}
|
||||
{733906800 -14400 1 EDT}
|
||||
{752047200 -18000 0 EST}
|
||||
{765356400 -14400 1 EDT}
|
||||
{783496800 -18000 0 EST}
|
||||
{796806000 -14400 1 EDT}
|
||||
{814946400 -18000 0 EST}
|
||||
{828860400 -14400 1 EDT}
|
||||
{846396000 -18000 0 EST}
|
||||
{860310000 -14400 1 EDT}
|
||||
{877845600 -18000 0 EST}
|
||||
{891759600 -14400 1 EDT}
|
||||
{909295200 -18000 0 EST}
|
||||
{923209200 -14400 1 EDT}
|
||||
{941349600 -18000 0 EST}
|
||||
{954658800 -14400 1 EDT}
|
||||
{972799200 -18000 0 EST}
|
||||
{986108400 -14400 1 EDT}
|
||||
{1004248800 -18000 0 EST}
|
||||
{1018162800 -14400 1 EDT}
|
||||
{1035698400 -18000 0 EST}
|
||||
{1049612400 -14400 1 EDT}
|
||||
{1067148000 -18000 0 EST}
|
||||
{1081062000 -14400 1 EDT}
|
||||
{1099202400 -18000 0 EST}
|
||||
{1112511600 -14400 1 EDT}
|
||||
{1130652000 -18000 0 EST}
|
||||
{1143961200 -14400 1 EDT}
|
||||
{1162101600 -18000 0 EST}
|
||||
{1173596400 -14400 1 EDT}
|
||||
{1194156000 -18000 0 EST}
|
||||
{1205046000 -14400 1 EDT}
|
||||
{1225605600 -18000 0 EST}
|
||||
{1236495600 -14400 1 EDT}
|
||||
{1257055200 -18000 0 EST}
|
||||
{1268550000 -14400 1 EDT}
|
||||
{1289109600 -18000 0 EST}
|
||||
{1299999600 -14400 1 EDT}
|
||||
{1320559200 -18000 0 EST}
|
||||
{1331449200 -14400 1 EDT}
|
||||
{1352008800 -18000 0 EST}
|
||||
{1362898800 -14400 1 EDT}
|
||||
{1383458400 -18000 0 EST}
|
||||
{1394348400 -14400 1 EDT}
|
||||
{1414908000 -18000 0 EST}
|
||||
{1425798000 -14400 1 EDT}
|
||||
{1446357600 -18000 0 EST}
|
||||
{1457852400 -14400 1 EDT}
|
||||
{1478412000 -18000 0 EST}
|
||||
{1489302000 -14400 1 EDT}
|
||||
{1509861600 -18000 0 EST}
|
||||
{1520751600 -14400 1 EDT}
|
||||
{1541311200 -18000 0 EST}
|
||||
{1552201200 -14400 1 EDT}
|
||||
{1572760800 -18000 0 EST}
|
||||
{1583650800 -14400 1 EDT}
|
||||
{1604210400 -18000 0 EST}
|
||||
{1615705200 -14400 1 EDT}
|
||||
{1636264800 -18000 0 EST}
|
||||
{1647154800 -14400 1 EDT}
|
||||
{1667714400 -18000 0 EST}
|
||||
{1678604400 -14400 1 EDT}
|
||||
{1699164000 -18000 0 EST}
|
||||
{1710054000 -14400 1 EDT}
|
||||
{1730613600 -18000 0 EST}
|
||||
{1741503600 -14400 1 EDT}
|
||||
{1762063200 -18000 0 EST}
|
||||
{1772953200 -14400 1 EDT}
|
||||
{1793512800 -18000 0 EST}
|
||||
{1805007600 -14400 1 EDT}
|
||||
{1825567200 -18000 0 EST}
|
||||
{1836457200 -14400 1 EDT}
|
||||
{1857016800 -18000 0 EST}
|
||||
{1867906800 -14400 1 EDT}
|
||||
{1888466400 -18000 0 EST}
|
||||
{1899356400 -14400 1 EDT}
|
||||
{1919916000 -18000 0 EST}
|
||||
{1930806000 -14400 1 EDT}
|
||||
{1951365600 -18000 0 EST}
|
||||
{1962860400 -14400 1 EDT}
|
||||
{1983420000 -18000 0 EST}
|
||||
{1994310000 -14400 1 EDT}
|
||||
{2014869600 -18000 0 EST}
|
||||
{2025759600 -14400 1 EDT}
|
||||
{2046319200 -18000 0 EST}
|
||||
{2057209200 -14400 1 EDT}
|
||||
{2077768800 -18000 0 EST}
|
||||
{2088658800 -14400 1 EDT}
|
||||
{2109218400 -18000 0 EST}
|
||||
{2120108400 -14400 1 EDT}
|
||||
{2140668000 -18000 0 EST}
|
||||
{2152162800 -14400 1 EDT}
|
||||
{2172722400 -18000 0 EST}
|
||||
{2183612400 -14400 1 EDT}
|
||||
{2204172000 -18000 0 EST}
|
||||
{2215062000 -14400 1 EDT}
|
||||
{2235621600 -18000 0 EST}
|
||||
{2246511600 -14400 1 EDT}
|
||||
{2267071200 -18000 0 EST}
|
||||
{2277961200 -14400 1 EDT}
|
||||
{2298520800 -18000 0 EST}
|
||||
{2309410800 -14400 1 EDT}
|
||||
{2329970400 -18000 0 EST}
|
||||
{2341465200 -14400 1 EDT}
|
||||
{2362024800 -18000 0 EST}
|
||||
{2372914800 -14400 1 EDT}
|
||||
{2393474400 -18000 0 EST}
|
||||
{2404364400 -14400 1 EDT}
|
||||
{2424924000 -18000 0 EST}
|
||||
{2435814000 -14400 1 EDT}
|
||||
{2456373600 -18000 0 EST}
|
||||
{2467263600 -14400 1 EDT}
|
||||
{2487823200 -18000 0 EST}
|
||||
{2499318000 -14400 1 EDT}
|
||||
{2519877600 -18000 0 EST}
|
||||
{2530767600 -14400 1 EDT}
|
||||
{2551327200 -18000 0 EST}
|
||||
{2562217200 -14400 1 EDT}
|
||||
{2582776800 -18000 0 EST}
|
||||
{2593666800 -14400 1 EDT}
|
||||
{2614226400 -18000 0 EST}
|
||||
{2625116400 -14400 1 EDT}
|
||||
{2645676000 -18000 0 EST}
|
||||
{2656566000 -14400 1 EDT}
|
||||
{2677125600 -18000 0 EST}
|
||||
{2688620400 -14400 1 EDT}
|
||||
{2709180000 -18000 0 EST}
|
||||
{2720070000 -14400 1 EDT}
|
||||
{2740629600 -18000 0 EST}
|
||||
{2751519600 -14400 1 EDT}
|
||||
{2772079200 -18000 0 EST}
|
||||
{2782969200 -14400 1 EDT}
|
||||
{2803528800 -18000 0 EST}
|
||||
{2814418800 -14400 1 EDT}
|
||||
{2834978400 -18000 0 EST}
|
||||
{2846473200 -14400 1 EDT}
|
||||
{2867032800 -18000 0 EST}
|
||||
{2877922800 -14400 1 EDT}
|
||||
{2898482400 -18000 0 EST}
|
||||
{2909372400 -14400 1 EDT}
|
||||
{2929932000 -18000 0 EST}
|
||||
{2940822000 -14400 1 EDT}
|
||||
{2961381600 -18000 0 EST}
|
||||
{2972271600 -14400 1 EDT}
|
||||
{2992831200 -18000 0 EST}
|
||||
{3003721200 -14400 1 EDT}
|
||||
{3024280800 -18000 0 EST}
|
||||
{3035775600 -14400 1 EDT}
|
||||
{3056335200 -18000 0 EST}
|
||||
{3067225200 -14400 1 EDT}
|
||||
{3087784800 -18000 0 EST}
|
||||
{3098674800 -14400 1 EDT}
|
||||
{3119234400 -18000 0 EST}
|
||||
{3130124400 -14400 1 EDT}
|
||||
{3150684000 -18000 0 EST}
|
||||
{3161574000 -14400 1 EDT}
|
||||
{3182133600 -18000 0 EST}
|
||||
{3193023600 -14400 1 EDT}
|
||||
{3213583200 -18000 0 EST}
|
||||
{3225078000 -14400 1 EDT}
|
||||
{3245637600 -18000 0 EST}
|
||||
{3256527600 -14400 1 EDT}
|
||||
{3277087200 -18000 0 EST}
|
||||
{3287977200 -14400 1 EDT}
|
||||
{3308536800 -18000 0 EST}
|
||||
{3319426800 -14400 1 EDT}
|
||||
{3339986400 -18000 0 EST}
|
||||
{3350876400 -14400 1 EDT}
|
||||
{3371436000 -18000 0 EST}
|
||||
{3382930800 -14400 1 EDT}
|
||||
{3403490400 -18000 0 EST}
|
||||
{3414380400 -14400 1 EDT}
|
||||
{3434940000 -18000 0 EST}
|
||||
{3445830000 -14400 1 EDT}
|
||||
{3466389600 -18000 0 EST}
|
||||
{3477279600 -14400 1 EDT}
|
||||
{3497839200 -18000 0 EST}
|
||||
{3508729200 -14400 1 EDT}
|
||||
{3529288800 -18000 0 EST}
|
||||
{3540178800 -14400 1 EDT}
|
||||
{3560738400 -18000 0 EST}
|
||||
{3572233200 -14400 1 EDT}
|
||||
{3592792800 -18000 0 EST}
|
||||
{3603682800 -14400 1 EDT}
|
||||
{3624242400 -18000 0 EST}
|
||||
{3635132400 -14400 1 EDT}
|
||||
{3655692000 -18000 0 EST}
|
||||
{3666582000 -14400 1 EDT}
|
||||
{3687141600 -18000 0 EST}
|
||||
{3698031600 -14400 1 EDT}
|
||||
{3718591200 -18000 0 EST}
|
||||
{3730086000 -14400 1 EDT}
|
||||
{3750645600 -18000 0 EST}
|
||||
{3761535600 -14400 1 EDT}
|
||||
{3782095200 -18000 0 EST}
|
||||
{3792985200 -14400 1 EDT}
|
||||
{3813544800 -18000 0 EST}
|
||||
{3824434800 -14400 1 EDT}
|
||||
{3844994400 -18000 0 EST}
|
||||
{3855884400 -14400 1 EDT}
|
||||
{3876444000 -18000 0 EST}
|
||||
{3887334000 -14400 1 EDT}
|
||||
{3907893600 -18000 0 EST}
|
||||
{3919388400 -14400 1 EDT}
|
||||
{3939948000 -18000 0 EST}
|
||||
{3950838000 -14400 1 EDT}
|
||||
{3971397600 -18000 0 EST}
|
||||
{3982287600 -14400 1 EDT}
|
||||
{4002847200 -18000 0 EST}
|
||||
{4013737200 -14400 1 EDT}
|
||||
{4034296800 -18000 0 EST}
|
||||
{4045186800 -14400 1 EDT}
|
||||
{4065746400 -18000 0 EST}
|
||||
{4076636400 -14400 1 EDT}
|
||||
{4097196000 -18000 0 EST}
|
||||
if {![info exists TZData(America/Toronto)]} {
|
||||
LoadTimeZoneFile America/Toronto
|
||||
}
|
||||
set TZData(:America/Nipigon) $TZData(:America/Toronto)
|
||||
|
||||
+1
-154
@@ -89,158 +89,5 @@ set TZData(:America/Nuuk) {
|
||||
{1635642000 -10800 0 -03}
|
||||
{1648342800 -7200 1 -02}
|
||||
{1667091600 -10800 0 -03}
|
||||
{1679792400 -7200 1 -02}
|
||||
{1698541200 -10800 0 -03}
|
||||
{1711846800 -7200 1 -02}
|
||||
{1729990800 -10800 0 -03}
|
||||
{1743296400 -7200 1 -02}
|
||||
{1761440400 -10800 0 -03}
|
||||
{1774746000 -7200 1 -02}
|
||||
{1792890000 -10800 0 -03}
|
||||
{1806195600 -7200 1 -02}
|
||||
{1824944400 -10800 0 -03}
|
||||
{1837645200 -7200 1 -02}
|
||||
{1856394000 -10800 0 -03}
|
||||
{1869094800 -7200 1 -02}
|
||||
{1887843600 -10800 0 -03}
|
||||
{1901149200 -7200 1 -02}
|
||||
{1919293200 -10800 0 -03}
|
||||
{1932598800 -7200 1 -02}
|
||||
{1950742800 -10800 0 -03}
|
||||
{1964048400 -7200 1 -02}
|
||||
{1982797200 -10800 0 -03}
|
||||
{1995498000 -7200 1 -02}
|
||||
{2014246800 -10800 0 -03}
|
||||
{2026947600 -7200 1 -02}
|
||||
{2045696400 -10800 0 -03}
|
||||
{2058397200 -7200 1 -02}
|
||||
{2077146000 -10800 0 -03}
|
||||
{2090451600 -7200 1 -02}
|
||||
{2108595600 -10800 0 -03}
|
||||
{2121901200 -7200 1 -02}
|
||||
{2140045200 -10800 0 -03}
|
||||
{2153350800 -7200 1 -02}
|
||||
{2172099600 -10800 0 -03}
|
||||
{2184800400 -7200 1 -02}
|
||||
{2203549200 -10800 0 -03}
|
||||
{2216250000 -7200 1 -02}
|
||||
{2234998800 -10800 0 -03}
|
||||
{2248304400 -7200 1 -02}
|
||||
{2266448400 -10800 0 -03}
|
||||
{2279754000 -7200 1 -02}
|
||||
{2297898000 -10800 0 -03}
|
||||
{2311203600 -7200 1 -02}
|
||||
{2329347600 -10800 0 -03}
|
||||
{2342653200 -7200 1 -02}
|
||||
{2361402000 -10800 0 -03}
|
||||
{2374102800 -7200 1 -02}
|
||||
{2392851600 -10800 0 -03}
|
||||
{2405552400 -7200 1 -02}
|
||||
{2424301200 -10800 0 -03}
|
||||
{2437606800 -7200 1 -02}
|
||||
{2455750800 -10800 0 -03}
|
||||
{2469056400 -7200 1 -02}
|
||||
{2487200400 -10800 0 -03}
|
||||
{2500506000 -7200 1 -02}
|
||||
{2519254800 -10800 0 -03}
|
||||
{2531955600 -7200 1 -02}
|
||||
{2550704400 -10800 0 -03}
|
||||
{2563405200 -7200 1 -02}
|
||||
{2582154000 -10800 0 -03}
|
||||
{2595459600 -7200 1 -02}
|
||||
{2613603600 -10800 0 -03}
|
||||
{2626909200 -7200 1 -02}
|
||||
{2645053200 -10800 0 -03}
|
||||
{2658358800 -7200 1 -02}
|
||||
{2676502800 -10800 0 -03}
|
||||
{2689808400 -7200 1 -02}
|
||||
{2708557200 -10800 0 -03}
|
||||
{2721258000 -7200 1 -02}
|
||||
{2740006800 -10800 0 -03}
|
||||
{2752707600 -7200 1 -02}
|
||||
{2771456400 -10800 0 -03}
|
||||
{2784762000 -7200 1 -02}
|
||||
{2802906000 -10800 0 -03}
|
||||
{2816211600 -7200 1 -02}
|
||||
{2834355600 -10800 0 -03}
|
||||
{2847661200 -7200 1 -02}
|
||||
{2866410000 -10800 0 -03}
|
||||
{2879110800 -7200 1 -02}
|
||||
{2897859600 -10800 0 -03}
|
||||
{2910560400 -7200 1 -02}
|
||||
{2929309200 -10800 0 -03}
|
||||
{2942010000 -7200 1 -02}
|
||||
{2960758800 -10800 0 -03}
|
||||
{2974064400 -7200 1 -02}
|
||||
{2992208400 -10800 0 -03}
|
||||
{3005514000 -7200 1 -02}
|
||||
{3023658000 -10800 0 -03}
|
||||
{3036963600 -7200 1 -02}
|
||||
{3055712400 -10800 0 -03}
|
||||
{3068413200 -7200 1 -02}
|
||||
{3087162000 -10800 0 -03}
|
||||
{3099862800 -7200 1 -02}
|
||||
{3118611600 -10800 0 -03}
|
||||
{3131917200 -7200 1 -02}
|
||||
{3150061200 -10800 0 -03}
|
||||
{3163366800 -7200 1 -02}
|
||||
{3181510800 -10800 0 -03}
|
||||
{3194816400 -7200 1 -02}
|
||||
{3212960400 -10800 0 -03}
|
||||
{3226266000 -7200 1 -02}
|
||||
{3245014800 -10800 0 -03}
|
||||
{3257715600 -7200 1 -02}
|
||||
{3276464400 -10800 0 -03}
|
||||
{3289165200 -7200 1 -02}
|
||||
{3307914000 -10800 0 -03}
|
||||
{3321219600 -7200 1 -02}
|
||||
{3339363600 -10800 0 -03}
|
||||
{3352669200 -7200 1 -02}
|
||||
{3370813200 -10800 0 -03}
|
||||
{3384118800 -7200 1 -02}
|
||||
{3402867600 -10800 0 -03}
|
||||
{3415568400 -7200 1 -02}
|
||||
{3434317200 -10800 0 -03}
|
||||
{3447018000 -7200 1 -02}
|
||||
{3465766800 -10800 0 -03}
|
||||
{3479072400 -7200 1 -02}
|
||||
{3497216400 -10800 0 -03}
|
||||
{3510522000 -7200 1 -02}
|
||||
{3528666000 -10800 0 -03}
|
||||
{3541971600 -7200 1 -02}
|
||||
{3560115600 -10800 0 -03}
|
||||
{3573421200 -7200 1 -02}
|
||||
{3592170000 -10800 0 -03}
|
||||
{3604870800 -7200 1 -02}
|
||||
{3623619600 -10800 0 -03}
|
||||
{3636320400 -7200 1 -02}
|
||||
{3655069200 -10800 0 -03}
|
||||
{3668374800 -7200 1 -02}
|
||||
{3686518800 -10800 0 -03}
|
||||
{3699824400 -7200 1 -02}
|
||||
{3717968400 -10800 0 -03}
|
||||
{3731274000 -7200 1 -02}
|
||||
{3750022800 -10800 0 -03}
|
||||
{3762723600 -7200 1 -02}
|
||||
{3781472400 -10800 0 -03}
|
||||
{3794173200 -7200 1 -02}
|
||||
{3812922000 -10800 0 -03}
|
||||
{3825622800 -7200 1 -02}
|
||||
{3844371600 -10800 0 -03}
|
||||
{3857677200 -7200 1 -02}
|
||||
{3875821200 -10800 0 -03}
|
||||
{3889126800 -7200 1 -02}
|
||||
{3907270800 -10800 0 -03}
|
||||
{3920576400 -7200 1 -02}
|
||||
{3939325200 -10800 0 -03}
|
||||
{3952026000 -7200 1 -02}
|
||||
{3970774800 -10800 0 -03}
|
||||
{3983475600 -7200 1 -02}
|
||||
{4002224400 -10800 0 -03}
|
||||
{4015530000 -7200 1 -02}
|
||||
{4033674000 -10800 0 -03}
|
||||
{4046979600 -7200 1 -02}
|
||||
{4065123600 -10800 0 -03}
|
||||
{4078429200 -7200 1 -02}
|
||||
{4096573200 -10800 0 -03}
|
||||
{1679792400 -7200 0 -02}
|
||||
}
|
||||
|
||||
+156
-155
@@ -64,159 +64,160 @@ set TZData(:America/Ojinaga) {
|
||||
{1615712400 -21600 1 MDT}
|
||||
{1636272000 -25200 0 MST}
|
||||
{1647162000 -21600 1 MDT}
|
||||
{1667721600 -25200 0 MST}
|
||||
{1678611600 -21600 1 MDT}
|
||||
{1699171200 -25200 0 MST}
|
||||
{1710061200 -21600 1 MDT}
|
||||
{1730620800 -25200 0 MST}
|
||||
{1741510800 -21600 1 MDT}
|
||||
{1762070400 -25200 0 MST}
|
||||
{1772960400 -21600 1 MDT}
|
||||
{1793520000 -25200 0 MST}
|
||||
{1805014800 -21600 1 MDT}
|
||||
{1825574400 -25200 0 MST}
|
||||
{1836464400 -21600 1 MDT}
|
||||
{1857024000 -25200 0 MST}
|
||||
{1867914000 -21600 1 MDT}
|
||||
{1888473600 -25200 0 MST}
|
||||
{1899363600 -21600 1 MDT}
|
||||
{1919923200 -25200 0 MST}
|
||||
{1930813200 -21600 1 MDT}
|
||||
{1951372800 -25200 0 MST}
|
||||
{1962867600 -21600 1 MDT}
|
||||
{1983427200 -25200 0 MST}
|
||||
{1994317200 -21600 1 MDT}
|
||||
{2014876800 -25200 0 MST}
|
||||
{2025766800 -21600 1 MDT}
|
||||
{2046326400 -25200 0 MST}
|
||||
{2057216400 -21600 1 MDT}
|
||||
{2077776000 -25200 0 MST}
|
||||
{2088666000 -21600 1 MDT}
|
||||
{2109225600 -25200 0 MST}
|
||||
{2120115600 -21600 1 MDT}
|
||||
{2140675200 -25200 0 MST}
|
||||
{2152170000 -21600 1 MDT}
|
||||
{2172729600 -25200 0 MST}
|
||||
{2183619600 -21600 1 MDT}
|
||||
{2204179200 -25200 0 MST}
|
||||
{2215069200 -21600 1 MDT}
|
||||
{2235628800 -25200 0 MST}
|
||||
{2246518800 -21600 1 MDT}
|
||||
{2267078400 -25200 0 MST}
|
||||
{2277968400 -21600 1 MDT}
|
||||
{2298528000 -25200 0 MST}
|
||||
{2309418000 -21600 1 MDT}
|
||||
{2329977600 -25200 0 MST}
|
||||
{2341472400 -21600 1 MDT}
|
||||
{2362032000 -25200 0 MST}
|
||||
{2372922000 -21600 1 MDT}
|
||||
{2393481600 -25200 0 MST}
|
||||
{2404371600 -21600 1 MDT}
|
||||
{2424931200 -25200 0 MST}
|
||||
{2435821200 -21600 1 MDT}
|
||||
{2456380800 -25200 0 MST}
|
||||
{2467270800 -21600 1 MDT}
|
||||
{2487830400 -25200 0 MST}
|
||||
{2499325200 -21600 1 MDT}
|
||||
{2519884800 -25200 0 MST}
|
||||
{2530774800 -21600 1 MDT}
|
||||
{2551334400 -25200 0 MST}
|
||||
{2562224400 -21600 1 MDT}
|
||||
{2582784000 -25200 0 MST}
|
||||
{2593674000 -21600 1 MDT}
|
||||
{2614233600 -25200 0 MST}
|
||||
{2625123600 -21600 1 MDT}
|
||||
{2645683200 -25200 0 MST}
|
||||
{2656573200 -21600 1 MDT}
|
||||
{2677132800 -25200 0 MST}
|
||||
{2688627600 -21600 1 MDT}
|
||||
{2709187200 -25200 0 MST}
|
||||
{2720077200 -21600 1 MDT}
|
||||
{2740636800 -25200 0 MST}
|
||||
{2751526800 -21600 1 MDT}
|
||||
{2772086400 -25200 0 MST}
|
||||
{2782976400 -21600 1 MDT}
|
||||
{2803536000 -25200 0 MST}
|
||||
{2814426000 -21600 1 MDT}
|
||||
{2834985600 -25200 0 MST}
|
||||
{2846480400 -21600 1 MDT}
|
||||
{2867040000 -25200 0 MST}
|
||||
{2877930000 -21600 1 MDT}
|
||||
{2898489600 -25200 0 MST}
|
||||
{2909379600 -21600 1 MDT}
|
||||
{2929939200 -25200 0 MST}
|
||||
{2940829200 -21600 1 MDT}
|
||||
{2961388800 -25200 0 MST}
|
||||
{2972278800 -21600 1 MDT}
|
||||
{2992838400 -25200 0 MST}
|
||||
{3003728400 -21600 1 MDT}
|
||||
{3024288000 -25200 0 MST}
|
||||
{3035782800 -21600 1 MDT}
|
||||
{3056342400 -25200 0 MST}
|
||||
{3067232400 -21600 1 MDT}
|
||||
{3087792000 -25200 0 MST}
|
||||
{3098682000 -21600 1 MDT}
|
||||
{3119241600 -25200 0 MST}
|
||||
{3130131600 -21600 1 MDT}
|
||||
{3150691200 -25200 0 MST}
|
||||
{3161581200 -21600 1 MDT}
|
||||
{3182140800 -25200 0 MST}
|
||||
{3193030800 -21600 1 MDT}
|
||||
{3213590400 -25200 0 MST}
|
||||
{3225085200 -21600 1 MDT}
|
||||
{3245644800 -25200 0 MST}
|
||||
{3256534800 -21600 1 MDT}
|
||||
{3277094400 -25200 0 MST}
|
||||
{3287984400 -21600 1 MDT}
|
||||
{3308544000 -25200 0 MST}
|
||||
{3319434000 -21600 1 MDT}
|
||||
{3339993600 -25200 0 MST}
|
||||
{3350883600 -21600 1 MDT}
|
||||
{3371443200 -25200 0 MST}
|
||||
{3382938000 -21600 1 MDT}
|
||||
{3403497600 -25200 0 MST}
|
||||
{3414387600 -21600 1 MDT}
|
||||
{3434947200 -25200 0 MST}
|
||||
{3445837200 -21600 1 MDT}
|
||||
{3466396800 -25200 0 MST}
|
||||
{3477286800 -21600 1 MDT}
|
||||
{3497846400 -25200 0 MST}
|
||||
{3508736400 -21600 1 MDT}
|
||||
{3529296000 -25200 0 MST}
|
||||
{3540186000 -21600 1 MDT}
|
||||
{3560745600 -25200 0 MST}
|
||||
{3572240400 -21600 1 MDT}
|
||||
{3592800000 -25200 0 MST}
|
||||
{3603690000 -21600 1 MDT}
|
||||
{3624249600 -25200 0 MST}
|
||||
{3635139600 -21600 1 MDT}
|
||||
{3655699200 -25200 0 MST}
|
||||
{3666589200 -21600 1 MDT}
|
||||
{3687148800 -25200 0 MST}
|
||||
{3698038800 -21600 1 MDT}
|
||||
{3718598400 -25200 0 MST}
|
||||
{3730093200 -21600 1 MDT}
|
||||
{3750652800 -25200 0 MST}
|
||||
{3761542800 -21600 1 MDT}
|
||||
{3782102400 -25200 0 MST}
|
||||
{3792992400 -21600 1 MDT}
|
||||
{3813552000 -25200 0 MST}
|
||||
{3824442000 -21600 1 MDT}
|
||||
{3845001600 -25200 0 MST}
|
||||
{3855891600 -21600 1 MDT}
|
||||
{3876451200 -25200 0 MST}
|
||||
{3887341200 -21600 1 MDT}
|
||||
{3907900800 -25200 0 MST}
|
||||
{3919395600 -21600 1 MDT}
|
||||
{3939955200 -25200 0 MST}
|
||||
{3950845200 -21600 1 MDT}
|
||||
{3971404800 -25200 0 MST}
|
||||
{3982294800 -21600 1 MDT}
|
||||
{4002854400 -25200 0 MST}
|
||||
{4013744400 -21600 1 MDT}
|
||||
{4034304000 -25200 0 MST}
|
||||
{4045194000 -21600 1 MDT}
|
||||
{4065753600 -25200 0 MST}
|
||||
{4076643600 -21600 1 MDT}
|
||||
{4097203200 -25200 0 MST}
|
||||
{1667120400 -21600 0 CST}
|
||||
{1669788000 -21600 0 CST}
|
||||
{1678608000 -18000 1 CDT}
|
||||
{1699167600 -21600 0 CST}
|
||||
{1710057600 -18000 1 CDT}
|
||||
{1730617200 -21600 0 CST}
|
||||
{1741507200 -18000 1 CDT}
|
||||
{1762066800 -21600 0 CST}
|
||||
{1772956800 -18000 1 CDT}
|
||||
{1793516400 -21600 0 CST}
|
||||
{1805011200 -18000 1 CDT}
|
||||
{1825570800 -21600 0 CST}
|
||||
{1836460800 -18000 1 CDT}
|
||||
{1857020400 -21600 0 CST}
|
||||
{1867910400 -18000 1 CDT}
|
||||
{1888470000 -21600 0 CST}
|
||||
{1899360000 -18000 1 CDT}
|
||||
{1919919600 -21600 0 CST}
|
||||
{1930809600 -18000 1 CDT}
|
||||
{1951369200 -21600 0 CST}
|
||||
{1962864000 -18000 1 CDT}
|
||||
{1983423600 -21600 0 CST}
|
||||
{1994313600 -18000 1 CDT}
|
||||
{2014873200 -21600 0 CST}
|
||||
{2025763200 -18000 1 CDT}
|
||||
{2046322800 -21600 0 CST}
|
||||
{2057212800 -18000 1 CDT}
|
||||
{2077772400 -21600 0 CST}
|
||||
{2088662400 -18000 1 CDT}
|
||||
{2109222000 -21600 0 CST}
|
||||
{2120112000 -18000 1 CDT}
|
||||
{2140671600 -21600 0 CST}
|
||||
{2152166400 -18000 1 CDT}
|
||||
{2172726000 -21600 0 CST}
|
||||
{2183616000 -18000 1 CDT}
|
||||
{2204175600 -21600 0 CST}
|
||||
{2215065600 -18000 1 CDT}
|
||||
{2235625200 -21600 0 CST}
|
||||
{2246515200 -18000 1 CDT}
|
||||
{2267074800 -21600 0 CST}
|
||||
{2277964800 -18000 1 CDT}
|
||||
{2298524400 -21600 0 CST}
|
||||
{2309414400 -18000 1 CDT}
|
||||
{2329974000 -21600 0 CST}
|
||||
{2341468800 -18000 1 CDT}
|
||||
{2362028400 -21600 0 CST}
|
||||
{2372918400 -18000 1 CDT}
|
||||
{2393478000 -21600 0 CST}
|
||||
{2404368000 -18000 1 CDT}
|
||||
{2424927600 -21600 0 CST}
|
||||
{2435817600 -18000 1 CDT}
|
||||
{2456377200 -21600 0 CST}
|
||||
{2467267200 -18000 1 CDT}
|
||||
{2487826800 -21600 0 CST}
|
||||
{2499321600 -18000 1 CDT}
|
||||
{2519881200 -21600 0 CST}
|
||||
{2530771200 -18000 1 CDT}
|
||||
{2551330800 -21600 0 CST}
|
||||
{2562220800 -18000 1 CDT}
|
||||
{2582780400 -21600 0 CST}
|
||||
{2593670400 -18000 1 CDT}
|
||||
{2614230000 -21600 0 CST}
|
||||
{2625120000 -18000 1 CDT}
|
||||
{2645679600 -21600 0 CST}
|
||||
{2656569600 -18000 1 CDT}
|
||||
{2677129200 -21600 0 CST}
|
||||
{2688624000 -18000 1 CDT}
|
||||
{2709183600 -21600 0 CST}
|
||||
{2720073600 -18000 1 CDT}
|
||||
{2740633200 -21600 0 CST}
|
||||
{2751523200 -18000 1 CDT}
|
||||
{2772082800 -21600 0 CST}
|
||||
{2782972800 -18000 1 CDT}
|
||||
{2803532400 -21600 0 CST}
|
||||
{2814422400 -18000 1 CDT}
|
||||
{2834982000 -21600 0 CST}
|
||||
{2846476800 -18000 1 CDT}
|
||||
{2867036400 -21600 0 CST}
|
||||
{2877926400 -18000 1 CDT}
|
||||
{2898486000 -21600 0 CST}
|
||||
{2909376000 -18000 1 CDT}
|
||||
{2929935600 -21600 0 CST}
|
||||
{2940825600 -18000 1 CDT}
|
||||
{2961385200 -21600 0 CST}
|
||||
{2972275200 -18000 1 CDT}
|
||||
{2992834800 -21600 0 CST}
|
||||
{3003724800 -18000 1 CDT}
|
||||
{3024284400 -21600 0 CST}
|
||||
{3035779200 -18000 1 CDT}
|
||||
{3056338800 -21600 0 CST}
|
||||
{3067228800 -18000 1 CDT}
|
||||
{3087788400 -21600 0 CST}
|
||||
{3098678400 -18000 1 CDT}
|
||||
{3119238000 -21600 0 CST}
|
||||
{3130128000 -18000 1 CDT}
|
||||
{3150687600 -21600 0 CST}
|
||||
{3161577600 -18000 1 CDT}
|
||||
{3182137200 -21600 0 CST}
|
||||
{3193027200 -18000 1 CDT}
|
||||
{3213586800 -21600 0 CST}
|
||||
{3225081600 -18000 1 CDT}
|
||||
{3245641200 -21600 0 CST}
|
||||
{3256531200 -18000 1 CDT}
|
||||
{3277090800 -21600 0 CST}
|
||||
{3287980800 -18000 1 CDT}
|
||||
{3308540400 -21600 0 CST}
|
||||
{3319430400 -18000 1 CDT}
|
||||
{3339990000 -21600 0 CST}
|
||||
{3350880000 -18000 1 CDT}
|
||||
{3371439600 -21600 0 CST}
|
||||
{3382934400 -18000 1 CDT}
|
||||
{3403494000 -21600 0 CST}
|
||||
{3414384000 -18000 1 CDT}
|
||||
{3434943600 -21600 0 CST}
|
||||
{3445833600 -18000 1 CDT}
|
||||
{3466393200 -21600 0 CST}
|
||||
{3477283200 -18000 1 CDT}
|
||||
{3497842800 -21600 0 CST}
|
||||
{3508732800 -18000 1 CDT}
|
||||
{3529292400 -21600 0 CST}
|
||||
{3540182400 -18000 1 CDT}
|
||||
{3560742000 -21600 0 CST}
|
||||
{3572236800 -18000 1 CDT}
|
||||
{3592796400 -21600 0 CST}
|
||||
{3603686400 -18000 1 CDT}
|
||||
{3624246000 -21600 0 CST}
|
||||
{3635136000 -18000 1 CDT}
|
||||
{3655695600 -21600 0 CST}
|
||||
{3666585600 -18000 1 CDT}
|
||||
{3687145200 -21600 0 CST}
|
||||
{3698035200 -18000 1 CDT}
|
||||
{3718594800 -21600 0 CST}
|
||||
{3730089600 -18000 1 CDT}
|
||||
{3750649200 -21600 0 CST}
|
||||
{3761539200 -18000 1 CDT}
|
||||
{3782098800 -21600 0 CST}
|
||||
{3792988800 -18000 1 CDT}
|
||||
{3813548400 -21600 0 CST}
|
||||
{3824438400 -18000 1 CDT}
|
||||
{3844998000 -21600 0 CST}
|
||||
{3855888000 -18000 1 CDT}
|
||||
{3876447600 -21600 0 CST}
|
||||
{3887337600 -18000 1 CDT}
|
||||
{3907897200 -21600 0 CST}
|
||||
{3919392000 -18000 1 CDT}
|
||||
{3939951600 -21600 0 CST}
|
||||
{3950841600 -18000 1 CDT}
|
||||
{3971401200 -21600 0 CST}
|
||||
{3982291200 -18000 1 CDT}
|
||||
{4002850800 -21600 0 CST}
|
||||
{4013740800 -18000 1 CDT}
|
||||
{4034300400 -21600 0 CST}
|
||||
{4045190400 -18000 1 CDT}
|
||||
{4065750000 -21600 0 CST}
|
||||
{4076640000 -18000 1 CDT}
|
||||
{4097199600 -21600 0 CST}
|
||||
}
|
||||
|
||||
@@ -1,252 +1,5 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Pangnirtung) {
|
||||
{-9223372036854775808 0 0 -00}
|
||||
{-1546300800 -14400 0 AST}
|
||||
{-880221600 -10800 1 AWT}
|
||||
{-769395600 -10800 1 APT}
|
||||
{-765399600 -14400 0 AST}
|
||||
{-147902400 -7200 1 ADDT}
|
||||
{-131572800 -14400 0 AST}
|
||||
{325663200 -10800 1 ADT}
|
||||
{341384400 -14400 0 AST}
|
||||
{357112800 -10800 1 ADT}
|
||||
{372834000 -14400 0 AST}
|
||||
{388562400 -10800 1 ADT}
|
||||
{404888400 -14400 0 AST}
|
||||
{420012000 -10800 1 ADT}
|
||||
{436338000 -14400 0 AST}
|
||||
{452066400 -10800 1 ADT}
|
||||
{467787600 -14400 0 AST}
|
||||
{483516000 -10800 1 ADT}
|
||||
{499237200 -14400 0 AST}
|
||||
{514965600 -10800 1 ADT}
|
||||
{530686800 -14400 0 AST}
|
||||
{544600800 -10800 1 ADT}
|
||||
{562136400 -14400 0 AST}
|
||||
{576050400 -10800 1 ADT}
|
||||
{594190800 -14400 0 AST}
|
||||
{607500000 -10800 1 ADT}
|
||||
{625640400 -14400 0 AST}
|
||||
{638949600 -10800 1 ADT}
|
||||
{657090000 -14400 0 AST}
|
||||
{671004000 -10800 1 ADT}
|
||||
{688539600 -14400 0 AST}
|
||||
{702453600 -10800 1 ADT}
|
||||
{719989200 -14400 0 AST}
|
||||
{733903200 -10800 1 ADT}
|
||||
{752043600 -14400 0 AST}
|
||||
{765352800 -10800 1 ADT}
|
||||
{783493200 -14400 0 AST}
|
||||
{796802400 -18000 0 EST}
|
||||
{796806000 -14400 1 EDT}
|
||||
{814946400 -18000 0 EST}
|
||||
{828860400 -14400 1 EDT}
|
||||
{846396000 -18000 0 EST}
|
||||
{860310000 -14400 1 EDT}
|
||||
{877845600 -18000 0 EST}
|
||||
{891759600 -14400 1 EDT}
|
||||
{909295200 -18000 0 EST}
|
||||
{923209200 -14400 1 EDT}
|
||||
{941353200 -21600 0 CST}
|
||||
{954662400 -18000 1 CDT}
|
||||
{972806400 -18000 0 EST}
|
||||
{986108400 -14400 1 EDT}
|
||||
{1004248800 -18000 0 EST}
|
||||
{1018162800 -14400 1 EDT}
|
||||
{1035698400 -18000 0 EST}
|
||||
{1049612400 -14400 1 EDT}
|
||||
{1067148000 -18000 0 EST}
|
||||
{1081062000 -14400 1 EDT}
|
||||
{1099202400 -18000 0 EST}
|
||||
{1112511600 -14400 1 EDT}
|
||||
{1130652000 -18000 0 EST}
|
||||
{1143961200 -14400 1 EDT}
|
||||
{1162101600 -18000 0 EST}
|
||||
{1173596400 -14400 1 EDT}
|
||||
{1194156000 -18000 0 EST}
|
||||
{1205046000 -14400 1 EDT}
|
||||
{1225605600 -18000 0 EST}
|
||||
{1236495600 -14400 1 EDT}
|
||||
{1257055200 -18000 0 EST}
|
||||
{1268550000 -14400 1 EDT}
|
||||
{1289109600 -18000 0 EST}
|
||||
{1299999600 -14400 1 EDT}
|
||||
{1320559200 -18000 0 EST}
|
||||
{1331449200 -14400 1 EDT}
|
||||
{1352008800 -18000 0 EST}
|
||||
{1362898800 -14400 1 EDT}
|
||||
{1383458400 -18000 0 EST}
|
||||
{1394348400 -14400 1 EDT}
|
||||
{1414908000 -18000 0 EST}
|
||||
{1425798000 -14400 1 EDT}
|
||||
{1446357600 -18000 0 EST}
|
||||
{1457852400 -14400 1 EDT}
|
||||
{1478412000 -18000 0 EST}
|
||||
{1489302000 -14400 1 EDT}
|
||||
{1509861600 -18000 0 EST}
|
||||
{1520751600 -14400 1 EDT}
|
||||
{1541311200 -18000 0 EST}
|
||||
{1552201200 -14400 1 EDT}
|
||||
{1572760800 -18000 0 EST}
|
||||
{1583650800 -14400 1 EDT}
|
||||
{1604210400 -18000 0 EST}
|
||||
{1615705200 -14400 1 EDT}
|
||||
{1636264800 -18000 0 EST}
|
||||
{1647154800 -14400 1 EDT}
|
||||
{1667714400 -18000 0 EST}
|
||||
{1678604400 -14400 1 EDT}
|
||||
{1699164000 -18000 0 EST}
|
||||
{1710054000 -14400 1 EDT}
|
||||
{1730613600 -18000 0 EST}
|
||||
{1741503600 -14400 1 EDT}
|
||||
{1762063200 -18000 0 EST}
|
||||
{1772953200 -14400 1 EDT}
|
||||
{1793512800 -18000 0 EST}
|
||||
{1805007600 -14400 1 EDT}
|
||||
{1825567200 -18000 0 EST}
|
||||
{1836457200 -14400 1 EDT}
|
||||
{1857016800 -18000 0 EST}
|
||||
{1867906800 -14400 1 EDT}
|
||||
{1888466400 -18000 0 EST}
|
||||
{1899356400 -14400 1 EDT}
|
||||
{1919916000 -18000 0 EST}
|
||||
{1930806000 -14400 1 EDT}
|
||||
{1951365600 -18000 0 EST}
|
||||
{1962860400 -14400 1 EDT}
|
||||
{1983420000 -18000 0 EST}
|
||||
{1994310000 -14400 1 EDT}
|
||||
{2014869600 -18000 0 EST}
|
||||
{2025759600 -14400 1 EDT}
|
||||
{2046319200 -18000 0 EST}
|
||||
{2057209200 -14400 1 EDT}
|
||||
{2077768800 -18000 0 EST}
|
||||
{2088658800 -14400 1 EDT}
|
||||
{2109218400 -18000 0 EST}
|
||||
{2120108400 -14400 1 EDT}
|
||||
{2140668000 -18000 0 EST}
|
||||
{2152162800 -14400 1 EDT}
|
||||
{2172722400 -18000 0 EST}
|
||||
{2183612400 -14400 1 EDT}
|
||||
{2204172000 -18000 0 EST}
|
||||
{2215062000 -14400 1 EDT}
|
||||
{2235621600 -18000 0 EST}
|
||||
{2246511600 -14400 1 EDT}
|
||||
{2267071200 -18000 0 EST}
|
||||
{2277961200 -14400 1 EDT}
|
||||
{2298520800 -18000 0 EST}
|
||||
{2309410800 -14400 1 EDT}
|
||||
{2329970400 -18000 0 EST}
|
||||
{2341465200 -14400 1 EDT}
|
||||
{2362024800 -18000 0 EST}
|
||||
{2372914800 -14400 1 EDT}
|
||||
{2393474400 -18000 0 EST}
|
||||
{2404364400 -14400 1 EDT}
|
||||
{2424924000 -18000 0 EST}
|
||||
{2435814000 -14400 1 EDT}
|
||||
{2456373600 -18000 0 EST}
|
||||
{2467263600 -14400 1 EDT}
|
||||
{2487823200 -18000 0 EST}
|
||||
{2499318000 -14400 1 EDT}
|
||||
{2519877600 -18000 0 EST}
|
||||
{2530767600 -14400 1 EDT}
|
||||
{2551327200 -18000 0 EST}
|
||||
{2562217200 -14400 1 EDT}
|
||||
{2582776800 -18000 0 EST}
|
||||
{2593666800 -14400 1 EDT}
|
||||
{2614226400 -18000 0 EST}
|
||||
{2625116400 -14400 1 EDT}
|
||||
{2645676000 -18000 0 EST}
|
||||
{2656566000 -14400 1 EDT}
|
||||
{2677125600 -18000 0 EST}
|
||||
{2688620400 -14400 1 EDT}
|
||||
{2709180000 -18000 0 EST}
|
||||
{2720070000 -14400 1 EDT}
|
||||
{2740629600 -18000 0 EST}
|
||||
{2751519600 -14400 1 EDT}
|
||||
{2772079200 -18000 0 EST}
|
||||
{2782969200 -14400 1 EDT}
|
||||
{2803528800 -18000 0 EST}
|
||||
{2814418800 -14400 1 EDT}
|
||||
{2834978400 -18000 0 EST}
|
||||
{2846473200 -14400 1 EDT}
|
||||
{2867032800 -18000 0 EST}
|
||||
{2877922800 -14400 1 EDT}
|
||||
{2898482400 -18000 0 EST}
|
||||
{2909372400 -14400 1 EDT}
|
||||
{2929932000 -18000 0 EST}
|
||||
{2940822000 -14400 1 EDT}
|
||||
{2961381600 -18000 0 EST}
|
||||
{2972271600 -14400 1 EDT}
|
||||
{2992831200 -18000 0 EST}
|
||||
{3003721200 -14400 1 EDT}
|
||||
{3024280800 -18000 0 EST}
|
||||
{3035775600 -14400 1 EDT}
|
||||
{3056335200 -18000 0 EST}
|
||||
{3067225200 -14400 1 EDT}
|
||||
{3087784800 -18000 0 EST}
|
||||
{3098674800 -14400 1 EDT}
|
||||
{3119234400 -18000 0 EST}
|
||||
{3130124400 -14400 1 EDT}
|
||||
{3150684000 -18000 0 EST}
|
||||
{3161574000 -14400 1 EDT}
|
||||
{3182133600 -18000 0 EST}
|
||||
{3193023600 -14400 1 EDT}
|
||||
{3213583200 -18000 0 EST}
|
||||
{3225078000 -14400 1 EDT}
|
||||
{3245637600 -18000 0 EST}
|
||||
{3256527600 -14400 1 EDT}
|
||||
{3277087200 -18000 0 EST}
|
||||
{3287977200 -14400 1 EDT}
|
||||
{3308536800 -18000 0 EST}
|
||||
{3319426800 -14400 1 EDT}
|
||||
{3339986400 -18000 0 EST}
|
||||
{3350876400 -14400 1 EDT}
|
||||
{3371436000 -18000 0 EST}
|
||||
{3382930800 -14400 1 EDT}
|
||||
{3403490400 -18000 0 EST}
|
||||
{3414380400 -14400 1 EDT}
|
||||
{3434940000 -18000 0 EST}
|
||||
{3445830000 -14400 1 EDT}
|
||||
{3466389600 -18000 0 EST}
|
||||
{3477279600 -14400 1 EDT}
|
||||
{3497839200 -18000 0 EST}
|
||||
{3508729200 -14400 1 EDT}
|
||||
{3529288800 -18000 0 EST}
|
||||
{3540178800 -14400 1 EDT}
|
||||
{3560738400 -18000 0 EST}
|
||||
{3572233200 -14400 1 EDT}
|
||||
{3592792800 -18000 0 EST}
|
||||
{3603682800 -14400 1 EDT}
|
||||
{3624242400 -18000 0 EST}
|
||||
{3635132400 -14400 1 EDT}
|
||||
{3655692000 -18000 0 EST}
|
||||
{3666582000 -14400 1 EDT}
|
||||
{3687141600 -18000 0 EST}
|
||||
{3698031600 -14400 1 EDT}
|
||||
{3718591200 -18000 0 EST}
|
||||
{3730086000 -14400 1 EDT}
|
||||
{3750645600 -18000 0 EST}
|
||||
{3761535600 -14400 1 EDT}
|
||||
{3782095200 -18000 0 EST}
|
||||
{3792985200 -14400 1 EDT}
|
||||
{3813544800 -18000 0 EST}
|
||||
{3824434800 -14400 1 EDT}
|
||||
{3844994400 -18000 0 EST}
|
||||
{3855884400 -14400 1 EDT}
|
||||
{3876444000 -18000 0 EST}
|
||||
{3887334000 -14400 1 EDT}
|
||||
{3907893600 -18000 0 EST}
|
||||
{3919388400 -14400 1 EDT}
|
||||
{3939948000 -18000 0 EST}
|
||||
{3950838000 -14400 1 EDT}
|
||||
{3971397600 -18000 0 EST}
|
||||
{3982287600 -14400 1 EDT}
|
||||
{4002847200 -18000 0 EST}
|
||||
{4013737200 -14400 1 EDT}
|
||||
{4034296800 -18000 0 EST}
|
||||
{4045186800 -14400 1 EDT}
|
||||
{4065746400 -18000 0 EST}
|
||||
{4076636400 -14400 1 EDT}
|
||||
{4097196000 -18000 0 EST}
|
||||
if {![info exists TZData(America/Iqaluit)]} {
|
||||
LoadTimeZoneFile America/Iqaluit
|
||||
}
|
||||
set TZData(:America/Pangnirtung) $TZData(:America/Iqaluit)
|
||||
|
||||
@@ -1,264 +1,5 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Rainy_River) {
|
||||
{-9223372036854775808 -22696 0 LMT}
|
||||
{-2366732504 -21600 0 CST}
|
||||
{-1632067200 -18000 1 CDT}
|
||||
{-1615136400 -21600 0 CST}
|
||||
{-923248800 -18000 1 CDT}
|
||||
{-880214400 -18000 0 CWT}
|
||||
{-769395600 -18000 1 CPT}
|
||||
{-765392400 -21600 0 CST}
|
||||
{136368000 -18000 1 CDT}
|
||||
{152089200 -21600 0 CST}
|
||||
{167817600 -18000 1 CDT}
|
||||
{183538800 -21600 0 CST}
|
||||
{199267200 -18000 1 CDT}
|
||||
{215593200 -21600 0 CST}
|
||||
{230716800 -18000 1 CDT}
|
||||
{247042800 -21600 0 CST}
|
||||
{262771200 -18000 1 CDT}
|
||||
{278492400 -21600 0 CST}
|
||||
{294220800 -18000 1 CDT}
|
||||
{309942000 -21600 0 CST}
|
||||
{325670400 -18000 1 CDT}
|
||||
{341391600 -21600 0 CST}
|
||||
{357120000 -18000 1 CDT}
|
||||
{372841200 -21600 0 CST}
|
||||
{388569600 -18000 1 CDT}
|
||||
{404895600 -21600 0 CST}
|
||||
{420019200 -18000 1 CDT}
|
||||
{436345200 -21600 0 CST}
|
||||
{452073600 -18000 1 CDT}
|
||||
{467794800 -21600 0 CST}
|
||||
{483523200 -18000 1 CDT}
|
||||
{499244400 -21600 0 CST}
|
||||
{514972800 -18000 1 CDT}
|
||||
{530694000 -21600 0 CST}
|
||||
{544608000 -18000 1 CDT}
|
||||
{562143600 -21600 0 CST}
|
||||
{576057600 -18000 1 CDT}
|
||||
{594198000 -21600 0 CST}
|
||||
{607507200 -18000 1 CDT}
|
||||
{625647600 -21600 0 CST}
|
||||
{638956800 -18000 1 CDT}
|
||||
{657097200 -21600 0 CST}
|
||||
{671011200 -18000 1 CDT}
|
||||
{688546800 -21600 0 CST}
|
||||
{702460800 -18000 1 CDT}
|
||||
{719996400 -21600 0 CST}
|
||||
{733910400 -18000 1 CDT}
|
||||
{752050800 -21600 0 CST}
|
||||
{765360000 -18000 1 CDT}
|
||||
{783500400 -21600 0 CST}
|
||||
{796809600 -18000 1 CDT}
|
||||
{814950000 -21600 0 CST}
|
||||
{828864000 -18000 1 CDT}
|
||||
{846399600 -21600 0 CST}
|
||||
{860313600 -18000 1 CDT}
|
||||
{877849200 -21600 0 CST}
|
||||
{891763200 -18000 1 CDT}
|
||||
{909298800 -21600 0 CST}
|
||||
{923212800 -18000 1 CDT}
|
||||
{941353200 -21600 0 CST}
|
||||
{954662400 -18000 1 CDT}
|
||||
{972802800 -21600 0 CST}
|
||||
{986112000 -18000 1 CDT}
|
||||
{1004252400 -21600 0 CST}
|
||||
{1018166400 -18000 1 CDT}
|
||||
{1035702000 -21600 0 CST}
|
||||
{1049616000 -18000 1 CDT}
|
||||
{1067151600 -21600 0 CST}
|
||||
{1081065600 -18000 1 CDT}
|
||||
{1099206000 -21600 0 CST}
|
||||
{1112515200 -18000 1 CDT}
|
||||
{1130655600 -21600 0 CST}
|
||||
{1143964800 -18000 1 CDT}
|
||||
{1162105200 -21600 0 CST}
|
||||
{1173600000 -18000 1 CDT}
|
||||
{1194159600 -21600 0 CST}
|
||||
{1205049600 -18000 1 CDT}
|
||||
{1225609200 -21600 0 CST}
|
||||
{1236499200 -18000 1 CDT}
|
||||
{1257058800 -21600 0 CST}
|
||||
{1268553600 -18000 1 CDT}
|
||||
{1289113200 -21600 0 CST}
|
||||
{1300003200 -18000 1 CDT}
|
||||
{1320562800 -21600 0 CST}
|
||||
{1331452800 -18000 1 CDT}
|
||||
{1352012400 -21600 0 CST}
|
||||
{1362902400 -18000 1 CDT}
|
||||
{1383462000 -21600 0 CST}
|
||||
{1394352000 -18000 1 CDT}
|
||||
{1414911600 -21600 0 CST}
|
||||
{1425801600 -18000 1 CDT}
|
||||
{1446361200 -21600 0 CST}
|
||||
{1457856000 -18000 1 CDT}
|
||||
{1478415600 -21600 0 CST}
|
||||
{1489305600 -18000 1 CDT}
|
||||
{1509865200 -21600 0 CST}
|
||||
{1520755200 -18000 1 CDT}
|
||||
{1541314800 -21600 0 CST}
|
||||
{1552204800 -18000 1 CDT}
|
||||
{1572764400 -21600 0 CST}
|
||||
{1583654400 -18000 1 CDT}
|
||||
{1604214000 -21600 0 CST}
|
||||
{1615708800 -18000 1 CDT}
|
||||
{1636268400 -21600 0 CST}
|
||||
{1647158400 -18000 1 CDT}
|
||||
{1667718000 -21600 0 CST}
|
||||
{1678608000 -18000 1 CDT}
|
||||
{1699167600 -21600 0 CST}
|
||||
{1710057600 -18000 1 CDT}
|
||||
{1730617200 -21600 0 CST}
|
||||
{1741507200 -18000 1 CDT}
|
||||
{1762066800 -21600 0 CST}
|
||||
{1772956800 -18000 1 CDT}
|
||||
{1793516400 -21600 0 CST}
|
||||
{1805011200 -18000 1 CDT}
|
||||
{1825570800 -21600 0 CST}
|
||||
{1836460800 -18000 1 CDT}
|
||||
{1857020400 -21600 0 CST}
|
||||
{1867910400 -18000 1 CDT}
|
||||
{1888470000 -21600 0 CST}
|
||||
{1899360000 -18000 1 CDT}
|
||||
{1919919600 -21600 0 CST}
|
||||
{1930809600 -18000 1 CDT}
|
||||
{1951369200 -21600 0 CST}
|
||||
{1962864000 -18000 1 CDT}
|
||||
{1983423600 -21600 0 CST}
|
||||
{1994313600 -18000 1 CDT}
|
||||
{2014873200 -21600 0 CST}
|
||||
{2025763200 -18000 1 CDT}
|
||||
{2046322800 -21600 0 CST}
|
||||
{2057212800 -18000 1 CDT}
|
||||
{2077772400 -21600 0 CST}
|
||||
{2088662400 -18000 1 CDT}
|
||||
{2109222000 -21600 0 CST}
|
||||
{2120112000 -18000 1 CDT}
|
||||
{2140671600 -21600 0 CST}
|
||||
{2152166400 -18000 1 CDT}
|
||||
{2172726000 -21600 0 CST}
|
||||
{2183616000 -18000 1 CDT}
|
||||
{2204175600 -21600 0 CST}
|
||||
{2215065600 -18000 1 CDT}
|
||||
{2235625200 -21600 0 CST}
|
||||
{2246515200 -18000 1 CDT}
|
||||
{2267074800 -21600 0 CST}
|
||||
{2277964800 -18000 1 CDT}
|
||||
{2298524400 -21600 0 CST}
|
||||
{2309414400 -18000 1 CDT}
|
||||
{2329974000 -21600 0 CST}
|
||||
{2341468800 -18000 1 CDT}
|
||||
{2362028400 -21600 0 CST}
|
||||
{2372918400 -18000 1 CDT}
|
||||
{2393478000 -21600 0 CST}
|
||||
{2404368000 -18000 1 CDT}
|
||||
{2424927600 -21600 0 CST}
|
||||
{2435817600 -18000 1 CDT}
|
||||
{2456377200 -21600 0 CST}
|
||||
{2467267200 -18000 1 CDT}
|
||||
{2487826800 -21600 0 CST}
|
||||
{2499321600 -18000 1 CDT}
|
||||
{2519881200 -21600 0 CST}
|
||||
{2530771200 -18000 1 CDT}
|
||||
{2551330800 -21600 0 CST}
|
||||
{2562220800 -18000 1 CDT}
|
||||
{2582780400 -21600 0 CST}
|
||||
{2593670400 -18000 1 CDT}
|
||||
{2614230000 -21600 0 CST}
|
||||
{2625120000 -18000 1 CDT}
|
||||
{2645679600 -21600 0 CST}
|
||||
{2656569600 -18000 1 CDT}
|
||||
{2677129200 -21600 0 CST}
|
||||
{2688624000 -18000 1 CDT}
|
||||
{2709183600 -21600 0 CST}
|
||||
{2720073600 -18000 1 CDT}
|
||||
{2740633200 -21600 0 CST}
|
||||
{2751523200 -18000 1 CDT}
|
||||
{2772082800 -21600 0 CST}
|
||||
{2782972800 -18000 1 CDT}
|
||||
{2803532400 -21600 0 CST}
|
||||
{2814422400 -18000 1 CDT}
|
||||
{2834982000 -21600 0 CST}
|
||||
{2846476800 -18000 1 CDT}
|
||||
{2867036400 -21600 0 CST}
|
||||
{2877926400 -18000 1 CDT}
|
||||
{2898486000 -21600 0 CST}
|
||||
{2909376000 -18000 1 CDT}
|
||||
{2929935600 -21600 0 CST}
|
||||
{2940825600 -18000 1 CDT}
|
||||
{2961385200 -21600 0 CST}
|
||||
{2972275200 -18000 1 CDT}
|
||||
{2992834800 -21600 0 CST}
|
||||
{3003724800 -18000 1 CDT}
|
||||
{3024284400 -21600 0 CST}
|
||||
{3035779200 -18000 1 CDT}
|
||||
{3056338800 -21600 0 CST}
|
||||
{3067228800 -18000 1 CDT}
|
||||
{3087788400 -21600 0 CST}
|
||||
{3098678400 -18000 1 CDT}
|
||||
{3119238000 -21600 0 CST}
|
||||
{3130128000 -18000 1 CDT}
|
||||
{3150687600 -21600 0 CST}
|
||||
{3161577600 -18000 1 CDT}
|
||||
{3182137200 -21600 0 CST}
|
||||
{3193027200 -18000 1 CDT}
|
||||
{3213586800 -21600 0 CST}
|
||||
{3225081600 -18000 1 CDT}
|
||||
{3245641200 -21600 0 CST}
|
||||
{3256531200 -18000 1 CDT}
|
||||
{3277090800 -21600 0 CST}
|
||||
{3287980800 -18000 1 CDT}
|
||||
{3308540400 -21600 0 CST}
|
||||
{3319430400 -18000 1 CDT}
|
||||
{3339990000 -21600 0 CST}
|
||||
{3350880000 -18000 1 CDT}
|
||||
{3371439600 -21600 0 CST}
|
||||
{3382934400 -18000 1 CDT}
|
||||
{3403494000 -21600 0 CST}
|
||||
{3414384000 -18000 1 CDT}
|
||||
{3434943600 -21600 0 CST}
|
||||
{3445833600 -18000 1 CDT}
|
||||
{3466393200 -21600 0 CST}
|
||||
{3477283200 -18000 1 CDT}
|
||||
{3497842800 -21600 0 CST}
|
||||
{3508732800 -18000 1 CDT}
|
||||
{3529292400 -21600 0 CST}
|
||||
{3540182400 -18000 1 CDT}
|
||||
{3560742000 -21600 0 CST}
|
||||
{3572236800 -18000 1 CDT}
|
||||
{3592796400 -21600 0 CST}
|
||||
{3603686400 -18000 1 CDT}
|
||||
{3624246000 -21600 0 CST}
|
||||
{3635136000 -18000 1 CDT}
|
||||
{3655695600 -21600 0 CST}
|
||||
{3666585600 -18000 1 CDT}
|
||||
{3687145200 -21600 0 CST}
|
||||
{3698035200 -18000 1 CDT}
|
||||
{3718594800 -21600 0 CST}
|
||||
{3730089600 -18000 1 CDT}
|
||||
{3750649200 -21600 0 CST}
|
||||
{3761539200 -18000 1 CDT}
|
||||
{3782098800 -21600 0 CST}
|
||||
{3792988800 -18000 1 CDT}
|
||||
{3813548400 -21600 0 CST}
|
||||
{3824438400 -18000 1 CDT}
|
||||
{3844998000 -21600 0 CST}
|
||||
{3855888000 -18000 1 CDT}
|
||||
{3876447600 -21600 0 CST}
|
||||
{3887337600 -18000 1 CDT}
|
||||
{3907897200 -21600 0 CST}
|
||||
{3919392000 -18000 1 CDT}
|
||||
{3939951600 -21600 0 CST}
|
||||
{3950841600 -18000 1 CDT}
|
||||
{3971401200 -21600 0 CST}
|
||||
{3982291200 -18000 1 CDT}
|
||||
{4002850800 -21600 0 CST}
|
||||
{4013740800 -18000 1 CDT}
|
||||
{4034300400 -21600 0 CST}
|
||||
{4045190400 -18000 1 CDT}
|
||||
{4065750000 -21600 0 CST}
|
||||
{4076640000 -18000 1 CDT}
|
||||
{4097199600 -21600 0 CST}
|
||||
if {![info exists TZData(America/Winnipeg)]} {
|
||||
LoadTimeZoneFile America/Winnipeg
|
||||
}
|
||||
set TZData(:America/Rainy_River) $TZData(:America/Winnipeg)
|
||||
|
||||
@@ -3,8 +3,22 @@
|
||||
set TZData(:America/Rankin_Inlet) {
|
||||
{-9223372036854775808 0 0 -00}
|
||||
{-410227200 -21600 0 CST}
|
||||
{-147895200 -14400 1 CDDT}
|
||||
{-131565600 -21600 0 CST}
|
||||
{73468800 -18000 1 CDT}
|
||||
{89190000 -21600 0 CST}
|
||||
{104918400 -18000 1 CDT}
|
||||
{120639600 -21600 0 CST}
|
||||
{136368000 -18000 1 CDT}
|
||||
{152089200 -21600 0 CST}
|
||||
{167817600 -18000 1 CDT}
|
||||
{183538800 -21600 0 CST}
|
||||
{199267200 -18000 1 CDT}
|
||||
{215593200 -21600 0 CST}
|
||||
{230716800 -18000 1 CDT}
|
||||
{247042800 -21600 0 CST}
|
||||
{262771200 -18000 1 CDT}
|
||||
{278492400 -21600 0 CST}
|
||||
{294220800 -18000 1 CDT}
|
||||
{309942000 -21600 0 CST}
|
||||
{325670400 -18000 1 CDT}
|
||||
{341391600 -21600 0 CST}
|
||||
{357120000 -18000 1 CDT}
|
||||
|
||||
@@ -3,8 +3,22 @@
|
||||
set TZData(:America/Resolute) {
|
||||
{-9223372036854775808 0 0 -00}
|
||||
{-704937600 -21600 0 CST}
|
||||
{-147895200 -14400 1 CDDT}
|
||||
{-131565600 -21600 0 CST}
|
||||
{73468800 -18000 1 CDT}
|
||||
{89190000 -21600 0 CST}
|
||||
{104918400 -18000 1 CDT}
|
||||
{120639600 -21600 0 CST}
|
||||
{136368000 -18000 1 CDT}
|
||||
{152089200 -21600 0 CST}
|
||||
{167817600 -18000 1 CDT}
|
||||
{183538800 -21600 0 CST}
|
||||
{199267200 -18000 1 CDT}
|
||||
{215593200 -21600 0 CST}
|
||||
{230716800 -18000 1 CDT}
|
||||
{247042800 -21600 0 CST}
|
||||
{262771200 -18000 1 CDT}
|
||||
{278492400 -21600 0 CST}
|
||||
{294220800 -18000 1 CDT}
|
||||
{309942000 -21600 0 CST}
|
||||
{325670400 -18000 1 CDT}
|
||||
{341391600 -21600 0 CST}
|
||||
{357120000 -18000 1 CDT}
|
||||
|
||||
@@ -1,272 +1,5 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Thunder_Bay) {
|
||||
{-9223372036854775808 -21420 0 LMT}
|
||||
{-2366733780 -21600 0 CST}
|
||||
{-1893434400 -18000 0 EST}
|
||||
{-883594800 -18000 0 EST}
|
||||
{-880218000 -14400 1 EWT}
|
||||
{-769395600 -14400 1 EPT}
|
||||
{-765396000 -18000 0 EST}
|
||||
{18000 -18000 0 EST}
|
||||
{9961200 -14400 1 EDT}
|
||||
{25682400 -18000 0 EST}
|
||||
{41410800 -14400 1 EDT}
|
||||
{57736800 -18000 0 EST}
|
||||
{73465200 -14400 1 EDT}
|
||||
{89186400 -18000 0 EST}
|
||||
{94712400 -18000 0 EST}
|
||||
{126248400 -18000 0 EST}
|
||||
{136364400 -14400 1 EDT}
|
||||
{152085600 -18000 0 EST}
|
||||
{167814000 -14400 1 EDT}
|
||||
{183535200 -18000 0 EST}
|
||||
{199263600 -14400 1 EDT}
|
||||
{215589600 -18000 0 EST}
|
||||
{230713200 -14400 1 EDT}
|
||||
{247039200 -18000 0 EST}
|
||||
{262767600 -14400 1 EDT}
|
||||
{278488800 -18000 0 EST}
|
||||
{294217200 -14400 1 EDT}
|
||||
{309938400 -18000 0 EST}
|
||||
{325666800 -14400 1 EDT}
|
||||
{341388000 -18000 0 EST}
|
||||
{357116400 -14400 1 EDT}
|
||||
{372837600 -18000 0 EST}
|
||||
{388566000 -14400 1 EDT}
|
||||
{404892000 -18000 0 EST}
|
||||
{420015600 -14400 1 EDT}
|
||||
{436341600 -18000 0 EST}
|
||||
{452070000 -14400 1 EDT}
|
||||
{467791200 -18000 0 EST}
|
||||
{483519600 -14400 1 EDT}
|
||||
{499240800 -18000 0 EST}
|
||||
{514969200 -14400 1 EDT}
|
||||
{530690400 -18000 0 EST}
|
||||
{544604400 -14400 1 EDT}
|
||||
{562140000 -18000 0 EST}
|
||||
{576054000 -14400 1 EDT}
|
||||
{594194400 -18000 0 EST}
|
||||
{607503600 -14400 1 EDT}
|
||||
{625644000 -18000 0 EST}
|
||||
{638953200 -14400 1 EDT}
|
||||
{657093600 -18000 0 EST}
|
||||
{671007600 -14400 1 EDT}
|
||||
{688543200 -18000 0 EST}
|
||||
{702457200 -14400 1 EDT}
|
||||
{719992800 -18000 0 EST}
|
||||
{733906800 -14400 1 EDT}
|
||||
{752047200 -18000 0 EST}
|
||||
{765356400 -14400 1 EDT}
|
||||
{783496800 -18000 0 EST}
|
||||
{796806000 -14400 1 EDT}
|
||||
{814946400 -18000 0 EST}
|
||||
{828860400 -14400 1 EDT}
|
||||
{846396000 -18000 0 EST}
|
||||
{860310000 -14400 1 EDT}
|
||||
{877845600 -18000 0 EST}
|
||||
{891759600 -14400 1 EDT}
|
||||
{909295200 -18000 0 EST}
|
||||
{923209200 -14400 1 EDT}
|
||||
{941349600 -18000 0 EST}
|
||||
{954658800 -14400 1 EDT}
|
||||
{972799200 -18000 0 EST}
|
||||
{986108400 -14400 1 EDT}
|
||||
{1004248800 -18000 0 EST}
|
||||
{1018162800 -14400 1 EDT}
|
||||
{1035698400 -18000 0 EST}
|
||||
{1049612400 -14400 1 EDT}
|
||||
{1067148000 -18000 0 EST}
|
||||
{1081062000 -14400 1 EDT}
|
||||
{1099202400 -18000 0 EST}
|
||||
{1112511600 -14400 1 EDT}
|
||||
{1130652000 -18000 0 EST}
|
||||
{1143961200 -14400 1 EDT}
|
||||
{1162101600 -18000 0 EST}
|
||||
{1173596400 -14400 1 EDT}
|
||||
{1194156000 -18000 0 EST}
|
||||
{1205046000 -14400 1 EDT}
|
||||
{1225605600 -18000 0 EST}
|
||||
{1236495600 -14400 1 EDT}
|
||||
{1257055200 -18000 0 EST}
|
||||
{1268550000 -14400 1 EDT}
|
||||
{1289109600 -18000 0 EST}
|
||||
{1299999600 -14400 1 EDT}
|
||||
{1320559200 -18000 0 EST}
|
||||
{1331449200 -14400 1 EDT}
|
||||
{1352008800 -18000 0 EST}
|
||||
{1362898800 -14400 1 EDT}
|
||||
{1383458400 -18000 0 EST}
|
||||
{1394348400 -14400 1 EDT}
|
||||
{1414908000 -18000 0 EST}
|
||||
{1425798000 -14400 1 EDT}
|
||||
{1446357600 -18000 0 EST}
|
||||
{1457852400 -14400 1 EDT}
|
||||
{1478412000 -18000 0 EST}
|
||||
{1489302000 -14400 1 EDT}
|
||||
{1509861600 -18000 0 EST}
|
||||
{1520751600 -14400 1 EDT}
|
||||
{1541311200 -18000 0 EST}
|
||||
{1552201200 -14400 1 EDT}
|
||||
{1572760800 -18000 0 EST}
|
||||
{1583650800 -14400 1 EDT}
|
||||
{1604210400 -18000 0 EST}
|
||||
{1615705200 -14400 1 EDT}
|
||||
{1636264800 -18000 0 EST}
|
||||
{1647154800 -14400 1 EDT}
|
||||
{1667714400 -18000 0 EST}
|
||||
{1678604400 -14400 1 EDT}
|
||||
{1699164000 -18000 0 EST}
|
||||
{1710054000 -14400 1 EDT}
|
||||
{1730613600 -18000 0 EST}
|
||||
{1741503600 -14400 1 EDT}
|
||||
{1762063200 -18000 0 EST}
|
||||
{1772953200 -14400 1 EDT}
|
||||
{1793512800 -18000 0 EST}
|
||||
{1805007600 -14400 1 EDT}
|
||||
{1825567200 -18000 0 EST}
|
||||
{1836457200 -14400 1 EDT}
|
||||
{1857016800 -18000 0 EST}
|
||||
{1867906800 -14400 1 EDT}
|
||||
{1888466400 -18000 0 EST}
|
||||
{1899356400 -14400 1 EDT}
|
||||
{1919916000 -18000 0 EST}
|
||||
{1930806000 -14400 1 EDT}
|
||||
{1951365600 -18000 0 EST}
|
||||
{1962860400 -14400 1 EDT}
|
||||
{1983420000 -18000 0 EST}
|
||||
{1994310000 -14400 1 EDT}
|
||||
{2014869600 -18000 0 EST}
|
||||
{2025759600 -14400 1 EDT}
|
||||
{2046319200 -18000 0 EST}
|
||||
{2057209200 -14400 1 EDT}
|
||||
{2077768800 -18000 0 EST}
|
||||
{2088658800 -14400 1 EDT}
|
||||
{2109218400 -18000 0 EST}
|
||||
{2120108400 -14400 1 EDT}
|
||||
{2140668000 -18000 0 EST}
|
||||
{2152162800 -14400 1 EDT}
|
||||
{2172722400 -18000 0 EST}
|
||||
{2183612400 -14400 1 EDT}
|
||||
{2204172000 -18000 0 EST}
|
||||
{2215062000 -14400 1 EDT}
|
||||
{2235621600 -18000 0 EST}
|
||||
{2246511600 -14400 1 EDT}
|
||||
{2267071200 -18000 0 EST}
|
||||
{2277961200 -14400 1 EDT}
|
||||
{2298520800 -18000 0 EST}
|
||||
{2309410800 -14400 1 EDT}
|
||||
{2329970400 -18000 0 EST}
|
||||
{2341465200 -14400 1 EDT}
|
||||
{2362024800 -18000 0 EST}
|
||||
{2372914800 -14400 1 EDT}
|
||||
{2393474400 -18000 0 EST}
|
||||
{2404364400 -14400 1 EDT}
|
||||
{2424924000 -18000 0 EST}
|
||||
{2435814000 -14400 1 EDT}
|
||||
{2456373600 -18000 0 EST}
|
||||
{2467263600 -14400 1 EDT}
|
||||
{2487823200 -18000 0 EST}
|
||||
{2499318000 -14400 1 EDT}
|
||||
{2519877600 -18000 0 EST}
|
||||
{2530767600 -14400 1 EDT}
|
||||
{2551327200 -18000 0 EST}
|
||||
{2562217200 -14400 1 EDT}
|
||||
{2582776800 -18000 0 EST}
|
||||
{2593666800 -14400 1 EDT}
|
||||
{2614226400 -18000 0 EST}
|
||||
{2625116400 -14400 1 EDT}
|
||||
{2645676000 -18000 0 EST}
|
||||
{2656566000 -14400 1 EDT}
|
||||
{2677125600 -18000 0 EST}
|
||||
{2688620400 -14400 1 EDT}
|
||||
{2709180000 -18000 0 EST}
|
||||
{2720070000 -14400 1 EDT}
|
||||
{2740629600 -18000 0 EST}
|
||||
{2751519600 -14400 1 EDT}
|
||||
{2772079200 -18000 0 EST}
|
||||
{2782969200 -14400 1 EDT}
|
||||
{2803528800 -18000 0 EST}
|
||||
{2814418800 -14400 1 EDT}
|
||||
{2834978400 -18000 0 EST}
|
||||
{2846473200 -14400 1 EDT}
|
||||
{2867032800 -18000 0 EST}
|
||||
{2877922800 -14400 1 EDT}
|
||||
{2898482400 -18000 0 EST}
|
||||
{2909372400 -14400 1 EDT}
|
||||
{2929932000 -18000 0 EST}
|
||||
{2940822000 -14400 1 EDT}
|
||||
{2961381600 -18000 0 EST}
|
||||
{2972271600 -14400 1 EDT}
|
||||
{2992831200 -18000 0 EST}
|
||||
{3003721200 -14400 1 EDT}
|
||||
{3024280800 -18000 0 EST}
|
||||
{3035775600 -14400 1 EDT}
|
||||
{3056335200 -18000 0 EST}
|
||||
{3067225200 -14400 1 EDT}
|
||||
{3087784800 -18000 0 EST}
|
||||
{3098674800 -14400 1 EDT}
|
||||
{3119234400 -18000 0 EST}
|
||||
{3130124400 -14400 1 EDT}
|
||||
{3150684000 -18000 0 EST}
|
||||
{3161574000 -14400 1 EDT}
|
||||
{3182133600 -18000 0 EST}
|
||||
{3193023600 -14400 1 EDT}
|
||||
{3213583200 -18000 0 EST}
|
||||
{3225078000 -14400 1 EDT}
|
||||
{3245637600 -18000 0 EST}
|
||||
{3256527600 -14400 1 EDT}
|
||||
{3277087200 -18000 0 EST}
|
||||
{3287977200 -14400 1 EDT}
|
||||
{3308536800 -18000 0 EST}
|
||||
{3319426800 -14400 1 EDT}
|
||||
{3339986400 -18000 0 EST}
|
||||
{3350876400 -14400 1 EDT}
|
||||
{3371436000 -18000 0 EST}
|
||||
{3382930800 -14400 1 EDT}
|
||||
{3403490400 -18000 0 EST}
|
||||
{3414380400 -14400 1 EDT}
|
||||
{3434940000 -18000 0 EST}
|
||||
{3445830000 -14400 1 EDT}
|
||||
{3466389600 -18000 0 EST}
|
||||
{3477279600 -14400 1 EDT}
|
||||
{3497839200 -18000 0 EST}
|
||||
{3508729200 -14400 1 EDT}
|
||||
{3529288800 -18000 0 EST}
|
||||
{3540178800 -14400 1 EDT}
|
||||
{3560738400 -18000 0 EST}
|
||||
{3572233200 -14400 1 EDT}
|
||||
{3592792800 -18000 0 EST}
|
||||
{3603682800 -14400 1 EDT}
|
||||
{3624242400 -18000 0 EST}
|
||||
{3635132400 -14400 1 EDT}
|
||||
{3655692000 -18000 0 EST}
|
||||
{3666582000 -14400 1 EDT}
|
||||
{3687141600 -18000 0 EST}
|
||||
{3698031600 -14400 1 EDT}
|
||||
{3718591200 -18000 0 EST}
|
||||
{3730086000 -14400 1 EDT}
|
||||
{3750645600 -18000 0 EST}
|
||||
{3761535600 -14400 1 EDT}
|
||||
{3782095200 -18000 0 EST}
|
||||
{3792985200 -14400 1 EDT}
|
||||
{3813544800 -18000 0 EST}
|
||||
{3824434800 -14400 1 EDT}
|
||||
{3844994400 -18000 0 EST}
|
||||
{3855884400 -14400 1 EDT}
|
||||
{3876444000 -18000 0 EST}
|
||||
{3887334000 -14400 1 EDT}
|
||||
{3907893600 -18000 0 EST}
|
||||
{3919388400 -14400 1 EDT}
|
||||
{3939948000 -18000 0 EST}
|
||||
{3950838000 -14400 1 EDT}
|
||||
{3971397600 -18000 0 EST}
|
||||
{3982287600 -14400 1 EDT}
|
||||
{4002847200 -18000 0 EST}
|
||||
{4013737200 -14400 1 EDT}
|
||||
{4034296800 -18000 0 EST}
|
||||
{4045186800 -14400 1 EDT}
|
||||
{4065746400 -18000 0 EST}
|
||||
{4076636400 -14400 1 EDT}
|
||||
{4097196000 -18000 0 EST}
|
||||
if {![info exists TZData(America/Toronto)]} {
|
||||
LoadTimeZoneFile America/Toronto
|
||||
}
|
||||
set TZData(:America/Thunder_Bay) $TZData(:America/Toronto)
|
||||
|
||||
@@ -10,8 +10,10 @@ set TZData(:America/Whitehorse) {
|
||||
{-880203600 -28800 1 YWT}
|
||||
{-769395600 -28800 1 YPT}
|
||||
{-765381600 -32400 0 YST}
|
||||
{-157734000 -32400 0 YST}
|
||||
{-147884400 -25200 1 YDDT}
|
||||
{-131554800 -32400 0 YST}
|
||||
{-121273200 -28800 0 PST}
|
||||
{315561600 -28800 0 PST}
|
||||
{325677600 -25200 1 PDT}
|
||||
{341398800 -28800 0 PST}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user