Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12d09ed4d9 | ||
|
|
ebec0ccb97 | ||
|
|
4f5685bc2e | ||
|
|
54a1421d88 | ||
|
|
618269ede0 | ||
|
|
b8e93abb30 | ||
|
|
a77a09d3df | ||
|
|
242cba5fc0 | ||
|
|
54f15faba5 | ||
|
|
f683d1f837 | ||
|
|
7896482e74 | ||
|
|
aa52afd6f9 | ||
|
|
176f7adfae | ||
|
|
b0ec1c9cc4 | ||
|
|
07f67db36d | ||
|
|
f935e5118d | ||
|
|
580403cf61 | ||
|
|
f3cc49e1ef | ||
|
|
301b5ed8d9 | ||
|
|
1de877775d | ||
|
|
4ca61724c5 | ||
|
|
4a4195dde8 | ||
|
|
0290bc2e58 | ||
|
|
264cdba5ac | ||
|
|
bc67254346 | ||
|
|
df59030308 | ||
|
|
cbaacc8765 | ||
|
|
8b2e668afd | ||
|
|
ac90f7932a | ||
|
|
90743534a8 | ||
|
|
c3237c427f | ||
|
|
d8efa035d1 | ||
|
|
08461f8e8f | ||
|
|
ed918cb027 | ||
|
|
37289addc2 | ||
|
|
e2d5a2cd60 | ||
|
|
5860a89267 | ||
|
|
aa0e1c2bd9 | ||
|
|
558680d5e5 | ||
|
|
baa91f87ba | ||
|
|
c29c4e023f | ||
|
|
997617cd7d | ||
|
|
0a0ba9e309 | ||
|
|
073b0f729a | ||
|
|
bf8b4d6d18 | ||
|
|
45a4664dc2 | ||
|
|
946847b4b9 | ||
|
|
5b6a975221 | ||
|
|
96b27040f7 | ||
|
|
7dc2ed805f | ||
|
|
0d106bd729 | ||
|
|
4eef7b0ff0 | ||
|
|
59462a578f | ||
|
|
67a433cc8e | ||
|
|
b87eac8cd9 | ||
|
|
89cc07aa34 | ||
|
|
a6714c6778 | ||
|
|
e97b71f139 | ||
|
|
66027ff8e6 | ||
|
|
911d6f8e5e | ||
|
|
c94d0732e0 | ||
|
|
2618ae962a | ||
|
|
1625f9f678 | ||
|
|
fddaf810d4 | ||
|
|
fc19cf036c | ||
|
|
e7cef5d811 | ||
|
|
848c57d596 | ||
|
|
ae7471ec7e | ||
|
|
861b69164d | ||
|
|
dc033db224 | ||
|
|
d74efff177 | ||
|
|
e253c3eed9 | ||
|
|
78c6a505b7 | ||
|
|
503165d9c2 | ||
|
|
e4971bdffc | ||
|
|
af64c95042 | ||
|
|
90034cb557 | ||
|
|
df1e155f68 | ||
|
|
4dd445404b | ||
|
|
545fe029f6 | ||
|
|
a3581baf86 | ||
|
|
72fef9d4d0 | ||
|
|
a22f4cc167 | ||
|
|
d357339eb6 | ||
|
|
041458aca6 | ||
|
|
6a7b44b23c | ||
|
|
c45f83b3db | ||
|
|
72db4a5deb | ||
|
|
73a790977d | ||
|
|
c510082005 | ||
|
|
2e4dede387 | ||
|
|
53f75ee8c8 | ||
|
|
7791d13f5c | ||
|
|
56ca2a64d7 | ||
|
|
e10b5cb8b9 | ||
|
|
88dd8c1911 | ||
|
|
20188493af | ||
|
|
d08eb4bc7d | ||
|
|
1e54e0ba13 | ||
|
|
0900f426bd | ||
|
|
7709859190 | ||
|
|
aeb6cd1eb9 | ||
|
|
ca2928e660 | ||
|
|
99e286f193 | ||
|
|
6b299f271e | ||
|
|
6535d19542 | ||
|
|
03e22c83db | ||
|
|
62f180300b | ||
|
|
6c4636e94b | ||
|
|
4ee94e4f67 | ||
|
|
04328bc720 | ||
|
|
d852753be2 | ||
|
|
f7429e3230 | ||
|
|
cd97018033 | ||
|
|
7aa511f93b | ||
|
|
7f10145e49 | ||
|
|
3edb9b4175 | ||
|
|
0f0bd5de07 | ||
|
|
35baa585da | ||
|
|
14cb83639f | ||
|
|
68d6146f53 | ||
|
|
ad7e9fe625 | ||
|
|
1858192725 | ||
|
|
e7d7e2db67 | ||
|
|
024c0aa13a | ||
|
|
7ef194a7d1 | ||
|
|
3106ce90c0 | ||
|
|
70ca2e60fd | ||
|
|
3135d809f5 | ||
|
|
7e59780763 | ||
|
|
3d98702f45 | ||
|
|
78c9978aa1 | ||
|
|
7968fff465 | ||
|
|
67dfc6e7e3 | ||
|
|
e668c10036 | ||
|
|
32bd9fd0d2 | ||
|
|
6a1f856c63 | ||
|
|
f368137ec5 | ||
|
|
b863e0d57a | ||
|
|
01785b73fb | ||
|
|
cfc103c6b8 | ||
|
|
7de69aeb41 | ||
|
|
04249bbcd7 | ||
|
|
eb1f9c9989 | ||
|
|
da8010ca5c | ||
|
|
801ae4d914 | ||
|
|
cd82527608 | ||
|
|
4b6859f9dc | ||
|
|
13b2522d41 | ||
|
|
3a1e74ddc5 | ||
|
|
324c39d51c | ||
|
|
e30e67e0cd | ||
|
|
e5d7a4afce | ||
|
|
d273c052a5 | ||
|
|
53cfe378b3 | ||
|
|
7f18f499d0 | ||
|
|
e8d619b292 | ||
|
|
07ea9d3df5 | ||
|
|
bd64729686 | ||
|
|
4fdc66665f | ||
|
|
be1a8384ef | ||
|
|
b8c47674a4 | ||
|
|
9a18abc855 | ||
|
|
eb09d3860d | ||
|
|
172063cace | ||
|
|
e26ccd75b1 | ||
|
|
2e4b97b87f | ||
|
|
be39d74ee7 | ||
|
|
ded49faad5 | ||
|
|
2ebe7012db | ||
|
|
d8ce1ffde8 | ||
|
|
7f8e25f907 | ||
|
|
06465624ac | ||
|
|
cf84dd6daf | ||
|
|
954457baf9 | ||
|
|
f1b8cb6289 | ||
|
|
2e79331ac0 | ||
|
|
7d37ba8e63 | ||
|
|
478601a07b | ||
|
|
d07e50e54a | ||
|
|
9cf727affb | ||
|
|
dde4e1b094 | ||
|
|
ac52dca2ba | ||
|
|
5140d2419c | ||
|
|
9ef860c58c | ||
|
|
6b77d746e1 | ||
|
|
b37dff78c1 | ||
|
|
103eb015c0 | ||
|
|
3d0413417d | ||
|
|
5d5b5a4242 | ||
|
|
6104a20928 | ||
|
|
4632c037e3 | ||
|
|
75bdb75689 | ||
|
|
af838a5d52 | ||
|
|
69ae2a0f03 | ||
|
|
d4e8db78c9 | ||
|
|
22306f855b | ||
|
|
0657f97bc5 | ||
|
|
09bc3f7033 | ||
|
|
ba261e8e87 | ||
|
|
c3f8318a3f | ||
|
|
231fd112f9 | ||
|
|
9a6a7030e8 | ||
|
|
e91f967003 | ||
|
|
633171eda9 | ||
|
|
b9722ec356 | ||
|
|
f1e62884ba | ||
|
|
54a1d7e517 | ||
|
|
c6cce703b5 | ||
|
|
f19e2665d3 | ||
|
|
96d441c29a | ||
|
|
72dfeb60e2 | ||
|
|
1b8701ee3d | ||
|
|
83d22bd1f6 | ||
|
|
861c6c226a | ||
|
|
b0bd6fc251 | ||
|
|
16a75f3cbf | ||
|
|
ee48919fcc | ||
|
|
fa313109d6 | ||
|
|
00dd4a5b56 | ||
|
|
ac555b905c | ||
|
|
5990382222 | ||
|
|
c7e670b85f | ||
|
|
86e88cf233 | ||
|
|
6781fbdf4b | ||
|
|
a038d4aad3 | ||
|
|
17c92b0a7a | ||
|
|
50dde26caf | ||
|
|
6fa73194d5 | ||
|
|
49c4458a25 | ||
|
|
02563b1911 | ||
|
|
54e89ec231 | ||
|
|
f6f92fd671 | ||
|
|
48d6b3d84c | ||
|
|
aafa141509 | ||
|
|
d6ed36f134 | ||
|
|
14d2bc5415 | ||
|
|
4fa1fa29ae | ||
|
|
6fbc88e2a0 | ||
|
|
87ff0e4ee2 | ||
|
|
847fdd28f7 | ||
|
|
01e71bb26c | ||
|
|
ce00b07d6b | ||
|
|
363a6cc4cd | ||
|
|
180af1f9a5 | ||
|
|
6802927d5c | ||
|
|
909827f9ee | ||
|
|
293c1ff559 | ||
|
|
7b647d920a | ||
|
|
e95d2eea7f | ||
|
|
77b454d1b2 | ||
|
|
8d076e6525 | ||
|
|
af5bfc68cc | ||
|
|
1a4e52416f | ||
|
|
d162c9a16d | ||
|
|
f4cd60dbb4 | ||
|
|
d0ba759e2c | ||
|
|
3f84674ae3 | ||
|
|
3e05a7babe | ||
|
|
5940356ced | ||
|
|
cc71607cb8 | ||
|
|
405a099384 | ||
|
|
92dd14e77c | ||
|
|
3f2bb8a029 | ||
|
|
e2f55284cf | ||
|
|
8a45e47c4c | ||
|
|
4dd7110019 | ||
|
|
881b147ab5 | ||
|
|
d40bb9d13a | ||
|
|
688c125ec3 | ||
|
|
06cc962945 | ||
|
|
88760a8a81 | ||
|
|
aa4247d47b | ||
|
|
81b4fa2fbd | ||
|
|
9aac3677ed | ||
|
|
41aa17e389 | ||
|
|
84d939b69a | ||
|
|
60ba166da0 | ||
|
|
1f5d09b497 | ||
|
|
eb23b011d0 | ||
|
|
03d0f99e6c | ||
|
|
694c4505cd | ||
|
|
28e5ec7db6 | ||
|
|
b6bc736eee | ||
|
|
fe84f70800 | ||
|
|
c77055a803 | ||
|
|
3b426fffa1 | ||
|
|
782009ca67 | ||
|
|
e1f2905dbc | ||
|
|
ca58c3ae9a | ||
|
|
dd6950d635 | ||
|
|
c3cb435cf4 | ||
|
|
75eea66ef7 | ||
|
|
251211e714 | ||
|
|
e313582726 | ||
|
|
a06189323f | ||
|
|
93f06f4469 | ||
|
|
6c973cf9a2 | ||
|
|
e393e2694c | ||
|
|
ef51b5aacd | ||
|
|
905633199c | ||
|
|
4d289b8084 | ||
|
|
85a2a91729 | ||
|
|
947e3f8405 | ||
|
|
a6d654980e | ||
|
|
2fae9f1746 | ||
|
|
5eb2064b63 | ||
|
|
7f433932f6 | ||
|
|
2e9301202d | ||
|
|
175931c905 | ||
|
|
18f61eeeeb | ||
|
|
372bf74334 | ||
|
|
f9f1724b36 | ||
|
|
cd51753d86 | ||
|
|
f227a5d1ff | ||
|
|
5ddcd8fea9 | ||
|
|
fe4e51b427 | ||
|
|
3aaf8c0544 | ||
|
|
76130df460 | ||
|
|
da6df4adde | ||
|
|
1ddccee9d3 | ||
|
|
48570b93a6 | ||
|
|
025b74f7c7 | ||
|
|
51043c29db | ||
|
|
553caf0d2c | ||
|
|
87e417c1a1 | ||
|
|
e95eb57666 | ||
|
|
3a9a817f67 | ||
|
|
277effbc04 | ||
|
|
9f102b5b85 | ||
|
|
642792b1c2 | ||
|
|
ef5af05366 | ||
|
|
439a4360b3 | ||
|
|
321bff2cd5 | ||
|
|
d252076f75 | ||
|
|
eb3390224b | ||
|
|
adab48a862 | ||
|
|
11048e958a | ||
|
|
f87dbfe42e | ||
|
|
dd36d764b7 | ||
|
|
2b41b2d12b | ||
|
|
6f566fc406 | ||
|
|
9cd23041f3 | ||
|
|
f5125db22b | ||
|
|
08d2d4c09b | ||
|
|
d425f04462 | ||
|
|
39180cad0e | ||
|
|
79af33ce68 | ||
|
|
a3380d8151 | ||
|
|
e3e6c33969 | ||
|
|
d39298874a | ||
|
|
b794cb03e1 | ||
|
|
c7f27e3c87 | ||
|
|
e86259d193 | ||
|
|
6ca1315df1 | ||
|
|
b807564e68 | ||
|
|
c091b78af6 | ||
|
|
e359627a36 | ||
|
|
f22a5b57f7 | ||
|
|
883924f1e8 | ||
|
|
11b8f6eb00 | ||
|
|
f6830a72ec | ||
|
|
ae3ae231d0 | ||
|
|
d4dd40b364 | ||
|
|
f3d3725e39 | ||
|
|
e90011ea91 | ||
|
|
f42b2cef2a | ||
|
|
ddefa6b172 | ||
|
|
9a3cd17eb7 | ||
|
|
df0ddd7b9b | ||
|
|
fdaffbc402 | ||
|
|
5cb63f12bd | ||
|
|
d87bc3c2f0 | ||
|
|
b30e837f58 | ||
|
|
870ad938f7 | ||
|
|
c37a94290c | ||
|
|
60c1da90cc | ||
|
|
6f003899fe | ||
|
|
75f7e5328a | ||
|
|
e08e6f2733 | ||
|
|
87df69042c | ||
|
|
2aed8b1bdf | ||
|
|
0ceb73f34c | ||
|
|
e645e12652 | ||
|
|
898f354492 | ||
|
|
4655526dd7 | ||
|
|
c899e77701 | ||
|
|
ad32d6ed76 | ||
|
|
713ccc8bb6 | ||
|
|
b37682866b | ||
|
|
9224a1a6c2 | ||
|
|
8248b84e17 | ||
|
|
7962f209ac | ||
|
|
afacee3f07 | ||
|
|
e8326222de | ||
|
|
b52ee10fc7 | ||
|
|
aff6cc9141 | ||
|
|
0db2f11f15 | ||
|
|
810eabe0ef | ||
|
|
c8259f4fec | ||
|
|
d3bb4906d1 | ||
|
|
ec63738e5c | ||
|
|
dcd5ea5b91 | ||
|
|
d8c2bafa2c | ||
|
|
f7c3a98827 | ||
|
|
d5619e30fe | ||
|
|
4307d0a739 | ||
|
|
12b3b1ee00 | ||
|
|
e40a0e13a8 | ||
|
|
a1021c091c | ||
|
|
a6754db559 | ||
|
|
c3cfa1176e | ||
|
|
bce26daa76 | ||
|
|
ca227dbb84 | ||
|
|
54ad113891 | ||
|
|
7d767c4cb9 | ||
|
|
f3ea1d46e1 | ||
|
|
786549398b | ||
|
|
ae5de56339 | ||
|
|
b4542dd058 | ||
|
|
b77f43bb11 | ||
|
|
3d91df2489 | ||
|
|
a0d8d381c1 | ||
|
|
9c0541d0e4 | ||
|
|
bee240eab0 | ||
|
|
4d067d1cdf | ||
|
|
4acb728d29 | ||
|
|
7b249ac174 | ||
|
|
06e049afdf | ||
|
|
b223689153 | ||
|
|
d90b82d5ce | ||
|
|
7bfc449085 | ||
|
|
f350cdd7cc | ||
|
|
3643909840 | ||
|
|
9365f75b61 | ||
|
|
4d73d1039b | ||
|
|
edb446d267 | ||
|
|
20d27150a6 | ||
|
|
1c1cbe4444 | ||
|
|
3749d89fa6 | ||
|
|
9deff281ee | ||
|
|
3d9106c78b | ||
|
|
e49e2ac11d | ||
|
|
1c6c9f56e9 | ||
|
|
0fb466009e | ||
|
|
a066019d75 | ||
|
|
543bde3f26 | ||
|
|
096c6ef84f | ||
|
|
2948220674 | ||
|
|
e5aed17b9d | ||
|
|
ef765324c9 | ||
|
|
eea17e30ab | ||
|
|
556b19bf28 | ||
|
|
e1420101e1 | ||
|
|
5d3ba90d87 | ||
|
|
530c3b8f01 | ||
|
|
1203f8d384 | ||
|
|
1215212601 | ||
|
|
3e6eaa5776 | ||
|
|
465fa239eb | ||
|
|
5e5a852fe0 | ||
|
|
17d857c579 | ||
|
|
d9bef75f08 | ||
|
|
baa549af6a | ||
|
|
ce04b407d9 | ||
|
|
b6a444f634 | ||
|
|
efc68f3008 | ||
|
|
9a89f0e222 | ||
|
|
c5d4ce7c51 | ||
|
|
90f77cbdf1 | ||
|
|
3eb5ddf1da | ||
|
|
a30f4dce67 | ||
|
|
feac96c8b3 | ||
|
|
5a1359a5e8 | ||
|
|
edb3e7b8d2 | ||
|
|
67ced52076 | ||
|
|
5b6755494d | ||
|
|
7d527f91fd | ||
|
|
24d6b91453 | ||
|
|
ef52a3851a | ||
|
|
9576a35d02 | ||
|
|
4d14a84353 | ||
|
|
7854b03fa2 | ||
|
|
2445b5d59b | ||
|
|
9d87e5b616 | ||
|
|
0899e9d020 | ||
|
|
f3e40e67d4 | ||
|
|
5ffb8a5035 | ||
|
|
d531e7af51 | ||
|
|
b026d900d3 | ||
|
|
cc28ac83dd | ||
|
|
7a84646588 | ||
|
|
83740bf7d7 | ||
|
|
84a0e08557 | ||
|
|
1df48c6782 | ||
|
|
879e7b7112 | ||
|
|
fc30e5e704 | ||
|
|
f49e4099fe | ||
|
|
de08e1a143 | ||
|
|
b0a23df7d6 | ||
|
|
ae9ebe2176 | ||
|
|
3985945f96 | ||
|
|
a51afb0e46 | ||
|
|
da0251a1f4 | ||
|
|
4576880f96 | ||
|
|
10423ea0ca | ||
|
|
25a166a77a | ||
|
|
99a897fb41 | ||
|
|
40a90d5fce | ||
|
|
e66310792a | ||
|
|
9837f0e993 | ||
|
|
3f624f6af0 | ||
|
|
9d432523a6 | ||
|
|
7f3849495a | ||
|
|
d984134999 | ||
|
|
f4a64c89a2 | ||
|
|
6fec8f2b6c | ||
|
|
1451fc7537 | ||
|
|
178c9d17be | ||
|
|
a4b2c694ce | ||
|
|
ff8b3d5c27 | ||
|
|
511ae7efcb | ||
|
|
5aedb72b9c | ||
|
|
364b4e65bf | ||
|
|
e038969b66 | ||
|
|
46d59bb7db | ||
|
|
30cce986ca | ||
|
|
4fdc61a1f6 | ||
|
|
120806ee03 | ||
|
|
bc309ba006 | ||
|
|
629aea4b6a | ||
|
|
5df2af1808 | ||
|
|
f8a7412ae3 | ||
|
|
eaad662c18 | ||
|
|
ccf567f6a8 | ||
|
|
796370fa55 | ||
|
|
96b80a42ae | ||
|
|
479247a5f0 | ||
|
|
e882c87033 | ||
|
|
2239eb3a90 | ||
|
|
ce1b091802 | ||
|
|
ce9c1b59e5 | ||
|
|
d462ed2dd9 | ||
|
|
2a7d240b80 | ||
|
|
ec7356be4c | ||
|
|
631b9cae2e | ||
|
|
88caedc3ce | ||
|
|
dc7946e162 | ||
|
|
e21761aab7 | ||
|
|
a19bc41c3a | ||
|
|
a78ce452f2 | ||
|
|
438dbba007 | ||
|
|
6c33026c8c | ||
|
|
0fc4d3ef81 | ||
|
|
bb933cb954 | ||
|
|
b523637e3b | ||
|
|
ae0f696f21 | ||
|
|
e1e66d9209 | ||
|
|
84ad8e1eae | ||
|
|
8602bafbb8 | ||
|
|
b12a433518 | ||
|
|
8f8776b56b | ||
|
|
12fbbf9df9 | ||
|
|
7a69ce0ac4 | ||
|
|
7b07b1df54 | ||
|
|
a182a5bf20 | ||
|
|
097fff3b0d | ||
|
|
574c6392d0 | ||
|
|
b14bccc65d | ||
|
|
ac8cf85039 | ||
|
|
85461b74b3 | ||
|
|
30e195d456 | ||
|
|
a23d9c4dac | ||
|
|
965d3fae6a | ||
|
|
8088657ecc | ||
|
|
b2f6161a18 | ||
|
|
c258128087 | ||
|
|
1a13ddd24b | ||
|
|
aeafdad0a9 | ||
|
|
ae0658c370 | ||
|
|
3c37f824cc | ||
|
|
cb4d5ce631 | ||
|
|
167878d3af | ||
|
|
32860a2742 | ||
|
|
c9bc915417 | ||
|
|
79bc1e0416 | ||
|
|
1e95b894cf | ||
|
|
e0d5199463 | ||
|
|
e7c416995e | ||
|
|
ac8ac73e77 | ||
|
|
4f5ae9bf24 | ||
|
|
afdd59e358 | ||
|
|
6ff9d841db | ||
|
|
28add0c150 | ||
|
|
8b0dc386ba | ||
|
|
cc2747afa8 | ||
|
|
d103b73dba | ||
|
|
2475fa8cb8 | ||
|
|
921b0dfdea | ||
|
|
1876fe215d | ||
|
|
78c295898e | ||
|
|
449998d358 | ||
|
|
203f1d691d | ||
|
|
8e6d7429e9 | ||
|
|
d5ac687adb | ||
|
|
cb121886a4 | ||
|
|
036b676c8b | ||
|
|
43218725b3 | ||
|
|
64c45c10a9 | ||
|
|
1a75f270bd | ||
|
|
b90a2e051c | ||
|
|
4ce715f36a | ||
|
|
2d75729976 | ||
|
|
72deb9db89 | ||
|
|
d81f257f99 | ||
|
|
aa14feed8b | ||
|
|
e7fc2e1e1d | ||
|
|
527e79c3a8 | ||
|
|
88f9f54d4c | ||
|
|
1eefaec471 | ||
|
|
93ce80a916 | ||
|
|
4d978a00ed | ||
|
|
6f4eba042c | ||
|
|
a0be72dbca | ||
|
|
f378b48b06 | ||
|
|
ea9a0277a2 | ||
|
|
c5d0535121 | ||
|
|
76526242c0 | ||
|
|
4c26d23f06 | ||
|
|
5c3377f2e1 | ||
|
|
844792f3bb | ||
|
|
ab2c6de1ed | ||
|
|
aee8588fbc | ||
|
|
eeee744ee2 | ||
|
|
63b29d841b | ||
|
|
9fb3d5754a | ||
|
|
a16eb9ac30 | ||
|
|
ed8932a4eb | ||
|
|
5533596329 | ||
|
|
93160df498 | ||
|
|
e9b9864f56 | ||
|
|
23becaa71a | ||
|
|
ebfa9b6f2d | ||
|
|
73229a7e53 | ||
|
|
f4618fc2d9 | ||
|
|
ad8dae7587 | ||
|
|
806babb932 | ||
|
|
f736321295 | ||
|
|
a0beeb8a76 | ||
|
|
0f06bb38e8 | ||
|
|
9522e37880 | ||
|
|
00e1068c03 | ||
|
|
4207c3d5c3 | ||
|
|
f0f2ee57f9 | ||
|
|
50cafc9f13 | ||
|
|
f365be7f4d | ||
|
|
0219b700b1 | ||
|
|
a70ce8697c | ||
|
|
7a5be2cdbd | ||
|
|
ef7bbf24e8 | ||
|
|
4531aa608d | ||
|
|
bc3ff73062 | ||
|
|
a3f8bc6993 | ||
|
|
bc7cadbfec | ||
|
|
ab239a3b1f | ||
|
|
7157c6b878 | ||
|
|
0cdcbf3481 | ||
|
|
9006753369 | ||
|
|
6b52bc1a64 | ||
|
|
3836fc2905 | ||
|
|
01f2b842e8 | ||
|
|
b22a59093e | ||
|
|
f101fd4d8b | ||
|
|
bacd42baab | ||
|
|
4a8099f371 | ||
|
|
5f45d1454b | ||
|
|
b1ee845c02 | ||
|
|
64383b33bd | ||
|
|
2aa92d31a0 | ||
|
|
feee6ec002 | ||
|
|
b22f30259b | ||
|
|
85ff1f33c9 | ||
|
|
a4e76a1c02 | ||
|
|
7b6d022905 | ||
|
|
4335a4f475 | ||
|
|
3e26e1b26d | ||
|
|
93374294e8 | ||
|
|
44a73b3640 | ||
|
|
853e484a64 | ||
|
|
e2e526bea8 | ||
|
|
c5bb0bc339 | ||
|
|
028b789aec | ||
|
|
bb6cdd342a | ||
|
|
a89453a9e9 | ||
|
|
119e80fb28 | ||
|
|
6d3452eeac | ||
|
|
e38c5076fe | ||
|
|
6f1b4d55a4 | ||
|
|
8b7cf2c7eb | ||
|
|
0bc040dc40 | ||
|
|
fb722eca56 | ||
|
|
699ec9db36 | ||
|
|
f72344d643 | ||
|
|
999de87fbf | ||
|
|
48ae5e307e | ||
|
|
80303ffb39 | ||
|
|
7468d97286 | ||
|
|
d24ee59fb5 | ||
|
|
f2fd360d01 | ||
|
|
af613a176f | ||
|
|
9ed6390f05 | ||
|
|
259828fa5f | ||
|
|
a60681c2f3 | ||
|
|
b9b527183a | ||
|
|
446587dc91 | ||
|
|
31c68fa4e7 | ||
|
|
f9e3b4dd74 | ||
|
|
8bf1d3fbf1 | ||
|
|
298667e221 | ||
|
|
129d7aee61 | ||
|
|
92f5f9afc6 | ||
|
|
f3b81a9854 | ||
|
|
7561d600a6 | ||
|
|
7030b2b274 |
@@ -48,9 +48,11 @@ libtommath/*.tex
|
||||
macosx/configure
|
||||
unix/autoMkindex.tcl
|
||||
unix/dltest.marker
|
||||
unix/dltest/embtest
|
||||
unix/dltest/*.bundle
|
||||
unix/dltest/*.dll
|
||||
unix/dltest/*.dylib
|
||||
unix/dltest/*.exe
|
||||
unix/dltest/*.o
|
||||
unix/dltest/*.sl
|
||||
unix/dltest/*.so
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -29,6 +29,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -39,23 +40,30 @@ jobs:
|
||||
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
env:
|
||||
CFGOPT: ${{ matrix.cfgopt }}
|
||||
timeout-minutes: 5
|
||||
- name: Build
|
||||
run: |
|
||||
make all
|
||||
timeout-minutes: 5
|
||||
- name: Build Test Harness
|
||||
run: |
|
||||
make tcltest
|
||||
timeout-minutes: 5
|
||||
- name: Run Tests
|
||||
run: |
|
||||
make test
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
timeout-minutes: 30
|
||||
- name: Test-Drive Installation
|
||||
run: |
|
||||
make install
|
||||
timeout-minutes: 5
|
||||
- name: Create Distribution Package
|
||||
run: |
|
||||
make dist
|
||||
timeout-minutes: 5
|
||||
- name: Convert Documentation to HTML
|
||||
run: |
|
||||
make html-tcl
|
||||
timeout-minutes: 5
|
||||
|
||||
@@ -19,6 +19,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -27,11 +28,13 @@ jobs:
|
||||
run: make all
|
||||
env:
|
||||
CFLAGS: -arch x86_64 -arch arm64
|
||||
timeout-minutes: 15
|
||||
- name: Run Tests
|
||||
run: make test styles=develop
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
MAC_CI: 1
|
||||
timeout-minutes: 15
|
||||
clang:
|
||||
runs-on: macos-11
|
||||
strategy:
|
||||
@@ -49,6 +52,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -60,14 +64,17 @@ jobs:
|
||||
env:
|
||||
CFLAGS: -arch x86_64 -arch arm64
|
||||
CFGOPT: ${{ matrix.cfgopt }}
|
||||
timeout-minutes: 5
|
||||
- name: Build
|
||||
run: |
|
||||
make all tcltest
|
||||
env:
|
||||
CFLAGS: -arch x86_64 -arch arm64
|
||||
timeout-minutes: 15
|
||||
- name: Run Tests
|
||||
run: |
|
||||
make test
|
||||
env:
|
||||
ERROR_ON_FAILURES: 1
|
||||
MAC_CI: 1
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -15,6 +15,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -50,6 +51,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -112,6 +114,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CC: gcc
|
||||
CFGOPT: --disable-symbols --disable-shared
|
||||
|
||||
@@ -31,26 +31,31 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Init MSVC
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
timeout-minutes: 5
|
||||
- name: Build ${{ matrix.cfgopt }}
|
||||
run: |
|
||||
&nmake -f makefile.vc ${{ matrix.cfgopt }} all
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
timeout-minutes: 5
|
||||
- name: Build Test Harness ${{ matrix.cfgopt }}
|
||||
run: |
|
||||
&nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
timeout-minutes: 5
|
||||
- name: Run Tests ${{ matrix.cfgopt }}
|
||||
run: |
|
||||
&nmake -f makefile.vc ${{ matrix.cfgopt }} test
|
||||
if ($lastexitcode -ne 0) {
|
||||
throw "nmake exit code: $lastexitcode"
|
||||
}
|
||||
timeout-minutes: 30
|
||||
gcc:
|
||||
runs-on: windows-2022
|
||||
defaults:
|
||||
@@ -74,8 +79,10 @@ jobs:
|
||||
with:
|
||||
msystem: MINGW64
|
||||
install: git mingw-w64-x86_64-toolchain make
|
||||
timeout-minutes: 10
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -86,12 +93,16 @@ jobs:
|
||||
./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1)
|
||||
env:
|
||||
CFGOPT: --enable-64bit ${{ matrix.cfgopt }}
|
||||
timeout-minutes: 5
|
||||
- name: Build
|
||||
run: make all
|
||||
timeout-minutes: 5
|
||||
- name: Build Test Harness
|
||||
run: make tcltest
|
||||
timeout-minutes: 5
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
timeout-minutes: 30
|
||||
|
||||
# If you add builds with Wine, be sure to define the environment variable
|
||||
# CI_USING_WINE when running them so that broken tests know not to run.
|
||||
|
||||
@@ -53,6 +53,7 @@ libtommath/*.tex
|
||||
macosx/configure
|
||||
unix/autoMkindex.tcl
|
||||
unix/dltest.marker
|
||||
unix/dltest/embtest
|
||||
unix/tcl.pc
|
||||
unix/tclIndex
|
||||
unix/pkgs/*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tcl8</name>
|
||||
<name>tcl9</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
|
||||
+6
-31
@@ -20,13 +20,13 @@ jobs:
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=unix
|
||||
- name: "Linux/GCC/Shared: UTF_MAX=4"
|
||||
- name: "Linux/GCC/Shared: UTF_MAX=3"
|
||||
os: linux
|
||||
dist: focal
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=unix
|
||||
- CFGOPT=CFLAGS=-DTCL_UTF_MAX=4
|
||||
- CFGOPT="CFLAGS=-DTCL_UTF_MAX=3"
|
||||
- name: "Linux/GCC/Shared: NO_DEPRECATED"
|
||||
os: linux
|
||||
dist: focal
|
||||
@@ -83,13 +83,6 @@ jobs:
|
||||
compiler: clang
|
||||
env:
|
||||
- BUILD_DIR=unix
|
||||
- name: "Linux/Clang/Shared:NO_DEPRECATED"
|
||||
os: linux
|
||||
dist: xenial
|
||||
compiler: clang
|
||||
env:
|
||||
- BUILD_DIR=unix
|
||||
- CFGOPT="CFLAGS=-DTCL_NO_DEPRECATED=1"
|
||||
- name: "Linux/Clang/Static"
|
||||
os: linux
|
||||
dist: focal
|
||||
@@ -215,15 +208,6 @@ jobs:
|
||||
script:
|
||||
- cmd.exe //C vcvarsall.bat x64 '&&' nmake '-f' makefile.vc all tcltest
|
||||
- cmd.exe //C vcvarsall.bat x64 '&&' nmake '-f' makefile.vc test
|
||||
- name: "Windows/MSVC/Shared: UTF_MAX=4"
|
||||
os: windows
|
||||
compiler: cl
|
||||
env: *vcenv
|
||||
before_install: *vcpreinst
|
||||
install: []
|
||||
script:
|
||||
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=utf16' '-f' makefile.vc all tcltest
|
||||
- cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=utf16' '-f' makefile.vc test
|
||||
- name: "Windows/MSVC/Shared: NO_DEPRECATED"
|
||||
os: windows
|
||||
compiler: cl
|
||||
@@ -270,15 +254,6 @@ jobs:
|
||||
script:
|
||||
- cmd.exe //C vcvarsall.bat x86 '&&' nmake '-f' makefile.vc all tcltest
|
||||
- cmd.exe //C vcvarsall.bat x86 '&&' nmake '-f' makefile.vc test
|
||||
- name: "Windows/MSVC-x86/Shared: UTF_MAX=4"
|
||||
os: windows
|
||||
compiler: cl
|
||||
env: *vcenv
|
||||
before_install: *vcpreinst
|
||||
install: []
|
||||
script:
|
||||
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=utf16' '-f' makefile.vc all tcltest
|
||||
- cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=utf16' '-f' makefile.vc test
|
||||
- name: "Windows/MSVC-x86/Shared: NO_DEPRECATED"
|
||||
os: windows
|
||||
compiler: cl
|
||||
@@ -326,12 +301,12 @@ jobs:
|
||||
- touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
|
||||
- choco install -y make zip
|
||||
- cd ${BUILD_DIR}
|
||||
- name: "Windows/GCC/Shared: UTF_MAX=4"
|
||||
- name: "Windows/GCC/Shared: UTF_MAX=3"
|
||||
os: windows
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=4"
|
||||
- CFGOPT="--enable-64bit CFLAGS=-DTCL_UTF_MAX=3"
|
||||
before_install: *makepreinst
|
||||
- name: "Windows/GCC/Shared: NO_DEPRECATED"
|
||||
os: windows
|
||||
@@ -368,12 +343,12 @@ jobs:
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
before_install: *makepreinst
|
||||
- name: "Windows/GCC-x86/Shared: UTF_MAX=4"
|
||||
- name: "Windows/GCC-x86/Shared: UTF_MAX=3"
|
||||
os: windows
|
||||
compiler: gcc
|
||||
env:
|
||||
- BUILD_DIR=win
|
||||
- CFGOPT="CFLAGS=-DTCL_UTF_MAX=4"
|
||||
- CFGOPT="CFLAGS=-DTCL_UTF_MAX=3"
|
||||
before_install: *makepreinst
|
||||
- name: "Windows/GCC-x86/Shared: NO_DEPRECATED"
|
||||
os: windows
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
# README: Tcl
|
||||
|
||||
This is the **Tcl 8.7a6** source distribution.
|
||||
This is the **Tcl 9.0a4** source distribution.
|
||||
|
||||
You can get any source release of Tcl from [our distribution
|
||||
site](https://sourceforge.net/projects/tcl/files/Tcl/).
|
||||
|
||||
8.6 (production release, daily build)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch)
|
||||
<br>
|
||||
8.7 (in development, daily build))
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-branch)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-branch)
|
||||
<br>
|
||||
9.0 (in development, daily build))
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Amain)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Amain)
|
||||
[](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Amain)
|
||||
|
||||
## Contents
|
||||
1. [Introduction](#intro)
|
||||
@@ -45,7 +56,7 @@ and selling it either in whole or in part. See the file
|
||||
## <a id="doc">2.</a> Documentation
|
||||
Extensive documentation is available on our website.
|
||||
The home page for this release, including new features, is
|
||||
[here](https://www.tcl-lang.org/software/tcltk/8.7.html).
|
||||
[here](https://www.tcl-lang.org/software/tcltk/9.0.html).
|
||||
Detailed release notes can be found at the
|
||||
[file distributions page](https://sourceforge.net/projects/tcl/files/Tcl/)
|
||||
by clicking on the relevant version.
|
||||
@@ -55,8 +66,8 @@ Xchange](https://www.tcl-lang.org/about/).
|
||||
There have been many Tcl books on the market. Many are mentioned in
|
||||
[the Wiki](https://wiki.tcl-lang.org/_/ref?N=25206).
|
||||
|
||||
The complete set of reference manual entries for Tcl 8.7 is [online,
|
||||
here](https://www.tcl-lang.org/man/tcl8.7/).
|
||||
The complete set of reference manual entries for Tcl 9.0 is [online,
|
||||
here](https://www.tcl-lang.org/man/tcl9.0/).
|
||||
|
||||
### <a id="doc.unix">2a.</a> Unix Documentation
|
||||
The `doc` subdirectory in this release contains a complete set of
|
||||
|
||||
@@ -4976,7 +4976,7 @@ msgcat package (duperval, krone, nelson)
|
||||
trace {add|remove|list} {variable|command} name ops command
|
||||
(darley, melski)
|
||||
|
||||
2000-09-06 (cross-platform feature) Set ^Z (\32) as default EOF char. (hobbs)
|
||||
2000-09-06 (cross-platform feature) Set ^Z (\x1A) as default EOF char. (hobbs)
|
||||
|
||||
2000-09-07 partial fix for bug 2460 to prevent exec mem leak on Windows for the
|
||||
common case (gravereaux)
|
||||
@@ -9123,6 +9123,26 @@ in this changeset (new minor version) rather than bug fixes:
|
||||
|
||||
- Released 8.7a3, Nov 21, 2019 --- https://core.tcl-lang.org/tcl/ for details -
|
||||
|
||||
Changes to 9.0a1 include all changes to the 8.7 line through 8.7a3,
|
||||
plus the following, which focuses on the high-level feature changes
|
||||
in this changeset (new minor version) rather than bug fixes:
|
||||
|
||||
2017-11-03 [TIP 114] Leading zero integer no longer means octal
|
||||
|
||||
2017-11-03 [TIP 278] Revise variable name resolution, solve "Creative Writing"
|
||||
|
||||
2017-11-03 [TIPs 330,336] Encapsulate struct Tcl_Interp
|
||||
|
||||
2017-11-17 [TIP 422] Remove all Tcl_*VA() routines
|
||||
|
||||
2017-12-15 [TIP 488] Disable magic $::tcl_precision
|
||||
|
||||
2018-10-08 [TIP 494] Increased support for size_t value ranges
|
||||
|
||||
2019-05-31 [TIP 537] 64-bit indices in regexp matching
|
||||
|
||||
- Released 9.0a1, Nov 25, 2019 --- https://core.tcl-lang.org/tcl/ for details -
|
||||
|
||||
2019-12-03 (bug)[3cd9be] Corner case in surrogate handling (nijtmans)
|
||||
|
||||
2019-12-09 (new) Add tcltest::(Setup|Eval|Cleanup|)Test (coulter,sebres)
|
||||
@@ -9330,6 +9350,24 @@ in this changeset (new minor version) rather than bug fixes:
|
||||
|
||||
- Released 8.7a5, Jun 18, 2021 --- https://core.tcl-lang.org/tcl/ for details -
|
||||
|
||||
Changes to 9.0a3 include all changes to the 8.7 line through 8.7a5,
|
||||
plus the following, which focuses on the high-level feature changes
|
||||
in this changeset (new major version) rather than bug fixes:
|
||||
|
||||
Many of the TIPs in Tcl 8.7 mentioned above are extended further in 9.0
|
||||
|
||||
2020-02-28 [TIP 497] Full support for Unicode planes 1-16
|
||||
|
||||
2020-08-21 (bug)[43b434] improper calls to stat64()
|
||||
|
||||
2021-04-08 [TIP 595] Unicode-aware loadable library handling.
|
||||
|
||||
2021-04-30 [TIP 596] Stubs support for embedding Tcl in apps
|
||||
|
||||
Many internal changes to broaden support for sizes beyond 32-bits.
|
||||
|
||||
- Released 9.0a3, Jun 23, 2021 --- https://core.tcl-lang.org/tcl/ for details -
|
||||
|
||||
2021-02-02 (new) support for MacOS Big Sur updates (nijtmans)
|
||||
=> platform 1.0.17
|
||||
|
||||
|
||||
+2
-2
@@ -100,7 +100,7 @@ waitpid(
|
||||
} else {
|
||||
prevPtr->nextPtr = waitPtr->nextPtr;
|
||||
}
|
||||
ckfree(waitPtr);
|
||||
Tcl_Free(waitPtr);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ waitpid(
|
||||
goto waitAgain;
|
||||
}
|
||||
}
|
||||
waitPtr = (WaitInfo *) attemptckalloc(sizeof(WaitInfo));
|
||||
waitPtr = (WaitInfo *) Tcl_AttemptAlloc(sizeof(WaitInfo));
|
||||
if (!waitPtr) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
|
||||
+4
-15
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -30,8 +30,6 @@ int
|
||||
.sp
|
||||
\fBTcl_SetErrorCode\fR(\fIinterp, element, element, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_GetErrorLine\fR(\fIinterp\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorLine\fR(\fIinterp, lineNum\fR)
|
||||
@@ -60,7 +58,7 @@ unless \fIlength\fR is negative.
|
||||
.AP Tcl_Obj *objPtr in
|
||||
A message to be appended to the \fB\-errorinfo\fR return option
|
||||
in the form of a Tcl_Obj value.
|
||||
.AP int length in
|
||||
.AP Tcl_Size length in
|
||||
The number of bytes to copy from \fImessage\fR when
|
||||
appending to the \fB\-errorinfo\fR return option.
|
||||
If negative, all bytes up to the first null byte are used.
|
||||
@@ -69,17 +67,14 @@ The \fB\-errorcode\fR return option will be set to this value.
|
||||
.AP "const char" *element in
|
||||
String to record as one element of the \fB\-errorcode\fR return option.
|
||||
Last \fIelement\fR argument must be NULL.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
.AP int lineNum
|
||||
The line number of a script where an error occurred.
|
||||
.AP "const char" *script in
|
||||
Pointer to first character in script containing command (must be <= command)
|
||||
.AP "const char" *command in
|
||||
Pointer to first character in command that generated the error
|
||||
.AP int commandLength in
|
||||
Number of bytes in command; -1 means use all bytes up to first null byte
|
||||
.AP Tcl_Size commandLength in
|
||||
Number of bytes in command; a negative value means use all bytes up to first null byte
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -244,12 +239,6 @@ The procedure \fBTcl_SetErrorCode\fR is also used to set the
|
||||
\fB\-errorcode\fR return option. However, it takes one or more strings to
|
||||
record instead of a value. Otherwise, it is similar to
|
||||
\fBTcl_SetObjErrorCode\fR in behavior.
|
||||
.PP
|
||||
\fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
Interfaces using argument lists have been found to be nonportable in practice.
|
||||
This function is deprecated and will be removed in Tcl 9.0.
|
||||
|
||||
.PP
|
||||
The procedure \fBTcl_GetErrorLine\fR is used to read the integer value
|
||||
of the \fB\-errorline\fR return option without the overhead of a full
|
||||
|
||||
+14
-30
@@ -4,11 +4,11 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_Alloc 3 7.5 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_Alloc 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, Tcl_GetMemoryInfo, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
|
||||
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, Tcl_GetMemoryInfo \- allocate or free heap memory
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -19,35 +19,20 @@ char *
|
||||
void
|
||||
\fBTcl_Free\fR(\fIptr\fR)
|
||||
.sp
|
||||
char *
|
||||
void *
|
||||
\fBTcl_Realloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
char *
|
||||
void *
|
||||
\fBTcl_AttemptAlloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
char *
|
||||
void *
|
||||
\fBTcl_AttemptRealloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_GetMemoryInfo\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBckalloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
void
|
||||
\fBckfree\fR(\fIptr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBckrealloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBattemptckalloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBattemptckrealloc\fR(\fIptr, size\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *size
|
||||
.AP "unsigned int" size in
|
||||
.AP "size_t" size in
|
||||
Size in bytes of the memory block to allocate.
|
||||
.AP char *ptr in
|
||||
Pointer to memory block to free or realloc.
|
||||
@@ -84,18 +69,17 @@ allocation fails, these functions will return NULL. Note that on some
|
||||
platforms, but not all, attempting to allocate a zero-sized block of
|
||||
memory will also cause these functions to return NULL.
|
||||
.PP
|
||||
The procedures \fBckalloc\fR, \fBckfree\fR, \fBckrealloc\fR,
|
||||
\fBattemptckalloc\fR, and \fBattemptckrealloc\fR are implemented
|
||||
as macros. Normally, they are synonyms for the corresponding
|
||||
procedures documented on this page. When Tcl and all modules
|
||||
calling Tcl are compiled with \fBTCL_MEM_DEBUG\fR defined, however,
|
||||
these macros are redefined to be special debugging versions
|
||||
of these procedures. To support Tcl's memory debugging within a
|
||||
module, use the macros rather than direct calls to \fBTcl_Alloc\fR, etc.
|
||||
When a module or Tcl itself is compiled with \fBTCL_MEM_DEBUG\fR defined,
|
||||
the procedures \fBTcl_Alloc\fR, \fBTcl_Free\fR, \fBTcl_Realloc\fR,
|
||||
\fBTcl_AttemptAlloc\fR, and \fBTcl_AttempRealloc\fR are implemented
|
||||
as macros, redefined to be special debugging versions of these procedures.
|
||||
|
||||
\fBTcl_GetMemoryInfo\fR appends a list-of-lists of memory stats to the
|
||||
provided DString. This function cannot be used in stub-enabled extensions,
|
||||
and it is only available if Tcl is compiled with the threaded memory allocator.
|
||||
and it is only available if Tcl is compiled with the threaded memory allocator
|
||||
When used in stub-enabled embedders, the stubs table must be first initialized
|
||||
using one of \fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR,
|
||||
\fBTcl_FindExecutable\fR or \fBTclZipfs_AppHook\fR.
|
||||
|
||||
.SH KEYWORDS
|
||||
alloc, allocation, free, malloc, memory, realloc, TCL_MEM_DEBUG
|
||||
|
||||
+1
-2
@@ -30,8 +30,7 @@ or \fBTCL_RETURN\fR, then Tcl normally converts this into a \fBTCL_ERROR\fR
|
||||
return with an appropriate message. The particular script
|
||||
evaluation procedures of Tcl that act in the manner are
|
||||
\fBTcl_EvalObjEx\fR, \fBTcl_EvalObjv\fR, \fBTcl_Eval\fR, \fBTcl_EvalEx\fR,
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR, \fBTcl_VarEval\fR and
|
||||
\fBTcl_VarEvalVA\fR.
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR and \fBTcl_VarEval\fR.
|
||||
.PP
|
||||
However, if \fBTcl_AllowExceptions\fR is invoked immediately before
|
||||
calling one of those a procedures, then arbitrary completion
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ Tcl_GetAssocData, Tcl_SetAssocData, Tcl_DeleteAssocData \- manage associations o
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_GetAssocData\fR(\fIinterp, key, delProcPtr\fR)
|
||||
.sp
|
||||
\fBTcl_SetAssocData\fR(\fIinterp, key, delProc, clientData\fR)
|
||||
@@ -31,7 +31,7 @@ Procedure to call when \fIinterp\fR is deleted.
|
||||
.AP Tcl_InterpDeleteProc **delProcPtr in
|
||||
Pointer to location in which to store address of current deletion procedure
|
||||
for association. Ignored if NULL.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value associated with the given key in this
|
||||
interpreter. This data is owned by the caller.
|
||||
.BE
|
||||
@@ -64,7 +64,7 @@ the type \fBTcl_InterpDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_InterpDeleteProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -35,7 +35,7 @@ int
|
||||
.AS Tcl_AsyncHandler clientData
|
||||
.AP Tcl_AsyncProc *proc in
|
||||
Procedure to invoke to handle an asynchronous event.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
One-word value to pass to \fIproc\fR.
|
||||
.AP Tcl_AsyncHandler async in
|
||||
Token for asynchronous event handler.
|
||||
@@ -95,7 +95,7 @@ type \fBTcl_AsyncProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_AsyncProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIcode\fR);
|
||||
.CE
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_Backslash 3 "8.1" Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Backslash \- parse a backslash sequence
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
char
|
||||
\fBTcl_Backslash\fR(\fIsrc, countPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *countPtr out
|
||||
.AP "const char" *src in
|
||||
Pointer to a string starting with a backslash.
|
||||
.AP int *countPtr out
|
||||
If \fIcountPtr\fR is not NULL, \fI*countPtr\fR gets filled
|
||||
in with number of characters in the backslash sequence, including
|
||||
the backslash character.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The use of \fBTcl_Backslash\fR is deprecated in favor of
|
||||
\fBTcl_UtfBackslash\fR.
|
||||
.PP
|
||||
This is a utility procedure provided for backwards compatibility with
|
||||
non-internationalized Tcl extensions. It parses a backslash sequence and
|
||||
returns the low byte of the Unicode character corresponding to the sequence.
|
||||
\fBTcl_Backslash\fR modifies \fI*countPtr\fR to contain the number of
|
||||
characters in the backslash sequence.
|
||||
.PP
|
||||
See the Tcl manual entry for information on the valid backslash sequences.
|
||||
All of the sequences described in the Tcl manual entry are supported by
|
||||
\fBTcl_Backslash\fR.
|
||||
.SH "SEE ALSO"
|
||||
Tcl(n), Tcl_UtfBackslash(3)
|
||||
|
||||
.SH KEYWORDS
|
||||
backslash, parse
|
||||
+22
-37
@@ -4,7 +4,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_ByteArrayObj 3 8.1 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_ByteArrayObj 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
@@ -34,8 +34,8 @@ unsigned char *
|
||||
.AP "const unsigned char" *bytes in
|
||||
The array of bytes used to initialize or set a byte-array value. May be NULL
|
||||
even if \fInumBytes\fR is non-zero.
|
||||
.AP int numBytes in
|
||||
The number of bytes in the array. It must be >= 0.
|
||||
.AP Tcl_Size numBytes in
|
||||
The number of bytes in the array.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
For \fBTcl_SetByteArrayObj\fR, this points to an unshared value to be
|
||||
overwritten by a byte-array value. For \fBTcl_GetBytesFromObj\fR,
|
||||
@@ -43,7 +43,7 @@ overwritten by a byte-array value. For \fBTcl_GetBytesFromObj\fR,
|
||||
to the value from which to extract an array of bytes.
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use for error reporting.
|
||||
.AP "ptrdiff_t | int" *numBytesPtr out
|
||||
.AP "Tcl_Size \&| int" *numBytesPtr out
|
||||
Points to space where the number of bytes in the array may be written.
|
||||
Caller may pass NULL when it does not need this information.
|
||||
.BE
|
||||
@@ -92,11 +92,6 @@ returns a pointer to the created value with a reference count of zero.
|
||||
of the unshared \fIobjPtr\fR as appropriate, and keeps its reference
|
||||
count (0 or 1) unchanged. The value produced by these routines has no
|
||||
string representation. Any memory allocation failure may cause a panic.
|
||||
Note that the type of the \fInumBytes\fR argument is \fBint\fR; consequently
|
||||
the largest byte-array value that can be produced by these routines is one
|
||||
holding \fBINT_MAX\fR bytes. Note also that the string representation of
|
||||
any Tcl value is limited to \fBINT_MAX\fR bytes, so caution should be
|
||||
taken with any byte-array of more than \fBINT_MAX / 2\fR bytes.
|
||||
.PP
|
||||
\fBTcl_GetBytesFromObj\fR performs the opposite function of
|
||||
\fBTcl_SetByteArrayObj\fR, providing access to read a byte-array from
|
||||
@@ -121,29 +116,14 @@ failure, nothing will be written to \fInumBytesPtr\fR, and if
|
||||
the \fIinterp\fR argument is non-NULL, then error messages and
|
||||
codes are left in it recording the error.
|
||||
.PP
|
||||
\fBTcl_GetByteArrayFromObj\fR performs nearly the same function as
|
||||
\fBTcl_GetBytesFromObj\fR. They differ only in the circumstance when
|
||||
a byte-array internal value must be created by transformation of
|
||||
a string representation, and that string representation contains a
|
||||
character with codepoint greater than U+00FF. Instead of failing
|
||||
the conversion, \fBTcl_GetByteArrayFromObj\fR will use the 8 least
|
||||
significant bits of each codepoint to produce a valid byte value
|
||||
from any character codepoint value. In any other circumstance,
|
||||
\fBTcl_GetByteArrayFromObj\fR performs just as \fBTcl_GetBytesFromObj\fR
|
||||
does. Since the conversion cannot fail, \fBTcl_GetByteArrayFromObj\fR
|
||||
has no need for an \fIinterp\fR argument to record any errors and
|
||||
the caller can assume \fBTcl_GetByteArrayFromObj\fR does not return NULL.
|
||||
\fBTcl_GetByteArrayFromObj\fR performs exactly the same function as
|
||||
\fBTcl_GetBytesFromObj\fR does when called with the \fIinterp\fR
|
||||
argument passed the value NULL. This is incompatible with the
|
||||
way \fBTcl_GetByteArrayFromObj\fR functioned in Tcl 8.
|
||||
\fBTcl_GetBytesFromObj\fR is the more capable interface and should
|
||||
usually be favored for use over \fBTcl_GetByteArrayFromObj\fR.
|
||||
.PP
|
||||
\fBTcl_GetByteArrayFromObj\fR must be used with caution. Because of the
|
||||
truncation on conversion, the byte-array made available to the caller
|
||||
cannot reliably complete a round-trip back to the original string
|
||||
representation. This creates opportunities for bugs due to blindness
|
||||
to differences in values. This routine exists in this form primarily
|
||||
for compatibility with codebases written for earlier releases of Tcl.
|
||||
It is expected this routine will incompatibly change in Tcl 9 so that
|
||||
it also signals failed conversions with a NULL return.
|
||||
.PP
|
||||
On success, both \fBTcl_GetBytesFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
|
||||
On success, both \fBTcl_GetByteFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
|
||||
return a pointer into the internal representation of a \fBTcl_Obj\fR.
|
||||
That pointer must not be freed by the caller, and should not be retained
|
||||
for use beyond the known time the internal representation of the value
|
||||
@@ -154,10 +134,14 @@ and any string representation is invalidated.
|
||||
On success, both \fBTcl_GetBytesFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
|
||||
write the number of bytes in the byte-array value of \fIobjPtr\fR
|
||||
to the space pointed to by \fInumBytesPtr\fR. This space may be of type
|
||||
\fBptrdiff_t\fR or of type \fBint\fR. In Tcl 8, the largest number of
|
||||
bytes possible is \fBINT_MAX\fR, so either type can receive the value.
|
||||
In codebases meant to migrate to Tcl 9, the option to write to a space
|
||||
of type \fBptrdiff_t\fR may aid in the migration.
|
||||
\fBTcl_Size\fR or of type \fBint\fR. It is recommended that callers provide
|
||||
a \fBTcl_Size\fR space for this purpose. If the caller provides only
|
||||
an \fBint\fR space and the number of bytes in the byte-array value of
|
||||
\fIobjPtr\fR is greater than \fBINT_MAX\fR, the routine will fail due
|
||||
to being unable to correctly report the byte-array size to the caller.
|
||||
The ability to provide an \fBint\fR space is best considered a migration
|
||||
aid for codebases constrained to continue operating with Tcl releases
|
||||
older than 8.7.
|
||||
.PP
|
||||
\fBTcl_SetByteArrayLength\fR enables a caller to change the size of a
|
||||
byte-array in the internal representation of an unshared \fIobjPtr\fR to
|
||||
@@ -170,8 +154,9 @@ changes the internal representation, \fBTcl_SetByteArrayLength\fR
|
||||
also invalidates any string representation in \fIobjPtr\fR. If resizing
|
||||
grows the byte-array, the new byte values are undefined. If \fIobjPtr\fR
|
||||
does not already possess an internal byte-array, one is produced in the
|
||||
same way that \fBTcl_GetByteArrayFromObj\fR does, with all the cautions
|
||||
that go along with that.
|
||||
same way that \fBTcl_GetBytesFromObj\fR does, also returning NULL
|
||||
when any characters of the value in \fIobjPtr\fR (up to
|
||||
\fInumBytes\fR of them) are not valid bytes.
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
\fBTcl_NewByteArrayObj\fR always returns a zero-reference object, much
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interp
|
||||
Interpreter with which to associated callback.
|
||||
.AP Tcl_InterpDeleteProc *proc in
|
||||
Procedure to call when \fIinterp\fR is deleted.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -38,7 +38,7 @@ type \fBTcl_InterpDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_InterpDeleteProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ OR'ed combination of flag bits that specify additional options.
|
||||
For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently
|
||||
supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and
|
||||
\fBTCL_CANCEL_UNWIND\fR are currently supported.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Currently reserved for future use.
|
||||
It should be set to NULL.
|
||||
.BE
|
||||
|
||||
+3
-6
@@ -32,7 +32,7 @@ Tcl_Channel
|
||||
Interpreter for error reporting.
|
||||
.AP "const Tcl_ChannelType" *typePtr in
|
||||
The new channel I/O procedures to use for \fIchannel\fR.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to channel I/O procedures.
|
||||
.AP int mask in
|
||||
Conditions under which \fIchannel\fR will be used: OR-ed combination of
|
||||
@@ -49,11 +49,8 @@ I/O channels. Examples include compression and encryption modules. These
|
||||
functions transparently stack and unstack a new channel on top of an
|
||||
existing one. Any number of channels can be stacked together.
|
||||
.PP
|
||||
The implementation of the Tcl channel code was rewritten in 8.3.2 to
|
||||
correct some problems with the previous implementation with regard to
|
||||
stacked channels. Anyone using stacked channels or creating stacked
|
||||
channel drivers should update to the new \fBTCL_CHANNEL_VERSION_2\fR
|
||||
\fBTcl_ChannelType\fR structure. See \fBTcl_CreateChannel\fR for details.
|
||||
The \fBTcl_ChannelType\fR version currently supported is
|
||||
\fBTCL_CHANNEL_VERSION_5\fR. See \fBTcl_CreateChannel\fR for details.
|
||||
.PP
|
||||
\fBTcl_StackChannel\fR stacks a new \fIchannel\fR on an existing channel
|
||||
with the same name that was registered for \fIchannel\fR by
|
||||
|
||||
+9
-9
@@ -41,12 +41,12 @@ Tcl_Object
|
||||
int
|
||||
\fBTcl_ObjectDeleted\fR(\fIobject\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_ObjectGetMetadata\fR(\fIobject, metaTypePtr\fR)
|
||||
.sp
|
||||
\fBTcl_ObjectSetMetadata\fR(\fIobject, metaTypePtr, metadata\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_ClassGetMetadata\fR(\fIclass, metaTypePtr\fR)
|
||||
.sp
|
||||
\fBTcl_ClassSetMetadata\fR(\fIclass, metaTypePtr, metadata\fR)
|
||||
@@ -64,7 +64,7 @@ Tcl_Obj *
|
||||
\fBTcl_GetObjectClassName\fR(\fIinterp\fR, \fIobject\fR)
|
||||
.VE "TIP 605"
|
||||
.SH ARGUMENTS
|
||||
.AS ClientData metadata in/out
|
||||
.AS void *metadata in/out
|
||||
.AP Tcl_Interp *interp in/out
|
||||
Interpreter providing the context for looking up or creating an object, and
|
||||
into whose result error messages will be written on failure.
|
||||
@@ -81,11 +81,11 @@ automatically selected.
|
||||
The name of the namespace to create for the object's private use, or NULL if a
|
||||
new unused name is to be automatically selected. The namespace must not
|
||||
already exist.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of elements in the \fIobjv\fR array.
|
||||
.AP "Tcl_Obj *const" *objv in
|
||||
The arguments to the command to create the instance of the class.
|
||||
.AP int skip in
|
||||
.AP Tcl_Size skip in
|
||||
The number of arguments at the start of the argument array, \fIobjv\fR, that
|
||||
are not arguments to any constructors. This allows the generation of correct
|
||||
error messages even when complicated calling patterns are used (e.g., via the
|
||||
@@ -93,7 +93,7 @@ error messages even when complicated calling patterns are used (e.g., via the
|
||||
.AP Tcl_ObjectMetadataType *metaTypePtr in
|
||||
The type of \fImetadata\fR being set with \fBTcl_ClassSetMetadata\fR or
|
||||
retrieved with \fBTcl_ClassGetMetadata\fR.
|
||||
.AP ClientData metadata in
|
||||
.AP void *metadata in
|
||||
An item of metadata to attach to the class, or NULL to remove the metadata
|
||||
associated with a particular \fImetaTypePtr\fR.
|
||||
.AP "Tcl_ObjectMapMethodNameProc" "methodNameMapper" in
|
||||
@@ -200,7 +200,7 @@ a class or object.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ObjectMetadataDeleteProc\fR(
|
||||
ClientData \fImetadata\fR);
|
||||
void *\fImetadata\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fImetadata\fR argument gives the address of the metadata to be
|
||||
@@ -213,8 +213,8 @@ associated with a class or object.
|
||||
.CS
|
||||
typedef int \fBTcl_CloneProc\fR(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
ClientData \fIsrcMetadata\fR,
|
||||
ClientData *\fIdstMetadataPtr\fR);
|
||||
void *\fIsrcMetadata\fR,
|
||||
void **\fIdstMetadataPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument gives a place to write an error message when the
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ const char *
|
||||
\fBTcl_Concat\fR(\fIargc, argv\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const char *const" argv[]
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
Number of strings.
|
||||
.AP "const char *const" argv[] in
|
||||
Array of strings to concatenate. Must have \fIargc\fR entries.
|
||||
|
||||
+3
-34
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_IsSafe, Tcl_MakeSafe, Tcl_CreateChild, Tcl_CreateSlave, Tcl_GetChild, Tcl_GetSlave, Tcl_GetParent, Tcl_GetMaster, Tcl_GetInterpPath, Tcl_CreateAlias, Tcl_CreateAliasObj, Tcl_GetAlias, Tcl_GetAliasObj, Tcl_ExposeCommand, Tcl_HideCommand \- manage multiple Tcl interpreters, aliases and hidden commands
|
||||
Tcl_IsSafe, Tcl_CreateChild, Tcl_GetChild, Tcl_GetParent, Tcl_GetInterpPath, Tcl_CreateAlias, Tcl_CreateAliasObj, Tcl_GetAlias, Tcl_GetAliasObj, Tcl_ExposeCommand, Tcl_HideCommand \- manage multiple Tcl interpreters, aliases and hidden commands
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -16,25 +16,13 @@ Tcl_IsSafe, Tcl_MakeSafe, Tcl_CreateChild, Tcl_CreateSlave, Tcl_GetChild, Tcl_Ge
|
||||
int
|
||||
\fBTcl_IsSafe\fR(\fIinterp\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_MakeSafe\fR(\fIinterp\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_CreateChild\fR(\fIinterp, name, isSafe\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_CreateSlave\fR(\fIinterp, name, isSafe\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_GetSlave\fR(\fIinterp, name\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_GetChild\fR(\fIinterp, name\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_GetMaster\fR(\fIinterp\fR)
|
||||
.sp
|
||||
Tcl_Interp *
|
||||
\fBTcl_GetParent\fR(\fIinterp\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -81,12 +69,12 @@ Name of source command for alias.
|
||||
Interpreter that contains the target command for an alias.
|
||||
.AP "const char" *targetCmd in
|
||||
Name of target command for alias in \fItargetInterp\fR.
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
Count of additional arguments to pass to the alias command.
|
||||
.AP "const char *const" *argv in
|
||||
Vector of strings, the additional arguments to pass to the alias command.
|
||||
This storage is owned by the caller.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
Count of additional value arguments to pass to the aliased command.
|
||||
.AP Tcl_Obj **objv in
|
||||
Vector of Tcl_Obj structures, the additional value arguments to pass to
|
||||
@@ -142,38 +130,19 @@ child in which Tcl code has access only to set of Tcl commands defined as
|
||||
see the manual entry for the Tcl \fBinterp\fR command for details.
|
||||
If the creation of the new child interpreter failed, \fBNULL\fR is returned.
|
||||
.PP
|
||||
\fBTcl_CreateSlave\fR is a synonym for \fBTcl_CreateChild\fR.
|
||||
.PP
|
||||
\fBTcl_IsSafe\fR returns \fB1\fR if \fIinterp\fR is
|
||||
.QW safe
|
||||
(was created with the \fBTCL_SAFE_INTERPRETER\fR flag specified),
|
||||
\fB0\fR otherwise.
|
||||
.PP
|
||||
\fBTcl_MakeSafe\fR marks \fIinterp\fR as
|
||||
.QW safe ,
|
||||
so that future
|
||||
calls to \fBTcl_IsSafe\fR will return 1. It also removes all known
|
||||
potentially-unsafe core functionality (both commands and variables)
|
||||
from \fIinterp\fR. However, it cannot know what parts of an extension
|
||||
or application are safe and does not make any attempt to remove those
|
||||
parts, so safety is not guaranteed after calling \fBTcl_MakeSafe\fR.
|
||||
Callers will want to take care with their use of \fBTcl_MakeSafe\fR
|
||||
to avoid false claims of safety. For many situations, \fBTcl_CreateChild\fR
|
||||
may be a better choice, since it creates interpreters in a known-safe state.
|
||||
\fBTcl_MakeSafe\fR is deprecated and will be removed in Tcl 9.0.
|
||||
.PP
|
||||
\fBTcl_GetChild\fR returns a pointer to a child interpreter of
|
||||
\fIinterp\fR. The child interpreter is identified by \fIname\fR.
|
||||
If no such child interpreter exists, \fBNULL\fR is returned.
|
||||
.PP
|
||||
\fBTcl_GetSlave\fR is a synonym for \fBTcl_GetChild\fR.
|
||||
.PP
|
||||
\fBTcl_GetParent\fR returns a pointer to the parent interpreter of
|
||||
\fIinterp\fR. If \fIinterp\fR has no parent (it is a
|
||||
top-level interpreter) then \fBNULL\fR is returned.
|
||||
.PP
|
||||
\fBTcl_GetMaster\fR is a synonym for \fBTcl_GetParent\fR.
|
||||
.PP
|
||||
\fBTcl_GetInterpPath\fR stores in the result of \fIinterp\fR
|
||||
the relative path between \fIinterp\fR and \fIchildInterp\fR;
|
||||
\fIchildInterp\fR must be a child of \fIinterp\fR. If the computation
|
||||
|
||||
+53
-167
@@ -9,7 +9,7 @@
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption, Tcl_ChannelName, Tcl_ChannelVersion, Tcl_ChannelBlockModeProc, Tcl_ChannelCloseProc, Tcl_ChannelClose2Proc, Tcl_ChannelInputProc, Tcl_ChannelOutputProc, Tcl_ChannelSeekProc, Tcl_ChannelWideSeekProc, Tcl_ChannelTruncateProc, Tcl_ChannelSetOptionProc, Tcl_ChannelGetOptionProc, Tcl_ChannelWatchProc, Tcl_ChannelGetHandleProc, Tcl_ChannelFlushProc, Tcl_ChannelHandlerProc, Tcl_ChannelThreadActionProc, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting, Tcl_ClearChannelHandlers, Tcl_GetChannelThread, Tcl_ChannelBuffered \- procedures for creating and manipulating channels
|
||||
Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChannelName, Tcl_GetChannelHandle, Tcl_GetChannelMode, Tcl_GetChannelBufferSize, Tcl_SetChannelBufferSize, Tcl_NotifyChannel, Tcl_BadChannelOption, Tcl_ChannelName, Tcl_ChannelVersion, Tcl_ChannelBlockModeProc, Tcl_ChannelClose2Proc, Tcl_ChannelInputProc, Tcl_ChannelOutputProc, Tcl_ChannelWideSeekProc, Tcl_ChannelTruncateProc, Tcl_ChannelSetOptionProc, Tcl_ChannelGetOptionProc, Tcl_ChannelWatchProc, Tcl_ChannelGetHandleProc, Tcl_ChannelFlushProc, Tcl_ChannelHandlerProc, Tcl_ChannelThreadActionProc, Tcl_IsChannelShared, Tcl_IsChannelRegistered, Tcl_CutChannel, Tcl_SpliceChannel, Tcl_IsChannelExisting, Tcl_ClearChannelHandlers, Tcl_GetChannelThread, Tcl_ChannelBuffered \- procedures for creating and manipulating channels
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -17,7 +17,7 @@ Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChanne
|
||||
Tcl_Channel
|
||||
\fBTcl_CreateChannel\fR(\fItypePtr, channelName, instanceData, mask\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_GetChannelInstanceData\fR(\fIchannel\fR)
|
||||
.sp
|
||||
const Tcl_ChannelType *
|
||||
@@ -80,9 +80,6 @@ Tcl_ChannelTypeVersion
|
||||
Tcl_DriverBlockModeProc *
|
||||
\fBTcl_ChannelBlockModeProc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
Tcl_DriverCloseProc *
|
||||
\fBTcl_ChannelCloseProc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
Tcl_DriverClose2Proc *
|
||||
\fBTcl_ChannelClose2Proc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
@@ -92,9 +89,6 @@ Tcl_DriverInputProc *
|
||||
Tcl_DriverOutputProc *
|
||||
\fBTcl_ChannelOutputProc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
Tcl_DriverSeekProc *
|
||||
\fBTcl_ChannelSeekProc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
Tcl_DriverWideSeekProc *
|
||||
\fBTcl_ChannelWideSeekProc\fR(\fItypePtr\fR)
|
||||
.sp
|
||||
@@ -133,7 +127,7 @@ by any other channel. Can be NULL, in which case the channel is
|
||||
created without a name. If the created channel is assigned to one
|
||||
of the standard channels (\fBstdin\fR, \fBstdout\fR or \fBstderr\fR),
|
||||
the assigned channel name will be the name of the standard channel.
|
||||
.AP ClientData instanceData in
|
||||
.AP void *instanceData in
|
||||
Arbitrary one-word value to be associated with this channel. This
|
||||
value is passed to procedures in \fItypePtr\fR when they are invoked.
|
||||
.AP int mask in
|
||||
@@ -144,10 +138,10 @@ The channel to operate on.
|
||||
.AP int direction in
|
||||
\fBTCL_READABLE\fR means the input handle is wanted; \fBTCL_WRITABLE\fR
|
||||
means the output handle is wanted.
|
||||
.AP ClientData *handlePtr out
|
||||
.AP void **handlePtr out
|
||||
Points to the location where the desired OS-specific handle should be
|
||||
stored.
|
||||
.AP int size in
|
||||
.AP Tcl_Size size in
|
||||
The size, in bytes, of buffers to allocate in this channel.
|
||||
.AP int mask in
|
||||
An OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR
|
||||
@@ -302,16 +296,13 @@ name is registered in the (thread)-global list of all channels (result
|
||||
(thread)global list of all channels (of the current thread).
|
||||
Application to a channel still registered in some interpreter
|
||||
is not allowed.
|
||||
Also notifies the driver if the \fBTcl_ChannelType\fR version is
|
||||
\fBTCL_CHANNEL_VERSION_4\fR (or higher), and
|
||||
Also notifies the driver if
|
||||
\fBTcl_DriverThreadActionProc\fR is defined for it.
|
||||
.PP
|
||||
\fBTcl_SpliceChannel\fR adds the specified \fIchannel\fR to the
|
||||
(thread)global list of all channels (of the current thread).
|
||||
Application to a channel registered in some interpreter is not allowed.
|
||||
Also notifies the driver if the \fBTcl_ChannelType\fR version is
|
||||
\fBTCL_CHANNEL_VERSION_4\fR (or higher), and
|
||||
\fBTcl_DriverThreadActionProc\fR is defined for it.
|
||||
Also notifies the driver if \fBTcl_DriverThreadActionProc\fR is defined for it.
|
||||
.PP
|
||||
\fBTcl_ClearChannelHandlers\fR removes all channel handlers and event
|
||||
scripts associated with the specified \fIchannel\fR, thus shutting
|
||||
@@ -331,10 +322,10 @@ The \fBTcl_ChannelType\fR structure contains the following fields:
|
||||
typedef struct Tcl_ChannelType {
|
||||
const char *\fItypeName\fR;
|
||||
Tcl_ChannelTypeVersion \fIversion\fR;
|
||||
Tcl_DriverCloseProc *\fIcloseProc\fR;
|
||||
void *\fIcloseProc\fR; /* Not used any more*/
|
||||
Tcl_DriverInputProc *\fIinputProc\fR;
|
||||
Tcl_DriverOutputProc *\fIoutputProc\fR;
|
||||
Tcl_DriverSeekProc *\fIseekProc\fR;
|
||||
void *\fIseekProc\fR; /* Not used any more */
|
||||
Tcl_DriverSetOptionProc *\fIsetOptionProc\fR;
|
||||
Tcl_DriverGetOptionProc *\fIgetOptionProc\fR;
|
||||
Tcl_DriverWatchProc *\fIwatchProc\fR;
|
||||
@@ -363,9 +354,8 @@ The user should only use the above structure for \fBTcl_ChannelType\fR
|
||||
instantiation. When referencing fields in a \fBTcl_ChannelType\fR
|
||||
structure, the following functions should be used to obtain the values:
|
||||
\fBTcl_ChannelName\fR, \fBTcl_ChannelVersion\fR,
|
||||
\fBTcl_ChannelBlockModeProc\fR, \fBTcl_ChannelCloseProc\fR,
|
||||
\fBTcl_ChannelClose2Proc\fR, \fBTcl_ChannelInputProc\fR,
|
||||
\fBTcl_ChannelOutputProc\fR, \fBTcl_ChannelSeekProc\fR,
|
||||
\fBTcl_ChannelBlockModeProc\fR, \fBTcl_ChannelClose2Proc\fR,
|
||||
\fBTcl_ChannelInputProc\fR, \fBTcl_ChannelOutputProc\fR,
|
||||
\fBTcl_ChannelWideSeekProc\fR, \fBTcl_ChannelThreadActionProc\fR,
|
||||
\fBTcl_ChannelTruncateProc\fR,
|
||||
\fBTcl_ChannelSetOptionProc\fR, \fBTcl_ChannelGetOptionProc\fR,
|
||||
@@ -388,25 +378,9 @@ a pointer to the string.
|
||||
.PP
|
||||
|
||||
The \fIversion\fR field should be set to the version of the structure
|
||||
that you require. \fBTCL_CHANNEL_VERSION_2\fR is the minimum recommended.
|
||||
\fBTCL_CHANNEL_VERSION_3\fR must be set to specify the \fIwideSeekProc\fR member.
|
||||
\fBTCL_CHANNEL_VERSION_4\fR must be set to specify the \fIthreadActionProc\fR member
|
||||
(includes \fIwideSeekProc\fR).
|
||||
\fBTCL_CHANNEL_VERSION_5\fR must be set to specify the
|
||||
\fItruncateProc\fR members (includes
|
||||
\fIwideSeekProc\fR and \fIthreadActionProc\fR).
|
||||
If it is not set to any of these, then this
|
||||
\fBTcl_ChannelType\fR is assumed to have the original structure. See
|
||||
\fBOLD CHANNEL TYPES\fR for more details. While Tcl will recognize
|
||||
and function with either structures, stacked channels must be of at
|
||||
least \fBTCL_CHANNEL_VERSION_2\fR to function correctly.
|
||||
that you require. \fBTCL_CHANNEL_VERSION_5\fR is the minimum supported.
|
||||
.PP
|
||||
This value can be retrieved with \fBTcl_ChannelVersion\fR, which returns
|
||||
one of
|
||||
\fBTCL_CHANNEL_VERSION_5\fR,
|
||||
\fBTCL_CHANNEL_VERSION_4\fR,
|
||||
\fBTCL_CHANNEL_VERSION_3\fR,
|
||||
\fBTCL_CHANNEL_VERSION_2\fR or \fBTCL_CHANNEL_VERSION_1\fR.
|
||||
This value can be retrieved with \fBTcl_ChannelVersion\fR.
|
||||
.SS BLOCKMODEPROC
|
||||
.PP
|
||||
The \fIblockModeProc\fR field contains the address of a function called by
|
||||
@@ -415,7 +389,7 @@ the generic layer to set blocking and nonblocking mode on the device.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverBlockModeProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
int \fImode\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -442,22 +416,23 @@ blocking mode is acceptable to it, and should this also document for
|
||||
the user so that the blocking mode of the channel is not changed to an
|
||||
unacceptable value. Any confusion here may lead the interpreter into a
|
||||
(spurious and difficult to find) deadlock.
|
||||
.SS "CLOSEPROC AND CLOSE2PROC"
|
||||
.SS "CLOSE2PROC"
|
||||
.PP
|
||||
The \fIcloseProc\fR field contains the address of a function called by the
|
||||
The \fIclose2Proc\fR field contains the address of a function called by the
|
||||
generic layer to clean up driver-related information when the channel is
|
||||
closed. \fICloseProc\fR must match the following prototype:
|
||||
closed. \fIClose2Proc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverCloseProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
typedef int \fBTcl_DriverClose2Proc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinstanceData\fR argument is the same as the value provided to
|
||||
\fBTcl_CreateChannel\fR when the channel was created. The function should
|
||||
release any storage maintained by the channel driver for this channel, and
|
||||
close the input and output devices encapsulated by this channel. All queued
|
||||
If \fIflags\fR is 0, the \fIinstanceData\fR argument is the same as the value
|
||||
provided to \fBTcl_CreateChannel\fR when the channel was created. The function
|
||||
should release any storage maintained by the channel driver for this channel,
|
||||
and close the input and output devices encapsulated by this channel. All queued
|
||||
output will have been flushed to the device before this function is called,
|
||||
and no further driver operations will be invoked on this instance after
|
||||
calling the \fIcloseProc\fR. If the close operation is successful, the
|
||||
@@ -466,35 +441,20 @@ error code. In addition, if an error occurs and \fIinterp\fR is not NULL,
|
||||
the procedure should store an error message in the interpreter's result.
|
||||
.PP
|
||||
Alternatively, channels that support closing the read and write sides
|
||||
independently may set \fIcloseProc\fR to \fBTCL_CLOSE2PROC\fR and set
|
||||
\fIclose2Proc\fR to the address of a function that matches the
|
||||
following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverClose2Proc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclose2Proc\fR will be called with \fIflags\fR set to an OR'ed
|
||||
independently may accept other flag values than 0.
|
||||
Then \fIclose2Proc\fR will be called with \fIflags\fR set to an OR'ed
|
||||
combination of \fBTCL_CLOSE_READ\fR or \fBTCL_CLOSE_WRITE\fR to
|
||||
indicate that the driver should close the read and/or write side of
|
||||
the channel. The channel driver may be invoked to perform
|
||||
additional operations on the channel after \fIclose2Proc\fR is
|
||||
called to close one or both sides of the channel. If \fIflags\fR is
|
||||
\fB0\fR (zero), the driver should close the channel in the manner
|
||||
described above for \fIcloseProc\fR. No further operations will be
|
||||
invoked on this instance after \fIclose2Proc\fR is called with all
|
||||
flags cleared. In all cases, the \fIclose2Proc\fR function should
|
||||
return zero if the close operation was successful; otherwise it should
|
||||
return a nonzero POSIX error code. In addition, if an error occurs and
|
||||
\fIinterp\fR is not NULL, the procedure should store an error message
|
||||
in the interpreter's result.
|
||||
called to close one or both sides of the channel. In all cases, the
|
||||
\fIclose2Proc\fR function should return zero if the close operation was
|
||||
successful; otherwise it should return a nonzero POSIX error code.
|
||||
In addition, if an error occurs and \fIinterp\fR is not NULL, the procedure
|
||||
should store an error message in the interpreter's result.
|
||||
.PP
|
||||
The \fIcloseProc\fR and \fIclose2Proc\fR values can be retrieved with
|
||||
\fBTcl_ChannelCloseProc\fR or \fBTcl_ChannelClose2Proc\fR, which
|
||||
return a pointer to the respective function.
|
||||
The \fIclose2Proc\fR value can be retrieved with \fBTcl_ChannelClose2Proc\fR,
|
||||
which returns a pointer to the function.
|
||||
.SS INPUTPROC
|
||||
.PP
|
||||
The \fIinputProc\fR field contains the address of a function called by the
|
||||
@@ -503,7 +463,7 @@ internal buffer. \fIInputProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverInputProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
char *\fIbuf\fR,
|
||||
int \fIbufSize\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -547,7 +507,7 @@ generic layer to transfer data from an internal buffer to the output device.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverOutputProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
const char *\fIbuf\fR,
|
||||
int \fItoWrite\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -577,17 +537,17 @@ without writing any data.
|
||||
.PP
|
||||
This value can be retrieved with \fBTcl_ChannelOutputProc\fR, which returns
|
||||
a pointer to the function.
|
||||
.SS "SEEKPROC AND WIDESEEKPROC"
|
||||
.SS "WIDESEEKPROC"
|
||||
.PP
|
||||
The \fIseekProc\fR field contains the address of a function called by the
|
||||
The \fIwideSeekProc\fR field contains the address of a function called by the
|
||||
generic layer to move the access point at which subsequent input or output
|
||||
operations will be applied. \fISeekProc\fR must match the following
|
||||
operations will be applied. \fIWideSeekProc\fR must match the following
|
||||
prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverSeekProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
long \fIoffset\fR,
|
||||
typedef long long \fBTcl_DriverWideSeekProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
long long \fIoffset\fR,
|
||||
int \fIseekMode\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
.CE
|
||||
@@ -606,30 +566,8 @@ does not implement seeking.
|
||||
The return value is the new access point or -1 in case of error. If an
|
||||
error occurred, the function should not move the access point.
|
||||
.PP
|
||||
If there is a non-NULL \fIseekProc\fR field, the \fIwideSeekProc\fR
|
||||
field may contain the address of an alternative function to use which
|
||||
handles wide (i.e. larger than 32-bit) offsets, so allowing seeks
|
||||
within files larger than 2GB. The \fIwideSeekProc\fR will be called
|
||||
in preference to the \fIseekProc\fR, but both must be defined if the
|
||||
\fIwideSeekProc\fR is defined. \fIWideSeekProc\fR must match the
|
||||
following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef long long \fBTcl_DriverWideSeekProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
long long \fIoffset\fR,
|
||||
int \fIseekMode\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The arguments and return values mean the same thing as with
|
||||
\fIseekProc\fR above, except that the type of offsets and the return
|
||||
type are different.
|
||||
.PP
|
||||
The \fIseekProc\fR value can be retrieved with
|
||||
\fBTcl_ChannelSeekProc\fR, which returns a pointer to the function,
|
||||
and similarly the \fIwideSeekProc\fR can be retrieved with
|
||||
\fBTcl_ChannelWideSeekProc\fR.
|
||||
The \fIwideSseekProc\fR value can be retrieved with
|
||||
\fBTcl_ChannelWideSeekProc\fR, which returns a pointer to the function.
|
||||
.SS SETOPTIONPROC
|
||||
.PP
|
||||
The \fIsetOptionProc\fR field contains the address of a function called by
|
||||
@@ -638,7 +576,7 @@ the generic layer to set a channel type specific option on a channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverSetOptionProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoptionName\fR,
|
||||
const char *\fInewValue\fR);
|
||||
@@ -679,7 +617,7 @@ channel. \fIgetOptionProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverGetOptionProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoptionName\fR,
|
||||
Tcl_DString *\fIoptionValue\fR);
|
||||
@@ -717,7 +655,7 @@ notice events of interest on this channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_DriverWatchProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -748,9 +686,9 @@ the generic layer to retrieve a device-specific handle from the channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverGetHandleProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
int \fIdirection\fR,
|
||||
ClientData *\fIhandlePtr\fR);
|
||||
void **\fIhandlePtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIInstanceData\fR is the same as the value passed to
|
||||
@@ -777,7 +715,7 @@ It should be set to NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverFlushProc\fR(
|
||||
ClientData \fIinstanceData\fR);
|
||||
void *\fIinstanceData\fR);
|
||||
.CE
|
||||
.PP
|
||||
This value can be retrieved with \fBTcl_ChannelFlushProc\fR, which returns
|
||||
@@ -792,7 +730,7 @@ that occur on the underlying (stacked) channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverHandlerProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
int \fIinterestMask\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -821,7 +759,7 @@ might be maintaining using the calling thread as the associate. See
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_DriverThreadActionProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
int \fIaction\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -838,7 +776,7 @@ length. It can be NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverTruncateProc\fR(
|
||||
ClientData \fIinstanceData\fR,
|
||||
void *\fIinstanceData\fR,
|
||||
long long \fIlength\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -886,58 +824,6 @@ The function takes good care of inserting minus signs before
|
||||
each option, commas after, and an
|
||||
.QW or
|
||||
before the last option.
|
||||
.SH "OLD CHANNEL TYPES"
|
||||
The original (8.3.1 and below) \fBTcl_ChannelType\fR structure contains
|
||||
the following fields:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_ChannelType {
|
||||
const char *\fItypeName\fR;
|
||||
Tcl_DriverBlockModeProc *\fIblockModeProc\fR;
|
||||
Tcl_DriverCloseProc *\fIcloseProc\fR;
|
||||
Tcl_DriverInputProc *\fIinputProc\fR;
|
||||
Tcl_DriverOutputProc *\fIoutputProc\fR;
|
||||
Tcl_DriverSeekProc *\fIseekProc\fR;
|
||||
Tcl_DriverSetOptionProc *\fIsetOptionProc\fR;
|
||||
Tcl_DriverGetOptionProc *\fIgetOptionProc\fR;
|
||||
Tcl_DriverWatchProc *\fIwatchProc\fR;
|
||||
Tcl_DriverGetHandleProc *\fIgetHandleProc\fR;
|
||||
Tcl_DriverClose2Proc *\fIclose2Proc\fR;
|
||||
} \fBTcl_ChannelType\fR;
|
||||
.CE
|
||||
.PP
|
||||
It is still possible to create channel with the above structure. The
|
||||
internal channel code will determine the version. It is imperative to use
|
||||
the new \fBTcl_ChannelType\fR structure if you are creating a stacked
|
||||
channel driver, due to problems with the earlier stacked channel
|
||||
implementation (in 8.2.0 to 8.3.1).
|
||||
.PP
|
||||
Prior to 8.4.0 (i.e. during the later releases of 8.3 and early part
|
||||
of the 8.4 development cycle) the \fBTcl_ChannelType\fR structure
|
||||
contained the following fields:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_ChannelType {
|
||||
const char *\fItypeName\fR;
|
||||
Tcl_ChannelTypeVersion \fIversion\fR;
|
||||
Tcl_DriverCloseProc *\fIcloseProc\fR;
|
||||
Tcl_DriverInputProc *\fIinputProc\fR;
|
||||
Tcl_DriverOutputProc *\fIoutputProc\fR;
|
||||
Tcl_DriverSeekProc *\fIseekProc\fR;
|
||||
Tcl_DriverSetOptionProc *\fIsetOptionProc\fR;
|
||||
Tcl_DriverGetOptionProc *\fIgetOptionProc\fR;
|
||||
Tcl_DriverWatchProc *\fIwatchProc\fR;
|
||||
Tcl_DriverGetHandleProc *\fIgetHandleProc\fR;
|
||||
Tcl_DriverClose2Proc *\fIclose2Proc\fR;
|
||||
Tcl_DriverBlockModeProc *\fIblockModeProc\fR;
|
||||
Tcl_DriverFlushProc *\fIflushProc\fR;
|
||||
Tcl_DriverHandlerProc *\fIhandlerProc\fR;
|
||||
Tcl_DriverTruncateProc *\fItruncateProc\fR;
|
||||
} \fBTcl_ChannelType\fR;
|
||||
.CE
|
||||
.PP
|
||||
When the above structure is registered as a channel type, the
|
||||
\fIversion\fR field should always be \fBTCL_CHANNEL_VERSION_2\fR.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_Close(3), Tcl_OpenFileChannel(3), Tcl_SetErrno(3), Tcl_QueueEvent(3), Tcl_StackChannel(3), Tcl_GetStdChannel(3)
|
||||
.SH KEYWORDS
|
||||
|
||||
+3
-3
@@ -29,10 +29,10 @@ Tcl channel such as returned by \fBTcl_CreateChannel\fR.
|
||||
Conditions under which \fIproc\fR should be called: OR-ed combination of
|
||||
\fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR and \fBTCL_EXCEPTION\fR. Specify
|
||||
a zero value to temporarily disable an existing handler.
|
||||
.AP Tcl_FileProc *proc in
|
||||
.AP Tcl_ChannelProc *proc in
|
||||
Procedure to invoke whenever the channel indicated by \fIchannel\fR meets
|
||||
the conditions specified by \fImask\fR.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -48,7 +48,7 @@ what it means for a channel to be readable or writable.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ChannelProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ void
|
||||
The channel for which to create or delete a close callback.
|
||||
.AP Tcl_CloseProc *proc in
|
||||
The procedure to call as the callback.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -38,7 +38,7 @@ Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CloseProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR is the same as the value provided in the call to
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ Name of command.
|
||||
.AP Tcl_CmdProc *proc in
|
||||
Implementation of new command: \fIproc\fR will be called whenever
|
||||
\fIcmdName\fR is invoked as a command.
|
||||
.AP ClientData clientData in
|
||||
.AP voie *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in
|
||||
Procedure to call before \fIcmdName\fR is deleted from the interpreter;
|
||||
@@ -75,7 +75,7 @@ and it returns NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_CmdProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIargc\fR,
|
||||
const char *\fIargv\fR[]);
|
||||
@@ -131,7 +131,7 @@ result that match the type \fBTcl_CmdDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdDeleteProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ a handler.
|
||||
.AP Tcl_FileProc *proc in
|
||||
Procedure to invoke whenever the file or device indicated
|
||||
by \fIfile\fR meets the conditions specified by \fImask\fR.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -51,7 +51,7 @@ type \fBTcl_FileProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_FileProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_CreateMathFunc, Tcl_GetMathFuncInfo, Tcl_ListMathFuncs \- Define, query and enumerate math functions for expressions
|
||||
.SH "NOTICE OF EVENTUAL DEPRECATION"
|
||||
.PP
|
||||
The \fBTcl_CreateMathFunc\fR and \fBTcl_GetMathFuncInfo\fR functions
|
||||
are rendered somewhat obsolete by the ability to create functions for
|
||||
expressions by placing commands in the \fBtcl::mathfunc\fR namespace,
|
||||
as described in the \fBmathfunc\fR manual page; the API described on
|
||||
this page is not expected to be maintained indefinitely.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
void
|
||||
\fBTcl_CreateMathFunc\fR(\fIinterp, name, numArgs, argTypes, proc, clientData\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetMathFuncInfo\fR(\fIinterp, name, numArgsPtr, argTypesPtr, procPtr,
|
||||
clientDataPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
\fBTcl_ListMathFuncs\fR(\fIinterp, pattern\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_ValueType *clientDataPtr out
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter in which new function will be defined.
|
||||
.AP "const char" *name in
|
||||
Name for new function.
|
||||
.AP int numArgs in
|
||||
Number of arguments to new function; also gives size of \fIargTypes\fR array.
|
||||
.AP Tcl_ValueType *argTypes in
|
||||
Points to an array giving the permissible types for each argument to
|
||||
function.
|
||||
.AP Tcl_MathProc *proc in
|
||||
Procedure that implements the function.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR when it is invoked.
|
||||
.AP int *numArgsPtr out
|
||||
Points to a variable that will be set to contain the number of
|
||||
arguments to the function.
|
||||
.AP Tcl_ValueType **argTypesPtr out
|
||||
Points to a variable that will be set to contain a pointer to an array
|
||||
giving the permissible types for each argument to the function which
|
||||
will need to be freed up using \fITcl_Free\fR.
|
||||
.AP Tcl_MathProc **procPtr out
|
||||
Points to a variable that will be set to contain a pointer to the
|
||||
implementation code for the function (or NULL if the function is
|
||||
implemented directly in bytecode).
|
||||
.AP ClientData *clientDataPtr out
|
||||
Points to a variable that will be set to contain the clientData
|
||||
argument passed to \fITcl_CreateMathFunc\fR when the function was
|
||||
created if the function is not implemented directly in bytecode.
|
||||
.AP "const char" *pattern in
|
||||
Pattern to match against function names so as to filter them (by
|
||||
passing to \fITcl_StringMatch\fR), or NULL to not apply any filter.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Tcl allows a number of mathematical functions to be used in
|
||||
expressions, such as \fBsin\fR, \fBcos\fR, and \fBhypot\fR.
|
||||
These functions are represented by commands in the namespace,
|
||||
\fBtcl::mathfunc\fR. The \fBTcl_CreateMathFunc\fR function is
|
||||
an obsolete way for applications to add additional functions
|
||||
to those already provided by Tcl or to replace existing functions.
|
||||
It should not be used by new applications, which should create
|
||||
math functions using \fBTcl_CreateObjCommand\fR to create a command
|
||||
in the \fBtcl::mathfunc\fR namespace.
|
||||
.PP
|
||||
In the \fBTcl_CreateMathFunc\fR interface,
|
||||
\fIName\fR is the name of the function as it will appear in expressions.
|
||||
If \fIname\fR does not already exist in the \fB::tcl::mathfunc\fR
|
||||
namespace, then a new command is created in that namespace.
|
||||
If \fIname\fR does exist, then the existing function is replaced.
|
||||
\fINumArgs\fR and \fIargTypes\fR describe the arguments to the function.
|
||||
Each entry in the \fIargTypes\fR array must be
|
||||
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR, \fBTCL_WIDE_INT\fR,
|
||||
or \fBTCL_EITHER\fR to indicate whether the corresponding argument must be an
|
||||
integer, a double-precision floating value, a wide (64-bit) integer,
|
||||
or any, respectively.
|
||||
.PP
|
||||
Whenever the function is invoked in an expression Tcl will invoke
|
||||
\fIproc\fR. \fIProc\fR should have arguments and result that match
|
||||
the type \fBTcl_MathProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_MathProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_Value *\fIargs\fR,
|
||||
Tcl_Value *\fIresultPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR
|
||||
arguments will be the same as those passed to \fBTcl_CreateMathFunc\fR.
|
||||
\fIArgs\fR will point to an array of \fInumArgs\fR Tcl_Value structures,
|
||||
which describe the actual arguments to the function:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Value {
|
||||
Tcl_ValueType \fItype\fR;
|
||||
long \fIintValue\fR;
|
||||
double \fIdoubleValue\fR;
|
||||
Tcl_WideInt \fIwideValue\fR;
|
||||
} \fBTcl_Value\fR;
|
||||
.CE
|
||||
.PP
|
||||
The \fItype\fR field indicates the type of the argument and is
|
||||
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR.
|
||||
It will match the \fIargTypes\fR value specified for the function unless
|
||||
the \fIargTypes\fR value was \fBTCL_EITHER\fR. Tcl converts
|
||||
the argument supplied in the expression to the type requested in
|
||||
\fIargTypes\fR, if that is necessary.
|
||||
Depending on the value of the \fItype\fR field, the \fIintValue\fR,
|
||||
\fIdoubleValue\fR or \fIwideValue\fR
|
||||
field will contain the actual value of the argument.
|
||||
.PP
|
||||
\fIProc\fR should compute its result and store it either as an integer
|
||||
in \fIresultPtr->intValue\fR or as a floating value in
|
||||
\fIresultPtr->doubleValue\fR.
|
||||
It should set also \fIresultPtr->type\fR to one of
|
||||
\fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR
|
||||
to indicate which value was set.
|
||||
Under normal circumstances \fIproc\fR should return \fBTCL_OK\fR.
|
||||
If an error occurs while executing the function, \fIproc\fR should
|
||||
return \fBTCL_ERROR\fR and leave an error message in the interpreter's result.
|
||||
.PP
|
||||
\fBTcl_GetMathFuncInfo\fR retrieves the values associated with
|
||||
function \fIname\fR that were passed to a preceding
|
||||
\fBTcl_CreateMathFunc\fR call. Normally, the return code is
|
||||
\fBTCL_OK\fR but if the named function does not exist, \fBTCL_ERROR\fR
|
||||
is returned and an error message is placed in the interpreter's
|
||||
result.
|
||||
.PP
|
||||
If an error did not occur, the array reference placed in the variable
|
||||
pointed to by \fIargTypesPtr\fR is newly allocated, and should be
|
||||
released by passing it to \fBTcl_Free\fR. Some functions (the
|
||||
standard set implemented in the core, and those defined by placing
|
||||
commands in the \fBtcl::mathfunc\fR namespace) do not have
|
||||
argument type information; attempting to retrieve values for
|
||||
them causes a NULL to be stored in the variable pointed to by
|
||||
\fIprocPtr\fR and the variable pointed to by \fIclientDataPtr\fR
|
||||
will not be modified. The variable pointed to by \fInumArgsPointer\fR
|
||||
will contain -1, and no argument types will be stored in the variable
|
||||
pointed to by \fIargTypesPointer\fR.
|
||||
.PP
|
||||
\fBTcl_ListMathFuncs\fR returns a Tcl value containing a list of all
|
||||
the math functions defined in the interpreter whose name matches
|
||||
\fIpattern\fR. The returned value has a reference count of zero.
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
\fBTcl_ListMathFuncs\fR always returns a zero-reference object, much
|
||||
like \fBTcl_NewObj\fR.
|
||||
.SH "SEE ALSO"
|
||||
expr(n), info(n), Tcl_CreateObjCommand(3), Tcl_Free(3), Tcl_NewListObj(3)
|
||||
.SH KEYWORDS
|
||||
expression, mathematical function
|
||||
+23
-18
@@ -58,7 +58,7 @@ Implementation of the new command: \fIproc\fR will be called whenever
|
||||
.AP Tcl_ObjCmdProc2 *proc2 in
|
||||
Implementation of the new command: \fIproc2\fR will be called whenever
|
||||
\fIcmdName\fR is invoked as a command.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in
|
||||
Procedure to call before \fIcmdName\fR is deleted from the interpreter;
|
||||
@@ -101,7 +101,7 @@ and it returns NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_ObjCmdProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
@@ -174,7 +174,7 @@ result that match the type \fBTcl_CmdDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdDeleteProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
@@ -185,9 +185,9 @@ except its \fIproc2\fR argument is of type \fBTcl_ObjCmdProc2\fR.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_ObjCmdProc2\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
ptrdiff_t \fIobjc\fR,
|
||||
Tcl_Size \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
@@ -224,24 +224,29 @@ pointed to by \fIinfoPtr\fR and returns 1.
|
||||
A \fBTcl_CmdInfo\fR structure has the following fields:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_CmdInfo {
|
||||
typedef struct {
|
||||
int \fIisNativeObjectProc\fR;
|
||||
Tcl_ObjCmdProc *\fIobjProc\fR;
|
||||
ClientData \fIobjClientData\fR;
|
||||
void *\fIobjClientData\fR;
|
||||
Tcl_CmdProc *\fIproc\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
void *\fIclientData\fR;
|
||||
Tcl_CmdDeleteProc *\fIdeleteProc\fR;
|
||||
ClientData \fIdeleteData\fR;
|
||||
void *\fIdeleteData\fR;
|
||||
Tcl_Namespace *\fInamespacePtr\fR;
|
||||
Tcl_ObjCmdProc2 *\fIobjProc2\fR;
|
||||
void *\fIobjClientData2\fR;
|
||||
} \fBTcl_CmdInfo\fR;
|
||||
.CE
|
||||
.PP
|
||||
The \fIisNativeObjectProc\fR field has the value 1
|
||||
if \fBTcl_CreateObjCommand\fR was called to register the command;
|
||||
it is 0 if only \fBTcl_CreateCommand\fR was called.
|
||||
The \fIisNativeObjectProc\fR field has the value 2 if
|
||||
\fBTcl_CreateObjCommand2\fR was called to register the command;
|
||||
it has the value 1 if \fBTcl_CreateObjCommand\fR was called to
|
||||
register the command; it is 0 if only \fBTcl_CreateCommand\fR was called.
|
||||
It allows a program to determine whether it is faster to
|
||||
call \fIobjProc\fR or \fIproc\fR:
|
||||
\fIobjProc\fR is normally faster
|
||||
call \fIobjProc2\fR, \fIobjProc\fR or \fIproc\fR:
|
||||
\fIobjProc2\fR/\fIobjProc\fR is normally faster
|
||||
if \fIisNativeObjectProc\fR has the value 2;
|
||||
\fIobjProc\fR/\fIobjProc\fR is normally faster
|
||||
if \fIisNativeObjectProc\fR has the value 1.
|
||||
The fields \fIobjProc\fR and \fIobjClientData\fR
|
||||
have the same meaning as the \fIproc\fR and \fIclientData\fR
|
||||
@@ -257,7 +262,7 @@ otherwise, this is a compatibility procedure
|
||||
registered by \fBTcl_CreateObjCommand\fR
|
||||
that simply calls the command's
|
||||
value-based procedure after converting its string arguments to Tcl values.
|
||||
The field \fIdeleteData\fR is the ClientData value
|
||||
The field \fIdeleteData\fR is the clientData value
|
||||
to pass to \fIdeleteProc\fR; it is normally the same as
|
||||
\fIclientData\fR but may be set independently using the
|
||||
\fBTcl_SetCommandInfo\fR procedure.
|
||||
@@ -271,7 +276,7 @@ from \fBTcl_CreateObjCommand\fR in place of the command name. If the
|
||||
and fills in the structure designated by \fIinfoPtr\fR.
|
||||
.PP
|
||||
\fBTcl_SetCommandInfo\fR is used to modify the procedures and
|
||||
ClientData values associated with a command.
|
||||
clientData values associated with a command.
|
||||
Its \fIcmdName\fR argument is the name of a command in \fIinterp\fR.
|
||||
\fIcmdName\fR may include \fB::\fR namespace qualifiers
|
||||
to identify a command in a particular namespace.
|
||||
@@ -287,9 +292,9 @@ copies the information from \fI*infoPtr\fR to Tcl's internal structure
|
||||
for the command and returns 1.
|
||||
.PP
|
||||
Note that \fBTcl_SetCommandInfo\fR and
|
||||
\fBTcl_SetCommandInfoFromToken\fR both allow the ClientData for a
|
||||
\fBTcl_SetCommandInfoFromToken\fR both allow the clientData for a
|
||||
command's deletion procedure to be given a different value than the
|
||||
ClientData for its command procedure.
|
||||
clientData for its command procedure.
|
||||
.PP
|
||||
Note that neither \fBTcl_SetCommandInfo\fR nor
|
||||
\fBTcl_SetCommandInfoFromToken\fR will change a command's namespace.
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ Tcl_TimerToken
|
||||
How many milliseconds to wait before invoking \fIproc\fR.
|
||||
.AP Tcl_TimerProc *proc in
|
||||
Procedure to invoke after \fImilliseconds\fR have elapsed.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.AP Tcl_TimerToken token in
|
||||
Token for previously created timer handler (the return value
|
||||
@@ -51,7 +51,7 @@ the type \fBTcl_TimerProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_TimerProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a
|
||||
|
||||
+4
-4
@@ -29,7 +29,7 @@ Tcl_Trace
|
||||
.AS Tcl_CmdObjTraceDeleteProc *deleteProc
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter containing command to be traced or untraced.
|
||||
.AP int level in
|
||||
.AP Tcl_Size level in
|
||||
Only commands at or below this nesting level will be traced unless
|
||||
0 is specified. 1 means
|
||||
top-level commands only, 2 means top-level commands or those that are
|
||||
@@ -88,16 +88,16 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
typedef int \fBTcl_CmdObjTraceProc2\fR(
|
||||
\fBvoid *\fR \fIclientData\fR,
|
||||
\fBTcl_Interp\fR* \fIinterp\fR,
|
||||
ptrdiff_t \fIlevel\fR,
|
||||
Tcl_Size \fIlevel\fR,
|
||||
const char *\fIcommand\fR,
|
||||
\fBTcl_Command\fR \fIcommandToken\fR,
|
||||
ptrdiff_t \fIobjc\fR,
|
||||
Tcl_Size \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
|
||||
\fIclientData\fR typically points to an application-specific data
|
||||
structure that describes what to do when \fIobjProc\fR is invoked. The
|
||||
\fIlevel\fR parameter gives the nesting level of the command (1 for
|
||||
top-level commands passed to \fBTcl_Eval\fR by the application, 2 for
|
||||
|
||||
+16
-21
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSublist, Tcl_DStringEndSublist, Tcl_DStringLength, Tcl_DStringValue, Tcl_DStringSetLength, Tcl_DStringTrunc, Tcl_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult, Tcl_DStringToObj \- manipulate dynamic strings
|
||||
Tcl_DStringInit, Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_DStringStartSublist, Tcl_DStringEndSublist, Tcl_DStringLength, Tcl_DStringValue, Tcl_DStringSetLength, Tcl_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult, Tcl_DStringToObj \- manipulate dynamic strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -26,7 +26,7 @@ char *
|
||||
.sp
|
||||
\fBTcl_DStringEndSublist\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_DStringLength\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
@@ -34,8 +34,6 @@ char *
|
||||
.sp
|
||||
\fBTcl_DStringSetLength\fR(\fIdsPtr, newLength\fR)
|
||||
.sp
|
||||
\fBTcl_DStringTrunc\fR(\fIdsPtr, newLength\fR)
|
||||
.sp
|
||||
\fBTcl_DStringFree\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
|
||||
@@ -53,10 +51,10 @@ Pointer to structure that is used to manage a dynamic string.
|
||||
Pointer to characters to append to dynamic string.
|
||||
.AP "const char" *element in
|
||||
Pointer to characters to append as list element to dynamic string.
|
||||
.AP int length in
|
||||
Number of bytes from \fIbytes\fR to add to dynamic string. If -1,
|
||||
.AP Tcl_Size length in
|
||||
Number of bytes from \fIbytes\fR to add to dynamic string. If negative,
|
||||
add all characters up to null terminating character.
|
||||
.AP int newLength in
|
||||
.AP Tcl_Size newLength in
|
||||
New length for dynamic string, not including null terminating
|
||||
character.
|
||||
.AP Tcl_Interp *interp in/out
|
||||
@@ -132,10 +130,6 @@ caller to fill in the new space.
|
||||
even if the string is truncated to zero length, so \fBTcl_DStringFree\fR
|
||||
will still need to be called.
|
||||
.PP
|
||||
\fBTcl_DStringTrunc\fR changes the length of a dynamic string.
|
||||
This procedure is now deprecated. \fBTcl_DStringSetLength\fR should
|
||||
be used instead.
|
||||
.PP
|
||||
\fBTcl_DStringFree\fR should be called when you are finished using
|
||||
the string. It frees up any memory that was allocated for the string
|
||||
and reinitializes the string's value to an empty string.
|
||||
@@ -148,7 +142,8 @@ This saves the cost of allocating new memory and copying the string.
|
||||
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.
|
||||
calling \fBTcl_DStringInit\fR. The caller must ensure that the dynamic
|
||||
string stored in \fIdsPtr\fR is encoded in Tcl's internal UTF-8 format.
|
||||
.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
|
||||
@@ -156,15 +151,15 @@ 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.
|
||||
\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.
|
||||
The caller must ensure that the dynamic string stored in \fIdsPtr\fR is encoded
|
||||
in Tcl's internal UTF-8 format.
|
||||
|
||||
.SH KEYWORDS
|
||||
append, dynamic string, free, result
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ Tcl_Pid
|
||||
\fBTcl_WaitPid\fR(\fIpid, statusPtr, options\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Pid *statusPtr out
|
||||
.AP int numPids in
|
||||
.AP Tcl_Size numPids in
|
||||
Number of process ids contained in the array pointed to by \fIpidPtr\fR.
|
||||
.AP int *pidPtr in
|
||||
Address of array containing \fInumPids\fR process ids.
|
||||
|
||||
+4
-3
@@ -70,7 +70,7 @@ Points to a variable that will have the value from a key/value pair
|
||||
placed within it. For \fBTcl_DictObjFirst\fR and
|
||||
\fBTcl_DictObjNext\fR, this may be NULL to indicate that the caller is
|
||||
not interested in the value.
|
||||
.AP int *sizePtr out
|
||||
.AP "Tcl_Size \&| int" *sizePtr out
|
||||
Points to a variable that will have the number of key/value pairs
|
||||
contained within the dictionary placed within it.
|
||||
.AP Tcl_DictSearch *searchPtr in/out
|
||||
@@ -84,7 +84,7 @@ returned, the search record \fImust\fR be passed to
|
||||
Points to a variable that will have a non-zero value written into it
|
||||
when the enumeration of the key/value pairs in a dictionary has
|
||||
completed, and a zero otherwise.
|
||||
.AP int keyc in
|
||||
.AP Tcl_Size keyc in
|
||||
Indicates the number of keys that will be supplied in the \fIkeyv\fR
|
||||
array.
|
||||
.AP "Tcl_Obj *const" *keyv in
|
||||
@@ -138,7 +138,8 @@ converted to a dictionary.
|
||||
\fBTcl_DictObjSize\fR updates the given variable with the number of
|
||||
key/value pairs currently in the given dictionary. The result of this
|
||||
procedure is \fBTCL_OK\fR, or \fBTCL_ERROR\fR if the \fIdictPtr\fR cannot be
|
||||
converted to a dictionary.
|
||||
converted to a dictionary or if \fIsizePtr\fR points to a variable of type
|
||||
\fBint\fR and the dict contains more than 2**31 key/value pairs.
|
||||
.PP
|
||||
\fBTcl_DictObjFirst\fR commences an iteration across all the key/value
|
||||
pairs in the given dictionary, placing the key and value in the
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ Tcl_DoWhenIdle, Tcl_CancelIdleCall \- invoke a procedure when there are no pendi
|
||||
.AS Tcl_IdleProc clientData
|
||||
.AP Tcl_IdleProc *proc in
|
||||
Procedure to invoke.
|
||||
.AP ClientData clientData in
|
||||
.AP coid *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -43,7 +43,7 @@ type \fBTcl_IdleProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_IdleProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR
|
||||
|
||||
@@ -43,7 +43,7 @@ is not defined, these functions are all no-ops.
|
||||
\fBTcl_DumpActiveMemory\fR will output a list of all currently
|
||||
allocated memory to the specified file. The information output for
|
||||
each allocated block of memory is: starting and ending addresses
|
||||
(excluding guard zone), size, source file where \fBckalloc\fR was
|
||||
(excluding guard zone), size, source file where \fBTcl_Alloc\fR was
|
||||
called to allocate the block and line number in that file. It is
|
||||
especially useful to call \fBTcl_DumpActiveMemory\fR after the Tcl
|
||||
interpreter has been deleted.
|
||||
@@ -55,8 +55,8 @@ by \fBTcl_Main\fR.
|
||||
\fBTcl_ValidateAllMemory\fR forces a validation of the guard zones of
|
||||
all currently allocated blocks of memory. Normally validation of a
|
||||
block occurs when its freed, unless full validation is enabled, in
|
||||
which case validation of all blocks occurs when \fBckalloc\fR and
|
||||
\fBckfree\fR are called. This function forces the validation to occur
|
||||
which case validation of all blocks occurs when \fBTcl_Alloc\fR and
|
||||
\fBTcl_Free\fR are called. This function forces the validation to occur
|
||||
at any point.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+7
-40
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_GetEncodingFromObj, Tcl_ExternalToUtfDString, Tcl_ExternalToUtfDStringEx, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternalDStringEx, Tcl_UtfToExternal, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNameFromEnvironment, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetEncodingSearchPath, Tcl_SetEncodingSearchPath, Tcl_GetDefaultEncodingDir, Tcl_SetDefaultEncodingDir \- procedures for creating and using encodings
|
||||
Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_GetEncodingFromObj, Tcl_ExternalToUtfDString, Tcl_ExternalToUtfDStringEx, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternalDStringEx, Tcl_UtfToExternal, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNameFromEnvironment, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetEncodingSearchPath, Tcl_SetEncodingSearchPath \- procedures for creating and using encodings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -42,16 +42,10 @@ int
|
||||
\fBTcl_UtfToExternal\fR(\fIinterp, encoding, src, srcLen, flags, statePtr,
|
||||
dst, dstLen, srcReadPtr, dstWrotePtr, dstCharsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_WinTCharToUtf\fR(\fItsrc, srcLen, dstPtr\fR)
|
||||
.sp
|
||||
TCHAR *
|
||||
\fBTcl_WinUtfToTChar\fR(\fIsrc, srcLen, dstPtr\fR)
|
||||
.sp
|
||||
const char *
|
||||
\fBTcl_GetEncodingName\fR(\fIencoding\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_GetEncodingNulLength\fR(\fIencoding\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -71,12 +65,6 @@ Tcl_Obj *
|
||||
.sp
|
||||
int
|
||||
\fBTcl_SetEncodingSearchPath\fR(\fIsearchPath\fR)
|
||||
.sp
|
||||
const char *
|
||||
\fBTcl_GetDefaultEncodingDir\fR(\fIvoid\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_SetDefaultEncodingDir\fR(\fIpath\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tcl_EncodingType" *dstWrotePtr in/out
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -94,11 +82,11 @@ Points to storage where encoding token is to be written.
|
||||
.AP "const char" *src in
|
||||
For the \fBTcl_ExternalToUtf\fR functions, an array of bytes in the
|
||||
specified encoding that are to be converted to UTF-8. For the
|
||||
\fBTcl_UtfToExternal\fR and \fBTcl_WinUtfToTChar\fR functions, an array of
|
||||
\fBTcl_UtfToExternal\fR function, an array of
|
||||
UTF-8 characters to be converted to the specified encoding.
|
||||
.AP "const TCHAR" *tsrc in
|
||||
An array of Windows TCHAR characters to convert to UTF-8.
|
||||
.AP int srcLen in
|
||||
.AP Tcl_Size srcLen in
|
||||
Length of \fIsrc\fR or \fItsrc\fR in bytes. If the length is negative, the
|
||||
encoding-specific length of the string is used.
|
||||
.AP Tcl_DString *dstPtr out
|
||||
@@ -301,18 +289,6 @@ is filled with the corresponding number of bytes that were stored in
|
||||
\fIdst\fR. The return values are the same as the return values for
|
||||
\fBTcl_ExternalToUtf\fR.
|
||||
.PP
|
||||
\fBTcl_WinUtfToTChar\fR and \fBTcl_WinTCharToUtf\fR are Windows-only
|
||||
convenience functions for converting between UTF-8 and Windows strings
|
||||
based on the TCHAR type which is by convention a Unicode character on
|
||||
Windows NT. Those functions are deprecated. You can use
|
||||
\fBTcl_UtfToWCharDString\fR resp. \fBTcl_WCharToUtfDString\fR as replacement.
|
||||
If you want compatibility with earlier Tcl releases than 8.7, use
|
||||
\fBTcl_UtfToUniCharDString\fR resp. \fBTcl_UniCharToUtfDString\fR as
|
||||
replacement, and make sure you compile your extension with -DTCL_UTF_MAX=3.
|
||||
Beware: Those replacement functions don't initialize their Tcl_DString (you'll
|
||||
have to do that yourself), and \fBTcl_UniCharToUtfDString\fR from Tcl 8.6
|
||||
doesn't accept -1 as length parameter.
|
||||
.PP
|
||||
\fBTcl_GetEncodingName\fR is roughly the inverse of \fBTcl_GetEncoding\fR.
|
||||
Given an \fIencoding\fR, the return value is the \fIname\fR argument that
|
||||
was used to create the encoding. The string returned by
|
||||
@@ -342,7 +318,7 @@ the encoding name to it. The \fBTcl_DStringValue\fR is returned.
|
||||
\fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list
|
||||
consisting of the names of all the encodings that are currently defined
|
||||
or can be dynamically loaded, searching the encoding path specified by
|
||||
\fBTcl_SetDefaultEncodingDir\fR. This procedure does not ensure that the
|
||||
\fBTcl_SetEncodingSearchPath\fR. This procedure does not ensure that the
|
||||
dynamically-loadable encoding files contain valid data, but merely that they
|
||||
exist.
|
||||
.PP
|
||||
@@ -370,7 +346,7 @@ typedef struct Tcl_EncodingType {
|
||||
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
|
||||
Tcl_EncodingFreeProc *\fIfreeProc\fR;
|
||||
void *\fIclientData\fR;
|
||||
int \fInullSize\fR;
|
||||
Tcl_Size \fInullSize\fR;
|
||||
} \fBTcl_EncodingType\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -457,15 +433,6 @@ are not verified as existing readable filesystem directories. When
|
||||
searching for encoding data files takes place, and non-existent or
|
||||
non-readable filesystem directories on the \fIsearchPath\fR are silently
|
||||
ignored.
|
||||
.PP
|
||||
\fBTcl_GetDefaultEncodingDir\fR and \fBTcl_SetDefaultEncodingDir\fR
|
||||
are obsolete interfaces best replaced with calls to
|
||||
\fBTcl_GetEncodingSearchPath\fR and \fBTcl_SetEncodingSearchPath\fR.
|
||||
They are called to access and set the first element of the \fIsearchPath\fR
|
||||
list. Since Tcl searches \fIsearchPath\fR for encoding data files in
|
||||
list order, these routines establish the
|
||||
.QW default
|
||||
directory in which to find encoding data files.
|
||||
.SH "ENCODING FILES"
|
||||
Space would prohibit precompiling into Tcl every possible encoding
|
||||
algorithm, so many encodings are stored on disk as dynamically-loadable
|
||||
@@ -622,7 +589,7 @@ with at most one of \fBTCL_ENCODING_PROFILE_TCL8\fR,
|
||||
\fBTCL_ENCODING_PROFILE_STRICT\fR or \fBTCL_ENCODING_PROFILE_REPLACE\fR.
|
||||
These correspond to the \fBtcl8\fR, \fBstrict\fR and \fBreplace\fR profiles
|
||||
respectively. If none are specified, a version-dependent default profile is used.
|
||||
For Tcl 8.7, the default profile is \fBtcl8\fR.
|
||||
For Tcl 9.0, the default profile is \fBtcl8\fR.
|
||||
.PP
|
||||
For details about profiles, see the \fBPROFILES\fR section in
|
||||
the documentation of the \fBencoding\fR command.
|
||||
|
||||
+4
-21
@@ -10,7 +10,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval \- execute Tcl scripts
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -38,9 +38,6 @@ int
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEval\fR(\fIinterp, part, part, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp **termPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -53,7 +50,7 @@ OR'ed combination of flag bits that specify additional options.
|
||||
\fBTCL_EVAL_GLOBAL\fR and \fBTCL_EVAL_DIRECT\fR are currently supported.
|
||||
.AP "const char" *fileName in
|
||||
Name of a file containing a Tcl script.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of values in the array pointed to by \fIobjv\fR;
|
||||
this is also the number of words in the command.
|
||||
.AP Tcl_Obj **objv in
|
||||
@@ -67,9 +64,6 @@ first null byte are used.
|
||||
Points to first byte of script to execute (null-terminated and UTF-8).
|
||||
.AP "const char" *part in
|
||||
String forming part of a Tcl script.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -126,16 +120,10 @@ might be a UTF-8 special code. The string is parsed and executed directly
|
||||
bytecodes. In situations where it is known that the script will never be
|
||||
executed again, \fBTcl_Eval\fR may be faster than \fBTcl_EvalObjEx\fR.
|
||||
\fBTcl_Eval\fR returns a completion code and result just like
|
||||
\fBTcl_EvalObjEx\fR. Note: for backward compatibility with versions before
|
||||
Tcl 8.0, \fBTcl_Eval\fR copies the value result in \fIinterp\fR to
|
||||
\fIinterp->result\fR (use is deprecated) where it can be accessed directly.
|
||||
This makes \fBTcl_Eval\fR somewhat slower than \fBTcl_EvalEx\fR, which
|
||||
does not do the copy.
|
||||
\fBTcl_EvalObjEx\fR.
|
||||
.PP
|
||||
\fBTcl_EvalEx\fR is an extended version of \fBTcl_Eval\fR that takes
|
||||
additional arguments \fInumBytes\fR and \fIflags\fR. For the
|
||||
efficiency reason given above, \fBTcl_EvalEx\fR is generally preferred
|
||||
over \fBTcl_Eval\fR.
|
||||
additional arguments \fInumBytes\fR and \fIflags\fR.
|
||||
.PP
|
||||
\fBTcl_GlobalEval\fR and \fBTcl_GlobalEvalObj\fR are older procedures
|
||||
that are now deprecated. They are similar to \fBTcl_EvalEx\fR and
|
||||
@@ -151,11 +139,6 @@ It returns the result of the command and also modifies
|
||||
the interpreter result in the same way as \fBTcl_Eval\fR.
|
||||
The last argument to \fBTcl_VarEval\fR must be NULL to indicate the end
|
||||
of arguments. \fBTcl_VarEval\fR is now deprecated.
|
||||
.PP
|
||||
\fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument
|
||||
list. Interfaces using argument lists have been found to be nonportable
|
||||
in practice. This function is deprecated and will be removed in Tcl 9.0.
|
||||
|
||||
.SH "FLAG BITS"
|
||||
.PP
|
||||
|
||||
+5
-6
@@ -42,7 +42,7 @@ usually means that an error occurred.
|
||||
Procedure to invoke before exiting application, or (for
|
||||
\fBTcl_SetExitProc\fR) NULL to uninstall the current application exit
|
||||
procedure.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
@@ -64,7 +64,7 @@ otherwise causes the application to terminate without calling
|
||||
returns control to its caller.
|
||||
If an application exit handler has been installed (see
|
||||
\fBTcl_SetExitProc\fR), that handler is invoked with an argument
|
||||
consisting of the exit status (cast to ClientData); the application
|
||||
consisting of the exit status (cast to void *); the application
|
||||
exit handler should not return control to Tcl.
|
||||
.PP
|
||||
\fBTcl_Finalize\fR is similar to \fBTcl_Exit\fR except that it does not
|
||||
@@ -93,7 +93,7 @@ and freeing global memory.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ExitProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a
|
||||
@@ -133,10 +133,9 @@ installed, that exit handler takes over complete responsibility for
|
||||
finalization of Tcl's subsystems via \fBTcl_Finalize\fR at an
|
||||
appropriate time. The argument passed to \fIproc\fR when it is
|
||||
invoked will be the exit status code (as passed to \fBTcl_Exit\fR)
|
||||
cast to a ClientData value.
|
||||
cast to a void *value.
|
||||
.PP
|
||||
\fBTcl_SetExitProc\fR can not be used in stub-enabled extensions. Its symbol
|
||||
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
|
||||
\fBTcl_SetExitProc\fR can not be used in stub-enabled extensions.
|
||||
.SH "SEE ALSO"
|
||||
exit(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+20
-34
@@ -20,7 +20,7 @@ int
|
||||
int
|
||||
\fBTcl_FSUnregister\fR(\fIfsPtr\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_FSData\fR(\fIfsPtr\fR)
|
||||
.sp
|
||||
void
|
||||
@@ -123,7 +123,7 @@ Tcl_Obj *
|
||||
int
|
||||
\fBTcl_FSConvertToPathType\fR(\fIinterp, pathPtr\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_FSGetInternalRep\fR(\fIpathPtr, fsPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -210,7 +210,7 @@ this structure will be returned. This parameter may be NULL.
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use either for results, evaluation, or reporting error
|
||||
messages.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
The native description of the path value to create.
|
||||
.AP Tcl_Obj *firstPtr in
|
||||
The first of two path values to compare. The value may be converted
|
||||
@@ -220,8 +220,8 @@ The second of two path values to compare. The value may be converted
|
||||
to \fBpath\fR type.
|
||||
.AP Tcl_Obj *listObj in
|
||||
The list of path elements to operate on with a \fBjoin\fR operation.
|
||||
.AP int elements in
|
||||
If non-negative, the number of elements in the \fIlistObj\fR which should
|
||||
.AP Tcl_Size elements in
|
||||
The number of elements in the \fIlistObj\fR which should
|
||||
be joined together. If negative, then all elements are joined.
|
||||
.AP Tcl_Obj **errorPtr out
|
||||
In the case of an error, filled with a value containing the name of
|
||||
@@ -251,7 +251,7 @@ Name of a procedure to look up in the file's symbol table
|
||||
Filled with the init function for this code.
|
||||
.AP Tcl_LibraryInitProc **proc2Ptr out
|
||||
Filled with the safe-init function for this code.
|
||||
.AP ClientData *clientDataPtr out
|
||||
.AP void **clientDataPtr out
|
||||
Filled with the clientData value to pass to this code's unload
|
||||
function when it is called.
|
||||
.AP Tcl_LoadHandle *loadHandlePtr out
|
||||
@@ -269,11 +269,11 @@ allowed for the \fImode\fR argument to the Tcl \fBopen\fR command.
|
||||
.AP int permissions in
|
||||
POSIX-style permission flags such as 0644. If a new file is created, these
|
||||
permissions will be set on the created file.
|
||||
.AP int *lenPtr out
|
||||
.AP "Tcl_Size \&| int" *lenPtr out
|
||||
If non-NULL, filled with the number of elements in the split path.
|
||||
.AP Tcl_Obj *basePtr in
|
||||
The base path on to which to join the given elements. May be NULL.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of elements in \fIobjv\fR.
|
||||
.AP "Tcl_Obj *const" objv[] in
|
||||
The elements to join to the given base path.
|
||||
@@ -678,11 +678,6 @@ of zero, they will be freed when this function returns.
|
||||
\fBTcl_FSConvertToPathType\fR tries to convert the given Tcl_Obj to a valid
|
||||
Tcl path type, taking account of the fact that the cwd may have changed
|
||||
even if this value is already supposedly of the correct type.
|
||||
The filename may begin with
|
||||
.QW ~
|
||||
(to indicate current user's home directory) or
|
||||
.QW ~<user>
|
||||
(to indicate any user's home directory).
|
||||
.PP
|
||||
If the conversion succeeds (i.e.\ the value is a valid path in one of
|
||||
the current filesystems), then \fBTCL_OK\fR is returned. Otherwise
|
||||
@@ -704,14 +699,7 @@ from the given Tcl_Obj.
|
||||
.PP
|
||||
If the translation succeeds (i.e.\ the value is a valid path), then it is
|
||||
returned. Otherwise NULL will be returned, and an error message may be
|
||||
left in the interpreter. A
|
||||
.QW translated
|
||||
path is one which contains no
|
||||
.QW ~
|
||||
or
|
||||
.QW ~user
|
||||
sequences (these have been expanded to their current
|
||||
representation in the filesystem). The value returned is owned by the
|
||||
left in the interpreter. The value returned is owned by the
|
||||
caller, which must store it or call \fBTcl_DecrRefCount\fR to ensure memory is
|
||||
freed. This function is of little practical use, and
|
||||
\fBTcl_FSGetNormalizedPath\fR or \fBTcl_FSGetNativePath\fR are usually
|
||||
@@ -720,7 +708,7 @@ better functions to use for most purposes.
|
||||
\fBTcl_FSGetTranslatedStringPath\fR does the same as
|
||||
\fBTcl_FSGetTranslatedPath\fR, but returns a character string or NULL.
|
||||
The string returned is dynamically allocated and owned by the caller,
|
||||
which must store it or call \fBckfree\fR to ensure it is freed. Again,
|
||||
which must store it or call \fBTcl_Free\fR to ensure it is freed. Again,
|
||||
\fBTcl_FSGetNormalizedPath\fR or \fBTcl_FSGetNativePath\fR are usually
|
||||
better functions to use for most purposes.
|
||||
.PP
|
||||
@@ -787,7 +775,7 @@ It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or
|
||||
.SS "PORTABLE STAT RESULT API"
|
||||
.PP
|
||||
\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system heap (which
|
||||
may be deallocated by being passed to \fBckfree\fR). This allows extensions to
|
||||
may be deallocated by being passed to \fBTcl_Free\fR). This allows extensions to
|
||||
invoke \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR without being dependent on the
|
||||
size of the buffer. That in turn depends on the flags used to build Tcl.
|
||||
.PP
|
||||
@@ -835,7 +823,7 @@ general that is not a good thing to do). \fBTCL_OK\fR will be returned.
|
||||
the list of known filesystems, if it is known, and returns \fBTCL_OK\fR. If
|
||||
the filesystem is not currently registered, \fBTCL_ERROR\fR is returned.
|
||||
.PP
|
||||
\fBTcl_FSData\fR will return the ClientData associated with the given
|
||||
\fBTcl_FSData\fR will return the clientData associated with the given
|
||||
filesystem, if that filesystem is registered. Otherwise it will
|
||||
return NULL.
|
||||
.PP
|
||||
@@ -850,7 +838,7 @@ The \fBTcl_Filesystem\fR structure contains the following fields:
|
||||
.CS
|
||||
typedef struct Tcl_Filesystem {
|
||||
const char *\fItypeName\fR;
|
||||
int \fIstructureLength\fR;
|
||||
Tcl_Size \fIstructureLength\fR;
|
||||
Tcl_FSVersion \fIversion\fR;
|
||||
Tcl_FSPathInFilesystemProc *\fIpathInFilesystemProc\fR;
|
||||
Tcl_FSDupInternalRepProc *\fIdupInternalRepProc\fR;
|
||||
@@ -1012,7 +1000,7 @@ Tcl's internal list of known filesystems.
|
||||
.CS
|
||||
typedef int \fBTcl_FSPathInFilesystemProc\fR(
|
||||
Tcl_Obj *\fIpathPtr\fR,
|
||||
ClientData *\fIclientDataPtr\fR);
|
||||
void **\fIclientDataPtr\fR);
|
||||
.CE
|
||||
.SS DUPINTERNALREPPROC
|
||||
.PP
|
||||
@@ -1022,8 +1010,8 @@ simply not copy the internal representation, which may then need to be
|
||||
regenerated later.
|
||||
.PP
|
||||
.CS
|
||||
typedef ClientData \fBTcl_FSDupInternalRepProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
typedef void *\fBTcl_FSDupInternalRepProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.SS FREEINTERNALREPPROC
|
||||
Free the internal representation. This must be implemented if internal
|
||||
@@ -1032,7 +1020,7 @@ internal representation is generated), but may otherwise be NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_FSFreeInternalRepProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.SS INTERNALTONORMALIZEDPROC
|
||||
.PP
|
||||
@@ -1043,7 +1031,7 @@ representation is the normalized path.
|
||||
.PP
|
||||
.CS
|
||||
typedef Tcl_Obj *\fBTcl_FSInternalToNormalizedProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.SS CREATEINTERNALREPPROC
|
||||
.PP
|
||||
@@ -1054,7 +1042,7 @@ the \fITcl_FSPathInFilesystemProc\fR for this filesystem always
|
||||
immediately creates an internal representation for paths it accepts.
|
||||
.PP
|
||||
.CS
|
||||
typedef ClientData \fBTcl_FSCreateInternalRepProc\fR(
|
||||
typedef void *\fBTcl_FSCreateInternalRepProc\fR(
|
||||
Tcl_Obj *\fIpathPtr\fR);
|
||||
.CE
|
||||
.SS NORMALIZEPATHPROC
|
||||
@@ -1068,9 +1056,7 @@ must have a single unique
|
||||
string representation. Depending on the filesystem,
|
||||
there may be more than one unnormalized string representation which
|
||||
refers to that path (e.g.\ a relative path, a path with different
|
||||
character case if the filesystem is case insensitive, a path contain a
|
||||
reference to a home directory such as
|
||||
.QW ~ ,
|
||||
character case if the filesystem is case insensitive,
|
||||
a path containing symbolic
|
||||
links, etc). If the very last component in the path is a symbolic
|
||||
link, it should not be converted into the value it points to (but
|
||||
|
||||
+3
-4
@@ -35,8 +35,8 @@ Tcl. For example, it is needed on some platforms in the
|
||||
implementation of the \fBload\fR command.
|
||||
It is also returned by the \fBinfo nameofexecutable\fR command.
|
||||
.PP
|
||||
The result of \fBTcl_FindExecutable\fR is the full Tcl version (e.g.,
|
||||
\fB8.7.0+abcdef...abcdef.gcc-1002.utf16\fR).
|
||||
The result of \fBTcl_FindExecutable\fR is the full Tcl version with
|
||||
build information (e.g., \fB9.0.0+abcdef...abcdef.gcc-1002\fR).
|
||||
.PP
|
||||
On UNIX platforms this procedure is typically invoked as the very
|
||||
first thing in the application's main program; it must be passed
|
||||
@@ -62,7 +62,6 @@ equivalent to the \fBinfo nameofexecutable\fR command. NULL
|
||||
is returned if the internal full path name has not been
|
||||
computed or unknown.
|
||||
.PP
|
||||
\fBTcl_FindExecutable\fR can not be used in stub-enabled extensions. Its symbol
|
||||
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
|
||||
\fBTcl_FindExecutable\fR can not be used in stub-enabled extensions.
|
||||
.SH KEYWORDS
|
||||
binary, executable file
|
||||
|
||||
+2
-5
@@ -71,12 +71,9 @@ if the first such characters are
|
||||
then \fIsrc\fR is expected to be in octal form; otherwise,
|
||||
if the first such characters are
|
||||
.QW \fB0b\fR
|
||||
then \fIsrc\fR is expected to be in binary form; otherwise,
|
||||
if the first such character is
|
||||
.QW \fB0\fR
|
||||
then \fIsrc\fR
|
||||
is expected to be in octal form; otherwise, \fIsrc\fR
|
||||
is expected to be in decimal form.
|
||||
is expected to be in binary form; otherwise, \fIsrc\fR is
|
||||
expected to be in decimal form.
|
||||
.PP
|
||||
\fBTcl_GetDouble\fR expects \fIsrc\fR to consist of a floating-point
|
||||
number, which is: white space; a sign; a sequence of digits; a
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ be used for reading.
|
||||
.AP int checkUsage in
|
||||
If non-zero, then an error will be generated if the file was not opened
|
||||
for the access indicated by \fIwrite\fR.
|
||||
.AP ClientData *filePtr out
|
||||
.AP void **filePtr out
|
||||
Points to word in which to store pointer to FILE structure for
|
||||
the file given by \fIchanID\fR.
|
||||
.BE
|
||||
|
||||
+5
-5
@@ -27,13 +27,13 @@ Pointer to handler function replacing \fBTcl_GetTime\fR's access to the OS.
|
||||
.AP Tcl_ScaleTimeProc scaleProc in
|
||||
Pointer to handler function for the conversion of time delays in the
|
||||
virtual domain to real-time.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Value passed through to the two handler functions.
|
||||
.AP Tcl_GetTimeProc *getProcPtr out
|
||||
Pointer to place the currently registered get handler function into.
|
||||
.AP Tcl_ScaleTimeProc *scaleProcPtr out
|
||||
Pointer to place the currently registered scale handler function into.
|
||||
.AP ClientData *clientDataPtr out
|
||||
.AP void **clientDataPtr out
|
||||
Pointer to place the currently registered pass-through value into.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -44,7 +44,7 @@ structure has the following definition:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Time {
|
||||
long \fIsec\fR;
|
||||
long long \fIsec\fR;
|
||||
long \fIusec\fR;
|
||||
} \fBTcl_Time\fR;
|
||||
.CE
|
||||
@@ -83,10 +83,10 @@ The signatures of the handler functions are as follows:
|
||||
.CS
|
||||
typedef void \fBTcl_GetTimeProc\fR(
|
||||
Tcl_Time *\fItimebuf\fR,
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
typedef void \fBTcl_ScaleTimeProc\fR(
|
||||
Tcl_Time *\fItimebuf\fR,
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fItimebuf\fR fields contain the time to manipulate, and the
|
||||
|
||||
+1
-2
@@ -15,14 +15,13 @@ Tcl_GetVersion \- get the version of the library at runtime
|
||||
.sp
|
||||
\fBTcl_GetVersion\fR(\fImajor, minor, patchLevel, type\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_ReleaseType *patchLevel out
|
||||
.AP int *major out
|
||||
Major version number of the Tcl library.
|
||||
.AP int *minor out
|
||||
Minor version number of the Tcl library.
|
||||
.AP int *patchLevel out
|
||||
The patch level of the Tcl library (or alpha or beta number).
|
||||
.AP Tcl_ReleaseType *type out
|
||||
.AP int *type out
|
||||
The type of release, also indicates the type of patch level. Can be
|
||||
one of \fBTCL_ALPHA_RELEASE\fR, \fBTCL_BETA_RELEASE\fR, or
|
||||
\fBTCL_FINAL_RELEASE\fR.
|
||||
|
||||
+4
-10
@@ -30,7 +30,7 @@ Tcl_HashEntry *
|
||||
Tcl_HashEntry *
|
||||
\fBTcl_FindHashEntry\fR(\fItablePtr, key\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_GetHashValue\fR(\fIentryPtr\fR)
|
||||
.sp
|
||||
\fBTcl_SetHashValue\fR(\fIentryPtr, value\fR)
|
||||
@@ -66,9 +66,8 @@ The word at \fI*newPtr\fR is set to 1 if a new entry was created
|
||||
and 0 if there was already an entry for \fIkey\fR.
|
||||
.AP Tcl_HashEntry *entryPtr in
|
||||
Pointer to hash table entry.
|
||||
.AP ClientData value in
|
||||
New value to assign to hash table entry. Need not have type
|
||||
ClientData, but must fit in same space as ClientData.
|
||||
.AP void *value in
|
||||
New value to assign to hash table entry.
|
||||
.AP Tcl_HashSearch *searchPtr in
|
||||
Pointer to record to use to keep track of progress in enumerating
|
||||
all the entries in a hash table.
|
||||
@@ -186,11 +185,6 @@ instead, it returns NULL as result.
|
||||
.PP
|
||||
\fBTcl_GetHashValue\fR and \fBTcl_SetHashValue\fR are used to
|
||||
read and write an entry's value, respectively.
|
||||
Values are stored and retrieved as type
|
||||
.QW ClientData ,
|
||||
which is
|
||||
large enough to hold a pointer value. On almost all machines this is
|
||||
large enough to hold an integer value too.
|
||||
.PP
|
||||
\fBTcl_GetHashKey\fR returns the key for a given hash table entry,
|
||||
either as a pointer to a string, a one-word
|
||||
@@ -229,7 +223,7 @@ overall information about a hash table, such as the number of
|
||||
entries it contains, the number of buckets in its hash array,
|
||||
and the utilization of the buckets.
|
||||
It is the caller's responsibility to free the result string
|
||||
by passing it to \fBckfree\fR.
|
||||
by passing it to \fBTcl_Free\fR.
|
||||
.PP
|
||||
The header file \fBtcl.h\fR defines the actual data structures
|
||||
used to implement hash tables.
|
||||
|
||||
+5
-1
@@ -2,7 +2,7 @@
|
||||
'\" Copyright (c) 1998-2000 Scriptics Corporation.
|
||||
'\" All rights reserved.
|
||||
'\"
|
||||
.TH Tcl_Init 3 8.7 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_Init 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
@@ -39,6 +39,10 @@ The pre-initialization script is executed by \fBTcl_Init\fR before accessing
|
||||
the file system. The purpose is to typically prepare a custom file system
|
||||
(like an embedded zip-file) to be activated before the search.
|
||||
|
||||
When used in stub-enabled embedders, the stubs table must be first initialized
|
||||
using one of \fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR, \fBTcl_FindExecutable\fR
|
||||
or \fBTclZipfs_AppHook\fR before \fBTcl_SetPreInitScript\fR may be called.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
Tcl_AppInit, Tcl_Main
|
||||
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@ Define the \fBUSE_TCL_STUBS\fR symbol. Typically, you would include the
|
||||
\fB\-DUSE_TCL_STUBS\fR flag when compiling the extension.
|
||||
.IP 3) 5
|
||||
Link the extension with the Tcl stubs library instead of the standard
|
||||
Tcl library. For example, to use the Tcl 8.6 ABI on Unix platforms,
|
||||
the library name is \fIlibtclstub8.6.a\fR; on Windows platforms, the
|
||||
library name is \fItclstub86.lib\fR.
|
||||
Tcl library. For example, to use the Tcl 9.0 ABI on Unix platforms,
|
||||
the library name is \fIlibtclstub9.0.a\fR; on Windows platforms, the
|
||||
library name is \fItclstub90.lib\fR.
|
||||
.PP
|
||||
If the extension also requires the Tk API, it must also call
|
||||
\fBTk_InitStubs\fR to initialize the Tk stubs interface and link
|
||||
|
||||
+4
-4
@@ -21,14 +21,14 @@ The \fBTcl_InitSubsystems\fR procedure initializes the Tcl
|
||||
library. This procedure is typically invoked as the very
|
||||
first thing in the application's main program.
|
||||
.PP
|
||||
The result of \fBTcl_InitSubsystems\fR is the full Tcl version (e.g.,
|
||||
\fB8.7.0+abcdef...abcdef.gcc-1002.utf16\fR).
|
||||
The result of \fBTcl_InitSubsystems\fR is the full Tcl version with
|
||||
build information (e.g., \fB9.0.0+abcdef...abcdef.gcc-1002\fR).
|
||||
.PP
|
||||
\fBTcl_InitSubsystems\fR is very similar in use to
|
||||
\fBTcl_FindExecutable\fR. It can be used when Tcl is
|
||||
used as utility library, no other encodings than utf8,
|
||||
used as utility library, no other encodings than utf-8,
|
||||
iso8859-1 or utf-16 are used, and no interest exists in the
|
||||
value of \fBinfo nameofexecutable\fR. The system encoding will not
|
||||
be extracted from the environment, but falls back to iso8859-1.
|
||||
be extracted from the environment, but falls back to utf-8.
|
||||
.SH KEYWORDS
|
||||
binary, executable file
|
||||
|
||||
+11
-3
@@ -32,7 +32,7 @@ int
|
||||
\fBTcl_GetIntFromObj\fR(\fIinterp, objPtr, intPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetIntForIndex\fR(\fIinterp, objPtr, endValue, intPtr\fR)
|
||||
\fBTcl_GetIntForIndex\fR(\fIinterp, objPtr, endValue, indexPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetLongFromObj\fR(\fIinterp, objPtr, longPtr\fR)
|
||||
@@ -43,6 +43,9 @@ int
|
||||
int
|
||||
\fBTcl_GetWideUIntFromObj\fR(\fIinterp, objPtr, uwidePtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetSizeIntFromObj\fR(\fIinterp, objPtr, sizePtr\fR)
|
||||
.sp
|
||||
.sp
|
||||
\fB#include <tclTomMath.h>\fR
|
||||
.sp
|
||||
@@ -61,7 +64,7 @@ int
|
||||
\fBTcl_InitBignumFromDouble\fR(\fIinterp, doubleValue, bigValue\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_WideInt doubleValue in/out
|
||||
.AP int endValue in
|
||||
.AP Tcl_Size endValue in
|
||||
\fBTcl_GetIntForIndex\fR will return this when the input value is "end".
|
||||
.AP int intValue in
|
||||
Integer value used to initialize or set a Tcl value.
|
||||
@@ -83,10 +86,14 @@ retrieval fails.
|
||||
Points to place to store the integer value retrieved from \fIobjPtr\fR.
|
||||
.AP long *longPtr out
|
||||
Points to place to store the long integer value retrieved from \fIobjPtr\fR.
|
||||
.AP Tcl_Size *indexPtr out
|
||||
Points to place to store the Tcl_Size 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 Tcl_Size *sizePtr out
|
||||
Points to place to store the \fBTcl_Size\fR integer value retrieved from \fIobjPtr\fR.
|
||||
.AP mp_int *bigValue in/out
|
||||
Points to a multi-precision integer structure declared by the LibTomMath
|
||||
library.
|
||||
@@ -136,7 +143,8 @@ of \fIobjPtr\fR may be changed to make subsequent calls to the
|
||||
same routine more efficient.
|
||||
.PP
|
||||
The \fBTcl_GetIntFromObj\fR, \fBTcl_GetLongFromObj\fR,
|
||||
\fBTcl_GetWideIntFromObj\fR, \fBTcl_GetBignumFromObj\fR, and
|
||||
\fBTcl_GetWideIntFromObj\fR, \fBTcl_GetSizeIntFromObj\fR,
|
||||
\fBTcl_GetBignumFromObj\fR, and
|
||||
\fBTcl_TakeBignumFromObj\fR routines attempt to retrieve an integral
|
||||
value of the appropriate type from the Tcl value \fIobjPtr\fR. If the
|
||||
attempt succeeds, then \fBTCL_OK\fR is returned, and the value is
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_Interp 3 8.7 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Interp \- client-visible fields of interpreter structures
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
typedef struct {
|
||||
char *\fIresult\fR; /* NO LONGER AVAILABLE */
|
||||
Tcl_FreeProc *\fIfreeProc\fR; /* NO LONGER AVAILABLE */
|
||||
int \fIerrorLine\fR; /* NO LONGER AVAILABLE */
|
||||
} \fBTcl_Interp\fR;
|
||||
|
||||
typedef void \fBTcl_FreeProc\fR(
|
||||
char *\fIblockPtr\fR);
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBTcl_CreateInterp\fR procedure returns a pointer to a \fBTcl_Interp\fR
|
||||
structure. Callers of \fBTcl_CreateInterp\fR should use this pointer
|
||||
as an opaque token, suitable for nothing other than passing back to
|
||||
other routines in the Tcl interface from the same thread that called
|
||||
\fBTcl_CreateInterp\fR. The \fBTcl_Interp\fR struct no longer has any
|
||||
supported client-visible fields. Supported public routines such as
|
||||
\fBTcl_SetResult\fR, \fBTcl_GetResult\fR, \fBTcl_SetErrorLine\fR,
|
||||
\fBTcl_GetErrorLine\fR must be used instead.
|
||||
.PP
|
||||
Any legacy programs and extensions trying to access the fields above
|
||||
in their source code will need conversion to compile for Tcl 8.7 and later.
|
||||
|
||||
.SH KEYWORDS
|
||||
interpreter, result
|
||||
+4
-4
@@ -65,7 +65,7 @@ its limits checked.
|
||||
.AP int type in
|
||||
The type of limit that the operation refers to. This must be either
|
||||
\fBTCL_LIMIT_COMMANDS\fR or \fBTCL_LIMIT_TIME\fR.
|
||||
.AP int commandLimit in
|
||||
.AP Tcl_Size commandLimit in
|
||||
The maximum number of commands (as reported by \fBinfo cmdcount\fR)
|
||||
that may be executed in the interpreter.
|
||||
.AP Tcl_Time *timeLimitPtr in/out
|
||||
@@ -83,7 +83,7 @@ the handler returns. Many handlers may be attached to the same
|
||||
interpreter limit; their order of execution is not defined, and they
|
||||
must be identified by \fIhandlerProc\fR and \fIclientData\fR when they
|
||||
are deleted.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary pointer-sized word used to pass some context to the
|
||||
\fIhandlerProc\fR function.
|
||||
.AP Tcl_LimitHandlerDeleteProc *deleteProc in
|
||||
@@ -162,7 +162,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_LimitHandlerProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -179,7 +179,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_LimitHandlerDeleteProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
A limit handler may be deleted using \fBTcl_LimitRemoveHandler\fR; the
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ In \fBTcl_LinkArray\fR, the additional linked types \fBTCL_LINK_CHARS\fR and
|
||||
All the above for both functions may be
|
||||
optionally OR'ed with \fBTCL_LINK_READ_ONLY\fR to make the Tcl
|
||||
variable read-only.
|
||||
.AP int size in
|
||||
.AP Tcl_Size size in
|
||||
.VS "TIP 312"
|
||||
The number of elements in the C array. Must be greater than zero.
|
||||
.VE "TIP 312"
|
||||
@@ -263,7 +263,7 @@ Tcl errors.
|
||||
.
|
||||
The C variable is of type \fBchar *\fR.
|
||||
If its value is not NULL then it must be a pointer to a string
|
||||
allocated with \fBTcl_Alloc\fR or \fBckalloc\fR.
|
||||
allocated with \fBTcl_Alloc\fR.
|
||||
Whenever the Tcl variable is modified the current C string will be
|
||||
freed and new memory will be allocated to hold a copy of the variable's
|
||||
new value.
|
||||
|
||||
+12
-8
@@ -59,13 +59,13 @@ points to the Tcl value that will be appended to \fIlistPtr\fR.
|
||||
For \fBTcl_SetListObj\fR,
|
||||
this points to the Tcl value that will be converted to a list value
|
||||
containing the \fIobjc\fR elements of the array referenced by \fIobjv\fR.
|
||||
.AP int *objcPtr in
|
||||
.AP "Tcl_Size \&| int" *objcPtr in
|
||||
Points to location where \fBTcl_ListObjGetElements\fR
|
||||
stores the number of element values in \fIlistPtr\fR.
|
||||
.AP Tcl_Obj ***objvPtr out
|
||||
A location where \fBTcl_ListObjGetElements\fR stores a pointer to an array
|
||||
of pointers to the element values of \fIlistPtr\fR.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of Tcl values that \fBTcl_NewListObj\fR
|
||||
will insert into a new list value,
|
||||
and \fBTcl_ListObjReplace\fR will insert into \fIlistPtr\fR.
|
||||
@@ -76,21 +76,21 @@ An array of pointers to values.
|
||||
\fBTcl_NewListObj\fR will insert these values into a new list value
|
||||
and \fBTcl_ListObjReplace\fR will insert them into an existing \fIlistPtr\fR.
|
||||
Each value will become a separate list element.
|
||||
.AP int *lengthPtr out
|
||||
.AP "Tcl_Size \&| int" *lengthPtr out
|
||||
Points to location where \fBTcl_ListObjLength\fR
|
||||
stores the length of the list.
|
||||
.AP int index in
|
||||
.AP Tcl_Size index in
|
||||
Index of the list element that \fBTcl_ListObjIndex\fR
|
||||
is to return.
|
||||
The first element has index 0.
|
||||
.AP Tcl_Obj **objPtrPtr out
|
||||
Points to place where \fBTcl_ListObjIndex\fR is to store
|
||||
a pointer to the resulting list element value.
|
||||
.AP int first in
|
||||
.AP Tcl_Size first in
|
||||
Index of the starting list element that \fBTcl_ListObjReplace\fR
|
||||
is to replace.
|
||||
The list's first element has index 0.
|
||||
.AP int count in
|
||||
.AP Tcl_Size count in
|
||||
The number of elements that \fBTcl_ListObjReplace\fR
|
||||
is to replace.
|
||||
.BE
|
||||
@@ -153,7 +153,9 @@ address \fIobjcPtr\fR. Similarly, it returns the array pointer by storing
|
||||
it in the address \fIobjvPtr\fR.
|
||||
The memory pointed to is managed by Tcl and should not be freed or written
|
||||
to by the caller. If the list is empty, 0 is stored at \fIobjcPtr\fR
|
||||
and NULL at \fIobjvPtr\fR.
|
||||
and NULL at \fIobjvPtr\fR. If \fIobjcPtr\fR points to a variable
|
||||
of type \fBint\fR and the list contains more than 2**31 elements, the
|
||||
function returns \fBTCL_ERROR\fR.
|
||||
If \fIlistPtr\fR is not already a list value, \fBTcl_ListObjGetElements\fR
|
||||
will attempt to convert it to one; if the conversion fails, it returns
|
||||
\fBTCL_ERROR\fR and leaves an error message in the interpreter's result
|
||||
@@ -162,7 +164,9 @@ Otherwise it returns \fBTCL_OK\fR after storing the count and array pointer.
|
||||
.PP
|
||||
\fBTcl_ListObjLength\fR returns the number of elements in the list value
|
||||
referenced by \fIlistPtr\fR.
|
||||
It returns this count by storing an integer in the address \fIlengthPtr\fR.
|
||||
It returns this count by storing a value in the address \fIlengthPtr\fR.
|
||||
If \fIlengthPtr\fR points to a variable of type \fBint\fR and the list
|
||||
contains more than 2**31 elements, the function returns \fBTCL_ERROR\fR.
|
||||
If the value is not already a list value,
|
||||
\fBTcl_ListObjLength\fR will attempt to convert it to one;
|
||||
if the conversion fails, it returns \fBTCL_ERROR\fR
|
||||
|
||||
+10
-10
@@ -58,10 +58,10 @@ Tcl_Method
|
||||
Tcl_Object
|
||||
\fBTcl_ObjectContextObject\fR(\fIcontext\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ObjectContextSkippedArgs\fR(\fIcontext\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS ClientData clientData in
|
||||
.AS void *clientData in
|
||||
.AP Tcl_Interp *interp in/out
|
||||
The interpreter holding the object or class to create or update a method in.
|
||||
.AP Tcl_Object object in
|
||||
@@ -83,10 +83,10 @@ and \fBTCL_OO_METHOD_PRIVATE\fR for a private method.
|
||||
.AP Tcl_MethodType *methodTypePtr in
|
||||
A description of the type of the method to create, or the type of method to
|
||||
compare against.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
A piece of data that is passed to the implementation of the method without
|
||||
interpretation.
|
||||
.AP ClientData *clientDataPtr out
|
||||
.AP void **clientDataPtr out
|
||||
A pointer to a variable in which to write the \fIclientData\fR value supplied
|
||||
when the method was created. If NULL, the \fIclientData\fR value will not be
|
||||
retrieved.
|
||||
@@ -95,11 +95,11 @@ A reference to a method to query.
|
||||
.AP Tcl_ObjectContext context in
|
||||
A reference to a method-call context. Note that client code \fImust not\fR
|
||||
retain a reference to a context.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of arguments to pass to the method implementation.
|
||||
.AP "Tcl_Obj *const" *objv in
|
||||
An array of arguments to pass to the method implementation.
|
||||
.AP int skip in
|
||||
.AP Tcl_Size skip in
|
||||
The number of arguments passed to the method implementation that do not
|
||||
represent "real" arguments.
|
||||
.BE
|
||||
@@ -213,7 +213,7 @@ Functions matching this signature are called when the method is invoked.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_MethodCallProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_ObjectContext \fIobjectContext\fR,
|
||||
int \fIobjc\fR,
|
||||
@@ -234,7 +234,7 @@ through a new method being created or because the object or class is deleted.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_MethodDeleteProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument to a Tcl_MethodDeleteProc will be the same as
|
||||
@@ -248,8 +248,8 @@ class is copied using \fBTcl_CopyObjectInstance\fR (or \fBoo::copy\fR).
|
||||
.CS
|
||||
typedef int \fBTcl_CloneProc\fR(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
ClientData \fIoldClientData\fR,
|
||||
ClientData *\fInewClientDataPtr\fR);
|
||||
void *\fIoldClientData\fR,
|
||||
void **\fInewClientDataPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument gives a place to write an error message when the
|
||||
|
||||
@@ -63,13 +63,13 @@ in the same way as the \fIproc2\fR argument to \fBTcl_CreateObjCommand2\fR(3)
|
||||
Called instead of \fIproc\fR when a trampoline is already in use.
|
||||
.AP Tcl_ObjCmdProc2 *nreProc2 in
|
||||
Called instead of \fIproc2\fR when a trampoline is already in use.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value passed to \fIproc\fR, \fInreProc\fR, \fIdeleteProc\fR
|
||||
and \fIobjProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in/out
|
||||
Called before \fIcmdName\fR is deleted from the interpreter, allowing for
|
||||
command-specific cleanup. May be NULL.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
Number of items in \fIobjv\fR.
|
||||
.AP Tcl_Obj **objv in
|
||||
Words in the command.
|
||||
@@ -86,10 +86,10 @@ Pointer to an unshared Tcl_Obj where the result of the evaluation is stored if
|
||||
the return code is TCL_OK.
|
||||
.AP Tcl_NRPostProc *postProcPtr in
|
||||
A function to push.
|
||||
.AP ClientData data0 in
|
||||
.AP ClientData data1 in
|
||||
.AP ClientData data2 in
|
||||
.AP ClientData data3 in
|
||||
.AP void *data0 in
|
||||
.AP void *data1 in
|
||||
.AP void *data2 in
|
||||
.AP void *data3 in
|
||||
\fIdata0\fR through \fIdata3\fR are four one-word values that will be passed
|
||||
to the function designated by \fIpostProcPtr\fR when it is invoked.
|
||||
.BE
|
||||
@@ -147,7 +147,7 @@ a message as the interpreter's result.
|
||||
.CS
|
||||
typedef int
|
||||
\fBTcl_NRPostProc\fR(
|
||||
\fBClientData\fR \fIdata\fR[],
|
||||
\fBvoid *\fR \fIdata\fR[],
|
||||
\fBTcl_Interp\fR *\fIinterp\fR,
|
||||
int \fIresult\fR);
|
||||
.CE
|
||||
@@ -163,7 +163,7 @@ stack, to evalute a script:
|
||||
.CS
|
||||
int
|
||||
\fITheCmdOldObjProc\fR(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -194,7 +194,7 @@ call \fITheCmdNRObjProc\fR:
|
||||
.CS
|
||||
int
|
||||
\fITheCmdOldObjProc\fR(
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -207,7 +207,7 @@ int
|
||||
.CS
|
||||
int
|
||||
\fITheCmdNRObjProc\fR
|
||||
ClientData clientData,
|
||||
void *clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -228,7 +228,7 @@ int
|
||||
.CS
|
||||
int
|
||||
\fITheCmdNRPostProc\fR(
|
||||
ClientData data[],
|
||||
void *data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ The interpreter in which the namespace exists and where name lookups
|
||||
are performed. Also where error result messages are written.
|
||||
.AP "const char" *name in
|
||||
The name of the namespace or command to be created or accessed.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
A context pointer by the creator of the namespace. Not interpreted by
|
||||
Tcl at all.
|
||||
.AP Tcl_NamespaceDeleteProc *deleteProc in
|
||||
@@ -117,7 +117,7 @@ the global namespace.)
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_NamespaceDeleteProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fBTcl_DeleteNamespace\fR deletes a namespace, calling the
|
||||
|
||||
+8
-8
@@ -38,7 +38,7 @@ Tcl_ThreadId
|
||||
void
|
||||
\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_InitNotifier\fR()
|
||||
.sp
|
||||
void
|
||||
@@ -78,7 +78,7 @@ Procedure to invoke to prepare for event wait in \fBTcl_DoOneEvent\fR.
|
||||
Procedure for \fBTcl_DoOneEvent\fR to invoke after waiting for
|
||||
events. Checks to see if any events have occurred and, if so,
|
||||
queues them.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIsetupProc\fR, \fIcheckProc\fR, or
|
||||
\fIdeleteProc\fR.
|
||||
.AP "const Tcl_Time" *timePtr in
|
||||
@@ -89,7 +89,7 @@ is NULL, it means there is no maximum wait time: wait forever if
|
||||
necessary.
|
||||
.AP Tcl_Event *evPtr in
|
||||
An event to add to the event queue. The storage for the event must
|
||||
have been allocated by the caller using \fBTcl_Alloc\fR or \fBckalloc\fR.
|
||||
have been allocated by the caller using \fBTcl_Alloc\fR.
|
||||
.AP int position in
|
||||
Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR,
|
||||
\fBTCL_QUEUE_HEAD\fR, \fBTCL_QUEUE_MARK\fR, and whether to do
|
||||
@@ -226,7 +226,7 @@ the event source.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EventSetupProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -267,7 +267,7 @@ microseconds:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Time {
|
||||
long \fIsec\fR;
|
||||
long long \fIsec\fR;
|
||||
long \fIusec\fR;
|
||||
} \fBTcl_Time\fR;
|
||||
.CE
|
||||
@@ -304,7 +304,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EventCheckProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -399,7 +399,7 @@ of window events.
|
||||
When \fIproc\fR returns 1, \fBTcl_ServiceEvent\fR will remove the
|
||||
event from the event queue and free its storage.
|
||||
Note that the storage for an event must be allocated by
|
||||
the event source (using \fBTcl_Alloc\fR or the Tcl macro \fBckalloc\fR)
|
||||
the event source (using \fBTcl_Alloc\fR)
|
||||
before calling \fBTcl_QueueEvent\fR, but it
|
||||
will be freed by \fBTcl_ServiceEvent\fR, not by the event source.
|
||||
.PP
|
||||
@@ -424,7 +424,7 @@ queue. \fIProc\fR should match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTcl_EventDeleteProc\fR(
|
||||
Tcl_Event *\fIevPtr\fR,
|
||||
ClientData \fIclientData\fR);
|
||||
void *\fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
|
||||
+3
-3
@@ -27,9 +27,9 @@ When non-NULL, error information is recorded here when the value is not
|
||||
in any of the numeric formats recognized by Tcl.
|
||||
.AP "const char" *bytes in
|
||||
Points to first byte of the string value to be examined.
|
||||
.AP ptrdiff_t numBytes in
|
||||
.AP Tcl_Size numBytes in
|
||||
The number of bytes, starting at \fIbytes\fR, that should be examined.
|
||||
If the value \fBTCL_INDEX_NONE\fR is provided, then all bytes should
|
||||
If \fBnumBytes\fR is negative, then all bytes should
|
||||
be examined until the first \fBNUL\fR byte terminates examination.
|
||||
.AP "void *" *clientDataPtr out
|
||||
Points to space where a pointer value may be written through which a numeric
|
||||
@@ -63,7 +63,7 @@ the same function. They differ only in how the arguments present the Tcl
|
||||
value to be examined. \fBTcl_GetNumber\fR accepts a counted string
|
||||
value in the arguments \fIbytes\fR and \fInumBytes\fR (or a
|
||||
\fBNUL\fR-terminated string value when \fInumBytes\fR is
|
||||
\fBTCL_INDEX_NONE\fR). \fBTcl_GetNumberFromObj\fR accepts the Tcl value
|
||||
negative). \fBTcl_GetNumberFromObj\fR accepts the Tcl value
|
||||
in \fIobjPtr\fR.
|
||||
.PP
|
||||
Both routines examine the Tcl value and determine whether Tcl recognizes
|
||||
|
||||
+48
-27
@@ -23,6 +23,8 @@ Tcl_Obj *
|
||||
.sp
|
||||
\fBTcl_DecrRefCount\fR(\fIobjPtr\fR)
|
||||
.sp
|
||||
\fBTcl_BounceRefCount\fR(\fIobjPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_IsShared\fR(\fIobjPtr\fR)
|
||||
.sp
|
||||
@@ -111,9 +113,9 @@ which is defined as follows.
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Obj {
|
||||
int \fIrefCount\fR;
|
||||
Tcl_Size \fIrefCount\fR;
|
||||
char *\fIbytes\fR;
|
||||
int \fIlength\fR;
|
||||
Tcl_Size \fIlength\fR;
|
||||
const Tcl_ObjType *\fItypePtr\fR;
|
||||
union {
|
||||
long \fIlongValue\fR;
|
||||
@@ -278,26 +280,27 @@ The string representation is now \fB124\fR
|
||||
and both representations are again valid.
|
||||
.SH "STORAGE MANAGEMENT OF VALUES"
|
||||
.PP
|
||||
Tcl values are allocated on the heap and are shared as much as possible
|
||||
to reduce storage requirements.
|
||||
Reference counting is used to determine when a value is
|
||||
no longer needed and can safely be freed.
|
||||
A value just created by \fBTcl_NewObj\fR or \fBTcl_NewStringObj\fR
|
||||
has \fIrefCount\fR 0, meaning that the object can often be given to a function
|
||||
like \fBTcl_SetObjResult\fR, \fBTcl_ListObjAppendElement\fR, or
|
||||
\fBTcl_DictObjPut\fR (as a value) without explicit reference management, all
|
||||
of which are common use cases. (The latter two require that the the target
|
||||
list or dictionary be well-formed, but that is often easy to arrange when the
|
||||
value is being initially constructed.)
|
||||
The macro \fBTcl_IncrRefCount\fR increments the reference count
|
||||
when a new reference to the value is created.
|
||||
The macro \fBTcl_DecrRefCount\fR decrements the count
|
||||
when a reference is no longer needed and,
|
||||
if the value's reference count drops to zero, frees its storage.
|
||||
Tcl values are allocated on the heap and are shared as much as
|
||||
possible to reduce storage requirements. Reference counting is used
|
||||
to determine when a value is no longer needed and can safely be freed.
|
||||
A value just created by \fBTcl_NewObj\fR, \fBTcl_NewStringObj\fR, or
|
||||
any Abstract List command or function, has \fIrefCount\fR 0, meaning
|
||||
that the object can often be given to a function like
|
||||
\fBTcl_SetObjResult\fR, \fBTcl_ListObjAppendElement\fR, or
|
||||
\fBTcl_DictObjPut\fR (as a value) without explicit reference
|
||||
management, all of which are common use cases. (The latter two require
|
||||
that the target list or dictionary be well-formed, but that is
|
||||
often easy to arrange when the value is being initially constructed.)
|
||||
The macro \fBTcl_IncrRefCount\fR increments the reference count when a
|
||||
new reference to the value is created.
|
||||
The macro \fBTcl_DecrRefCount\fR decrements the count when a reference is no longer needed.
|
||||
If the value's reference count drops to zero, frees
|
||||
its storage.
|
||||
The macro \fBTcl_BounceRefCount\fR will check if the value has no references (i.e. in a "new" state) and free the value.
|
||||
A value shared by different code or data structures has
|
||||
\fIrefCount\fR greater than 1.
|
||||
Incrementing a value's reference count ensures that
|
||||
it will not be freed too early or have its value change accidentally.
|
||||
\fIrefCount\fR greater than 1. Incrementing a value's reference count
|
||||
ensures that it will not be freed too early or have its value change
|
||||
accidentally.
|
||||
.PP
|
||||
As an example, the bytecode interpreter shares argument values
|
||||
between calling and called Tcl procedures to avoid having to copy values.
|
||||
@@ -311,12 +314,25 @@ the interpreter calls \fBTcl_DecrRefCount\fR to decrement
|
||||
each argument's reference count.
|
||||
When a value's reference count drops less than or equal to zero,
|
||||
\fBTcl_DecrRefCount\fR reclaims its storage.
|
||||
Most command procedures do not have to be concerned about
|
||||
reference counting since they use a value's value immediately
|
||||
and do not retain a pointer to the value after they return.
|
||||
However, if they do retain a pointer to a value in a data structure,
|
||||
they must be careful to increment its reference count
|
||||
since the retained pointer is a new reference.
|
||||
|
||||
.PP
|
||||
Most command procedures have not been concerned about reference
|
||||
counting since they use a value's value immediately and do not retain
|
||||
a pointer to the value after they return. However, there are some
|
||||
procedures that may return a new value, with a refCount of 0. In this
|
||||
situation, it is the caller's responsibility to free the value before
|
||||
the procedure returns. One way to cover this is to always call
|
||||
\fBTcl_IncrRefCount\fR before using the value, then call
|
||||
\fBTcl_DecrRefCount\fR before returning. The other way is to use
|
||||
\fBTcl_BounceRefCount\fR after the value is no longer needed or
|
||||
referenced. This macro will free the value if there are no other
|
||||
references to the value. When retaining a pointer to a value in a data
|
||||
structure the procedure must be careful to increment its reference
|
||||
count since the retained pointer is a new reference. Examples of
|
||||
procedures that return new values are \fBTcl_NewIntObj\fR, and
|
||||
commands like \fBlseq\fR, which creates an Abstract List, and an
|
||||
lindex on this list may return a new Obj with a refCount of 0.
|
||||
|
||||
.PP
|
||||
Command procedures that directly modify values
|
||||
such as those for \fBlappend\fR and \fBlinsert\fR must be careful to
|
||||
@@ -350,6 +366,11 @@ must check whether the variable's value is shared before
|
||||
incrementing the integer in its internal representation.
|
||||
If it is shared, it needs to duplicate the value
|
||||
in order to avoid accidentally changing values in other data structures.
|
||||
.PP
|
||||
In cases where a value is obtained, used, and not retained, the value
|
||||
can be freed using \fBTcl_BounceRefCount\fR. This
|
||||
is functionally equivalent to calling \fBTcl_IncrRefCount\fR followed
|
||||
\fBTcl_DecrRefCount\fR.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_ConvertToType(3), Tcl_GetIntFromObj(3), Tcl_ListObjAppendElement(3), Tcl_ListObjIndex(3), Tcl_ListObjReplace(3), Tcl_RegisterObjType(3)
|
||||
.SH KEYWORDS
|
||||
|
||||
+169
-12
@@ -4,7 +4,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_ObjType 3 8.0 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_ObjType 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
@@ -93,14 +93,13 @@ free to set the internal representation for \fIobjPtr\fR to make
|
||||
use of another related Tcl_ObjType, if it sees fit.
|
||||
.SH "THE TCL_OBJTYPE STRUCTURE"
|
||||
.PP
|
||||
Extension writers can define new value types by defining four
|
||||
procedures and
|
||||
initializing a Tcl_ObjType structure to describe the type.
|
||||
Extension writers may also pass a pointer to their Tcl_ObjType
|
||||
structure to \fBTcl_RegisterObjType\fR if they wish to permit
|
||||
other extensions to look up their Tcl_ObjType by name with
|
||||
the \fBTcl_GetObjType\fR routine.
|
||||
The \fBTcl_ObjType\fR structure is defined as follows:
|
||||
Extension writers can define new value types by defining four to eight
|
||||
procedures and initializing a Tcl_ObjType structure to describe the
|
||||
type. Extension writers may also pass a pointer to their Tcl_ObjType
|
||||
structure to \fBTcl_RegisterObjType\fR if they wish to permit other
|
||||
extensions to look up their Tcl_ObjType by name with the
|
||||
\fBTcl_GetObjType\fR routine. The \fBTcl_ObjType\fR structure is
|
||||
defined as follows:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_ObjType {
|
||||
@@ -109,6 +108,17 @@ typedef struct Tcl_ObjType {
|
||||
Tcl_DupInternalRepProc *\fIdupIntRepProc\fR;
|
||||
Tcl_UpdateStringProc *\fIupdateStringProc\fR;
|
||||
Tcl_SetFromAnyProc *\fIsetFromAnyProc\fR;
|
||||
size_t \fIversion\fR;
|
||||
/* List emulation functions - ObjType Version 1 & 2 */
|
||||
Tcl_ObjTypeLengthProc *lengthProc;
|
||||
/* List emulation functions - ObjType Version 2 */
|
||||
Tcl_ObjTypeIndexProc *\fIindexProc\fR;
|
||||
Tcl_ObjTypeSliceProc *\fIsliceProc\fR;
|
||||
Tcl_ObjTypeReverseProc *\fIreverseProc\fR;
|
||||
Tcl_ObjTypeGetElements *\fIgetElementsProc\fR;
|
||||
Tcl_ObjTypeSetElement *\fIsetElementProc\fR;
|
||||
Tcl_ObjTypeReplaceProc *\fIreplaceProc\fR;
|
||||
Tcl_ObjTypeInOperatorProc *\fIinOperProc\fR;
|
||||
} \fBTcl_ObjType\fR;
|
||||
.CE
|
||||
.SS "THE NAME FIELD"
|
||||
@@ -184,8 +194,8 @@ to be treated as conventional null character-terminated C strings.
|
||||
These restrictions are easily met by using Tcl's internal UTF encoding
|
||||
for the string representation, same as one would do for other
|
||||
Tcl routines accepting string values as arguments.
|
||||
Storage for the byte array must be allocated in the heap by \fBTcl_Alloc\fR
|
||||
or \fBckalloc\fR. Note that \fIupdateStringProc\fRs must allocate
|
||||
Storage for the byte array must be allocated in the heap by \fBTcl_Alloc\fR.
|
||||
Note that \fIupdateStringProc\fRs must allocate
|
||||
enough storage for the string's bytes and the terminating null byte.
|
||||
.PP
|
||||
The \fIupdateStringProc\fR for Tcl's built-in double type, for example,
|
||||
@@ -205,6 +215,7 @@ The \fIdupIntRepProc\fR member contains the address of a function
|
||||
called to copy an internal representation from one value to another.
|
||||
.PP
|
||||
.CS
|
||||
|
||||
typedef void \fBTcl_DupInternalRepProc\fR(
|
||||
Tcl_Obj *\fIsrcPtr\fR,
|
||||
Tcl_Obj *\fIdupPtr\fR);
|
||||
@@ -228,6 +239,7 @@ The \fIfreeIntRepProc\fR member contains the address of a function
|
||||
that is called when a value is freed.
|
||||
.PP
|
||||
.CS
|
||||
|
||||
typedef void \fBTcl_FreeInternalRepProc\fR(
|
||||
Tcl_Obj *\fIobjPtr\fR);
|
||||
.CE
|
||||
@@ -253,6 +265,151 @@ Note that if a subsidiary value has its reference count reduced to zero
|
||||
during the running of a \fIfreeIntRepProc\fR, that value may be not freed
|
||||
immediately, in order to limit stack usage. However, the value will be freed
|
||||
before the outermost current \fBTcl_DecrRefCount\fR returns.
|
||||
.SS "THE VERSION FIELD"
|
||||
.PP
|
||||
The \fIversion\fR member provides for future extensibility of the
|
||||
structure and should be set to \fBTCL_OBJTYPE_V0\fR for compatability
|
||||
of ObjType definitions prior to version 9.0. Specifics about versions
|
||||
will be described further in the sections below.
|
||||
.SH "ABSTRACT LIST TYPES"
|
||||
.PP
|
||||
Additional fields in the Tcl_ObjType descriptor allow for control over
|
||||
how custom data values can be manipulated using Tcl's List commands
|
||||
without converting the value to a List type. This requires the custom
|
||||
type to provide functions that will perform the given operation on the
|
||||
custom data representation. Not all functions are required. In the
|
||||
absence of a particular function (set to NULL), the fallback is to
|
||||
allow the internal List operation to perform the operation, most
|
||||
likely causing the value type to be converted to a traditional list.
|
||||
.SS "SCALAR VALUE TYPES"
|
||||
.PP
|
||||
For a custom value type that is scalar or atomic in nature, i.e., not
|
||||
a divisible collection, version \fBTCL_OBJTYPE_V1\fR is
|
||||
recommended. In this case, List commands will treat the scalar value
|
||||
as if it where a list of length 1, and not convert the value to a List
|
||||
type.
|
||||
.SS "VERSION 2: ABSTRACT LISTS"
|
||||
.PP
|
||||
Version 2, \fBTCL_OBJTYPE_V2\fR, allows full List support when the
|
||||
functions described below are provided. This allows for script level
|
||||
use of the List commands without causing the type of the Tcl_Obj value
|
||||
to be converted to a list.
|
||||
.SS "THE LENGTHPROC FIELD"
|
||||
.PP
|
||||
The \fBLengthProc\fR function correlates with the \fBTcl_ListObjLength\fR
|
||||
C API. The function returns the number of elements in the list. It
|
||||
is used in every List operation and is required for all Abstract List
|
||||
implementations.
|
||||
.CS
|
||||
|
||||
typedef Tcl_Size
|
||||
(Tcl_ObjTypeLengthProc) (Tcl_Obj *listPtr);
|
||||
.CE
|
||||
|
||||
.PP
|
||||
.SS "THE INDEXPROC FIELD"
|
||||
.PP
|
||||
The \fBIndexProc\fR function correlates with with the
|
||||
\fBTcl_ListObjIndex\fR C API. The function returns a Tcl_Obj value for
|
||||
the element at the specified index.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeIndexProc) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr,
|
||||
Tcl_Size index,
|
||||
Tcl_Obj** elemObj);
|
||||
.CE
|
||||
.SS "THE SLICEPROC FIELD"
|
||||
.PP
|
||||
The \fBSliceProc\fR correlates with the \fBlrange\fR command,
|
||||
returning a new List or Abstract List for the portion of the original
|
||||
list specifed.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeSliceProc) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr,
|
||||
Tcl_Size fromIdx,
|
||||
Tcl_Size toIdx,
|
||||
Tcl_Obj **newObjPtr);
|
||||
.CE
|
||||
.SS "THE REVERSEPROC FIELD"
|
||||
.PP
|
||||
The \fBReverseProc\fR correlates with the \fBlreverse\fR command,
|
||||
returning a List or Abstract List that has the same elements as the
|
||||
input Abstract List, with the elements in the reverse order.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeReverseProc) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr,
|
||||
Tcl_Obj **newObjPtr);
|
||||
.CE
|
||||
.SS "THE GETELEMENTS FIELD"
|
||||
.PP
|
||||
The \fBGetElements\fR function returns a count and a pointer to an
|
||||
array of Tcl_Obj values for the entire Abstract List. This is a
|
||||
correlary to the \fBTcl_ListObjGetElements\fR C API call.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeGetElements) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr,
|
||||
Tcl_Size *objcptr,
|
||||
Tcl_Obj ***objvptr);
|
||||
.CE
|
||||
.SS "THE SETELEMENT FIELD"
|
||||
.PP
|
||||
The \fBSetElement\fR function replaces the element within the
|
||||
specified list at the give index. This function correlates to the
|
||||
\fBlset\fR command.
|
||||
.CS
|
||||
|
||||
typedef Tcl_Obj*
|
||||
Tcl_ObjTypeSetElement) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listPtr,
|
||||
Tcl_Size indexCount,
|
||||
Tcl_Obj *const indexArray[],
|
||||
Tcl_Obj *valueObj);
|
||||
.CE
|
||||
.SS "REPLACEPROC FIELD"
|
||||
.PP
|
||||
The \fBReplaceProc\fR returns a new list after modfying the list
|
||||
replacing the elements to be deleted, and adding the elements to be
|
||||
inserted. This function correlates to the \fBTcl_ListObjReplace\fR C API.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeReplaceProc) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *listObj,
|
||||
Tcl_Size first,
|
||||
Tcl_Size numToDelete,
|
||||
Tcl_Size numToInsert,
|
||||
Tcl_Obj *const insertObjs[]);
|
||||
.CE
|
||||
.SS "THE INOPERATORPROC FIELD"
|
||||
.PP
|
||||
The \fBInOperProc\fR function determines whether the value is present in the
|
||||
given list, according to equivalent string comparison of elements. The
|
||||
\fBboolResult\fR is set to 1 (true) if the value is present, and 0
|
||||
(false) if it is not present. This function implements the "in" and
|
||||
"ni" math operators for an abstract list.
|
||||
.CS
|
||||
|
||||
typedef int
|
||||
(Tcl_ObjTypeInOperatorProc) (
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *valueObj,
|
||||
Tcl_Obj *listObj,
|
||||
int *boolResult);
|
||||
.CE
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
The \fIobjPtr\fR argument to \fBTcl_AppendAllObjTypes\fR should be an unshared
|
||||
@@ -271,6 +428,6 @@ modify the reference count of their arguments, but if the values contain
|
||||
subsidiary values (e.g., the elements of a list or the keys of a dictionary)
|
||||
then those subsidiary values may have their reference counts modified.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3)
|
||||
Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_BounceRefCount(3)
|
||||
.SH KEYWORDS
|
||||
internal representation, value, value type, string representation, type conversion
|
||||
|
||||
+24
-24
@@ -47,34 +47,34 @@ int
|
||||
int
|
||||
\fBTcl_Close\fR(\fIinterp, channel\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ReadChars\fR(\fIchannel, readObjPtr, charsToRead, appendFlag\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_Read\fR(\fIchannel, readBuf, bytesToRead\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_GetsObj\fR(\fIchannel, lineObjPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_Ungets\fR(\fIchannel, input, inputLen, addAtEnd\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_WriteObj\fR(\fIchannel, writeObjPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_WriteChars\fR(\fIchannel, charBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_Write\fR(\fIchannel, byteBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ReadRaw\fR(\fIchannel, readBuf, bytesToRead\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_WriteRaw\fR(\fIchannel, byteBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -119,7 +119,7 @@ allowed for the \fImode\fR argument to the Tcl \fBopen\fR command.
|
||||
.AP int permissions in
|
||||
POSIX-style permission flags such as 0644. If a new file is created, these
|
||||
permissions will be set on the created file.
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
The number of elements in \fIargv\fR.
|
||||
.AP "const char" **argv in
|
||||
Arguments for constructing a command pipeline. These values have the same
|
||||
@@ -134,7 +134,7 @@ input of the invoking process; likewise for \fBTCL_STDOUT\fR and
|
||||
redirect stdio handles to override the stdio handles for which
|
||||
\fBTCL_STDIN\fR, \fBTCL_STDOUT\fR and \fBTCL_STDERR\fR have been set. If it
|
||||
is set, then such redirections cause an error.
|
||||
.AP ClientData handle in
|
||||
.AP void *handle in
|
||||
Operating system specific handle for I/O to a file. For Unix this is a
|
||||
file descriptor, for Windows it is a HANDLE.
|
||||
.AP int readOrWrite in
|
||||
@@ -154,7 +154,7 @@ from a procedure such as \fBTcl_OpenFileChannel\fR.
|
||||
.AP Tcl_Obj *readObjPtr in/out
|
||||
A pointer to a Tcl value in which to store the characters read from the
|
||||
channel.
|
||||
.AP int charsToRead in
|
||||
.AP Tcl_Size charsToRead in
|
||||
The number of characters to read from the channel. If the channel's encoding
|
||||
is \fBbinary\fR, this is equivalent to the number of bytes to read from the
|
||||
channel.
|
||||
@@ -163,7 +163,7 @@ If non-zero, data read from the channel will be appended to the value.
|
||||
Otherwise, the data will replace the existing contents of the value.
|
||||
.AP char *readBuf out
|
||||
A buffer in which to store the bytes read from the channel.
|
||||
.AP int bytesToRead in
|
||||
.AP Tcl_Size bytesToRead in
|
||||
The number of bytes to read from the channel. The buffer \fIreadBuf\fR must
|
||||
be large enough to hold this many bytes.
|
||||
.AP Tcl_Obj *lineObjPtr in/out
|
||||
@@ -176,7 +176,7 @@ channel. Must have been initialized by the caller. The line read will be
|
||||
appended to any data already in the dynamic string.
|
||||
.AP "const char" *input in
|
||||
The input to add to a channel buffer.
|
||||
.AP int inputLen in
|
||||
.AP Tcl_Size inputLen in
|
||||
Length of the input
|
||||
.AP int addAtEnd in
|
||||
Flag indicating whether the input should be added to the end or
|
||||
@@ -187,7 +187,7 @@ A pointer to a Tcl value whose contents will be output to the channel.
|
||||
A buffer containing the characters to output to the channel.
|
||||
.AP "const char" *byteBuf in
|
||||
A buffer containing the bytes to output to the channel.
|
||||
.AP int bytesToWrite in
|
||||
.AP Tcl_Size bytesToWrite in
|
||||
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
|
||||
output to the channel.
|
||||
.AP "long long" offset in
|
||||
@@ -406,12 +406,12 @@ 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 TCL_INDEX_NONE and \fBTcl_ReadChars\fR records a POSIX error
|
||||
return value is -1 and \fBTcl_ReadChars\fR records a POSIX error
|
||||
code that can be retrieved with \fBTcl_GetErrno\fR. If an encoding error happens
|
||||
while the channel is in blocking mode with -profile strict, the characters
|
||||
retrieved until the encoding error happened will be stored in \fIreadObjPtr\fR.
|
||||
.PP
|
||||
Setting \fIcharsToRead\fR to TCL_INDEX_NONE will cause the command to read
|
||||
Setting \fIcharsToRead\fR to -1 will cause the command to read
|
||||
all characters currently available (non-blocking) or everything until
|
||||
eof (blocking mode).
|
||||
.PP
|
||||
@@ -473,14 +473,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 TCL_INDEX_NONE and records a POSIX error code
|
||||
error occurs, \fBTcl_GetsObj\fR returns -1 and records a POSIX error code
|
||||
that can be retrieved with \fBTcl_GetErrno\fR. \fBTcl_GetsObj\fR also
|
||||
returns TCL_INDEX_NONE if the end of the file is reached; the \fBTcl_Eof\fR procedure
|
||||
returns -1 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 TCL_INDEX_NONE
|
||||
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 TCL_INDEX_NONE is returned, the \fBTcl_InputBlocked\fR
|
||||
end-of-line character. When -1 is returned, the \fBTcl_InputBlocked\fR
|
||||
procedure may be invoked to determine if the channel is blocked because
|
||||
of input unavailability.
|
||||
.PP
|
||||
@@ -498,7 +498,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
|
||||
TCL_INDEX_NONE if an error occurs.
|
||||
-1 if an error occurs.
|
||||
.SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE"
|
||||
.PP
|
||||
\fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at
|
||||
@@ -515,7 +515,7 @@ 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 TCL_INDEX_NONE to
|
||||
accepted for output to the channel. This is either -1 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.
|
||||
|
||||
+3
-3
@@ -52,12 +52,12 @@ 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.
|
||||
.AP ClientData sock in
|
||||
.AP void *sock in
|
||||
Platform-specific handle for client TCP socket.
|
||||
.AP Tcl_TcpAcceptProc *proc in
|
||||
Pointer to a procedure to invoke each time a new connection is
|
||||
accepted via the socket.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -129,7 +129,7 @@ the channel. \fIProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_TcpAcceptProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Channel \fIchannel\fR,
|
||||
char *\fIhostName\fR,
|
||||
int \fIport\fR);
|
||||
|
||||
+4
-16
@@ -7,7 +7,7 @@
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc, Tcl_ConsolePanic \- report fatal error and abort
|
||||
Tcl_Panic, Tcl_SetPanicProc, Tcl_ConsolePanic \- report fatal error and abort
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -15,9 +15,6 @@ Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc, Tcl_ConsolePanic \- report fatal error
|
||||
void
|
||||
\fBTcl_Panic\fR(\fIformat\fR, \fIarg\fR, \fIarg\fR, \fI...\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_PanicVA\fR(\fIformat\fR, \fIargList\fR)
|
||||
.sp
|
||||
const char *
|
||||
\fBTcl_SetPanicProc\fR(\fIpanicProc\fR)
|
||||
.sp
|
||||
@@ -30,10 +27,6 @@ void
|
||||
A printf-style format string.
|
||||
.AP "" arg in
|
||||
Arguments matching the format string.
|
||||
.AP va_list argList in
|
||||
An argument list of arguments matching the format string.
|
||||
Must have been initialized using \fBva_start\fR,
|
||||
and cleared using \fBva_end\fR.
|
||||
.AP Tcl_PanicProc *panicProc in
|
||||
Procedure to report fatal error message and abort.
|
||||
.BE
|
||||
@@ -82,15 +75,14 @@ making calls into the Tcl library, or into other libraries that may
|
||||
call the Tcl library, since the original call to \fBTcl_Panic\fR
|
||||
indicates the Tcl library is not in a state of reliable operation.
|
||||
.PP
|
||||
The result of \fBTcl_SetPanicProc\fR is the full Tcl version (e.g.,
|
||||
\fB8.7.0+abcdef...abcdef.gcc-1002.utf16\fR).
|
||||
The result of \fBTcl_SetPanicProc\fR is the full Tcl version with build
|
||||
information (e.g., \fB9.0.0+abcdef...abcdef.gcc-1002\fR).
|
||||
.PP
|
||||
The typical use of \fBTcl_SetPanicProc\fR arranges for the error message
|
||||
to be displayed or reported in a manner more suitable for the
|
||||
application or the platform.
|
||||
.PP
|
||||
\fBTcl_SetPanicProc\fR can not be used in stub-enabled extensions. Its symbol
|
||||
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
|
||||
\fBTcl_SetPanicProc\fR can not be used in stub-enabled extensions.
|
||||
.PP
|
||||
Although the primary callers of \fBTcl_Panic\fR are the procedures of
|
||||
the Tcl library, \fBTcl_Panic\fR is a public function and may be called
|
||||
@@ -98,10 +90,6 @@ by any extension or application that wishes to abort the process and
|
||||
have a panic message displayed the same way that panic messages from Tcl
|
||||
will be displayed.
|
||||
.PP
|
||||
\fBTcl_PanicVA\fR is the same as \fBTcl_Panic\fR except that instead of
|
||||
taking a variable number of arguments it takes an argument list. Interfaces
|
||||
using argument lists have been found to be nonportable in practice. This
|
||||
function is deprecated and will be removed in Tcl 9.0.
|
||||
.SH "SEE ALSO"
|
||||
abort(3), printf(3), exec(n), format(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+5
-5
@@ -21,7 +21,7 @@ int
|
||||
Where to store error messages.
|
||||
.AP "const Tcl_ArgvInfo" *argTable in
|
||||
Pointer to array of option descriptors.
|
||||
.AP int *objcPtr in/out
|
||||
.AP "Tcl_Size \&| int" *objcPtr in/out
|
||||
A pointer to variable holding number of arguments in \fIobjv\fR. Will be
|
||||
modified to hold number of arguments left in the unprocessed argument list
|
||||
stored in \fIremObjv\fR.
|
||||
@@ -31,7 +31,7 @@ The array of arguments to be parsed.
|
||||
Pointer to a variable that will hold the array of unprocessed arguments.
|
||||
Should be NULL if no return of unprocessed arguments is required. If
|
||||
\fIobjcPtr\fR is updated to a non-zero value, the array returned through this
|
||||
must be deallocated using \fBckfree\fR.
|
||||
must be deallocated using \fBTcl_Free\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -84,7 +84,7 @@ typedef struct {
|
||||
void *\fIsrcPtr\fR;
|
||||
void *\fIdstPtr\fR;
|
||||
const char *\fIhelpStr\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
void *\fIclientData\fR;
|
||||
} \fBTcl_ArgvInfo\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -127,7 +127,7 @@ have the following signature:
|
||||
.PP
|
||||
.CS
|
||||
typedef int (\fBTcl_ArgvFuncProc\fR)(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Obj *\fIobjPtr\fR,
|
||||
void *\fIdstPtr\fR);
|
||||
.CE
|
||||
@@ -149,7 +149,7 @@ function will have the following signature:
|
||||
.PP
|
||||
.CS
|
||||
typedef int (\fBTcl_ArgvGenFuncProc\fR)(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const *\fIobjv\fR,
|
||||
|
||||
+12
-34
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokens, Tcl_EvalTokensStandard \- parse Tcl scripts and expressions
|
||||
Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokensStandard \- parse Tcl scripts and expressions
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -33,23 +33,19 @@ const char *
|
||||
.sp
|
||||
\fBTcl_FreeParse\fR(\fIusedParsePtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
\fBTcl_EvalTokens\fR(\fIinterp, tokenPtr, numTokens\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_EvalTokensStandard\fR(\fIinterp, tokenPtr, numTokens\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *usedParsePtr out
|
||||
.AP Tcl_Interp *interp out
|
||||
For procedures other than \fBTcl_FreeParse\fR, \fBTcl_EvalTokens\fR
|
||||
and \fBTcl_EvalTokensStandard\fR, used only for error reporting;
|
||||
For procedures other than \fBTcl_FreeParse\fR and
|
||||
\fBTcl_EvalTokensStandard\fR, used only for error reporting;
|
||||
if NULL, then no error messages are left after errors.
|
||||
For \fBTcl_EvalTokens\fR and \fBTcl_EvalTokensStandard\fR,
|
||||
determines the context for evaluating the
|
||||
script and also is used for error reporting; must not be NULL.
|
||||
For \fBTcl_EvalTokensStandard\fR, determines the context for evaluating
|
||||
the script and also is used for error reporting; must not be NULL.
|
||||
.AP "const char" *start in
|
||||
Pointer to first character in string to parse.
|
||||
.AP int numBytes in
|
||||
.AP Tcl_Size numBytes in
|
||||
Number of bytes in string to parse, not including any terminating null
|
||||
character. If less than 0 then the script consists of all characters
|
||||
following \fIstart\fR up to the first null character.
|
||||
@@ -191,17 +187,6 @@ code with one of the values \fBTCL_OK\fR, \fBTCL_ERROR\fR,
|
||||
some other integer value originating in an extension.
|
||||
In addition, a result value or error message is left in \fIinterp\fR's
|
||||
result; it can be retrieved using \fBTcl_GetObjResult\fR.
|
||||
.SS "DEPRECATED FUNCTIONS"
|
||||
.PP
|
||||
\fBTcl_EvalTokens\fR differs from \fBTcl_EvalTokensStandard\fR only in
|
||||
the return convention used: it returns the result in a new Tcl_Obj.
|
||||
The reference count of the value returned as result has been
|
||||
incremented, so the caller must
|
||||
invoke \fBTcl_DecrRefCount\fR when it is finished with the value.
|
||||
If an error or other exception occurs while evaluating the tokens
|
||||
(such as a reference to a non-existent variable) then the return value
|
||||
is NULL and an error message is left in \fIinterp\fR's result. The use
|
||||
of \fBTcl_EvalTokens\fR is deprecated.
|
||||
.SH "TCL_PARSE STRUCTURE"
|
||||
.PP
|
||||
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
|
||||
@@ -211,20 +196,20 @@ return parse information in two data structures, Tcl_Parse and Tcl_Token:
|
||||
.CS
|
||||
typedef struct Tcl_Parse {
|
||||
const char *\fIcommentStart\fR;
|
||||
int \fIcommentSize\fR;
|
||||
Tcl_Size \fIcommentSize\fR;
|
||||
const char *\fIcommandStart\fR;
|
||||
int \fIcommandSize\fR;
|
||||
int \fInumWords\fR;
|
||||
Tcl_Size \fIcommandSize\fR;
|
||||
Tcl_Size \fInumWords\fR;
|
||||
Tcl_Token *\fItokenPtr\fR;
|
||||
int \fInumTokens\fR;
|
||||
Tcl_Size \fInumTokens\fR;
|
||||
...
|
||||
} \fBTcl_Parse\fR;
|
||||
|
||||
typedef struct Tcl_Token {
|
||||
int \fItype\fR;
|
||||
const char *\fIstart\fR;
|
||||
int \fIsize\fR;
|
||||
int \fInumComponents\fR;
|
||||
Tcl_Size \fIsize\fR;
|
||||
Tcl_Size \fInumComponents\fR;
|
||||
} \fBTcl_Token\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -464,12 +449,5 @@ There are additional fields in the Tcl_Parse structure after the
|
||||
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
|
||||
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR; they should not be
|
||||
referenced by code outside of these procedures.
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
The result of \fBTcl_EvalTokens\fR is an unshared value with a reference count
|
||||
of 1; the caller of that function should call \fBTcl_DecrRefCount\fR on the
|
||||
result value to dispose of it. (The equivalent with
|
||||
\fBTcl_EvalTokenStandard\fR is just the interpreter result, which can be
|
||||
retrieved with \fBTcl_GetObjResult\fR.)
|
||||
.SH KEYWORDS
|
||||
backslash substitution, braces, command, expression, parse, token, variable substitution
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ Pointer to place to store the value associated with the matching
|
||||
package. It is only changed if the pointer is not NULL and the
|
||||
function completed successfully. The storage can be any pointer
|
||||
type with the same size as a void pointer.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
Number of requirements.
|
||||
.AP Tcl_Obj* objv[] in
|
||||
Array of requirements.
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ Tcl_Preserve, Tcl_Release, Tcl_EventuallyFree \- avoid freeing storage while it
|
||||
\fBTcl_EventuallyFree\fR(\fIclientData, freeProc\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_FreeProc clientData
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Token describing structure to be freed or reallocated. Usually a pointer
|
||||
to memory for structure.
|
||||
.AP Tcl_FreeProc *freeProc in
|
||||
@@ -91,7 +91,7 @@ reasons, but the value is the same.
|
||||
.PP
|
||||
When the \fIclientData\fR argument to \fBTcl_EventuallyFree\fR
|
||||
refers to storage allocated and returned by a prior call to
|
||||
\fBTcl_Alloc\fR, \fBckalloc\fR, or another function of the Tcl library,
|
||||
\fBTcl_Alloc\fR or another function of the Tcl library,
|
||||
then the \fIfreeProc\fR argument should be given the special value of
|
||||
\fBTCL_DYNAMIC\fR.
|
||||
.PP
|
||||
|
||||
+2
-7
@@ -18,10 +18,7 @@ Tcl_PrintDouble \- Convert floating value to string
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *interp out
|
||||
.AP Tcl_Interp *interp in
|
||||
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
|
||||
controlled the conversion. As of Tcl 8.0, this argument is ignored and
|
||||
the conversion is controlled by the \fBtcl_precision\fR variable
|
||||
that is now shared by all interpreters.
|
||||
This argument is ignored.
|
||||
.AP double value in
|
||||
Floating-point value to be converted.
|
||||
.AP char *dst out
|
||||
@@ -41,9 +38,7 @@ so that it does not look like an integer. Where \fB%g\fR would
|
||||
generate an integer with no decimal point, \fBTcl_PrintDouble\fR adds
|
||||
.QW .0 .
|
||||
.PP
|
||||
If the \fBtcl_precision\fR value is non-zero, the result will have
|
||||
precisely that many digits of significance. If the value is zero
|
||||
(the default), the result will have the fewest digits needed to
|
||||
The result will have the fewest digits needed to
|
||||
represent the number in such a way that \fBTcl_NewDoubleObj\fR
|
||||
will generate the same number when presented with the given string.
|
||||
IEEE semantics of rounding to even apply to the conversion.
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ the command at global level instead of the current stack level.
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event
|
||||
on the history list and then execute it using \fBTcl_EvalObjEx\fR
|
||||
on the history list and then execute it using \fBTcl_EvalObjEx\fR.
|
||||
It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_EvalObjEx\fR,
|
||||
as well as a result value containing additional information
|
||||
(a result value or error message)
|
||||
|
||||
+8
-8
@@ -64,7 +64,7 @@ identifies the beginning of the larger string.
|
||||
If it is not the same as \fItext\fR, then no
|
||||
.QW \fB^\fR
|
||||
matches will be allowed.
|
||||
.AP int index in
|
||||
.AP Tcl_Size index in
|
||||
Specifies which range is desired: 0 means the range of the entire
|
||||
match, 1 or greater means the range that matched a parenthesized
|
||||
sub-expression.
|
||||
@@ -80,14 +80,14 @@ OR-ed combination of the compilation flags \fBTCL_REG_ADVANCED\fR,
|
||||
\fBTCL_REG_QUOTE\fR, \fBTCL_REG_NOCASE\fR, \fBTCL_REG_NEWLINE\fR,
|
||||
\fBTCL_REG_NLSTOP\fR, \fBTCL_REG_NLANCH\fR, \fBTCL_REG_NOSUB\fR, and
|
||||
\fBTCL_REG_CANMATCH\fR. See below for more information.
|
||||
.AP int offset in
|
||||
.AP Tcl_Size offset in
|
||||
The character offset into the text where matching should begin.
|
||||
The value of the offset has no impact on \fB^\fR matches. This
|
||||
behavior is controlled by \fIeflags\fR.
|
||||
.AP int nmatches in
|
||||
.AP Tcl_Size nmatches in
|
||||
The number of matching subexpressions that should be remembered for
|
||||
later use. If this value is 0, then no subexpression match
|
||||
information will be computed. If the value is \-1, then
|
||||
information will be computed. If the value is negative, then
|
||||
all of the matching subexpressions will be remembered. Any other
|
||||
value will be taken as the maximum number of subexpressions to
|
||||
remember.
|
||||
@@ -337,9 +337,9 @@ defined as follows:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_RegExpInfo {
|
||||
int \fInsubs\fR;
|
||||
Tcl_Size \fInsubs\fR;
|
||||
Tcl_RegExpIndices *\fImatches\fR;
|
||||
long \fIextendStart\fR;
|
||||
Tcl_Size \fIextendStart\fR;
|
||||
} \fBTcl_RegExpInfo\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -355,8 +355,8 @@ follows:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_RegExpIndices {
|
||||
long \fIstart\fR;
|
||||
long \fIend\fR;
|
||||
Tcl_Size \fIstart\fR;
|
||||
Tcl_Size \fIend\fR;
|
||||
} \fBTcl_RegExpIndices\fR;
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-33
@@ -6,12 +6,11 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_SaveResult 3 8.1 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_SaveInterpState 3 8.1 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_SaveInterpState, Tcl_RestoreInterpState, Tcl_DiscardInterpState,
|
||||
Tcl_SaveResult, Tcl_RestoreResult, Tcl_DiscardResult \- Save and restore the
|
||||
Tcl_SaveInterpState, Tcl_RestoreInterpState, Tcl_DiscardInterpState \- Save and restore the
|
||||
state of an an interpreter.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
@@ -24,12 +23,6 @@ int
|
||||
\fBTcl_RestoreInterpState\fR(\fIinterp, state\fR)
|
||||
.sp
|
||||
\fBTcl_DiscardInterpState\fR(\fIstate\fR)
|
||||
.sp
|
||||
\fBTcl_SaveResult\fR(\fIinterp, savedPtr\fR)
|
||||
.sp
|
||||
\fBTcl_RestoreResult\fR(\fIinterp, savedPtr\fR)
|
||||
.sp
|
||||
\fBTcl_DiscardResult\fR(\fIsavedPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_InterpState savedPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -38,8 +31,6 @@ The interpreter for the operation.
|
||||
The return code for the state.
|
||||
.AP Tcl_InterpState state in
|
||||
A token for saved state.
|
||||
.AP Tcl_SavedResult *savedPtr in
|
||||
A pointer to storage for saved state.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -59,27 +50,5 @@ returns the \fIstatus\fR originally passed in the corresponding call to
|
||||
If a saved state is not restored, \fBTcl_DiscardInterpState\fR must be called
|
||||
to release it. A token used to discard or restore state must not be used
|
||||
again.
|
||||
.PP
|
||||
\fBTcl_SaveResult\fR, \fBTcl_RestoreResult\fR, and \fBTcl_DiscardResult\fR are
|
||||
deprecated. Instead use \fBTcl_SaveInterpState\fR,
|
||||
\fBTcl_RestoreInterpState\fR, and \fBTcl_DiscardInterpState\fR, which are more
|
||||
capable.
|
||||
.PP
|
||||
\fBTcl_SaveResult\fR moves the result of \fIinterp\fR to the location
|
||||
\fIstatePtr\fR points to and returns the interpreter result to its initial
|
||||
state. It does not save options such as \fB\-errorcode\fR or
|
||||
\fB\-errorinfo\fR.
|
||||
.PP
|
||||
\fBTcl_RestoreResult\fR clears any existing result or error in \fIinterp\fR and
|
||||
moves the result from \fIstatePtr\fR back to \fIinterp\fR. \fIstatePtr\fR is
|
||||
then in an undefined state and must not be used until passed again to
|
||||
\fBTcl_SaveResult\fR.
|
||||
.PP
|
||||
\fBTcl_DiscardResult\fR releases the state stored at \fBstatePtr\fR, which is
|
||||
then in an undefined state and must not be used until passed again to
|
||||
\fBTcl_SaveResult\fR.
|
||||
.PP
|
||||
If a saved result is not restored, \fBTcl_DiscardResult\fR must be called to
|
||||
release it.
|
||||
.SH KEYWORDS
|
||||
result, state, interp
|
||||
|
||||
@@ -87,14 +87,10 @@ the value.
|
||||
Which functions of a channel driver are allowed to use which bypass function
|
||||
is listed below, as is which functions of the public channel API may leave a
|
||||
messages in the bypass areas.
|
||||
.IP \fBTcl_DriverCloseProc\fR
|
||||
May use \fBTcl_SetChannelErrorInterp\fR, and only this function.
|
||||
.IP \fBTcl_DriverInputProc\fR
|
||||
May use \fBTcl_SetChannelError\fR, and only this function.
|
||||
.IP \fBTcl_DriverOutputProc\fR
|
||||
May use \fBTcl_SetChannelError\fR, and only this function.
|
||||
.IP \fBTcl_DriverSeekProc\fR
|
||||
May use \fBTcl_SetChannelError\fR, and only this function.
|
||||
.IP \fBTcl_DriverWideSeekProc\fR
|
||||
May use \fBTcl_SetChannelError\fR, and only this function.
|
||||
.IP \fBTcl_DriverSetOptionProc\fR
|
||||
|
||||
+3
-3
@@ -14,14 +14,14 @@ Tcl_SetRecursionLimit \- set maximum allowable nesting depth in interpreter
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_SetRecursionLimit\fR(\fIinterp, depth\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *interp
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter whose recursion limit is to be set.
|
||||
Must be greater than zero.
|
||||
.AP int depth in
|
||||
.AP Tcl_Size depth in
|
||||
New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
|
||||
.BE
|
||||
|
||||
@@ -29,7 +29,7 @@ New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
|
||||
.PP
|
||||
At any given time Tcl enforces a limit on the number of recursive
|
||||
calls that may be active for \fBTcl_Eval\fR and related procedures
|
||||
such as \fBTcl_GlobalEval\fR.
|
||||
such as \fBTcl_EvalEx\fR.
|
||||
Any call to \fBTcl_Eval\fR that exceeds this depth is aborted with
|
||||
an error.
|
||||
By default the recursion limit is 1000.
|
||||
|
||||
+62
-195
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult \- manipulate Tcl result
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -26,246 +26,113 @@ const char *
|
||||
.sp
|
||||
\fBTcl_AppendResult\fR(\fIinterp, result, result, ... , \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_ResetResult\fR(\fIinterp\fR)
|
||||
.sp
|
||||
\fBTcl_TransferResult\fR(\fIsourceInterp, code, targetInterp\fR)
|
||||
.sp
|
||||
\fBTcl_AppendElement\fR(\fIinterp, element\fR)
|
||||
.sp
|
||||
\fBTcl_FreeResult\fR(\fIinterp\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_FreeProc sourceInterp out
|
||||
.AP Tcl_Interp *interp out
|
||||
Interpreter whose result is to be modified or read.
|
||||
The interpreter get or set the result for.
|
||||
.AP Tcl_Obj *objPtr in
|
||||
Tcl value to become result for \fIinterp\fR.
|
||||
A value to set the result to.
|
||||
.AP char *result in
|
||||
String value to become result for \fIinterp\fR or to be
|
||||
appended to the existing result.
|
||||
The string value set the result to, or to append to the existing result.
|
||||
.AP "const char" *element in
|
||||
String value to append as a list element
|
||||
The string value to append as a list element
|
||||
to the existing result of \fIinterp\fR.
|
||||
.AP Tcl_FreeProc *freeProc in
|
||||
Address of procedure to call to release storage at
|
||||
\fIresult\fR, or \fBTCL_STATIC\fR, \fBTCL_DYNAMIC\fR, or
|
||||
\fBTCL_VOLATILE\fR.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
Pointer to a procedure to call to release storage at
|
||||
\fIresult\fR.
|
||||
.AP Tcl_Interp *sourceInterp in
|
||||
Interpreter that the result and return options should be transferred from.
|
||||
The interpreter to transfer the result and return options from.
|
||||
.AP Tcl_Interp *targetInterp in
|
||||
Interpreter that the result and return options should be transferred to.
|
||||
The interpreter to transfer the result and return options to.
|
||||
.AP int code in
|
||||
Return code value that controls transfer of return options.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The procedures described here are utilities for manipulating the
|
||||
result value in a Tcl interpreter.
|
||||
The interpreter result may be either a Tcl value or a string.
|
||||
For example, \fBTcl_SetObjResult\fR and \fBTcl_SetResult\fR
|
||||
set the interpreter result to, respectively, a value and a string.
|
||||
Similarly, \fBTcl_GetObjResult\fR and \fBTcl_GetStringResult\fR
|
||||
return the interpreter result as a value and as a string.
|
||||
The procedures always keep the string and value forms
|
||||
of the interpreter result consistent.
|
||||
For example, if \fBTcl_SetObjResult\fR is called to set
|
||||
the result to a value,
|
||||
then \fBTcl_GetStringResult\fR is called,
|
||||
it will return the value's string representation.
|
||||
These procedures manipulate the result of an interpreter. Some procedures
|
||||
provide a Tcl_Obj interface while others provide a string interface. For
|
||||
example, \fBTcl_SetObjResult\fR accepts a Tcl_Obj and \fBTcl_SetResult\fR
|
||||
accepts a char *. Similarly, \fBTcl_GetObjResult\fR produces a Tcl_Obj * and
|
||||
\fBTcl_GetStringResult\fR produces a char *. The procedures can be mixed and
|
||||
matched. For example, if \fBTcl_SetObjResult\fR is called to set the result to
|
||||
a Tcl_Obj value, and then \fBTcl_GetStringResult\fR is called, it returns a
|
||||
char * (but see caveats below).
|
||||
.PP
|
||||
\fBTcl_SetObjResult\fR
|
||||
arranges for \fIobjPtr\fR to be the result for \fIinterp\fR,
|
||||
\fBTcl_SetObjResult\fR sets \fIobjPtr\fR as the result for \fIinterp\fR,
|
||||
replacing any existing result.
|
||||
The result is left pointing to the value
|
||||
referenced by \fIobjPtr\fR.
|
||||
\fIobjPtr\fR's reference count is incremented
|
||||
since there is now a new reference to it from \fIinterp\fR.
|
||||
The reference count for any old result value
|
||||
is decremented and the old result value is freed if no
|
||||
references to it remain.
|
||||
.PP
|
||||
\fBTcl_GetObjResult\fR returns the result for \fIinterp\fR as a value.
|
||||
The value's reference count is not incremented;
|
||||
if the caller needs to retain a long-term pointer to the value
|
||||
they should use \fBTcl_IncrRefCount\fR to increment its reference count
|
||||
in order to keep it from being freed too early or accidentally changed.
|
||||
\fBTcl_GetObjResult\fR returns the result for \fIinterp\fR, without
|
||||
incrementing its reference count.
|
||||
.PP
|
||||
\fBTcl_SetResult\fR
|
||||
arranges for \fIresult\fR to be the result for the current Tcl
|
||||
command in \fIinterp\fR, replacing any existing result.
|
||||
The \fIfreeProc\fR argument specifies how to manage the storage
|
||||
for the \fIresult\fR argument;
|
||||
it is discussed in the section
|
||||
\fBTHE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT\fR below.
|
||||
If \fIresult\fR is \fBNULL\fR, then \fIfreeProc\fR is ignored
|
||||
and \fBTcl_SetResult\fR
|
||||
re-initializes \fIinterp\fR's result to point to an empty string.
|
||||
\fBTcl_SetResult\fR sets \fIresult\fR as the result for \fIinterp\fR, replacing
|
||||
any existing result, and calls \fIfreeProc\fR to free \fIresult\fR. See \fBTHE
|
||||
TCL_FREEPROC ARGUMENT TO TCL_SETRESULT\fR below. If \fIresult\fR is
|
||||
\fBNULL\fR, ignores \fIfreeProc\fR and sets the result for \fIinterp\fR to
|
||||
point to the empty string.
|
||||
.PP
|
||||
\fBTcl_GetStringResult\fR returns the result for \fIinterp\fR as a string.
|
||||
If the result was set to a value by a \fBTcl_SetObjResult\fR call,
|
||||
the value form will be converted to a string and returned.
|
||||
If the value's string representation contains null bytes,
|
||||
this conversion will lose information.
|
||||
For this reason, programmers are encouraged to
|
||||
write their code to use the new value API procedures
|
||||
and to call \fBTcl_GetObjResult\fR instead.
|
||||
\fBTcl_GetStringResult\fR returns the result for \fIinterp\fR as a string, i.e.
|
||||
the bytes of the Tcl_Obj for the result, which can be decoded using
|
||||
\fBTcl_UtfToExternal\fR. This value is freed when its corresponding Tcl_Obj is
|
||||
freed.Programmers are encouraged to use the newer Tcl_Obj API procedures, e.g.
|
||||
to call \fBTcl_GetObjResult\fR instead.
|
||||
.PP
|
||||
\fBTcl_ResetResult\fR clears the result for \fIinterp\fR
|
||||
and leaves the result in its normal empty initialized state.
|
||||
If the result is a value,
|
||||
its reference count is decremented and the result is left
|
||||
pointing to an unshared value representing an empty string.
|
||||
If the result is a dynamically allocated string, its memory is free*d
|
||||
and the result is left as a empty string.
|
||||
\fBTcl_ResetResult\fR also clears the error state managed by
|
||||
\fBTcl_AddErrorInfo\fR, \fBTcl_AddObjErrorInfo\fR,
|
||||
and \fBTcl_SetErrorCode\fR.
|
||||
\fBTcl_ResetResult\fR sets the empty string as the result for \fIinterp\fR and
|
||||
clears the error state managed by \fBTcl_AddErrorInfo\fR,
|
||||
\fBTcl_AddObjErrorInfo\fR, and \fBTcl_SetErrorCode\fR.
|
||||
.PP
|
||||
\fBTcl_AppendResult\fR makes it easy to build up Tcl results in pieces.
|
||||
It takes each of its \fIresult\fR arguments and appends them in order
|
||||
to the current result associated with \fIinterp\fR.
|
||||
If the result is in its initialized empty state (e.g. a command procedure
|
||||
was just invoked or \fBTcl_ResetResult\fR was just called),
|
||||
then \fBTcl_AppendResult\fR sets the result to the concatenation of
|
||||
its \fIresult\fR arguments.
|
||||
\fBTcl_AppendResult\fR may be called repeatedly as additional pieces
|
||||
of the result are produced.
|
||||
\fBTcl_AppendResult\fR takes care of all the
|
||||
storage management issues associated with managing \fIinterp\fR's
|
||||
result, such as allocating a larger result area if necessary.
|
||||
It also manages conversion to and from the \fIresult\fR field of the
|
||||
\fIinterp\fR so as to handle backward-compatibility with old-style
|
||||
extensions.
|
||||
Any number of \fIresult\fR arguments may be passed in a single
|
||||
call; the last argument in the list must be a NULL pointer.
|
||||
\fBTcl_AppendResult\fR builds up a result from smaller pieces, appending each
|
||||
\fIresult\fR in order to the current result for \fIinterp\fR. It may be called
|
||||
repeatedly as additional pieces of the result are produced, and manages the
|
||||
storage for the \fIinterp\fR's result, allocating a larger result area if
|
||||
necessary. It also manages conversion to and from the \fIresult\fR field of
|
||||
the \fIinterp\fR to handle backward-compatibility with old-style extensions.
|
||||
Any number of \fIresult\fR arguments may be passed in a single call; the last
|
||||
argument in the list must be a NULL pointer.
|
||||
.PP
|
||||
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
Interfaces using argument lists have been found to be nonportable in practice.
|
||||
This function is deprecated and will be removed in Tcl 9.0.
|
||||
.PP
|
||||
\fBTcl_TransferResult\fR transfers interpreter state from \fIsourceInterp\fR
|
||||
to \fItargetInterp\fR. The two interpreters must have been created in the
|
||||
same thread. If \fIsourceInterp\fR and \fItargetInterp\fR are the same,
|
||||
nothing is done. Otherwise, \fBTcl_TransferResult\fR moves the result
|
||||
from \fIsourceInterp\fR to \fItargetInterp\fR, and resets the result
|
||||
in \fIsourceInterp\fR. It also moves the return options dictionary as
|
||||
controlled by the return code value \fIcode\fR in the same manner
|
||||
\fBTcl_TransferResult\fR transfers interpreter state from \fIsourceInterp\fR to
|
||||
\fItargetInterp\fR, both of which must have been created in the same thread,
|
||||
resets the result in \fIsourceInterp\fR, and moves the return options
|
||||
dictionary as controlled by the return code value \fIcode\fR in the same manner
|
||||
as \fBTcl_GetReturnOptions\fR.
|
||||
.PP
|
||||
If \fIsourceInterp\fR and \fItargetInterp\fR are the same, nothing is done.
|
||||
.SH "DEPRECATED INTERFACES"
|
||||
.SS "OLD STRING PROCEDURES"
|
||||
.PP
|
||||
Use of the following procedures is deprecated
|
||||
since they manipulate the Tcl result as a string.
|
||||
Procedures such as \fBTcl_SetObjResult\fR
|
||||
that manipulate the result as a value
|
||||
can be significantly more efficient.
|
||||
The following procedures are deprecated since they manipulate the Tcl result as
|
||||
a string. Procedures such as \fBTcl_SetObjResult\fR can be significantly more
|
||||
efficient.
|
||||
.PP
|
||||
\fBTcl_AppendElement\fR is similar to \fBTcl_AppendResult\fR in
|
||||
that it allows results to be built up in pieces.
|
||||
However, \fBTcl_AppendElement\fR takes only a single \fIelement\fR
|
||||
argument and it appends that argument to the current result
|
||||
as a proper Tcl list element.
|
||||
\fBTcl_AppendElement\fR adds backslashes or braces if necessary
|
||||
to ensure that \fIinterp\fR's result can be parsed as a list and that
|
||||
\fIelement\fR will be extracted as a single element.
|
||||
Under normal conditions, \fBTcl_AppendElement\fR will add a space
|
||||
character to \fIinterp\fR's result just before adding the new
|
||||
list element, so that the list elements in the result are properly
|
||||
separated.
|
||||
However if the new list element is the first in a list or sub-list
|
||||
(i.e. \fIinterp\fR's current result is empty, or consists of the
|
||||
single character
|
||||
\fBTcl_AppendElement\fR is like \fBTcl_AppendResult\fR, but it appends only one
|
||||
piece, and also appends that piece as a list item.
|
||||
\fBTcl_AppendElement\fR adds backslashes or braces as necessary to ensure that
|
||||
\fIelement\fR is properly formatted as a list item. Under normal conditions,
|
||||
\fBTcl_AppendElement\fR adds a space character to \fIinterp\fR's result just
|
||||
before adding the new list element, so that the list elements in the result are
|
||||
properly separated. However if the new list element is the first item in the
|
||||
list or sublist (i.e. \fIinterp\fR's current result is empty, or consists of
|
||||
the single character
|
||||
.QW { ,
|
||||
or ends in the characters
|
||||
.QW " {" )
|
||||
then no space is added.
|
||||
.PP
|
||||
\fBTcl_FreeResult\fR performs part of the work
|
||||
of \fBTcl_ResetResult\fR.
|
||||
It frees up the memory associated with \fIinterp\fR's result.
|
||||
It also sets \fIinterp->freeProc\fR to zero, but does not
|
||||
change \fIinterp->result\fR or clear error state.
|
||||
\fBTcl_FreeResult\fR is most commonly used when a procedure
|
||||
is about to replace one result value with another.
|
||||
.SS "DIRECT ACCESS TO INTERP->RESULT"
|
||||
.PP
|
||||
It used to be legal for programs to
|
||||
directly read and write \fIinterp->result\fR
|
||||
to manipulate the interpreter result. The Tcl headers no longer
|
||||
permit this access. C code still doing this must
|
||||
be updated to use supported routines \fBTcl_GetObjResult\fR,
|
||||
\fBTcl_GetStringResult\fR, \fBTcl_SetObjResult\fR, and \fBTcl_SetResult\fR.
|
||||
.SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT"
|
||||
.PP
|
||||
\fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how
|
||||
the Tcl system is to manage the storage for the \fIresult\fR argument.
|
||||
If \fBTcl_SetResult\fR or \fBTcl_SetObjResult\fR are called
|
||||
at a time when \fIinterp\fR holds a string result,
|
||||
they do whatever is necessary to dispose of the old string result
|
||||
(see the \fBTcl_Interp\fR manual entry for details on this).
|
||||
.PP
|
||||
If \fIfreeProc\fR is \fBTCL_STATIC\fR it means that \fIresult\fR
|
||||
refers to an area of static storage that is guaranteed not to be
|
||||
modified until at least the next call to \fBTcl_Eval\fR.
|
||||
If \fIfreeProc\fR
|
||||
is \fBTCL_DYNAMIC\fR it means that \fIresult\fR was allocated with a call
|
||||
to \fBTcl_Alloc\fR and is now the property of the Tcl system.
|
||||
\fBTcl_SetResult\fR will arrange for the string's storage to be
|
||||
released by calling \fBTcl_Free\fR when it is no longer needed.
|
||||
If \fIfreeProc\fR is \fBTCL_VOLATILE\fR it means that \fIresult\fR
|
||||
points to an area of memory that is likely to be overwritten when
|
||||
\fBTcl_SetResult\fR returns (e.g. it points to something in a stack frame).
|
||||
In this case \fBTcl_SetResult\fR will make a copy of the string in
|
||||
dynamically allocated storage and arrange for the copy to be the
|
||||
result for the current Tcl command.
|
||||
.PP
|
||||
If \fIfreeProc\fR is not one of the values \fBTCL_STATIC\fR,
|
||||
\fBTCL_DYNAMIC\fR, and \fBTCL_VOLATILE\fR, then it is the address
|
||||
of a procedure that Tcl should call to free the string.
|
||||
This allows applications to use non-standard storage allocators.
|
||||
When Tcl no longer needs the storage for the string, it will
|
||||
call \fIfreeProc\fR. \fIFreeProc\fR should have arguments and
|
||||
result that match the type \fBTcl_FreeProc\fR:
|
||||
\fIFreeProc\fR has the following type:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_FreeProc\fR(
|
||||
char *\fIblockPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
When \fIfreeProc\fR is called, its \fIblockPtr\fR will be set to
|
||||
the value of \fIresult\fR passed to \fBTcl_SetResult\fR.
|
||||
When \fIfreeProc\fR is called, \fIblockPtr\fR is the \fIresult\fR value passed
|
||||
to \fBTcl_SetResult\fR.
|
||||
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
The interpreter result is one of the main places that owns references to
|
||||
values, along with the bytecode execution stack, argument lists, variables,
|
||||
and the list and dictionary collection values.
|
||||
.PP
|
||||
\fBTcl_SetObjResult\fR takes a value with an arbitrary reference count
|
||||
\fI(specifically including zero)\fR and guarantees to increment the reference
|
||||
count. If code wishes to continue using the value after setting it as the
|
||||
result, it should add its own reference to it with \fBTcl_IncrRefCount\fR.
|
||||
.PP
|
||||
\fBTcl_GetObjResult\fR returns the current interpreter result value. This will
|
||||
have a reference count of at least 1. If the caller wishes to keep the
|
||||
interpreter result value, it should increment its reference count.
|
||||
.PP
|
||||
\fBTcl_GetStringResult\fR does not manipulate reference counts, but the string
|
||||
it returns is owned by (and has a lifetime controlled by) the current
|
||||
interpreter result value; it should be copied instead of being relied upon to
|
||||
persist after the next Tcl API call, as most Tcl operations can modify the
|
||||
interpreter result.
|
||||
.PP
|
||||
\fBTcl_SetResult\fR, \fBTcl_AppendResult\fR, \fBTcl_AppendResultVA\fR,
|
||||
\fBTcl_AppendElement\fR, and \fBTcl_ResetResult\fR all modify the interpreter
|
||||
result. They may cause the old interpreter result to have its reference count
|
||||
decremented and a new interpreter result to be allocated. After they have been
|
||||
called, the reference count of the interpreter result is guaranteed to be 1.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_AddErrorInfo, Tcl_CreateObjCommand, Tcl_SetErrorCode, Tcl_Interp,
|
||||
Tcl_GetReturnOptions
|
||||
|
||||
+13
-11
@@ -20,16 +20,16 @@ int
|
||||
char *
|
||||
\fBTcl_Merge\fR(\fIargc, argv\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ScanElement\fR(\fIsrc, flagsPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ScanCountedElement\fR(\fIsrc, length, flagsPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ConvertElement\fR(\fIsrc, dst, flags\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_ConvertCountedElement\fR(\fIsrc, length, dst, flags\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const char *const" ***argvPtr out
|
||||
@@ -38,14 +38,14 @@ Interpreter to use for error reporting. If NULL, then no error message
|
||||
is left.
|
||||
.AP "const char" *list in
|
||||
Pointer to a string with proper list structure.
|
||||
.AP int *argcPtr out
|
||||
.AP "Tcl_Size \&| int" *argcPtr out
|
||||
Filled in with number of elements in \fIlist\fR.
|
||||
.AP "const char" ***argvPtr out
|
||||
\fI*argvPtr\fR will be filled in with the address of an array of
|
||||
pointers to the strings that are the extracted elements of \fIlist\fR.
|
||||
There will be \fI*argcPtr\fR valid entries in the array, followed by
|
||||
a NULL entry.
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
Number of elements in \fIargv\fR.
|
||||
.AP "const char *const" *argv in
|
||||
Array of strings to merge together into a single list.
|
||||
@@ -55,7 +55,7 @@ String that is to become an element of a list.
|
||||
.AP int *flagsPtr in
|
||||
Pointer to word to fill in with information about \fIsrc\fR.
|
||||
The value of *\fIflagsPtr\fR must be passed to \fBTcl_ConvertElement\fR.
|
||||
.AP int length in
|
||||
.AP Tcl_Size length in
|
||||
Number of bytes in string \fIsrc\fR.
|
||||
.AP char *dst in
|
||||
Place to copy converted list element. Must contain enough characters
|
||||
@@ -81,7 +81,8 @@ For example, suppose that you have called \fBTcl_SplitList\fR with
|
||||
the following code:
|
||||
.PP
|
||||
.CS
|
||||
int argc, code;
|
||||
Tcl_Size argc;
|
||||
int code;
|
||||
char *string;
|
||||
char **argv;
|
||||
\&...
|
||||
@@ -92,12 +93,13 @@ Then you should eventually free the storage with a call like the
|
||||
following:
|
||||
.PP
|
||||
.CS
|
||||
Tcl_Free((char *) argv);
|
||||
Tcl_Free(argv);
|
||||
.CE
|
||||
.PP
|
||||
\fBTcl_SplitList\fR normally returns \fBTCL_OK\fR, which means the list was
|
||||
successfully parsed.
|
||||
If there was a syntax error in \fIlist\fR, then \fBTCL_ERROR\fR is returned
|
||||
successfully parsed. If \fIsizePtr\fR points to a variable of type
|
||||
\fBint\fR and the list contains more than 2**31 key/value pairs, or there was
|
||||
a syntax error in \fIlist\fR, then \fBTCL_ERROR\fR is returned
|
||||
and the interpreter's result will point to an error message describing the
|
||||
problem (if \fIinterp\fR was not NULL).
|
||||
If \fBTCL_ERROR\fR is returned then no memory is allocated and \fI*argvPtr\fR
|
||||
|
||||
+4
-4
@@ -25,14 +25,14 @@ Tcl_PathType
|
||||
.AP "const char" *path in
|
||||
File path in a form appropriate for the current platform (see the
|
||||
\fBfilename\fR manual entry for acceptable forms for path names).
|
||||
.AP int *argcPtr out
|
||||
.AP "Tcl_Size \&| int" *argcPtr out
|
||||
Filled in with number of path elements in \fIpath\fR.
|
||||
.AP "const char" ***argvPtr out
|
||||
\fI*argvPtr\fR will be filled in with the address of an array of
|
||||
pointers to the strings that are the extracted elements of \fIpath\fR.
|
||||
There will be \fI*argcPtr\fR valid entries in the array, followed by
|
||||
a NULL entry.
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
Number of elements in \fIargv\fR.
|
||||
.AP "const char *const" *argv in
|
||||
Array of path elements to merge together into a single path.
|
||||
@@ -61,7 +61,7 @@ For example, suppose that you have called \fBTcl_SplitPath\fR with the
|
||||
following code:
|
||||
.PP
|
||||
.CS
|
||||
int argc;
|
||||
Tcl_Size argc;
|
||||
char *path;
|
||||
char **argv;
|
||||
\&...
|
||||
@@ -72,7 +72,7 @@ Then you should eventually free the storage with a call like the
|
||||
following:
|
||||
.PP
|
||||
.CS
|
||||
Tcl_Free((char *) argv);
|
||||
Tcl_Free(argv);
|
||||
.CE
|
||||
.PP
|
||||
\fBTcl_JoinPath\fR is the inverse of \fBTcl_SplitPath\fR: it takes a
|
||||
|
||||
+3
-4
@@ -24,8 +24,8 @@ already been incorporated (i.e., the caller has already invoked the
|
||||
appropriate initialization procedure). NULL means the library
|
||||
has not yet been incorporated into any interpreter.
|
||||
.AP "const char" *prefix in
|
||||
Prefix for library initialization function; should be properly
|
||||
capitalized (first letter upper-case, all others lower-case).
|
||||
Prefix for library initialization function. Normally in titlecase (first
|
||||
letter upper-case, all others lower-case), but this is no longer required.
|
||||
.AP Tcl_LibraryInitProc *initProc in
|
||||
Procedure to invoke to incorporate this library into a trusted
|
||||
interpreter.
|
||||
@@ -70,8 +70,7 @@ initialization procedure to be invoked.
|
||||
\fBTcl_StaticLibrary\fR was named \fBTcl_StaticPackage\fR in Tcl 8.6 and
|
||||
earlier, but the old name is deprecated now.
|
||||
.PP
|
||||
\fBTcl_StaticLibrary\fR can not be used in stub-enabled extensions. Its symbol
|
||||
entry in the stub table is deprecated and it will be removed in Tcl 9.0.
|
||||
\fBTcl_StaticLibrary\fR can not be used in stub-enabled extensions.
|
||||
.SH KEYWORDS
|
||||
initialization procedure, package, static linking
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+23
-32
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendStringsToObjVA, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -40,7 +40,7 @@ Tcl_UniChar *
|
||||
int
|
||||
\fBTcl_GetUniChar\fR(\fIobjPtr, index\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_GetCharLength\fR(\fIobjPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -59,9 +59,6 @@ void
|
||||
\fBTcl_AppendStringsToObj\fR(\fIobjPtr, string, string, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendLimitedToObj\fR(\fIobjPtr, bytes, length, limit, ellipsis\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -94,7 +91,7 @@ unless \fInumChars\fR is negative. (Applications needing null bytes
|
||||
should represent them as the two-byte sequence \fI\e300\e200\fR, use
|
||||
\fBTcl_ExternalToUtf\fR to convert, or \fBTcl_NewByteArrayObj\fR if
|
||||
the string is a collection of uninterpreted bytes.)
|
||||
.AP int length in
|
||||
.AP Tcl_Size length in
|
||||
The number of bytes to copy from \fIbytes\fR when
|
||||
initializing, setting, or appending to a string value.
|
||||
If negative, all bytes up to the first null are used.
|
||||
@@ -103,33 +100,30 @@ Points to the first byte of an array of Unicode characters
|
||||
used to set or append to a string value.
|
||||
This byte array may contain embedded null characters
|
||||
unless \fInumChars\fR is negative.
|
||||
.AP int numChars in
|
||||
.AP Tcl_Size numChars in
|
||||
The number of Unicode characters to copy from \fIunicode\fR when
|
||||
initializing, setting, or appending to a string value.
|
||||
If negative, all characters up to the first null character are used.
|
||||
.AP int index in
|
||||
.AP Tcl_Size index in
|
||||
The index of the Unicode character to return.
|
||||
.AP int first in
|
||||
.AP Tcl_Size first in
|
||||
The index of the first Unicode character in the Unicode range to be
|
||||
returned as a new value. If negative, behave the same as if the
|
||||
value was 0.
|
||||
.AP int last in
|
||||
.AP Tcl_Size last in
|
||||
The index of the last Unicode character in the Unicode range to be
|
||||
returned as a new value. If negative, take all characters up to
|
||||
the last one available.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
Points to a value to manipulate.
|
||||
A pointer to a value to read, or to an unshared value to modify.
|
||||
.AP Tcl_Obj *appendObjPtr in
|
||||
The value to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
|
||||
.AP int *lengthPtr out
|
||||
.AP "Tcl_Size \&| int" *lengthPtr out
|
||||
The location where \fBTcl_GetStringFromObj\fR will store the length
|
||||
of a value's string representation. May be (int *)NULL when not used.
|
||||
.AP "const char" *string in
|
||||
Null-terminated string value to append to \fIobjPtr\fR.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
.AP int limit in
|
||||
.AP Tcl_Size limit in
|
||||
Maximum number of bytes to be appended.
|
||||
.AP "const char" *ellipsis in
|
||||
Suffix to append when the limit leads to string truncation.
|
||||
@@ -138,11 +132,11 @@ If NULL is passed then the suffix
|
||||
is used.
|
||||
.AP "const char" *format in
|
||||
Format control string including % conversion specifiers.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
The number of elements to format or concatenate.
|
||||
.AP Tcl_Obj *objv[] in
|
||||
The array of values to format or concatenate.
|
||||
.AP int newLength in
|
||||
.AP Tcl_Size newLength in
|
||||
New length for the string value of \fIobjPtr\fR, not including the
|
||||
final null character.
|
||||
.BE
|
||||
@@ -191,7 +185,9 @@ Even in the limited situations where writing to this pointer is
|
||||
acceptable, one should take care to respect the copy-on-write
|
||||
semantics required by \fBTcl_Obj\fR's, with appropriate calls
|
||||
to \fBTcl_IsShared\fR and \fBTcl_DuplicateObj\fR prior to any
|
||||
in-place modification of the string representation.
|
||||
in-place modification of the string representation. If \fIlengthPtr\fR
|
||||
points to an \fBint\fR variable, and the string has more than 2^31 bytes,
|
||||
a panic will result.
|
||||
The procedure \fBTcl_GetString\fR is used in the common case
|
||||
where the caller does not need the length of the string
|
||||
representation.
|
||||
@@ -203,18 +199,19 @@ value as a Unicode string. This is given by the returned pointer and
|
||||
byte pointer is owned by the value manager and should not be modified by
|
||||
the caller. The procedure \fBTcl_GetUnicode\fR is used in the common case
|
||||
where the caller does not need the length of the unicode string
|
||||
representation.
|
||||
representation. If \fIlengthPtr\fR points to an \fBint\fR variable,
|
||||
and the string has more than 2^31 unicode characters, a panic will result.
|
||||
.PP
|
||||
\fBTcl_GetUniChar\fR returns the \fIindex\fR'th character in the
|
||||
value's Unicode representation. If the index is out of range or
|
||||
it references a low surrogate preceded by a high surrogate, it returns -1;
|
||||
.PP
|
||||
\fBTcl_GetRange\fR returns a newly created value comprised of the
|
||||
characters between \fIfirst\fR and \fIlast\fR (inclusive) in the
|
||||
value's Unicode representation. If the value's Unicode
|
||||
representation is invalid, the Unicode representation is regenerated
|
||||
from the value's string representation. If \fIfirst\fR < 0, then
|
||||
the returned string starts at the beginning of the value. If \fIlast\fR < 0,
|
||||
characters between \fIfirst\fR and \fIlast\fR (inclusive) in the value's
|
||||
Unicode representation. If the value's Unicode representation
|
||||
is invalid, the Unicode representation is regenerated from the value's
|
||||
string representation. If \fIfirst\fR is negative, then the returned
|
||||
string starts at the beginning of the value. If \fIlast\fR negative,
|
||||
then the returned string ends at the end of the value.
|
||||
.PP
|
||||
\fBTcl_GetCharLength\fR returns the number of characters (as opposed
|
||||
@@ -251,12 +248,6 @@ values may contain internal null characters). Any number of
|
||||
\fIstring\fR arguments may be provided, but the last argument
|
||||
must be a NULL pointer to indicate the end of the list.
|
||||
.PP
|
||||
\fBTcl_AppendStringsToObjVA\fR is the same as \fBTcl_AppendStringsToObj\fR
|
||||
except that instead of taking a variable number of arguments it takes an
|
||||
argument list. Interfaces using argument lists have been found to be
|
||||
nonportable in practice. This function is deprecated and will be removed
|
||||
in Tcl 9.0.
|
||||
.PP
|
||||
\fBTcl_AppendLimitedToObj\fR is similar to \fBTcl_AppendToObj\fR
|
||||
except that it imposes a limit on how many bytes are appended.
|
||||
This can be handy when the string to be appended might be
|
||||
@@ -269,7 +260,7 @@ all \fIlength\fR bytes that are available from being appended, then the
|
||||
appending is done so that the last bytes appended are from the
|
||||
string \fIellipsis\fR. This allows for an indication of the truncation
|
||||
to be left in the string.
|
||||
When \fIlength\fR is \fB-1\fR, all bytes up to the first zero byte are appended,
|
||||
When \fIlength\fR is negative, all bytes up to the first zero byte are appended,
|
||||
subject to the limit. When \fIellipsis\fR is NULL, the default
|
||||
string \fB...\fR is used. When \fIellipsis\fR is non-NULL, it must point
|
||||
to a zero-byte-terminated string in Tcl's internal UTF encoding.
|
||||
|
||||
+6
-6
@@ -34,7 +34,7 @@ and the Tcl \fBmemory\fR command can be used to validate and examine
|
||||
memory usage.
|
||||
.SH "GUARD ZONES"
|
||||
.PP
|
||||
When memory debugging is enabled, whenever a call to \fBckalloc\fR is
|
||||
When memory debugging is enabled, whenever a call to \fBTcl_Alloc\fR is
|
||||
made, slightly more memory than requested is allocated so the memory
|
||||
debugging code can keep track of the allocated memory, and eight-byte
|
||||
.QW "guard zones"
|
||||
@@ -44,7 +44,7 @@ C #define \fBLOW_GUARD_SIZE\fR and #define \fBHIGH_GUARD_SIZE\fR
|
||||
in the file \fIgeneric/tclCkalloc.c\fR \(em it can
|
||||
be extended if you suspect large overwrite problems, at some cost in
|
||||
performance.) A known pattern is written into the guard zones and, on
|
||||
a call to \fBckfree\fR, the guard zones of the space being freed are
|
||||
a call to \fBTcl_Free\fR, the guard zones of the space being freed are
|
||||
checked to see if either zone has been modified in any way. If one
|
||||
has been, the guard bytes and their new contents are identified, and a
|
||||
.QW "low guard failed"
|
||||
@@ -53,7 +53,7 @@ or
|
||||
message is issued. The
|
||||
.QW "guard failed"
|
||||
message includes the address of the memory packet and
|
||||
the file name and line number of the code that called \fBckfree\fR.
|
||||
the file name and line number of the code that called \fBTcl_Free\fR.
|
||||
This allows you to detect the common sorts of one-off problems, where
|
||||
not enough space was allocated to contain the data written, for
|
||||
example.
|
||||
@@ -66,15 +66,15 @@ suspect (or know) that corruption is occurring before the Tcl
|
||||
interpreter comes up far enough for you to issue commands, you can set
|
||||
\fBMEM_VALIDATE\fR define, recompile tclCkalloc.c and rebuild Tcl.
|
||||
This will enable memory validation from the first call to
|
||||
\fBckalloc\fR, again, at a large performance impact.
|
||||
\fBTcl_Alloc\fR, again, at a large performance impact.
|
||||
.PP
|
||||
If you are desperate and validating memory on every call to
|
||||
\fBckalloc\fR and \fBckfree\fR is not enough, you can explicitly call
|
||||
\fBTcl_Alloc\fR and \fBTcl_Free\fR is not enough, you can explicitly call
|
||||
\fBTcl_ValidateAllMemory\fR directly at any point. It takes a \fIchar
|
||||
*\fR and an \fIint\fR which are normally the filename and line number
|
||||
of the caller, but they can actually be anything you want. Remember
|
||||
to remove the calls after you find the problem.
|
||||
.SH "SEE ALSO"
|
||||
ckalloc, memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
|
||||
Tcl_Alloc, memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
|
||||
.SH KEYWORDS
|
||||
memory, debug
|
||||
|
||||
+4
-4
@@ -88,7 +88,7 @@ The initial value for the checksum algorithm.
|
||||
.AP "unsigned char" *bytes in
|
||||
An array of bytes to run the checksum algorithm over, or NULL to get the
|
||||
recommended initial value for the checksum algorithm.
|
||||
.AP int length in
|
||||
.AP Tcl_Size length in
|
||||
The number of bytes in the array.
|
||||
.AP int mode in
|
||||
What mode to operate the stream in. Should be either
|
||||
@@ -107,9 +107,9 @@ if the currently compressed data must be made available for access using
|
||||
into a state where the decompressor can recover from on corruption, or
|
||||
\fBTCL_ZLIB_FINALIZE\fR to ensure that the stream is finished and that any
|
||||
trailer demanded by the format is written.
|
||||
.AP int count in
|
||||
The maximum number of bytes to get from the stream, or -1 to get all remaining
|
||||
bytes from the stream's buffers.
|
||||
.AP Tcl_Size count in
|
||||
The maximum number of bytes to get from the stream, or -1 to get
|
||||
all remaining bytes from the stream's buffers.
|
||||
.AP Tcl_Obj *compDict in
|
||||
A byte array value that is the compression dictionary to use with the stream.
|
||||
Note that this is \fInot a Tcl dictionary\fR, and it is recommended that this
|
||||
|
||||
+7
-2
@@ -6,7 +6,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_Main 3 8.4 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_Main 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
@@ -29,7 +29,7 @@ Tcl_Obj *
|
||||
\fBTcl_SetMainLoop\fR(\fImainLoopProc\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_MainLoopProc *mainLoopProc
|
||||
.AP int argc in
|
||||
.AP Tcl_Size argc in
|
||||
Number of elements in \fIargv\fR.
|
||||
.AP char *argv[] in
|
||||
Array of strings containing command-line arguments. On Windows, when
|
||||
@@ -203,6 +203,11 @@ procedure (if any) returns, \fBTcl_Main\fR will also evaluate
|
||||
the \fBexit\fR command.
|
||||
.PP
|
||||
\fBTcl_Main\fR can not be used in stub-enabled extensions.
|
||||
.PP
|
||||
The difference between Tcl_MainEx and Tcl_MainExW is that the arguments
|
||||
are passed as characters or wide characters. When used in stub-enabled
|
||||
embedders, the stubs table must be first initialized using one of
|
||||
\fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR, \fBTcl_FindExecutable\fR or \fBTclZipfs_AppHook\fR.
|
||||
.SH "REFERENCE COUNT MANAGEMENT"
|
||||
.PP
|
||||
\fBTcl_SetStartupScript\fR takes a value (or NULL) for its \fIpath\fR
|
||||
|
||||
+4
-4
@@ -67,9 +67,9 @@ Id of the thread waited upon.
|
||||
.AP Tcl_ThreadCreateProc *proc in
|
||||
This procedure will act as the \fBmain()\fR of the newly created
|
||||
thread. The specified \fIclientData\fR will be its sole argument.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary information. Passed as sole argument to the \fIproc\fR.
|
||||
.AP unsigned stackSize in
|
||||
.AP size_t stackSize in
|
||||
The size of the stack given to the new thread.
|
||||
.AP int flags in
|
||||
Bitmask containing flags allowing the caller to modify behavior of
|
||||
@@ -208,7 +208,7 @@ value and then finishes.
|
||||
.CS
|
||||
static \fBTcl_ThreadCreateType\fR
|
||||
MyThreadImplFunc(
|
||||
ClientData clientData)
|
||||
void *clientData)
|
||||
{
|
||||
int i, limit = (int) clientData;
|
||||
for (i=0 ; i<limit ; i++) {
|
||||
@@ -223,7 +223,7 @@ would do this:
|
||||
.PP
|
||||
.CS
|
||||
int limit = 1000000000;
|
||||
ClientData limitData = (void*)((intptr_t) limit);
|
||||
void *limitData = (void*)((intptr_t) limit);
|
||||
Tcl_ThreadId id; \fI/* holds identity of thread created */\fR
|
||||
int result;
|
||||
|
||||
|
||||
+3
-3
@@ -22,13 +22,13 @@ int
|
||||
int
|
||||
\fBTcl_UniCharToTitle\fR(\fIch\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToUpper\fR(\fIstr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToLower\fR(\fIstr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToTitle\fR(\fIstr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *str in/out
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ Tcl_CommandTraceInfo, Tcl_TraceCommand, Tcl_UntraceCommand \- monitor renames an
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_CommandTraceInfo(\fIinterp, cmdName, flags, proc, prevClientData\fB)\fR
|
||||
.sp
|
||||
int
|
||||
@@ -32,9 +32,9 @@ OR'ed collection of the values \fBTCL_TRACE_RENAME\fR and
|
||||
\fBTCL_TRACE_DELETE\fR.
|
||||
.AP Tcl_CommandTraceProc *proc in
|
||||
Procedure to call when specified operations occur to \fIcmdName\fR.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary argument to pass to \fIproc\fR.
|
||||
.AP ClientData prevClientData in
|
||||
.AP void *prevClientData in
|
||||
If non-NULL, gives last value returned by \fBTcl_CommandTraceInfo\fR,
|
||||
so this call will return information about next trace. If NULL, this
|
||||
call will return information about first trace.
|
||||
@@ -65,7 +65,7 @@ match the type \fBTcl_CommandTraceProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CommandTraceProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoldName\fR,
|
||||
const char *\fInewName\fR,
|
||||
@@ -74,7 +74,7 @@ typedef void \fBTcl_CommandTraceProc\fR(
|
||||
.PP
|
||||
The \fIclientData\fR and \fIinterp\fR parameters will have the same
|
||||
values as those passed to \fBTcl_TraceCommand\fR when the trace was
|
||||
created. \fIClientData\fR typically points to an application-specific
|
||||
created. \fIclientData\fR typically points to an application-specific
|
||||
data structure that describes what to do when \fIproc\fR is invoked.
|
||||
\fIOldName\fR gives the name of the command being renamed, and
|
||||
\fInewName\fR gives the name that the command is being renamed to (or
|
||||
|
||||
+17
-14
@@ -5,7 +5,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_TraceVar 3 8.7 Tcl "Tcl Library Procedures"
|
||||
.TH Tcl_TraceVar 3 9.0 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
@@ -24,13 +24,13 @@ int
|
||||
.sp
|
||||
\fBTcl_UntraceVar2(\fIinterp, name1, name2, flags, proc, clientData\fB)\fR
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_VarTraceInfo(\fIinterp, varName, flags, proc, prevClientData\fB)\fR
|
||||
.sp
|
||||
ClientData
|
||||
void *
|
||||
\fBTcl_VarTraceInfo2(\fIinterp, name1, name2, flags, proc, prevClientData\fB)\fR
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_VarTraceProc prevClientData
|
||||
.AS void *prevClientData
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter containing variable.
|
||||
.AP "const char" *varName in
|
||||
@@ -46,7 +46,7 @@ Not all flags are used by all
|
||||
procedures. See below for more information.
|
||||
.AP Tcl_VarTraceProc *proc in
|
||||
Procedure to invoke whenever one of the traced operations occurs.
|
||||
.AP ClientData clientData in
|
||||
.AP void *clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.AP "const char" *name1 in
|
||||
Name of scalar or array variable (without array index).
|
||||
@@ -54,7 +54,7 @@ Name of scalar or array variable (without array index).
|
||||
For a trace on an element of an array, gives the index of the
|
||||
element. For traces on scalar variables or on whole arrays,
|
||||
is NULL.
|
||||
.AP ClientData prevClientData in
|
||||
.AP void *prevClientData in
|
||||
If non-NULL, gives last value returned by \fBTcl_VarTraceInfo\fR or
|
||||
\fBTcl_VarTraceInfo2\fR, so this call will return information about
|
||||
next trace. If NULL, this call will return information about first
|
||||
@@ -107,7 +107,7 @@ before an array set, but that will trigger write traces.
|
||||
\fBTCL_TRACE_RESULT_DYNAMIC\fR
|
||||
The result of invoking the \fIproc\fR is a dynamically allocated
|
||||
string that will be released by the Tcl library via a call to
|
||||
\fBckfree\fR. Must not be specified at the same time as
|
||||
\fBTcl_Free\fR. Must not be specified at the same time as
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR.
|
||||
.TP
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR
|
||||
@@ -124,7 +124,7 @@ It should have arguments and result that match the type
|
||||
.PP
|
||||
.CS
|
||||
typedef char *\fBTcl_VarTraceProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIname1\fR,
|
||||
const char *\fIname2\fR,
|
||||
@@ -134,12 +134,14 @@ typedef char *\fBTcl_VarTraceProc\fR(
|
||||
The \fIclientData\fR and \fIinterp\fR parameters will
|
||||
have the same values as those passed to \fBTcl_TraceVar\fR when the
|
||||
trace was created.
|
||||
\fIClientData\fR typically points to an application-specific
|
||||
\fIclientData\fR typically points to an application-specific
|
||||
data structure that describes what to do when \fIproc\fR
|
||||
is invoked.
|
||||
\fIName1\fR and \fIname2\fR give the name of the traced variable
|
||||
in the normal two-part form (see the description of \fBTcl_TraceVar2\fR
|
||||
below for details).
|
||||
\fIName1\fR and \fIname2\fR give the name of the variable that
|
||||
triggered the callback in the normal two-part form (see the description
|
||||
of \fBTcl_TraceVar2\fR below for details). In case \fIname1\fR is an
|
||||
alias to an array element (created through facilities such as \fBupvar\fR),
|
||||
\fIname2\fR holds the index of the array element, rather than NULL.
|
||||
\fIFlags\fR is an OR-ed combination of bits providing several
|
||||
pieces of information.
|
||||
One of the bits \fBTCL_TRACE_READS\fR, \fBTCL_TRACE_WRITES\fR,
|
||||
@@ -308,7 +310,7 @@ The return value must be a pointer to a static character string
|
||||
containing an error message,
|
||||
unless (\fIexactly\fR one of) the \fBTCL_TRACE_RESULT_DYNAMIC\fR and
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR flags is set, which specify that the result is
|
||||
either a dynamic string (to be released with \fBckfree\fR) or a
|
||||
either a dynamic string (to be released with \fBTcl_Free\fR) or a
|
||||
Tcl_Obj* (cast to char* and to be released with
|
||||
\fBTcl_DecrRefCount\fR) containing the error message.
|
||||
If a trace procedure returns an error, no further traces are
|
||||
@@ -333,7 +335,8 @@ The routine \fBTcl_InterpDeleted\fR is an important tool for this.
|
||||
When \fBTcl_InterpDeleted\fR returns 1, \fIproc\fR will not be able
|
||||
to invoke any scripts in \fIinterp\fR. You may encounter old code using
|
||||
a deprecated flag value \fBTCL_INTERP_DESTROYED\fR to signal this
|
||||
condition, but any supported code should be converted to stop using it.
|
||||
condition, but Tcl 9 no longer supports this. Any supported code
|
||||
must be converted to stop using it.
|
||||
.PP
|
||||
A trace procedure can be called at any time, even when there
|
||||
are partially formed results stored in the interpreter. If
|
||||
|
||||
+5
-6
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_TranslateFileName \- convert file name to native form and replace tilde with home directory
|
||||
Tcl_TranslateFileName \- convert file name to native form
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -21,8 +21,7 @@ char *
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter in which to report an error, if any.
|
||||
.AP "const char" *name in
|
||||
File name, which may start with a
|
||||
.QW ~ .
|
||||
File name
|
||||
.AP Tcl_DString *bufferPtr in/out
|
||||
If needed, this dynamic string is used to store the new file name.
|
||||
At the time of the call it should be uninitialized or free. The
|
||||
@@ -34,7 +33,7 @@ anything stored here.
|
||||
This utility procedure translates a file name to a platform-specific form
|
||||
which, after being converted to the appropriate encoding, is suitable for
|
||||
passing to the local operating system. In particular, it converts
|
||||
network names into native form and does tilde substitution.
|
||||
network names into native form.
|
||||
.PP
|
||||
However, with the advent of the newer \fBTcl_FSGetNormalizedPath\fR and
|
||||
\fBTcl_FSGetNativePath\fR, there is no longer any need to use this
|
||||
@@ -45,7 +44,7 @@ Finally \fBTcl_FSGetNativePath\fR does not require you to free anything
|
||||
afterwards.
|
||||
.PP
|
||||
If
|
||||
\fBTcl_TranslateFileName\fR has to do tilde substitution or translate
|
||||
\fBTcl_TranslateFileName\fR has to translate
|
||||
the name then it uses
|
||||
the dynamic string at \fI*bufferPtr\fR to hold the new string it
|
||||
generates.
|
||||
@@ -68,4 +67,4 @@ has its default empty value when \fBTcl_TranslateFileName\fR is invoked.
|
||||
.SH "SEE ALSO"
|
||||
filename(n)
|
||||
.SH KEYWORDS
|
||||
file name, home directory, tilde, translate, user
|
||||
file name, home directory, translate, user
|
||||
|
||||
@@ -15,16 +15,16 @@ Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UtfToChar16, Tcl_UtfToWChar
|
||||
.sp
|
||||
typedef ... \fBTcl_UniChar\fR;
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UniCharToUtf\fR(\fIch, buf\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToChar16\fR(\fIsrc, uPtr\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToWChar\fR(\fIsrc, wPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
@@ -55,19 +55,19 @@ int
|
||||
\fBTcl_UniCharLen\fR(\fIuniStr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharNcmp\fR(\fIucs, uct, numChars\fR)
|
||||
\fBTcl_UniCharNcmp\fR(\fIucs, uct, uniLength\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharNcasecmp\fR(\fIucs, uct, numChars\fR)
|
||||
\fBTcl_UniCharNcasecmp\fR(\fIucs, uct, uniLength\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharCaseMatch\fR(\fIuniStr, uniPattern, nocase\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfNcmp\fR(\fIcs, ct, numChars\fR)
|
||||
\fBTcl_UtfNcmp\fR(\fIcs, ct, length\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfNcasecmp\fR(\fIcs, ct, numChars\fR)
|
||||
\fBTcl_UtfNcasecmp\fR(\fIcs, ct, length\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfCharComplete\fR(\fIsrc, numBytes\fR)
|
||||
@@ -93,7 +93,7 @@ int
|
||||
const char *
|
||||
\fBTcl_UtfAtIndex\fR(\fIsrc, index\fR)
|
||||
.sp
|
||||
int
|
||||
Tcl_Size
|
||||
\fBTcl_UtfBackslash\fR(\fIsrc, readPtr, dst\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tcl_UniChar" *uniPattern in/out
|
||||
@@ -143,11 +143,9 @@ The length of the input in wchar_t units.
|
||||
If negative, the length includes all bytes until the first null.
|
||||
.AP "Tcl_DString" *dsPtr in/out
|
||||
A pointer to a previously initialized \fBTcl_DString\fR.
|
||||
.AP "unsigned long" numChars in
|
||||
The number of characters to compare.
|
||||
.AP "const char" *start in
|
||||
Pointer to the beginning of a UTF-8 string.
|
||||
.AP int index in
|
||||
.AP Tcl_Size index in
|
||||
The index of a character (not byte) in the UTF-8 string.
|
||||
.AP int *readPtr out
|
||||
If non-NULL, filled with the number of bytes in the backslash sequence,
|
||||
@@ -172,11 +170,12 @@ can consume in a single call.
|
||||
.PP
|
||||
\fBTcl_UniCharToUtf\fR stores the character \fIch\fR as a UTF-8 string
|
||||
in starting at \fIbuf\fR. The return value is the number of bytes stored
|
||||
in \fIbuf\fR. If ch is a high surrogate (range U+D800 - U+DBFF), then
|
||||
the return value will be 1 and a single byte in the range 0xF0 - 0xF4
|
||||
will be stored. If you still want to produce UTF-8 output for it (even
|
||||
though knowing it's an illegal code-point on its own), just call
|
||||
\fBTcl_UniCharToUtf\fR again specifying ch = -1.
|
||||
in \fIbuf\fR. The character \fIch\fR can be or'ed with the value TCL_COMBINE
|
||||
to enable special behavior, compatible with Tcl 8.x. Then, if ch is a high
|
||||
surrogate (range U+D800 - U+DBFF), the return value will be 1 and a single
|
||||
byte in the range 0xF0 - 0xF4 will be stored. If \fIch\fR is a low surrogate
|
||||
(range U+DC00 - U+DFFF), an attempt is made to combine the result with
|
||||
the earlier produced bytes, resulting in a 4-byte UTF-8 byte sequence.
|
||||
.PP
|
||||
\fBTcl_UtfToUniChar\fR reads one UTF-8 character starting at \fIsrc\fR
|
||||
and stores it as a Tcl_UniChar in \fI*chPtr\fR. The return value is the
|
||||
@@ -225,7 +224,7 @@ the number of Unicode characters (not bytes) in that string.
|
||||
\fBTcl_UniCharNcmp\fR and \fBTcl_UniCharNcasecmp\fR correspond to
|
||||
\fBstrncmp\fR and \fBstrncasecmp\fR, respectively, for Unicode characters.
|
||||
They accept two null-terminated Unicode strings and the number of characters
|
||||
to compare. Both strings are assumed to be at least \fInumChars\fR characters
|
||||
to compare. Both strings are assumed to be at least \fIuniLength\fR characters
|
||||
long. \fBTcl_UniCharNcmp\fR compares the two strings character-by-character
|
||||
according to the Unicode character ordering. It returns an integer greater
|
||||
than, equal to, or less than 0 if the first string is greater than, equal
|
||||
@@ -239,7 +238,7 @@ be case sensitive and returns whether the string matches the pattern.
|
||||
.PP
|
||||
\fBTcl_UtfNcmp\fR corresponds to \fBstrncmp\fR for UTF-8 strings. It
|
||||
accepts two null-terminated UTF-8 strings and the number of characters
|
||||
to compare. (Both strings are assumed to be at least \fInumChars\fR
|
||||
to compare. (Both strings are assumed to be at least \fIlength\fR
|
||||
characters long.) \fBTcl_UtfNcmp\fR compares the two strings
|
||||
character-by-character according to the Unicode character ordering.
|
||||
It returns an integer greater than, equal to, or less than 0 if the
|
||||
@@ -306,17 +305,14 @@ byte \fIsrc[0]\fR nor the byte \fIstart[-1]\fR nor the byte
|
||||
Pascal Ord() function. It returns the Unicode character represented at the
|
||||
specified character (not byte) \fIindex\fR in the UTF-8 string
|
||||
\fIsrc\fR. The source string must contain at least \fIindex\fR
|
||||
characters. If a negative \fIindex\fR is given or \fIindex\fR points
|
||||
characters. If \fIindex\fR is negative or \fIindex\fR points
|
||||
to the second half of a surrogate pair, it returns -1.
|
||||
.PP
|
||||
\fBTcl_UtfAtIndex\fR returns a pointer to the specified character (not
|
||||
byte) \fIindex\fR in the UTF-8 string \fIsrc\fR. The source string must
|
||||
contain at least \fIindex\fR characters. This is equivalent to calling
|
||||
\fBTcl_UtfToUniChar\fR \fIindex\fR times, except if that would return
|
||||
a pointer to the second byte of a valid 4-byte UTF-8 sequence, in which
|
||||
case, \fBTcl_UtfToUniChar\fR will be called once more to find the end
|
||||
of the sequence. If a negative \fIindex\fR is given, the returned pointer
|
||||
points to the first character in the source string.
|
||||
\fBTcl_UtfToUniChar\fR \fIindex\fR times. If \fIindex\fR is negative,
|
||||
the return pointer points to the first character in the source string.
|
||||
.PP
|
||||
\fBTcl_UtfBackslash\fR is a utility procedure used by several of the Tcl
|
||||
commands. It parses a backslash sequence and stores the properly formed
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ Tcl_WrongNumArgs \- generate standard error message for wrong number of argument
|
||||
.AP Tcl_Interp interp in
|
||||
Interpreter in which error will be reported: error message gets stored
|
||||
in its result value.
|
||||
.AP int objc in
|
||||
.AP Tcl_Size objc in
|
||||
Number of leading arguments from \fIobjv\fR to include in error
|
||||
message.
|
||||
.AP "Tcl_Obj *const" objv[] in
|
||||
|
||||
+6
-5
@@ -44,8 +44,9 @@ the range \eu0000\-\eu00FF.
|
||||
When encoding binary data as a readable string, the starting binary data is
|
||||
passed to the \fBbinary encode\fR command, together with the name of the
|
||||
encoding to use and any encoding-specific options desired. Data which has been
|
||||
encoded can be converted back to binary form using \fBbinary decode\fR. The
|
||||
following formats and options are supported.
|
||||
encoded can be converted back to binary form using \fBbinary decode\fR.
|
||||
The \fBbinary encode\fR command raises an error if the \fIdata\fR argument
|
||||
is not binary data. The following formats and options are supported.
|
||||
.TP
|
||||
\fBbase64\fR
|
||||
.
|
||||
@@ -609,9 +610,9 @@ will return
|
||||
.PP
|
||||
The \fBbinary scan\fR command parses fields from a binary string,
|
||||
returning the number of conversions performed. \fIString\fR gives the
|
||||
input bytes to be parsed (one byte per character, and characters not
|
||||
representable as a byte have their high bits chopped)
|
||||
and \fIformatString\fR indicates how to parse it.
|
||||
input bytes to be parsed and \fIformatString\fR indicates how to parse it.
|
||||
An error is raised if \fIstring\fR is anything other than a valid binary
|
||||
data value.
|
||||
Each \fIvarName\fR gives the name of a variable; when a field is
|
||||
scanned from \fIstring\fR the result is assigned to the corresponding
|
||||
variable.
|
||||
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH case n 7.0 Tcl "Tcl Built-In Commands"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
case \- Evaluate one of several scripts, depending on a given value
|
||||
.SH SYNOPSIS
|
||||
\fBcase\fI string \fR?\fBin\fR? \fIpatList body \fR?\fIpatList body \fR...?
|
||||
.sp
|
||||
\fBcase\fI string \fR?\fBin\fR? {\fIpatList body \fR?\fIpatList body \fR...?}
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fINote: the \fBcase\fI command is obsolete and is supported only
|
||||
for backward compatibility. At some point in the future it may be
|
||||
removed entirely. You should use the \fBswitch\fI command instead.\fR
|
||||
.PP
|
||||
The \fBcase\fR command matches \fIstring\fR against each of
|
||||
the \fIpatList\fR arguments in order.
|
||||
Each \fIpatList\fR argument is a list of one or
|
||||
more patterns. If any of these patterns matches \fIstring\fR then
|
||||
\fBcase\fR evaluates the following \fIbody\fR argument
|
||||
by passing it recursively to the Tcl interpreter and returns the result
|
||||
of that evaluation.
|
||||
Each \fIpatList\fR argument consists of a single
|
||||
pattern or list of patterns. Each pattern may contain any of the wild-cards
|
||||
described under \fBstring match\fR. If a \fIpatList\fR
|
||||
argument is \fBdefault\fR, the corresponding body will be evaluated
|
||||
if no \fIpatList\fR matches \fIstring\fR. If no \fIpatList\fR argument
|
||||
matches \fIstring\fR and no default is given, then the \fBcase\fR
|
||||
command returns an empty string.
|
||||
.PP
|
||||
Two syntaxes are provided for the \fIpatList\fR and \fIbody\fR arguments.
|
||||
The first uses a separate argument for each of the patterns and commands;
|
||||
this form is convenient if substitutions are desired on some of the
|
||||
patterns or commands.
|
||||
The second form places all of the patterns and commands together into
|
||||
a single argument; the argument must have proper list structure, with
|
||||
the elements of the list being the patterns and commands.
|
||||
The second form makes it easy to construct multi-line case commands,
|
||||
since the braces around the whole list make it unnecessary to include a
|
||||
backslash at the end of each line.
|
||||
Since the \fIpatList\fR arguments are in braces in the second form,
|
||||
no command or variable substitutions are performed on them; this makes
|
||||
the behavior of the second form different than the first form in some
|
||||
cases.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
switch(n)
|
||||
|
||||
.SH KEYWORDS
|
||||
case, match, regular expression
|
||||
@@ -28,7 +28,7 @@ and all threads.
|
||||
Change to the home directory of the user \fBfred\fR:
|
||||
.PP
|
||||
.CS
|
||||
\fBcd\fR ~fred
|
||||
\fBcd\fR [file home fred]
|
||||
.CE
|
||||
.PP
|
||||
Change to the directory \fBlib\fR that is a sibling directory of the
|
||||
|
||||
+122
-62
@@ -137,18 +137,8 @@ returned by \fBencoding names\fR, or
|
||||
from Unicode to the encoding.
|
||||
.RS
|
||||
.PP
|
||||
\fBbinary\fR is an alias for \fBiso8859-1\fR: Each byte read from the
|
||||
channel becomes the Unicode character having the same value as that byte, and
|
||||
each character written to the channel becomes a single byte in the output,
|
||||
allowing Tcl to work seamlessly with binary data as long as each "character" in
|
||||
the data remains in the range of 0 to 255 so that there is no distinction between
|
||||
binary data and text. For example, A JPEG image can be read from a
|
||||
\fBbinary\fR channel, manipulated, and then written back to a \fBbinary\fR
|
||||
channel.
|
||||
|
||||
For working with binary data \fB\-translation binary\fR is usually used
|
||||
instead, as it sets the encoding to \fBbinary\fR and also disables other
|
||||
translations on the channel.
|
||||
\fBbinary\fR is an alias for \fBiso8859-1\fR. This alone is not sufficient for
|
||||
working with binary data. Use \fB\-translation binary\fR instead.
|
||||
.PP
|
||||
The encoding of a new channel is the value of \fBencoding system\fR,
|
||||
which returns the platform- and locale-dependent system encoding used to
|
||||
@@ -156,18 +146,12 @@ interface with the operating system,
|
||||
.RE
|
||||
.TP
|
||||
\fB\-eofchar\fR \fIchar\fR
|
||||
.TP
|
||||
\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, \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 input only.
|
||||
If \fIchar\fR is the empty string, there is no special character that marks
|
||||
the end of the data.
|
||||
|
||||
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 -
|
||||
The default value is the empty string. The acceptable range is \ex01 -
|
||||
\ex7F. A value outside this range results in an error.
|
||||
.VS "TCL8.7 TIP656"
|
||||
.TP
|
||||
@@ -215,10 +199,17 @@ platforms it is \fBcrlf\fR for both input and output.
|
||||
.TP
|
||||
\fBbinary\fR
|
||||
.
|
||||
Like \fBlf\fR, no end-of-line translation is performed, but in addition,
|
||||
\fB\-eofchar\fR is set to the empty string to disable it, and \fB\-encoding\fR
|
||||
is set to \fBbinary\fR. With this one setting, a channel is fully configured
|
||||
for binary input and output.
|
||||
Like \fBlf\fR, no end-of-line translation is performed, but in addition, sets
|
||||
\fB\-eofchar\fR to the empty string to disable it, sets \fB\-encoding\fR to
|
||||
\fBiso8859-1\fR, and sets \fB-profile\fR to \fBstrict\fR so the the channel is
|
||||
fully configured for binary input and output: Each byte read from the channel
|
||||
becomes the Unicode character having the same value as that byte, and each
|
||||
character written to the channel becomes a single byte in the output. This
|
||||
makes it possible to work seamlessly with binary data as long as each character
|
||||
in the data remains in the range of 0 to 255 so that there is no distinction
|
||||
between binary data and text. For example, A JPEG image can be read from a
|
||||
such a channel, manipulated, and then written back to such a channel.
|
||||
|
||||
.TP
|
||||
\fBcr\fR
|
||||
.
|
||||
@@ -245,50 +236,119 @@ typically used on UNIX platforms,
|
||||
.TP
|
||||
\fBchan copy \fIinputChan outputChan\fR ?\fB\-size \fIsize\fR? ?\fB\-command \fIcallback\fR?
|
||||
.
|
||||
Copies data from \fIinputChan\fR to \fIoutputChan\fR, leveraging internal
|
||||
buffers to avoid extra copies and to avoid buffering too much data in main
|
||||
memory when copying large files to slow destinations like network sockets.
|
||||
Reads characters from \fIinputChan\fR and writes them to \fIoutputChan\fR until
|
||||
all characters are copied, blocking until the copy is complete and returning
|
||||
the number of characters copied. Leverages internal buffers to avoid extra
|
||||
copies and to avoid buffering too much data in main memory when copying large
|
||||
files to slow destinations like network sockets.
|
||||
.RS
|
||||
.PP
|
||||
If \fB\-size\fR is given, the size is in bytes if the two channels have the
|
||||
same encoding and in characters otherwise, and only that amount is copied.
|
||||
Otherwise, all data until the end of the file is copied.
|
||||
|
||||
\fBchan copy\fR blocks until the copy is complete and returns the number of
|
||||
bytes or characters written to \fIoutputChan\fR.
|
||||
\fB\-size\fR limits the number of characters copied.
|
||||
.PP
|
||||
If \fB\-command\fR is given, \fBchan copy\fR returns immediately, the copy is
|
||||
carried out in the background, and then \fIcallback\fR is called with the
|
||||
number of bytes written to \fIoutputChan\fR as its first argument, and the
|
||||
error message for any error that occurred as its second argument.
|
||||
\fIinputChan\fR and \fIoutputChan\fR are automatically configured for
|
||||
non-blocking mode if needed. Background copying only works correctly if the
|
||||
event loop is active, e.g. via \fBvwait\fR or Tk.
|
||||
If \fB\-command\fR is given, \fBchan copy\fR returns immediately, works in the
|
||||
background, and calls \fIcallback\fR when the copy completes, providing as an
|
||||
additional argument the number of characters written to \fIoutputChan\fR. If
|
||||
an error occurs during the background copy, another argument provides message
|
||||
for the error. \fIinputChan\fR and \fIoutputChan\fR are automatically
|
||||
configured for non-blocking mode if needed. Background copying only works
|
||||
correctly if events are being processed, e.g. via \fBvwait\fR or Tk.
|
||||
.PP
|
||||
During a background copy no other read or write operation may be performed on
|
||||
\fIinputChan\fR or \fIoutputChan\fR. If either \fIinputChan\fR or
|
||||
\fIoutputChan\fR is closed while the copy is in progress copying ceases and
|
||||
\fBno\fR callback is made. If \fIinputChan\fR is closed all data already queued
|
||||
is written to \fIoutputChan\fR.
|
||||
During a background copy no other read operation may be performed on
|
||||
\fIinputChan\fR, and no write operation may be performed on
|
||||
\fIoutputChan\fR. However, write operations may by performed on
|
||||
\fIinputChan\fR and read operations may be performed on \fIoutputChan\fR, as
|
||||
exhibited by the bidirectional copy example below.
|
||||
.PP
|
||||
The should be no event handler established for \fIinputChan\fR because it may
|
||||
become readable during a background copy. An attempt to read or write
|
||||
from within an event handler results result in the error, "channel busy".
|
||||
If either \fIinputChan\fR or \fIoutputChan\fR is closed while the copy is in
|
||||
progress, copying ceases and \fBno\fR callback is made. If \fIinputChan\fR is
|
||||
closed all data already queued is written to \fIoutputChan\fR.
|
||||
.PP
|
||||
Due to end-of-line translation the number of bytes read from \fIinputChan\fR
|
||||
may be different than the number of bytes written to \fIoutputChan\fR. Only
|
||||
the number of bytes written to \fIoutputChan\fR is reported.
|
||||
There should be no event handler established for \fIinputChan\fR because it
|
||||
may become readable during a background copy. An attempt to read or write from
|
||||
within an event handler results result in the error, "channel busy". Any
|
||||
wrong-sided I/O attempted (by a \fBfileevent\fR handler or otherwise) results
|
||||
in a
|
||||
.QW "channel busy"
|
||||
error.
|
||||
.PP
|
||||
\fBChan copy\fR reads the data according to the \fB\-encoding\fR,
|
||||
\fB\-translation\fR, and \fB\-eofchar\fR of the source and writes to the
|
||||
destination according to the configuration for that channel. If the encoding
|
||||
and translation of both channels is \fBbinary\fR and the \fB\-eofchar\fR of
|
||||
both channels is the empty string, an identical copy is made. If only the
|
||||
encoding of the destination is \fBbinary\fR, Tcl's internal modified UTF-8
|
||||
representation of the characters read from the source is written to the
|
||||
destination. If only the encoding of the source is \fBbinary\fR, each byte read
|
||||
becomes one Unicode character in the range of 0 to 255, and that character is
|
||||
subject to the encoding and translation of the destination as it is written.
|
||||
.PP
|
||||
.IP \fBEXAMPLES\fR
|
||||
.PP
|
||||
The first example transfers the contents of one channel exactly to
|
||||
another. Note that when copying one file to another, it is better to
|
||||
use \fBfile copy\fR which also copies file metadata (e.g. the file
|
||||
access permissions) where possible.
|
||||
.PP
|
||||
.CS
|
||||
fconfigure $in -translation binary
|
||||
fconfigure $out -translation binary
|
||||
\fBfcopy\fR $in $out
|
||||
.CE
|
||||
.PP
|
||||
This second example shows how the callback gets
|
||||
passed the number of bytes transferred.
|
||||
It also uses vwait to put the application into the event loop.
|
||||
Of course, this simplified example could be done without the command
|
||||
callback.
|
||||
.PP
|
||||
.CS
|
||||
proc Cleanup {in out bytes {error {}}} {
|
||||
global total
|
||||
set total $bytes
|
||||
close $in
|
||||
close $out
|
||||
if {[string length $error] != 0} {
|
||||
# error occurred during the copy
|
||||
}
|
||||
}
|
||||
set in [open $file1]
|
||||
set out [socket $server $port]
|
||||
\fBfcopy\fR $in $out -command [list Cleanup $in $out]
|
||||
vwait total
|
||||
.CE
|
||||
.PP
|
||||
The third example copies in chunks and tests for end of file
|
||||
in the command callback.
|
||||
.PP
|
||||
.CS
|
||||
proc CopyMore {in out chunk bytes {error {}}} {
|
||||
global total done
|
||||
incr total $bytes
|
||||
if {([string length $error] != 0) || [eof $in]} {
|
||||
set done $total
|
||||
close $in
|
||||
close $out
|
||||
} else {
|
||||
\fBfcopy\fR $in $out -size $chunk \e
|
||||
-command [list CopyMore $in $out $chunk]
|
||||
}
|
||||
}
|
||||
set in [open $file1]
|
||||
set out [socket $server $port]
|
||||
set chunk 1024
|
||||
set total 0
|
||||
\fBfcopy\fR $in $out -size $chunk \e
|
||||
-command [list CopyMore $in $out $chunk]
|
||||
vwait done
|
||||
.CE
|
||||
.PP
|
||||
The fourth example starts an asynchronous, bidirectional fcopy between
|
||||
two sockets. Those could also be pipes from two [open "|hal 9000" r+]
|
||||
(though their conversation would remain secret to the script, since
|
||||
all four fileevent slots are busy).
|
||||
.PP
|
||||
.CS
|
||||
set flows 2
|
||||
proc Done {dir args} {
|
||||
global flows done
|
||||
puts "$dir is over."
|
||||
incr flows -1
|
||||
if {$flows<=0} {set done 1}
|
||||
}
|
||||
\fBfcopy\fR $sok1 $sok2 -command [list Done UP]
|
||||
\fBfcopy\fR $sok2 $sok1 -command [list Done DOWN]
|
||||
vwait done
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
\fBchan create \fImode cmdPrefix\fR
|
||||
|
||||
+2
-2
@@ -178,7 +178,7 @@ the start of the application.
|
||||
package require http
|
||||
\fBpackage require cookiejar\fR
|
||||
|
||||
set cookiedb ~/.tclcookies.db
|
||||
set cookiedb [file join [file home] cookiejar]
|
||||
http::configure -cookiejar [\fBhttp::cookiejar new\fR $cookiedb]
|
||||
|
||||
# No further explicit steps are required to use cookies
|
||||
@@ -201,7 +201,7 @@ oo::class create MyCookieJar {
|
||||
}
|
||||
}
|
||||
|
||||
set cookiedb ~/.tclcookies.db
|
||||
set cookiedb [file join [file home] cookiejar]
|
||||
http::configure -cookiejar [MyCookieJar new $cookiedb]
|
||||
|
||||
# No further explicit steps are required to use cookies
|
||||
|
||||
+1
-1
@@ -594,7 +594,7 @@ for reading from slots is via \fBinfo class\fR and \fBinfo object\fR).
|
||||
.SH EXAMPLES
|
||||
This example demonstrates how to use both forms of the \fBoo::define\fR and
|
||||
\fBoo::objdefine\fR commands (they work in the same way), as well as
|
||||
illustrating four of the subcommands of them.
|
||||
illustrating four of their subcommands.
|
||||
.PP
|
||||
.CS
|
||||
oo::class create c
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1998 Scriptics Corporation.
|
||||
'\" Copyright (c) 2023 Nathan Coulter
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
|
||||
+2
-2
@@ -198,7 +198,7 @@ the commands in the pipeline will go to the application's
|
||||
standard error file unless redirected.
|
||||
.PP
|
||||
The first word in each command is taken as the command name;
|
||||
tilde-substitution is performed on it, and if the result contains
|
||||
if the result contains
|
||||
no slashes then the directories
|
||||
in the PATH environment variable are searched for
|
||||
an executable by the given name.
|
||||
@@ -449,7 +449,7 @@ encrypted so that only the current user can access it requires use of
|
||||
the \fICIPHER\fR command, like this:
|
||||
.PP
|
||||
.CS
|
||||
set secureDir "~/Desktop/Secure Directory"
|
||||
set secureDir [file join [file home] Desktop/SecureDirectory]
|
||||
file mkdir $secureDir
|
||||
\fBexec\fR CIPHER /e /s:[file nativename $secureDir]
|
||||
.CE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user