Compare commits
767
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d87f07df98 | ||
|
|
4a4195dde8 | ||
|
|
0290bc2e58 | ||
|
|
4408536018 | ||
|
|
813e29b286 | ||
|
|
ea37e7d256 | ||
|
|
264cdba5ac | ||
|
|
bc67254346 | ||
|
|
df59030308 | ||
|
|
8f08010332 | ||
|
|
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 | ||
|
|
aeaba6971a | ||
|
|
a53c12b3b5 | ||
|
|
b29ad5dcf2 | ||
|
|
a6714c6778 | ||
|
|
0472854629 | ||
|
|
cca28f5ef3 | ||
|
|
e97b71f139 | ||
|
|
47f462c33c | ||
|
|
66027ff8e6 | ||
|
|
2e364fd375 | ||
|
|
cb7eb97a8d | ||
|
|
911d6f8e5e | ||
|
|
09e16559af | ||
|
|
c94d0732e0 | ||
|
|
2618ae962a | ||
|
|
82703fea0a | ||
|
|
3b99720301 | ||
|
|
f70182e63c | ||
|
|
1625f9f678 | ||
|
|
fddaf810d4 | ||
|
|
fc19cf036c | ||
|
|
e7cef5d811 | ||
|
|
848c57d596 | ||
|
|
a0cee2b681 | ||
|
|
ae7471ec7e | ||
|
|
861b69164d | ||
|
|
c94fa5b242 | ||
|
|
dc033db224 | ||
|
|
5c12e53355 | ||
|
|
d74efff177 | ||
|
|
e253c3eed9 | ||
|
|
35a47e7051 | ||
|
|
78c6a505b7 | ||
|
|
503165d9c2 | ||
|
|
e4971bdffc | ||
|
|
af64c95042 | ||
|
|
90034cb557 | ||
|
|
d49a7f9c8d | ||
|
|
3f7d896efb | ||
|
|
60c1d787b1 | ||
|
|
df1e155f68 | ||
|
|
862ae1266c | ||
|
|
b985fb8965 | ||
|
|
004d2e654f | ||
|
|
323f750af8 | ||
|
|
8733687efc | ||
|
|
d880550d56 | ||
|
|
c1e69b2d6b | ||
|
|
ecc60b1256 | ||
|
|
b7f335b27d | ||
|
|
50944b9abf | ||
|
|
4dd445404b | ||
|
|
ffe298076d | ||
|
|
4f7e149fb6 | ||
|
|
545fe029f6 | ||
|
|
399309020d | ||
|
|
30816932df | ||
|
|
03b881a299 | ||
|
|
a3581baf86 | ||
|
|
7e80d62929 | ||
|
|
72fef9d4d0 | ||
|
|
7caf2af1db | ||
|
|
a22f4cc167 | ||
|
|
d357339eb6 | ||
|
|
9195d0b1bc | ||
|
|
041458aca6 | ||
|
|
6a7b44b23c | ||
|
|
c45f83b3db | ||
|
|
72db4a5deb | ||
|
|
73a790977d | ||
|
|
c510082005 | ||
|
|
515bd7c0e7 | ||
|
|
50eeabb101 | ||
|
|
2e4dede387 | ||
|
|
0a3cfc7902 | ||
|
|
53f75ee8c8 | ||
|
|
fc0c89372c | ||
|
|
7791d13f5c | ||
|
|
ccf857a3db | ||
|
|
56ca2a64d7 | ||
|
|
e10b5cb8b9 | ||
|
|
88dd8c1911 | ||
|
|
20188493af | ||
|
|
d08eb4bc7d | ||
|
|
3fb975f30d | ||
|
|
1e54e0ba13 | ||
|
|
55d08599b5 | ||
|
|
0900f426bd | ||
|
|
5ef0c1ab2d | ||
|
|
7709859190 | ||
|
|
aeb6cd1eb9 | ||
|
|
ca2928e660 | ||
|
|
99e286f193 | ||
|
|
a123c440eb | ||
|
|
6b299f271e | ||
|
|
74ba5e4336 | ||
|
|
6535d19542 | ||
|
|
56aabaf032 | ||
|
|
d26b9d5751 | ||
|
|
03e22c83db | ||
|
|
38d334f8f2 | ||
|
|
62f180300b | ||
|
|
6c4636e94b | ||
|
|
4ee94e4f67 | ||
|
|
5073e2599b | ||
|
|
04328bc720 | ||
|
|
d852753be2 | ||
|
|
f7429e3230 | ||
|
|
cd97018033 | ||
|
|
531cd741e0 | ||
|
|
7aa511f93b | ||
|
|
bc24a1ca5a | ||
|
|
481f6f184e | ||
|
|
7f10145e49 | ||
|
|
3edb9b4175 | ||
|
|
0f0bd5de07 | ||
|
|
35baa585da | ||
|
|
6cc4425966 | ||
|
|
14cb83639f | ||
|
|
68d6146f53 | ||
|
|
ad7e9fe625 | ||
|
|
5452282a91 | ||
|
|
1858192725 | ||
|
|
e7d7e2db67 | ||
|
|
024c0aa13a | ||
|
|
5e662840fb | ||
|
|
6ad38477e3 | ||
|
|
7ef194a7d1 | ||
|
|
a2e7501d74 | ||
|
|
575f580d51 | ||
|
|
3106ce90c0 | ||
|
|
0109dc8279 | ||
|
|
b49afc700b | ||
|
|
70ca2e60fd | ||
|
|
3135d809f5 | ||
|
|
6bf04853ec | ||
|
|
a2c7cc0d23 | ||
|
|
3d2de6ed07 | ||
|
|
7e59780763 | ||
|
|
a071f9c13b | ||
|
|
edd3934b32 | ||
|
|
f24bab84df | ||
|
|
3d98702f45 | ||
|
|
6416a20fd8 | ||
|
|
77c8868be4 | ||
|
|
ee7499c2e3 | ||
|
|
3bfb46688d | ||
|
|
78c9978aa1 | ||
|
|
7968fff465 | ||
|
|
67dfc6e7e3 | ||
|
|
690c5c2c9e | ||
|
|
0070215933 | ||
|
|
e668c10036 | ||
|
|
4773d1dadd | ||
|
|
bf2b5846b0 | ||
|
|
32bd9fd0d2 | ||
|
|
5162de4fec | ||
|
|
6b4a453621 | ||
|
|
6a1f856c63 | ||
|
|
5dab0fa5de | ||
|
|
f368137ec5 | ||
|
|
b863e0d57a | ||
|
|
01785b73fb | ||
|
|
cfc103c6b8 | ||
|
|
7de69aeb41 | ||
|
|
a55934d712 | ||
|
|
04249bbcd7 | ||
|
|
eb1f9c9989 | ||
|
|
da8010ca5c | ||
|
|
6c5be5280f | ||
|
|
24f3e6199d | ||
|
|
81da6c1a9a | ||
|
|
f4a4df7a48 | ||
|
|
c59dfa5e83 | ||
|
|
3f68e9f64f | ||
|
|
801ae4d914 | ||
|
|
cd82527608 | ||
|
|
6f98b30d5b | ||
|
|
4b6859f9dc | ||
|
|
13b2522d41 | ||
|
|
6ae93efff0 | ||
|
|
3a1e74ddc5 | ||
|
|
b95bc2b4ce | ||
|
|
324c39d51c | ||
|
|
26aa7dd453 | ||
|
|
bc27046551 | ||
|
|
e30e67e0cd | ||
|
|
e5d7a4afce | ||
|
|
d273c052a5 | ||
|
|
53cfe378b3 | ||
|
|
7f18f499d0 | ||
|
|
04d66a2571 | ||
|
|
e8d619b292 | ||
|
|
1b53ef3bbd | ||
|
|
07ea9d3df5 | ||
|
|
bd64729686 | ||
|
|
4fdc66665f | ||
|
|
be1a8384ef | ||
|
|
e37db31205 | ||
|
|
823a3f2b2b | ||
|
|
9df01df02c | ||
|
|
f35db8a093 | ||
|
|
b8c47674a4 | ||
|
|
9a18abc855 | ||
|
|
22c9ba1a27 | ||
|
|
bc87d9a2bc | ||
|
|
7c2d72933f | ||
|
|
eb09d3860d | ||
|
|
09c0f68355 | ||
|
|
172063cace | ||
|
|
e26ccd75b1 | ||
|
|
104527a107 | ||
|
|
2e4b97b87f | ||
|
|
be39d74ee7 | ||
|
|
ded49faad5 | ||
|
|
73a582c685 | ||
|
|
c2f255fe84 | ||
|
|
2ebe7012db | ||
|
|
ec8dfd57db | ||
|
|
d8ce1ffde8 | ||
|
|
7f8e25f907 | ||
|
|
06465624ac | ||
|
|
cf84dd6daf | ||
|
|
954457baf9 | ||
|
|
f1b8cb6289 | ||
|
|
414a984d04 | ||
|
|
2e79331ac0 | ||
|
|
7d37ba8e63 | ||
|
|
478601a07b | ||
|
|
3c8ac03074 | ||
|
|
d07e50e54a | ||
|
|
9cf727affb | ||
|
|
7ab30f565b | ||
|
|
4314e8e438 | ||
|
|
96c8069270 | ||
|
|
dde4e1b094 | ||
|
|
ac52dca2ba | ||
|
|
a9377a35b7 | ||
|
|
5140d2419c | ||
|
|
d716e3bd57 | ||
|
|
02f302c8cf | ||
|
|
9ef860c58c | ||
|
|
702bb9ab89 | ||
|
|
a7e21b7c56 | ||
|
|
6b77d746e1 | ||
|
|
7e152743be | ||
|
|
0513ad381a | ||
|
|
b37dff78c1 | ||
|
|
103eb015c0 | ||
|
|
73519e9804 | ||
|
|
2867ac2637 | ||
|
|
3d0413417d | ||
|
|
56d50aec7c | ||
|
|
b1ee2de573 | ||
|
|
5d5b5a4242 | ||
|
|
c8ff4cae81 | ||
|
|
6104a20928 | ||
|
|
b87d0095dc | ||
|
|
4632c037e3 | ||
|
|
28c9edc49b | ||
|
|
614c8b3360 | ||
|
|
a4f289d5b5 | ||
|
|
75bdb75689 | ||
|
|
13f6f72bb7 | ||
|
|
af838a5d52 | ||
|
|
8091425c93 | ||
|
|
4c03aeaadd | ||
|
|
69ae2a0f03 | ||
|
|
7988b3f1b6 | ||
|
|
827a1d3802 | ||
|
|
d4e8db78c9 | ||
|
|
22306f855b | ||
|
|
0657f97bc5 | ||
|
|
09bc3f7033 | ||
|
|
ba261e8e87 | ||
|
|
c3f8318a3f | ||
|
|
6598d2eeae | ||
|
|
29225e440c | ||
|
|
231fd112f9 | ||
|
|
70a3d08fc4 | ||
|
|
c7771a763e | ||
|
|
6c1bdd15d6 | ||
|
|
9a6a7030e8 | ||
|
|
e91f967003 | ||
|
|
633171eda9 | ||
|
|
2acd355f8d | ||
|
|
73ff912a1f | ||
|
|
b9722ec356 | ||
|
|
f3f254e8ba | ||
|
|
f1e62884ba | ||
|
|
e18d096bd7 | ||
|
|
54a1d7e517 | ||
|
|
c6cce703b5 | ||
|
|
f19e2665d3 | ||
|
|
96d441c29a | ||
|
|
72dfeb60e2 | ||
|
|
b27acbe84f | ||
|
|
1b8701ee3d | ||
|
|
83d22bd1f6 | ||
|
|
861c6c226a | ||
|
|
b0bd6fc251 | ||
|
|
6643ceb141 | ||
|
|
16a75f3cbf | ||
|
|
ed8816500e | ||
|
|
5ef48eba53 | ||
|
|
ee48919fcc | ||
|
|
d6a3425ec6 | ||
|
|
b0f19e41f2 | ||
|
|
fa313109d6 | ||
|
|
00dd4a5b56 | ||
|
|
ac555b905c | ||
|
|
5990382222 | ||
|
|
c7e670b85f | ||
|
|
86e88cf233 | ||
|
|
6781fbdf4b | ||
|
|
e47cbdc798 | ||
|
|
a5297cf7c3 | ||
|
|
32ffe00c48 | ||
|
|
8f8a3bc1c0 | ||
|
|
a038d4aad3 | ||
|
|
17c92b0a7a | ||
|
|
4eb91b8e5b | ||
|
|
ebcc04616c | ||
|
|
50dde26caf | ||
|
|
6fa73194d5 | ||
|
|
49c4458a25 | ||
|
|
02563b1911 | ||
|
|
54e89ec231 | ||
|
|
8074bcec5e | ||
|
|
4db805463e | ||
|
|
45dd8baf76 | ||
|
|
f6f92fd671 | ||
|
|
f2f41b4b85 | ||
|
|
db43c8cbed | ||
|
|
062f4d0529 | ||
|
|
48d6b3d84c | ||
|
|
aafa141509 | ||
|
|
d6ed36f134 | ||
|
|
14d2bc5415 | ||
|
|
36cebb89fe | ||
|
|
4fa1fa29ae | ||
|
|
6fbc88e2a0 | ||
|
|
87ff0e4ee2 | ||
|
|
847fdd28f7 | ||
|
|
01e71bb26c | ||
|
|
ce00b07d6b | ||
|
|
363a6cc4cd | ||
|
|
180af1f9a5 | ||
|
|
c03808607b | ||
|
|
6c604517d7 | ||
|
|
6802927d5c | ||
|
|
c0c0164a71 | ||
|
|
284a501487 | ||
|
|
909827f9ee | ||
|
|
293c1ff559 | ||
|
|
7b647d920a | ||
|
|
e95d2eea7f | ||
|
|
2e02e1affd | ||
|
|
77b454d1b2 | ||
|
|
8f15f09491 | ||
|
|
8d076e6525 | ||
|
|
133b43a521 | ||
|
|
af5bfc68cc | ||
|
|
0d8a08dbf1 | ||
|
|
1a4e52416f | ||
|
|
4dcdd51adb | ||
|
|
73dbbaaa23 | ||
|
|
d162c9a16d | ||
|
|
ce9f04ddd1 | ||
|
|
8f269fcad1 | ||
|
|
67b780c161 | ||
|
|
f4cd60dbb4 | ||
|
|
d0ba759e2c | ||
|
|
3f84674ae3 | ||
|
|
4e92d998eb | ||
|
|
3e05a7babe | ||
|
|
5940356ced | ||
|
|
cc71607cb8 | ||
|
|
405a099384 | ||
|
|
1ea2b16a8d | ||
|
|
f976a32c62 | ||
|
|
92dd14e77c | ||
|
|
3f2bb8a029 | ||
|
|
e51f7da2ee | ||
|
|
af320fb41e | ||
|
|
e2f55284cf | ||
|
|
8a45e47c4c | ||
|
|
4dd7110019 | ||
|
|
881b147ab5 | ||
|
|
b583ea7360 | ||
|
|
d40bb9d13a | ||
|
|
688c125ec3 | ||
|
|
06cc962945 | ||
|
|
88760a8a81 | ||
|
|
aa4247d47b | ||
|
|
81b4fa2fbd | ||
|
|
7b688527d7 | ||
|
|
9aac3677ed | ||
|
|
41aa17e389 | ||
|
|
84d939b69a | ||
|
|
60ba166da0 | ||
|
|
2dccd2a567 | ||
|
|
df75b91956 | ||
|
|
43b5729ddf | ||
|
|
1f5d09b497 | ||
|
|
eb23b011d0 | ||
|
|
03d0f99e6c | ||
|
|
694c4505cd | ||
|
|
28e5ec7db6 | ||
|
|
fea912c676 | ||
|
|
7555420166 | ||
|
|
10c71dc8b9 | ||
|
|
530e4b3bb9 | ||
|
|
b6bc736eee | ||
|
|
fe84f70800 | ||
|
|
c77055a803 | ||
|
|
3b426fffa1 | ||
|
|
782009ca67 | ||
|
|
e1f2905dbc | ||
|
|
ca58c3ae9a | ||
|
|
dd6950d635 | ||
|
|
c3cb435cf4 | ||
|
|
6c4b78cfa8 | ||
|
|
75eea66ef7 | ||
|
|
251211e714 | ||
|
|
e313582726 | ||
|
|
a06189323f | ||
|
|
93f06f4469 | ||
|
|
6c973cf9a2 | ||
|
|
e393e2694c | ||
|
|
1645895629 | ||
|
|
ef51b5aacd | ||
|
|
905633199c | ||
|
|
4d289b8084 | ||
|
|
85a2a91729 | ||
|
|
947e3f8405 | ||
|
|
ad7deae634 | ||
|
|
a6d654980e | ||
|
|
2fae9f1746 | ||
|
|
5eb2064b63 | ||
|
|
7f433932f6 | ||
|
|
2e9301202d | ||
|
|
8bfaaa8337 | ||
|
|
175931c905 | ||
|
|
18f61eeeeb | ||
|
|
54b8f46097 | ||
|
|
372bf74334 | ||
|
|
f9f1724b36 | ||
|
|
cd51753d86 | ||
|
|
f227a5d1ff | ||
|
|
5ddcd8fea9 | ||
|
|
fe4e51b427 | ||
|
|
bd259695f1 | ||
|
|
e5eeaadf3c | ||
|
|
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 | ||
|
|
00afea1c26 | ||
|
|
f5125db22b | ||
|
|
08d2d4c09b | ||
|
|
f14ee8d1bb | ||
|
|
d425f04462 | ||
|
|
c90b84b116 | ||
|
|
8da10bea0f | ||
|
|
9ec33349d5 | ||
|
|
556c3fc35b | ||
|
|
39180cad0e | ||
|
|
4402cae446 | ||
|
|
79af33ce68 | ||
|
|
a3380d8151 | ||
|
|
b58023ffa1 | ||
|
|
e3e6c33969 | ||
|
|
1fe7d754ed | ||
|
|
d39298874a | ||
|
|
b794cb03e1 | ||
|
|
c7f27e3c87 | ||
|
|
e86259d193 | ||
|
|
6ca1315df1 | ||
|
|
b807564e68 | ||
|
|
c091b78af6 | ||
|
|
e359627a36 | ||
|
|
f22a5b57f7 | ||
|
|
883924f1e8 | ||
|
|
11b8f6eb00 | ||
|
|
f6830a72ec | ||
|
|
ae3ae231d0 | ||
|
|
d4dd40b364 | ||
|
|
4c6600039e | ||
|
|
f3d3725e39 | ||
|
|
21d90d4f4a | ||
|
|
2f2003c490 | ||
|
|
b98b8f9181 | ||
|
|
aab1aa08f0 | ||
|
|
e90011ea91 | ||
|
|
f42b2cef2a | ||
|
|
ddefa6b172 | ||
|
|
9a3cd17eb7 | ||
|
|
df0ddd7b9b | ||
|
|
fdaffbc402 | ||
|
|
5cb63f12bd | ||
|
|
49cfc0317e | ||
|
|
d87bc3c2f0 | ||
|
|
b30e837f58 | ||
|
|
db8e59ed80 | ||
|
|
870ad938f7 | ||
|
|
c37a94290c | ||
|
|
60c1da90cc | ||
|
|
6f003899fe | ||
|
|
75f7e5328a | ||
|
|
e08e6f2733 | ||
|
|
87df69042c | ||
|
|
2aed8b1bdf | ||
|
|
0ceb73f34c | ||
|
|
61722ce13d | ||
|
|
249b57ef37 | ||
|
|
a9974c36d0 | ||
|
|
e645e12652 | ||
|
|
898f354492 | ||
|
|
4655526dd7 | ||
|
|
cceb3ebdde | ||
|
|
c899e77701 | ||
|
|
ad32d6ed76 | ||
|
|
713ccc8bb6 | ||
|
|
b37682866b | ||
|
|
9224a1a6c2 | ||
|
|
8248b84e17 | ||
|
|
f64db5dae2 | ||
|
|
52425dcf5d | ||
|
|
7882365428 | ||
|
|
7962f209ac | ||
|
|
afacee3f07 | ||
|
|
e8326222de | ||
|
|
b52ee10fc7 | ||
|
|
f82e6059dc | ||
|
|
aff6cc9141 | ||
|
|
0db2f11f15 | ||
|
|
810eabe0ef | ||
|
|
3ecc8df3dc | ||
|
|
0000e98387 | ||
|
|
c8259f4fec | ||
|
|
d3bb4906d1 | ||
|
|
ec63738e5c | ||
|
|
dcd5ea5b91 | ||
|
|
d8c2bafa2c | ||
|
|
f7c3a98827 | ||
|
|
ee84d52e39 | ||
|
|
50f141d888 | ||
|
|
d5619e30fe | ||
|
|
4307d0a739 | ||
|
|
12b3b1ee00 | ||
|
|
e40a0e13a8 | ||
|
|
a1021c091c | ||
|
|
a6754db559 | ||
|
|
c3cfa1176e | ||
|
|
023ceb178d | ||
|
|
bce26daa76 | ||
|
|
ca227dbb84 | ||
|
|
54ad113891 | ||
|
|
7d767c4cb9 | ||
|
|
f3ea1d46e1 | ||
|
|
4518ee9a6d | ||
|
|
786549398b | ||
|
|
ae5de56339 | ||
|
|
e4749b5f32 | ||
|
|
b4542dd058 | ||
|
|
b77f43bb11 | ||
|
|
83677a47e7 | ||
|
|
3d91df2489 | ||
|
|
2456020044 | ||
|
|
cf6c56c88d | ||
|
|
55375d0dfe | ||
|
|
3b742b785e | ||
|
|
a0d8d381c1 | ||
|
|
b571892e4f | ||
|
|
9c0541d0e4 | ||
|
|
bee240eab0 | ||
|
|
4d067d1cdf | ||
|
|
4acb728d29 | ||
|
|
7b249ac174 | ||
|
|
06e049afdf | ||
|
|
b223689153 | ||
|
|
d90b82d5ce | ||
|
|
7bfc449085 | ||
|
|
f350cdd7cc | ||
|
|
3643909840 | ||
|
|
9365f75b61 | ||
|
|
e49e2ac11d | ||
|
|
0fb466009e | ||
|
|
3c2a7e1741 | ||
|
|
a066019d75 | ||
|
|
1ab82013f2 | ||
|
|
543bde3f26 | ||
|
|
eea17e30ab | ||
|
|
556b19bf28 | ||
|
|
d9bef75f08 | ||
|
|
baa549af6a | ||
|
|
a30f4dce67 | ||
|
|
5a1359a5e8 | ||
|
|
edb3e7b8d2 | ||
|
|
84a0e08557 | ||
|
|
879e7b7112 | ||
|
|
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 | ||
|
|
528b7b7168 | ||
|
|
0fbdd463cb | ||
|
|
dd1dc3c6e8 | ||
|
|
4a3c559932 | ||
|
|
cc185b1d76 | ||
|
|
2ef45b0593 | ||
|
|
a60681c2f3 | ||
|
|
b9b527183a | ||
|
|
446587dc91 | ||
|
|
31c68fa4e7 | ||
|
|
f9e3b4dd74 | ||
|
|
8bf1d3fbf1 | ||
|
|
298667e221 | ||
|
|
129d7aee61 | ||
|
|
92f5f9afc6 | ||
|
|
f3b81a9854 | ||
|
|
7561d600a6 | ||
|
|
7030b2b274 | ||
|
|
b6ce0622a6 | ||
|
|
136b650bda | ||
|
|
65b685deca | ||
|
|
0865a0b6b0 | ||
|
|
79260bd695 | ||
|
|
1a062775d2 | ||
|
|
a855be143c | ||
|
|
5e07595538 | ||
|
|
5ed49bbc61 | ||
|
|
fa0c0e6134 | ||
|
|
f3b329dd28 | ||
|
|
496cff3ee1 | ||
|
|
0f93742804 | ||
|
|
7dd7fe1b6c | ||
|
|
bfcd8d392a | ||
|
|
004c1e1c8e | ||
|
|
99145db40b | ||
|
|
2569d6f81c | ||
|
|
dafa1487f9 | ||
|
|
743e0e4e1a | ||
|
|
8249e877df | ||
|
|
b308bd97e6 | ||
|
|
ae24dd87fa | ||
|
|
995eed36fd | ||
|
|
c4f94adb46 | ||
|
|
d4b3d3a460 | ||
|
|
6eb109c913 | ||
|
|
edb3a561eb | ||
|
|
c15b6135d5 | ||
|
|
a7a226fc49 | ||
|
|
76c3874ad8 | ||
|
|
c0eed541eb |
@@ -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
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
name: Linux
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "core-8-branch"
|
||||
- "core-8-6-branch"
|
||||
tags:
|
||||
- "core-**"
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
@@ -22,6 +29,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -32,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
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
name: macOS
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "core-8-branch"
|
||||
- "core-8-6-branch"
|
||||
tags:
|
||||
- "core-**"
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
@@ -12,6 +19,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -20,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:
|
||||
@@ -42,6 +52,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
timeout-minutes: 5
|
||||
- name: Prepare
|
||||
run: |
|
||||
touch tclStubInit.c tclOOStubInit.c tclOOScript.h
|
||||
@@ -53,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
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
name: Build Binaries
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "core-8-branch"
|
||||
tags:
|
||||
- "core-**"
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
@@ -9,6 +15,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -44,6 +51,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -106,6 +114,7 @@ jobs:
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CC: gcc
|
||||
CFGOPT: --disable-symbols --disable-shared
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
name: Windows
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "core-8-branch"
|
||||
- "core-8-6-branch"
|
||||
tags:
|
||||
- "core-**"
|
||||
permissions:
|
||||
contents: read
|
||||
env:
|
||||
@@ -24,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:
|
||||
@@ -67,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
|
||||
@@ -79,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/*
|
||||
|
||||
-2634
File diff suppressed because it is too large
Load Diff
-2539
File diff suppressed because it is too large
Load Diff
-3629
File diff suppressed because it is too large
Load Diff
-4741
File diff suppressed because it is too large
Load Diff
-3349
File diff suppressed because it is too large
Load Diff
-4619
File diff suppressed because it is too large
Load Diff
-3822
File diff suppressed because it is too large
Load Diff
-5921
File diff suppressed because it is too large
Load Diff
-3796
File diff suppressed because it is too large
Load Diff
@@ -3028,7 +3028,7 @@ in case of errors is required for proper cleanup by the user of fcopy. (BW)
|
||||
x eval rename foo blotz
|
||||
x alias foo {}
|
||||
The problem was that the interp code was not using the actual current name
|
||||
of the command to be deleted as a result of un-aliasing foo. (JL)
|
||||
of the command to be deleted as a result of unaliasing foo. (JL)
|
||||
|
||||
6/19/97 (feature change) Pass interp down to the ChannelOption and
|
||||
driver specific calls so system errors can be differentiated from syntax
|
||||
@@ -4167,7 +4167,7 @@ Only.) This fix included:
|
||||
the location of the encoding files and libraries. This fix included:
|
||||
- Adding the TclSetPerInitScript routine.
|
||||
- Modifying the Tcl_Init routines to evaluate the non-NULL
|
||||
pre-init script.
|
||||
preinit script.
|
||||
- Adding the Tcl_SetdefaultEncodingDir and Tcl_GetDefaultEncodingDir
|
||||
routines.
|
||||
- Modifying the TclpInitLibrary routines to append the default
|
||||
@@ -4650,7 +4650,7 @@ threading may still cause problems on AIX. (hobbs)
|
||||
9/21/99 (bug fix) fixed bug when setting array in non-existent
|
||||
namespace. [Bug: 2613] (hobbs)
|
||||
|
||||
--- Released 8.2.1, October 04, 1999 --- See ChangeLog for details ---
|
||||
--- Released 8.2.1, October 04, 1999
|
||||
|
||||
10/30/99 (feature enhancement) new regexp engine from Henry Spencer
|
||||
was patched in - should greatly reduce stack space usage. (spencer)
|
||||
@@ -4680,7 +4680,7 @@ when indexing into one (test case string-5.16) [Bug: 2871] (hobbs)
|
||||
|
||||
10/30/99 (bug fix) fixes for mac UTF filename handling (ingham)
|
||||
|
||||
--- Released 8.2.2, November 04, 1999 --- See ChangeLog for details ---
|
||||
--- Released 8.2.2, November 04, 1999
|
||||
|
||||
11/19/99 (feature enhancement) bug fixes for http package as well as
|
||||
patch required by TLS (SSL) extension that adds http::(un)register
|
||||
@@ -4705,7 +4705,7 @@ atexit handlers.
|
||||
12/07/99 (bug fix) fixes for 'expr + {[incr]}' and 'expr + {[error]}'
|
||||
cases (different causes).
|
||||
|
||||
--- Released 8.2.3, December 16, 1999 --- See ChangeLog for details ---
|
||||
--- Released 8.2.3, December 16, 1999
|
||||
|
||||
1999-09-14 (feature enhancement) added -start switch to regexp and regsub.
|
||||
|
||||
@@ -4762,7 +4762,7 @@ ExitThread to _endthreadex to prevent 4K mem leak (gravereaux)
|
||||
|
||||
1999-12-21 (bug fix) changed thread ids to longs (for 64bit systems)
|
||||
|
||||
--- Released 8.3b1, December 22, 1999 --- See ChangeLog for details ---
|
||||
--- Released 8.3b1, December 22, 1999
|
||||
|
||||
2000-01-10 (feature enhancement) clock scan now supports the common
|
||||
ISO 8601 date/time formats. See docs for details. (melski)
|
||||
@@ -4788,7 +4788,7 @@ symbolicly (like chmod) in [file attributes $file -permissions ...] (schoebel)
|
||||
2000-01-13 (bug fix) fixed lsort -dictionary problem when sorting
|
||||
characters between 'Z' and 'a' (flawed upper/lower comparison logic) (melski)
|
||||
|
||||
--- Released 8.3b2, January 13, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.3b2, January 13, 2000
|
||||
|
||||
2000-01-14 (feature enhancement) clock format %Q added, clock scan updated
|
||||
|
||||
@@ -4827,7 +4827,7 @@ mac panic from an error when closing an async socket (steffen, ingham)
|
||||
2000-02-10 (feature enhancement) improved error reporting for failed
|
||||
loads on Windows (dejong, hobbs)
|
||||
|
||||
--- Released 8.3.0, February 10, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.3.0, February 10, 2000
|
||||
|
||||
2000-03 (bug fixes, feature enhancement) overhaul of http package for
|
||||
proper handling of async callbacks (new options), version is now at 2.3
|
||||
@@ -4870,7 +4870,7 @@ tclLoadDyld.c dl type. (sanchez)
|
||||
2000-04-24 (bug fix) fixed hang in threaded Unix case when backgrounded
|
||||
exec process was running (dejong)
|
||||
|
||||
--- Released 8.3.1, April 26, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.3.1, April 26, 2000
|
||||
|
||||
2000-04-26 (doc fix) updated/added documentation for many API's and
|
||||
commands (melski)
|
||||
@@ -4920,7 +4920,7 @@ pattern matching for [array names] (gazetta)
|
||||
2000-05-31 (feature enhancement) added -nocomplain and -- flags to
|
||||
[unset] to allow for silent unset operation (hobbs)
|
||||
|
||||
--- Released 8.4a1, June 6, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.4a1, June 6, 2000
|
||||
|
||||
2000-05-29 (bug fix) corrected resource cleanup in http error cases.
|
||||
Improved handling of error cases in http. (tamhankar)
|
||||
@@ -4959,7 +4959,7 @@ sections. (english)
|
||||
2000-08-07 (bug fix) new man pages memory.n, TCL_MEM_DEBUG.3, Init.3 and
|
||||
DumpActiveMemory.3. (melski)
|
||||
|
||||
--- Released 8.3.2, August 9, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.3.2, August 9, 2000
|
||||
|
||||
2000-06 thru 2000-11 (build improvements) Added support for mingw (gcc on
|
||||
Windows), AIX-5 and Win64 builds (dejong, hobbs)
|
||||
@@ -5018,7 +5018,7 @@ environment (gravereaux)
|
||||
2000-11-03 (new feature) Tcl_SetMainLoop enables defining an event loop for
|
||||
tclsh. This enables Tk as a truly loadable package. (hobbs)
|
||||
|
||||
--- Released 8.4a2, November 3, 2000 --- See ChangeLog for details ---
|
||||
--- Released 8.4a2, November 3, 2000
|
||||
|
||||
2000-09-27 (bug fix) fixed a bug introduced by a partial fix in 8.3.2 that
|
||||
didn't set nonBlocking correctly when resetting the flags for the write
|
||||
@@ -5076,7 +5076,7 @@ Update of READMEs.
|
||||
Corrected IRIX-5* configure (english). Added support for AIX-5 (hobbs).
|
||||
Added support for Win64 (hobbs).
|
||||
|
||||
--- Released 8.3.3, April 6, 2001 --- See ChangeLog for details ---
|
||||
--- Released 8.3.3, April 6, 2001
|
||||
|
||||
2000-11-23 (new feature)[TIP 7] higher resolution timer on Windows (kenny)
|
||||
|
||||
@@ -5150,7 +5150,7 @@ system. This includes the addition of 'file normalize', 'file system',
|
||||
|
||||
* corrected several minor errors noted by Purify (hobbs)
|
||||
|
||||
--- Released 8.4a3, August 6, 2001 --- See ChangeLog for details ---
|
||||
--- Released 8.4a3, August 6, 2001
|
||||
|
||||
2001-06-27 (bug fix)[217987] corrected backslash substitution of non-ASCII
|
||||
characters. (hobbs, riefenstahl)
|
||||
@@ -5256,7 +5256,7 @@ bundles to standard .dylib dynamic libraries like on other unices.
|
||||
2001-10-18 (bug fix) corrected off-by-one-day error in clock scan with
|
||||
relative months and years during swing hours. (lavana)
|
||||
|
||||
--- Released 8.3.4, October 19, 2001 --- See ChangeLog for details ---
|
||||
--- Released 8.3.4, October 19, 2001
|
||||
|
||||
2001-08-21 (bug fix)[219184] overagressive compilation of [catch] (sofer)
|
||||
|
||||
@@ -5282,8 +5282,6 @@ compiles to 0 bytecodes (sofer)
|
||||
|
||||
2001-09-13 (new feature)[TIP 56] Tcl_EvalTokensStandard API (sofer)
|
||||
|
||||
2001-09-13 (new feature) Old ChangeLog entries => ChangeLog.1999 (hobbs)
|
||||
|
||||
2001-09-17 (new feature) compiling with TCL_COMPILE_DEBUG now required to
|
||||
enable all compile and execution tracing (sofer)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
@@ -5368,8 +5366,6 @@ of the Host: header value
|
||||
2002-01-25 (new feature)[496733] socket options -eofchar and -translation
|
||||
return read-only values (dejong)
|
||||
|
||||
2002-01-28 (new feature) Old ChangeLog entries => ChangeLog.20900 (hobbs)
|
||||
|
||||
2002-01-28 (performance enhancement) bytecompiled [regexp] for trivial cases
|
||||
that amount to string matching. Also -nocase and --. (hobbs)
|
||||
|
||||
@@ -5394,7 +5390,7 @@ errored out. (kupries, sofer)
|
||||
|
||||
2002-02-15 (new feature)[TIP 72] support for 64-bit integer values on
|
||||
32-bit platforms and ability to work with >2GiB files. Extends many
|
||||
commands. See ChangeLog and TIP for details.
|
||||
commands. See TIP for details.
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2002-02-22 (bug fix)[476537] Fix panic when loading shared library without
|
||||
@@ -5435,7 +5431,7 @@ of prior Tcl releases. Others will need to be reconciled.
|
||||
related to the handling of iso2022 text and finalization of escape-based
|
||||
encodings. (taguchi, takahashi, hobbs)
|
||||
|
||||
--- Released 8.4a4, March 5, 2002 --- See ChangeLog for details ---
|
||||
--- Released 8.4a4, March 5, 2002
|
||||
|
||||
2002-03-06 (new feature)[TIP 80] expanded [lsearch] options (wilkason, fellows)
|
||||
|
||||
@@ -5545,7 +5541,7 @@ options to configure (max)
|
||||
|
||||
2002-07-03 (bug fix)[577015] [catch] catches even compile errors (sofer)
|
||||
|
||||
--- Released 8.4b1, July 5, 2002 --- See ChangeLog for details ---
|
||||
--- Released 8.4b1, July 5, 2002
|
||||
|
||||
2002-07-08 (bug fix) restored compatibility of [viewFile] in tcltest (porter)
|
||||
|
||||
@@ -5583,7 +5579,7 @@ options to configure (max)
|
||||
Many internal bugs fixed.
|
||||
Considerable cleanup of the test suite.
|
||||
|
||||
--- Released 8.4b2, August 9, 2002 --- See ChangeLog for details ---
|
||||
--- Released 8.4b2, August 9, 2002
|
||||
|
||||
2002-08-20 (new feature) --enable-memdebug configure option (kupries)
|
||||
|
||||
@@ -5598,7 +5594,7 @@ Considerable cleanup of the test suite.
|
||||
|
||||
2002-09-02 (platfrom support) 64-bit compile on HP-11 (martin)
|
||||
|
||||
--- Released 8.4.0, September 10, 2002 --- See ChangeLog for details ---
|
||||
--- Released 8.4.0, September 10, 2002
|
||||
|
||||
2002-09-18 (platform support) Updated support for compiling with Cygwin and
|
||||
either mingw or gcc. (khan, howell, dejong)
|
||||
@@ -5661,7 +5657,7 @@ dirs to tcl_pkgPath: @executable_path/../Frameworks and
|
||||
@executable_path/../PrivateFrameworks (if they exist), as well as the dirs
|
||||
in DYLD_FRAMEWORK_PATH (if set). (steffen)
|
||||
|
||||
--- Released 8.4.1, October 22, 2002 --- See ChangeLog for details ---
|
||||
--- Released 8.4.1, October 22, 2002
|
||||
|
||||
2002-10-28 (bug fix)[627660] [package unknown] chaining for platform specifics
|
||||
|
||||
@@ -5754,7 +5750,7 @@ packages in multiple interps.
|
||||
|
||||
2003-02-27 (bug fix)[694232] stop [lsearch -start 0 {} x] segfault
|
||||
|
||||
--- Released 8.4.2, March 3, 2003 --- See ChangeLog for details ---
|
||||
--- Released 8.4.2, March 3, 2003
|
||||
|
||||
2003-03-06 (bug fix)[699042] Correct case-insensitive unicode string
|
||||
comparison in Tcl_UniCharNcasecmp
|
||||
@@ -5836,7 +5832,7 @@ encoding for the original. Most uses of gb2312 really mean euc-cn.
|
||||
2003-05-14 (bug fix)[736421] Corrected another putenv() copy behavior
|
||||
problem when compiling on Windows and using Microsoft's runtime.
|
||||
|
||||
--- Released 8.4.3, May 20, 2003 --- See ChangeLog for details ---
|
||||
--- Released 8.4.3, May 20, 2003
|
||||
|
||||
2003-05-23 (bug fix)[726018] reverted internals change to the
|
||||
'cmdName' Tcl_ObjType that broke several extensions (TclBlend, e4graph...)
|
||||
@@ -5877,7 +5873,7 @@ Improved documentation, new tests, and some code cleanup.
|
||||
[655300, 720634, 735364, 748700, 756112, 756744, 756951, 758488, 760768,
|
||||
763312, 769895, 771539, 771840, 771947, 771949, 772333]
|
||||
|
||||
--- Released 8.4.4, July 22, 2003 --- See ChangeLog for details ---
|
||||
--- Released 8.4.4, July 22, 2003
|
||||
|
||||
2003-07-23 (bug fix)[775976] fix registry compilation for VC7.
|
||||
|
||||
@@ -5923,7 +5919,7 @@ asked for writable events by the generic layer.
|
||||
2003-11-17 (bug fix)[230589, 504785, 505048, 703709, 840258] fixes to
|
||||
various odd regexp "can't happen" bugs.
|
||||
|
||||
--- Released 8.4.5, November 20, 2003 --- See ChangeLog for details ---
|
||||
--- Released 8.4.5, November 20, 2003
|
||||
|
||||
2003-12-02 (bug fix)[851747] object sharing fix in [binary scan]
|
||||
|
||||
@@ -5960,7 +5956,7 @@ various odd regexp "can't happen" bugs.
|
||||
|
||||
2004-03-01 (platform support)[218561] Allow 64-bit configure on IRIX64-6.5*
|
||||
|
||||
--- Released 8.4.6, March 1, 2004 --- See ChangeLog for details ---
|
||||
--- Released 8.4.6, March 1, 2004
|
||||
|
||||
Changes to 8.5a1 include all changes to the 8.4 line through 8.4.6,
|
||||
plus the following, which focuses on the high-level feature changes
|
||||
@@ -6046,7 +6042,7 @@ in this changeset (new minor version) rather than bug fixes:
|
||||
* [TIP #157] leading {expand} syntax on words to cause argument expansion.
|
||||
This is a safer/cleaner alternative to the use of 'eval'.
|
||||
|
||||
--- Released 8.5a1, March 3, 2004 --- See ChangeLog for details ---
|
||||
--- Released 8.5a1, March 3, 2004
|
||||
|
||||
2004-03-04 (new feature) registry package is [unload]able (thoyts)
|
||||
=> registry 1.1.4
|
||||
@@ -6070,7 +6066,7 @@ each command/interp validity before executing. (sofer)
|
||||
|
||||
2004-04-06 (clean up) refactored Tcl header file #include order. Might
|
||||
create need for changes in extensions that #include private headers.
|
||||
Changed source code files should work with older Tcl as well. See ChangeLog.
|
||||
Changed source code files should work with older Tcl as well.
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2004-04-07 (bug fix)[920667] install into any Unicode path on Win (hobbs)
|
||||
@@ -6346,7 +6342,7 @@ Doc improvements [759545,926590,935853,1017072,1018486,1022527,1027849,
|
||||
1032243,1047928,1048005,1058446,1062647,1065732,1073334,etc.]
|
||||
Test suite expansion [1036649,1001997,etc.]
|
||||
|
||||
--- Released 8.5a2, December 7, 2004 --- See ChangeLog for details ---
|
||||
--- Released 8.5a2, December 7, 2004
|
||||
|
||||
2004-12-13 (bug fix)[1083082] encoding memory leaks (ade,porter)
|
||||
|
||||
@@ -6490,7 +6486,7 @@ Can support [load] from memory as well (steffen)
|
||||
|
||||
Documentation improvements [1075433,1085127,1117017,1124160,1149605,etc.]
|
||||
|
||||
--- Released 8.5a3, June 4, 2005 --- See ChangeLog for details ---
|
||||
--- Released 8.5a3, June 4, 2005
|
||||
|
||||
2005-06-06 (bug fix)[1213678] Windows/gcc: crash in stack.test (kenny)
|
||||
|
||||
@@ -6741,7 +6737,7 @@ removed (steffen)
|
||||
Documentation improvements [1211078,1190891,1292427,1277503,1104682,1359183,
|
||||
1415725,666770]
|
||||
|
||||
--- Released 8.5a4, April 27, 2006 --- See ChangeLog for details ---
|
||||
--- Released 8.5a4, April 27, 2006
|
||||
|
||||
2006-05-04 (bug fix)[1480509] srand() accept wide input (porter,afredd)
|
||||
|
||||
@@ -6837,7 +6833,7 @@ URL validity checking against RFC 2986 (hobbs)
|
||||
|
||||
2006-10-13 (platform support) get stack size on Darwin (steffen)
|
||||
|
||||
--- Released 8.5a5, October 20, 2006 --- See ChangeLog for details ---
|
||||
--- Released 8.5a5, October 20, 2006
|
||||
|
||||
2006-10-20 (configure change) Added autodetection for OS-supplied timezone
|
||||
files (max)
|
||||
@@ -6919,7 +6915,7 @@ upvar and namespace upvar (sofer)
|
||||
|
||||
2007-04-23 (bug fix) fts_open() crash on 64bit Darwin 8 or earlier (steffen)
|
||||
|
||||
--- Released 8.5a6, April 25, 2007 --- See ChangeLog for details ---
|
||||
--- Released 8.5a6, April 25, 2007
|
||||
|
||||
2007-04-30 (bug fix)[1705778] many valgrind-detected leaks corrected
|
||||
|
||||
@@ -6977,7 +6973,7 @@ of traced command do not fire (sofer)
|
||||
|
||||
2007-08-16 (bug fix)[1773040] ::errorInfo trace crash (janssen,porter)
|
||||
|
||||
2007-08-16 (performance)[1564517] pre-compile constant expressions (porter)
|
||||
2007-08-16 (performance)[1564517] precompile constant expressions (porter)
|
||||
|
||||
2007-08-21 (bug fix)[1775878] 'puts \' in interactive tclsh failed to move to
|
||||
prompt for continuation line (porter)
|
||||
@@ -7022,7 +7018,7 @@ project for Xcode 3.0 (steffen)
|
||||
(bug fix)[1066755] Several stack efficiency efforts increases recursion limit
|
||||
on Windows to be larger than the default [interp recursionlimit] value
|
||||
|
||||
--- Released 8.5b1, September 26, 2007 --- See ChangeLog for details ---
|
||||
--- Released 8.5b1, September 26, 2007
|
||||
|
||||
2007-10-02 (bug fix)[1806422] proper [tcl::tm::path] autoload (porter)
|
||||
|
||||
@@ -7034,7 +7030,7 @@ on Windows to be larger than the default [interp recursionlimit] value
|
||||
|
||||
2007-10-25 (bug fix)[1726873] intermittent crash in threads (vasiljevic)
|
||||
|
||||
--- Released 8.5b2, October 26, 2007 --- See ChangeLog for details ---
|
||||
--- Released 8.5b2, October 26, 2007
|
||||
|
||||
2007-10-27 (bug fix)[1821159] fixed broken compile on x86_64 (sofer)
|
||||
|
||||
@@ -7070,7 +7066,7 @@ on Windows to be larger than the default [interp recursionlimit] value
|
||||
|
||||
Many significant documentation improvements (fellows, sofer)
|
||||
|
||||
--- Released 8.5b3, November 19, 2007 --- See ChangeLog for details ---
|
||||
--- Released 8.5b3, November 19, 2007
|
||||
|
||||
2007-11-20 (enhancement) string rep of dict has stable order (fellows)
|
||||
|
||||
@@ -7104,7 +7100,7 @@ over-consumption of resources (drewry,lane,ormandy,fellows)
|
||||
|
||||
Several documentation and release notes improvements
|
||||
|
||||
--- Released 8.5.0, December 20, 2007 --- See ChangeLog for details ---
|
||||
--- Released 8.5.0, December 20, 2007
|
||||
|
||||
2007-12-23 (bug fix)[1857126] restore backref support to regexps (hobbs)
|
||||
|
||||
@@ -7126,7 +7122,7 @@ Several documentation and release notes improvements
|
||||
|
||||
Several documentation and release notes improvements
|
||||
|
||||
--- Released 8.5.1, February 5, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.5.1, February 5, 2008
|
||||
|
||||
2008-02-06 (enhancement) [clock format] performance (kenny)
|
||||
|
||||
@@ -7187,7 +7183,7 @@ variables without "." added to customization hooks (kupries)
|
||||
|
||||
2008-03-27 clock tzdata updated to Olson's tzdata2008b (kenny)
|
||||
|
||||
--- Released 8.5.2, March 28, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.5.2, March 28, 2008
|
||||
|
||||
2008-03-30 (bug fix)[1783544] more robust TclIsNaN() (kenny,teterin)
|
||||
|
||||
@@ -7242,7 +7238,7 @@ variables without "." added to customization hooks (kupries)
|
||||
|
||||
2008-06-25 (bug fix)[1999119] Support TM packages in Safe Base (kupries)
|
||||
|
||||
--- Released 8.6a1, June 25, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.6a1, June 25, 2008
|
||||
|
||||
2008-06-29 (bug fix)[2004480] plug memory leaks (ade,porter,steffen)
|
||||
|
||||
@@ -7295,7 +7291,7 @@ in a deleted interp. (porter)
|
||||
|
||||
2008-08-21 (bug fix)[2065115] Restored ***= regexp functioning (hobbs,porter)
|
||||
|
||||
--- Released 8.6a2, August 25, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.6a2, August 25, 2008
|
||||
|
||||
2008-08-29 (bug fix)[2082299] Install TclOO header files (fellows)
|
||||
|
||||
@@ -7376,7 +7372,7 @@ Tcl_FSFileAttrStringsProc prototype. (nijtmans)
|
||||
|
||||
2008-10-10 (bug fix)[2155658] crash in oo method export (fellows)
|
||||
|
||||
--- Released 8.6a3, October 10, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.6a3, October 10, 2008
|
||||
|
||||
2008-10-13 (bug fix) Fix ability to join threads on 64-bit Windows (thoyts)
|
||||
|
||||
@@ -7446,7 +7442,7 @@ evaluation in extensions (sofer,kenny)
|
||||
|
||||
2008-12-18 (bug fix)[2444274] panic in long commands from {*} (goth,porter)
|
||||
|
||||
--- Released 8.6b1, December 19, 2008 --- See ChangeLog for details ---
|
||||
--- Released 8.6b1, December 19, 2008
|
||||
|
||||
2008-12-27 [TIP 234] Tcl_Zlib* interface revisions (fellows)
|
||||
*** INCOMPATIBILITY with interface of 8.6b1 ***
|
||||
@@ -7954,7 +7950,7 @@ memory with buffer backup (ferrieux)
|
||||
|
||||
Many more Tcl built-in command errors now set an -errorcode.
|
||||
|
||||
--- Released 8.6b2, August 8, 2011 --- See ChangeLog for details ---
|
||||
--- Released 8.6b2, August 8, 2011
|
||||
|
||||
2011-07-02 (bug fix)[3349507] correct double(1[string repeat 0 23]) (kenny)
|
||||
|
||||
@@ -8115,7 +8111,7 @@ Many revisions to better support a Cygwin environment (nijtmans)
|
||||
|
||||
Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
|
||||
|
||||
--- Released 8.6b3, September 18, 2012 --- See ChangeLog for details ---
|
||||
--- Released 8.6b3, September 18, 2012
|
||||
|
||||
2012-09-20 (enhancement) full Unicode support (nijtmans)
|
||||
=> dde 1.4.0
|
||||
@@ -8162,7 +8158,7 @@ Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
|
||||
|
||||
2012-12-13 (bug fix) crash: [zlib gunzip $data -header noSuchNs::var] (porter)
|
||||
|
||||
--- Released 8.6.0, December 20, 2012 --- See ChangeLog for details ---
|
||||
--- Released 8.6.0, December 20, 2012
|
||||
|
||||
2012-12-22 (bug fix)[3598150] DString to Tcl_Obj memleak (afredd)
|
||||
|
||||
@@ -8251,7 +8247,7 @@ Dropped support for OS X versions less than 10.4 (Tiger) (fellows)
|
||||
|
||||
2013-06-05 (bug fix)[2835313] [while 1 {foo [continue]}] crash (fellows)
|
||||
|
||||
2013-06-17 (bug fix)[a876646] [:cntrl:] includes \x00 to \x1f (nijtmans)
|
||||
2013-06-17 (bug fix)[a876646] [:cntrl:] includes \x00 to \x1F (nijtmans)
|
||||
|
||||
2013-06-27 (bug fix)[983509] missing encodings for config values (nijtmans)
|
||||
|
||||
@@ -8685,7 +8681,7 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
|
||||
|
||||
2016-07-08 (bug)[a47641] [file normalize] & Windows junctions (nadkarni)
|
||||
|
||||
2016-07-09 [ae61a6] [file] handling of Win hardcoded names (CON) (nadkarni)
|
||||
2016-07-09 [ae61a6] [file] handling of Win hard-coded names (CON) (nadkarni)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2016-07-09 [3613671] [file owned] (more) useful on Win (nadkarni)
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* dirent.h --
|
||||
*
|
||||
* This file is a replacement for <dirent.h> in systems that
|
||||
* support the old BSD-style <sys/dir.h> with a "struct direct".
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT
|
||||
#define _DIRENT
|
||||
|
||||
#include <sys/dir.h>
|
||||
|
||||
#define dirent direct
|
||||
|
||||
#endif /* _DIRENT */
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* dirent.h --
|
||||
*
|
||||
* Declarations of a library of directory-reading procedures
|
||||
* in the POSIX style ("struct dirent").
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution
|
||||
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#ifndef _DIRENT
|
||||
#define _DIRENT
|
||||
|
||||
/*
|
||||
* Dirent structure, which holds information about a single
|
||||
* directory entry.
|
||||
*/
|
||||
|
||||
#define MAXNAMLEN 255
|
||||
#define DIRBLKSIZ 512
|
||||
|
||||
struct dirent {
|
||||
long d_ino; /* Inode number of entry */
|
||||
short d_reclen; /* Length of this record */
|
||||
short d_namlen; /* Length of string in d_name */
|
||||
char d_name[MAXNAMLEN + 1]; /* Name must be no longer than this */
|
||||
};
|
||||
|
||||
/*
|
||||
* State that keeps track of the reading of a directory (clients
|
||||
* should never look inside this structure; the fields should
|
||||
* only be accessed by the library procedures).
|
||||
*/
|
||||
|
||||
typedef struct _dirdesc {
|
||||
int dd_fd;
|
||||
long dd_loc;
|
||||
long dd_size;
|
||||
char dd_buf[DIRBLKSIZ];
|
||||
} DIR;
|
||||
|
||||
/*
|
||||
* Procedures defined for reading directories:
|
||||
*/
|
||||
|
||||
extern void closedir (DIR *dirp);
|
||||
extern DIR * opendir (char *name);
|
||||
extern struct dirent * readdir (DIR *dirp);
|
||||
|
||||
#endif /* _DIRENT */
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* memcmp.c --
|
||||
*
|
||||
* Source code for the "memcmp" library routine.
|
||||
*
|
||||
* Copyright (c) 1998 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tclPort.h"
|
||||
|
||||
/*
|
||||
* Here is the prototype just in case it is not included in tclPort.h.
|
||||
*/
|
||||
|
||||
int memcmp(const void *s1, const void *s2, size_t n);
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* memcmp --
|
||||
*
|
||||
* Compares two bytes sequences.
|
||||
*
|
||||
* Results:
|
||||
* Compares its arguments, looking at the first n bytes (each interpreted
|
||||
* as an unsigned char), and returns an integer less than, equal to, or
|
||||
* greater than 0, according as s1 is less than, equal to, or greater
|
||||
* than s2 when taken to be unsigned 8 bit numbers.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
memcmp(
|
||||
const void *s1, /* First string. */
|
||||
const void *s2, /* Second string. */
|
||||
size_t n) /* Length to compare. */
|
||||
{
|
||||
const unsigned char *ptr1 = (const unsigned char *) s1;
|
||||
const unsigned char *ptr2 = (const unsigned char *) s2;
|
||||
|
||||
for ( ; n-- ; ptr1++, ptr2++) {
|
||||
unsigned char u1 = *ptr1, u2 = *ptr2;
|
||||
|
||||
if (u1 != u2) {
|
||||
return (u1-u2);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
* c-basic-offset: 4
|
||||
* fill-column: 78
|
||||
* End:
|
||||
*/
|
||||
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* opendir.c --
|
||||
*
|
||||
* This file provides dirent-style directory-reading procedures for V7
|
||||
* Unix systems that don't have such procedures. The origin of this code
|
||||
* is unclear, but it seems to have come originally from Larry Wall.
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
#undef DIRSIZ
|
||||
#define DIRSIZ(dp) \
|
||||
((sizeof(struct dirent) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
|
||||
|
||||
/*
|
||||
* open a directory.
|
||||
*/
|
||||
|
||||
DIR *
|
||||
opendir(
|
||||
char *name)
|
||||
{
|
||||
DIR *dirp;
|
||||
int fd;
|
||||
const char *myname;
|
||||
|
||||
myname = ((*name == '\0') ? "." : name);
|
||||
if ((fd = open(myname, 0, 0)) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
dirp = (DIR *) Tcl_Alloc(sizeof(DIR));
|
||||
if (dirp == NULL) {
|
||||
/* unreachable? */
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
dirp->dd_fd = fd;
|
||||
dirp->dd_loc = 0;
|
||||
return dirp;
|
||||
}
|
||||
|
||||
/*
|
||||
* read an old style directory entry and present it as a new one
|
||||
*/
|
||||
#ifndef pyr
|
||||
#define ODIRSIZ 14
|
||||
|
||||
struct olddirect {
|
||||
ino_t od_ino;
|
||||
char od_name[ODIRSIZ];
|
||||
};
|
||||
#else /* a Pyramid in the ATT universe */
|
||||
#define ODIRSIZ 248
|
||||
|
||||
struct olddirect {
|
||||
long od_ino;
|
||||
short od_fill1, od_fill2;
|
||||
char od_name[ODIRSIZ];
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* get next entry in a directory.
|
||||
*/
|
||||
|
||||
struct dirent *
|
||||
readdir(
|
||||
DIR *dirp)
|
||||
{
|
||||
struct olddirect *dp;
|
||||
static struct dirent dir;
|
||||
|
||||
for (;;) {
|
||||
if (dirp->dd_loc == 0) {
|
||||
dirp->dd_size = read(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ);
|
||||
if (dirp->dd_size <= 0) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (dirp->dd_loc >= dirp->dd_size) {
|
||||
dirp->dd_loc = 0;
|
||||
continue;
|
||||
}
|
||||
dp = (struct olddirect *)(dirp->dd_buf + dirp->dd_loc);
|
||||
dirp->dd_loc += sizeof(struct olddirect);
|
||||
if (dp->od_ino == 0) {
|
||||
continue;
|
||||
}
|
||||
dir.d_ino = dp->od_ino;
|
||||
strncpy(dir.d_name, dp->od_name, ODIRSIZ);
|
||||
dir.d_name[ODIRSIZ] = '\0'; /* insure null termination */
|
||||
dir.d_namlen = strlen(dir.d_name);
|
||||
dir.d_reclen = DIRSIZ(&dir);
|
||||
return &dir;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* close a directory.
|
||||
*/
|
||||
|
||||
void
|
||||
closedir(
|
||||
DIR *dirp)
|
||||
{
|
||||
close(dirp->dd_fd);
|
||||
dirp->dd_fd = -1;
|
||||
dirp->dd_loc = 0;
|
||||
Tcl_Free(dirp);
|
||||
}
|
||||
-919
@@ -1,919 +0,0 @@
|
||||
/* A portable stdint.h
|
||||
****************************************************************************
|
||||
* BSD License:
|
||||
****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2005-2016 Paul Hsieh
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************
|
||||
*
|
||||
* Version 0.1.16.0
|
||||
*
|
||||
* The ANSI C standard committee, for the C99 standard, specified the
|
||||
* inclusion of a new standard include file called stdint.h. This is
|
||||
* a very useful and long desired include file which contains several
|
||||
* very precise definitions for integer scalar types that is critically
|
||||
* important for making several classes of applications portable
|
||||
* including cryptography, hashing, variable length integer libraries
|
||||
* and so on. But for most developers its likely useful just for
|
||||
* programming sanity.
|
||||
*
|
||||
* The problem is that some compiler vendors chose to ignore the C99
|
||||
* standard and some older compilers have no opportunity to be updated.
|
||||
* Because of this situation, simply including stdint.h in your code
|
||||
* makes it unportable.
|
||||
*
|
||||
* So that's what this file is all about. It's an attempt to build a
|
||||
* single universal include file that works on as many platforms as
|
||||
* possible to deliver what stdint.h is supposed to. Even compilers
|
||||
* that already come with stdint.h can use this file instead without
|
||||
* any loss of functionality. A few things that should be noted about
|
||||
* this file:
|
||||
*
|
||||
* 1) It is not guaranteed to be portable and/or present an identical
|
||||
* interface on all platforms. The extreme variability of the
|
||||
* ANSI C standard makes this an impossibility right from the
|
||||
* very get go. Its really only meant to be useful for the vast
|
||||
* majority of platforms that possess the capability of
|
||||
* implementing usefully and precisely defined, standard sized
|
||||
* integer scalars. Systems which are not intrinsically 2s
|
||||
* complement may produce invalid constants.
|
||||
*
|
||||
* 2) There is an unavoidable use of non-reserved symbols.
|
||||
*
|
||||
* 3) Other standard include files are invoked.
|
||||
*
|
||||
* 4) This file may come in conflict with future platforms that do
|
||||
* include stdint.h. The hope is that one or the other can be
|
||||
* used with no real difference.
|
||||
*
|
||||
* 5) In the current version, if your platform can't represent
|
||||
* int32_t, int16_t and int8_t, it just dumps out with a compiler
|
||||
* error.
|
||||
*
|
||||
* 6) 64 bit integers may or may not be defined. Test for their
|
||||
* presence with the test: #ifdef INT64_MAX or #ifdef UINT64_MAX.
|
||||
* Note that this is different from the C99 specification which
|
||||
* requires the existence of 64 bit support in the compiler. If
|
||||
* this is not defined for your platform, yet it is capable of
|
||||
* dealing with 64 bits then it is because this file has not yet
|
||||
* been extended to cover all of your system's capabilities.
|
||||
*
|
||||
* 7) (u)intptr_t may or may not be defined. Test for its presence
|
||||
* with the test: #ifdef PTRDIFF_MAX. If this is not defined
|
||||
* for your platform, then it is because this file has not yet
|
||||
* been extended to cover all of your system's capabilities, not
|
||||
* because its optional.
|
||||
*
|
||||
* 8) The following might not been defined even if your platform is
|
||||
* capable of defining it:
|
||||
*
|
||||
* WCHAR_MIN
|
||||
* WCHAR_MAX
|
||||
* (u)int64_t
|
||||
* PTRDIFF_MIN
|
||||
* PTRDIFF_MAX
|
||||
* (u)intptr_t
|
||||
*
|
||||
* 9) The following have not been defined:
|
||||
*
|
||||
* WINT_MIN
|
||||
* WINT_MAX
|
||||
*
|
||||
* 10) The criteria for defining (u)int_least(*)_t isn't clear,
|
||||
* except for systems which don't have a type that precisely
|
||||
* defined 8, 16, or 32 bit types (which this include file does
|
||||
* not support anyways). Default definitions have been given.
|
||||
*
|
||||
* 11) The criteria for defining (u)int_fast(*)_t isn't something I
|
||||
* would trust to any particular compiler vendor or the ANSI C
|
||||
* committee. It is well known that "compatible systems" are
|
||||
* commonly created that have very different performance
|
||||
* characteristics from the systems they are compatible with,
|
||||
* especially those whose vendors make both the compiler and the
|
||||
* system. Default definitions have been given, but its strongly
|
||||
* recommended that users never use these definitions for any
|
||||
* reason (they do *NOT* deliver any serious guarantee of
|
||||
* improved performance -- not in this file, nor any vendor's
|
||||
* stdint.h).
|
||||
*
|
||||
* 12) The following macros:
|
||||
*
|
||||
* PRINTF_INTMAX_MODIFIER
|
||||
* PRINTF_INT64_MODIFIER
|
||||
* PRINTF_INT32_MODIFIER
|
||||
* PRINTF_INT16_MODIFIER
|
||||
* PRINTF_LEAST64_MODIFIER
|
||||
* PRINTF_LEAST32_MODIFIER
|
||||
* PRINTF_LEAST16_MODIFIER
|
||||
* PRINTF_INTPTR_MODIFIER
|
||||
*
|
||||
* are strings which have been defined as the modifiers required
|
||||
* for the "d", "u" and "x" printf formats to correctly output
|
||||
* (u)intmax_t, (u)int64_t, (u)int32_t, (u)int16_t, (u)least64_t,
|
||||
* (u)least32_t, (u)least16_t and (u)intptr_t types respectively.
|
||||
* PRINTF_INTPTR_MODIFIER is not defined for some systems which
|
||||
* provide their own stdint.h. PRINTF_INT64_MODIFIER is not
|
||||
* defined if INT64_MAX is not defined. These are an extension
|
||||
* beyond what C99 specifies must be in stdint.h.
|
||||
*
|
||||
* In addition, the following macros are defined:
|
||||
*
|
||||
* PRINTF_INTMAX_HEX_WIDTH
|
||||
* PRINTF_INT64_HEX_WIDTH
|
||||
* PRINTF_INT32_HEX_WIDTH
|
||||
* PRINTF_INT16_HEX_WIDTH
|
||||
* PRINTF_INT8_HEX_WIDTH
|
||||
* PRINTF_INTMAX_DEC_WIDTH
|
||||
* PRINTF_INT64_DEC_WIDTH
|
||||
* PRINTF_INT32_DEC_WIDTH
|
||||
* PRINTF_INT16_DEC_WIDTH
|
||||
* PRINTF_UINT8_DEC_WIDTH
|
||||
* PRINTF_UINTMAX_DEC_WIDTH
|
||||
* PRINTF_UINT64_DEC_WIDTH
|
||||
* PRINTF_UINT32_DEC_WIDTH
|
||||
* PRINTF_UINT16_DEC_WIDTH
|
||||
* PRINTF_UINT8_DEC_WIDTH
|
||||
*
|
||||
* Which specifies the maximum number of characters required to
|
||||
* print the number of that type in either hexadecimal or decimal.
|
||||
* These are an extension beyond what C99 specifies must be in
|
||||
* stdint.h.
|
||||
*
|
||||
* Compilers tested (all with 0 warnings at their highest respective
|
||||
* settings): Borland Turbo C 2.0, WATCOM C/C++ 11.0 (16 bits and 32
|
||||
* bits), Microsoft Visual C++ 6.0 (32 bit), Microsoft Visual Studio
|
||||
* .net (VC7), Intel C++ 4.0, GNU gcc v3.3.3
|
||||
*
|
||||
* This file should be considered a work in progress. Suggestions for
|
||||
* improvements, especially those which increase coverage are strongly
|
||||
* encouraged.
|
||||
*
|
||||
* Acknowledgements
|
||||
*
|
||||
* The following people have made significant contributions to the
|
||||
* development and testing of this file:
|
||||
*
|
||||
* Chris Howie
|
||||
* John Steele Scott
|
||||
* Dave Thorup
|
||||
* John Dill
|
||||
* Florian Wobbe
|
||||
* Christopher Sean Morrison
|
||||
* Mikkel Fahnoe Jorgensen
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
|
||||
/*
|
||||
* For gcc with _STDINT_H, fill in the PRINTF_INT*_MODIFIER macros, and
|
||||
* do nothing else. On the Mac OS X version of gcc this is _STDINT_H_.
|
||||
*/
|
||||
|
||||
#if ((defined(__SUNPRO_C) && __SUNPRO_C >= 0x570) || (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined (__WATCOMC__) && (defined (_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (__GNUC__ > 3 || defined(_STDINT_H) || defined(_STDINT_H_) || defined (__UINT_FAST64_TYPE__)) )) && !defined (_PSTDINT_H_INCLUDED)
|
||||
#include <stdint.h>
|
||||
#define _PSTDINT_H_INCLUDED
|
||||
# if defined(__GNUC__) && (defined(__x86_64__) || defined(__ppc64__)) && !(defined(__APPLE__) && defined(__MACH__))
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "l"
|
||||
# endif
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# endif
|
||||
# else
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "ll"
|
||||
# endif
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# if (UINT_MAX == UINT32_MAX)
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# else
|
||||
# define PRINTF_INT32_MODIFIER "l"
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# ifndef PRINTF_INT16_MODIFIER
|
||||
# define PRINTF_INT16_MODIFIER "h"
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_MODIFIER
|
||||
# define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
|
||||
# endif
|
||||
# ifndef PRINTF_INT64_HEX_WIDTH
|
||||
# define PRINTF_INT64_HEX_WIDTH "16"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT64_HEX_WIDTH
|
||||
# define PRINTF_UINT64_HEX_WIDTH "16"
|
||||
# endif
|
||||
# ifndef PRINTF_INT32_HEX_WIDTH
|
||||
# define PRINTF_INT32_HEX_WIDTH "8"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT32_HEX_WIDTH
|
||||
# define PRINTF_UINT32_HEX_WIDTH "8"
|
||||
# endif
|
||||
# ifndef PRINTF_INT16_HEX_WIDTH
|
||||
# define PRINTF_INT16_HEX_WIDTH "4"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT16_HEX_WIDTH
|
||||
# define PRINTF_UINT16_HEX_WIDTH "4"
|
||||
# endif
|
||||
# ifndef PRINTF_INT8_HEX_WIDTH
|
||||
# define PRINTF_INT8_HEX_WIDTH "2"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT8_HEX_WIDTH
|
||||
# define PRINTF_UINT8_HEX_WIDTH "2"
|
||||
# endif
|
||||
# ifndef PRINTF_INT64_DEC_WIDTH
|
||||
# define PRINTF_INT64_DEC_WIDTH "19"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT64_DEC_WIDTH
|
||||
# define PRINTF_UINT64_DEC_WIDTH "20"
|
||||
# endif
|
||||
# ifndef PRINTF_INT32_DEC_WIDTH
|
||||
# define PRINTF_INT32_DEC_WIDTH "10"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT32_DEC_WIDTH
|
||||
# define PRINTF_UINT32_DEC_WIDTH "10"
|
||||
# endif
|
||||
# ifndef PRINTF_INT16_DEC_WIDTH
|
||||
# define PRINTF_INT16_DEC_WIDTH "5"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT16_DEC_WIDTH
|
||||
# define PRINTF_UINT16_DEC_WIDTH "5"
|
||||
# endif
|
||||
# ifndef PRINTF_INT8_DEC_WIDTH
|
||||
# define PRINTF_INT8_DEC_WIDTH "3"
|
||||
# endif
|
||||
# ifndef PRINTF_UINT8_DEC_WIDTH
|
||||
# define PRINTF_UINT8_DEC_WIDTH "3"
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_HEX_WIDTH
|
||||
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_UINT64_HEX_WIDTH
|
||||
# endif
|
||||
# ifndef PRINTF_UINTMAX_HEX_WIDTH
|
||||
# define PRINTF_UINTMAX_HEX_WIDTH PRINTF_UINT64_HEX_WIDTH
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_DEC_WIDTH
|
||||
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_UINT64_DEC_WIDTH
|
||||
# endif
|
||||
# ifndef PRINTF_UINTMAX_DEC_WIDTH
|
||||
# define PRINTF_UINTMAX_DEC_WIDTH PRINTF_UINT64_DEC_WIDTH
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Something really weird is going on with Open Watcom. Just pull some of
|
||||
* these duplicated definitions from Open Watcom's stdint.h file for now.
|
||||
*/
|
||||
|
||||
# if defined (__WATCOMC__) && __WATCOMC__ >= 1250
|
||||
# if !defined (INT64_C)
|
||||
# define INT64_C(x) (x + (INT64_MAX - INT64_MAX))
|
||||
# endif
|
||||
# if !defined (UINT64_C)
|
||||
# define UINT64_C(x) (x + (UINT64_MAX - UINT64_MAX))
|
||||
# endif
|
||||
# if !defined (INT32_C)
|
||||
# define INT32_C(x) (x + (INT32_MAX - INT32_MAX))
|
||||
# endif
|
||||
# if !defined (UINT32_C)
|
||||
# define UINT32_C(x) (x + (UINT32_MAX - UINT32_MAX))
|
||||
# endif
|
||||
# if !defined (INT16_C)
|
||||
# define INT16_C(x) (x)
|
||||
# endif
|
||||
# if !defined (UINT16_C)
|
||||
# define UINT16_C(x) (x)
|
||||
# endif
|
||||
# if !defined (INT8_C)
|
||||
# define INT8_C(x) (x)
|
||||
# endif
|
||||
# if !defined (UINT8_C)
|
||||
# define UINT8_C(x) (x)
|
||||
# endif
|
||||
# if !defined (UINT64_MAX)
|
||||
# define UINT64_MAX 18446744073709551615ULL
|
||||
# endif
|
||||
# if !defined (INT64_MAX)
|
||||
# define INT64_MAX 9223372036854775807LL
|
||||
# endif
|
||||
# if !defined (UINT32_MAX)
|
||||
# define UINT32_MAX 4294967295UL
|
||||
# endif
|
||||
# if !defined (INT32_MAX)
|
||||
# define INT32_MAX 2147483647L
|
||||
# endif
|
||||
# if !defined (INTMAX_MAX)
|
||||
# define INTMAX_MAX INT64_MAX
|
||||
# endif
|
||||
# if !defined (INTMAX_MIN)
|
||||
# define INTMAX_MIN INT64_MIN
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* I have no idea what is the truly correct thing to do on older Solaris.
|
||||
* From some online discussions, this seems to be what is being
|
||||
* recommended. For people who actually are developing on older Solaris,
|
||||
* what I would like to know is, does this define all of the relevant
|
||||
* macros of a complete stdint.h? Remember, in pstdint.h 64 bit is
|
||||
* considered optional.
|
||||
*/
|
||||
|
||||
#if (defined(__SUNPRO_C) && __SUNPRO_C >= 0x420) && !defined(_PSTDINT_H_INCLUDED)
|
||||
#include <sys/inttypes.h>
|
||||
#define _PSTDINT_H_INCLUDED
|
||||
#endif
|
||||
|
||||
#ifndef _PSTDINT_H_INCLUDED
|
||||
#define _PSTDINT_H_INCLUDED
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX ((size_t)-1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Deduce the type assignments from limits.h under the assumption that
|
||||
* integer sizes in bits are powers of 2, and follow the ANSI
|
||||
* definitions.
|
||||
*/
|
||||
|
||||
#ifndef UINT8_MAX
|
||||
# define UINT8_MAX 0xff
|
||||
#endif
|
||||
#if !defined(uint8_t) && !defined(_UINT8_T) && !defined(vxWorks)
|
||||
# if (UCHAR_MAX == UINT8_MAX) || defined (S_SPLINT_S)
|
||||
typedef unsigned char uint8_t;
|
||||
# define UINT8_C(v) ((uint8_t) v)
|
||||
# else
|
||||
# error "Platform not supported"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef INT8_MAX
|
||||
# define INT8_MAX 0x7f
|
||||
#endif
|
||||
#ifndef INT8_MIN
|
||||
# define INT8_MIN INT8_C(0x80)
|
||||
#endif
|
||||
#if !defined(int8_t) && !defined(_INT8_T) && !defined(vxWorks)
|
||||
# if (SCHAR_MAX == INT8_MAX) || defined (S_SPLINT_S)
|
||||
typedef signed char int8_t;
|
||||
# define INT8_C(v) ((int8_t) v)
|
||||
# else
|
||||
# error "Platform not supported"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UINT16_MAX
|
||||
# define UINT16_MAX 0xffff
|
||||
#endif
|
||||
#if !defined(uint16_t) && !defined(_UINT16_T) && !defined(vxWorks)
|
||||
#if (UINT_MAX == UINT16_MAX) || defined (S_SPLINT_S)
|
||||
typedef unsigned int uint16_t;
|
||||
# ifndef PRINTF_INT16_MODIFIER
|
||||
# define PRINTF_INT16_MODIFIER ""
|
||||
# endif
|
||||
# define UINT16_C(v) ((uint16_t) (v))
|
||||
#elif (USHRT_MAX == UINT16_MAX)
|
||||
typedef unsigned short uint16_t;
|
||||
# define UINT16_C(v) ((uint16_t) (v))
|
||||
# ifndef PRINTF_INT16_MODIFIER
|
||||
# define PRINTF_INT16_MODIFIER "h"
|
||||
# endif
|
||||
#else
|
||||
#error "Platform not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef INT16_MAX
|
||||
# define INT16_MAX 0x7fff
|
||||
#endif
|
||||
#ifndef INT16_MIN
|
||||
# define INT16_MIN INT16_C(0x8000)
|
||||
#endif
|
||||
#if !defined(int16_t) && !defined(_INT16_T) && !defined(vxWorks)
|
||||
#if (INT_MAX == INT16_MAX) || defined (S_SPLINT_S)
|
||||
typedef signed int int16_t;
|
||||
# define INT16_C(v) ((int16_t) (v))
|
||||
# ifndef PRINTF_INT16_MODIFIER
|
||||
# define PRINTF_INT16_MODIFIER ""
|
||||
# endif
|
||||
#elif (SHRT_MAX == INT16_MAX)
|
||||
typedef signed short int16_t;
|
||||
# define INT16_C(v) ((int16_t) (v))
|
||||
# ifndef PRINTF_INT16_MODIFIER
|
||||
# define PRINTF_INT16_MODIFIER "h"
|
||||
# endif
|
||||
#else
|
||||
#error "Platform not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef UINT32_MAX
|
||||
# define UINT32_MAX (0xffffffffUL)
|
||||
#endif
|
||||
#if !defined(uint32_t) && !defined(_UINT32_T) && !defined(vxWorks)
|
||||
#if (ULONG_MAX == UINT32_MAX) || defined (S_SPLINT_S)
|
||||
typedef unsigned long uint32_t;
|
||||
# define UINT32_C(v) v ## UL
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER "l"
|
||||
# endif
|
||||
#elif (UINT_MAX == UINT32_MAX)
|
||||
typedef unsigned int uint32_t;
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# endif
|
||||
# define UINT32_C(v) v ## U
|
||||
#elif (USHRT_MAX == UINT32_MAX)
|
||||
typedef unsigned short uint32_t;
|
||||
# define UINT32_C(v) ((unsigned short) (v))
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# endif
|
||||
#else
|
||||
#error "Platform not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef INT32_MAX
|
||||
# define INT32_MAX (0x7fffffffL)
|
||||
#endif
|
||||
#ifndef INT32_MIN
|
||||
# define INT32_MIN INT32_C(0x80000000)
|
||||
#endif
|
||||
#if !defined(int32_t) && !defined(_INT32_T) && !defined(vxWorks)
|
||||
#if (LONG_MAX == INT32_MAX) || defined (S_SPLINT_S)
|
||||
typedef signed long int32_t;
|
||||
# define INT32_C(v) v ## L
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER "l"
|
||||
# endif
|
||||
#elif (INT_MAX == INT32_MAX)
|
||||
typedef signed int int32_t;
|
||||
# define INT32_C(v) v
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# endif
|
||||
#elif (SHRT_MAX == INT32_MAX)
|
||||
typedef signed short int32_t;
|
||||
# define INT32_C(v) ((short) (v))
|
||||
# ifndef PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_INT32_MODIFIER ""
|
||||
# endif
|
||||
#else
|
||||
#error "Platform not supported"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The macro stdint_int64_defined is temporarily used to record
|
||||
* whether or not 64 integer support is available. It must be
|
||||
* defined for any 64 integer extensions for new platforms that are
|
||||
* added.
|
||||
*/
|
||||
|
||||
#undef stdint_int64_defined
|
||||
#if (defined(__STDC__) && defined(__STDC_VERSION__)) || defined (S_SPLINT_S)
|
||||
# if (__STDC__ && __STDC_VERSION__ >= 199901L) || defined (S_SPLINT_S)
|
||||
# define stdint_int64_defined
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
# define UINT64_C(v) v ## ULL
|
||||
# define INT64_C(v) v ## LL
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "ll"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined (stdint_int64_defined)
|
||||
# if defined(__GNUC__) && !defined(vxWorks)
|
||||
# define stdint_int64_defined
|
||||
__extension__ typedef long long int64_t;
|
||||
__extension__ typedef unsigned long long uint64_t;
|
||||
# define UINT64_C(v) v ## ULL
|
||||
# define INT64_C(v) v ## LL
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "ll"
|
||||
# endif
|
||||
# elif defined(__MWERKS__) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || defined (__APPLE_CC__) || defined (_LONG_LONG) || defined (_CRAYC) || defined (S_SPLINT_S)
|
||||
# define stdint_int64_defined
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
# define UINT64_C(v) v ## ULL
|
||||
# define INT64_C(v) v ## LL
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "ll"
|
||||
# endif
|
||||
# elif (defined(__WATCOMC__) && defined(__WATCOM_INT64__)) || (defined(_MSC_VER) && _INTEGRAL_MAX_BITS >= 64) || (defined (__BORLANDC__) && __BORLANDC__ > 0x460) || defined (__alpha) || defined (__DECC)
|
||||
# define stdint_int64_defined
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
# define UINT64_C(v) v ## UI64
|
||||
# define INT64_C(v) v ## I64
|
||||
# ifndef PRINTF_INT64_MODIFIER
|
||||
# define PRINTF_INT64_MODIFIER "I64"
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined (LONG_LONG_MAX) && defined (INT64_C)
|
||||
# define LONG_LONG_MAX INT64_C (9223372036854775807)
|
||||
#endif
|
||||
#ifndef ULONG_LONG_MAX
|
||||
# define ULONG_LONG_MAX UINT64_C (18446744073709551615)
|
||||
#endif
|
||||
|
||||
#if !defined (INT64_MAX) && defined (INT64_C)
|
||||
# define INT64_MAX INT64_C (9223372036854775807)
|
||||
#endif
|
||||
#if !defined (INT64_MIN) && defined (INT64_C)
|
||||
# define INT64_MIN INT64_C (-9223372036854775808)
|
||||
#endif
|
||||
#if !defined (UINT64_MAX) && defined (INT64_C)
|
||||
# define UINT64_MAX UINT64_C (18446744073709551615)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Width of hexadecimal for number field.
|
||||
*/
|
||||
|
||||
#ifndef PRINTF_INT64_HEX_WIDTH
|
||||
# define PRINTF_INT64_HEX_WIDTH "16"
|
||||
#endif
|
||||
#ifndef PRINTF_INT32_HEX_WIDTH
|
||||
# define PRINTF_INT32_HEX_WIDTH "8"
|
||||
#endif
|
||||
#ifndef PRINTF_INT16_HEX_WIDTH
|
||||
# define PRINTF_INT16_HEX_WIDTH "4"
|
||||
#endif
|
||||
#ifndef PRINTF_INT8_HEX_WIDTH
|
||||
# define PRINTF_INT8_HEX_WIDTH "2"
|
||||
#endif
|
||||
#ifndef PRINTF_INT64_DEC_WIDTH
|
||||
# define PRINTF_INT64_DEC_WIDTH "19"
|
||||
#endif
|
||||
#ifndef PRINTF_INT32_DEC_WIDTH
|
||||
# define PRINTF_INT32_DEC_WIDTH "10"
|
||||
#endif
|
||||
#ifndef PRINTF_INT16_DEC_WIDTH
|
||||
# define PRINTF_INT16_DEC_WIDTH "5"
|
||||
#endif
|
||||
#ifndef PRINTF_INT8_DEC_WIDTH
|
||||
# define PRINTF_INT8_DEC_WIDTH "3"
|
||||
#endif
|
||||
#ifndef PRINTF_UINT64_DEC_WIDTH
|
||||
# define PRINTF_UINT64_DEC_WIDTH "20"
|
||||
#endif
|
||||
#ifndef PRINTF_UINT32_DEC_WIDTH
|
||||
# define PRINTF_UINT32_DEC_WIDTH "10"
|
||||
#endif
|
||||
#ifndef PRINTF_UINT16_DEC_WIDTH
|
||||
# define PRINTF_UINT16_DEC_WIDTH "5"
|
||||
#endif
|
||||
#ifndef PRINTF_UINT8_DEC_WIDTH
|
||||
# define PRINTF_UINT8_DEC_WIDTH "3"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Ok, lets not worry about 128 bit integers for now. Moore's law says
|
||||
* we don't need to worry about that until about 2040 at which point
|
||||
* we'll have bigger things to worry about.
|
||||
*/
|
||||
|
||||
#ifdef stdint_int64_defined
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
# define INTMAX_MAX INT64_MAX
|
||||
# define INTMAX_MIN INT64_MIN
|
||||
# define UINTMAX_MAX UINT64_MAX
|
||||
# define UINTMAX_C(v) UINT64_C(v)
|
||||
# define INTMAX_C(v) INT64_C(v)
|
||||
# ifndef PRINTF_INTMAX_MODIFIER
|
||||
# define PRINTF_INTMAX_MODIFIER PRINTF_INT64_MODIFIER
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_HEX_WIDTH
|
||||
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT64_HEX_WIDTH
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_DEC_WIDTH
|
||||
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT64_DEC_WIDTH
|
||||
# endif
|
||||
#else
|
||||
typedef int32_t intmax_t;
|
||||
typedef uint32_t uintmax_t;
|
||||
# define INTMAX_MAX INT32_MAX
|
||||
# define UINTMAX_MAX UINT32_MAX
|
||||
# define UINTMAX_C(v) UINT32_C(v)
|
||||
# define INTMAX_C(v) INT32_C(v)
|
||||
# ifndef PRINTF_INTMAX_MODIFIER
|
||||
# define PRINTF_INTMAX_MODIFIER PRINTF_INT32_MODIFIER
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_HEX_WIDTH
|
||||
# define PRINTF_INTMAX_HEX_WIDTH PRINTF_INT32_HEX_WIDTH
|
||||
# endif
|
||||
# ifndef PRINTF_INTMAX_DEC_WIDTH
|
||||
# define PRINTF_INTMAX_DEC_WIDTH PRINTF_INT32_DEC_WIDTH
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Because this file currently only supports platforms which have
|
||||
* precise powers of 2 as bit sizes for the default integers, the
|
||||
* least definitions are all trivial. Its possible that a future
|
||||
* version of this file could have different definitions.
|
||||
*/
|
||||
|
||||
#ifndef stdint_least_defined
|
||||
typedef int8_t int_least8_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
# define PRINTF_LEAST32_MODIFIER PRINTF_INT32_MODIFIER
|
||||
# define PRINTF_LEAST16_MODIFIER PRINTF_INT16_MODIFIER
|
||||
# define UINT_LEAST8_MAX UINT8_MAX
|
||||
# define INT_LEAST8_MAX INT8_MAX
|
||||
# define UINT_LEAST16_MAX UINT16_MAX
|
||||
# define INT_LEAST16_MAX INT16_MAX
|
||||
# define UINT_LEAST32_MAX UINT32_MAX
|
||||
# define INT_LEAST32_MAX INT32_MAX
|
||||
# define INT_LEAST8_MIN INT8_MIN
|
||||
# define INT_LEAST16_MIN INT16_MIN
|
||||
# define INT_LEAST32_MIN INT32_MIN
|
||||
# ifdef stdint_int64_defined
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
# define PRINTF_LEAST64_MODIFIER PRINTF_INT64_MODIFIER
|
||||
# define UINT_LEAST64_MAX UINT64_MAX
|
||||
# define INT_LEAST64_MAX INT64_MAX
|
||||
# define INT_LEAST64_MIN INT64_MIN
|
||||
# endif
|
||||
#endif
|
||||
#undef stdint_least_defined
|
||||
|
||||
/*
|
||||
* The ANSI C committee has defined *int*_fast*_t types as well. This,
|
||||
* of course, defies rationality -- you can't know what will be fast
|
||||
* just from the type itself. Even for a given architecture, compatible
|
||||
* implementations might have different performance characteristics.
|
||||
* Developers are warned to stay away from these types when using this
|
||||
* or any other stdint.h.
|
||||
*/
|
||||
|
||||
typedef int_least8_t int_fast8_t;
|
||||
typedef uint_least8_t uint_fast8_t;
|
||||
typedef int_least16_t int_fast16_t;
|
||||
typedef uint_least16_t uint_fast16_t;
|
||||
typedef int_least32_t int_fast32_t;
|
||||
typedef uint_least32_t uint_fast32_t;
|
||||
#define UINT_FAST8_MAX UINT_LEAST8_MAX
|
||||
#define INT_FAST8_MAX INT_LEAST8_MAX
|
||||
#define UINT_FAST16_MAX UINT_LEAST16_MAX
|
||||
#define INT_FAST16_MAX INT_LEAST16_MAX
|
||||
#define UINT_FAST32_MAX UINT_LEAST32_MAX
|
||||
#define INT_FAST32_MAX INT_LEAST32_MAX
|
||||
#define INT_FAST8_MIN INT_LEAST8_MIN
|
||||
#define INT_FAST16_MIN INT_LEAST16_MIN
|
||||
#define INT_FAST32_MIN INT_LEAST32_MIN
|
||||
#ifdef stdint_int64_defined
|
||||
typedef int_least64_t int_fast64_t;
|
||||
typedef uint_least64_t uint_fast64_t;
|
||||
# define UINT_FAST64_MAX UINT_LEAST64_MAX
|
||||
# define INT_FAST64_MAX INT_LEAST64_MAX
|
||||
# define INT_FAST64_MIN INT_LEAST64_MIN
|
||||
#endif
|
||||
|
||||
#undef stdint_int64_defined
|
||||
|
||||
/*
|
||||
* Whatever piecemeal, per compiler thing we can do about the wchar_t
|
||||
* type limits.
|
||||
*/
|
||||
|
||||
#if defined(__WATCOMC__) || defined(_MSC_VER) || defined (__GNUC__) && !defined(vxWorks)
|
||||
# include <wchar.h>
|
||||
# ifndef WCHAR_MIN
|
||||
# define WCHAR_MIN 0
|
||||
# endif
|
||||
# ifndef WCHAR_MAX
|
||||
# define WCHAR_MAX ((wchar_t)-1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Whatever piecemeal, per compiler/platform thing we can do about the
|
||||
* (u)intptr_t types and limits.
|
||||
*/
|
||||
|
||||
#if (defined (_MSC_VER) && defined (_UINTPTR_T_DEFINED)) || defined (_UINTPTR_T)
|
||||
# define STDINT_H_UINTPTR_T_DEFINED
|
||||
#endif
|
||||
|
||||
#ifndef STDINT_H_UINTPTR_T_DEFINED
|
||||
# if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (_WIN64) || defined (__ppc64__)
|
||||
# define stdint_intptr_bits 64
|
||||
# elif defined (__WATCOMC__) || defined (__TURBOC__)
|
||||
# if defined(__TINY__) || defined(__SMALL__) || defined(__MEDIUM__)
|
||||
# define stdint_intptr_bits 16
|
||||
# else
|
||||
# define stdint_intptr_bits 32
|
||||
# endif
|
||||
# elif defined (__i386__) || defined (_WIN32) || defined (WIN32) || defined (__ppc64__)
|
||||
# define stdint_intptr_bits 32
|
||||
# elif defined (__INTEL_COMPILER)
|
||||
/* TODO -- what did Intel do about x86-64? */
|
||||
# else
|
||||
/* #error "This platform might not be supported yet" */
|
||||
# endif
|
||||
|
||||
# ifdef stdint_intptr_bits
|
||||
# define stdint_intptr_glue3_i(a,b,c) a##b##c
|
||||
# define stdint_intptr_glue3(a,b,c) stdint_intptr_glue3_i(a,b,c)
|
||||
# ifndef PRINTF_INTPTR_MODIFIER
|
||||
# define PRINTF_INTPTR_MODIFIER stdint_intptr_glue3(PRINTF_INT,stdint_intptr_bits,_MODIFIER)
|
||||
# endif
|
||||
# ifndef PTRDIFF_MAX
|
||||
# define PTRDIFF_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
|
||||
# endif
|
||||
# ifndef PTRDIFF_MIN
|
||||
# define PTRDIFF_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
|
||||
# endif
|
||||
# ifndef UINTPTR_MAX
|
||||
# define UINTPTR_MAX stdint_intptr_glue3(UINT,stdint_intptr_bits,_MAX)
|
||||
# endif
|
||||
# ifndef INTPTR_MAX
|
||||
# define INTPTR_MAX stdint_intptr_glue3(INT,stdint_intptr_bits,_MAX)
|
||||
# endif
|
||||
# ifndef INTPTR_MIN
|
||||
# define INTPTR_MIN stdint_intptr_glue3(INT,stdint_intptr_bits,_MIN)
|
||||
# endif
|
||||
# ifndef INTPTR_C
|
||||
# define INTPTR_C(x) stdint_intptr_glue3(INT,stdint_intptr_bits,_C)(x)
|
||||
# endif
|
||||
# ifndef UINTPTR_C
|
||||
# define UINTPTR_C(x) stdint_intptr_glue3(UINT,stdint_intptr_bits,_C)(x)
|
||||
# endif
|
||||
typedef stdint_intptr_glue3(uint,stdint_intptr_bits,_t) uintptr_t;
|
||||
typedef stdint_intptr_glue3( int,stdint_intptr_bits,_t) intptr_t;
|
||||
# else
|
||||
/* TODO -- This following is likely wrong for some platforms, and does
|
||||
nothing for the definition of uintptr_t. */
|
||||
typedef ptrdiff_t intptr_t;
|
||||
# endif
|
||||
# define STDINT_H_UINTPTR_T_DEFINED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Assumes sig_atomic_t is signed and we have a 2s complement machine.
|
||||
*/
|
||||
|
||||
#ifndef SIG_ATOMIC_MAX
|
||||
# define SIG_ATOMIC_MAX ((((sig_atomic_t) 1) << (sizeof (sig_atomic_t)*CHAR_BIT-1)) - 1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (__TEST_PSTDINT_FOR_CORRECTNESS)
|
||||
|
||||
/*
|
||||
* Please compile with the maximum warning settings to make sure macros are
|
||||
* not defined more than once.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define glue3_aux(x,y,z) x ## y ## z
|
||||
#define glue3(x,y,z) glue3_aux(x,y,z)
|
||||
|
||||
#define DECLU(bits) glue3(uint,bits,_t) glue3(u,bits,) = glue3(UINT,bits,_C) (0);
|
||||
#define DECLI(bits) glue3(int,bits,_t) glue3(i,bits,) = glue3(INT,bits,_C) (0);
|
||||
|
||||
#define DECL(us,bits) glue3(DECL,us,) (bits)
|
||||
|
||||
#define TESTUMAX(bits) glue3(u,bits,) = ~glue3(u,bits,); if (glue3(UINT,bits,_MAX) != glue3(u,bits,)) printf ("Something wrong with UINT%d_MAX\n", bits)
|
||||
|
||||
#define REPORTERROR(msg) { err_n++; if (err_first <= 0) err_first = __LINE__; printf msg; }
|
||||
|
||||
#define X_SIZE_MAX ((size_t)-1)
|
||||
|
||||
int main () {
|
||||
int err_n = 0;
|
||||
int err_first = 0;
|
||||
DECL(I,8)
|
||||
DECL(U,8)
|
||||
DECL(I,16)
|
||||
DECL(U,16)
|
||||
DECL(I,32)
|
||||
DECL(U,32)
|
||||
#ifdef INT64_MAX
|
||||
DECL(I,64)
|
||||
DECL(U,64)
|
||||
#endif
|
||||
intmax_t imax = INTMAX_C(0);
|
||||
uintmax_t umax = UINTMAX_C(0);
|
||||
char str0[256], str1[256];
|
||||
|
||||
sprintf (str0, "%" PRINTF_INT32_MODIFIER "d", INT32_C(2147483647));
|
||||
if (0 != strcmp (str0, "2147483647")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str0));
|
||||
if (atoi(PRINTF_INT32_DEC_WIDTH) != (int) strlen(str0)) REPORTERROR (("Something wrong with PRINTF_INT32_DEC_WIDTH : %s\n", PRINTF_INT32_DEC_WIDTH));
|
||||
sprintf (str0, "%" PRINTF_INT32_MODIFIER "u", UINT32_C(4294967295));
|
||||
if (0 != strcmp (str0, "4294967295")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str0));
|
||||
if (atoi(PRINTF_UINT32_DEC_WIDTH) != (int) strlen(str0)) REPORTERROR (("Something wrong with PRINTF_UINT32_DEC_WIDTH : %s\n", PRINTF_UINT32_DEC_WIDTH));
|
||||
#ifdef INT64_MAX
|
||||
sprintf (str1, "%" PRINTF_INT64_MODIFIER "d", INT64_C(9223372036854775807));
|
||||
if (0 != strcmp (str1, "9223372036854775807")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str1));
|
||||
if (atoi(PRINTF_INT64_DEC_WIDTH) != (int) strlen(str1)) REPORTERROR (("Something wrong with PRINTF_INT64_DEC_WIDTH : %s, %d\n", PRINTF_INT64_DEC_WIDTH, (int) strlen(str1)));
|
||||
sprintf (str1, "%" PRINTF_INT64_MODIFIER "u", UINT64_C(18446744073709550591));
|
||||
if (0 != strcmp (str1, "18446744073709550591")) REPORTERROR (("Something wrong with PRINTF_INT32_MODIFIER : %s\n", str1));
|
||||
if (atoi(PRINTF_UINT64_DEC_WIDTH) != (int) strlen(str1)) REPORTERROR (("Something wrong with PRINTF_UINT64_DEC_WIDTH : %s, %d\n", PRINTF_UINT64_DEC_WIDTH, (int) strlen(str1)));
|
||||
#endif
|
||||
|
||||
sprintf (str0, "%d %x\n", 0, ~0);
|
||||
|
||||
sprintf (str1, "%d %x\n", i8, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i8 : %s\n", str1));
|
||||
sprintf (str1, "%u %x\n", u8, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u8 : %s\n", str1));
|
||||
sprintf (str1, "%d %x\n", i16, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i16 : %s\n", str1));
|
||||
sprintf (str1, "%u %x\n", u16, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u16 : %s\n", str1));
|
||||
sprintf (str1, "%" PRINTF_INT32_MODIFIER "d %x\n", i32, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i32 : %s\n", str1));
|
||||
sprintf (str1, "%" PRINTF_INT32_MODIFIER "u %x\n", u32, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with u32 : %s\n", str1));
|
||||
#ifdef INT64_MAX
|
||||
sprintf (str1, "%" PRINTF_INT64_MODIFIER "d %x\n", i64, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with i64 : %s\n", str1));
|
||||
#endif
|
||||
sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "d %x\n", imax, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with imax : %s\n", str1));
|
||||
sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "u %x\n", umax, ~0);
|
||||
if (0 != strcmp (str0, str1)) REPORTERROR (("Something wrong with umax : %s\n", str1));
|
||||
|
||||
TESTUMAX(8);
|
||||
TESTUMAX(16);
|
||||
TESTUMAX(32);
|
||||
#ifdef INT64_MAX
|
||||
TESTUMAX(64);
|
||||
#endif
|
||||
|
||||
#define STR(v) #v
|
||||
#define Q(v) printf ("sizeof " STR(v) " = %u\n", (unsigned) sizeof (v));
|
||||
if (err_n) {
|
||||
printf ("pstdint.h is not correct. Please use sizes below to correct it:\n");
|
||||
}
|
||||
|
||||
Q(int)
|
||||
Q(unsigned)
|
||||
Q(long int)
|
||||
Q(short int)
|
||||
Q(int8_t)
|
||||
Q(int16_t)
|
||||
Q(int32_t)
|
||||
#ifdef INT64_MAX
|
||||
Q(int64_t)
|
||||
#endif
|
||||
|
||||
#if UINT_MAX < X_SIZE_MAX
|
||||
printf ("UINT_MAX < X_SIZE_MAX\n");
|
||||
#else
|
||||
printf ("UINT_MAX >= X_SIZE_MAX\n");
|
||||
#endif
|
||||
printf ("%" PRINTF_INT64_MODIFIER "u vs %" PRINTF_INT64_MODIFIER "u\n", UINT_MAX, X_SIZE_MAX);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* stdlib.h --
|
||||
*
|
||||
* Declares facilities exported by the "stdlib" portion of the C library.
|
||||
* This file isn't complete in the ANSI-C sense; it only declares things
|
||||
* that are needed by Tcl. This file is needed even on many systems with
|
||||
* their own stdlib.h (e.g. SunOS) because not all stdlib.h files declare
|
||||
* all the procedures needed here (such as strtol/strtoul).
|
||||
*
|
||||
* Copyright (c) 1991 The Regents of the University of California.
|
||||
* Copyright (c) 1994-1998 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB
|
||||
#define _STDLIB
|
||||
|
||||
extern void abort(void);
|
||||
extern double atof(const char *string);
|
||||
extern int atoi(const char *string);
|
||||
extern long atol(const char *string);
|
||||
extern void * calloc(unsigned long numElements, unsigned long size);
|
||||
extern void exit(int status);
|
||||
extern void free(void *blockPtr);
|
||||
extern char * getenv(const char *name);
|
||||
extern void * malloc(unsigned long numBytes);
|
||||
extern void qsort(void *base, unsigned long n, unsigned long size, int (*compar)(
|
||||
const void *element1, const void *element2));
|
||||
extern void * realloc(void *ptr, unsigned long numBytes);
|
||||
extern char * realpath(const char *path, char *resolved_path);
|
||||
extern int mkstemps(char *templ, int suffixlen);
|
||||
extern int mkstemp(char *templ);
|
||||
extern char * mkdtemp(char *templ);
|
||||
extern long strtol(const char *string, char **endPtr, int base);
|
||||
extern unsigned long strtoul(const char *string, char **endPtr, int base);
|
||||
|
||||
#endif /* _STDLIB */
|
||||
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
* strstr.c --
|
||||
*
|
||||
* Source code for the "strstr" library routine.
|
||||
*
|
||||
* Copyright (c) 1988-1993 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tcl.h"
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* strstr --
|
||||
*
|
||||
* Locate the first instance of a substring in a string.
|
||||
*
|
||||
* Results:
|
||||
* If string contains substring, the return value is the location of the
|
||||
* first matching instance of substring in string. If string doesn't
|
||||
* contain substring, the return value is 0. Matching is done on an exact
|
||||
* character-for-character basis with no wildcards or special characters.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
char *
|
||||
strstr(
|
||||
const char *string, /* String to search. */
|
||||
const char *substring) /* Substring to try to find in string. */
|
||||
{
|
||||
const char *a, *b;
|
||||
|
||||
/*
|
||||
* First scan quickly through the two strings looking for a
|
||||
* single-character match. When it's found, then compare the rest of the
|
||||
* substring.
|
||||
*/
|
||||
|
||||
b = substring;
|
||||
if (*b == 0) {
|
||||
return (char *)string;
|
||||
}
|
||||
for ( ; *string != 0; string += 1) {
|
||||
if (*string != *b) {
|
||||
continue;
|
||||
}
|
||||
a = string;
|
||||
while (1) {
|
||||
if (*b == 0) {
|
||||
return (char *)string;
|
||||
}
|
||||
if (*a++ != *b++) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
b = substring;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* strtol.c --
|
||||
*
|
||||
* Source code for the "strtol" library procedure.
|
||||
*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* strtol --
|
||||
*
|
||||
* Convert an ASCII string into an integer.
|
||||
*
|
||||
* Results:
|
||||
* The return value is the integer equivalent of string. If endPtr is
|
||||
* non-NULL, then *endPtr is filled in with the character after the last
|
||||
* one that was part of the integer. If string doesn't contain a valid
|
||||
* integer value, then zero is returned and *endPtr is set to string.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
long int
|
||||
strtol(
|
||||
const char *string, /* String of ASCII digits, possibly preceded
|
||||
* by white space. For bases greater than 10,
|
||||
* either lower- or upper-case digits may be
|
||||
* used. */
|
||||
char **endPtr, /* Where to store address of terminating
|
||||
* character, or NULL. */
|
||||
int base) /* Base for conversion. Must be less than 37.
|
||||
* If 0, then the base is chosen from the
|
||||
* leading characters of string: "0x" means
|
||||
* hex, "0" means octal, anything else means
|
||||
* decimal. */
|
||||
{
|
||||
const char *p;
|
||||
long result;
|
||||
|
||||
/*
|
||||
* Skip any leading blanks.
|
||||
*/
|
||||
|
||||
p = string;
|
||||
while (isspace(UCHAR(*p))) {
|
||||
p += 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for a sign.
|
||||
*/
|
||||
|
||||
if (*p == '-') {
|
||||
p += 1;
|
||||
result = -(strtoul(p, endPtr, base));
|
||||
} else {
|
||||
if (*p == '+') {
|
||||
p += 1;
|
||||
}
|
||||
result = strtoul(p, endPtr, base);
|
||||
}
|
||||
if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
|
||||
*endPtr = (char *) string;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
* strtoul.c --
|
||||
*
|
||||
* Source code for the "strtoul" library procedure.
|
||||
*
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
* Copyright (c) 1994 Sun Microsystems, Inc.
|
||||
*
|
||||
* See the file "license.terms" for information on usage and redistribution of
|
||||
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
*/
|
||||
|
||||
#include "tclInt.h"
|
||||
|
||||
/*
|
||||
* The table below is used to convert from ASCII digits to a numerical
|
||||
* equivalent. It maps from '0' through 'z' to integers (100 for non-digit
|
||||
* characters).
|
||||
*/
|
||||
|
||||
static const char cvtIn[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */
|
||||
100, 100, 100, 100, 100, 100, 100, /* punctuation */
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31, 32, 33, 34, 35,
|
||||
100, 100, 100, 100, 100, 100, /* punctuation */
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'a' - 'z' */
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31, 32, 33, 34, 35};
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* strtoul --
|
||||
*
|
||||
* Convert an ASCII string into an integer.
|
||||
*
|
||||
* Results:
|
||||
* The return value is the integer equivalent of string. If endPtr is
|
||||
* non-NULL, then *endPtr is filled in with the character after the last
|
||||
* one that was part of the integer. If string doesn't contain a valid
|
||||
* integer value, then zero is returned and *endPtr is set to string.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
unsigned long int
|
||||
strtoul(
|
||||
const char *string, /* String of ASCII digits, possibly preceded
|
||||
* by white space. For bases greater than 10,
|
||||
* either lower- or upper-case digits may be
|
||||
* used. */
|
||||
char **endPtr, /* Where to store address of terminating
|
||||
* character, or NULL. */
|
||||
int base) /* Base for conversion. Must be less than 37.
|
||||
* If 0, then the base is chosen from the
|
||||
* leading characters of string: "0x" means
|
||||
* hex, "0" means octal, anything else means
|
||||
* decimal. */
|
||||
{
|
||||
const char *p;
|
||||
unsigned long int result = 0;
|
||||
unsigned digit;
|
||||
int anyDigits = 0;
|
||||
int negative=0;
|
||||
int overflow=0;
|
||||
|
||||
/*
|
||||
* Skip any leading blanks.
|
||||
*/
|
||||
|
||||
p = string;
|
||||
while (isspace(UCHAR(*p))) {
|
||||
p += 1;
|
||||
}
|
||||
if (*p == '-') {
|
||||
negative = 1;
|
||||
p += 1;
|
||||
} else {
|
||||
if (*p == '+') {
|
||||
p += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If no base was provided, pick one from the leading characters of the
|
||||
* string.
|
||||
*/
|
||||
|
||||
if (base == 0) {
|
||||
if (*p == '0') {
|
||||
p += 1;
|
||||
if ((*p == 'x') || (*p == 'X')) {
|
||||
p += 1;
|
||||
base = 16;
|
||||
} else {
|
||||
/*
|
||||
* Must set anyDigits here, otherwise "0" produces a "no
|
||||
* digits" error.
|
||||
*/
|
||||
|
||||
anyDigits = 1;
|
||||
base = 8;
|
||||
}
|
||||
} else {
|
||||
base = 10;
|
||||
}
|
||||
} else if (base == 16) {
|
||||
/*
|
||||
* Skip a leading "0x" from hex numbers.
|
||||
*/
|
||||
|
||||
if ((p[0] == '0') && ((p[1] == 'x') || (p[1] == 'X'))) {
|
||||
p += 2;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sorry this code is so messy, but speed seems important. Do different
|
||||
* things for base 8, 10, 16, and other.
|
||||
*/
|
||||
|
||||
if (base == 8) {
|
||||
unsigned long maxres = ULONG_MAX >> 3;
|
||||
|
||||
for ( ; ; p += 1) {
|
||||
digit = *p - '0';
|
||||
if (digit > 7) {
|
||||
break;
|
||||
}
|
||||
if (result > maxres) { overflow = 1; }
|
||||
result = (result << 3);
|
||||
if (digit > (ULONG_MAX - result)) { overflow = 1; }
|
||||
result += digit;
|
||||
anyDigits = 1;
|
||||
}
|
||||
} else if (base == 10) {
|
||||
unsigned long maxres = ULONG_MAX / 10;
|
||||
|
||||
for ( ; ; p += 1) {
|
||||
digit = *p - '0';
|
||||
if (digit > 9) {
|
||||
break;
|
||||
}
|
||||
if (result > maxres) { overflow = 1; }
|
||||
result *= 10;
|
||||
if (digit > (ULONG_MAX - result)) { overflow = 1; }
|
||||
result += digit;
|
||||
anyDigits = 1;
|
||||
}
|
||||
} else if (base == 16) {
|
||||
unsigned long maxres = ULONG_MAX >> 4;
|
||||
|
||||
for ( ; ; p += 1) {
|
||||
digit = *p - '0';
|
||||
if (digit > ('z' - '0')) {
|
||||
break;
|
||||
}
|
||||
digit = cvtIn[digit];
|
||||
if (digit > 15) {
|
||||
break;
|
||||
}
|
||||
if (result > maxres) { overflow = 1; }
|
||||
result = (result << 4);
|
||||
if (digit > (ULONG_MAX - result)) { overflow = 1; }
|
||||
result += digit;
|
||||
anyDigits = 1;
|
||||
}
|
||||
} else if (base >= 2 && base <= 36) {
|
||||
unsigned long maxres = ULONG_MAX / base;
|
||||
|
||||
for ( ; ; p += 1) {
|
||||
digit = *p - '0';
|
||||
if (digit > ('z' - '0')) {
|
||||
break;
|
||||
}
|
||||
digit = cvtIn[digit];
|
||||
if (digit >= ( (unsigned) base )) {
|
||||
break;
|
||||
}
|
||||
if (result > maxres) { overflow = 1; }
|
||||
result *= base;
|
||||
if (digit > (ULONG_MAX - result)) { overflow = 1; }
|
||||
result += digit;
|
||||
anyDigits = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* See if there were any digits at all.
|
||||
*/
|
||||
|
||||
if (!anyDigits) {
|
||||
p = string;
|
||||
}
|
||||
|
||||
if (endPtr != 0) {
|
||||
/* unsafe, but required by the strtoul prototype */
|
||||
*endPtr = (char *) p;
|
||||
}
|
||||
|
||||
if (overflow) {
|
||||
errno = ERANGE;
|
||||
return ULONG_MAX;
|
||||
}
|
||||
if (negative) {
|
||||
return -result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
+5
-1
@@ -156,7 +156,11 @@ waitpid(
|
||||
goto waitAgain;
|
||||
}
|
||||
}
|
||||
waitPtr = (WaitInfo *) Tcl_Alloc(sizeof(WaitInfo));
|
||||
waitPtr = (WaitInfo *) Tcl_AttemptAlloc(sizeof(WaitInfo));
|
||||
if (!waitPtr) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
waitPtr->pid = result;
|
||||
waitPtr->status = status;
|
||||
waitPtr->nextPtr = deadList;
|
||||
|
||||
+6
-9
@@ -54,30 +54,27 @@ For \fBTcl_AddObjErrorInfo\fR,
|
||||
this points to the first byte of an array of \fIlength\fR bytes
|
||||
containing a string to append to the \fB\-errorinfo\fR return option.
|
||||
This byte array may contain embedded null bytes
|
||||
unless \fIlength\fR is TCL_INDEX_NONE.
|
||||
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 size_t 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 TCL_INDEX_NONE, all bytes up to the first null byte are used.
|
||||
If negative, all bytes up to the first null byte are used.
|
||||
.AP Tcl_Obj *errorObjPtr in
|
||||
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 size_t commandLength in
|
||||
Number of bytes in command; TCL_INDEX_NONE 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
|
||||
@@ -227,7 +224,7 @@ embedded null bytes. This is essentially never a good idea.
|
||||
If the \fImessage\fR needs to contain the null character \fBU+0000\fR,
|
||||
Tcl's usual internal encoding rules should be used to avoid
|
||||
the need for a null byte. If the \fBTcl_AddObjErrorInfo\fR
|
||||
interface is used at all, it should be with a TCL_INDEX_NONE \fIlength\fR value.
|
||||
interface is used at all, it should be with a negative \fIlength\fR value.
|
||||
.PP
|
||||
The procedure \fBTcl_SetObjErrorCode\fR is used to set the
|
||||
\fB\-errorcode\fR return option to the list value \fIerrorObjPtr\fR
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ void
|
||||
\fBTcl_GetMemoryInfo\fR(\fIdsPtr\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.
|
||||
|
||||
+4
-4
@@ -34,7 +34,7 @@ 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 size_t numBytes in
|
||||
.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
|
||||
@@ -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 "size_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
|
||||
@@ -134,8 +134,8 @@ 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
|
||||
\fBsize_t\fR or of type \fBint\fR. It is recommended that callers provide
|
||||
a \fBsize_t\fR space for this purpose. If the caller provides only
|
||||
\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.
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ Error message to use in the cancellation, or NULL to use a default message. If
|
||||
not NULL, this object will have its reference count decremented before
|
||||
\fBTcl_CancelEval\fR returns.
|
||||
.AP int flags in
|
||||
ORed combination of flag bits that specify additional options.
|
||||
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.
|
||||
@@ -47,7 +47,7 @@ Extensions can use this function to check to see if they should abort a long
|
||||
running command. This function is thread sensitive and may only be called
|
||||
from the thread the interpreter was created in.
|
||||
.SS "FLAG BITS"
|
||||
Any ORed combination of the following values may be used for the
|
||||
Any OR'ed combination of the following values may be used for the
|
||||
\fIflags\fR argument to procedures such as \fBTcl_CancelEval\fR:
|
||||
.TP 20
|
||||
\fBTCL_CANCEL_UNWIND\fR
|
||||
|
||||
+2
-2
@@ -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 size_t 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 size_t 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
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ const char *
|
||||
\fBTcl_Concat\fR(\fIargc, argv\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const char *const" argv[]
|
||||
.AP size_t 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.
|
||||
|
||||
+2
-2
@@ -69,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 size_t 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 size_t 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
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ means the output handle is wanted.
|
||||
.AP void **handlePtr out
|
||||
Points to the location where the desired OS-specific handle should be
|
||||
stored.
|
||||
.AP size_t 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
|
||||
|
||||
+1
-1
@@ -187,7 +187,7 @@ except its \fIproc2\fR argument is of type \fBTcl_ObjCmdProc2\fR.
|
||||
typedef int \fBTcl_ObjCmdProc2\fR(
|
||||
void *\fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
size_t \fIobjc\fR,
|
||||
Tcl_Size \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+3
-3
@@ -29,7 +29,7 @@ Tcl_Trace
|
||||
.AS Tcl_CmdObjTraceDeleteProc *deleteProc
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter containing command to be traced or untraced.
|
||||
.AP size_t 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,10 +88,10 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
typedef int \fBTcl_CmdObjTraceProc2\fR(
|
||||
\fBvoid *\fR \fIclientData\fR,
|
||||
\fBTcl_Interp\fR* \fIinterp\fR,
|
||||
size_t \fIlevel\fR,
|
||||
Tcl_Size \fIlevel\fR,
|
||||
const char *\fIcommand\fR,
|
||||
\fBTcl_Command\fR \fIcommandToken\fR,
|
||||
size_t \fIobjc\fR,
|
||||
Tcl_Size \fIobjc\fR,
|
||||
\fBTcl_Obj\fR *const \fIobjv\fR[]);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+16
-15
@@ -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_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult \- 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
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_DStringLength\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
@@ -51,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 size_t length in
|
||||
Number of bytes from \fIbytes\fR to add to dynamic string. If TCL_INDEX_NONE,
|
||||
.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 size_t newLength in
|
||||
.AP Tcl_Size newLength in
|
||||
New length for dynamic string, not including null terminating
|
||||
character.
|
||||
.AP Tcl_Interp *interp in/out
|
||||
@@ -142,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
|
||||
@@ -150,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 size_t 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.
|
||||
|
||||
+2
-2
@@ -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 "size_t \&| 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 size_t 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
|
||||
|
||||
+19
-20
@@ -25,13 +25,13 @@ int
|
||||
char *
|
||||
\fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ExternalToUtfDStringEx\fR(\fIinterp, encoding, src, srcLen, flags, dstPtr, errorIdxPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_UtfToExternalDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_UtfToExternalDStringEx\fR(\fIinterp, encoding, src, srcLen, flags, dstPtr, errorIdxPtr\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -45,7 +45,7 @@ int
|
||||
const char *
|
||||
\fBTcl_GetEncodingName\fR(\fIencoding\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_GetEncodingNulLength\fR(\fIencoding\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -86,7 +86,7 @@ specified encoding that are to be converted to UTF-8. For the
|
||||
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 size_t 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
|
||||
@@ -218,17 +218,16 @@ used. The return value is a pointer to the value stored in the DString.
|
||||
be used to specify the profile to be used for the transform. The
|
||||
\fBTCL_ENCODING_START\fR and \fBTCL_ENCODING_END\fR bits in \fBflags\fR are
|
||||
ignored as the function assumes the entire source string to be decoded is passed
|
||||
into the function. On success, the function returns \fBTCL_ERROR\fR with the
|
||||
converted string stored in \fB*dstPtr\fR. For errors other than conversion
|
||||
errors, such as invalid flags, the function returns \fBTCL_OK\fR with an error
|
||||
into the function. On success, the function returns \fBTCL_OK\fR with the
|
||||
converted string stored in \fB*dstPtr\fR. For errors \fIother than conversion
|
||||
errors\fR, such as invalid flags, the function returns \fBTCL_ERROR\fR with an error
|
||||
message in \fBinterp\fR if it is not NULL.
|
||||
.PP
|
||||
For conversion errors, \fBTcl_ExternalToUtfDStringEx\fR returns one
|
||||
of the \fBTCL_CONVERT_*\fR errors listed below for \fBTcl_ExternalToUtf\fR.
|
||||
When one of these conversion errors is returned, an error message is
|
||||
stored in \fBinterp\fR only if \fBerrorIdxPtr\fR is NULL. Otherwise, no error message
|
||||
is stored as the function expects the caller is interested whatever is
|
||||
decoded to that point and not treating this as an immediate error condition.
|
||||
is stored as the function expects the caller is interested the decoded data
|
||||
up to that point and not treating this as an immediate error condition.
|
||||
The index of the error location is stored in \fB*errorIdxPtr\fR.
|
||||
.PP
|
||||
The caller must call \fBTcl_DStringFree\fR to free up the \fB*dstPtr\fR resources
|
||||
@@ -347,7 +346,7 @@ typedef struct Tcl_EncodingType {
|
||||
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
|
||||
Tcl_EncodingFreeProc *\fIfreeProc\fR;
|
||||
void *\fIclientData\fR;
|
||||
size_t \fInullSize\fR;
|
||||
Tcl_Size \fInullSize\fR;
|
||||
} \fBTcl_EncodingType\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -547,13 +546,13 @@ encoding:
|
||||
E
|
||||
init {}
|
||||
final {}
|
||||
iso8859-1 \ex1b(B
|
||||
jis0201 \ex1b(J
|
||||
jis0208 \ex1b$@
|
||||
jis0208 \ex1b$B
|
||||
jis0212 \ex1b$(D
|
||||
gb2312 \ex1b$A
|
||||
ksc5601 \ex1b$(C
|
||||
iso8859-1 \ex1B(B
|
||||
jis0201 \ex1B(J
|
||||
jis0208 \ex1B$@
|
||||
jis0208 \ex1B$B
|
||||
jis0212 \ex1B$(D
|
||||
gb2312 \ex1B$A
|
||||
ksc5601 \ex1B$(C
|
||||
.CE
|
||||
.PP
|
||||
In the file, the first column represents an option and the second column
|
||||
@@ -565,7 +564,7 @@ marks that encoding. Tcl syntax is used for the values; in the above
|
||||
example, for instance,
|
||||
.QW \fB{}\fR
|
||||
represents the empty string and
|
||||
.QW \fB\ex1b\fR
|
||||
.QW \fB\ex1B\fR
|
||||
represents character 27.
|
||||
.PP
|
||||
When \fBTcl_GetEncoding\fR encounters an encoding \fIname\fR that has not
|
||||
@@ -590,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.
|
||||
|
||||
+2
-2
@@ -69,14 +69,14 @@ The name of the ensemble command to be created.
|
||||
The namespace to which the ensemble command is to be bound, or NULL
|
||||
for the current namespace.
|
||||
.AP int ensFlags in
|
||||
An ORed set of flag bits describing the basic configuration of the
|
||||
An OR'ed set of flag bits describing the basic configuration of the
|
||||
ensemble. Currently only one bit has meaning, \fBTCL_ENSEMBLE_PREFIX\fR,
|
||||
which is present when the ensemble command should also match
|
||||
unambiguous prefixes of subcommands.
|
||||
.AP Tcl_Obj *cmdNameObj in
|
||||
A value holding the name of the ensemble command to look up.
|
||||
.AP int flags in
|
||||
An ORed set of flag bits controlling the behavior of
|
||||
An OR'ed set of flag bits controlling the behavior of
|
||||
\fBTcl_FindEnsemble\fR. Currently only \fBTCL_LEAVE_ERR_MSG\fR is supported.
|
||||
.AP Tcl_Command token in
|
||||
A normal command token that refers to an ensemble command, or which
|
||||
|
||||
+4
-4
@@ -46,11 +46,11 @@ modified to hold the result or error message from the script.
|
||||
.AP Tcl_Obj *objPtr in
|
||||
A Tcl value containing the script to execute.
|
||||
.AP int flags in
|
||||
ORed combination of flag bits that specify additional options.
|
||||
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 size_t 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
|
||||
@@ -101,7 +101,7 @@ in code for string comparison, you can use
|
||||
which will be safely substituted by the Tcl interpreter into
|
||||
.QW ^Z .
|
||||
.PP
|
||||
\fBTcl_EvalObjv\fR executes a single pre-parsed command instead of a
|
||||
\fBTcl_EvalObjv\fR executes a single preparsed command instead of a
|
||||
script. The \fIobjc\fR and \fIobjv\fR arguments contain the values
|
||||
of the words for the Tcl command, one word in each value in
|
||||
\fIobjv\fR. \fBTcl_EvalObjv\fR evaluates the command and returns
|
||||
@@ -142,7 +142,7 @@ of arguments. \fBTcl_VarEval\fR is now deprecated.
|
||||
|
||||
.SH "FLAG BITS"
|
||||
.PP
|
||||
Any ORed combination of the following values may be used for the
|
||||
Any OR'ed combination of the following values may be used for the
|
||||
\fIflags\fR argument to procedures such as \fBTcl_EvalObjEx\fR:
|
||||
.TP 23
|
||||
\fBTCL_EVAL_DIRECT\fR
|
||||
|
||||
+7
-7
@@ -220,9 +220,9 @@ 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 size_t elements in
|
||||
.AP Tcl_Size elements in
|
||||
The number of elements in the \fIlistObj\fR which should
|
||||
be joined together. If TCL_INDEX_NONE, then all elements are joined.
|
||||
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
|
||||
the file which caused an error in the various copy/rename operations.
|
||||
@@ -233,7 +233,7 @@ The value to set in the operation.
|
||||
.AP Tcl_Obj **objPtrRef out
|
||||
Filled with a value containing the result of the operation.
|
||||
.AP Tcl_Obj *resultPtr out
|
||||
Pre-allocated value in which to store (using
|
||||
Preallocated value in which to store (using
|
||||
\fBTcl_ListObjAppendElement\fR) the list of
|
||||
files or directories which are successfully matched.
|
||||
.AP int mode in
|
||||
@@ -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 "size_t \&| 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 size_t 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.
|
||||
@@ -483,7 +483,7 @@ is a Tcl_Obj specifying the contents of the symbolic link given by
|
||||
by the caller, which should call \fBTcl_DecrRefCount\fR when the result is no
|
||||
longer needed. If the \fItoPtr\fR is not NULL, Tcl should create a link
|
||||
of one of the types passed in in the \fIlinkAction\fR flag. This flag is
|
||||
an ORed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
|
||||
an OR'ed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
|
||||
Where a choice exists (i.e.\ more than one flag is passed in), the Tcl
|
||||
convention is to prefer symbolic links. When a link is successfully
|
||||
created, the return value should be \fItoPtr\fR (which is therefore
|
||||
@@ -838,7 +838,7 @@ The \fBTcl_Filesystem\fR structure contains the following fields:
|
||||
.CS
|
||||
typedef struct Tcl_Filesystem {
|
||||
const char *\fItypeName\fR;
|
||||
size_t \fIstructureLength\fR;
|
||||
Tcl_Size \fIstructureLength\fR;
|
||||
Tcl_FSVersion \fIversion\fR;
|
||||
Tcl_FSPathInFilesystemProc *\fIpathInFilesystemProc\fR;
|
||||
Tcl_FSDupInternalRepProc *\fIdupInternalRepProc\fR;
|
||||
|
||||
+10
-4
@@ -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 size_t 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,12 +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 size_t *indexPtr out
|
||||
Points to place to store the size_t 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.
|
||||
@@ -138,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
-1
@@ -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 size_t 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
|
||||
|
||||
+1
-1
@@ -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 size_t 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"
|
||||
|
||||
+9
-9
@@ -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 "size_t \&| 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 size_t 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 "size_t \&| int" *lengthPtr out
|
||||
.AP "Tcl_Size \&| int" *lengthPtr out
|
||||
Points to location where \fBTcl_ListObjLength\fR
|
||||
stores the length of the list.
|
||||
.AP size_t 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 size_t 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 size_t count in
|
||||
.AP Tcl_Size count in
|
||||
The number of elements that \fBTcl_ListObjReplace\fR
|
||||
is to replace.
|
||||
.BE
|
||||
@@ -184,7 +184,7 @@ if the conversion fails, it returns \fBTCL_ERROR\fR
|
||||
and leaves an error message in the interpreter's result value
|
||||
if \fIinterp\fR is not NULL.
|
||||
If the index is out of range,
|
||||
that is, \fIindex\fR is TCL_INDEX_NONE or
|
||||
that is, \fIindex\fR is negative or
|
||||
greater than or equal to the number of elements in the list,
|
||||
\fBTcl_ListObjIndex\fR stores a NULL in \fIobjPtrPtr\fR
|
||||
and returns \fBTCL_OK\fR.
|
||||
@@ -203,13 +203,13 @@ and leaves an error message in the interpreter's result value
|
||||
if \fIinterp\fR is not NULL.
|
||||
Otherwise, it returns \fBTCL_OK\fR after replacing the values.
|
||||
If \fIobjv\fR is NULL, no new elements are added.
|
||||
If the argument \fIfirst\fR is zero or TCL_INDEX_NONE,
|
||||
If the argument \fIfirst\fR is zero or negative,
|
||||
it refers to the first element.
|
||||
If \fIfirst\fR is greater than or equal to the
|
||||
number of elements in the list, then no elements are deleted;
|
||||
the new elements are appended to the list.
|
||||
\fIcount\fR gives the number of elements to replace.
|
||||
If \fIcount\fR is zero or TCL_INDEX_NONE then no elements are deleted;
|
||||
If \fIcount\fR is zero or negative then no elements are deleted;
|
||||
the new elements are simply inserted before the one
|
||||
designated by \fIfirst\fR.
|
||||
\fBTcl_ListObjReplace\fR invalidates \fIlistPtr\fR's
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@ Tcl_Method
|
||||
Tcl_Object
|
||||
\fBTcl_ObjectContextObject\fR(\fIcontext\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_ObjectContextSkippedArgs\fR(\fIcontext\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS void *clientData in
|
||||
@@ -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 size_t 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 size_t skip in
|
||||
.AP Tcl_Size skip in
|
||||
The number of arguments passed to the method implementation that do not
|
||||
represent "real" arguments.
|
||||
.BE
|
||||
|
||||
@@ -69,7 +69,7 @@ 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 size_t objc in
|
||||
.AP Tcl_Size objc in
|
||||
Number of items in \fIobjv\fR.
|
||||
.AP Tcl_Obj **objv in
|
||||
Words in the command.
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ is true.
|
||||
.PP
|
||||
\fBTcl_Import\fR imports commands matching a pattern into a
|
||||
namespace. Note that the pattern must include the name of the
|
||||
namespace to import from. This function returns an error if
|
||||
namespace to import from. This function returns TCL_ERROR if
|
||||
an attempt to import a command over an existing command is made,
|
||||
unless the \fIallowOverwrite\fR flag has been set.
|
||||
.PP
|
||||
|
||||
+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 size_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 {
|
||||
size_t \fIrefCount\fR;
|
||||
Tcl_Size \fIrefCount\fR;
|
||||
char *\fIbytes\fR;
|
||||
size_t \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
|
||||
|
||||
+164
-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 {
|
||||
@@ -110,6 +109,16 @@ typedef struct Tcl_ObjType {
|
||||
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"
|
||||
@@ -206,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);
|
||||
@@ -229,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
|
||||
@@ -256,8 +267,149 @@ 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 \fITCL_OBJTYPE_V0\fR.
|
||||
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
|
||||
@@ -276,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
|
||||
|
||||
+30
-28
@@ -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
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_GetsObj\fR(\fIchannel, lineObjPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_Ungets\fR(\fIchannel, input, inputLen, addAtEnd\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_WriteObj\fR(\fIchannel, writeObjPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_WriteChars\fR(\fIchannel, charBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_Write\fR(\fIchannel, byteBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_ReadRaw\fR(\fIchannel, readBuf, bytesToRead\fR)
|
||||
.sp
|
||||
size_t
|
||||
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 size_t 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
|
||||
@@ -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 size_t 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 size_t 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 size_t 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 size_t 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,19 +406,21 @@ 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 code that
|
||||
can be retrieved with \fBTcl_GetErrno\fR.
|
||||
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
|
||||
The return value may be smaller than the value to read, indicating that less
|
||||
data than requested was available. This is called a \fIshort read\fR. In
|
||||
blocking mode, this can only happen on an end-of-file. In nonblocking mode,
|
||||
a short read can also occur if there is not enough input currently
|
||||
available: \fBTcl_ReadChars\fR returns a short count rather than waiting
|
||||
for more data.
|
||||
a short read can also occur if an encoding error is encountered (with -profile
|
||||
strict) or if there is not enough input currently available:
|
||||
\fBTcl_ReadChars\fR returns a short count rather than waiting for more data.
|
||||
.PP
|
||||
If the channel is in blocking mode, a return value of zero indicates an
|
||||
end-of-file condition. If the channel is in nonblocking mode, a return
|
||||
@@ -471,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
|
||||
@@ -496,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
|
||||
@@ -513,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.
|
||||
@@ -599,7 +601,7 @@ their possible values are described in the manual entry for the Tcl
|
||||
\fBfconfigure\fR command. Other options can be added by each channel type.
|
||||
These channel type specific options are described in the manual entry for
|
||||
the Tcl command that creates a channel of that type; for example, the
|
||||
additional options for TCP based channels are described in the manual entry
|
||||
additional options for TCP-based channels are described in the manual entry
|
||||
for the Tcl \fBsocket\fR command.
|
||||
The procedure normally returns \fBTCL_OK\fR. If an error occurs, it returns
|
||||
\fBTCL_ERROR\fR and calls \fBTcl_SetErrno\fR to store an appropriate POSIX
|
||||
|
||||
@@ -27,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
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ int
|
||||
Where to store error messages.
|
||||
.AP "const Tcl_ArgvInfo" *argTable in
|
||||
Pointer to array of option descriptors.
|
||||
.AP "size_t \&| 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.
|
||||
|
||||
+7
-7
@@ -45,7 +45,7 @@ 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 size_t 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.
|
||||
@@ -196,20 +196,20 @@ return parse information in two data structures, Tcl_Parse and Tcl_Token:
|
||||
.CS
|
||||
typedef struct Tcl_Parse {
|
||||
const char *\fIcommentStart\fR;
|
||||
size_t \fIcommentSize\fR;
|
||||
Tcl_Size \fIcommentSize\fR;
|
||||
const char *\fIcommandStart\fR;
|
||||
size_t \fIcommandSize\fR;
|
||||
size_t \fInumWords\fR;
|
||||
Tcl_Size \fIcommandSize\fR;
|
||||
Tcl_Size \fInumWords\fR;
|
||||
Tcl_Token *\fItokenPtr\fR;
|
||||
size_t \fInumTokens\fR;
|
||||
Tcl_Size \fInumTokens\fR;
|
||||
...
|
||||
} \fBTcl_Parse\fR;
|
||||
|
||||
typedef struct Tcl_Token {
|
||||
int \fItype\fR;
|
||||
const char *\fIstart\fR;
|
||||
size_t \fIsize\fR;
|
||||
size_t \fInumComponents\fR;
|
||||
Tcl_Size \fIsize\fR;
|
||||
Tcl_Size \fInumComponents\fR;
|
||||
} \fBTcl_Token\fR;
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+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 size_t objc in
|
||||
.AP Tcl_Size objc in
|
||||
Number of requirements.
|
||||
.AP Tcl_Obj* objv[] in
|
||||
Array of requirements.
|
||||
|
||||
+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 size_t 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 size_t 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 size_t 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 TCL_INDEX_NONE, 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 {
|
||||
size_t \fInsubs\fR;
|
||||
Tcl_Size \fInsubs\fR;
|
||||
Tcl_RegExpIndices *\fImatches\fR;
|
||||
size_t \fIextendStart\fR;
|
||||
Tcl_Size \fIextendStart\fR;
|
||||
} \fBTcl_RegExpInfo\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -355,8 +355,8 @@ follows:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_RegExpIndices {
|
||||
size_t \fIstart\fR;
|
||||
size_t \fIend\fR;
|
||||
Tcl_Size \fIstart\fR;
|
||||
Tcl_Size \fIend\fR;
|
||||
} \fBTcl_RegExpIndices\fR;
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -14,14 +14,14 @@ Tcl_SetRecursionLimit \- set maximum allowable nesting depth in interpreter
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
size_t
|
||||
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 size_t depth in
|
||||
.AP Tcl_Size depth in
|
||||
New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
|
||||
.BE
|
||||
|
||||
|
||||
+61
-169
@@ -34,213 +34,105 @@ const char *
|
||||
.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_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.
|
||||
.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
|
||||
|
||||
+8
-8
@@ -20,16 +20,16 @@ int
|
||||
char *
|
||||
\fBTcl_Merge\fR(\fIargc, argv\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_ScanElement\fR(\fIsrc, flagsPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_ScanCountedElement\fR(\fIsrc, length, flagsPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_ConvertElement\fR(\fIsrc, dst, flags\fR)
|
||||
.sp
|
||||
size_t
|
||||
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 "size_t \&| 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 size_t 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 size_t 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,7 @@ For example, suppose that you have called \fBTcl_SplitList\fR with
|
||||
the following code:
|
||||
.PP
|
||||
.CS
|
||||
size_t argc;
|
||||
Tcl_Size argc;
|
||||
int code;
|
||||
char *string;
|
||||
char **argv;
|
||||
|
||||
+3
-3
@@ -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 "size_t \&| 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 size_t 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
|
||||
size_t argc;
|
||||
Tcl_Size argc;
|
||||
char *path;
|
||||
char **argv;
|
||||
\&...
|
||||
|
||||
+21
-24
@@ -40,7 +40,7 @@ Tcl_UniChar *
|
||||
int
|
||||
\fBTcl_GetUniChar\fR(\fIobjPtr, index\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_GetCharLength\fR(\fIobjPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -87,46 +87,43 @@ Tcl_Obj *
|
||||
Points to the first byte of an array of UTF-8-encoded bytes
|
||||
used to set or append to a string value.
|
||||
This byte array may contain embedded null characters
|
||||
unless \fInumChars\fR is \fBTCL_INDEX_NONE\fR. (Applications needing null bytes
|
||||
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 size_t 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 \fBTCL_INDEX_NONE\fR, all bytes up to the first null are used.
|
||||
If negative, all bytes up to the first null are used.
|
||||
.AP "const Tcl_UniChar" *unicode in
|
||||
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 \fBTCL_INDEX_NONE\fR.
|
||||
.AP size_t numChars in
|
||||
unless \fInumChars\fR is negative.
|
||||
.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 \fBTCL_INDEX_NONE\fR, all characters up to the first null character are used.
|
||||
.AP size_t index in
|
||||
If negative, all characters up to the first null character are used.
|
||||
.AP Tcl_Size index in
|
||||
The index of the Unicode character to return.
|
||||
.AP size_t 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 \fBTCL_INDEX_NONE\fR, behave the same as if the
|
||||
returned as a new value. If negative, behave the same as if the
|
||||
value was 0.
|
||||
.AP size_t 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 \fBTCL_INDEX_NONE\fR, take all characters up to
|
||||
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 "size_t \&| 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 size_t 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.
|
||||
@@ -135,11 +132,11 @@ If NULL is passed then the suffix
|
||||
is used.
|
||||
.AP "const char" *format in
|
||||
Format control string including % conversion specifiers.
|
||||
.AP size_t 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 size_t newLength in
|
||||
.AP Tcl_Size newLength in
|
||||
New length for the string value of \fIobjPtr\fR, not including the
|
||||
final null character.
|
||||
.BE
|
||||
@@ -213,8 +210,8 @@ it references a low surrogate preceded by a high surrogate, it returns -1;
|
||||
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 == TCL_INDEX_NONE, then the returned
|
||||
string starts at the beginning of the value. If \fIlast\fR == TCL_INDEX_NONE,
|
||||
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
|
||||
@@ -263,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 \fBTCL_INDEX_NONE\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.
|
||||
@@ -306,7 +303,7 @@ functionality is needed.
|
||||
.CS
|
||||
char buf[SOME_SUITABLE_LENGTH];
|
||||
sprintf(buf, format, ...);
|
||||
\fBTcl_NewStringObj\fR(buf, \fBTCL_INDEX_NONE\fR);
|
||||
\fBTcl_NewStringObj\fR(buf, -1);
|
||||
.CE
|
||||
.PP
|
||||
but with greater convenience and no need to
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ message.
|
||||
.AP Tcl_Obj *objPtr in
|
||||
A Tcl value containing the string to perform substitutions on.
|
||||
.AP int flags in
|
||||
ORed combination of flag bits that specify which substitutions to
|
||||
OR'ed combination of flag bits that specify which substitutions to
|
||||
perform. The flags \fBTCL_SUBST_COMMANDS\fR,
|
||||
\fBTCL_SUBST_VARIABLES\fR and \fBTCL_SUBST_BACKSLASHES\fR are
|
||||
currently supported, and \fBTCL_SUBST_ALL\fR is provided as a
|
||||
|
||||
+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 size_t 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,8 +107,8 @@ 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 size_t count in
|
||||
The maximum number of bytes to get from the stream, or TCL_INDEX_NONE to get
|
||||
.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.
|
||||
@@ -188,7 +188,7 @@ is used to initialize the compression engine rather than leaving it to create
|
||||
it on the fly from the data being compressed. Setting a compression dictionary
|
||||
allows for more efficient compression in the case where the start of the data
|
||||
is highly regular, but it does require both the compressor and the
|
||||
decompressor to agreee on the value to use. Compression dictionaries are only
|
||||
decompressor to agree on the value to use. Compression dictionaries are only
|
||||
fully supported for zlib-format data; on compression, they must be set before
|
||||
any data is sent in with \fBTcl_ZlibStreamPut\fR, and on decompression they
|
||||
should be set when \fBTcl_ZlibStreamGet\fR produces an \fBerror\fR with its
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ Tcl_Obj *
|
||||
\fBTcl_SetMainLoop\fR(\fImainLoopProc\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_MainLoopProc *mainLoopProc
|
||||
.AP size_t 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
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ This procedure will act as the \fBmain()\fR of the newly created
|
||||
thread. The specified \fIclientData\fR will be its sole argument.
|
||||
.AP void *clientData in
|
||||
Arbitrary information. Passed as sole argument to the \fIproc\fR.
|
||||
.AP int 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
|
||||
|
||||
+3
-3
@@ -22,13 +22,13 @@ int
|
||||
int
|
||||
\fBTcl_UniCharToTitle\fR(\fIch\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToUpper\fR(\fIstr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToLower\fR(\fIstr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToTitle\fR(\fIstr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *str in/out
|
||||
|
||||
@@ -8,48 +8,48 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UtfToChar16, Tcl_UtfToWChar, Tcl_UniCharToUtfDString, Tcl_UtfToUniCharDString, Tcl_Char16ToUtfDString, Tcl_UtfToWCharDString, Tcl_UtfToChar16DString, Tcl_WCharLen, Tcl_Char16Len, Tcl_UniCharLen, Tcl_UniCharNcmp, Tcl_UniCharNcasecmp, Tcl_UniCharCaseMatch, Tcl_UtfNcmp, Tcl_UtfNcasecmp, Tcl_UtfCharComplete, Tcl_NumUtfChars, Tcl_UtfFindFirst, Tcl_UtfFindLast, Tcl_UtfNext, Tcl_UtfPrev, Tcl_UniCharAtIndex, Tcl_UtfAtIndex, Tcl_UtfBackslash \- routines for manipulating UTF-8 strings
|
||||
Tcl_UniChar, Tcl_UniCharToUtf, Tcl_UtfToUniChar, Tcl_UtfToChar16, Tcl_UtfToWChar, Tcl_UniCharToUtfDString, Tcl_UtfToUniCharDString, Tcl_Char16ToUtfDString, Tcl_UtfToWCharDString, Tcl_UtfToChar16DString, Tcl_WCharToUtfDString, Tcl_WCharLen, Tcl_Char16Len, Tcl_UniCharLen, Tcl_UniCharNcmp, Tcl_UniCharNcasecmp, Tcl_UniCharCaseMatch, Tcl_UtfNcmp, Tcl_UtfNcasecmp, Tcl_UtfCharComplete, Tcl_NumUtfChars, Tcl_UtfFindFirst, Tcl_UtfFindLast, Tcl_UtfNext, Tcl_UtfPrev, Tcl_UniCharAtIndex, Tcl_UtfAtIndex, Tcl_UtfBackslash \- routines for manipulating UTF-8 strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
typedef ... \fBTcl_UniChar\fR;
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UniCharToUtf\fR(\fIch, buf\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToUniChar\fR(\fIsrc, chPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToChar16\fR(\fIsrc, uPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfToWChar\fR(\fIsrc, wPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_UniCharToUtfDString\fR(\fIuniStr, uniLength, dsPtr\fR)
|
||||
\fBTcl_UniCharToUtfDString\fR(\fIuniStr, numUniChars, dsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_Char16ToUtfDString\fR(\fIuStr, uniLength, dsPtr\fR)
|
||||
\fBTcl_Char16ToUtfDString\fR(\fIutf16, numUtf16, dsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBTcl_WCharToUtfDString\fR(\fIwStr, uniLength, dsPtr\fR)
|
||||
\fBTcl_WCharToUtfDString\fR(\fIwcharStr, numWChars, dsPtr\fR)
|
||||
.sp
|
||||
Tcl_UniChar *
|
||||
\fBTcl_UtfToUniCharDString\fR(\fIsrc, length, dsPtr\fR)
|
||||
\fBTcl_UtfToUniCharDString\fR(\fIsrc, numBytes, dsPtr\fR)
|
||||
.sp
|
||||
unsigned short *
|
||||
\fBTcl_UtfToChar16DString\fR(\fIsrc, length, dsPtr\fR)
|
||||
\fBTcl_UtfToChar16DString\fR(\fIsrc, numBytes, dsPtr\fR)
|
||||
.sp
|
||||
wchar_t *
|
||||
\fBTcl_UtfToWCharDString\fR(\fIsrc, length, dsPtr\fR)
|
||||
\fBTcl_UtfToWCharDString\fR(\fIsrc, numBytes, dsPtr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_Char16Len\fR(\fIuniStr\fR)
|
||||
\fBTcl_Char16Len\fR(\fIutf16\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_WCharLen\fR(\fIuniStr\fR)
|
||||
\fBTcl_WCharLen\fR(\fIwcharStr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharLen\fR(\fIuniStr\fR)
|
||||
@@ -70,10 +70,10 @@ int
|
||||
\fBTcl_UtfNcasecmp\fR(\fIcs, ct, length\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfCharComplete\fR(\fIsrc, length\fR)
|
||||
\fBTcl_UtfCharComplete\fR(\fIsrc, numBytes\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_NumUtfChars\fR(\fIsrc, length\fR)
|
||||
\fBTcl_NumUtfChars\fR(\fIsrc, numBytes\fR)
|
||||
.sp
|
||||
const char *
|
||||
\fBTcl_UtfFindFirst\fR(\fIsrc, ch\fR)
|
||||
@@ -93,7 +93,7 @@ int
|
||||
const char *
|
||||
\fBTcl_UtfAtIndex\fR(\fIsrc, index\fR)
|
||||
.sp
|
||||
size_t
|
||||
Tcl_Size
|
||||
\fBTcl_UtfBackslash\fR(\fIsrc, readPtr, dst\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tcl_UniChar" *uniPattern in/out
|
||||
@@ -115,33 +115,37 @@ Pointer to a UTF-8 string.
|
||||
.AP "const char" *ct in
|
||||
Pointer to a UTF-8 string.
|
||||
.AP "const Tcl_UniChar" *uniStr in
|
||||
A null-terminated Unicode string.
|
||||
A sequence of \fBTcl_UniChar\fR units with null-termination optional
|
||||
depending on function.
|
||||
.AP "const Tcl_UniChar" *ucs in
|
||||
A null-terminated Unicode string.
|
||||
A null-terminated sequence of \fBTcl_UniChar\fR.
|
||||
.AP "const Tcl_UniChar" *uct in
|
||||
A null-terminated Unicode string.
|
||||
A null-terminated sequence of \fBTcl_UniChar\fR.
|
||||
.AP "const Tcl_UniChar" *uniPattern in
|
||||
A null-terminated Unicode string.
|
||||
.AP "const unsigned short" *uStr in
|
||||
A null-terminated UTF-16 string.
|
||||
.AP "const wchar_t" *wStr in
|
||||
A null-terminated wchar_t string.
|
||||
.AP "const unsigned short" *utf16s in
|
||||
A null-terminated utf-16 string.
|
||||
.AP "const unsigned short" *utf16t in
|
||||
A null-terminated utf-16 string.
|
||||
.AP "const unsigned short" *utf16Pattern in
|
||||
A null-terminated utf-16 string.
|
||||
.AP size_t length in
|
||||
The length of the UTF-8 string in bytes (not UTF-8 characters). If
|
||||
TCL_INDEX_NONE, all bytes up to the first null byte are used.
|
||||
.AP size_t uniLength in
|
||||
The length of the Unicode string in characters.
|
||||
A null-terminated sequence of \fBTcl_UniChar\fR.
|
||||
.AP "const unsigned short" *utf16 in
|
||||
A sequence of UTF-16 units with null-termination optional
|
||||
depending on function.
|
||||
.AP "const wchar_t" *wcharStr in
|
||||
A sequence of \fBwchar_t\fR units with null-termination optional
|
||||
depending on function.
|
||||
.AP int numBytes in
|
||||
The length of the UTF-8 input in bytes. If
|
||||
negative, the length includes all bytes until the first null byte.
|
||||
.AP int numUtf16 in
|
||||
The length of the input in UTF-16 units.
|
||||
If negative, the length includes all bytes until the first null.
|
||||
.AP int numUniChars in
|
||||
The length of the input in Tcl_UniChar units.
|
||||
If negative, the length includes all bytes until the first null.
|
||||
.AP int numWChars in
|
||||
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 "const char" *start in
|
||||
Pointer to the beginning of a UTF-8 string.
|
||||
.AP size_t 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,
|
||||
@@ -186,30 +190,32 @@ not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first
|
||||
byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x00A0 and
|
||||
0x00FF and return 1.
|
||||
.PP
|
||||
\fBTcl_UniCharToUtfDString\fR converts the given Unicode string
|
||||
to UTF-8, storing the result in a previously initialized \fBTcl_DString\fR.
|
||||
The return value is a pointer to the UTF-8 representation of the
|
||||
Unicode string. Storage for the return value is appended to the
|
||||
end of the \fBTcl_DString\fR.
|
||||
\fBTcl_UniCharToUtfDString\fR converts the input in the form of a
|
||||
sequence of \fBTcl_UniChar\fR code points to UTF-8, appending the result to the
|
||||
previously initialized output \fBTcl_DString\fR. The return value is a pointer
|
||||
to the UTF-8 representation of the \fBappended\fR string.
|
||||
.PP
|
||||
\fBTcl_UtfToUniCharDString\fR converts the given UTF-8 string to Unicode,
|
||||
storing the result in the previously initialized \fBTcl_DString\fR.
|
||||
In the argument \fIlength\fR, you may either specify the length of
|
||||
the given UTF-8 string in bytes or
|
||||
.QW \-1 ,
|
||||
in which case \fBTcl_UtfToUniCharDString\fR uses \fBstrlen\fR to
|
||||
calculate the length. The return value is a pointer to the Unicode
|
||||
representation of the UTF-8 string. Storage for the return value
|
||||
is appended to the end of the \fBTcl_DString\fR. The Unicode string
|
||||
is terminated with a Unicode null character.
|
||||
\fBTcl_UtfToUniCharDString\fR converts the input in the form of
|
||||
a UTF-8 encoded string to a \fBTcl_UniChar\fR sequence
|
||||
appending the result in the previously initialized \fBTcl_DString\fR.
|
||||
The return value is a pointer to the appended result which is also
|
||||
terminated with a \fBTcl_UniChar\fR null character.
|
||||
.PP
|
||||
\fBTcl_WCharToUtfDString\fR and \fBTcl_UtfToWCharDString\fR are similar to
|
||||
\fBTcl_UniCharToUtfDString\fR and \fBTcl_UtfToUniCharDString\fR except they
|
||||
operate on sequences of \fBwchar_t\fR instead of \fBTcl_UniChar\fR.
|
||||
.PP
|
||||
\fBTcl_Char16ToUtfDString\fR and \fBTcl_UtfToChar16DString\fR are similar to
|
||||
\fBTcl_UniCharToUtfDString\fR and \fBTcl_UtfToUniCharDString\fR except they
|
||||
operate on sequences of \fBUTF-16\fR units instead of \fBTcl_UniChar\fR.
|
||||
.PP
|
||||
\fBTcl_Char16Len\fR corresponds to \fBstrlen\fR for UTF-16
|
||||
characters. It accepts a null-terminated Unicode string and returns
|
||||
the number of Unicode characters (not bytes) in that string.
|
||||
characters. It accepts a null-terminated UTF-16 sequence and returns
|
||||
the number of UTF-16 units until the null.
|
||||
.PP
|
||||
\fBTcl_WCharLen\fR corresponds to \fBstrlen\fR for wchar_t
|
||||
characters. It accepts a null-terminated Unicode string and returns
|
||||
the number of Unicode characters (not bytes) in that string.
|
||||
characters. It accepts a null-terminated \fBwchar_t\fR sequence and returns
|
||||
the number of \fBwchar_t\fR units until the null.
|
||||
.PP
|
||||
\fBTcl_UniCharLen\fR corresponds to \fBstrlen\fR for Unicode
|
||||
characters. It accepts a null-terminated Unicode string and returns
|
||||
@@ -245,7 +251,7 @@ differences in case when comparing upper, lower or title case
|
||||
characters.
|
||||
.PP
|
||||
\fBTcl_UtfCharComplete\fR returns 1 if the source UTF-8 string \fIsrc\fR
|
||||
of \fIlength\fR bytes is long enough to be decoded by
|
||||
of \fInumBytes\fR bytes is long enough to be decoded by
|
||||
\fBTcl_UtfToUniChar\fR/\fBTcl_UtfNext\fR, or 0 otherwise. This function
|
||||
does not guarantee that the UTF-8 string is properly formed. This routine
|
||||
is used by procedures that are operating on a byte at a time and need to
|
||||
@@ -254,7 +260,7 @@ know if a full Unicode character has been seen.
|
||||
\fBTcl_NumUtfChars\fR corresponds to \fBstrlen\fR for UTF-8 strings. It
|
||||
returns the number of Tcl_UniChars that are represented by the UTF-8 string
|
||||
\fIsrc\fR. The length of the source string is \fIlength\fR bytes. If the
|
||||
length is TCL_INDEX_NONE, all bytes up to the first null byte are used.
|
||||
length is negative, all bytes up to the first null byte are used.
|
||||
.PP
|
||||
\fBTcl_UtfFindFirst\fR corresponds to \fBstrchr\fR for UTF-8 strings. It
|
||||
returns a pointer to the first occurrence of the Unicode character \fIch\fR
|
||||
@@ -299,13 +305,13 @@ 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 \fIindex\fR is TCL_INDEX_NONE 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. If \fIindex\fR is TCL_INDEX_NONE,
|
||||
\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
|
||||
|
||||
+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 size_t 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
|
||||
|
||||
+20
-20
@@ -241,7 +241,7 @@ which returns a binary string equivalent to:
|
||||
\fB\e254\fR
|
||||
.CE
|
||||
.PP
|
||||
(i.e. \fB\exac\fR) by
|
||||
(i.e. \fB\exAC\fR) by
|
||||
truncating the high-bits of the character, and which is probably not
|
||||
what is desired.
|
||||
.RE
|
||||
@@ -299,7 +299,7 @@ high-to-low order within each byte. For example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\exe0\exe1\exa0\fR
|
||||
\fB\exE0\exE1\exA0\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBH\fR 5
|
||||
@@ -326,7 +326,7 @@ remaining bits of the last byte will be zeros. For example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\exab\ex00\exde\exf0\ex98\fR
|
||||
\fB\exAB\ex00\exDE\exF0\ex98\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBh\fR 5
|
||||
@@ -341,7 +341,7 @@ low-to-high order within each byte. This is seldom required. For example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\exba\ex00\exed\ex0f\ex89\fR
|
||||
\fB\exBA\ex00\exED\ex0F\ex89\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBc\fR 5
|
||||
@@ -363,7 +363,7 @@ than \fIcount\fR, then the extra elements are ignored. For example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex03\exfd\ex80\ex04\ex02\ex05\fR
|
||||
\fB\ex03\exFD\ex80\ex04\ex02\ex05\fR
|
||||
.CE
|
||||
.PP
|
||||
whereas:
|
||||
@@ -389,7 +389,7 @@ example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex03\ex00\exfd\exff\ex02\ex01\fR
|
||||
\fB\ex03\ex00\exFD\exFF\ex02\ex01\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBS\fR 5
|
||||
@@ -405,7 +405,7 @@ example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex00\ex03\exff\exfd\ex01\ex02\fR
|
||||
\fB\ex00\ex03\exFF\exFD\ex01\ex02\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBt\fR 5
|
||||
@@ -429,7 +429,7 @@ example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex03\ex00\ex00\ex00\exfd\exff\exff\exff\ex00\ex00\ex01\ex00\fR
|
||||
\fB\ex03\ex00\ex00\ex00\exFD\exFF\exFF\exFF\ex00\ex00\ex01\ex00\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBI\fR 5
|
||||
@@ -445,7 +445,7 @@ For example,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex00\ex00\ex00\ex03\exff\exff\exff\exfd\ex00\ex01\ex00\ex00\fR
|
||||
\fB\ex00\ex00\ex00\ex03\exFF\exFF\exFF\exFD\ex00\ex01\ex00\ex00\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBn\fR 5
|
||||
@@ -510,7 +510,7 @@ on a Windows system running on an Intel Pentium processor,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\excd\excc\excc\ex3f\ex9a\ex99\ex59\ex40\fR
|
||||
\fB\exCD\exCC\exCC\ex3F\ex9A\ex99\ex59\ex40\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBr\fR 5
|
||||
@@ -536,7 +536,7 @@ Windows system running on an Intel Pentium processor,
|
||||
will return a binary string equivalent to:
|
||||
.PP
|
||||
.CS
|
||||
\fB\ex9a\ex99\ex99\ex99\ex99\ex99\exf9\ex3f\fR
|
||||
\fB\ex9A\ex99\ex99\ex99\ex99\ex99\exF9\ex3F\fR
|
||||
.CE
|
||||
.RE
|
||||
.IP \fBq\fR 5
|
||||
@@ -788,7 +788,7 @@ scanned. For example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
\fBbinary scan\fR \ex07\exC6\ex05\ex1f\ex34 H3H* var1 var2
|
||||
\fBbinary scan\fR \ex07\exC6\ex05\ex1F\ex34 H3H* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
will return \fB2\fR with \fB07c\fR stored in \fIvar1\fR and
|
||||
@@ -839,7 +839,7 @@ example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
\fBbinary scan\fR \ex05\ex00\ex07\ex00\exf0\exff s2s* var1 var2
|
||||
\fBbinary scan\fR \ex05\ex00\ex07\ex00\exF0\exFF s2s* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR
|
||||
@@ -853,7 +853,7 @@ order. For example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
\fBbinary scan\fR \ex00\ex05\ex00\ex07\exff\exf0 S2S* var1 var2
|
||||
\fBbinary scan\fR \ex00\ex05\ex00\ex07\exFF\exF0 S2S* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR
|
||||
@@ -878,7 +878,7 @@ example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exf0\exff\exff\exff
|
||||
set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exF0\exFF\exFF\exFF
|
||||
\fBbinary scan\fR $str i2i* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
@@ -894,7 +894,7 @@ immediately after the \fBI\fR. For example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exff\exff\exff\exf0
|
||||
set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exFF\exFF\exFF\exF0
|
||||
\fBbinary scan\fR $str I2I* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
@@ -920,7 +920,7 @@ example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exf0\exff\exff\exff
|
||||
set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exF0\exFF\exFF\exFF
|
||||
\fBbinary scan\fR $str wi* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
@@ -935,7 +935,7 @@ immediately after the \fBW\fR. For example,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exff\exff\exff\exf0
|
||||
set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exFF\exFF\exFF\exF0
|
||||
\fBbinary scan\fR $str WI* var1 var2
|
||||
.CE
|
||||
.PP
|
||||
@@ -966,7 +966,7 @@ Intel Pentium processor,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
\fBbinary scan\fR \ex3f\excc\excc\excd f var1
|
||||
\fBbinary scan\fR \ex3F\exCC\exCC\exCD f var1
|
||||
.CE
|
||||
.PP
|
||||
will return \fB1\fR with \fB1.6000000238418579\fR stored in
|
||||
@@ -990,7 +990,7 @@ running on an Intel Pentium processor,
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
\fBbinary scan\fR \ex9a\ex99\ex99\ex99\ex99\ex99\exf9\ex3f d var1
|
||||
\fBbinary scan\fR \ex9A\ex99\ex99\ex99\ex99\ex99\exF9\ex3F d var1
|
||||
.CE
|
||||
.PP
|
||||
will return \fB1\fR with \fB1.6000000000000001\fR
|
||||
|
||||
+19
-6
@@ -55,7 +55,9 @@ channel is flushed in the background before finally being closed.
|
||||
.PP
|
||||
\fBchan close\fR may return an error if an error occurs while flushing
|
||||
output. If a process in a command pipeline created by \fBopen\fR returns an
|
||||
error, \fBchan close\fR generates an error in the same manner as \fBexec\fR.
|
||||
error (either by returning a non-zero exit code or writing to its standard
|
||||
error file descriptor), \fBchan close\fR generates an error in the same
|
||||
manner as \fBexec\fR.
|
||||
.PP
|
||||
Closing one side of a socket or command pipeline may lead to the shutdown() or
|
||||
close() of the underlying system resource, leading to a reaction from whatever
|
||||
@@ -70,6 +72,17 @@ description of channel sharing.
|
||||
.PP
|
||||
When the last interpreter sharing a channel is destroyed, the channel is
|
||||
switched to blocking mode and fully flushed and then closed.
|
||||
.PP
|
||||
Channels are automatically closed when an interpreter is destroyed and
|
||||
when the process exits.
|
||||
From 8.6 on (TIP#398), nonblocking channels are no longer switched to
|
||||
blocking mode when exiting; this guarantees a timely exit even when the
|
||||
peer or a communication channel is stalled. To ensure proper flushing of
|
||||
stalled nonblocking channels on exit, one must now either (a) actively
|
||||
switch them back to blocking or (b) use the environment variable
|
||||
\fBTCL_FLUSH_NONBLOCKING_ON_EXIT\fR, which when set and not equal to
|
||||
.QW \fB0\fR
|
||||
restores the previous behavior.
|
||||
.RE
|
||||
.TP
|
||||
\fBchan configure \fIchannelName\fR ?\fIoptionName\fR? ?\fIvalue\fR? ?\fIoptionName value\fR?...
|
||||
@@ -139,7 +152,7 @@ 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. The acceptable range is \ex01 -
|
||||
\ex7f. A value outside this range results in an error.
|
||||
\ex7F. A value outside this range results in an error.
|
||||
.VS "TCL8.7 TIP656"
|
||||
.TP
|
||||
\fB\-profile\fR \fIprofile\fR
|
||||
@@ -232,10 +245,10 @@ files to slow destinations like network sockets.
|
||||
.PP
|
||||
\fB\-size\fR limits the number of characters copied.
|
||||
.PP
|
||||
If \fB\-command\fR is gviven, \fBchan copy\fR returns immediately, works in the
|
||||
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 occurres during the background copy, another argument provides message
|
||||
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.
|
||||
@@ -348,8 +361,8 @@ first words of a command that provides the interface for a \fBrefchan\fR.
|
||||
\fBImode\fR is a list of one or more of the strings
|
||||
.QW \fBread\fR
|
||||
or
|
||||
.QW \fBwrite\fR
|
||||
, indicating whether the channel is a read channel, a write channel, or both.
|
||||
.QW \fBwrite\fR ,
|
||||
indicating whether the channel is a read channel, a write channel, or both.
|
||||
It is an error if the handler does not support the chosen mode.
|
||||
.PP
|
||||
The handler is called as needed from the global namespace at the top level, and
|
||||
|
||||
+15
-6
@@ -12,11 +12,12 @@
|
||||
.SH NAME
|
||||
close \- Close an open channel
|
||||
.SH SYNOPSIS
|
||||
\fBclose \fIchannelId\fR ?r(ead)|w(rite)?
|
||||
\fBclose \fIchannelId\fR ?\fBr\fR(\fBead\fR)|\fBw\fR(\fBrite\fR)?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Closes or half-closes the channel given by \fIchannelId\fR.
|
||||
Closes or half-closes the channel given by \fIchannelId\fR. \fBchan close\fR
|
||||
is another name for this command.
|
||||
.PP
|
||||
\fIChannelId\fR must be an identifier for an open channel such as a
|
||||
Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
|
||||
@@ -49,12 +50,20 @@ When the last interpreter in which the channel is registered invokes
|
||||
.PP
|
||||
Channels are automatically closed when an interpreter is destroyed and
|
||||
when the process exits.
|
||||
From 8.6 on (TIP#398), nonblocking channels are no longer switched to blocking mode when exiting; this guarantees a timely exit even when the peer or a communication channel is stalled. To ensure proper flushing of stalled nonblocking channels on exit, one must now either (a) actively switch them back to blocking or (b) use the environment variable TCL_FLUSH_NONBLOCKING_ON_EXIT, which when set and not equal to "0" restores the previous behavior.
|
||||
From 8.6 on (TIP#398), nonblocking channels are no longer switched to
|
||||
blocking mode when exiting; this guarantees a timely exit even when the
|
||||
peer or a communication channel is stalled. To ensure proper flushing of
|
||||
stalled nonblocking channels on exit, one must now either (a) actively
|
||||
switch them back to blocking or (b) use the environment variable
|
||||
\fBTCL_FLUSH_NONBLOCKING_ON_EXIT\fR, which when set and not equal to
|
||||
.QW \fB0\fR
|
||||
restores the previous behavior.
|
||||
.PP
|
||||
The command returns an empty string, and may generate an error if
|
||||
an error occurs while flushing output. If a command in a command
|
||||
pipeline created with \fBopen\fR returns an error, \fBclose\fR
|
||||
generates an error (similar to the \fBexec\fR command.)
|
||||
pipeline created with \fBopen\fR returns an error (either by returning a
|
||||
non-zero exit code or writing to its standard error file descriptor),
|
||||
\fBclose\fR generates an error (similar to the \fBexec\fR command.)
|
||||
.PP
|
||||
The two-argument form is a
|
||||
.QW "half-close" :
|
||||
@@ -95,7 +104,7 @@ proc withOpenFile {filename channelVar script} {
|
||||
}
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)
|
||||
chan(n), file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)
|
||||
.SH KEYWORDS
|
||||
blocking, channel, close, nonblocking, half-close
|
||||
'\" Local Variables:
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
'\"
|
||||
'\" Copyright © 2019 Donal K. Fellows
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH configurable n 0.4 TclOO "TclOO Commands"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
oo::configurable, configure, property \- class that makes configurable classes and objects, and supports making configurable properties
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
package require TclOO
|
||||
|
||||
\fBoo::configurable create \fIclass\fR ?\fIdefinitionScript\fR?
|
||||
|
||||
\fBoo::define \fIclass\fB {\fR
|
||||
\fBproperty \fIpropName\fR ?\fIoptions...\fR? ?\fIpropName\fR ?\fIoptions...\fR?...?
|
||||
\fB}\fR
|
||||
|
||||
\fBoo::objdefine \fIobject\fB {\fR
|
||||
\fBproperty \fIpropName\fR ?\fIoptions...\fR? ?\fIpropName\fR ?\fIoptions...\fR?...?
|
||||
\fB}\fR
|
||||
|
||||
\fIobjectName \fBconfigure\fR
|
||||
\fIobjectName \fBconfigure\fR \fI\-prop\fR
|
||||
\fIobjectName \fBconfigure\fR \fI\-prop value\fR ?\fI\-prop value\fR...
|
||||
.fi
|
||||
.SH "CLASS HIERARCHY"
|
||||
.nf
|
||||
\fBoo::object\fR
|
||||
\(-> \fBoo::class\fR
|
||||
\(-> \fBoo::configurable\fR
|
||||
|
||||
\fBoo::object\fR
|
||||
\(-> \fBoo::class\fR
|
||||
\(-> \fBoo::configurablesupport::configurable\fR
|
||||
.fi
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Configurable objects are objects that support being configured with a
|
||||
\fBconfigure\fR method. Each of the configurable entities of the object is
|
||||
known as a property of the object. Properties may be defined on classes or
|
||||
instances; when configuring an object, any of the properties defined by its
|
||||
classes (direct or indirect) or by the instance itself may be configured.
|
||||
.PP
|
||||
The \fBoo::configurable\fR metaclass installs basic support for making
|
||||
configurable objects into a class. This consists of making a \fBproperty\fR
|
||||
definition command available in definition scripts for the class and instances
|
||||
(e.g., from the class's constructor, within \fBoo::define\fR and within
|
||||
\fBoo::objdefine\fR) and making a \fBconfigure\fR method available within the
|
||||
instances.
|
||||
.SS "CONFIGURE METHOD"
|
||||
.PP
|
||||
The behavior of the \fBconfigure\fR method is modelled after the
|
||||
\fBfconfigure\fR/\fBchan configure\fR command.
|
||||
.PP
|
||||
If passed no additional arguments, the \fBconfigure\fR method returns an
|
||||
alphabetically sorted dictionary of all \fIreadable\fR and \fIread-write\fR
|
||||
properties and their current values.
|
||||
.PP
|
||||
If passed a single additional argument, that argument to the \fBconfigure\fR
|
||||
method must be the name of a property to read (or an unambiguous prefix
|
||||
thereof); its value is returned.
|
||||
.PP
|
||||
Otherwise, if passed an even number of arguments then each pair of arguments
|
||||
specifies a property name (or an unambiguous prefix thereof) and the value to
|
||||
set it to. The properties will be set in the order specified, including
|
||||
duplicates. If the setting of any property fails, the overall \fBconfigure\fR
|
||||
method fails, the preceding pairs (if any) will continue to have been applied,
|
||||
and the succeeding pairs (if any) will be not applied. On success, the result
|
||||
of the \fBconfigure\fR method in this mode operation will be an empty string.
|
||||
.SS "PROPERTY DEFINITIONS"
|
||||
.PP
|
||||
When a class has been manufactured by the \fBoo::configurable\fR metaclass (or
|
||||
one of its subclasses), it gains an extra definition, \fBproperty\fR. The
|
||||
\fBproperty\fR definition defines one or more properties that will be exposed
|
||||
by the class's instances.
|
||||
.PP
|
||||
The \fBproperty\fR command takes the name of a property to define first,
|
||||
\fIwithout a leading hyphen\fR, followed by a number of option-value pairs
|
||||
that modify the basic behavior of the property. This can then be followed by
|
||||
an arbitrary number of other property definitions. The supported options are:
|
||||
.TP
|
||||
\fB\-get \fIgetterScript\fR
|
||||
.
|
||||
This defines the implementation of how to read from the property; the
|
||||
\fIgetterScript\fR will become the body of a method (taking no arguments)
|
||||
defined on the class, if the kind of the property is such that the property
|
||||
can be read from. The method will be named
|
||||
\fB<ReadProp-\fIpropertyName\fB>\fR, and will default to being a simple read
|
||||
of the instance variable with the same name as the property (e.g.,
|
||||
.QW "\fBproperty\fR xyz"
|
||||
will result in a method
|
||||
.QW <ReadProp-xyz>
|
||||
being created).
|
||||
.TP
|
||||
\fB\-kind \fIpropertyKind\fR
|
||||
.
|
||||
This defines what sort of property is being created. The \fIpropertyKind\fR
|
||||
must be exactly one of \fBreadable\fR, \fBwritable\fR, or \fBreadwrite\fR
|
||||
(which is the default) which will make the property read-only, write-only or
|
||||
read-write, respectively. Read-only properties can only ever be read from,
|
||||
write-only properties can only ever be written to, and read-write properties
|
||||
can be both read and written.
|
||||
.RS
|
||||
.PP
|
||||
Note that write-only properties are not particularly discoverable as they are
|
||||
never reported by the \fBconfigure\fR method other than by error messages when
|
||||
attempting to write to a property that does not exist.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-set \fIsetterScript\fR
|
||||
.
|
||||
This defines the implementation of how to write to the property; the
|
||||
\fIsetterScript\fR will become the body of a method taking a single argument,
|
||||
\fIvalue\fR, defined on the class, if the kind of the property is such that
|
||||
the property can be written to. The method will be named
|
||||
\fB<WriteProp-\fIpropertyName\fB>\fR, and will default to being a simple write
|
||||
of the instance variable with the same name as the property (e.g.,
|
||||
.QW "\fBproperty\fR xyz"
|
||||
will result in a method
|
||||
.QW <WriteProp-xyz>
|
||||
being created).
|
||||
.PP
|
||||
Instances of the class that was created by \fBoo::configurable\fR will also
|
||||
support \fBproperty\fR definitions; the semantics will be exactly as above
|
||||
except that the properties will be defined on the instance alone.
|
||||
.PP
|
||||
Note that the property implementation methods that \fBproperty\fR defines
|
||||
should not be private, as this makes them inaccessible from the implementation
|
||||
of \fBconfigure\fR (by design; the property configuration mechanism is
|
||||
intended for use mainly from outside a class, whereas a class may access
|
||||
variables directly). The variables accessed by the default implementations of
|
||||
the properties \fImay\fR be private, if so declared.
|
||||
.SH "ADVANCED USAGE"
|
||||
.PP
|
||||
The configurable class system is comprised of several pieces. The
|
||||
\fBoo::configurable\fR metaclass works by mixing in a class and setting
|
||||
definition namespaces during object creation that provide the other bits and
|
||||
pieces of machinery. The key pieces of the implementation are enumerated here
|
||||
so that they can be used by other code:
|
||||
.TP
|
||||
\fBoo::configuresupport::configurable\fR
|
||||
.
|
||||
This is a class that provides the implementation of the \fBconfigure\fR method
|
||||
(described above in \fBCONFIGURE METHOD\fR).
|
||||
.TP
|
||||
\fBoo::configuresupport::configurableclass\fR
|
||||
.
|
||||
This is a namespace that contains the definition dialect that provides the
|
||||
\fBproperty\fR declaration for use in classes (i.e., via \fBoo::define\fR, and
|
||||
class constructors under normal circumstances), as described above in
|
||||
\fBPROPERTY DEFINITIONS\fR. It \fBnamespace export\fRs its \fBproperty\fR
|
||||
command so that it may be used easily in user definition dialects.
|
||||
.TP
|
||||
\fBoo::configuresupport::configurableobject\fR
|
||||
.
|
||||
This is a namespace that contains the definition dialect that provides the
|
||||
\fBproperty\fR declaration for use in instance objects (i.e., via
|
||||
\fBoo::objdefine\fR, and the \fBself\fR declaration in \fBoo::define\fR), as
|
||||
described above in \fBPROPERTY DEFINITIONS\fR. It \fBnamespace export\fRs its
|
||||
\fBproperty\fR command so that it may be used easily in user definition
|
||||
dialects.
|
||||
.PP
|
||||
The underlying property discovery mechanism relies on four slots (see
|
||||
\fBoo::define\fR for what that implies) that list the properties that can be
|
||||
configured. These slots do not themselves impose any semantics on what the
|
||||
slots mean other than that they have unique names, no important order, can be
|
||||
inherited and discovered on classes and instances.
|
||||
.PP
|
||||
These slots, and their intended semantics, are:
|
||||
.TP
|
||||
\fBoo::configuresupport::readableproperties\fR
|
||||
.
|
||||
The set of properties of a class (not including those from its superclasses)
|
||||
that may be read from when configuring an instance of the class. This slot can
|
||||
also be read with the \fBinfo class properties\fR command.
|
||||
.TP
|
||||
\fBoo::configuresupport::writableproperties\fR
|
||||
.
|
||||
The set of properties of a class (not including those from its superclasses)
|
||||
that may be written to when configuring an instance of the class. This slot
|
||||
can also be read with the \fBinfo class properties\fR command.
|
||||
.TP
|
||||
\fBoo::configuresupport::objreadableproperties\fR
|
||||
.
|
||||
The set of properties of an object instance (not including those from its
|
||||
classes) that may be read from when configuring the object. This slot can
|
||||
also be read with the \fBinfo object properties\fR command.
|
||||
.TP
|
||||
\fBoo::configuresupport::objwritableproperties\fR
|
||||
.
|
||||
The set of properties of an object instance (not including those from its
|
||||
classes) that may be written to when configuring the object. This slot can
|
||||
also be read with the \fBinfo object properties\fR command.
|
||||
.PP
|
||||
Note that though these are slots, they are \fInot\fR in the standard
|
||||
\fBoo::define\fR or \fBoo::objdefine\fR namespaces; in order to use them
|
||||
inside a definition script, they need to be referred to by full name. This is
|
||||
because they are intended to be building bricks of configurable property
|
||||
system, and not directly used by normal user code.
|
||||
.SS "IMPLEMENTATION NOTE"
|
||||
.PP
|
||||
The implementation of the \fBconfigure\fR method uses
|
||||
\fBinfo object properties\fR with the \fB\-all\fR option to discover what
|
||||
properties it may manipulate.
|
||||
.SH EXAMPLES
|
||||
.PP
|
||||
Here we create a simple configurable class and demonstrate how it can be
|
||||
configured:
|
||||
.PP
|
||||
.CS
|
||||
\fBoo::configurable\fR create Point {
|
||||
\fBproperty\fR x y
|
||||
constructor args {
|
||||
my \fBconfigure\fR -x 0 -y 0 {*}$args
|
||||
}
|
||||
variable x y
|
||||
method print {} {
|
||||
puts "x=$x, y=$y"
|
||||
}
|
||||
}
|
||||
|
||||
set pt [Point new -x 27]
|
||||
$pt print; \fI# x=27, y=0\fR
|
||||
$pt \fBconfigure\fR -y 42
|
||||
$pt print; \fI# x=27, y=42\fR
|
||||
puts "distance from origin: [expr {
|
||||
hypot([$pt \fBconfigure\fR -x], [$pt \fBconfigure\fR -y])
|
||||
}]"; \fI# distance from origin: 49.92995093127971\fR
|
||||
puts [$pt \fBconfigure\fR]
|
||||
\fI# -x 27 -y 42\fR
|
||||
.CE
|
||||
.PP
|
||||
Such a configurable class can be extended by subclassing, though the subclass
|
||||
needs to also be created by \fBoo::configurable\fR if it will use the
|
||||
\fBproperty\fR definition:
|
||||
.PP
|
||||
.CS
|
||||
\fBoo::configurable\fR create Point3D {
|
||||
superclass Point
|
||||
\fBproperty\fR z
|
||||
constructor args {
|
||||
next -z 0 {*}$args
|
||||
}
|
||||
}
|
||||
|
||||
set pt2 [Point3D new -x 2 -y 3 -z 4]
|
||||
puts [$pt2 \fBconfigure\fR]
|
||||
\fI# -x 2 -y 3 -z 4\fR
|
||||
.CE
|
||||
.PP
|
||||
Once you have a configurable class, you can also add instance properties to
|
||||
it. (The backing variables for all properties start unset.) Note below that we
|
||||
are using an unambiguous prefix of a property name when setting it; this is
|
||||
supported for all properties though full names are normally recommended
|
||||
because subclasses will not make an unambiguous prefix become ambiguous in
|
||||
that case.
|
||||
.PP
|
||||
.CS
|
||||
oo::objdefine $pt {
|
||||
\fBproperty\fR color
|
||||
}
|
||||
$pt \fBconfigure\fR -c bisque
|
||||
puts [$pt \fBconfigure\fR]
|
||||
\fI# -color bisque -x 27 -y 42\fR
|
||||
.CE
|
||||
.PP
|
||||
You can also do derived properties by making them read-only and supplying a
|
||||
script that computes them.
|
||||
.PP
|
||||
.CS
|
||||
\fBoo::configurable\fR create PointMk2 {
|
||||
\fBproperty\fR x y
|
||||
\fBproperty\fR distance -kind readable -get {
|
||||
return [expr {hypot($x, $y)}]
|
||||
}
|
||||
variable x y
|
||||
constructor args {
|
||||
my \fBconfigure\fR -x 0 -y 0 {*}$args
|
||||
}
|
||||
}
|
||||
|
||||
set pt3 [PointMk2 new -x 3 -y 4]
|
||||
puts [$pt3 \fBconfigure\fR -distance]
|
||||
\fI# 5.0\fR
|
||||
$pt3 \fBconfigure\fR -distance 10
|
||||
\fI# ERROR: bad property "-distance": must be -x or -y\fR
|
||||
.CE
|
||||
.PP
|
||||
Setters are used to validate the type of a property:
|
||||
.PP
|
||||
.CS
|
||||
\fBoo::configurable\fR create PointMk3 {
|
||||
\fBproperty\fR x -set {
|
||||
if {![string is double -strict $value]} {
|
||||
error "-x property must be a number"
|
||||
}
|
||||
set x $value
|
||||
}
|
||||
\fBproperty\fR y -set {
|
||||
if {![string is double -strict $value]} {
|
||||
error "-y property must be a number"
|
||||
}
|
||||
set y $value
|
||||
}
|
||||
variable x y
|
||||
constructor args {
|
||||
my \fBconfigure\fR -x 0 -y 0 {*}$args
|
||||
}
|
||||
}
|
||||
|
||||
set pt4 [PointMk3 new]
|
||||
puts [$pt4 \fBconfigure\fR]
|
||||
\fI# -x 0 -y 0\fR
|
||||
$pt4 \fBconfigure\fR -x 3 -y 4
|
||||
puts [$pt4 \fBconfigure\fR]
|
||||
\fI# -x 3 -y 4\fR
|
||||
$pt4 \fBconfigure\fR -x "obviously not a number"
|
||||
\fI# ERROR: -x property must be a number\fR
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
info(n), oo::class(n), oo::define(n)
|
||||
.SH KEYWORDS
|
||||
class, object, properties, configuration
|
||||
.\" Local variables:
|
||||
.\" mode: nroff
|
||||
.\" fill-column: 78
|
||||
.\" End:
|
||||
@@ -493,6 +493,12 @@ the slot:
|
||||
.
|
||||
This appends the given \fImember\fR elements to the slot definition.
|
||||
.TP
|
||||
\fIslot\fR \fB\-appendifnew\fR ?\fImember ...\fR?
|
||||
.VS TIP558
|
||||
This appends the given \fImember\fR elements to the slot definition if they
|
||||
do not already exist.
|
||||
.VE TIP558
|
||||
.TP
|
||||
\fIslot\fR \fB\-clear\fR
|
||||
.
|
||||
This sets the slot definition to the empty list.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -119,6 +119,22 @@ Volume-relative path to a file \fBfoo\fR in the root directory of the current
|
||||
volume. This is not a valid UNC path, so the assumption is that the
|
||||
extra backslashes are superfluous.
|
||||
.RE
|
||||
.SH "TILDE SUBSTITUTION"
|
||||
.PP
|
||||
Unlike earlier versions of Tcl, Tcl 9 does not do implicit tilde substitution
|
||||
on file paths with the exception noted below. The commands \fBfile home\fR and
|
||||
\fBfile tildeexpand\fR may be used to explicitly accomplish the same.
|
||||
.PP
|
||||
The exception to the above is initialization of the \fBauto_path\fR variable
|
||||
and the Tcl module search paths as documented in the manpages for
|
||||
\fBtclvars\fR and \fBtm\fR. When any path in an environment variable used to
|
||||
initialize these starts with a tilde, it will be interpreted as if the first
|
||||
element is replaced with the location of the home directory for the given
|
||||
user. If the tilde is followed immediately by a separator, the
|
||||
\fB$HOME\fR environment variable is substituted. Otherwise the characters
|
||||
between the tilde and the next separator are taken as a user name, which is
|
||||
used to retrieve the user's home directory for substitution. This works on
|
||||
POSIX, MacOS X and Windows platforms.
|
||||
.SH "PORTABILITY ISSUES"
|
||||
.PP
|
||||
Not all file systems are case sensitive, so scripts should avoid code
|
||||
|
||||
+48
-1
@@ -172,7 +172,7 @@ The body of a script provided to \fBeval\fR or \fBuplevel\fR.
|
||||
.TP
|
||||
\fBprecompiled\fR\0\0\0\0\0\0\0\0
|
||||
.
|
||||
A pre-compiled script (loadable by the package
|
||||
A precompiled script (loadable by the package
|
||||
\fBtbcload\fR), and no further information is available.
|
||||
.RE
|
||||
.TP
|
||||
@@ -490,6 +490,29 @@ be discovered with \fBinfo class forward\fR.
|
||||
This subcommand returns a list of all classes that have been mixed into the
|
||||
class named \fIclass\fR.
|
||||
.TP
|
||||
\fBinfo class properties\fI class\fR ?\fIoptions...\fR
|
||||
.VS "TIP 558"
|
||||
This subcommand returns a sorted list of properties defined on the class named
|
||||
\fIclass\fR. The \fIoptions\fR define exactly which properties are returned:
|
||||
.RS
|
||||
.TP
|
||||
\fB\-all\fR
|
||||
.
|
||||
With this option, the properties from the superclasses and mixins of the class
|
||||
are also returned.
|
||||
.TP
|
||||
\fB\-readable\fR
|
||||
.
|
||||
This option (the default behavior) asks for the readable properties to be
|
||||
returned. Only readable or writable properties are returned, not both.
|
||||
.TP
|
||||
\fB\-writable\fR
|
||||
.
|
||||
This option asks for the writable properties to be returned. Only readable or
|
||||
writable properties are returned, not both.
|
||||
.RE
|
||||
.VE "TIP 558"
|
||||
.TP
|
||||
\fBinfo class subclasses\fI class\fR ?\fIpattern\fR?
|
||||
.
|
||||
This subcommand returns a list of direct subclasses of class \fIclass\fR. If
|
||||
@@ -679,6 +702,30 @@ object named \fIobject\fR.
|
||||
This subcommand returns the name of the internal namespace of the object named
|
||||
\fIobject\fR.
|
||||
.TP
|
||||
\fBinfo object properties\fI object\fR ?\fIoptions...\fR
|
||||
.VS "TIP 558"
|
||||
This subcommand returns a sorted list of properties defined on the object
|
||||
named \fIobject\fR. The \fIoptions\fR define exactly which properties are
|
||||
returned:
|
||||
.RS
|
||||
.TP
|
||||
\fB\-all\fR
|
||||
.
|
||||
With this option, the properties from the class, superclasses and mixins of
|
||||
the object are also returned.
|
||||
.TP
|
||||
\fB\-readable\fR
|
||||
.
|
||||
This option (the default behavior) asks for the readable properties to be
|
||||
returned. Only readable or writable properties are returned, not both.
|
||||
.TP
|
||||
\fB\-writable\fR
|
||||
.
|
||||
This option asks for the writable properties to be returned. Only readable or
|
||||
writable properties are returned, not both.
|
||||
.RE
|
||||
.VE "TIP 558"
|
||||
.TP
|
||||
\fBinfo object variables\fI object\fRR ?\fB\-private\fR?
|
||||
.
|
||||
This subcommand returns a list of all variables that have been declared for
|
||||
|
||||
+13
-13
@@ -24,7 +24,7 @@ Arguments \fIfirst\fR and \fIlast\fR are index values specifying the first and
|
||||
last elements of the range to replace. They are interpreted
|
||||
the same as index values for the command \fBstring index\fR,
|
||||
supporting simple index arithmetic and indices relative to the
|
||||
end of the list. The index 0 refers to the first element of the
|
||||
end of the list. The index \fB0\fR refers to the first element of the
|
||||
list, and \fBend\fR refers to the last element of the list.
|
||||
.PP
|
||||
If either \fIfirst\fR or \fIlast\fR is less than zero, it is considered to
|
||||
@@ -49,33 +49,33 @@ between \fIfirst\fR and \fIlast\fR are simply deleted.
|
||||
Prepend to a list.
|
||||
.PP
|
||||
.CS
|
||||
% set lst {c d e f g}
|
||||
c d e f g
|
||||
% ledit lst -1 -1 a b
|
||||
a b c d e f g
|
||||
set lst {c d e f g}
|
||||
\fI\(-> c d e f g\fR
|
||||
\fBledit\fR lst -1 -1 a b
|
||||
\fI\(-> a b c d e f g\fR
|
||||
.CE
|
||||
.PP
|
||||
Append to the list.
|
||||
.PP
|
||||
.CS
|
||||
% ledit lst end+1 end+1 h i
|
||||
a b c d e f g h i
|
||||
\fBledit\fR lst end+1 end+1 h i
|
||||
\fI\(-> a b c d e f g h i\fR
|
||||
.CE
|
||||
.PP
|
||||
Delete third and fourth elements.
|
||||
.PP
|
||||
.CS
|
||||
% ledit lst 2 3
|
||||
a b e f g h i
|
||||
\fBledit\fR lst 2 3
|
||||
\fI\(-> a b e f g h i\fR
|
||||
.CE
|
||||
.PP
|
||||
Replace two elements with three.
|
||||
.PP
|
||||
.CS
|
||||
% ledit lst 2 3 x y z
|
||||
a b x y z g h i
|
||||
% set lst
|
||||
a b x y z g h i
|
||||
\fBledit\fR lst 2 3 x y z
|
||||
\fI\(-> a b x y z g h i\fR
|
||||
set lst
|
||||
\fI\(-> a b x y z g h i\fR
|
||||
.CE
|
||||
.PP
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+114
-3
@@ -58,6 +58,7 @@ the auto-load mechanism defined below.
|
||||
The following procedures are provided in the Tcl library:
|
||||
.TP
|
||||
\fBauto_execok \fIcmd\fR
|
||||
.
|
||||
Determines whether there is an executable file or shell builtin
|
||||
by the name \fIcmd\fR. If so, it returns a list of arguments to be
|
||||
passed to \fBexec\fR to execute the executable file or shell builtin
|
||||
@@ -70,8 +71,30 @@ remembers information about previous searches in an array named
|
||||
\fBauto_execs\fR; this avoids the path search in future calls for the
|
||||
same \fIcmd\fR. The command \fBauto_reset\fR may be used to force
|
||||
\fBauto_execok\fR to forget its cached information.
|
||||
.RS
|
||||
.PP
|
||||
For example, to run the \fIumask\fR shell builtin on Linux, you would do:
|
||||
.PP
|
||||
.CS
|
||||
exec {*}[\fBauto_execok\fR umask]
|
||||
.CE
|
||||
.PP
|
||||
To run the \fIDIR\fR shell builtin on Windows, you would do:
|
||||
.PP
|
||||
.CS
|
||||
exec {*}[\fBauto_execok\fR dir]
|
||||
.CE
|
||||
.PP
|
||||
To discover if there is a \fIfrobnicate\fR binary on the user's PATH,
|
||||
you would do:
|
||||
.PP
|
||||
.CS
|
||||
set mayFrob [expr {[llength [\fBauto_execok\fR frobnicate]] > 0}]
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
\fBauto_import \fIpattern\fR
|
||||
.
|
||||
\fBAuto_import\fR is invoked during \fBnamespace import\fR to see if
|
||||
the imported commands specified by \fIpattern\fR reside in an
|
||||
autoloaded library. If so, the commands are loaded so that they will
|
||||
@@ -79,13 +102,18 @@ be available to the interpreter for creating the import links. If the
|
||||
commands do not reside in an autoloaded library, \fBauto_import\fR
|
||||
does nothing. The pattern matching is performed according to the
|
||||
matching rules of \fBnamespace import\fR.
|
||||
.RS
|
||||
.PP
|
||||
It is not normally necessary to call this command directly.
|
||||
.RE
|
||||
.TP
|
||||
\fBauto_load \fIcmd\fR
|
||||
.
|
||||
This command attempts to load the definition for a Tcl command named
|
||||
\fIcmd\fR. To do this, it searches an \fIauto-load path\fR, which is
|
||||
a list of one or more directories. The auto-load path is given by the
|
||||
global variable \fBauto_path\fR if it exists. If there is no
|
||||
\fBauto_path\fR variable, then the TCLLIBPATH environment variable is
|
||||
\fBauto_path\fR variable, then the \fBTCLLIBPATH\fR environment variable is
|
||||
used, if it exists. Otherwise the auto-load path consists of just the
|
||||
Tcl library directory. Within each directory in the auto-load path
|
||||
there must be a file \fBtclIndex\fR that describes one or more
|
||||
@@ -104,6 +132,11 @@ the array \fBauto_index\fR; future calls to \fBauto_load\fR check for
|
||||
cached index information may be deleted with the command
|
||||
\fBauto_reset\fR. This will force the next \fBauto_load\fR command to
|
||||
reload the index database from disk.
|
||||
.RS
|
||||
.PP
|
||||
It is not normally necessary to call this command directly; the
|
||||
default \fBunknown\fR handler will do so.
|
||||
.RE
|
||||
.TP
|
||||
\fBauto_mkindex \fIdir pattern pattern ...\fR
|
||||
.
|
||||
@@ -156,6 +189,7 @@ listed in the auto-load index, so that fresh copies of them will be
|
||||
loaded the next time that they are used.
|
||||
.TP
|
||||
\fBauto_qualify \fIcommand namespace\fR
|
||||
.
|
||||
Computes a list of fully qualified names for \fIcommand\fR. This list
|
||||
mirrors the path a standard Tcl interpreter follows for command
|
||||
lookups: first it looks for the command in the current namespace, and
|
||||
@@ -175,6 +209,7 @@ performing the actual auto-loading of functions at runtime.
|
||||
.RE
|
||||
.TP
|
||||
\fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR
|
||||
.
|
||||
This is a standard search procedure for use by extensions during
|
||||
their initialization. They call this procedure to look for their
|
||||
script library in several standard directories.
|
||||
@@ -197,14 +232,28 @@ relative to the executable file in the current build tree;
|
||||
relative to the executable file in a parallel build tree.
|
||||
.TP
|
||||
\fBparray \fIarrayName\fR ?\fIpattern\fR?
|
||||
.
|
||||
Prints on standard output the names and values of all the elements in the
|
||||
array \fIarrayName\fR, or just the names that match \fIpattern\fR (using the
|
||||
matching rules of \fBstring match\fR) and their values if \fIpattern\fR is
|
||||
given.
|
||||
\fIArrayName\fR must be an array accessible to the caller of \fBparray\fR.
|
||||
It may be either local or global.
|
||||
The result of this command is the empty string.
|
||||
.RS
|
||||
.PP
|
||||
For example, to print the contents of the \fBtcl_platform\fR array, do:
|
||||
.PP
|
||||
.CS
|
||||
\fBparray\fR tcl_platform
|
||||
.CE
|
||||
.RE
|
||||
.SS "WORD BOUNDARY HELPERS"
|
||||
.PP
|
||||
These procedures are mainly used internally by Tk.
|
||||
.TP
|
||||
\fBtcl_endOfWord \fIstr start\fR
|
||||
.
|
||||
Returns the index of the first end-of-word location that occurs after
|
||||
a starting index \fIstart\fR in the string \fIstr\fR. An end-of-word
|
||||
location is defined to be the first non-word character following the
|
||||
@@ -215,19 +264,35 @@ for more details on how Tcl determines which characters are word
|
||||
characters.
|
||||
.TP
|
||||
\fBtcl_startOfNextWord \fIstr start\fR
|
||||
.
|
||||
Returns the index of the first start-of-word location that occurs
|
||||
after a starting index \fIstart\fR in the string \fIstr\fR. A
|
||||
start-of-word location is defined to be the first word character
|
||||
following a non-word character. Returns \-1 if there are no more
|
||||
start-of-word locations after the starting point.
|
||||
.RS
|
||||
.PP
|
||||
For example, to print the indices of the starts of each word in a
|
||||
string according to platform rules:
|
||||
.PP
|
||||
.CS
|
||||
set theString "The quick brown fox"
|
||||
for {set idx 0} {$idx >= 0} {
|
||||
set idx [\fBtcl_startOfNextWord\fR $theString $idx]} {
|
||||
puts "Word start index: $idx"
|
||||
}
|
||||
.CE
|
||||
.RE
|
||||
.TP
|
||||
\fBtcl_startOfPreviousWord \fIstr start\fR
|
||||
.
|
||||
Returns the index of the first start-of-word location that occurs
|
||||
before a starting index \fIstart\fR in the string \fIstr\fR. Returns
|
||||
\-1 if there are no more start-of-word locations before the starting
|
||||
point.
|
||||
.TP
|
||||
\fBtcl_wordBreakAfter \fIstr start\fR
|
||||
.
|
||||
Returns the index of the first word boundary after the starting index
|
||||
\fIstart\fR in the string \fIstr\fR. Returns \-1 if there are no more
|
||||
boundaries after the starting point in the given string. The index
|
||||
@@ -235,6 +300,7 @@ returned refers to the second character of the pair that comprises a
|
||||
boundary.
|
||||
.TP
|
||||
\fBtcl_wordBreakBefore \fIstr start\fR
|
||||
.
|
||||
Returns the index of the first word boundary before the starting index
|
||||
\fIstart\fR in the string \fIstr\fR. Returns \-1 if there are no more
|
||||
boundaries before the starting point in the given string. The index
|
||||
@@ -248,18 +314,30 @@ commands and packages, and determining what are words.
|
||||
.SS "AUTOLOADING AND PACKAGE MANAGEMENT VARIABLES"
|
||||
.TP
|
||||
\fBauto_execs\fR
|
||||
.
|
||||
Used by \fBauto_execok\fR to record information about whether
|
||||
particular commands exist as executable files.
|
||||
.RS
|
||||
.PP
|
||||
Not normally usefully accessed directly by user code.
|
||||
.RE
|
||||
.TP
|
||||
\fBauto_index\fR
|
||||
.
|
||||
Used by \fBauto_load\fR to save the index information read from
|
||||
disk.
|
||||
.RS
|
||||
.PP
|
||||
Not normally usefully accessed directly by user code.
|
||||
.RE
|
||||
.TP
|
||||
\fBauto_noexec\fR
|
||||
.
|
||||
If set to any value, then \fBunknown\fR will not attempt to auto-exec
|
||||
any commands.
|
||||
.TP
|
||||
\fBauto_noload\fR
|
||||
.
|
||||
If set to any value, then \fBunknown\fR will not attempt to auto-load
|
||||
any commands.
|
||||
.TP
|
||||
@@ -275,37 +353,70 @@ the parent directory of \fBtcl_library\fR,
|
||||
the directories listed in the \fBtcl_pkgPath\fR variable.
|
||||
Additional locations to look for files and package indices should
|
||||
normally be added to this variable using \fBlappend\fR.
|
||||
.RS
|
||||
.PP
|
||||
For example, to add the \fIlib\fR directory next to the running
|
||||
script, you would do:
|
||||
.PP
|
||||
.CS
|
||||
lappend \fBauto_path\fR [file dirname [info script]]/lib
|
||||
.CE
|
||||
.PP
|
||||
Note that if the script uses \fBcd\fR, it is advisable to ensure that
|
||||
entries on the \fBauto_path\fR are \fBfile normalize\fRd.
|
||||
.RE
|
||||
.TP
|
||||
\fBenv(TCL_LIBRARY)\fR
|
||||
.
|
||||
If set, then it specifies the location of the directory containing
|
||||
library scripts (the value of this variable will be
|
||||
assigned to the \fBtcl_library\fR variable and therefore returned by
|
||||
the command \fBinfo library\fR). If this variable is not set then
|
||||
a default value is used.
|
||||
.RS
|
||||
.PP
|
||||
Use of this environment variable is not recommended outside of testing.
|
||||
Tcl installations should already know where to find their own script
|
||||
files, as the value is baked in during the build or installation.
|
||||
.RE
|
||||
.TP
|
||||
\fBenv(TCLLIBPATH)\fR
|
||||
.
|
||||
If set, then it must contain a valid Tcl list giving directories to
|
||||
search during auto-load operations. Directories must be specified in
|
||||
Tcl format, using
|
||||
.QW /
|
||||
as the path separator, regardless of platform.
|
||||
This variable is only used when initializing the \fBauto_path\fR variable.
|
||||
.RS
|
||||
.PP
|
||||
A key consequence of this variable is that it gives a way to let the user
|
||||
of a script specify the list of places where that script may use
|
||||
\fBpackage require\fR to read packages from. It is not normally usefully
|
||||
settable within a Tcl script itself \fIexcept\fR to influence where other
|
||||
interpreters load from (whether made with \fBinterp create\fR or launched
|
||||
as their own threads or subprocesses).
|
||||
.RE
|
||||
.SS "WORD BOUNDARY DETERMINATION VARIABLES"
|
||||
These variables are only used in the \fBtcl_endOfWord\fR,
|
||||
\fBtcl_startOfNextWord\fR, \fBtcl_startOfPreviousWord\fR,
|
||||
\fBtcl_wordBreakAfter\fR, and \fBtcl_wordBreakBefore\fR commands.
|
||||
.TP
|
||||
\fBtcl_nonwordchars\fR
|
||||
.
|
||||
This variable contains a regular expression that is used by routines
|
||||
like \fBtcl_endOfWord\fR to identify whether a character is part of a
|
||||
word or not. If the pattern matches a character, the character is
|
||||
considered to be a non-word character. The default is "\\W".
|
||||
considered to be a non-word character. The default value is
|
||||
.QW "\\W" .
|
||||
.TP
|
||||
\fBtcl_wordchars\fR
|
||||
.
|
||||
This variable contains a regular expression that is used by routines
|
||||
like \fBtcl_endOfWord\fR to identify whether a character is part of a
|
||||
word or not. If the pattern matches a character, the character is
|
||||
considered to be a word character. The default is "\\w".
|
||||
considered to be a word character. The default value is
|
||||
.QW "\\w" .
|
||||
.SH "SEE ALSO"
|
||||
env(n), info(n), re_syntax(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+7
-7
@@ -52,11 +52,11 @@ oo::class create ABC {
|
||||
|
||||
constructor {} {
|
||||
\fBlink\fR Foo
|
||||
# The method foo is now directly accessible as foo here
|
||||
# The method Foo is now directly accessible as Foo here
|
||||
\fBlink\fR {bar Foo}
|
||||
# The method foo is now directly accessible as bar
|
||||
# The method Foo is now directly accessible as bar
|
||||
\fBlink\fR {::ExternalCall Foo}
|
||||
# The method foo is now directly accessible in the global
|
||||
# The method Foo is now directly accessible in the global
|
||||
# namespace as ExternalCall
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@ oo::class create ABC {
|
||||
ABC create abc
|
||||
abc grill
|
||||
\fI\(-> Step 1:\fR
|
||||
\fI\(-> This is foo in ::abc\fR
|
||||
\fI\(-> This is Foo in ::abc\fR
|
||||
\fI\(-> Step 2:\fR
|
||||
\fI\(-> This is foo in ::abc\fR
|
||||
\fI\(-> This is Foo in ::abc\fR
|
||||
# Direct access via the linked command
|
||||
puts "Step 3:"; ExternalCall
|
||||
\fI\(-> Step 3:\fR
|
||||
\fI\(-> This is foo in ::abc\fR
|
||||
\fI\(-> This is Foo in ::abc\fR
|
||||
.CE
|
||||
.PP
|
||||
This example shows that multiple linked commands can be made in a call to
|
||||
@@ -88,7 +88,7 @@ oo::class create Ex {
|
||||
constructor {} {
|
||||
\fBlink\fR a b c
|
||||
# The methods a, b, and c (defined below) are all now
|
||||
# directly acessible within methods under their own names.
|
||||
# directly accessible within methods under their own names.
|
||||
}
|
||||
|
||||
method a {} {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ lremove \- Remove elements from a list by index
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBlremove\fR returns a new list formed by simultaneously removing zero or
|
||||
more elements of \fIlist\fR at each of the indices given by an arbirary number
|
||||
more elements of \fIlist\fR at each of the indices given by an arbitrary number
|
||||
of \fIindex\fR arguments. The indices may be in any order and may be repeated;
|
||||
the element at index will only be removed once. The index values are
|
||||
interpreted the same as index values for the command \fBstring index\fR,
|
||||
|
||||
+86
-50
@@ -11,78 +11,114 @@
|
||||
.SH NAME
|
||||
lseq \- Build a numeric sequence returned as a list
|
||||
.SH SYNOPSIS
|
||||
\fBlseq \fIStart \fR?(\fB..\fR|\fBto\fR)? \fIEnd\fR ??\fBby\fR? \fIStep\fR?
|
||||
\fBlseq \fIstart \fR?(\fB..\fR|\fBto\fR)? \fIend\fR ??\fBby\fR? \fIstep\fR?
|
||||
|
||||
\fBlseq \fIStart \fBcount\fR \fICount\fR ??\fBby\fR? \fIStep\fR?
|
||||
\fBlseq \fIstart \fBcount\fR \fIcount\fR ??\fBby\fR? \fIstep\fR?
|
||||
|
||||
\fBlseq \fICount\fR ?\fBby \fIStep\fR?
|
||||
\fBlseq \fIcount\fR ?\fBby \fIstep\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBlseq\fR command creates a sequence of numeric values using the given
|
||||
parameters \fIStart\fR, \fIEnd\fR, and \fIStep\fR. The \fIoperation\fR
|
||||
argument ".." or "to" defines an inclusive range. The "count" option is used
|
||||
to define a count of the number of elements in the list. The short form with a
|
||||
single count value will create a range from 0 to count-1.
|
||||
parameters \fIstart\fR, \fIend\fR, and \fIstep\fR. The \fIoperation\fR
|
||||
argument "\fB..\fR" or "\fBto\fR" defines the range. The "\fBcount\fR" option
|
||||
is used to define a count of the number of elements in the list. A short form
|
||||
use of the command, with a single count value, will create a range from 0 to
|
||||
count-1.
|
||||
|
||||
The numeric arguments, \fIStart\fR, \fIEnd\fR, \fIStep\fR, and \fICount\fR,
|
||||
can also be a valid expression. the lseq command will evaluate the expression
|
||||
The \fBlseq\fR command can produce both increasing and decreasing
|
||||
sequences. When both \fIstart\fR and \fIend\fR are provided without a
|
||||
\fIstep\fR value, then if \fIstart\fR <= \fIend\fR, the sequence will be
|
||||
increasing and if \fIstart\fR > \fIend\fR it will be decreasing. If a
|
||||
\fIstep\fR vale is included, it's sign should agree with the direction of the
|
||||
sequence (descending -> negative and ascending -> positive), otherwise an
|
||||
empty list is returned. For example:
|
||||
|
||||
.CS \"
|
||||
% \fBlseq\fR 1 to 5 ;# increasing
|
||||
\fI\(-> 1 2 3 4 5
|
||||
|
||||
% \fBlseq\fR 5 to 1 ;# decreasing
|
||||
\fI\(-> 5 4 3 2 1
|
||||
|
||||
% \fBlseq\fR 6 to 1 by 2 ;# decreasing, step wrong sign, empty list
|
||||
|
||||
% \fBlseq\fR 1 to 5 by 0 ;# all step sizes of 0 produce an empty list
|
||||
.\"
|
||||
.CE
|
||||
|
||||
The numeric arguments, \fIstart\fR, \fIend\fR, \fIstep\fR, and \fIcount\fR,
|
||||
may also be a valid expression. The expression will be evaluated and the
|
||||
numeric result will be used. An expression that does not evaluate to a number
|
||||
will produce an invalid argument error.
|
||||
.PP
|
||||
\fIStart\fR defines the initial value and \fIend\fR defines the limit, not
|
||||
necessarily the last value. \fBlseq\fR produces a list with \fIcount\fR
|
||||
elements, and if \fIcount\fR is not supplied, it is computed as
|
||||
|
||||
.CS \"
|
||||
\fIcount\fR = int( (\fIend\fR - \fIstart\fR + \fIstep\fR) / \fIstep\fR )
|
||||
.\"
|
||||
.CE
|
||||
|
||||
.PP
|
||||
The numeric arguments, \fIstart\fR, \fIend\fR, \fIstep\fR, and \fIcount\fR,
|
||||
can also be a valid expression. the \fBlseq\fR command will evaluate the
|
||||
expression (as if with \fBexpr\fR)
|
||||
and use the numeric result, or return an error as with any invalid argument
|
||||
value. A valid expression is a valid [expr] expression, however, the result
|
||||
must be numeric; a non-numeric string will result in an error.
|
||||
value; a non-numeric expression result will result in an error.
|
||||
|
||||
.SH EXAMPLES
|
||||
.CS
|
||||
.\"
|
||||
\fBlseq\fR 3
|
||||
\fI\(-> 0 1 2\fR
|
||||
|
||||
lseq 3
|
||||
\(-> 0 1 2
|
||||
\fBlseq\fR 3 0
|
||||
\fI\(-> 3 2 1 0\fR
|
||||
|
||||
lseq 3 0
|
||||
\(-> 3 2 1 0
|
||||
\fBlseq\fR 10 .. 1 by -2
|
||||
\fI\(-> 10 8 6 4 2\fR
|
||||
|
||||
lseq 10 .. 1 by -2
|
||||
\(-> 10 8 6 4 2
|
||||
set l [\fBlseq\fR 0 -5]
|
||||
\fI\(-> 0 -1 -2 -3 -4 -5\fR
|
||||
|
||||
set l [lseq 0 -5]
|
||||
\(-> 0 -1 -2 -3 -4 -5
|
||||
|
||||
foreach i [lseq [llength $l]] {
|
||||
puts l($i)=[lindex $l $i]
|
||||
}
|
||||
\(-> l(0)=0
|
||||
l(1)=-1
|
||||
l(2)=-2
|
||||
l(3)=-3
|
||||
l(4)=-4
|
||||
l(5)=-5
|
||||
|
||||
foreach i [lseq [llength $l]-1 0] {
|
||||
foreach i [\fBlseq\fR [llength $l]] {
|
||||
puts l($i)=[lindex $l $i]
|
||||
}
|
||||
\(-> l(5)=-5
|
||||
l(4)=-4
|
||||
l(3)=-3
|
||||
l(2)=-2
|
||||
l(1)=-1
|
||||
l(0)=0
|
||||
}
|
||||
\fI\(-> l(0)=0\fR
|
||||
\fI\(-> l(1)=-1\fR
|
||||
\fI\(-> l(2)=-2\fR
|
||||
\fI\(-> l(3)=-3\fR
|
||||
\fI\(-> l(4)=-4\fR
|
||||
\fI\(-> l(5)=-5\fR
|
||||
|
||||
set i 17
|
||||
\(-> 17
|
||||
if {$i in [lseq 0 50]} { # equivalent to: (0 <= $i && $i < 50)
|
||||
puts "Ok"
|
||||
} else {
|
||||
puts "outside :("
|
||||
}
|
||||
\(-> Ok
|
||||
foreach i [\fBlseq\fR {[llength $l]-1} 0] {
|
||||
puts l($i)=[lindex $l $i]
|
||||
}
|
||||
\fI\(-> l(5)=-5\fR
|
||||
\fI\(-> l(4)=-4\fR
|
||||
\fI\(-> l(3)=-3\fR
|
||||
\fI\(-> l(2)=-2\fR
|
||||
\fI\(-> l(1)=-1\fR
|
||||
\fI\(-> l(0)=0\fR
|
||||
|
||||
set sqrs [lmap i [lseq 1 10] {expr $i*$i}]
|
||||
\(-> 1 4 9 16 25 36 49 64 81 100
|
||||
set i 17
|
||||
\fI\(-> 17\fR
|
||||
if {$i in [\fBlseq\fR 0 50]} { # equivalent to: (0 <= $i && $i <= 50)
|
||||
puts "Ok"
|
||||
} else {
|
||||
puts "outside :("
|
||||
}
|
||||
\fI\(-> Ok\fR
|
||||
|
||||
set sqrs [lmap i [\fBlseq\fR 1 10] { expr {$i*$i} }]
|
||||
\fI\(-> 1 4 9 16 25 36 49 64 81 100\fR
|
||||
.\"
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
foreach(n), list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n),
|
||||
llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n),
|
||||
foreach(n), list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n),
|
||||
lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n),
|
||||
lreverse(n), lsearch(n), lset(n), lsort(n)
|
||||
.SH KEYWORDS
|
||||
element, index, list
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ of packets and bytes allocated.
|
||||
.TP
|
||||
\fBmemory init \fR[\fBon\fR|\fBoff\fR]
|
||||
.
|
||||
Turn on or off the pre-initialization of all allocated memory
|
||||
Turn on or off the preinitialization of all allocated memory
|
||||
with bogus bytes. Useful for detecting the use of uninitialized
|
||||
values.
|
||||
.TP
|
||||
|
||||
+1
-1
@@ -161,7 +161,7 @@ this command first finds the matching exported commands.
|
||||
It then checks whether any of those commands
|
||||
were previously imported by the current namespace.
|
||||
If so, this command deletes the corresponding imported commands.
|
||||
In effect, this un-does the action of a \fBnamespace import\fR command.
|
||||
In effect, this undoes the action of a \fBnamespace import\fR command.
|
||||
.TP
|
||||
\fBnamespace import \fR?\fB\-force\fR? ?\fIpattern\fR \fIpattern ...\fR?
|
||||
.
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ forward to the proper implementation of the method (which it does by invoking
|
||||
the \fBnext\fR command as filters are inserted into the front of the method
|
||||
call chain) and is responsible for returning the result of \fBnext\fR.
|
||||
.PP
|
||||
Filters are invoked when processing an invokation of the \fBunknown\fR
|
||||
Filters are invoked when processing an invocation of the \fBunknown\fR
|
||||
method because of a failure to locate a method implementation, but \fInot\fR
|
||||
when invoking either constructors or destructors. (Note however that the
|
||||
\fBdestroy\fR method is a conventional method, and filters are invoked as
|
||||
|
||||
+22
@@ -128,6 +128,28 @@ If a new file is created as part of opening it, \fIpermissions\fR
|
||||
(an integer) is used to set the permissions for the new file in
|
||||
conjunction with the process's file mode creation mask.
|
||||
\fIPermissions\fR defaults to 0666.
|
||||
.PP
|
||||
.VS "8.7, TIP 603"
|
||||
When the file opened is an ordinary disk file, the \fBchan configure\fR and
|
||||
\fBfconfigure\fR commands can be used to query this additional configuration
|
||||
option:
|
||||
.TP
|
||||
\fB\-stat\fR
|
||||
.
|
||||
This option, when read, returns a dictionary of values much as is obtained
|
||||
from the \fBfile stat\fR command, where that stat information relates to the
|
||||
real opened file. Keys in the dictionary may include \fBatime\fR, \fBctime\fR,
|
||||
\fBdev\fR, \fBgid\fR, \fBino\fR, \fBmode\fR, \fBmtime\fR, \fBnlink\fR,
|
||||
\fBsize\fR, \fBtype\fR, and \fBuid\fR among others; the \fBmtime\fR,
|
||||
\fBsize\fR and \fBtype\fR fields are guaranteed to be present and meaningful
|
||||
on all platforms; other keys may be present too.
|
||||
.RS
|
||||
.PP
|
||||
\fIImplementation note:\fR This option maps to a call to \fBfstat()\fR on
|
||||
POSIX platforms, and to a call to \fBGetFileInformationByHandle()\fR on
|
||||
Windows; the information reported is what those system calls produce.
|
||||
.RE
|
||||
.VE "8.7, TIP 603"
|
||||
.SH "COMMAND PIPELINES"
|
||||
.PP
|
||||
If the first character of \fIfileName\fR is
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ it immediately upon \fBpackage require\fR. This is not compatible with
|
||||
the use of \fIauto_reset\fR, and therefore its use is discouraged.
|
||||
.TP 15
|
||||
\fB\-load \fIpkgPat\fR
|
||||
The index process will pre-load any packages that exist in the
|
||||
The index process will preload any packages that exist in the
|
||||
current interpreter and match \fIpkgPat\fR into the child interpreter used to
|
||||
generate the index. The pattern match uses string match rules, but without
|
||||
making case distinctions.
|
||||
|
||||
+14
-1
@@ -11,7 +11,20 @@
|
||||
.SH NAME
|
||||
refchan \- command handler API of reflected channels
|
||||
.SH SYNOPSIS
|
||||
\fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR?
|
||||
.nf
|
||||
\fBchan create \fImode cmdPrefix\fR
|
||||
|
||||
\fIcmdPrefix \fBblocking\fR \fIchannelId mode\fR
|
||||
\fIcmdPrefix \fBcget\fR \fIchannelId option\fR
|
||||
\fIcmdPrefix \fBcgetall\fR \fIchannelId\fR
|
||||
\fIcmdPrefix \fBconfigure\fR \fIchannelId option value\fR
|
||||
\fIcmdPrefix \fBfinalize\fR \fIchannelId\fR
|
||||
\fIcmdPrefix \fBinitialize\fR \fIchannelId mode\fR
|
||||
\fIcmdPrefix \fBread\fR \fIchannelId count\fR
|
||||
\fIcmdPrefix \fBseek\fR \fIchannelId offset base\fR
|
||||
\fIcmdPrefix \fBwatch\fR \fIchannelId eventspec\fR
|
||||
\fIcmdPrefix \fBwrite\fR \fIchannelId data\fR
|
||||
.fi
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -625,14 +625,14 @@ the test suite is being run on a Unix platform.
|
||||
.PP
|
||||
Each \fBtest\fR should include whatever \fB\-constraints\fR are
|
||||
required to constrain it to run only where appropriate. Several
|
||||
constraints are pre-defined in the \fBtcltest\fR package, listed
|
||||
constraints are predefined in the \fBtcltest\fR package, listed
|
||||
below. The registration of user-defined constraints is performed
|
||||
by the \fBtestConstraint\fR command. User-defined constraints
|
||||
may appear within a test file, or within the script specified
|
||||
by the \fBconfigure \-load\fR or \fBconfigure \-loadfile\fR
|
||||
options.
|
||||
.PP
|
||||
The following is a list of constraints pre-defined by the
|
||||
The following is a list of constraints predefined by the
|
||||
\fBtcltest\fR package itself:
|
||||
.TP
|
||||
\fIsingleTestInterp\fR
|
||||
|
||||
@@ -30,6 +30,10 @@ the parent directory of \fBtcl_library\fR,
|
||||
the directories listed in the \fBtcl_pkgPath\fR variable.
|
||||
Additional locations to look for files and package indices should
|
||||
normally be added to this variable using \fBlappend\fR.
|
||||
Initialization of auto_path from the TCLLIBPATH environment
|
||||
variable undergoes tilde substitution (see \fBfilename\fR) on each
|
||||
path. Any tilde substitution that fails because the user is unknown
|
||||
will be omitted from auto_path.
|
||||
.RS
|
||||
.PP
|
||||
Additional variables relating to package management exist. More
|
||||
|
||||
+3
-3
@@ -35,10 +35,10 @@ if \fItime\fR is not specified.
|
||||
.sp
|
||||
The parameter \fImax-count\fR could additionally impose a further restriction
|
||||
by the maximal number of iterations to evaluate the script.
|
||||
If \fImax-count\fR is specified, the evalution will stop either this count of
|
||||
If \fImax-count\fR is specified, the evaluation will stop either this count of
|
||||
iterations is reached or the time is exceeded.
|
||||
.sp
|
||||
It will then return a canonical tcl-list of the form:
|
||||
It will then return a canonical Tcl-list of the form:
|
||||
.PP
|
||||
.CS
|
||||
\fB0.095977 \(mcs/# 52095836 # 10419167 #/sec 5000.000 net-ms\fR
|
||||
@@ -85,7 +85,7 @@ used to measure the cost of \fBTcl_EvalObjEx\fR, of the invocation of canonical
|
||||
lists, and of the uncompiled versions of bytecoded commands.
|
||||
.PP
|
||||
As opposed to the \fBtime\fR commmand, which runs the tested script for a fixed
|
||||
number of iterations, the timerate command runs it for a fixed time.
|
||||
number of iterations, the \fBtimerate\fR command runs it for a fixed time.
|
||||
Additionally, the compiled variant of the script will be used during the entire
|
||||
measurement, as if the script were part of a compiled procedure, if the \fB\-direct\fR
|
||||
option is not specified. The fixed time period and possibility of compilation allow
|
||||
|
||||
@@ -295,6 +295,10 @@ environment variables:
|
||||
\fB$::env(TCL8.1_TM_PATH)\fR \fB$::env(TCL8_1_TM_PATH)\fR
|
||||
\fB$::env(TCL8.0_TM_PATH)\fR \fB$::env(TCL8_0_TM_PATH)\fR
|
||||
.CE
|
||||
.PP
|
||||
Paths initialized from the environment variables undergo tilde
|
||||
substitution (see \fBfilename\fR). Any path whose tilde substitution
|
||||
fails because the user is unknown will be omitted from search paths.
|
||||
.SH "SEE ALSO"
|
||||
package(n), Tcl Improvement Proposal #189
|
||||
.QW "\fITcl Modules\fR"
|
||||
|
||||
+1
-1
@@ -231,7 +231,7 @@ When the trace triggers, three arguments are appended to
|
||||
.PP
|
||||
\fIName1\fR gives the name for the variable being accessed.
|
||||
This is not necessarily the same as the name used in the
|
||||
\fBtrace variable\fR command: the \fBupvar\fR command allows a
|
||||
\fBtrace add variable\fR command: the \fBupvar\fR command allows a
|
||||
procedure to reference a variable under a different name.
|
||||
If the trace was originally set on an array or array element,
|
||||
\fIname2\fR provides which index into the array was affected.
|
||||
|
||||
+12
-1
@@ -11,7 +11,18 @@
|
||||
.SH NAME
|
||||
transchan \- command handler API of channel transforms
|
||||
.SH SYNOPSIS
|
||||
\fBcmdPrefix \fIoption\fR ?\fIarg arg ...\fR?
|
||||
.nf
|
||||
\fBchan push \fIchannelName cmdPrefix\fR
|
||||
|
||||
\fIcmdPrefix \fBclear \fIhandle\fR
|
||||
\fIcmdPrefix \fBdrain \fIhandle\fR
|
||||
\fIcmdPrefix \fBfinalize \fIhandle\fR
|
||||
\fIcmdPrefix \fBflush \fIhandle\fR
|
||||
\fIcmdPrefix \fBinitialize \fIhandle mode\fR
|
||||
\fIcmdPrefix \fBlimit? \fIhandle\fR
|
||||
\fIcmdPrefix \fBread \fIhandle buffer\fR
|
||||
\fIcmdPrefix \fBwrite \fIhandle buffer\fR
|
||||
.fi
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ proc \fIsetByUpvar\fR { name value } {
|
||||
set localVar $value
|
||||
}
|
||||
set originalVar 1
|
||||
trace variable originalVar w \fItraceproc\fR
|
||||
trace add variable originalVar write \fItraceproc\fR
|
||||
\fIsetByUpvar\fR originalVar 2
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+5
-5
@@ -487,7 +487,7 @@ freearc(
|
||||
/*
|
||||
* changearctarget - flip an arc to have a different to state
|
||||
*
|
||||
* Caller must have verified that there is no pre-existing duplicate arc.
|
||||
* Caller must have verified that there is no preexisting duplicate arc.
|
||||
*
|
||||
* Note that because we store arcs in their from state, we can't easily have
|
||||
* a similar changearcsource function.
|
||||
@@ -1515,7 +1515,7 @@ pullback(
|
||||
* Returns 1 if successful (which it always is unless the source is the
|
||||
* start state or we have an internal error), 0 if nothing happened.
|
||||
*
|
||||
* A significant property of this function is that it deletes no pre-existing
|
||||
* A significant property of this function is that it deletes no preexisting
|
||||
* states, and no outarcs of the constraint's from state other than the given
|
||||
* constraint arc. This makes the loops in pullback() safe, at the cost that
|
||||
* we may leave useless states behind. Therefore, we leave it to pullback()
|
||||
@@ -1694,7 +1694,7 @@ pushfwd(
|
||||
* Returns 1 if successful (which it always is unless the destination is the
|
||||
* post state or we have an internal error), 0 if nothing happened.
|
||||
*
|
||||
* A significant property of this function is that it deletes no pre-existing
|
||||
* A significant property of this function is that it deletes no preexisting
|
||||
* states, and no inarcs of the constraint's to state other than the given
|
||||
* constraint arc. This makes the loops in pushfwd() safe, at the cost that
|
||||
* we may leave useless states behind. Therefore, we leave it to pushfwd()
|
||||
@@ -2467,7 +2467,7 @@ breakconstraintloop(struct nfa * nfa, struct state * sinitial)
|
||||
* have multiple redundant arc pathways). Each donemap is a char array
|
||||
* indexed by state number. The donemaps are all of the same size "nstates",
|
||||
* which is nfa->nstates as of the start of the recursion. This is enough to
|
||||
* have entries for all pre-existing states, but *not* entries for clone
|
||||
* have entries for all preexisting states, but *not* entries for clone
|
||||
* states created during the recursion. That's okay since we have no need to
|
||||
* mark those.
|
||||
*
|
||||
@@ -2774,7 +2774,7 @@ markcanreach(
|
||||
- analyze - ascertain potentially-useful facts about an optimized NFA
|
||||
^ static long analyze(struct nfa *);
|
||||
*/
|
||||
static long /* re_info bits to be ORed in */
|
||||
static long /* re_info bits to be OR'ed in */
|
||||
analyze(
|
||||
struct nfa *nfa)
|
||||
{
|
||||
|
||||
+2
-2
@@ -258,10 +258,10 @@ struct state {
|
||||
};
|
||||
|
||||
struct nfa {
|
||||
struct state *pre; /* pre-initial state */
|
||||
struct state *pre; /* preinitial state */
|
||||
struct state *init; /* initial state */
|
||||
struct state *final; /* final state */
|
||||
struct state *post; /* post-final state */
|
||||
struct state *post; /* postfinal state */
|
||||
size_t nstates; /* for numbering states */
|
||||
struct state *states; /* state-chain header */
|
||||
struct state *slast; /* tail of the chain */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user