Compare commits
467
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c18b618a5 | ||
|
|
179e8f4df7 | ||
|
|
2798a075ee | ||
|
|
5429d6aeaf | ||
|
|
1c2958d455 | ||
|
|
d739e9b6a8 | ||
|
|
3788abb994 | ||
|
|
a0c7ff582a | ||
|
|
500a1629c4 | ||
|
|
4c1c62892a | ||
|
|
434a115a3c | ||
|
|
74707353e8 | ||
|
|
dbdd83e5d0 | ||
|
|
538c6791ab | ||
|
|
22a5d73ebf | ||
|
|
820cc5a23d | ||
|
|
f7dfeb706f | ||
|
|
78ef9a971b | ||
|
|
ce6023fade | ||
|
|
4e9742386c | ||
|
|
030a749dc8 | ||
|
|
2f4c1aecdb | ||
|
|
b3291aebaa | ||
|
|
569b59f564 | ||
|
|
1ff54c600e | ||
|
|
1337738c22 | ||
|
|
96b9e6e871 | ||
|
|
52c009322f | ||
|
|
fd54886393 | ||
|
|
016dc0c5f0 | ||
|
|
97ed5b117d | ||
|
|
fbc8feeb40 | ||
|
|
a870464cc5 | ||
|
|
5f392f74b6 | ||
|
|
fef802ea7a | ||
|
|
d7a697aa50 | ||
|
|
9654f8c692 | ||
|
|
7ecdd17b4d | ||
|
|
125b29bfe3 | ||
|
|
c69ccc749e | ||
|
|
f44fb9b450 | ||
|
|
f338047c19 | ||
|
|
335774aef1 | ||
|
|
cb2049e18e | ||
|
|
6457b295e1 | ||
|
|
bf9af9a408 | ||
|
|
b7495e42ca | ||
|
|
7e4b0ec852 | ||
|
|
9db751daeb | ||
|
|
a883ddbe3e | ||
|
|
7e67cf48eb | ||
|
|
4ad4d79d41 | ||
|
|
90d55a9da9 | ||
|
|
983b95bdbd | ||
|
|
394e22ef5d | ||
|
|
140cd14f15 | ||
|
|
5b1614f31a | ||
|
|
c4e867d8dd | ||
|
|
0748314c35 | ||
|
|
f8876cc390 | ||
|
|
86013715f6 | ||
|
|
cee756478e | ||
|
|
2517987176 | ||
|
|
49cd80a29d | ||
|
|
c201290179 | ||
|
|
8c05c20df4 | ||
|
|
3ecac0e0ab | ||
|
|
e4c108f3d7 | ||
|
|
d2c82fc45a | ||
|
|
7c2e55d3fd | ||
|
|
0c78f5bbad | ||
|
|
2e0a0b5305 | ||
|
|
1caba8a761 | ||
|
|
6efd8f71f2 | ||
|
|
e5cf3448bd | ||
|
|
ea29292705 | ||
|
|
d32d625787 | ||
|
|
50ae8fdcf6 | ||
|
|
cb061edef8 | ||
|
|
49aba3d99e | ||
|
|
74357f24f8 | ||
|
|
fca6e38924 | ||
|
|
09446c7544 | ||
|
|
8a4ad6884b | ||
|
|
2021349249 | ||
|
|
e7392a5c22 | ||
|
|
6b0dccd9d5 | ||
|
|
90221ac971 | ||
|
|
e006418946 | ||
|
|
49ebd1264d | ||
|
|
94d07354ce | ||
|
|
2881b5c3df | ||
|
|
e0209e39ea | ||
|
|
e154c51512 | ||
|
|
e1196c53f2 | ||
|
|
56b431c4c2 | ||
|
|
ac4291f473 | ||
|
|
f59c9faee2 | ||
|
|
94c0eede77 | ||
|
|
61a92173cc | ||
|
|
c393791ed5 | ||
|
|
239ba78ee4 | ||
|
|
359b371edd | ||
|
|
67b4e0d544 | ||
|
|
2482413c83 | ||
|
|
de2192ab20 | ||
|
|
7fcc213b7a | ||
|
|
5aceb08fb4 | ||
|
|
1d465c4012 | ||
|
|
cc945fabb7 | ||
|
|
621251ae2e | ||
|
|
13e35220c2 | ||
|
|
45e6ca04f5 | ||
|
|
5719d6ca30 | ||
|
|
58d332cff9 | ||
|
|
1f2c3cb141 | ||
|
|
398efeba2d | ||
|
|
0591917a06 | ||
|
|
bbdb1f12a0 | ||
|
|
fed4d43bd5 | ||
|
|
f9a4d9f781 | ||
|
|
1a664df87f | ||
|
|
77282aad96 | ||
|
|
c9301353fc | ||
|
|
4b7747b505 | ||
|
|
e7a40e1084 | ||
|
|
ee49fa81d9 | ||
|
|
cc4dae5c0f | ||
|
|
3826a26f8a | ||
|
|
045e0f533d | ||
|
|
084fba1d17 | ||
|
|
c414b83e0a | ||
|
|
66dc9d1fbf | ||
|
|
e170502d63 | ||
|
|
71e4ddb74f | ||
|
|
4603752cef | ||
|
|
1795b4118f | ||
|
|
b47bd89d44 | ||
|
|
33201eb14c | ||
|
|
079f1e33dc | ||
|
|
cf341f6a19 | ||
|
|
ce13b82329 | ||
|
|
2afacbce95 | ||
|
|
c8e7bb7653 | ||
|
|
eeebae7172 | ||
|
|
80d62f0547 | ||
|
|
e588745d77 | ||
|
|
b3fc99501e | ||
|
|
c475df7cfb | ||
|
|
51ce0579e8 | ||
|
|
57102e40e9 | ||
|
|
afc4e512cb | ||
|
|
050e383cf2 | ||
|
|
29bbdb74d3 | ||
|
|
2db0464fd9 | ||
|
|
202eeb707c | ||
|
|
2a340ce4c1 | ||
|
|
ae6192f9cb | ||
|
|
4d9ba4a652 | ||
|
|
9ff5b7077a | ||
|
|
351c77bca3 | ||
|
|
c1555b7cfd | ||
|
|
48ed067359 | ||
|
|
7234985a63 | ||
|
|
434c0fa7fb | ||
|
|
3fe69cba13 | ||
|
|
27f230c6bf | ||
|
|
a3204f806c | ||
|
|
be8b7d25f6 | ||
|
|
0bef3861ff | ||
|
|
dc5861414a | ||
|
|
3616fc519b | ||
|
|
bd9f2eb15d | ||
|
|
1dbb35b63b | ||
|
|
5fd49d1907 | ||
|
|
7024801722 | ||
|
|
40dfdbd929 | ||
|
|
0cb6effe14 | ||
|
|
a0c07fcf28 | ||
|
|
221f1bc18e | ||
|
|
c0c1cce296 | ||
|
|
a628ce605f | ||
|
|
3607c177d9 | ||
|
|
e1efe253d2 | ||
|
|
544d338e0e | ||
|
|
a9e916f1b9 | ||
|
|
c908681186 | ||
|
|
3b3a5ff07f | ||
|
|
e239fa05dd | ||
|
|
c5a85dbfdc | ||
|
|
d49ccd64f2 | ||
|
|
2815504547 | ||
|
|
19d052ff26 | ||
|
|
90806d3525 | ||
|
|
24886887f9 | ||
|
|
c0012125d2 | ||
|
|
896002d66a | ||
|
|
4389db676e | ||
|
|
1af6acb542 | ||
|
|
e9ccb8b496 | ||
|
|
8ffa3470bb | ||
|
|
77c0d1662a | ||
|
|
8fa6374b22 | ||
|
|
adb60835f7 | ||
|
|
fb62f4567b | ||
|
|
49e332ded2 | ||
|
|
079887fe42 | ||
|
|
8a227678b2 | ||
|
|
c7c8527ce3 | ||
|
|
1462dc4b66 | ||
|
|
0a2f847ac9 | ||
|
|
cc64de63b9 | ||
|
|
0708073b35 | ||
|
|
f88eecc172 | ||
|
|
f92a2c43b3 | ||
|
|
42ed459018 | ||
|
|
67e505d2ab | ||
|
|
802b562cbf | ||
|
|
5e8c17ac4e | ||
|
|
22ef6f7e0d | ||
|
|
de970528d7 | ||
|
|
2af8b0203e | ||
|
|
3bd15d3a70 | ||
|
|
d67fcf3f9c | ||
|
|
a65e5f86de | ||
|
|
8b268fb161 | ||
|
|
415a0e9de3 | ||
|
|
41765c8938 | ||
|
|
de6b083f58 | ||
|
|
ed8604f566 | ||
|
|
bbcc51539b | ||
|
|
b1dc2099c7 | ||
|
|
89524bf484 | ||
|
|
9b5022802e | ||
|
|
d6ea58f110 | ||
|
|
c53cfa6c6a | ||
|
|
5381389cdd | ||
|
|
e51352557d | ||
|
|
159d4b2635 | ||
|
|
b16fb594ee | ||
|
|
23c0ba0065 | ||
|
|
2ebce7dad7 | ||
|
|
a8960a0876 | ||
|
|
9bd337033d | ||
|
|
cca5a0c27a | ||
|
|
9a51ddaa6e | ||
|
|
25084ac51a | ||
|
|
4c1161c24a | ||
|
|
5a70bbe10b | ||
|
|
43e76a45e9 | ||
|
|
e78b0c8945 | ||
|
|
7cfeb436e4 | ||
|
|
1212cb034f | ||
|
|
6c3fce3382 | ||
|
|
bc2940927e | ||
|
|
5c21b9c7c7 | ||
|
|
2b692ce09c | ||
|
|
d236581f7b | ||
|
|
555cf46f2a | ||
|
|
00a454298c | ||
|
|
fb1a2c58dd | ||
|
|
40ee63b6ff | ||
|
|
38670f6730 | ||
|
|
fd1058d488 | ||
|
|
16ad898a13 | ||
|
|
90fc87af1c | ||
|
|
dc151ef624 | ||
|
|
37143a57b5 | ||
|
|
44b5581c48 | ||
|
|
fde54630a5 | ||
|
|
d72bb516ef | ||
|
|
a316791c49 | ||
|
|
42e84df47a | ||
|
|
abc071c974 | ||
|
|
ee6c9c9f00 | ||
|
|
bc213f0ba3 | ||
|
|
1e4644762a | ||
|
|
2efba704b3 | ||
|
|
fd49860e24 | ||
|
|
e615b54704 | ||
|
|
e2d691eda8 | ||
|
|
16483765ba | ||
|
|
9b461748a0 | ||
|
|
fbc3a63f6c | ||
|
|
f2262dec1c | ||
|
|
506f1152a8 | ||
|
|
33d0dac397 | ||
|
|
4cb3305614 | ||
|
|
029c8634fd | ||
|
|
9fde0d3e5a | ||
|
|
aec96db016 | ||
|
|
e97fab49d3 | ||
|
|
eee33c1731 | ||
|
|
ec7df3f449 | ||
|
|
7b2a90493f | ||
|
|
3304a8bc1e | ||
|
|
d0002e5394 | ||
|
|
3119d45e4c | ||
|
|
f87d2e5bb6 | ||
|
|
ffc62d0068 | ||
|
|
07b7df0b0e | ||
|
|
227c81511f | ||
|
|
bc8b826f65 | ||
|
|
d7890f281b | ||
|
|
3e5f21836f | ||
|
|
7d307a1ae7 | ||
|
|
f989073e0d | ||
|
|
837e136aa6 | ||
|
|
f211f9c476 | ||
|
|
43c2d3e981 | ||
|
|
15a1396579 | ||
|
|
40d62156ac | ||
|
|
df55f87e2d | ||
|
|
dbb5e86cde | ||
|
|
d9dbe7bb1e | ||
|
|
bb9fba63c4 | ||
|
|
33458f6fe4 | ||
|
|
020fdb84f4 | ||
|
|
059410842d | ||
|
|
a13a688507 | ||
|
|
792e537014 | ||
|
|
9a0684671a | ||
|
|
e2e1132eba | ||
|
|
ca5093b1ea | ||
|
|
694ffb7454 | ||
|
|
d28c66ab23 | ||
|
|
d5fb92d9a3 | ||
|
|
6abeee6109 | ||
|
|
3408cb4cab | ||
|
|
3f704efe4e | ||
|
|
7add065e0f | ||
|
|
3f1e1192cb | ||
|
|
a9aed18760 | ||
|
|
50dbacbaf0 | ||
|
|
cebf94f0db | ||
|
|
c8d1b2568b | ||
|
|
f707c50e9d | ||
|
|
6c3864d50e | ||
|
|
2c218563b3 | ||
|
|
0d83fc1704 | ||
|
|
9f2bd1e80f | ||
|
|
c22277cf6a | ||
|
|
2e23e829d9 | ||
|
|
be804ed5e6 | ||
|
|
29704cd895 | ||
|
|
8819aab738 | ||
|
|
aeecfffbb1 | ||
|
|
712675a744 | ||
|
|
53c50e58bf | ||
|
|
5ebe18e5ec | ||
|
|
a56a457941 | ||
|
|
2c83a6f53e | ||
|
|
22da94979e | ||
|
|
17cdd5f2d2 | ||
|
|
188ebe6ceb | ||
|
|
b42de3a4f3 | ||
|
|
f51c126c9d | ||
|
|
9cf82aad7e | ||
|
|
99b30a2b32 | ||
|
|
08b6a144bd | ||
|
|
cf086db3f2 | ||
|
|
90bb5bf23c | ||
|
|
cbfce81f38 | ||
|
|
68e9e6b533 | ||
|
|
6661778d6e | ||
|
|
aec00dd13c | ||
|
|
e51db8046c | ||
|
|
f28ed288b8 | ||
|
|
1dc5de0179 | ||
|
|
0a4081dc57 | ||
|
|
7721fe8b51 | ||
|
|
f324e94785 | ||
|
|
30d0cf44cb | ||
|
|
4a7725e917 | ||
|
|
dcb52d2ea8 | ||
|
|
e29e96a9e1 | ||
|
|
25fa1a3a8c | ||
|
|
6fd2ed3f11 | ||
|
|
0276b6e644 | ||
|
|
3bd8840931 | ||
|
|
36cf99464d | ||
|
|
f19cbcbff5 | ||
|
|
c7039276a0 | ||
|
|
1f136d8cb6 | ||
|
|
a5e1e1f33e | ||
|
|
1bebb796bb | ||
|
|
a19375e928 | ||
|
|
413706af15 | ||
|
|
8370f3e275 | ||
|
|
959413c95a | ||
|
|
325b2f4ade | ||
|
|
83ac8470a0 | ||
|
|
f6b543ae94 | ||
|
|
e9a10d7cda | ||
|
|
dc0adeafb4 | ||
|
|
80bc5b30c2 | ||
|
|
0412f3af19 | ||
|
|
c79a28077f | ||
|
|
6bd1189ac2 | ||
|
|
422d353b0a | ||
|
|
847f2ba0d5 | ||
|
|
cae0944eda | ||
|
|
37f5c2af03 | ||
|
|
95de12dbb4 | ||
|
|
de712c24fb | ||
|
|
26f9497dd4 | ||
|
|
dd1274d805 | ||
|
|
5587ec4f28 | ||
|
|
02e0c5c152 | ||
|
|
c7e456e77d | ||
|
|
e2eaca874e | ||
|
|
4fb87dc8de | ||
|
|
217acf1c4c | ||
|
|
c60bcbe173 | ||
|
|
666e80e5bd | ||
|
|
9597c478f9 | ||
|
|
1575eb36c1 | ||
|
|
b3e0829c50 | ||
|
|
403350cc99 | ||
|
|
a8069e81b7 | ||
|
|
11cd48efa3 | ||
|
|
96c666ffcf | ||
|
|
9b6ba77224 | ||
|
|
1c6910c2ec | ||
|
|
3557938100 | ||
|
|
ffb8dbaeee | ||
|
|
0cffbf8eb7 | ||
|
|
334a96f761 | ||
|
|
50cb73a76e | ||
|
|
35c72808bf | ||
|
|
859eff84db | ||
|
|
38dfb78b4e | ||
|
|
a1db4012d9 | ||
|
|
3f0cb9473b | ||
|
|
2edb721609 | ||
|
|
82abe83414 | ||
|
|
1bf1abb40a | ||
|
|
dd7b94054a | ||
|
|
ea1ff58500 | ||
|
|
9bbbadaa57 | ||
|
|
3c1c246415 | ||
|
|
52d39094e4 | ||
|
|
4aba0742ce | ||
|
|
6f1a0f1c60 | ||
|
|
99359a48d9 | ||
|
|
ef405dbe9c | ||
|
|
ee1f2a2484 | ||
|
|
9e6f2e579a | ||
|
|
ddb07346c0 | ||
|
|
2d8bb440c9 | ||
|
|
a23ee46c67 | ||
|
|
8d9808cb4d | ||
|
|
fa56a98ba9 | ||
|
|
bb95c2d8e9 | ||
|
|
51e67d70c4 | ||
|
|
bdafa7afcb | ||
|
|
51ab423164 | ||
|
|
94ad48ea87 | ||
|
|
99af655c4c | ||
|
|
4085af6b83 | ||
|
|
db9c41f45c | ||
|
|
03fec9c7fe | ||
|
|
06cfc731c6 | ||
|
|
e6dbc77e0e | ||
|
|
d321f40d3b | ||
|
|
b9098ee927 | ||
|
|
0d4a963517 |
@@ -4,7 +4,6 @@ compat/zlib/win64/zdll.lib
|
||||
compat/zlib/win64/zlib1.dll
|
||||
compat/zlib/win64/libz.dll.a
|
||||
compat/zlib/zlib.3.pdf
|
||||
tools/empty.zip
|
||||
*.bmp
|
||||
*.gif
|
||||
*.png
|
||||
@@ -1,19 +0,0 @@
|
||||
compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
|
||||
compat/zlib/contrib/vstudio/readme.txt
|
||||
compat/zlib/contrib/vstudio/*/zlib.rc
|
||||
compat/zlib/win32/*.txt
|
||||
compat/zlib/win64/*.txt
|
||||
libtommath/*.dsp
|
||||
libtommath/*.sln
|
||||
libtommath/*.vcproj
|
||||
tools/tcl.hpj.in
|
||||
tools/tcl.wse.in
|
||||
win/buildall.vc.bat
|
||||
win/coffbase.txt
|
||||
win/makefile.vc
|
||||
win/rules.vc
|
||||
win/rules-ext.vc
|
||||
win/targets.vc
|
||||
win/tcl.dsp
|
||||
win/tcl.dsw
|
||||
win/tcl.hpj.in
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tcl9</name>
|
||||
<name>tcl8</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
|
||||
+1
-1
@@ -1426,7 +1426,7 @@
|
||||
initialization assumptions of the TIP 280 code in CompileWord().
|
||||
|
||||
* generic/tclCompExpr.c: Suppress the attempt to convert to
|
||||
numeric when pre-compiling a constant expresion indicates an error.
|
||||
numeric when pre-compiling a constant expression indicates an error.
|
||||
|
||||
2007-08-22 Miguel Sofer <msofer@users.sf.net>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
README: Tcl
|
||||
This is the Tcl 9.0a0 source distribution.
|
||||
This is the Tcl 8.7a2 source distribution.
|
||||
http://sourceforge.net/projects/tcl/files/Tcl/
|
||||
You can get any source release of Tcl from the URL above.
|
||||
|
||||
@@ -49,7 +49,7 @@ and selling it either in whole or in part. See the file
|
||||
|
||||
Extensive documentation is available at our website.
|
||||
The home page for this release, including new features, is
|
||||
http://www.tcl.tk/software/tcltk/9.0.html
|
||||
http://www.tcl.tk/software/tcltk/8.7.html
|
||||
|
||||
Detailed release notes can be found at the file distributions page
|
||||
by clicking on the relevant version.
|
||||
@@ -61,9 +61,9 @@ Information about Tcl itself can be found at
|
||||
There have been many Tcl books on the market. Many are mentioned in the Wiki:
|
||||
http://wiki.tcl.tk/_/ref?N=25206
|
||||
|
||||
To view the complete set of reference manual entries for Tcl 9.0 online,
|
||||
To view the complete set of reference manual entries for Tcl 8.7 online,
|
||||
visit the URL:
|
||||
http://www.tcl.tk/man/tcl9.0/
|
||||
http://www.tcl.tk/man/tcl8.7/
|
||||
|
||||
2a. Unix Documentation
|
||||
----------------------
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* fixstrtod.c --
|
||||
*
|
||||
* Source code for the "fixstrtod" procedure. This procedure is
|
||||
* used in place of strtod under Solaris 2.4, in order to fix
|
||||
* a bug where the "end" pointer gets set incorrectly.
|
||||
*
|
||||
* Copyright (c) 1995 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 <stdio.h>
|
||||
|
||||
#undef strtod
|
||||
|
||||
/*
|
||||
* Declare strtod explicitly rather than including stdlib.h, since in
|
||||
* somes systems (e.g. SunOS 4.1.4) stdlib.h doesn't declare strtod.
|
||||
*/
|
||||
|
||||
extern double strtod(char *, char **);
|
||||
|
||||
double
|
||||
fixstrtod(
|
||||
char *string,
|
||||
char **endPtr)
|
||||
{
|
||||
double d;
|
||||
d = strtod(string, endPtr);
|
||||
if ((endPtr != NULL) && (*endPtr != string) && ((*endPtr)[-1] == 0)) {
|
||||
*endPtr -= 1;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
+2
-2
@@ -28,7 +28,7 @@ opendir(
|
||||
if ((fd = open(myname, 0, 0)) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
dirp = (DIR *) Tcl_Alloc(sizeof(DIR));
|
||||
dirp = (DIR *) ckalloc(sizeof(DIR));
|
||||
if (dirp == NULL) {
|
||||
/* unreachable? */
|
||||
close(fd);
|
||||
@@ -106,5 +106,5 @@ closedir(
|
||||
close(dirp->dd_fd);
|
||||
dirp->dd_fd = -1;
|
||||
dirp->dd_loc = 0;
|
||||
Tcl_Free(dirp);
|
||||
ckfree(dirp);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ extern char * malloc(unsigned int numBytes);
|
||||
extern void qsort(void *base, int n, int size, int (*compar)(
|
||||
const void *element1, const void *element2));
|
||||
extern char * realloc(char *ptr, unsigned int numBytes);
|
||||
extern double strtod(const char *string, char **endPtr);
|
||||
extern long strtol(const char *string, char **endPtr, int base);
|
||||
extern unsigned long strtoul(const char *string, char **endPtr, int base);
|
||||
|
||||
|
||||
-252
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
* strtod.c --
|
||||
*
|
||||
* Source code for the "strtod" library procedure.
|
||||
*
|
||||
* 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 "tclInt.h"
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
static const int maxExponent = 511; /* Largest possible base 10 exponent. Any
|
||||
* exponent larger than this will already
|
||||
* produce underflow or overflow, so there's
|
||||
* no need to worry about additional digits.
|
||||
*/
|
||||
static const double powersOf10[] = { /* Table giving binary powers of 10. Entry */
|
||||
10., /* is 10^2^i. Used to convert decimal */
|
||||
100., /* exponents into floating-point numbers. */
|
||||
1.0e4,
|
||||
1.0e8,
|
||||
1.0e16,
|
||||
1.0e32,
|
||||
1.0e64,
|
||||
1.0e128,
|
||||
1.0e256
|
||||
};
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* strtod --
|
||||
*
|
||||
* This procedure converts a floating-point number from an ASCII
|
||||
* decimal representation to internal double-precision format.
|
||||
*
|
||||
* Results:
|
||||
* The return value is the double-precision floating-point
|
||||
* representation of the characters in string. If endPtr isn't
|
||||
* NULL, then *endPtr is filled in with the address of the
|
||||
* next character after the last one that was part of the
|
||||
* floating-point number.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
double
|
||||
strtod(
|
||||
const char *string, /* A decimal ASCII floating-point number,
|
||||
* optionally preceded by white space. Must
|
||||
* have form "-I.FE-X", where I is the integer
|
||||
* part of the mantissa, F is the fractional
|
||||
* part of the mantissa, and X is the
|
||||
* exponent. Either of the signs may be "+",
|
||||
* "-", or omitted. Either I or F may be
|
||||
* omitted, or both. The decimal point isn't
|
||||
* necessary unless F is present. The "E" may
|
||||
* actually be an "e". E and X may both be
|
||||
* omitted (but not just one). */
|
||||
char **endPtr) /* If non-NULL, store terminating character's
|
||||
* address here. */
|
||||
{
|
||||
int sign, expSign = FALSE;
|
||||
double fraction, dblExp;
|
||||
const double *d;
|
||||
register const char *p;
|
||||
register int c;
|
||||
int exp = 0; /* Exponent read from "EX" field. */
|
||||
int fracExp = 0; /* Exponent that derives from the fractional
|
||||
* part. Under normal circumstatnces, it is
|
||||
* the negative of the number of digits in F.
|
||||
* However, if I is very long, the last digits
|
||||
* of I get dropped (otherwise a long I with a
|
||||
* large negative exponent could cause an
|
||||
* unnecessary overflow on I alone). In this
|
||||
* case, fracExp is incremented one for each
|
||||
* dropped digit. */
|
||||
int mantSize; /* Number of digits in mantissa. */
|
||||
int decPt; /* Number of mantissa digits BEFORE decimal
|
||||
* point. */
|
||||
const char *pExp; /* Temporarily holds location of exponent in
|
||||
* string. */
|
||||
|
||||
/*
|
||||
* Strip off leading blanks and check for a sign.
|
||||
*/
|
||||
|
||||
p = string;
|
||||
while (isspace(UCHAR(*p))) {
|
||||
p += 1;
|
||||
}
|
||||
if (*p == '-') {
|
||||
sign = TRUE;
|
||||
p += 1;
|
||||
} else {
|
||||
if (*p == '+') {
|
||||
p += 1;
|
||||
}
|
||||
sign = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Count the number of digits in the mantissa (including the decimal
|
||||
* point), and also locate the decimal point.
|
||||
*/
|
||||
|
||||
decPt = -1;
|
||||
for (mantSize = 0; ; mantSize += 1)
|
||||
{
|
||||
c = *p;
|
||||
if (!isdigit(c)) {
|
||||
if ((c != '.') || (decPt >= 0)) {
|
||||
break;
|
||||
}
|
||||
decPt = mantSize;
|
||||
}
|
||||
p += 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now suck up the digits in the mantissa. Use two integers to collect 9
|
||||
* digits each (this is faster than using floating-point). If the mantissa
|
||||
* has more than 18 digits, ignore the extras, since they can't affect the
|
||||
* value anyway.
|
||||
*/
|
||||
|
||||
pExp = p;
|
||||
p -= mantSize;
|
||||
if (decPt < 0) {
|
||||
decPt = mantSize;
|
||||
} else {
|
||||
mantSize -= 1; /* One of the digits was the point. */
|
||||
}
|
||||
if (mantSize > 18) {
|
||||
fracExp = decPt - 18;
|
||||
mantSize = 18;
|
||||
} else {
|
||||
fracExp = decPt - mantSize;
|
||||
}
|
||||
if (mantSize == 0) {
|
||||
fraction = 0.0;
|
||||
p = string;
|
||||
goto done;
|
||||
} else {
|
||||
int frac1, frac2;
|
||||
|
||||
frac1 = 0;
|
||||
for ( ; mantSize > 9; mantSize -= 1) {
|
||||
c = *p;
|
||||
p += 1;
|
||||
if (c == '.') {
|
||||
c = *p;
|
||||
p += 1;
|
||||
}
|
||||
frac1 = 10*frac1 + (c - '0');
|
||||
}
|
||||
frac2 = 0;
|
||||
for (; mantSize > 0; mantSize -= 1) {
|
||||
c = *p;
|
||||
p += 1;
|
||||
if (c == '.') {
|
||||
c = *p;
|
||||
p += 1;
|
||||
}
|
||||
frac2 = 10*frac2 + (c - '0');
|
||||
}
|
||||
fraction = (1.0e9 * frac1) + frac2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Skim off the exponent.
|
||||
*/
|
||||
|
||||
p = pExp;
|
||||
if ((*p == 'E') || (*p == 'e')) {
|
||||
p += 1;
|
||||
if (*p == '-') {
|
||||
expSign = TRUE;
|
||||
p += 1;
|
||||
} else {
|
||||
if (*p == '+') {
|
||||
p += 1;
|
||||
}
|
||||
expSign = FALSE;
|
||||
}
|
||||
if (!isdigit(UCHAR(*p))) {
|
||||
p = pExp;
|
||||
goto done;
|
||||
}
|
||||
while (isdigit(UCHAR(*p))) {
|
||||
exp = exp * 10 + (*p - '0');
|
||||
p += 1;
|
||||
}
|
||||
}
|
||||
if (expSign) {
|
||||
exp = fracExp - exp;
|
||||
} else {
|
||||
exp = fracExp + exp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate a floating-point number that represents the exponent. Do this
|
||||
* by processing the exponent one bit at a time to combine many powers of
|
||||
* 2 of 10. Then combine the exponent with the fraction.
|
||||
*/
|
||||
|
||||
if (exp < 0) {
|
||||
expSign = TRUE;
|
||||
exp = -exp;
|
||||
} else {
|
||||
expSign = FALSE;
|
||||
}
|
||||
if (exp > maxExponent) {
|
||||
exp = maxExponent;
|
||||
errno = ERANGE;
|
||||
}
|
||||
dblExp = 1.0;
|
||||
for (d = powersOf10; exp != 0; exp >>= 1, ++d) {
|
||||
if (exp & 01) {
|
||||
dblExp *= *d;
|
||||
}
|
||||
}
|
||||
if (expSign) {
|
||||
fraction /= dblExp;
|
||||
} else {
|
||||
fraction *= dblExp;
|
||||
}
|
||||
|
||||
done:
|
||||
if (endPtr != NULL) {
|
||||
*endPtr = (char *) p;
|
||||
}
|
||||
|
||||
if (sign) {
|
||||
return -fraction;
|
||||
}
|
||||
return fraction;
|
||||
}
|
||||
+2
-2
@@ -100,7 +100,7 @@ waitpid(
|
||||
} else {
|
||||
prevPtr->nextPtr = waitPtr->nextPtr;
|
||||
}
|
||||
Tcl_Free(waitPtr);
|
||||
ckfree(waitPtr);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ waitpid(
|
||||
goto waitAgain;
|
||||
}
|
||||
}
|
||||
waitPtr = (WaitInfo *) Tcl_Alloc(sizeof(WaitInfo));
|
||||
waitPtr = (WaitInfo *) ckalloc(sizeof(WaitInfo));
|
||||
waitPtr->pid = result;
|
||||
waitPtr->status = status;
|
||||
waitPtr->nextPtr = deadList;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
@@ -359,7 +359,7 @@ void addFileToZip(zipFile zf, const char *filenameinzip, const char *password, i
|
||||
void addPathToZip(zipFile zf, const char *filenameinzip, const char *password, int opt_exclude_path,int opt_compress_level) {
|
||||
tinydir_dir dir;
|
||||
int i;
|
||||
char *newname[512];
|
||||
char newname[512];
|
||||
|
||||
tinydir_open_sorted(&dir, filenameinzip);
|
||||
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
+8
-3
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
Tcl_GetReturnOptions, Tcl_SetReturnOptions, Tcl_AddErrorInfo, Tcl_AppendObjToErrorInfo, Tcl_AddObjErrorInfo, Tcl_SetObjErrorCode, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_SetErrorLine, Tcl_GetErrorLine, Tcl_PosixError, Tcl_LogCommandInfo \- retrieve or record information about errors and other return options
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -30,6 +30,8 @@ int
|
||||
.sp
|
||||
\fBTcl_SetErrorCode\fR(\fIinterp, element, element, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorCodeVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_GetErrorLine\fR(\fIinterp\fR)
|
||||
.sp
|
||||
\fBTcl_SetErrorLine\fR(\fIinterp, lineNum\fR)
|
||||
@@ -58,10 +60,10 @@ 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 int length in
|
||||
The number of bytes to copy from \fImessage\fR when
|
||||
appending to the \fB\-errorinfo\fR return option.
|
||||
If (size_t)-1, 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 char *element in
|
||||
@@ -243,6 +245,9 @@ The procedure \fBTcl_SetErrorCode\fR is also used to set the
|
||||
record instead of a value. Otherwise, it is similar to
|
||||
\fBTcl_SetObjErrorCode\fR in behavior.
|
||||
.PP
|
||||
\fBTcl_SetErrorCodeVA\fR is the same as \fBTcl_SetErrorCode\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
The procedure \fBTcl_GetErrorLine\fR is used to read the integer value
|
||||
of the \fB\-errorline\fR return option without the overhead of a full
|
||||
call to \fBTcl_GetReturnOptions\fR. Likewise, \fBTcl_SetErrorLine\fR
|
||||
|
||||
+27
-8
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc \- allocate or free heap memory
|
||||
Tcl_Alloc, Tcl_Free, Tcl_Realloc, Tcl_AttemptAlloc, Tcl_AttemptRealloc, ckalloc, ckfree, ckrealloc, attemptckalloc, attemptckrealloc \- allocate or free heap memory
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -19,14 +19,29 @@ char *
|
||||
void
|
||||
\fBTcl_Free\fR(\fIptr\fR)
|
||||
.sp
|
||||
void *
|
||||
char *
|
||||
\fBTcl_Realloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
void *
|
||||
char *
|
||||
\fBTcl_AttemptAlloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
void *
|
||||
char *
|
||||
\fBTcl_AttemptRealloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBckalloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
void
|
||||
\fBckfree\fR(\fIptr\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBckrealloc\fR(\fIptr, size\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBattemptckalloc\fR(\fIsize\fR)
|
||||
.sp
|
||||
char *
|
||||
\fBattemptckrealloc\fR(\fIptr, size\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *size
|
||||
.AP "unsigned int" size in
|
||||
@@ -64,10 +79,14 @@ allocation fails, these functions will return NULL. Note that on some
|
||||
platforms, but not all, attempting to allocate a zero-sized block of
|
||||
memory will also cause these functions to return NULL.
|
||||
.PP
|
||||
When a module or Tcl itself is compiled with \fBTCL_MEM_DEBUG\fR defined,
|
||||
the procedures \fBTcl_Alloc\fR, \fBTcl_Free\fR, \fBTcl_Realloc\fR,
|
||||
\fBTcl_AttemptAlloc\fR, and \fBTcl_AttempRealloc\fR are implemented
|
||||
as macros, redefined to be special debugging versions of these procedures.
|
||||
The procedures \fBckalloc\fR, \fBckfree\fR, \fBckrealloc\fR,
|
||||
\fBattemptckalloc\fR, and \fBattemptckrealloc\fR are implemented
|
||||
as macros. Normally, they are synonyms for the corresponding
|
||||
procedures documented on this page. When Tcl and all modules
|
||||
calling Tcl are compiled with \fBTCL_MEM_DEBUG\fR defined, however,
|
||||
these macros are redefined to be special debugging versions
|
||||
of these procedures. To support Tcl's memory debugging within a
|
||||
module, use the macros rather than direct calls to \fBTcl_Alloc\fR, etc.
|
||||
|
||||
.SH KEYWORDS
|
||||
alloc, allocation, free, malloc, memory, realloc, TCL_MEM_DEBUG
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ or \fBTCL_RETURN\fR, then Tcl normally converts this into a \fBTCL_ERROR\fR
|
||||
return with an appropriate message. The particular script
|
||||
evaluation procedures of Tcl that act in the manner are
|
||||
\fBTcl_EvalObjEx\fR, \fBTcl_EvalObjv\fR, \fBTcl_Eval\fR, \fBTcl_EvalEx\fR,
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR and \fBTcl_VarEval\fR.
|
||||
\fBTcl_GlobalEval\fR, \fBTcl_GlobalEvalObj\fR, \fBTcl_VarEval\fR and
|
||||
\fBTcl_VarEvalVA\fR.
|
||||
.PP
|
||||
However, if \fBTcl_AllowExceptions\fR is invoked immediately before
|
||||
calling one of those a procedures, then arbitrary completion
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ Tcl_GetAssocData, Tcl_SetAssocData, Tcl_DeleteAssocData \- manage associations o
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_GetAssocData\fR(\fIinterp, key, delProcPtr\fR)
|
||||
.sp
|
||||
\fBTcl_SetAssocData\fR(\fIinterp, key, delProc, clientData\fR)
|
||||
@@ -31,7 +31,7 @@ Procedure to call when \fIinterp\fR is deleted.
|
||||
.AP Tcl_InterpDeleteProc **delProcPtr in
|
||||
Pointer to location in which to store address of current deletion procedure
|
||||
for association. Ignored if NULL.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value associated with the given key in this
|
||||
interpreter. This data is owned by the caller.
|
||||
.BE
|
||||
@@ -64,7 +64,7 @@ the type \fBTcl_InterpDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_InterpDeleteProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ int
|
||||
.AS Tcl_AsyncHandler clientData
|
||||
.AP Tcl_AsyncProc *proc in
|
||||
Procedure to invoke to handle an asynchronous event.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
One-word value to pass to \fIproc\fR.
|
||||
.AP Tcl_AsyncHandler async in
|
||||
Token for asynchronous event handler.
|
||||
@@ -84,7 +84,7 @@ type \fBTcl_AsyncProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_AsyncProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIcode\fR);
|
||||
.CE
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_Backslash 3 "8.1" Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_Backslash \- parse a backslash sequence
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
char
|
||||
\fBTcl_Backslash\fR(\fIsrc, countPtr\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS char *countPtr out
|
||||
.AP char *src in
|
||||
Pointer to a string starting with a backslash.
|
||||
.AP int *countPtr out
|
||||
If \fIcountPtr\fR is not NULL, \fI*countPtr\fR gets filled
|
||||
in with number of characters in the backslash sequence, including
|
||||
the backslash character.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The use of \fBTcl_Backslash\fR is deprecated in favor of
|
||||
\fBTcl_UtfBackslash\fR.
|
||||
.PP
|
||||
This is a utility procedure provided for backwards compatibility with
|
||||
non-internationalized Tcl extensions. It parses a backslash sequence and
|
||||
returns the low byte of the Unicode character corresponding to the sequence.
|
||||
\fBTcl_Backslash\fR modifies \fI*countPtr\fR to contain the number of
|
||||
characters in the backslash sequence.
|
||||
.PP
|
||||
See the Tcl manual entry for information on the valid backslash sequences.
|
||||
All of the sequences described in the Tcl manual entry are supported by
|
||||
\fBTcl_Backslash\fR.
|
||||
.SH "SEE ALSO"
|
||||
Tcl(n), Tcl_UtfBackslash(3)
|
||||
|
||||
.SH KEYWORDS
|
||||
backslash, parse
|
||||
+2
-2
@@ -29,8 +29,8 @@ unsigned char *
|
||||
.AP "const unsigned char" *bytes in
|
||||
The array of bytes used to initialize or set a byte-array value. May be NULL
|
||||
even if \fIlength\fR is non-zero.
|
||||
.AP size_t length in
|
||||
The length of the array of bytes.
|
||||
.AP int length in
|
||||
The length of the array of bytes. It must be >= 0.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
For \fBTcl_SetByteArrayObj\fR, this points to the value to be converted to
|
||||
byte-array type. For \fBTcl_GetByteArrayFromObj\fR and
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ Tcl_CallWhenDeleted, Tcl_DontCallWhenDeleted \- Arrange for callback when interp
|
||||
Interpreter with which to associated callback.
|
||||
.AP Tcl_InterpDeleteProc *proc in
|
||||
Procedure to call when \fIinterp\fR is deleted.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -38,7 +38,7 @@ type \fBTcl_InterpDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_InterpDeleteProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ ORed combination of flag bits that specify additional options.
|
||||
For \fBTcl_CancelEval\fR, only \fBTCL_CANCEL_UNWIND\fR is currently
|
||||
supported. For \fBTcl_Canceled\fR, only \fBTCL_LEAVE_ERR_MSG\fR and
|
||||
\fBTCL_CANCEL_UNWIND\fR are currently supported.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Currently reserved for future use.
|
||||
It should be set to NULL.
|
||||
.BE
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ Tcl_Channel
|
||||
Interpreter for error reporting.
|
||||
.AP "const Tcl_ChannelType" *typePtr in
|
||||
The new channel I/O procedures to use for \fIchannel\fR.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to channel I/O procedures.
|
||||
.AP int mask in
|
||||
Conditions under which \fIchannel\fR will be used: OR-ed combination of
|
||||
|
||||
+7
-7
@@ -41,12 +41,12 @@ Tcl_Object
|
||||
int
|
||||
\fBTcl_ObjectDeleted\fR(\fIobject\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_ObjectGetMetadata\fR(\fIobject, metaTypePtr\fR)
|
||||
.sp
|
||||
\fBTcl_ObjectSetMetadata\fR(\fIobject, metaTypePtr, metadata\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_ClassGetMetadata\fR(\fIclass, metaTypePtr\fR)
|
||||
.sp
|
||||
\fBTcl_ClassSetMetadata\fR(\fIclass, metaTypePtr, metadata\fR)
|
||||
@@ -56,7 +56,7 @@ Tcl_ObjectMapMethodNameProc
|
||||
.sp
|
||||
\fBTcl_ObjectSetMethodNameMapper\fR(\fIobject\fR, \fImethodNameMapper\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS void *metadata in/out
|
||||
.AS ClientData metadata in/out
|
||||
.AP Tcl_Interp *interp in/out
|
||||
Interpreter providing the context for looking up or creating an object, and
|
||||
into whose result error messages will be written on failure.
|
||||
@@ -83,7 +83,7 @@ are not arguments to any constructors.
|
||||
.AP Tcl_ObjectMetadataType *metaTypePtr in
|
||||
The type of \fImetadata\fR being set with \fBTcl_ClassSetMetadata\fR or
|
||||
retrieved with \fBTcl_ClassGetMetadata\fR.
|
||||
.AP void *metadata in
|
||||
.AP ClientData metadata in
|
||||
An item of metadata to attach to the class, or NULL to remove the metadata
|
||||
associated with a particular \fImetaTypePtr\fR.
|
||||
.AP "Tcl_ObjectMapMethodNameProc" "methodNameMapper" in
|
||||
@@ -171,7 +171,7 @@ a class or object.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ObjectMetadataDeleteProc\fR(
|
||||
void *\fImetadata\fR);
|
||||
ClientData \fImetadata\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fImetadata\fR argument gives the address of the metadata to be
|
||||
@@ -184,8 +184,8 @@ associated with a class or object.
|
||||
.CS
|
||||
typedef int \fBTcl_CloneProc\fR(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
void *\fIsrcMetadata\fR,
|
||||
void **\fIdstMetadataPtr\fR);
|
||||
ClientData \fIsrcMetadata\fR,
|
||||
ClientData *\fIdstMetadataPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument gives a place to write an error message when the
|
||||
|
||||
+19
-19
@@ -17,7 +17,7 @@ Tcl_CreateChannel, Tcl_GetChannelInstanceData, Tcl_GetChannelType, Tcl_GetChanne
|
||||
Tcl_Channel
|
||||
\fBTcl_CreateChannel\fR(\fItypePtr, channelName, instanceData, mask\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_GetChannelInstanceData\fR(\fIchannel\fR)
|
||||
.sp
|
||||
const Tcl_ChannelType *
|
||||
@@ -128,7 +128,7 @@ by any other channel. Can be NULL, in which case the channel is
|
||||
created without a name. If the created channel is assigned to one
|
||||
of the standard channels (\fBstdin\fR, \fBstdout\fR or \fBstderr\fR),
|
||||
the assigned channel name will be the name of the standard channel.
|
||||
.AP void *instanceData in
|
||||
.AP ClientData instanceData in
|
||||
Arbitrary one-word value to be associated with this channel. This
|
||||
value is passed to procedures in \fItypePtr\fR when they are invoked.
|
||||
.AP int mask in
|
||||
@@ -139,7 +139,7 @@ The channel to operate on.
|
||||
.AP int direction in
|
||||
\fBTCL_READABLE\fR means the input handle is wanted; \fBTCL_WRITABLE\fR
|
||||
means the output handle is wanted.
|
||||
.AP void **handlePtr out
|
||||
.AP ClientData *handlePtr out
|
||||
Points to the location where the desired OS-specific handle should be
|
||||
stored.
|
||||
.AP int size in
|
||||
@@ -399,7 +399,7 @@ the generic layer to set blocking and nonblocking mode on the device.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverBlockModeProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
int \fImode\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -434,7 +434,7 @@ closed. \fICloseProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverCloseProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -456,7 +456,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverClose2Proc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
@@ -487,7 +487,7 @@ internal buffer. \fIInputProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverInputProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
char *\fIbuf\fR,
|
||||
int \fIbufSize\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -531,7 +531,7 @@ generic layer to transfer data from an internal buffer to the output device.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverOutputProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
const char *\fIbuf\fR,
|
||||
int \fItoWrite\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -570,7 +570,7 @@ prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverSeekProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
long \fIoffset\fR,
|
||||
int \fIseekMode\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -600,7 +600,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef Tcl_WideInt \fBTcl_DriverWideSeekProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_WideInt \fIoffset\fR,
|
||||
int \fIseekMode\fR,
|
||||
int *\fIerrorCodePtr\fR);
|
||||
@@ -622,7 +622,7 @@ the generic layer to set a channel type specific option on a channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverSetOptionProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoptionName\fR,
|
||||
const char *\fInewValue\fR);
|
||||
@@ -663,7 +663,7 @@ channel. \fIgetOptionProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverGetOptionProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoptionName\fR,
|
||||
Tcl_DString *\fIoptionValue\fR);
|
||||
@@ -701,7 +701,7 @@ notice events of interest on this channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_DriverWatchProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -732,9 +732,9 @@ the generic layer to retrieve a device-specific handle from the channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverGetHandleProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
int \fIdirection\fR,
|
||||
void **\fIhandlePtr\fR);
|
||||
ClientData *\fIhandlePtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fIInstanceData\fR is the same as the value passed to
|
||||
@@ -761,7 +761,7 @@ It should be set to NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverFlushProc\fR(
|
||||
void *\fIinstanceData\fR);
|
||||
ClientData \fIinstanceData\fR);
|
||||
.CE
|
||||
.PP
|
||||
This value can be retrieved with \fBTcl_ChannelFlushProc\fR, which returns
|
||||
@@ -776,7 +776,7 @@ that occur on the underlying (stacked) channel.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverHandlerProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
int \fIinterestMask\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -805,7 +805,7 @@ might be maintaining using the calling thread as the associate. See
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_DriverThreadActionProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
int \fIaction\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -822,7 +822,7 @@ length. It can be NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_DriverTruncateProc\fR(
|
||||
void *\fIinstanceData\fR,
|
||||
ClientData \fIinstanceData\fR,
|
||||
Tcl_WideInt \fIlength\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ a zero value to temporarily disable an existing handler.
|
||||
.AP Tcl_FileProc *proc in
|
||||
Procedure to invoke whenever the channel indicated by \fIchannel\fR meets
|
||||
the conditions specified by \fImask\fR.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -48,7 +48,7 @@ what it means for a channel to be readable or writable.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ChannelProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ void
|
||||
The channel for which to create or delete a close callback.
|
||||
.AP Tcl_CloseProc *proc in
|
||||
The procedure to call as the callback.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -38,7 +38,7 @@ Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CloseProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR is the same as the value provided in the call to
|
||||
|
||||
+3
-3
@@ -25,7 +25,7 @@ Name of command.
|
||||
.AP Tcl_CmdProc *proc in
|
||||
Implementation of new command: \fIproc\fR will be called whenever
|
||||
\fIcmdName\fR is invoked as a command.
|
||||
.AP voie *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in
|
||||
Procedure to call before \fIcmdName\fR is deleted from the interpreter;
|
||||
@@ -75,7 +75,7 @@ and it returns NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_CmdProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIargc\fR,
|
||||
const char *\fIargv\fR[]);
|
||||
@@ -131,7 +131,7 @@ result that match the type \fBTcl_CmdDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdDeleteProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ a handler.
|
||||
.AP Tcl_FileProc *proc in
|
||||
Procedure to invoke whenever the file or device indicated
|
||||
by \fIfile\fR meets the conditions specified by \fImask\fR.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -51,7 +51,7 @@ type \fBTcl_FileProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_FileProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
int \fImask\fR);
|
||||
.CE
|
||||
.PP
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1989-1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_CreateMathFunc, Tcl_GetMathFuncInfo, Tcl_ListMathFuncs \- Define, query and enumerate math functions for expressions
|
||||
.SH "NOTICE OF EVENTUAL DEPRECATION"
|
||||
.PP
|
||||
The \fBTcl_CreateMathFunc\fR and \fBTcl_GetMathFuncInfo\fR functions
|
||||
are rendered somewhat obsolete by the ability to create functions for
|
||||
expressions by placing commands in the \fBtcl::mathfunc\fR namespace,
|
||||
as described in the \fBmathfunc\fR manual page; the API described on
|
||||
this page is not expected to be maintained indefinitely.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
void
|
||||
\fBTcl_CreateMathFunc\fR(\fIinterp, name, numArgs, argTypes, proc, clientData\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_GetMathFuncInfo\fR(\fIinterp, name, numArgsPtr, argTypesPtr, procPtr,
|
||||
clientDataPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
\fBTcl_ListMathFuncs\fR(\fIinterp, pattern\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_ValueType *clientDataPtr out
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter in which new function will be defined.
|
||||
.AP "const char" *name in
|
||||
Name for new function.
|
||||
.AP int numArgs in
|
||||
Number of arguments to new function; also gives size of \fIargTypes\fR array.
|
||||
.AP Tcl_ValueType *argTypes in
|
||||
Points to an array giving the permissible types for each argument to
|
||||
function.
|
||||
.AP Tcl_MathProc *proc in
|
||||
Procedure that implements the function.
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR when it is invoked.
|
||||
.AP int *numArgsPtr out
|
||||
Points to a variable that will be set to contain the number of
|
||||
arguments to the function.
|
||||
.AP Tcl_ValueType **argTypesPtr out
|
||||
Points to a variable that will be set to contain a pointer to an array
|
||||
giving the permissible types for each argument to the function which
|
||||
will need to be freed up using \fITcl_Free\fR.
|
||||
.AP Tcl_MathProc **procPtr out
|
||||
Points to a variable that will be set to contain a pointer to the
|
||||
implementation code for the function (or NULL if the function is
|
||||
implemented directly in bytecode).
|
||||
.AP ClientData *clientDataPtr out
|
||||
Points to a variable that will be set to contain the clientData
|
||||
argument passed to \fITcl_CreateMathFunc\fR when the function was
|
||||
created if the function is not implemented directly in bytecode.
|
||||
.AP "const char" *pattern in
|
||||
Pattern to match against function names so as to filter them (by
|
||||
passing to \fITcl_StringMatch\fR), or NULL to not apply any filter.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
Tcl allows a number of mathematical functions to be used in
|
||||
expressions, such as \fBsin\fR, \fBcos\fR, and \fBhypot\fR.
|
||||
These functions are represented by commands in the namespace,
|
||||
\fBtcl::mathfunc\fR. The \fBTcl_CreateMathFunc\fR function is
|
||||
an obsolete way for applications to add additional functions
|
||||
to those already provided by Tcl or to replace existing functions.
|
||||
It should not be used by new applications, which should create
|
||||
math functions using \fBTcl_CreateObjCommand\fR to create a command
|
||||
in the \fBtcl::mathfunc\fR namespace.
|
||||
.PP
|
||||
In the \fBTcl_CreateMathFunc\fR interface,
|
||||
\fIName\fR is the name of the function as it will appear in expressions.
|
||||
If \fIname\fR does not already exist in the \fB::tcl::mathfunc\fR
|
||||
namespace, then a new command is created in that namespace.
|
||||
If \fIname\fR does exist, then the existing function is replaced.
|
||||
\fINumArgs\fR and \fIargTypes\fR describe the arguments to the function.
|
||||
Each entry in the \fIargTypes\fR array must be
|
||||
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR, \fBTCL_WIDE_INT\fR,
|
||||
or \fBTCL_EITHER\fR to indicate whether the corresponding argument must be an
|
||||
integer, a double-precision floating value, a wide (64-bit) integer,
|
||||
or any, respectively.
|
||||
.PP
|
||||
Whenever the function is invoked in an expression Tcl will invoke
|
||||
\fIproc\fR. \fIProc\fR should have arguments and result that match
|
||||
the type \fBTcl_MathProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_MathProc\fR(
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_Value *\fIargs\fR,
|
||||
Tcl_Value *\fIresultPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
When \fIproc\fR is invoked the \fIclientData\fR and \fIinterp\fR
|
||||
arguments will be the same as those passed to \fBTcl_CreateMathFunc\fR.
|
||||
\fIArgs\fR will point to an array of \fInumArgs\fR Tcl_Value structures,
|
||||
which describe the actual arguments to the function:
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Value {
|
||||
Tcl_ValueType \fItype\fR;
|
||||
long \fIintValue\fR;
|
||||
double \fIdoubleValue\fR;
|
||||
Tcl_WideInt \fIwideValue\fR;
|
||||
} \fBTcl_Value\fR;
|
||||
.CE
|
||||
.PP
|
||||
The \fItype\fR field indicates the type of the argument and is
|
||||
one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR.
|
||||
It will match the \fIargTypes\fR value specified for the function unless
|
||||
the \fIargTypes\fR value was \fBTCL_EITHER\fR. Tcl converts
|
||||
the argument supplied in the expression to the type requested in
|
||||
\fIargTypes\fR, if that is necessary.
|
||||
Depending on the value of the \fItype\fR field, the \fIintValue\fR,
|
||||
\fIdoubleValue\fR or \fIwideValue\fR
|
||||
field will contain the actual value of the argument.
|
||||
.PP
|
||||
\fIProc\fR should compute its result and store it either as an integer
|
||||
in \fIresultPtr->intValue\fR or as a floating value in
|
||||
\fIresultPtr->doubleValue\fR.
|
||||
It should set also \fIresultPtr->type\fR to one of
|
||||
\fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR
|
||||
to indicate which value was set.
|
||||
Under normal circumstances \fIproc\fR should return \fBTCL_OK\fR.
|
||||
If an error occurs while executing the function, \fIproc\fR should
|
||||
return \fBTCL_ERROR\fR and leave an error message in the interpreter's result.
|
||||
.PP
|
||||
\fBTcl_GetMathFuncInfo\fR retrieves the values associated with
|
||||
function \fIname\fR that were passed to a preceding
|
||||
\fBTcl_CreateMathFunc\fR call. Normally, the return code is
|
||||
\fBTCL_OK\fR but if the named function does not exist, \fBTCL_ERROR\fR
|
||||
is returned and an error message is placed in the interpreter's
|
||||
result.
|
||||
.PP
|
||||
If an error did not occur, the array reference placed in the variable
|
||||
pointed to by \fIargTypesPtr\fR is newly allocated, and should be
|
||||
released by passing it to \fBTcl_Free\fR. Some functions (the
|
||||
standard set implemented in the core, and those defined by placing
|
||||
commands in the \fBtcl::mathfunc\fR namespace) do not have
|
||||
argument type information; attempting to retrieve values for
|
||||
them causes a NULL to be stored in the variable pointed to by
|
||||
\fIprocPtr\fR and the variable pointed to by \fIclientDataPtr\fR
|
||||
will not be modified. The variable pointed to by \fInumArgsPointer\fR
|
||||
will contain -1, and no argument types will be stored in the variable
|
||||
pointed to by \fIargTypesPointer\fR.
|
||||
.PP
|
||||
\fBTcl_ListMathFuncs\fR returns a Tcl value containing a list of all
|
||||
the math functions defined in the interpreter whose name matches
|
||||
\fIpattern\fR. The returned value has a reference count of zero.
|
||||
.SH "SEE ALSO"
|
||||
expr(n), info(n), Tcl_CreateObjCommand(3), Tcl_Free(3), Tcl_NewListObj(3)
|
||||
.SH KEYWORDS
|
||||
expression, mathematical function
|
||||
+11
-11
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, Tcl_GetCommandInfo, Tcl_GetCommandInfoFromToken, Tcl_SetCommandInfo, Tcl_SetCommandInfoFromToken, Tcl_GetCommandName, Tcl_GetCommandFullName, Tcl_GetCommandFromObj Tcl_RegisterCommandTypeName, Tcl_GetCommandTypeName \- implement new commands in C
|
||||
Tcl_CreateObjCommand, Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, Tcl_GetCommandInfo, Tcl_GetCommandInfoFromToken, Tcl_SetCommandInfo, Tcl_SetCommandInfoFromToken, Tcl_GetCommandName, Tcl_GetCommandFullName, Tcl_GetCommandFromObj, Tcl_RegisterCommandTypeName, Tcl_GetCommandTypeName \- implement new commands in C
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -59,7 +59,7 @@ Name of command.
|
||||
.AP Tcl_ObjCmdProc *proc in
|
||||
Implementation of the new command: \fIproc\fR will be called whenever
|
||||
\fIcmdName\fR is invoked as a command.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in
|
||||
Procedure to call before \fIcmdName\fR is deleted from the interpreter;
|
||||
@@ -102,7 +102,7 @@ and it returns NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_ObjCmdProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const \fIobjv\fR[]);
|
||||
@@ -175,7 +175,7 @@ result that match the type \fBTcl_CmdDeleteProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdDeleteProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
@@ -217,11 +217,11 @@ A \fBTcl_CmdInfo\fR structure has the following fields:
|
||||
typedef struct Tcl_CmdInfo {
|
||||
int \fIisNativeObjectProc\fR;
|
||||
Tcl_ObjCmdProc *\fIobjProc\fR;
|
||||
void *\fIobjClientData\fR;
|
||||
ClientData \fIobjClientData\fR;
|
||||
Tcl_CmdProc *\fIproc\fR;
|
||||
void *\fIclientData\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
Tcl_CmdDeleteProc *\fIdeleteProc\fR;
|
||||
void *\fIdeleteData\fR;
|
||||
ClientData \fIdeleteData\fR;
|
||||
Tcl_Namespace *\fInamespacePtr\fR;
|
||||
} \fBTcl_CmdInfo\fR;
|
||||
.CE
|
||||
@@ -247,7 +247,7 @@ otherwise, this is a compatibility procedure
|
||||
registered by \fBTcl_CreateObjCommand\fR
|
||||
that simply calls the command's
|
||||
value-based procedure after converting its string arguments to Tcl values.
|
||||
The field \fIdeleteData\fR is the clientData value
|
||||
The field \fIdeleteData\fR is the ClientData value
|
||||
to pass to \fIdeleteProc\fR; it is normally the same as
|
||||
\fIclientData\fR but may be set independently using the
|
||||
\fBTcl_SetCommandInfo\fR procedure.
|
||||
@@ -261,7 +261,7 @@ from \fBTcl_CreateObjCommand\fR in place of the command name. If the
|
||||
and fills in the structure designated by \fIinfoPtr\fR.
|
||||
.PP
|
||||
\fBTcl_SetCommandInfo\fR is used to modify the procedures and
|
||||
clientData values associated with a command.
|
||||
ClientData values associated with a command.
|
||||
Its \fIcmdName\fR argument is the name of a command in \fIinterp\fR.
|
||||
\fIcmdName\fR may include \fB::\fR namespace qualifiers
|
||||
to identify a command in a particular namespace.
|
||||
@@ -277,9 +277,9 @@ copies the information from \fI*infoPtr\fR to Tcl's internal structure
|
||||
for the command and returns 1.
|
||||
.PP
|
||||
Note that \fBTcl_SetCommandInfo\fR and
|
||||
\fBTcl_SetCommandInfoFromToken\fR both allow the clientData for a
|
||||
\fBTcl_SetCommandInfoFromToken\fR both allow the ClientData for a
|
||||
command's deletion procedure to be given a different value than the
|
||||
clientData for its command procedure.
|
||||
ClientData for its command procedure.
|
||||
.PP
|
||||
Note that neither \fBTcl_SetCommandInfo\fR nor
|
||||
\fBTcl_SetCommandInfoFromToken\fR will change a command's namespace.
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ Tcl_TimerToken
|
||||
How many milliseconds to wait before invoking \fIproc\fR.
|
||||
.AP Tcl_TimerProc *proc in
|
||||
Procedure to invoke after \fImilliseconds\fR have elapsed.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.AP Tcl_TimerToken token in
|
||||
Token for previously created timer handler (the return value
|
||||
@@ -51,7 +51,7 @@ the type \fBTcl_TimerProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_TimerProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a
|
||||
|
||||
+6
-6
@@ -41,7 +41,7 @@ details of the calling sequence.
|
||||
.AP Tcl_CmdTraceProc *proc in
|
||||
Procedure to call for each command that is executed. See below for
|
||||
details on the calling sequence.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIobjProc\fR or \fIproc\fR.
|
||||
.AP Tcl_CmdObjTraceDeleteProc *deleteProc in
|
||||
Procedure to call when the trace is deleted. See below for details of
|
||||
@@ -66,7 +66,7 @@ interpreter.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
\fBvoid *\fR \fIclientData\fR,
|
||||
\fBClientData\fR \fIclientData\fR,
|
||||
\fBTcl_Interp\fR* \fIinterp\fR,
|
||||
int \fIlevel\fR,
|
||||
const char *\fIcommand\fR,
|
||||
@@ -77,7 +77,7 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
|
||||
.PP
|
||||
The \fIclientData\fR and \fIinterp\fR parameters are copies of the
|
||||
corresponding arguments given to \fBTcl_CreateTrace\fR.
|
||||
\fIclientData\fR typically points to an application-specific data
|
||||
\fIClientData\fR typically points to an application-specific data
|
||||
structure that describes what to do when \fIobjProc\fR is invoked. The
|
||||
\fIlevel\fR parameter gives the nesting level of the command (1 for
|
||||
top-level commands passed to \fBTcl_Eval\fR by the application, 2 for
|
||||
@@ -144,7 +144,7 @@ When \fBTcl_DeleteTrace\fR is called, the interpreter invokes the
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdObjTraceDeleteProc\fR(
|
||||
\fBvoid *\fR \fIclientData\fR);
|
||||
\fBClientData\fR \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter will be the same as the
|
||||
@@ -160,12 +160,12 @@ match the type \fBTcl_CmdTraceProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CmdTraceProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIlevel\fR,
|
||||
char *\fIcommand\fR,
|
||||
Tcl_CmdProc *\fIcmdProc\fR,
|
||||
void *\fIcmdClientData\fR,
|
||||
ClientData \fIcmdClientData\fR,
|
||||
int \fIargc\fR,
|
||||
const char *\fIargv\fR[]);
|
||||
.CE
|
||||
|
||||
+11
-5
@@ -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_DStringTrunc, Tcl_DStringFree, Tcl_DStringResult, Tcl_DStringGetResult \- 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
|
||||
int
|
||||
\fBTcl_DStringLength\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
char *
|
||||
@@ -34,6 +34,8 @@ char *
|
||||
.sp
|
||||
\fBTcl_DStringSetLength\fR(\fIdsPtr, newLength\fR)
|
||||
.sp
|
||||
\fBTcl_DStringTrunc\fR(\fIdsPtr, newLength\fR)
|
||||
.sp
|
||||
\fBTcl_DStringFree\fR(\fIdsPtr\fR)
|
||||
.sp
|
||||
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
|
||||
@@ -47,10 +49,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 (size_t)-1,
|
||||
.AP int length in
|
||||
Number of bytes from \fIbytes\fR to add to dynamic string. If -1,
|
||||
add all characters up to null terminating character.
|
||||
.AP size_t newLength in
|
||||
.AP int newLength in
|
||||
New length for dynamic string, not including null terminating
|
||||
character.
|
||||
.AP Tcl_Interp *interp in/out
|
||||
@@ -126,6 +128,10 @@ caller to fill in the new space.
|
||||
even if the string is truncated to zero length, so \fBTcl_DStringFree\fR
|
||||
will still need to be called.
|
||||
.PP
|
||||
\fBTcl_DStringTrunc\fR changes the length of a dynamic string.
|
||||
This procedure is now deprecated. \fBTcl_DStringSetLength\fR should
|
||||
be used instead.
|
||||
.PP
|
||||
\fBTcl_DStringFree\fR should be called when you are finished using
|
||||
the string. It frees up any memory that was allocated for the string
|
||||
and reinitializes the string's value to an empty string.
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ Tcl_DoWhenIdle, Tcl_CancelIdleCall \- invoke a procedure when there are no pendi
|
||||
.AS Tcl_IdleProc clientData
|
||||
.AP Tcl_IdleProc *proc in
|
||||
Procedure to invoke.
|
||||
.AP coid *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -43,7 +43,7 @@ type \fBTcl_IdleProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_IdleProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a copy of the \fIclientData\fR
|
||||
|
||||
@@ -43,7 +43,7 @@ is not defined, these functions are all no-ops.
|
||||
\fBTcl_DumpActiveMemory\fR will output a list of all currently
|
||||
allocated memory to the specified file. The information output for
|
||||
each allocated block of memory is: starting and ending addresses
|
||||
(excluding guard zone), size, source file where \fBTcl_Alloc\fR was
|
||||
(excluding guard zone), size, source file where \fBckalloc\fR was
|
||||
called to allocate the block and line number in that file. It is
|
||||
especially useful to call \fBTcl_DumpActiveMemory\fR after the Tcl
|
||||
interpreter has been deleted.
|
||||
@@ -55,8 +55,8 @@ by \fBTcl_Main\fR.
|
||||
\fBTcl_ValidateAllMemory\fR forces a validation of the guard zones of
|
||||
all currently allocated blocks of memory. Normally validation of a
|
||||
block occurs when its freed, unless full validation is enabled, in
|
||||
which case validation of all blocks occurs when \fBTcl_Alloc\fR and
|
||||
\fBTcl_Free\fR are called. This function forces the validation to occur
|
||||
which case validation of all blocks occurs when \fBckalloc\fR and
|
||||
\fBckfree\fR are called. This function forces the validation to occur
|
||||
at any point.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
|
||||
+21
-6
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_GetEncodingFromObj, Tcl_ExternalToUtfDString, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternal, Tcl_WinTCharToUtf, Tcl_WinUtfToTChar, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNameFromEnvironment, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetEncodingSearchPath, Tcl_SetEncodingSearchPath \- procedures for creating and using encodings
|
||||
Tcl_GetEncoding, Tcl_FreeEncoding, Tcl_GetEncodingFromObj, Tcl_ExternalToUtfDString, Tcl_ExternalToUtf, Tcl_UtfToExternalDString, Tcl_UtfToExternal, Tcl_WinTCharToUtf, Tcl_WinUtfToTChar, Tcl_GetEncodingName, Tcl_SetSystemEncoding, Tcl_GetEncodingNameFromEnvironment, Tcl_GetEncodingNames, Tcl_CreateEncoding, Tcl_GetEncodingSearchPath, Tcl_SetEncodingSearchPath, Tcl_GetDefaultEncodingDir, Tcl_SetDefaultEncodingDir \- procedures for creating and using encodings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -62,6 +62,12 @@ Tcl_Obj *
|
||||
.sp
|
||||
int
|
||||
\fBTcl_SetEncodingSearchPath\fR(\fIsearchPath\fR)
|
||||
.sp
|
||||
const char *
|
||||
\fBTcl_GetDefaultEncodingDir\fR(\fIvoid\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_SetDefaultEncodingDir\fR(\fIpath\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tcl_EncodingType" *dstWrotePtr in/out
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -83,7 +89,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 int 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
|
||||
@@ -281,7 +287,7 @@ the encoding name to it. The \fBTcl_DStringValue\fR is returned.
|
||||
\fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list
|
||||
consisting of the names of all the encodings that are currently defined
|
||||
or can be dynamically loaded, searching the encoding path specified by
|
||||
\fBTcl_SetEncodingSearchPath\fR. This procedure does not ensure that the
|
||||
\fBTcl_SetDefaultEncodingDir\fR. This procedure does not ensure that the
|
||||
dynamically-loadable encoding files contain valid data, but merely that they
|
||||
exist.
|
||||
.PP
|
||||
@@ -308,7 +314,7 @@ typedef struct Tcl_EncodingType {
|
||||
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
|
||||
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
|
||||
Tcl_EncodingFreeProc *\fIfreeProc\fR;
|
||||
void *\fIclientData\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
int \fInullSize\fR;
|
||||
} \fBTcl_EncodingType\fR;
|
||||
.CE
|
||||
@@ -339,7 +345,7 @@ type \fBTcl_EncodingConvertProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_EncodingConvertProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
const char *\fIsrc\fR,
|
||||
int \fIsrcLen\fR,
|
||||
int \fIflags\fR,
|
||||
@@ -371,7 +377,7 @@ The callback procedure \fIfreeProc\fR, if non-NULL, should match the type
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EncodingFreeProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
This \fIfreeProc\fR function is called when the encoding is deleted. The
|
||||
@@ -396,6 +402,15 @@ are not verified as existing readable filesystem directories. When
|
||||
searching for encoding data files takes place, and non-existent or
|
||||
non-readable filesystem directories on the \fIsearchPath\fR are silently
|
||||
ignored.
|
||||
.PP
|
||||
\fBTcl_GetDefaultEncodingDir\fR and \fBTcl_SetDefaultEncodingDir\fR
|
||||
are obsolete interfaces best replaced with calls to
|
||||
\fBTcl_GetEncodingSearchPath\fR and \fBTcl_SetEncodingSearchPath\fR.
|
||||
They are called to access and set the first element of the \fIsearchPath\fR
|
||||
list. Since Tcl searches \fIsearchPath\fR for encoding data files in
|
||||
list order, these routines establish the
|
||||
.QW default
|
||||
directory in which to find encoding data files.
|
||||
.SH "ENCODING FILES"
|
||||
Space would prohibit precompiling into Tcl every possible encoding
|
||||
algorithm, so many encodings are stored on disk as dynamically-loadable
|
||||
|
||||
+19
-3
@@ -10,7 +10,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval \- execute Tcl scripts
|
||||
Tcl_EvalObjEx, Tcl_EvalFile, Tcl_EvalObjv, Tcl_Eval, Tcl_EvalEx, Tcl_GlobalEval, Tcl_GlobalEvalObj, Tcl_VarEval, Tcl_VarEvalVA \- execute Tcl scripts
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -38,6 +38,9 @@ int
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEval\fR(\fIinterp, part, part, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_VarEvalVA\fR(\fIinterp, argList\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp **termPtr
|
||||
.AP Tcl_Interp *interp in
|
||||
@@ -64,6 +67,9 @@ first null byte are used.
|
||||
Points to first byte of script to execute (null-terminated and UTF-8).
|
||||
.AP char *part in
|
||||
String forming part of a Tcl script.
|
||||
.AP va_list argList in
|
||||
An argument list which must have been initialized using
|
||||
\fBva_start\fR, and cleared using \fBva_end\fR.
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
@@ -122,10 +128,16 @@ might be a UTF-8 special code. The string is parsed and executed directly
|
||||
bytecodes. In situations where it is known that the script will never be
|
||||
executed again, \fBTcl_Eval\fR may be faster than \fBTcl_EvalObjEx\fR.
|
||||
\fBTcl_Eval\fR returns a completion code and result just like
|
||||
\fBTcl_EvalObjEx\fR.
|
||||
\fBTcl_EvalObjEx\fR. Note: for backward compatibility with versions before
|
||||
Tcl 8.0, \fBTcl_Eval\fR copies the value result in \fIinterp\fR to
|
||||
\fIinterp->result\fR (use is deprecated) where it can be accessed directly.
|
||||
This makes \fBTcl_Eval\fR somewhat slower than \fBTcl_EvalEx\fR, which
|
||||
does not do the copy.
|
||||
.PP
|
||||
\fBTcl_EvalEx\fR is an extended version of \fBTcl_Eval\fR that takes
|
||||
additional arguments \fInumBytes\fR and \fIflags\fR.
|
||||
additional arguments \fInumBytes\fR and \fIflags\fR. For the
|
||||
efficiency reason given above, \fBTcl_EvalEx\fR is generally preferred
|
||||
over \fBTcl_Eval\fR.
|
||||
.PP
|
||||
\fBTcl_GlobalEval\fR and \fBTcl_GlobalEvalObj\fR are older procedures
|
||||
that are now deprecated. They are similar to \fBTcl_EvalEx\fR and
|
||||
@@ -141,6 +153,10 @@ It returns the result of the command and also modifies
|
||||
\fIinterp->result\fR in the same way as \fBTcl_Eval\fR.
|
||||
The last argument to \fBTcl_VarEval\fR must be NULL to indicate the end
|
||||
of arguments. \fBTcl_VarEval\fR is now deprecated.
|
||||
.PP
|
||||
\fBTcl_VarEvalVA\fR is the same as \fBTcl_VarEval\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument
|
||||
list. Like \fBTcl_VarEval\fR, \fBTcl_VarEvalVA\fR is deprecated.
|
||||
|
||||
.SH "FLAG BITS"
|
||||
.PP
|
||||
|
||||
+4
-4
@@ -42,7 +42,7 @@ usually means that an error occurred.
|
||||
Procedure to invoke before exiting application, or (for
|
||||
\fBTcl_SetExitProc\fR) NULL to uninstall the current application exit
|
||||
procedure.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
|
||||
@@ -64,7 +64,7 @@ otherwise causes the application to terminate without calling
|
||||
returns control to its caller.
|
||||
If an application exit handler has been installed (see
|
||||
\fBTcl_SetExitProc\fR), that handler is invoked with an argument
|
||||
consisting of the exit status (cast to void *); the application
|
||||
consisting of the exit status (cast to ClientData); the application
|
||||
exit handler should not return control to Tcl.
|
||||
.PP
|
||||
\fBTcl_Finalize\fR is similar to \fBTcl_Exit\fR except that it does not
|
||||
@@ -93,7 +93,7 @@ and freeing global memory.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_ExitProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR parameter to \fIproc\fR is a
|
||||
@@ -133,7 +133,7 @@ installed, that exit handler takes over complete responsibility for
|
||||
finalization of Tcl's subsystems via \fBTcl_Finalize\fR at an
|
||||
appropriate time. The argument passed to \fIproc\fR when it is
|
||||
invoked will be the exit status code (as passed to \fBTcl_Exit\fR)
|
||||
cast to a void *value.
|
||||
cast to a ClientData value.
|
||||
.SH "SEE ALSO"
|
||||
exit(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+13
-13
@@ -20,7 +20,7 @@ int
|
||||
int
|
||||
\fBTcl_FSUnregister\fR(\fIfsPtr\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_FSData\fR(\fIfsPtr\fR)
|
||||
.sp
|
||||
void
|
||||
@@ -125,7 +125,7 @@ Tcl_Obj *
|
||||
int
|
||||
\fBTcl_FSConvertToPathType\fR(\fIinterp, pathPtr\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_FSGetInternalRep\fR(\fIpathPtr, fsPtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -212,7 +212,7 @@ this structure will be returned. This parameter may be NULL.
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter to use either for results, evaluation, or reporting error
|
||||
messages.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
The native description of the path value to create.
|
||||
.AP Tcl_Obj *firstPtr in
|
||||
The first of two path values to compare. The value may be converted
|
||||
@@ -249,7 +249,7 @@ Name of a procedure to look up in the file's symbol table
|
||||
Filled with the init function for this code.
|
||||
.AP Tcl_PackageInitProc **proc2Ptr out
|
||||
Filled with the safe-init function for this code.
|
||||
.AP void **clientDataPtr out
|
||||
.AP ClientData *clientDataPtr out
|
||||
Filled with the clientData value to pass to this code's unload
|
||||
function when it is called.
|
||||
.AP Tcl_LoadHandle *loadHandlePtr out
|
||||
@@ -724,7 +724,7 @@ better functions to use for most purposes.
|
||||
\fBTcl_FSGetTranslatedStringPath\fR does the same as
|
||||
\fBTcl_FSGetTranslatedPath\fR, but returns a character string or NULL.
|
||||
The string returned is dynamically allocated and owned by the caller,
|
||||
which must store it or call \fBTcl_Free\fR to ensure it is freed. Again,
|
||||
which must store it or call \fBckfree\fR to ensure it is freed. Again,
|
||||
\fBTcl_FSGetNormalizedPath\fR or \fBTcl_FSGetNativePath\fR are usually
|
||||
better functions to use for most purposes.
|
||||
.PP
|
||||
@@ -791,7 +791,7 @@ It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or
|
||||
.SS "PORTABLE STAT RESULT API"
|
||||
.PP
|
||||
\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system heap (which
|
||||
may be deallocated by being passed to \fBTcl_Free\fR). This allows extensions to
|
||||
may be deallocated by being passed to \fBckfree\fR). This allows extensions to
|
||||
invoke \fBTcl_FSStat\fR and \fBTcl_FSLstat\fR without being dependent on the
|
||||
size of the buffer. That in turn depends on the flags used to build Tcl.
|
||||
.PP
|
||||
@@ -841,7 +841,7 @@ general that is not a good thing to do). \fBTCL_OK\fR will be returned.
|
||||
the list of known filesystems, if it is known, and returns \fBTCL_OK\fR. If
|
||||
the filesystem is not currently registered, \fBTCL_ERROR\fR is returned.
|
||||
.PP
|
||||
\fBTcl_FSData\fR will return the clientData associated with the given
|
||||
\fBTcl_FSData\fR will return the ClientData associated with the given
|
||||
filesystem, if that filesystem is registered. Otherwise it will
|
||||
return NULL.
|
||||
.PP
|
||||
@@ -1018,7 +1018,7 @@ Tcl's internal list of known filesystems.
|
||||
.CS
|
||||
typedef int \fBTcl_FSPathInFilesystemProc\fR(
|
||||
Tcl_Obj *\fIpathPtr\fR,
|
||||
void **\fIclientDataPtr\fR);
|
||||
ClientData *\fIclientDataPtr\fR);
|
||||
.CE
|
||||
.SS DUPINTERNALREPPROC
|
||||
.PP
|
||||
@@ -1028,8 +1028,8 @@ simply not copy the internal representation, which may then need to be
|
||||
regenerated later.
|
||||
.PP
|
||||
.CS
|
||||
typedef void *\fBTcl_FSDupInternalRepProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
typedef ClientData \fBTcl_FSDupInternalRepProc\fR(
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.SS FREEINTERNALREPPROC
|
||||
Free the internal representation. This must be implemented if internal
|
||||
@@ -1038,7 +1038,7 @@ internal representation is generated), but may otherwise be NULL.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_FSFreeInternalRepProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.SS INTERNALTONORMALIZEDPROC
|
||||
.PP
|
||||
@@ -1049,7 +1049,7 @@ representation is the normalized path.
|
||||
.PP
|
||||
.CS
|
||||
typedef Tcl_Obj *\fBTcl_FSInternalToNormalizedProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.SS CREATEINTERNALREPPROC
|
||||
.PP
|
||||
@@ -1060,7 +1060,7 @@ the \fITcl_FSPathInFilesystemProc\fR for this filesystem always
|
||||
immediately creates an internal representation for paths it accepts.
|
||||
.PP
|
||||
.CS
|
||||
typedef void *\fBTcl_FSCreateInternalRepProc\fR(
|
||||
typedef ClientData \fBTcl_FSCreateInternalRepProc\fR(
|
||||
Tcl_Obj *\fIpathPtr\fR);
|
||||
.CE
|
||||
.SS NORMALIZEPATHPROC
|
||||
|
||||
Regular → Executable
+5
-2
@@ -64,9 +64,12 @@ if the first such characters are
|
||||
then \fIsrc\fR is expected to be in octal form; otherwise,
|
||||
if the first such characters are
|
||||
.QW \fB0b\fR
|
||||
then \fIsrc\fR is expected to be in binary form; otherwise,
|
||||
if the first such character is
|
||||
.QW \fB0\fR
|
||||
then \fIsrc\fR
|
||||
is expected to be in binary form; otherwise, \fIsrc\fR is
|
||||
expected to be in decimal form.
|
||||
is expected to be in octal form; otherwise, \fIsrc\fR
|
||||
is expected to be in decimal form.
|
||||
.PP
|
||||
\fBTcl_GetDouble\fR expects \fIsrc\fR to consist of a floating-point
|
||||
number, which is: white space; a sign; a sequence of digits; a
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ be used for reading.
|
||||
.AP int checkUsage in
|
||||
If non-zero, then an error will be generated if the file was not opened
|
||||
for the access indicated by \fIwrite\fR.
|
||||
.AP void **filePtr out
|
||||
.AP ClientData *filePtr out
|
||||
Points to word in which to store pointer to FILE structure for
|
||||
the file given by \fIchanID\fR.
|
||||
.BE
|
||||
|
||||
+4
-4
@@ -27,13 +27,13 @@ Pointer to handler function replacing \fBTcl_GetTime\fR's access to the OS.
|
||||
.AP Tcl_ScaleTimeProc scaleProc in
|
||||
Pointer to handler function for the conversion of time delays in the
|
||||
virtual domain to real-time.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Value passed through to the two handler functions.
|
||||
.AP Tcl_GetTimeProc *getProcPtr out
|
||||
Pointer to place the currently registered get handler function into.
|
||||
.AP Tcl_ScaleTimeProc *scaleProcPtr out
|
||||
Pointer to place the currently registered scale handler function into.
|
||||
.AP void **clientDataPtr out
|
||||
.AP ClientData *clientDataPtr out
|
||||
Pointer to place the currently registered pass-through value into.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -83,10 +83,10 @@ The signatures of the handler functions are as follows:
|
||||
.CS
|
||||
typedef void \fBTcl_GetTimeProc\fR(
|
||||
Tcl_Time *\fItimebuf\fR,
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
typedef void \fBTcl_ScaleTimeProc\fR(
|
||||
Tcl_Time *\fItimebuf\fR,
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fItimebuf\fR fields contain the time to manipulate, and the
|
||||
|
||||
Regular → Executable
+10
-4
@@ -30,7 +30,7 @@ Tcl_HashEntry *
|
||||
Tcl_HashEntry *
|
||||
\fBTcl_FindHashEntry\fR(\fItablePtr, key\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_GetHashValue\fR(\fIentryPtr\fR)
|
||||
.sp
|
||||
\fBTcl_SetHashValue\fR(\fIentryPtr, value\fR)
|
||||
@@ -66,8 +66,9 @@ The word at \fI*newPtr\fR is set to 1 if a new entry was created
|
||||
and 0 if there was already an entry for \fIkey\fR.
|
||||
.AP Tcl_HashEntry *entryPtr in
|
||||
Pointer to hash table entry.
|
||||
.AP void *value in
|
||||
New value to assign to hash table entry.
|
||||
.AP ClientData value in
|
||||
New value to assign to hash table entry. Need not have type
|
||||
ClientData, but must fit in same space as ClientData.
|
||||
.AP Tcl_HashSearch *searchPtr in
|
||||
Pointer to record to use to keep track of progress in enumerating
|
||||
all the entries in a hash table.
|
||||
@@ -185,6 +186,11 @@ instead, it returns NULL as result.
|
||||
.PP
|
||||
\fBTcl_GetHashValue\fR and \fBTcl_SetHashValue\fR are used to
|
||||
read and write an entry's value, respectively.
|
||||
Values are stored and retrieved as type
|
||||
.QW ClientData ,
|
||||
which is
|
||||
large enough to hold a pointer value. On almost all machines this is
|
||||
large enough to hold an integer value too.
|
||||
.PP
|
||||
\fBTcl_GetHashKey\fR returns the key for a given hash table entry,
|
||||
either as a pointer to a string, a one-word
|
||||
@@ -223,7 +229,7 @@ overall information about a hash table, such as the number of
|
||||
entries it contains, the number of buckets in its hash array,
|
||||
and the utilization of the buckets.
|
||||
It is the caller's responsibility to free the result string
|
||||
by passing it to \fBTcl_Free\fR.
|
||||
by passing it to \fBckfree\fR.
|
||||
.PP
|
||||
The header file \fBtcl.h\fR defines the actual data structures
|
||||
used to implement hash tables.
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@ Define the \fBUSE_TCL_STUBS\fR symbol. Typically, you would include the
|
||||
\fB\-DUSE_TCL_STUBS\fR flag when compiling the extension.
|
||||
.IP 3) 5
|
||||
Link the extension with the Tcl stubs library instead of the standard
|
||||
Tcl library. For example, to use the Tcl 9.0 ABI on Unix platforms,
|
||||
the library name is \fIlibtclstub9.0.a\fR; on Windows platforms, the
|
||||
library name is \fItclstub90.lib\fR.
|
||||
Tcl library. For example, to use the Tcl 8.6 ABI on Unix platforms,
|
||||
the library name is \fIlibtclstub8.6.a\fR; on Windows platforms, the
|
||||
library name is \fItclstub86.lib\fR.
|
||||
.PP
|
||||
If the extension also requires the Tk API, it must also call
|
||||
\fBTk_InitStubs\fR to initialize the Tk stubs interface and link
|
||||
|
||||
@@ -33,6 +33,19 @@ the pointer as described below is no longer supported. The supported
|
||||
public routines \fBTcl_SetResult\fR, \fBTcl_GetResult\fR,
|
||||
\fBTcl_SetErrorLine\fR, \fBTcl_GetErrorLine\fR must be used instead.
|
||||
.PP
|
||||
For legacy programs and extensions no longer being maintained, compiles
|
||||
against the Tcl 8.6 header files are only possible with the compiler
|
||||
directives
|
||||
.CS
|
||||
#define USE_INTERP_RESULT
|
||||
.CE
|
||||
and/or
|
||||
.CS
|
||||
#define USE_INTERP_ERRORLINE
|
||||
.CE
|
||||
depending on which fields of the \fBTcl_Interp\fR struct are accessed.
|
||||
These directives may be embedded in code or supplied via compiler options.
|
||||
.PP
|
||||
The \fIresult\fR and \fIfreeProc\fR fields are used to return
|
||||
results or error messages from commands.
|
||||
This information is returned by command procedures back to \fBTcl_Eval\fR,
|
||||
|
||||
+3
-3
@@ -83,7 +83,7 @@ the handler returns. Many handlers may be attached to the same
|
||||
interpreter limit; their order of execution is not defined, and they
|
||||
must be identified by \fIhandlerProc\fR and \fIclientData\fR when they
|
||||
are deleted.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary pointer-sized word used to pass some context to the
|
||||
\fIhandlerProc\fR function.
|
||||
.AP Tcl_LimitHandlerDeleteProc *deleteProc in
|
||||
@@ -162,7 +162,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_LimitHandlerProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -179,7 +179,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_LimitHandlerDeleteProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
A limit handler may be deleted using \fBTcl_LimitRemoveHandler\fR; the
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ Tcl errors.
|
||||
\fBTCL_LINK_STRING\fR
|
||||
The C variable is of type \fBchar *\fR.
|
||||
If its value is not NULL then it must be a pointer to a string
|
||||
allocated with \fBTcl_Alloc\fR.
|
||||
allocated with \fBTcl_Alloc\fR or \fBckalloc\fR.
|
||||
Whenever the Tcl variable is modified the current C string will be
|
||||
freed and new memory will be allocated to hold a copy of the variable's
|
||||
new value.
|
||||
|
||||
+7
-7
@@ -61,7 +61,7 @@ Tcl_Object
|
||||
int
|
||||
\fBTcl_ObjectContextSkippedArgs\fR(\fIcontext\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS void *clientData in
|
||||
.AS ClientData clientData in
|
||||
.AP Tcl_Interp *interp in/out
|
||||
The interpreter holding the object or class to create or update a method in.
|
||||
.AP Tcl_Object object in
|
||||
@@ -83,10 +83,10 @@ and \fBTCL_OO_METHOD_PRIVATE\fR for a private method.
|
||||
.AP Tcl_MethodType *methodTypePtr in
|
||||
A description of the type of the method to create, or the type of method to
|
||||
compare against.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
A piece of data that is passed to the implementation of the method without
|
||||
interpretation.
|
||||
.AP void **clientDataPtr out
|
||||
.AP ClientData *clientDataPtr out
|
||||
A pointer to a variable in which to write the \fIclientData\fR value supplied
|
||||
when the method was created. If NULL, the \fIclientData\fR value will not be
|
||||
retrieved.
|
||||
@@ -213,7 +213,7 @@ Functions matching this signature are called when the method is invoked.
|
||||
.PP
|
||||
.CS
|
||||
typedef int \fBTcl_MethodCallProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
Tcl_ObjectContext \fIobjectContext\fR,
|
||||
int \fIobjc\fR,
|
||||
@@ -234,7 +234,7 @@ through a new method being created or because the object or class is deleted.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_MethodDeleteProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument to a Tcl_MethodDeleteProc will be the same as
|
||||
@@ -248,8 +248,8 @@ class is copied using \fBTcl_CopyObjectInstance\fR (or \fBoo::copy\fR).
|
||||
.CS
|
||||
typedef int \fBTcl_CloneProc\fR(
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
void *\fIoldClientData\fR,
|
||||
void **\fInewClientDataPtr\fR);
|
||||
ClientData \fIoldClientData\fR,
|
||||
ClientData *\fInewClientDataPtr\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIinterp\fR argument gives a place to write an error message when the
|
||||
|
||||
@@ -49,7 +49,7 @@ in the same way as the \fIproc\fR argument to \fBTcl_CreateObjCommand\fR(3)
|
||||
(\fIq.v.\fR).
|
||||
.AP Tcl_ObjCmdProc *nreProc in
|
||||
Called instead of \fIproc\fR when a trampoline is already in use.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value passed to \fIproc\fR, \fInreProc\fR, \fIdeleteProc\fR
|
||||
and \fIobjProc\fR.
|
||||
.AP Tcl_CmdDeleteProc *deleteProc in/out
|
||||
@@ -72,10 +72,10 @@ Pointer to an unshared Tcl_Obj where the result of the evaluation is stored if
|
||||
the return code is TCL_OK.
|
||||
.AP Tcl_NRPostProc *postProcPtr in
|
||||
A function to push.
|
||||
.AP void *data0 in
|
||||
.AP void *data1 in
|
||||
.AP void *data2 in
|
||||
.AP void *data3 in
|
||||
.AP ClientData data0 in
|
||||
.AP ClientData data1 in
|
||||
.AP ClientData data2 in
|
||||
.AP ClientData data3 in
|
||||
\fIdata0\fR through \fIdata3\fR are four one-word values that will be passed
|
||||
to the function designated by \fIpostProcPtr\fR when it is invoked.
|
||||
.BE
|
||||
@@ -130,7 +130,7 @@ a message as the interpreter's result.
|
||||
.CS
|
||||
typedef int
|
||||
\fBTcl_NRPostProc\fR(
|
||||
\fBvoid *\fR \fIdata\fR[],
|
||||
\fBClientData\fR \fIdata\fR[],
|
||||
\fBTcl_Interp\fR *\fIinterp\fR,
|
||||
int \fIresult\fR);
|
||||
.CE
|
||||
@@ -146,7 +146,7 @@ stack, to evalute a script:
|
||||
.CS
|
||||
int
|
||||
\fITheCmdOldObjProc\fR(
|
||||
void *clientData,
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -177,7 +177,7 @@ call \fITheCmdNRObjProc\fR:
|
||||
.CS
|
||||
int
|
||||
\fITheCmdOldObjProc\fR(
|
||||
void *clientData,
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -190,7 +190,7 @@ int
|
||||
.CS
|
||||
int
|
||||
\fITheCmdNRObjProc\fR
|
||||
void *clientData,
|
||||
ClientData clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
@@ -211,7 +211,7 @@ int
|
||||
.CS
|
||||
int
|
||||
\fITheCmdNRPostProc\fR(
|
||||
void *data[],
|
||||
ClientData data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ The interpreter in which the namespace exists and where name lookups
|
||||
are performed. Also where error result messages are written.
|
||||
.AP "const char" *name in
|
||||
The name of the namespace or command to be created or accessed.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
A context pointer by the creator of the namespace. Not interpreted by
|
||||
Tcl at all.
|
||||
.AP Tcl_NamespaceDeleteProc *deleteProc in
|
||||
@@ -117,7 +117,7 @@ the global namespace.)
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_NamespaceDeleteProc\fR(
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
\fBTcl_DeleteNamespace\fR deletes a namespace, calling the
|
||||
|
||||
+7
-7
@@ -38,7 +38,7 @@ Tcl_ThreadId
|
||||
void
|
||||
\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_InitNotifier\fR()
|
||||
.sp
|
||||
void
|
||||
@@ -78,7 +78,7 @@ Procedure to invoke to prepare for event wait in \fBTcl_DoOneEvent\fR.
|
||||
Procedure for \fBTcl_DoOneEvent\fR to invoke after waiting for
|
||||
events. Checks to see if any events have occurred and, if so,
|
||||
queues them.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIsetupProc\fR, \fIcheckProc\fR, or
|
||||
\fIdeleteProc\fR.
|
||||
.AP "const Tcl_Time" *timePtr in
|
||||
@@ -89,7 +89,7 @@ is NULL, it means there is no maximum wait time: wait forever if
|
||||
necessary.
|
||||
.AP Tcl_Event *evPtr in
|
||||
An event to add to the event queue. The storage for the event must
|
||||
have been allocated by the caller using \fBTcl_Alloc\fR.
|
||||
have been allocated by the caller using \fBTcl_Alloc\fR or \fBckalloc\fR.
|
||||
.AP Tcl_QueuePosition position in
|
||||
Where to add the new event in the queue: \fBTCL_QUEUE_TAIL\fR,
|
||||
\fBTCL_QUEUE_HEAD\fR, or \fBTCL_QUEUE_MARK\fR.
|
||||
@@ -230,7 +230,7 @@ the event source.
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EventSetupProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -308,7 +308,7 @@ following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_EventCheckProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
int \fIflags\fR);
|
||||
.CE
|
||||
.PP
|
||||
@@ -399,7 +399,7 @@ of window events.
|
||||
When \fIproc\fR returns 1, \fBTcl_ServiceEvent\fR will remove the
|
||||
event from the event queue and free its storage.
|
||||
Note that the storage for an event must be allocated by
|
||||
the event source (using \fBTcl_Alloc\fR)
|
||||
the event source (using \fBTcl_Alloc\fR or the Tcl macro \fBckalloc\fR)
|
||||
before calling \fBTcl_QueueEvent\fR, but it
|
||||
will be freed by \fBTcl_ServiceEvent\fR, not by the event source.
|
||||
.PP
|
||||
@@ -428,7 +428,7 @@ queue. \fIProc\fR should match the following prototype:
|
||||
.CS
|
||||
typedef int \fBTcl_EventDeleteProc\fR(
|
||||
Tcl_Event *\fIevPtr\fR,
|
||||
void *\fIclientData\fR);
|
||||
ClientData \fIclientData\fR);
|
||||
.CE
|
||||
.PP
|
||||
The \fIclientData\fR argument will be the same as the \fIclientData\fR
|
||||
|
||||
+2
-2
@@ -111,9 +111,9 @@ which is defined as follows.
|
||||
.PP
|
||||
.CS
|
||||
typedef struct Tcl_Obj {
|
||||
size_t \fIrefCount\fR;
|
||||
int \fIrefCount\fR;
|
||||
char *\fIbytes\fR;
|
||||
size_t \fIlength\fR;
|
||||
int \fIlength\fR;
|
||||
const Tcl_ObjType *\fItypePtr\fR;
|
||||
union {
|
||||
long \fIlongValue\fR;
|
||||
|
||||
+2
-2
@@ -186,8 +186,8 @@ to be treated as conventional null character-terminated C strings.
|
||||
These restrictions are easily met by using Tcl's internal UTF encoding
|
||||
for the string representation, same as one would do for other
|
||||
Tcl routines accepting string values as arguments.
|
||||
Storage for the byte array must be allocated in the heap by \fBTcl_Alloc\fR.
|
||||
Note that \fIupdateStringProc\fRs must allocate
|
||||
Storage for the byte array must be allocated in the heap by \fBTcl_Alloc\fR
|
||||
or \fBckalloc\fR. Note that \fIupdateStringProc\fRs must allocate
|
||||
enough storage for the string's bytes and the terminating null byte.
|
||||
.PP
|
||||
The \fIupdateStringProc\fR for Tcl's built-in double type, for example,
|
||||
|
||||
+13
-13
@@ -53,28 +53,28 @@ int
|
||||
int
|
||||
\fBTcl_Read\fR(\fIchannel, readBuf, bytesToRead\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_GetsObj\fR(\fIchannel, lineObjPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_Gets\fR(\fIchannel, lineRead\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_Ungets\fR(\fIchannel, input, inputLen, addAtEnd\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_WriteObj\fR(\fIchannel, writeObjPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_WriteChars\fR(\fIchannel, charBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_Write\fR(\fIchannel, byteBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ReadRaw\fR(\fIchannel, readBuf, bytesToRead\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_WriteRaw\fR(\fIchannel, byteBuf, bytesToWrite\fR)
|
||||
.sp
|
||||
int
|
||||
@@ -134,7 +134,7 @@ input of the invoking process; likewise for \fBTCL_STDOUT\fR and
|
||||
redirect stdio handles to override the stdio handles for which
|
||||
\fBTCL_STDIN\fR, \fBTCL_STDOUT\fR and \fBTCL_STDERR\fR have been set. If it
|
||||
is set, then such redirections cause an error.
|
||||
.AP void *handle in
|
||||
.AP ClientData handle in
|
||||
Operating system specific handle for I/O to a file. For Unix this is a
|
||||
file descriptor, for Windows it is a HANDLE.
|
||||
.AP int readOrWrite in
|
||||
@@ -154,7 +154,7 @@ from a procedure such as \fBTcl_OpenFileChannel\fR.
|
||||
.AP Tcl_Obj *readObjPtr in/out
|
||||
A pointer to a Tcl value in which to store the characters read from the
|
||||
channel.
|
||||
.AP size_t charsToRead in
|
||||
.AP int 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 int 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 int 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 int bytesToWrite in
|
||||
The number of bytes to consume from \fIcharBuf\fR or \fIbyteBuf\fR and
|
||||
output to the channel.
|
||||
.AP Tcl_WideInt offset in
|
||||
|
||||
+3
-3
@@ -50,12 +50,12 @@ If nonzero, the client socket is connected asynchronously to the server.
|
||||
.AP "unsigned int" flags in
|
||||
ORed combination of \fBTCL_TCPSERVER\fR flags that specify additional
|
||||
informations about the socket being created.
|
||||
.AP void *sock in
|
||||
.AP ClientData sock in
|
||||
Platform-specific handle for client TCP socket.
|
||||
.AP Tcl_TcpAcceptProc *proc in
|
||||
Pointer to a procedure to invoke each time a new connection is
|
||||
accepted via the socket.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -127,7 +127,7 @@ the channel. \fIProc\fR must match the following prototype:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_TcpAcceptProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Channel \fIchannel\fR,
|
||||
char *\fIhostName\fR,
|
||||
int \fIport\fR);
|
||||
|
||||
+7
-1
@@ -7,7 +7,7 @@
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
Tcl_Panic, Tcl_SetPanicProc, Tcl_ConsolePanic \- report fatal error and abort
|
||||
Tcl_Panic, Tcl_PanicVA, Tcl_SetPanicProc, Tcl_ConsolePanic \- report fatal error and abort
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -16,6 +16,9 @@ void
|
||||
\fBTcl_Panic\fR(\fIformat\fR, \fIarg\fR, \fIarg\fR, \fI...\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_PanicVA\fR(\fIformat\fR, \fIargList\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_SetPanicProc\fR(\fIpanicProc\fR)
|
||||
.sp
|
||||
void
|
||||
@@ -88,6 +91,9 @@ the Tcl library, \fBTcl_Panic\fR is a public function and may be called
|
||||
by any extension or application that wishes to abort the process and
|
||||
have a panic message displayed the same way that panic messages from Tcl
|
||||
will be displayed.
|
||||
.PP
|
||||
\fBTcl_PanicVA\fR is the same as \fBTcl_Panic\fR except that instead of
|
||||
taking a variable number of arguments it takes an argument list.
|
||||
.SH "SEE ALSO"
|
||||
abort(3), printf(3), exec(n), format(n)
|
||||
.SH KEYWORDS
|
||||
|
||||
+4
-4
@@ -31,7 +31,7 @@ The array of arguments to be parsed.
|
||||
Pointer to a variable that will hold the array of unprocessed arguments.
|
||||
Should be NULL if no return of unprocessed arguments is required. If
|
||||
\fIobjcPtr\fR is updated to a non-zero value, the array returned through this
|
||||
must be deallocated using \fBTcl_Free\fR.
|
||||
must be deallocated using \fBckfree\fR.
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -84,7 +84,7 @@ typedef struct {
|
||||
void *\fIsrcPtr\fR;
|
||||
void *\fIdstPtr\fR;
|
||||
const char *\fIhelpStr\fR;
|
||||
void *\fIclientData\fR;
|
||||
ClientData \fIclientData\fR;
|
||||
} \fBTcl_ArgvInfo\fR;
|
||||
.CE
|
||||
.PP
|
||||
@@ -127,7 +127,7 @@ have the following signature:
|
||||
.PP
|
||||
.CS
|
||||
typedef int (\fBTcl_ArgvFuncProc\fR)(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Obj *\fIobjPtr\fR,
|
||||
void *\fIdstPtr\fR);
|
||||
.CE
|
||||
@@ -149,7 +149,7 @@ function will have the following signature:
|
||||
.PP
|
||||
.CS
|
||||
typedef int (\fBTcl_ArgvGenFuncProc\fR)(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
int \fIobjc\fR,
|
||||
Tcl_Obj *const *\fIobjv\fR,
|
||||
|
||||
+21
-7
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokensStandard \- parse Tcl scripts and expressions
|
||||
Tcl_ParseCommand, Tcl_ParseExpr, Tcl_ParseBraces, Tcl_ParseQuotedString, Tcl_ParseVarName, Tcl_ParseVar, Tcl_FreeParse, Tcl_EvalTokens, Tcl_EvalTokensStandard \- parse Tcl scripts and expressions
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -33,16 +33,20 @@ const char *
|
||||
.sp
|
||||
\fBTcl_FreeParse\fR(\fIusedParsePtr\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
\fBTcl_EvalTokens\fR(\fIinterp, tokenPtr, numTokens\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_EvalTokensStandard\fR(\fIinterp, tokenPtr, numTokens\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *usedParsePtr out
|
||||
.AP Tcl_Interp *interp out
|
||||
For procedures other than \fBTcl_FreeParse\fR and
|
||||
\fBTcl_EvalTokensStandard\fR, used only for error reporting;
|
||||
For procedures other than \fBTcl_FreeParse\fR, \fBTcl_EvalTokens\fR
|
||||
and \fBTcl_EvalTokensStandard\fR, used only for error reporting;
|
||||
if NULL, then no error messages are left after errors.
|
||||
For \fBTcl_EvalTokensStandard\fR, determines the context for evaluating
|
||||
the script and also is used for error reporting; must not be NULL.
|
||||
For \fBTcl_EvalTokens\fR and \fBTcl_EvalTokensStandard\fR,
|
||||
determines the context for evaluating the
|
||||
script and also is used for error reporting; must not be NULL.
|
||||
.AP "const char" *start in
|
||||
Pointer to first character in string to parse.
|
||||
.AP int numBytes in
|
||||
@@ -187,6 +191,16 @@ code with one of the values \fBTCL_OK\fR, \fBTCL_ERROR\fR,
|
||||
some other integer value originating in an extension.
|
||||
In addition, a result value or error message is left in \fIinterp\fR's
|
||||
result; it can be retrieved using \fBTcl_GetObjResult\fR.
|
||||
.PP
|
||||
\fBTcl_EvalTokens\fR differs from \fBTcl_EvalTokensStandard\fR only in
|
||||
the return convention used: it returns the result in a new Tcl_Obj.
|
||||
The reference count of the value returned as result has been
|
||||
incremented, so the caller must
|
||||
invoke \fBTcl_DecrRefCount\fR when it is finished with the value.
|
||||
If an error or other exception occurs while evaluating the tokens
|
||||
(such as a reference to a non-existent variable) then the return value
|
||||
is NULL and an error message is left in \fIinterp\fR's result. The use
|
||||
of \fBTcl_EvalTokens\fR is deprecated.
|
||||
.SH "TCL_PARSE STRUCTURE"
|
||||
.PP
|
||||
\fBTcl_ParseCommand\fR, \fBTcl_ParseExpr\fR, \fBTcl_ParseBraces\fR,
|
||||
@@ -208,8 +222,8 @@ typedef struct Tcl_Parse {
|
||||
typedef struct Tcl_Token {
|
||||
int \fItype\fR;
|
||||
const char *\fIstart\fR;
|
||||
size_t \fIsize\fR;
|
||||
size_t \fInumComponents\fR;
|
||||
int \fIsize\fR;
|
||||
int \fInumComponents\fR;
|
||||
} \fBTcl_Token\fR;
|
||||
.CE
|
||||
.PP
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ Tcl_Preserve, Tcl_Release, Tcl_EventuallyFree \- avoid freeing storage while it
|
||||
\fBTcl_EventuallyFree\fR(\fIclientData, freeProc\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_FreeProc clientData
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Token describing structure to be freed or reallocated. Usually a pointer
|
||||
to memory for structure.
|
||||
.AP Tcl_FreeProc *freeProc in
|
||||
@@ -91,7 +91,7 @@ reasons, but the value is the same.
|
||||
.PP
|
||||
When the \fIclientData\fR argument to \fBTcl_EventuallyFree\fR
|
||||
refers to storage allocated and returned by a prior call to
|
||||
\fBTcl_Alloc\fR or another function of the Tcl library,
|
||||
\fBTcl_Alloc\fR, \fBckalloc\fR, or another function of the Tcl library,
|
||||
then the \fIfreeProc\fR argument should be given the special value of
|
||||
\fBTCL_DYNAMIC\fR.
|
||||
.PP
|
||||
|
||||
+7
-2
@@ -18,7 +18,10 @@ Tcl_PrintDouble \- Convert floating value to string
|
||||
.SH ARGUMENTS
|
||||
.AS Tcl_Interp *interp out
|
||||
.AP Tcl_Interp *interp in
|
||||
This argument is ignored.
|
||||
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
|
||||
controlled the conversion. As of Tcl 8.0, this argument is ignored and
|
||||
the conversion is controlled by the \fBtcl_precision\fR variable
|
||||
that is now shared by all interpreters.
|
||||
.AP double value in
|
||||
Floating-point value to be converted.
|
||||
.AP char *dst out
|
||||
@@ -38,7 +41,9 @@ so that it does not look like an integer. Where \fB%g\fR would
|
||||
generate an integer with no decimal point, \fBTcl_PrintDouble\fR adds
|
||||
.QW .0 .
|
||||
.PP
|
||||
The result will have the fewest digits needed to
|
||||
If the \fBtcl_precision\fR value is non-zero, the result will have
|
||||
precisely that many digits of significance. If the value is zero
|
||||
(the default), the result will have the fewest digits needed to
|
||||
represent the number in such a way that \fBTcl_NewDoubleObj\fR
|
||||
will generate the same number when presented with the given string.
|
||||
IEEE semantics of rounding to even apply to the conversion.
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ the command at global level instead of the current stack level.
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event
|
||||
on the history list and then execute it using \fBTcl_EvalObjEx\fR.
|
||||
on the history list and then execute it using \fBTcl_EvalObjEx\fR
|
||||
It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_EvalObjEx\fR,
|
||||
as well as a result value containing additional information
|
||||
(a result value or error message)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ New limit for nested calls to \fBTcl_Eval\fR for \fIinterp\fR.
|
||||
.PP
|
||||
At any given time Tcl enforces a limit on the number of recursive
|
||||
calls that may be active for \fBTcl_Eval\fR and related procedures
|
||||
such as \fBTcl_EvalEx\fR.
|
||||
such as \fBTcl_GlobalEval\fR.
|
||||
Any call to \fBTcl_Eval\fR that exceeds this depth is aborted with
|
||||
an error.
|
||||
By default the recursion limit is 1000.
|
||||
|
||||
+19
-1
@@ -9,7 +9,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
|
||||
Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendResultVA, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -26,6 +26,8 @@ const char *
|
||||
.sp
|
||||
\fBTcl_AppendResult\fR(\fIinterp, result, result, ... , \fB(char *) NULL\fR)
|
||||
.sp
|
||||
\fBTcl_AppendResultVA\fR(\fIinterp, argList\fR)
|
||||
.sp
|
||||
\fBTcl_ResetResult\fR(\fIinterp\fR)
|
||||
.sp
|
||||
.VS 8.6
|
||||
@@ -150,6 +152,9 @@ extensions.
|
||||
Any number of \fIresult\fR arguments may be passed in a single
|
||||
call; the last argument in the list must be a NULL pointer.
|
||||
.PP
|
||||
\fBTcl_AppendResultVA\fR is the same as \fBTcl_AppendResult\fR except that
|
||||
instead of taking a variable number of arguments it takes an argument list.
|
||||
.PP
|
||||
.VS 8.6
|
||||
\fBTcl_TransferResult\fR moves a result from one interpreter to another,
|
||||
optionally (dependent on the \fIresult\fR parameter) including the error
|
||||
@@ -192,6 +197,19 @@ It also sets \fIinterp->freeProc\fR to zero, but does not
|
||||
change \fIinterp->result\fR or clear error state.
|
||||
\fBTcl_FreeResult\fR is most commonly used when a procedure
|
||||
is about to replace one result value with another.
|
||||
.SS "DIRECT ACCESS TO INTERP->RESULT"
|
||||
.PP
|
||||
It used to be legal for programs to
|
||||
directly read and write \fIinterp->result\fR
|
||||
to manipulate the interpreter result. The Tcl headers no longer
|
||||
permit this access by default, and C code still doing this must
|
||||
be updated to use supported routines \fBTcl_GetObjResult\fR,
|
||||
\fBTcl_GetStringResult\fR, \fBTcl_SetObjResult\fR, and \fBTcl_SetResult\fR.
|
||||
As a migration aid, access can be restored with the compiler directive
|
||||
.CS
|
||||
#define USE_INTERP_RESULT
|
||||
.CE
|
||||
but this is meant only to offer life support to otherwise dead code.
|
||||
.SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT"
|
||||
.PP
|
||||
\fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how
|
||||
|
||||
+5
-5
@@ -20,16 +20,16 @@ int
|
||||
char *
|
||||
\fBTcl_Merge\fR(\fIargc, argv\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ScanElement\fR(\fIsrc, flagsPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ScanCountedElement\fR(\fIsrc, length, flagsPtr\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ConvertElement\fR(\fIsrc, dst, flags\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_ConvertCountedElement\fR(\fIsrc, length, dst, flags\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const char *const" ***argvPtr out
|
||||
@@ -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 int length in
|
||||
Number of bytes in string \fIsrc\fR.
|
||||
.AP char *dst in
|
||||
Place to copy converted list element. Must contain enough characters
|
||||
|
||||
+18
-11
@@ -8,7 +8,7 @@
|
||||
.so man.macros
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
Tcl_NewStringObj, Tcl_NewUnicodeObj, Tcl_SetStringObj, Tcl_SetUnicodeObj, Tcl_GetStringFromObj, Tcl_GetString, Tcl_GetUnicodeFromObj, Tcl_GetUnicode, Tcl_GetUniChar, Tcl_GetCharLength, Tcl_GetRange, Tcl_AppendToObj, Tcl_AppendUnicodeToObj, Tcl_AppendObjToObj, Tcl_AppendStringsToObj, Tcl_AppendStringsToObjVA, Tcl_AppendLimitedToObj, Tcl_Format, Tcl_AppendFormatToObj, Tcl_ObjPrintf, Tcl_AppendPrintfToObj, Tcl_SetObjLength, Tcl_AttemptSetObjLength, Tcl_ConcatObj \- manipulate Tcl values as strings
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -59,6 +59,9 @@ void
|
||||
\fBTcl_AppendStringsToObj\fR(\fIobjPtr, string, string, ... \fB(char *) NULL\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendStringsToObjVA\fR(\fIobjPtr, argList\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_AppendLimitedToObj\fR(\fIobjPtr, bytes, length, limit, ellipsis\fR)
|
||||
.sp
|
||||
Tcl_Obj *
|
||||
@@ -87,29 +90,29 @@ 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 (size_t)-1. (Applications needing null bytes
|
||||
unless \fInumChars\fR is negative. (Applications needing null bytes
|
||||
should represent them as the two-byte sequence \fI\e700\e600\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 int length in
|
||||
The number of bytes to copy from \fIbytes\fR when
|
||||
initializing, setting, or appending to a string value.
|
||||
If (size_t)-1, 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 negative.
|
||||
.AP size_t numChars in
|
||||
.AP int numChars in
|
||||
The number of Unicode characters to copy from \fIunicode\fR when
|
||||
initializing, setting, or appending to a string value.
|
||||
If (size_t)-1, 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 int index in
|
||||
The index of the Unicode character to return.
|
||||
.AP size_t first in
|
||||
.AP int first in
|
||||
The index of the first Unicode character in the Unicode range to be
|
||||
returned as a new value.
|
||||
.AP size_t last in
|
||||
.AP int last in
|
||||
The index of the last Unicode character in the Unicode range to be
|
||||
returned as a new value.
|
||||
.AP Tcl_Obj *objPtr in/out
|
||||
@@ -124,7 +127,7 @@ 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 int limit in
|
||||
Maximum number of bytes to be appended.
|
||||
.AP "const char" *ellipsis in
|
||||
Suffix to append when the limit leads to string truncation.
|
||||
@@ -137,7 +140,7 @@ Format control string including % conversion specifiers.
|
||||
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 int newLength in
|
||||
New length for the string value of \fIobjPtr\fR, not including the
|
||||
final null character.
|
||||
.BE
|
||||
@@ -244,6 +247,10 @@ values may contain internal null characters). Any number of
|
||||
\fIstring\fR arguments may be provided, but the last argument
|
||||
must be a NULL pointer to indicate the end of the list.
|
||||
.PP
|
||||
\fBTcl_AppendStringsToObjVA\fR is the same as \fBTcl_AppendStringsToObj\fR
|
||||
except that instead of taking a variable number of arguments it takes an
|
||||
argument list.
|
||||
.PP
|
||||
\fBTcl_AppendLimitedToObj\fR is similar to \fBTcl_AppendToObj\fR
|
||||
except that it imposes a limit on how many bytes are appended.
|
||||
This can be handy when the string to be appended might be
|
||||
|
||||
+6
-6
@@ -34,7 +34,7 @@ and the Tcl \fBmemory\fR command can be used to validate and examine
|
||||
memory usage.
|
||||
.SH "GUARD ZONES"
|
||||
.PP
|
||||
When memory debugging is enabled, whenever a call to \fBTcl_Alloc\fR is
|
||||
When memory debugging is enabled, whenever a call to \fBckalloc\fR is
|
||||
made, slightly more memory than requested is allocated so the memory
|
||||
debugging code can keep track of the allocated memory, and eight-byte
|
||||
.QW "guard zones"
|
||||
@@ -44,7 +44,7 @@ C #define \fBLOW_GUARD_SIZE\fR and #define \fBHIGH_GUARD_SIZE\fR
|
||||
in the file \fIgeneric/tclCkalloc.c\fR \(em it can
|
||||
be extended if you suspect large overwrite problems, at some cost in
|
||||
performance.) A known pattern is written into the guard zones and, on
|
||||
a call to \fBTcl_Free\fR, the guard zones of the space being freed are
|
||||
a call to \fBckfree\fR, the guard zones of the space being freed are
|
||||
checked to see if either zone has been modified in any way. If one
|
||||
has been, the guard bytes and their new contents are identified, and a
|
||||
.QW "low guard failed"
|
||||
@@ -53,7 +53,7 @@ or
|
||||
message is issued. The
|
||||
.QW "guard failed"
|
||||
message includes the address of the memory packet and
|
||||
the file name and line number of the code that called \fBTcl_Free\fR.
|
||||
the file name and line number of the code that called \fBckfree\fR.
|
||||
This allows you to detect the common sorts of one-off problems, where
|
||||
not enough space was allocated to contain the data written, for
|
||||
example.
|
||||
@@ -66,15 +66,15 @@ suspect (or know) that corruption is occurring before the Tcl
|
||||
interpreter comes up far enough for you to issue commands, you can set
|
||||
\fBMEM_VALIDATE\fR define, recompile tclCkalloc.c and rebuild Tcl.
|
||||
This will enable memory validation from the first call to
|
||||
\fBTcl_Alloc\fR, again, at a large performance impact.
|
||||
\fBckalloc\fR, again, at a large performance impact.
|
||||
.PP
|
||||
If you are desperate and validating memory on every call to
|
||||
\fBTcl_Alloc\fR and \fBTcl_Free\fR is not enough, you can explicitly call
|
||||
\fBckalloc\fR and \fBckfree\fR is not enough, you can explicitly call
|
||||
\fBTcl_ValidateAllMemory\fR directly at any point. It takes a \fIchar
|
||||
*\fR and an \fIint\fR which are normally the filename and line number
|
||||
of the caller, but they can actually be anything you want. Remember
|
||||
to remove the calls after you find the problem.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_Alloc, memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
|
||||
ckalloc, memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
|
||||
.SH KEYWORDS
|
||||
memory, debug
|
||||
|
||||
+3
-3
@@ -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 int 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 (size_t)-1 to get all remaining
|
||||
.AP int count in
|
||||
The maximum number of bytes to get from the stream, or -1 to get all remaining
|
||||
bytes from the stream's buffers.
|
||||
.AP Tcl_Obj *compDict in
|
||||
A byte array value that is the compression dictionary to use with the stream.
|
||||
|
||||
+3
-3
@@ -67,7 +67,7 @@ Id of the thread waited upon.
|
||||
.AP Tcl_ThreadCreateProc *proc in
|
||||
This procedure will act as the \fBmain()\fR of the newly created
|
||||
thread. The specified \fIclientData\fR will be its sole argument.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary information. Passed as sole argument to the \fIproc\fR.
|
||||
.AP int stackSize in
|
||||
The size of the stack given to the new thread.
|
||||
@@ -208,7 +208,7 @@ value and then finishes.
|
||||
.CS
|
||||
static \fBTcl_ThreadCreateType\fR
|
||||
MyThreadImplFunc(
|
||||
void *clientData)
|
||||
ClientData clientData)
|
||||
{
|
||||
int i, limit = (int) clientData;
|
||||
for (i=0 ; i<limit ; i++) {
|
||||
@@ -223,7 +223,7 @@ would do this:
|
||||
.PP
|
||||
.CS
|
||||
int limit = 1000000000;
|
||||
void *limitData = (void*)((intptr_t) limit);
|
||||
ClientData limitData = (void*)((intptr_t) limit);
|
||||
Tcl_ThreadId id; \fI/* holds identity of thread created */\fR
|
||||
int result;
|
||||
|
||||
|
||||
+5
-5
@@ -13,7 +13,7 @@ Tcl_CommandTraceInfo, Tcl_TraceCommand, Tcl_UntraceCommand \- monitor renames an
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_CommandTraceInfo(\fIinterp, cmdName, flags, proc, prevClientData\fB)\fR
|
||||
.sp
|
||||
int
|
||||
@@ -32,9 +32,9 @@ OR'ed collection of the values \fBTCL_TRACE_RENAME\fR and
|
||||
\fBTCL_TRACE_DELETE\fR.
|
||||
.AP Tcl_CommandTraceProc *proc in
|
||||
Procedure to call when specified operations occur to \fIcmdName\fR.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary argument to pass to \fIproc\fR.
|
||||
.AP void *prevClientData in
|
||||
.AP ClientData prevClientData in
|
||||
If non-NULL, gives last value returned by \fBTcl_CommandTraceInfo\fR,
|
||||
so this call will return information about next trace. If NULL, this
|
||||
call will return information about first trace.
|
||||
@@ -65,7 +65,7 @@ match the type \fBTcl_CommandTraceProc\fR:
|
||||
.PP
|
||||
.CS
|
||||
typedef void \fBTcl_CommandTraceProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
const char *\fIoldName\fR,
|
||||
const char *\fInewName\fR,
|
||||
@@ -74,7 +74,7 @@ typedef void \fBTcl_CommandTraceProc\fR(
|
||||
.PP
|
||||
The \fIclientData\fR and \fIinterp\fR parameters will have the same
|
||||
values as those passed to \fBTcl_TraceCommand\fR when the trace was
|
||||
created. \fIclientData\fR typically points to an application-specific
|
||||
created. \fIClientData\fR typically points to an application-specific
|
||||
data structure that describes what to do when \fIproc\fR is invoked.
|
||||
\fIOldName\fR gives the name of the command being renamed, and
|
||||
\fInewName\fR gives the name that the command is being renamed to (or
|
||||
|
||||
+9
-9
@@ -24,13 +24,13 @@ int
|
||||
.sp
|
||||
\fBTcl_UntraceVar2(\fIinterp, name1, name2, flags, proc, clientData\fB)\fR
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_VarTraceInfo(\fIinterp, varName, flags, proc, prevClientData\fB)\fR
|
||||
.sp
|
||||
void *
|
||||
ClientData
|
||||
\fBTcl_VarTraceInfo2(\fIinterp, name1, name2, flags, proc, prevClientData\fB)\fR
|
||||
.SH ARGUMENTS
|
||||
.AS void *prevClientData
|
||||
.AS Tcl_VarTraceProc prevClientData
|
||||
.AP Tcl_Interp *interp in
|
||||
Interpreter containing variable.
|
||||
.AP "const char" *varName in
|
||||
@@ -46,7 +46,7 @@ Not all flags are used by all
|
||||
procedures. See below for more information.
|
||||
.AP Tcl_VarTraceProc *proc in
|
||||
Procedure to invoke whenever one of the traced operations occurs.
|
||||
.AP void *clientData in
|
||||
.AP ClientData clientData in
|
||||
Arbitrary one-word value to pass to \fIproc\fR.
|
||||
.AP "const char" *name1 in
|
||||
Name of scalar or array variable (without array index).
|
||||
@@ -54,7 +54,7 @@ Name of scalar or array variable (without array index).
|
||||
For a trace on an element of an array, gives the index of the
|
||||
element. For traces on scalar variables or on whole arrays,
|
||||
is NULL.
|
||||
.AP void *prevClientData in
|
||||
.AP ClientData prevClientData in
|
||||
If non-NULL, gives last value returned by \fBTcl_VarTraceInfo\fR or
|
||||
\fBTcl_VarTraceInfo2\fR, so this call will return information about
|
||||
next trace. If NULL, this call will return information about first
|
||||
@@ -107,7 +107,7 @@ before an array set, but that will trigger write traces.
|
||||
\fBTCL_TRACE_RESULT_DYNAMIC\fR
|
||||
The result of invoking the \fIproc\fR is a dynamically allocated
|
||||
string that will be released by the Tcl library via a call to
|
||||
\fBTcl_Free\fR. Must not be specified at the same time as
|
||||
\fBckfree\fR. Must not be specified at the same time as
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR.
|
||||
.TP
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR
|
||||
@@ -124,7 +124,7 @@ It should have arguments and result that match the type
|
||||
.PP
|
||||
.CS
|
||||
typedef char *\fBTcl_VarTraceProc\fR(
|
||||
void *\fIclientData\fR,
|
||||
ClientData \fIclientData\fR,
|
||||
Tcl_Interp *\fIinterp\fR,
|
||||
char *\fIname1\fR,
|
||||
char *\fIname2\fR,
|
||||
@@ -134,7 +134,7 @@ typedef char *\fBTcl_VarTraceProc\fR(
|
||||
The \fIclientData\fR and \fIinterp\fR parameters will
|
||||
have the same values as those passed to \fBTcl_TraceVar\fR when the
|
||||
trace was created.
|
||||
\fIclientData\fR typically points to an application-specific
|
||||
\fIClientData\fR typically points to an application-specific
|
||||
data structure that describes what to do when \fIproc\fR
|
||||
is invoked.
|
||||
\fIName1\fR and \fIname2\fR give the name of the traced variable
|
||||
@@ -312,7 +312,7 @@ The return value must be a pointer to a static character string
|
||||
containing an error message,
|
||||
unless (\fIexactly\fR one of) the \fBTCL_TRACE_RESULT_DYNAMIC\fR and
|
||||
\fBTCL_TRACE_RESULT_OBJECT\fR flags is set, which specify that the result is
|
||||
either a dynamic string (to be released with \fBTcl_Free\fR) or a
|
||||
either a dynamic string (to be released with \fBckfree\fR) or a
|
||||
Tcl_Obj* (cast to char* and to be released with
|
||||
\fBTcl_DecrRefCount\fR) containing the error message.
|
||||
If a trace procedure returns an error, no further traces are
|
||||
|
||||
@@ -31,19 +31,19 @@ int
|
||||
\fBTcl_UniCharLen\fR(\fIuniStr\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharNcmp\fR(\fIucs, uct, uniLength\fR)
|
||||
\fBTcl_UniCharNcmp\fR(\fIucs, uct, numChars\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharNcasecmp\fR(\fIucs, uct, uniLength\fR)
|
||||
\fBTcl_UniCharNcasecmp\fR(\fIucs, uct, numChars\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UniCharCaseMatch\fR(\fIuniStr, uniPattern, nocase\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfNcmp\fR(\fIcs, ct, length\fR)
|
||||
\fBTcl_UtfNcmp\fR(\fIcs, ct, numChars\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfNcasecmp\fR(\fIcs, ct, length\fR)
|
||||
\fBTcl_UtfNcasecmp\fR(\fIcs, ct, numChars\fR)
|
||||
.sp
|
||||
int
|
||||
\fBTcl_UtfCharComplete\fR(\fIsrc, length\fR)
|
||||
@@ -69,7 +69,7 @@ int
|
||||
const char *
|
||||
\fBTcl_UtfAtIndex\fR(\fIsrc, index\fR)
|
||||
.sp
|
||||
size_t
|
||||
int
|
||||
\fBTcl_UtfBackslash\fR(\fIsrc, readPtr, dst\fR)
|
||||
.SH ARGUMENTS
|
||||
.AS "const Tcl_UniChar" *uniPattern in/out
|
||||
@@ -94,16 +94,19 @@ A null-terminated Unicode string.
|
||||
A null-terminated Unicode string.
|
||||
.AP "const Tcl_UniChar" *uniPattern in
|
||||
A null-terminated Unicode string.
|
||||
.AP size_t length in
|
||||
.AP int length in
|
||||
The length of the UTF-8 string in bytes (not UTF-8 characters). If
|
||||
(size_t)-1, all bytes up to the first null byte are used.
|
||||
.AP size_t uniLength in
|
||||
The length of the Unicode string in characters.
|
||||
negative, all bytes up to the first null byte are used.
|
||||
.AP int uniLength in
|
||||
The length of the Unicode string in characters. Must be greater than or
|
||||
equal to 0.
|
||||
.AP "Tcl_DString" *dsPtr in/out
|
||||
A pointer to a previously initialized \fBTcl_DString\fR.
|
||||
.AP "unsigned long" numChars in
|
||||
The number of characters to compare.
|
||||
.AP "const char" *start in
|
||||
Pointer to the beginning of a UTF-8 string.
|
||||
.AP size_t index in
|
||||
.AP int index in
|
||||
The index of a character (not byte) in the UTF-8 string.
|
||||
.AP int *readPtr out
|
||||
If non-NULL, filled with the number of bytes in the backslash sequence,
|
||||
@@ -172,7 +175,7 @@ the number of Unicode characters (not bytes) in that string.
|
||||
\fBTcl_UniCharNcmp\fR and \fBTcl_UniCharNcasecmp\fR correspond to
|
||||
\fBstrncmp\fR and \fBstrncasecmp\fR, respectively, for Unicode characters.
|
||||
They accept two null-terminated Unicode strings and the number of characters
|
||||
to compare. Both strings are assumed to be at least \fIuniLength\fR characters
|
||||
to compare. Both strings are assumed to be at least \fInumChars\fR characters
|
||||
long. \fBTcl_UniCharNcmp\fR compares the two strings character-by-character
|
||||
according to the Unicode character ordering. It returns an integer greater
|
||||
than, equal to, or less than 0 if the first string is greater than, equal
|
||||
@@ -186,7 +189,7 @@ be case sensitive and returns whether the string matches the pattern.
|
||||
.PP
|
||||
\fBTcl_UtfNcmp\fR corresponds to \fBstrncmp\fR for UTF-8 strings. It
|
||||
accepts two null-terminated UTF-8 strings and the number of characters
|
||||
to compare. (Both strings are assumed to be at least \fIlength\fR
|
||||
to compare. (Both strings are assumed to be at least \fInumChars\fR
|
||||
characters long.) \fBTcl_UtfNcmp\fR compares the two strings
|
||||
character-by-character according to the Unicode character ordering.
|
||||
It returns an integer greater than, equal to, or less than 0 if the
|
||||
@@ -238,12 +241,12 @@ return value will be \fIstart\fR.
|
||||
Pascal Ord() function. It returns the Tcl_UniChar 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.
|
||||
characters. Behavior is undefined if a negative \fIindex\fR is given.
|
||||
.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_UtfNext\fR \fIindex\fR times. If \fIindex\fR is (size_t)-1,
|
||||
\fBTcl_UtfNext\fR \fIindex\fR times. If a negative \fIindex\fR is given,
|
||||
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
|
||||
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
'\"
|
||||
'\" Copyright (c) 1993 The Regents of the University of California.
|
||||
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
||||
'\"
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH case n 7.0 Tcl "Tcl Built-In Commands"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
case \- Evaluate one of several scripts, depending on a given value
|
||||
.SH SYNOPSIS
|
||||
\fBcase\fI string \fR?\fBin\fR? \fIpatList body \fR?\fIpatList body \fR...?
|
||||
.sp
|
||||
\fBcase\fI string \fR?\fBin\fR? {\fIpatList body \fR?\fIpatList body \fR...?}
|
||||
.BE
|
||||
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fINote: the \fBcase\fI command is obsolete and is supported only
|
||||
for backward compatibility. At some point in the future it may be
|
||||
removed entirely. You should use the \fBswitch\fI command instead.\fR
|
||||
.PP
|
||||
The \fBcase\fR command matches \fIstring\fR against each of
|
||||
the \fIpatList\fR arguments in order.
|
||||
Each \fIpatList\fR argument is a list of one or
|
||||
more patterns. If any of these patterns matches \fIstring\fR then
|
||||
\fBcase\fR evaluates the following \fIbody\fR argument
|
||||
by passing it recursively to the Tcl interpreter and returns the result
|
||||
of that evaluation.
|
||||
Each \fIpatList\fR argument consists of a single
|
||||
pattern or list of patterns. Each pattern may contain any of the wild-cards
|
||||
described under \fBstring match\fR. If a \fIpatList\fR
|
||||
argument is \fBdefault\fR, the corresponding body will be evaluated
|
||||
if no \fIpatList\fR matches \fIstring\fR. If no \fIpatList\fR argument
|
||||
matches \fIstring\fR and no default is given, then the \fBcase\fR
|
||||
command returns an empty string.
|
||||
.PP
|
||||
Two syntaxes are provided for the \fIpatList\fR and \fIbody\fR arguments.
|
||||
The first uses a separate argument for each of the patterns and commands;
|
||||
this form is convenient if substitutions are desired on some of the
|
||||
patterns or commands.
|
||||
The second form places all of the patterns and commands together into
|
||||
a single argument; the argument must have proper list structure, with
|
||||
the elements of the list being the patterns and commands.
|
||||
The second form makes it easy to construct multi-line case commands,
|
||||
since the braces around the whole list make it unnecessary to include a
|
||||
backslash at the end of each line.
|
||||
Since the \fIpatList\fR arguments are in braces in the second form,
|
||||
no command or variable substitutions are performed on them; this makes
|
||||
the behavior of the second form different than the first form in some
|
||||
cases.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
switch(n)
|
||||
|
||||
.SH KEYWORDS
|
||||
case, match, regular expression
|
||||
+16
-10
@@ -886,40 +886,46 @@ The \fIinputString\fR argument consists of zero or more specifications of the
|
||||
following form:
|
||||
.TP
|
||||
\fItime\fR
|
||||
A time of day, which is of the form: \fBhh?:mm?:ss?? ?meridian? ?zone?\fR
|
||||
or \fBhhmm ?meridian? ?zone?\fR
|
||||
If no meridian is specified, \fBhh\fR is interpreted on
|
||||
.
|
||||
A time of day, which is of the form:
|
||||
.QW "\fIhh\fR?\fB:\fImm\fR?\fB:\fIss\fR?? ?\fImeridian\fR? ?\fIzone\fR?"
|
||||
or
|
||||
.QW "\fBhhmm \fR?\fBmeridian\fR? ?\fBzone\fR?" .
|
||||
If no \fImeridian\fR is specified, \fIhh\fR is interpreted on
|
||||
a 24-hour clock.
|
||||
.TP
|
||||
\fIdate\fR
|
||||
.
|
||||
A specific month and day with optional year. The
|
||||
acceptable formats are
|
||||
.QW "\fBmm/dd\fR?\fB/yy\fR?" ,
|
||||
.QW "\fBmonthname dd\fR?\fB, yy\fR?" ,
|
||||
.QW "\fBday, dd monthname \fR?\fByy\fR?" ,
|
||||
.QW "\fBdd monthname yy\fR" ,
|
||||
.QW "?\fBCC\fR?\fByymmdd\fR" ,
|
||||
.QW "\fImm\fB/\fIdd\fR?\fB/\fIyy\fR?" ,
|
||||
.QW "\fImonthname dd\fR?\fB, \fIyy\fR?" ,
|
||||
.QW "\fIday\fB, \fIdd monthname \fR?\fIyy\fR?" ,
|
||||
.QW "\fIdd monthname yy\fR" ,
|
||||
.QW "?\fICC\fR?\fIyymmdd\fR" ,
|
||||
and
|
||||
.QW "\fBdd-monthname-\fR?\fBCC\fR?\fByy\fR" .
|
||||
.QW "\fIdd\fB-\fImonthname\fB-\fR?\fICC\fR?\fIyy\fR" .
|
||||
The default year is the current year. If the year is less
|
||||
than 100, we treat the years 00-68 as 2000-2068 and the years 69-99
|
||||
as 1969-1999. Not all platforms can represent the years 38-70, so
|
||||
an error may result if these years are used.
|
||||
.TP
|
||||
\fIISO 8601 point-in-time\fR
|
||||
.
|
||||
An ISO 8601 point-in-time specification, such as
|
||||
.QW \fICCyymmdd\fBT\fIhhmmss\fR,
|
||||
where \fBT\fR is the literal
|
||||
.QW T ,
|
||||
.QW "\fICCyymmdd hhmmss\fR" ,
|
||||
or
|
||||
.QW \fICCyymmdd\fBT\fIhh:mm:ss\fR .
|
||||
.QW \fICCyymmdd\fBT\fIhh\fB:\fImm\fB:\fIss\fR .
|
||||
Note that only these three formats are accepted.
|
||||
The command does \fInot\fR accept the full range of point-in-time
|
||||
specifications specified in ISO8601. Other formats can be recognized by
|
||||
giving an explicit \fB\-format\fR option to the \fBclock scan\fR command.
|
||||
.TP
|
||||
\fIrelative time\fR
|
||||
.
|
||||
A specification relative to the current time. The format is \fBnumber
|
||||
unit\fR. Acceptable units are \fByear\fR, \fBfortnight\fR,
|
||||
\fBmonth\fR, \fBweek\fR, \fBday\fR,
|
||||
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
'\"
|
||||
'\" Copyright (c) 2014-2018 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 "cookiejar" n 0.1 http "Tcl Bundled Packages"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
cookiejar \- Implementation of the Tcl http package cookie jar protocol
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBpackage require\fR \fBcookiejar\fR ?\fB0.1\fR?
|
||||
|
||||
\fB::http::cookiejar configure\fR ?\fIoptionName\fR? ?\fIoptionValue\fR?
|
||||
\fB::http::cookiejar create\fR \fIname\fR ?\fIfilename\fR?
|
||||
\fB::http::cookiejar new\fR ?\fIfilename\fR?
|
||||
|
||||
\fIcookiejar\fR \fBdestroy\fR
|
||||
\fIcookiejar\fR \fBforceLoadDomainData\fR
|
||||
\fIcookiejar\fR \fBgetCookies\fR \fIprotocol host path\fR
|
||||
\fIcookiejar\fR \fBstoreCookie\fR \fIoptions\fR
|
||||
\fIcookiejar\fR \fBlookup\fR ?\fIhost\fR? ?\fIkey\fR?
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The cookiejar package provides an implementation of the http package's cookie
|
||||
jar protocol using an SQLite database. It provides one main command,
|
||||
\fB::http::cookiejar\fR, which is a TclOO class that should be instantiated to
|
||||
create a cookie jar that manages a particular HTTP session.
|
||||
.PP
|
||||
The database management policy can be controlled at the package level by the
|
||||
\fBconfigure\fR method on the \fB::http::cookiejar\fR class object:
|
||||
.TP
|
||||
\fB::http::cookiejar configure\fR ?\fIoptionName\fR? ?\fIoptionValue\fR?
|
||||
.
|
||||
If neither \fIoptionName\fR nor \fIoptionValue\fR are supplied, this returns a
|
||||
copy of the configuration as a Tcl dictionary. If just \fIoptionName\fR is
|
||||
supplied, just the value of the named option is returned. If both
|
||||
\fIoptionName\fR and \fIoptionValue\fR are given, the named option is changed
|
||||
to be the given value.
|
||||
.RS
|
||||
.PP
|
||||
Supported options are:
|
||||
.TP
|
||||
\fB\-domainfile \fIfilename\fR
|
||||
.
|
||||
A file (defaulting to within the cookiejar package) with a description of the
|
||||
list of top-level domains (e.g., \fB.com\fR or \fB.co.jp\fR). Such domains
|
||||
\fImust not\fR accept cookies set upon them. Note that the list of such
|
||||
domains is both security-sensitive and \fInot\fR constant and should be
|
||||
periodically refetched. Cookie jars maintain their own cache of the domain
|
||||
list.
|
||||
.TP
|
||||
\fB\-domainlist \fIurl\fR
|
||||
.
|
||||
A URL to fetch the list of top-level domains (e.g., \fB.com\fR or
|
||||
\fB.co.jp\fR) from. Such domains \fImust not\fR accept cookies set upon
|
||||
them. Note that the list of such domains is both security-sensitive and
|
||||
\fInot\fR constant and should be periodically refetched. Cookie jars maintain
|
||||
their own cache of the domain list.
|
||||
.TP
|
||||
\fB\-domainrefresh \fIintervalMilliseconds\fR
|
||||
.
|
||||
The number of milliseconds between checks of the \fI\-domainlist\fR for new
|
||||
domains.
|
||||
.TP
|
||||
\fB\-loglevel \fIlevel\fR
|
||||
.
|
||||
The logging level of this package. The logging level must be (in order of
|
||||
decreasing verbosity) one of \fBdebug\fR, \fBinfo\fR, \fBwarn\fR, or
|
||||
\fBerror\fR.
|
||||
.TP
|
||||
\fB\-offline \fIflag\fR
|
||||
.
|
||||
Allows the cookie managment engine to be placed into offline mode. In offline
|
||||
mode, the list of domains is read immediately from the file configured in the
|
||||
\fB\-domainfile\fR option, and the \fB\-domainlist\fR option is not used; it
|
||||
also makes the \fB\-domainrefresh\fR option be effectively ignored.
|
||||
.TP
|
||||
\fB\-purgeold \fIintervalMilliseconds\fR
|
||||
.
|
||||
The number of milliseconds between checks of the database for expired
|
||||
cookies; expired cookies are deleted.
|
||||
.TP
|
||||
\fB\-retain \fIcookieCount\fR
|
||||
.
|
||||
The maximum number of cookies to retain in the database.
|
||||
.TP
|
||||
\fB\-vacuumtrigger \fIdeletionCount\fR
|
||||
.
|
||||
A count of the number of persistent cookie deletions to go between vacuuming
|
||||
the database.
|
||||
.RE
|
||||
.PP
|
||||
Cookie jar instances may be made with any of the standard TclOO instance
|
||||
creation methods (\fBcreate\fR or \fRnew\fR).
|
||||
.TP
|
||||
\fB::http::cookiejar new\fR ?\fIfilename\fR?
|
||||
.
|
||||
If a \fIfilename\fR argument is provided, it is the name of a file containing
|
||||
an SQLite database that will contain the persistent cookies maintained by the
|
||||
cookie jar; the database will be created if the file does not already
|
||||
exist. If \fIfilename\fR is not supplied, the database will be held entirely within
|
||||
memory, which effectively forces all cookies within it to be session cookies.
|
||||
.SS "INSTANCE METHODS"
|
||||
.PP
|
||||
The following methods are supported on the instances:
|
||||
.TP
|
||||
\fIcookiejar\fR \fBdestroy\fR
|
||||
.
|
||||
This is the standard TclOO destruction method. It does \fInot\fR delete the
|
||||
SQLite database if it is written to disk. Callers are responsible for ensuring
|
||||
that the cookie jar is not in use by the http package at the time of
|
||||
destruction.
|
||||
.TP
|
||||
\fIcookiejar\fR \fBforceLoadDomainData\fR
|
||||
.
|
||||
This method causes the cookie jar to immediately load (and cache) the domain
|
||||
list data. The domain list will be loaded from the \fB\-domainlist\fR
|
||||
configured a the package level if that is enabled, and otherwise will be
|
||||
obtained from the \fB\-domainfile\fR configured at the package level.
|
||||
.TP
|
||||
\fIcookiejar\fR \fBgetCookies\fR \fIprotocol host path\fR
|
||||
.
|
||||
This method obtains the cookies for a particular HTTP request. \fIThis
|
||||
implements the http cookie jar protocol.\fR
|
||||
.TP
|
||||
\fIcookiejar\fR \fBpolicyAllow\fR \fIoperation domain path\fR
|
||||
.
|
||||
This method is called by the \fBstoreCookie\fR method to get a decision on
|
||||
whether to allow \fIoperation\fR to be performed for the \fIdomain\fR and
|
||||
\fIpath\fR. This is checked immediately before the database is updated but
|
||||
after the built-in security checks are done, and should return a boolean
|
||||
value; if the value is false, the operation is rejected and the database is
|
||||
not modified. The supported \fIoperation\fRs are:
|
||||
.RS
|
||||
.TP
|
||||
\fBdelete\fR
|
||||
.
|
||||
The \fIdomain\fR is seeking to delete a cookie.
|
||||
.TP
|
||||
\fBsession\fR
|
||||
.
|
||||
The \fIdomain\fR is seeking to create or update a session cookie.
|
||||
.TP
|
||||
\fBset\fR
|
||||
.
|
||||
The \fIdomain\fR is seeking to create or update a persistent cookie (with a
|
||||
defined lifetime).
|
||||
.PP
|
||||
The default implementation of this method just returns true, but subclasses of
|
||||
this class may impose their own rules.
|
||||
.RE
|
||||
.TP
|
||||
\fIcookiejar\fR \fBstoreCookie\fR \fIoptions\fR
|
||||
.
|
||||
This method stores a single cookie from a particular HTTP response. Cookies
|
||||
that fail security checks are ignored. \fIThis implements the http cookie jar
|
||||
protocol.\fR
|
||||
.TP
|
||||
\fIcookiejar\fR \fBlookup\fR ?\fIhost\fR? ?\fIkey\fR?
|
||||
.
|
||||
This method looks a cookie by exact host (or domain) matching. If neither
|
||||
\fIhost\fR nor \fIkey\fR are supplied, the list of hosts for which a cookie is
|
||||
stored is returned. If just \fIhost\fR (which may be a hostname or a domain
|
||||
name) is supplied, the list of cookie keys stored for that host is returned.
|
||||
If both \fIhost\fR and \fIkey\fR are supplied, the value for that key is
|
||||
returned; it is an error if no such host or key match exactly.
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
The simplest way of using a cookie jar is to just permanently configure it at
|
||||
the start of the application.
|
||||
.PP
|
||||
.CS
|
||||
package require http
|
||||
\fBpackage require cookiejar\fR
|
||||
|
||||
set cookiedb ~/.tclcookies.db
|
||||
http::configure -cookiejar [\fBhttp::cookiejar new\fR $cookiedb]
|
||||
|
||||
# No further explicit steps are required to use cookies
|
||||
set tok [http::geturl http://core.tcl.tk/]
|
||||
.CE
|
||||
.PP
|
||||
To only allow a particular domain to use cookies, perhaps because you only
|
||||
want to enable a particular host to create and manipulate sessions, create a
|
||||
subclass that imposes that policy.
|
||||
.PP
|
||||
.CS
|
||||
package require http
|
||||
\fBpackage require cookiejar\fR
|
||||
|
||||
oo::class create MyCookieJar {
|
||||
superclass \fBhttp::cookiejar\fR
|
||||
|
||||
method \fBpolicyAllow\fR {operation domain path} {
|
||||
return [expr {$domain eq "my.example.com"}]
|
||||
}
|
||||
}
|
||||
|
||||
set cookiedb ~/.tclcookies.db
|
||||
http::configure -cookiejar [MyCookieJar new $cookiedb]
|
||||
|
||||
# No further explicit steps are required to use cookies
|
||||
set tok [http::geturl http://core.tcl.tk/]
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
http(n), oo::class(n), sqlite3(n)
|
||||
.SH KEYWORDS
|
||||
cookie, internet, security policy, www
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" fill-column: 78
|
||||
'\" End:
|
||||
+1
-1
@@ -528,7 +528,7 @@ for reading from slots is via \fBinfo class\fR and \fBinfo object\fR).
|
||||
.SH EXAMPLES
|
||||
This example demonstrates how to use both forms of the \fBoo::define\fR and
|
||||
\fBoo::objdefine\fR commands (they work in the same way), as well as
|
||||
illustrating four of their subcommands.
|
||||
illustrating four of the subcommands of them.
|
||||
.PP
|
||||
.CS
|
||||
oo::class create c
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ An integer operand may be specified in decimal (the normal case, the optional
|
||||
first two characters are \fB0d\fR), binary
|
||||
(the first two characters are \fB0b\fR), octal
|
||||
(the first two characters are \fB0o\fR), or hexadecimal
|
||||
(the first two characters are \fB0x\fR) form.
|
||||
(the first two characters are \fB0x\fR) form. For
|
||||
compatibility with older Tcl releases, an operand that begins with \fB0\fR is
|
||||
interpreted as an octal integer even if the second character is not \fBo\fR.
|
||||
A floating-point number may be specified in any of several
|
||||
common decimal formats, and may use the decimal point \fB.\fR,
|
||||
\fBe\fR or \fBE\fR for scientific notation, and
|
||||
|
||||
+113
-2
@@ -13,10 +13,10 @@
|
||||
.SH NAME
|
||||
http \- Client-side implementation of the HTTP/1.1 protocol
|
||||
.SH SYNOPSIS
|
||||
\fBpackage require http ?2.8?\fR
|
||||
\fBpackage require http\fI ?\fB2.8\fR?
|
||||
.\" See Also -useragent option documentation in body!
|
||||
.sp
|
||||
\fB::http::config ?\fI\-option value\fR ...?
|
||||
\fB::http::config\fR ?\fI\-option value\fR ...?
|
||||
.sp
|
||||
\fB::http::geturl \fIurl\fR ?\fI\-option value\fR ...?
|
||||
.sp
|
||||
@@ -99,6 +99,15 @@ comma-separated list of mime type patterns that you are
|
||||
willing to receive. For example,
|
||||
.QW "image/gif, image/jpeg, text/*" .
|
||||
.TP
|
||||
\fB\-cookiejar\fR \fIcommand\fR
|
||||
.VS TIP406
|
||||
The cookie store for the package to use to manage HTTP cookies.
|
||||
\fIcommand\fR is a command prefix list; if the empty list (the
|
||||
default value) is used, no cookies will be sent by requests or stored
|
||||
from responses. The command indicated by \fIcommand\fR, if supplied,
|
||||
must obey the \fBCOOKIE JAR PROTOCOL\fR described below.
|
||||
.VE TIP406
|
||||
.TP
|
||||
\fB\-pipeline\fR \fIboolean\fR
|
||||
.
|
||||
Specifies whether HTTP/1.1 transactions on a persistent socket will be
|
||||
@@ -770,6 +779,108 @@ Subsequent GET and HEAD requests in a failed pipeline will also be retried.
|
||||
that the retry is appropriate\fR - specifically, the application must know
|
||||
that if the failed POST successfully modified the state of the server, a repeat POST
|
||||
would have no adverse effect.
|
||||
.VS TIP406
|
||||
.SH "COOKIE JAR PROTOCOL"
|
||||
.PP
|
||||
Cookies are short key-value pairs used to implement sessions within the
|
||||
otherwise-stateless HTTP protocol. (See RFC 6265 for details; Tcl does not
|
||||
implement the Cookie2 protocol as that is rarely seen in the wild.)
|
||||
.PP
|
||||
Cookie storage managment commands \(em
|
||||
.QW "cookie jars"
|
||||
\(em must support these subcommands which form the HTTP cookie storage
|
||||
management protocol. Note that \fIcookieJar\fR below does not have to be a
|
||||
command name; it is properly a command prefix (a Tcl list of words that will
|
||||
be expanded in place) and admits many possible implementations.
|
||||
.PP
|
||||
Though not formally part of the protocol, it is expected that particular
|
||||
values of \fIcookieJar\fR will correspond to sessions; it is up to the caller
|
||||
of \fB::http::config\fR to decide what session applies and to manage the
|
||||
deletion of said sessions when they are no longer desired (which should be
|
||||
when they not configured as the current cookie jar).
|
||||
.TP
|
||||
\fIcookieJar \fBgetCookies \fIprotocol host requestPath\fR
|
||||
.
|
||||
This command asks the cookie jar what cookies should be supplied for a
|
||||
particular request. It should take the \fIprotocol\fR (typically \fBhttp\fR or
|
||||
\fBhttps\fR), \fIhost\fR name and \fIrequestPath\fR (parsed from the \fIurl\fR
|
||||
argument to \fB::http::geturl\fR) and return a list of cookie keys and values
|
||||
that describe the cookies to supply to the remote host. The list must have an
|
||||
even number of elements.
|
||||
.RS
|
||||
.PP
|
||||
There should only ever be at most one cookie with a particular key for any
|
||||
request (typically the one with the most specific \fIhost\fR/domain match and
|
||||
most specific \fIrequestPath\fR/path match), but there may be many cookies
|
||||
with different names in any request.
|
||||
.RE
|
||||
.TP
|
||||
\fIcookieJar \fBstoreCookie \fIcookieDictionary\fR
|
||||
.
|
||||
This command asks the cookie jar to store a particular cookie that was
|
||||
returned by a request; the result of this command is ignored. The cookie
|
||||
(which will have been parsed by the http package) is described by a
|
||||
dictionary, \fIcookieDictionary\fR, that may have the following keys:
|
||||
.RS
|
||||
.TP
|
||||
\fBdomain\fR
|
||||
.
|
||||
This is always present. Its value describes the domain hostname \fIor
|
||||
prefix\fR that the cookie should be returned for. The checking of the domain
|
||||
against the origin (below) should be careful since sites that issue cookies
|
||||
should only do so for domains related to themselves. Cookies that do not obey
|
||||
a relevant origin matching rule should be ignored.
|
||||
.TP
|
||||
\fBexpires\fR
|
||||
.
|
||||
This is optional. If present, the cookie is intended to be a persistent cookie
|
||||
and the value of the option is the Tcl timestamp (in seconds from the same
|
||||
base as \fBclock seconds\fR) of when the cookie expires (which may be in the
|
||||
past, which should result in the cookie being deleted immediately). If absent,
|
||||
the cookie is intended to be a session cookie that should be not persisted
|
||||
beyond the lifetime of the cookie jar.
|
||||
.TP
|
||||
\fBhostonly\fR
|
||||
.
|
||||
This is always present. Its value is a boolean that describes whether the
|
||||
cookie is a single host cookie (true) or a domain-level cookie (false).
|
||||
.TP
|
||||
\fBhttponly\fR
|
||||
.
|
||||
This is always present. Its value is a boolean that is true when the site
|
||||
wishes the cookie to only ever be used with HTTP (or HTTPS) traffic.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
.
|
||||
This is always present. Its value is the \fIkey\fR of the cookie, which is
|
||||
part of the information that must be return when sending this cookie back in a
|
||||
future request.
|
||||
.TP
|
||||
\fBorigin\fR
|
||||
.
|
||||
This is always present. Its value describes where the http package believes it
|
||||
received the cookie from, which may be useful for checking whether the
|
||||
cookie's domain is valid.
|
||||
.TP
|
||||
\fBpath\fR
|
||||
.
|
||||
This is always present. Its value describes the path prefix of requests to the
|
||||
cookie domain where the cookie should be returned.
|
||||
.TP
|
||||
\fBsecure\fR
|
||||
.
|
||||
This is always present. Its value is a boolean that is true when the cookie
|
||||
should only used on requests sent over secure channels (typically HTTPS).
|
||||
.TP
|
||||
\fBvalue\fR
|
||||
.
|
||||
This is always present. Its value is the value of the cookie, which is part of
|
||||
the information that must be return when sending this cookie back in a future
|
||||
request.
|
||||
.PP
|
||||
Other keys may always be ignored; they have no meaning in this protocol.
|
||||
.RE
|
||||
.VE TIP406
|
||||
.SH EXAMPLE
|
||||
.PP
|
||||
This example creates a procedure to copy a URL to a file while printing a
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
'\"
|
||||
'\" Copyright (c) 2014-2018 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 "idna" n 0.1 http "Tcl Bundled Packages"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
tcl::idna \- Support for normalization of Internationalized Domain Names
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
package require tcl::idna 1.0
|
||||
|
||||
\fBtcl::idna decode\fR \fIhostname\fR
|
||||
\fBtcl::idna encode\fR \fIhostname\fR
|
||||
\fBtcl::idna puny decode\fR \fIstring\fR ?\fIcase\fR?
|
||||
\fBtcl::idna puny encode\fR \fIstring\fR ?\fIcase\fR?
|
||||
\fBtcl::idna version\fR
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This package provides an implementation of the punycode scheme used in
|
||||
Internationalised Domain Names, and some access commands. (See RFC 3492 for a
|
||||
description of punycode.)
|
||||
.TP
|
||||
\fBtcl::idna decode\fR \fIhostname\fR
|
||||
.
|
||||
This command takes the name of a host that potentially contains
|
||||
punycode-encoded character sequences, \fIhostname\fR, and returns the hostname
|
||||
as might be displayed to the user. Note that there are often UNICODE
|
||||
characters that have extremely similar glyphs, so care should be taken with
|
||||
displaying hostnames to users.
|
||||
.TP
|
||||
\fBtcl::idna encode\fR \fIhostname\fR
|
||||
.
|
||||
This command takes the name of a host as might be displayed to the user,
|
||||
\fIhostname\fR, and returns the version of the hostname with characters not
|
||||
permitted in basic hostnames encoded with punycode.
|
||||
.TP
|
||||
\fBtcl::idna puny\fR \fIsubcommand ...\fR
|
||||
.
|
||||
This command provides direct access to the basic punycode encoder and
|
||||
decoder. It supports two \fIsubcommand\fRs:
|
||||
.RS
|
||||
.TP
|
||||
\fBtcl::idna puny decode\fR \fIstring\fR ?\fIcase\fR?
|
||||
.
|
||||
This command decodes the punycode-encoded string, \fIstring\fR, and returns
|
||||
the result. If \fIcase\fR is provided, it is a boolean to make the case be
|
||||
folded to upper case (if \fIcase\fR is true) or lower case (if \fIcase\fR is
|
||||
false) during the decoding process; if omitted, no case transformation is
|
||||
applied.
|
||||
.TP
|
||||
\fBtcl::idna puny encode\fR \fIstring\fR ?\fIcase\fR?
|
||||
.
|
||||
This command encodes the string, \fIstring\fR, and returns the
|
||||
punycode-encoded version of the string. If \fIcase\fR is provided, it is a
|
||||
boolean to make the case be folded to upper case (if \fIcase\fR is true) or
|
||||
lower case (if \fIcase\fR is false) during the encoding process; if omitted,
|
||||
no case transformation is applied.
|
||||
.RE
|
||||
.TP
|
||||
\fBtcl::idna version\fR
|
||||
.
|
||||
This returns the version of the \fBtcl::idna\fR package.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
This is an example of how punycoding of a string works:
|
||||
.PP
|
||||
.CS
|
||||
package require tcl::idna
|
||||
|
||||
puts [\fBtcl::idna puny encode\fR "abc\(->def"]
|
||||
# prints: \fIabcdef-kn2c\fR
|
||||
puts [\fBtcl::idna puny decode\fR "abcdef-kn2c"]
|
||||
# prints: \fIabc\(->def\fR
|
||||
.CE
|
||||
'\" TODO: show how it handles a real domain name
|
||||
.SH "SEE ALSO"
|
||||
http(n), cookiejar(n)
|
||||
.SH KEYWORDS
|
||||
internet, www
|
||||
'\" Local Variables:
|
||||
'\" mode: nroff
|
||||
'\" fill-column: 78
|
||||
'\" End:
|
||||
+1
-1
@@ -236,7 +236,7 @@ attempts are silently ignored. This is needed to maintain the
|
||||
consistency of the underlying interpreter's state.
|
||||
.RE
|
||||
.TP
|
||||
\fBinterp\fR \fBdelete \fR?\fIpath ...?\fR
|
||||
\fBinterp\fR \fBdelete \fR?\fIpath ...\fR?
|
||||
.
|
||||
Deletes zero or more interpreters given by the optional \fIpath\fR
|
||||
arguments, and for each interpreter, it also deletes its slaves. The
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
.SH NAME
|
||||
lindex \- Retrieve an element from a list
|
||||
.SH SYNOPSIS
|
||||
\fBlindex \fIlist ?index ...?\fR
|
||||
\fBlindex \fIlist\fR ?\fIindex ...\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
|
||||
+1
-1
@@ -154,7 +154,7 @@ The following is a minimal extension:
|
||||
.CS
|
||||
#include <tcl.h>
|
||||
#include <stdio.h>
|
||||
static int fooCmd(void *clientData,
|
||||
static int fooCmd(ClientData clientData,
|
||||
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]) {
|
||||
printf("called with %d arguments\en", objc);
|
||||
return TCL_OK;
|
||||
|
||||
Regular → Executable
+4
-1
@@ -106,7 +106,10 @@ of which work solely with floating-point numbers unless otherwise noted:
|
||||
In addition to these predefined functions, applications may
|
||||
define additional functions by using \fBproc\fR (or any other method,
|
||||
such as \fBinterp alias\fR or \fBTcl_CreateObjCommand\fR) to define
|
||||
new commands in the \fBtcl::mathfunc\fR namespace.
|
||||
new commands in the \fBtcl::mathfunc\fR namespace. In addition, an
|
||||
obsolete interface named \fBTcl_CreateMathFunc\fR() is available to
|
||||
extensions that are written in C. The latter interface is not recommended
|
||||
for new implementations.
|
||||
.SS "DETAILED DEFINITIONS"
|
||||
.TP
|
||||
\fBabs \fIarg\fR
|
||||
|
||||
+16
-16
@@ -25,7 +25,7 @@ Write a list of all currently allocated memory to the specified \fIfile\fR.
|
||||
.TP
|
||||
\fBmemory break_on_malloc\fR \fIcount\fR
|
||||
.
|
||||
After the \fIcount\fR allocations have been performed, \fBTcl_Alloc\fR
|
||||
After the \fIcount\fR allocations have been performed, \fBckalloc\fR
|
||||
outputs a message to this effect and that it is now attempting to enter
|
||||
the C debugger. Tcl will then issue a \fISIGINT\fR signal against itself.
|
||||
If you are running Tcl under a C debugger, it should then enter the debugger
|
||||
@@ -35,8 +35,8 @@ command mode.
|
||||
.
|
||||
Returns a report containing the total allocations and frees since
|
||||
Tcl began, the current packets allocated (the current
|
||||
number of calls to \fBTcl_Alloc\fR not met by a corresponding call
|
||||
to \fBTcl_Free\fR), the current bytes allocated, and the maximum number
|
||||
number of calls to \fBckalloc\fR not met by a corresponding call
|
||||
to \fBckfree\fR), the current bytes allocated, and the maximum number
|
||||
of packets and bytes allocated.
|
||||
.TP
|
||||
\fBmemory init \fR[\fBon\fR|\fBoff\fR]
|
||||
@@ -59,34 +59,34 @@ that memory is properly cleaned up during process exit.
|
||||
.TP
|
||||
\fBmemory tag\fR \fIstring\fR
|
||||
.
|
||||
Each packet of memory allocated by \fBTcl_Alloc\fR can have associated
|
||||
Each packet of memory allocated by \fBckalloc\fR can have associated
|
||||
with it a string-valued tag. In the lists of allocated memory generated
|
||||
by \fBmemory active\fR and \fBmemory onexit\fR, the tag for each packet
|
||||
is printed along with other information about the packet. The
|
||||
\fBmemory tag\fR command sets the tag value for subsequent calls
|
||||
to \fBTcl_Alloc\fR to be \fIstring\fR.
|
||||
to \fBckalloc\fR to be \fIstring\fR.
|
||||
.TP
|
||||
\fBmemory trace \fR[\fBon\fR|\fBoff\fR]
|
||||
.
|
||||
Turns memory tracing on or off. When memory tracing is on, every call
|
||||
to \fBTcl_Alloc\fR causes a line of trace information to be written to
|
||||
\fIstderr\fR, consisting of the word \fITcl_Alloc\fR, followed by the
|
||||
to \fBckalloc\fR causes a line of trace information to be written to
|
||||
\fIstderr\fR, consisting of the word \fIckalloc\fR, followed by the
|
||||
address returned, the amount of memory allocated, and the C filename
|
||||
and line number of the code performing the allocation. For example:
|
||||
.RS
|
||||
.PP
|
||||
.CS
|
||||
Tcl_Alloc 40e478 98 tclProc.c 1406
|
||||
ckalloc 40e478 98 tclProc.c 1406
|
||||
.CE
|
||||
.PP
|
||||
Calls to \fBTcl_Free\fR are traced in the same manner.
|
||||
Calls to \fBckfree\fR are traced in the same manner.
|
||||
.RE
|
||||
.TP
|
||||
\fBmemory trace_on_at_malloc\fR \fIcount\fR
|
||||
.
|
||||
Enable memory tracing after \fIcount\fR \fBTcl_Alloc\fRs have been performed.
|
||||
Enable memory tracing after \fIcount\fR \fBckalloc\fRs have been performed.
|
||||
For example, if you enter \fBmemory trace_on_at_malloc 100\fR,
|
||||
after the 100th call to \fBTcl_Alloc\fR, memory trace information will begin
|
||||
after the 100th call to \fBckalloc\fR, memory trace information will begin
|
||||
being displayed for all allocations and frees. Since there can be a lot
|
||||
of memory activity before a problem occurs, judicious use of this option
|
||||
can reduce the slowdown caused by tracing (and the amount of trace information
|
||||
@@ -97,17 +97,17 @@ occurred since Tcl started is printed on a guard zone failure.
|
||||
\fBmemory validate \fR[\fBon\fR|\fBoff\fR]
|
||||
.
|
||||
Turns memory validation on or off. When memory validation is enabled,
|
||||
on every call to \fBTcl_Alloc\fR or \fBTcl_Free\fR, the guard zones are
|
||||
on every call to \fBckalloc\fR or \fBckfree\fR, the guard zones are
|
||||
checked for every piece of memory currently in existence that was
|
||||
allocated by \fBTcl_Alloc\fR. This has a large performance impact and
|
||||
allocated by \fBckalloc\fR. This has a large performance impact and
|
||||
should only be used when overwrite problems are strongly suspected.
|
||||
The advantage of enabling memory validation is that a guard zone
|
||||
overwrite can be detected on the first call to \fBTcl_Alloc\fR or
|
||||
\fBTcl_Free\fR after the overwrite occurred, rather than when the
|
||||
overwrite can be detected on the first call to \fBckalloc\fR or
|
||||
\fBckfree\fR after the overwrite occurred, rather than when the
|
||||
specific memory with the overwritten guard zone(s) is freed, which may
|
||||
occur long after the overwrite occurred.
|
||||
.SH "SEE ALSO"
|
||||
Tcl_Alloc, Tcl_Free, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG
|
||||
ckalloc, ckfree, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory, TCL_MEM_DEBUG
|
||||
.SH KEYWORDS
|
||||
memory, debug
|
||||
'\"Local Variables:
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
platform \- System identification support code and utilities
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBpackage require platform ?1.0.10?\fR
|
||||
\fBpackage require platform\fR ?\fB1.0.10\fR?
|
||||
.sp
|
||||
\fBplatform::generic\fR
|
||||
\fBplatform::identify\fR
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
platform::shell \- System identification support code and utilities
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBpackage require platform::shell ?1.1.4?\fR
|
||||
\fBpackage require platform::shell\fR ?\fB1.1.4\fR?
|
||||
.sp
|
||||
\fBplatform::shell::generic \fIshell\fR
|
||||
\fBplatform::shell::identify \fIshell\fR
|
||||
|
||||
+6
-6
@@ -12,9 +12,9 @@
|
||||
tcl::prefix \- facilities for prefix matching
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB::tcl::prefix all\fR \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix match\fR \fI?option ...?\fR \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix all\fR \fItable string\fR
|
||||
\fB::tcl::prefix longest\fR \fItable string\fR
|
||||
\fB::tcl::prefix match\fR ?\fIoption ...\fR? \fItable string\fR
|
||||
.fi
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
@@ -22,17 +22,17 @@ tcl::prefix \- facilities for prefix matching
|
||||
This document describes commands looking up a prefix in a list of strings.
|
||||
The following commands are supported:
|
||||
.TP
|
||||
\fB::tcl::prefix all\fR \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix all\fR \fItable string\fR
|
||||
.
|
||||
Returns a list of all elements in \fItable\fR that begin with the prefix
|
||||
\fIstring\fR.
|
||||
.TP
|
||||
\fB::tcl::prefix longest\fR \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix longest\fR \fItable string\fR
|
||||
.
|
||||
Returns the longest common prefix of all elements in \fItable\fR that
|
||||
begin with the prefix \fIstring\fR.
|
||||
.TP
|
||||
\fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable\fR \fIstring\fR
|
||||
\fB::tcl::prefix match\fR ?\fIoptions\fR? \fItable string\fR
|
||||
.
|
||||
If \fIstring\fR equals one element in \fItable\fR or is a prefix to exactly
|
||||
one element, the matched element is returned. If not, the result depends
|
||||
|
||||
+54
-35
@@ -16,11 +16,31 @@ tcl::process \- Subprocess management
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
This command provides a way to manage subprocesses created by the \fBopen\fR
|
||||
and \fBexec\fR commands. The legal \fIoptions\fR (which may be abbreviated) are:
|
||||
and \fBexec\fR commands, as identified by the process identifiers (PIDs) of
|
||||
those subprocesses. The legal \fIoptions\fR (which may be abbreviated) are:
|
||||
.TP
|
||||
\fB::tcl::process autopurge\fR ?\fIflag\fR?
|
||||
.
|
||||
Automatic purge facility. If \fIflag\fR is specified as a boolean value then
|
||||
it activates or deactivate autopurge. In all cases it returns the current
|
||||
status as a boolean value. When autopurge is active,
|
||||
\fBTcl_ReapDetachedProcs\fR is called each time the \fBexec\fR command is
|
||||
executed or a pipe channel created by \fBopen\fR is closed. When autopurge is
|
||||
inactive, \fB::tcl::process\fR purge must be called explicitly. By default
|
||||
autopurge is active.
|
||||
.TP
|
||||
\fB::tcl::process list\fR
|
||||
.
|
||||
Returns the list of subprocess PIDs.
|
||||
Returns the list of subprocess PIDs. This includes all currently executing
|
||||
subprocesses and all terminated subprocesses that have not yet had their
|
||||
corresponding process table entries purged.
|
||||
.TP
|
||||
\fB::tcl::process purge\fR ?\fIpids\fR?
|
||||
.
|
||||
Cleans up all data associated with terminated subprocesses. If \fIpids\fR is
|
||||
specified as a list of PIDs then the command only cleanup data for the matching
|
||||
subprocesses if they exist, and raises an error otherwise. If a process listed is
|
||||
still active, this command does nothing to that process.
|
||||
.TP
|
||||
\fB::tcl::process status\fR ?\fIswitches\fR? ?\fIpids\fR?
|
||||
.
|
||||
@@ -29,62 +49,48 @@ Returns a dictionary mapping subprocess PIDs to their respective status. If
|
||||
status of the matching subprocesses if they exist, and raises an error
|
||||
otherwise. For active processes, the status is an empty value. For terminated
|
||||
processes, the status is a list with the following format:
|
||||
.QW "{code ?\fImsg errorCode\fR?}" ,
|
||||
.QW "\fB{\fIcode\fR ?\fImsg errorCode\fR?\fB}\fR" ,
|
||||
where:
|
||||
.RS
|
||||
.TP
|
||||
\fBcode\fR\0
|
||||
\fIcode\fR\0
|
||||
.
|
||||
is a standard Tcl return code,
|
||||
is a standard Tcl return code, i.e., \fB0\fR for TCL_OK and \fB1\fR
|
||||
for TCL_ERROR,
|
||||
.TP
|
||||
\fBmsg\fR\0
|
||||
\fImsg\fR\0
|
||||
.
|
||||
is the human-readable error message,
|
||||
.TP
|
||||
\fBerrorCode\fR\0
|
||||
\fIerrorCode\fR\0
|
||||
.
|
||||
uses the same format as the \fBerrorCode\fR global variable
|
||||
.RE
|
||||
.PP
|
||||
Note that \fBmsg\fR and \fBerrorCode\fR are only present for abnormally
|
||||
terminated processes (i.e. those where \fBcode\fR is nonzero). Under the hood
|
||||
this command calls \fBTcl_WaitPid\fR with the \fBWNOHANG\fR flag set for
|
||||
terminated processes (i.e. those where the \fIcode\fR is nonzero). Under the
|
||||
hood this command calls \fBTcl_WaitPid\fR with the \fBWNOHANG\fR flag set for
|
||||
non-blocking behavior, unless the \fB\-wait\fR switch is set (see below).
|
||||
.RS
|
||||
.PP
|
||||
Additionally, \fB::tcl::process status\fR accepts the following switches:
|
||||
.TP
|
||||
\fB\-wait\fR\0
|
||||
.
|
||||
By default the command returns immediately (the underlying \fBTcl_WaitPid\fR is
|
||||
called with the \fBWNOHANG\fR flag set) unless this switch is set. If \fBpids\fR
|
||||
called with the \fBWNOHANG\fR flag set) unless this switch is set. If \fIpids\fR
|
||||
is specified as a list of PIDs then the command waits until the status of the
|
||||
matching subprocesses are available. If \fBpids\fR is not specified then it
|
||||
waits for all known subprocesses.
|
||||
matching subprocesses are available. If \fIpids\fR was not specified, this
|
||||
command will wait for all known subprocesses.
|
||||
.TP
|
||||
\fB\-\|\-\fR
|
||||
.
|
||||
Marks the end of switches. The argument following this one will
|
||||
be treated as the first \fIarg\fR even if it starts with a \fB\-\fR.
|
||||
.RE
|
||||
.TP
|
||||
\fB::tcl::process purge ?\fIpids\fR?
|
||||
.
|
||||
Cleans up all data associated with terminated subprocesses. If \fBpids\fR is
|
||||
specified as a list of PIDs then the command only cleanup data for the matching
|
||||
subprocesses if they exist, and raises an error otherwise. If the process is
|
||||
still active then it does nothing.
|
||||
.TP
|
||||
\fB::tcl::process autopurge ?\fIflag\fR?
|
||||
.
|
||||
Automatic purge facility. If \fBflag\fR is specified as a boolean value then it
|
||||
activates or deactivate autopurge. In all cases it returns the current status as
|
||||
a boolean value. When autopurge is active, \fBTcl_ReapDetachedProcs\fR is called
|
||||
each time the exec command is executed or a pipe channel created by open is
|
||||
closed. When autopurge is inactive, \fB::tcl::process\fR purge must be called
|
||||
explicitly. By default autopurge is active.
|
||||
.RE
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
These show the use of \fB::tcl::process\fR. Some of the results from
|
||||
\fB::tcl::process status\fR are split over multiple lines for readability.
|
||||
.PP
|
||||
.CS
|
||||
\fB::tcl::process autopurge\fR
|
||||
\fI\(-> true\fR
|
||||
@@ -102,7 +108,12 @@ set pid2 [pid $chan]
|
||||
\fI\(-> 123 456 789 1011\fR
|
||||
|
||||
\fB::tcl::process status\fR
|
||||
\fI\(-> 123 0 456 {1 "child killed: write on pipe with no readers" {CHILDKILLED 456 SIGPIPE "write on pipe with no readers"}} 789 {1 "child suspended: background tty read" {CHILDSUSP 789 SIGTTIN "background tty read"}} 1011 {}\fR
|
||||
\fI\(-> 123 0
|
||||
456 {1 "child killed: write on pipe with no readers" {
|
||||
CHILDKILLED 456 SIGPIPE "write on pipe with no readers"}}
|
||||
789 {1 "child suspended: background tty read" {
|
||||
CHILDSUSP 789 SIGTTIN "background tty read"}}
|
||||
1011 {}\fR
|
||||
|
||||
\fB::tcl::process status\fR 123
|
||||
\fI\(-> 123 0\fR
|
||||
@@ -111,10 +122,17 @@ set pid2 [pid $chan]
|
||||
\fI\(-> 1011 {}\fR
|
||||
|
||||
\fB::tcl::process status\fR -wait
|
||||
\fI\(-> 123 0 456 {1 "child killed: write on pipe with no readers" {CHILDKILLED 456 SIGPIPE "write on pipe with no readers"}} 789 {1 "child suspended: background tty read" {CHILDSUSP 789 SIGTTIN "background tty read"}} 1011 {1 "child process exited abnormally" {CHILDSTATUS 1011 -1}}\fR
|
||||
\fI\(-> 123 0
|
||||
456 {1 "child killed: write on pipe with no readers" {
|
||||
CHILDKILLED 456 SIGPIPE "write on pipe with no readers"}}
|
||||
789 {1 "child suspended: background tty read" {
|
||||
CHILDSUSP 789 SIGTTIN "background tty read"}}
|
||||
1011 {1 "child process exited abnormally" {
|
||||
CHILDSTATUS 1011 -1}}\fR
|
||||
|
||||
\fB::tcl::process status\fR 1011
|
||||
\fI\(-> 1011 {1 "child process exited abnormally" {CHILDSTATUS 1011 -1}}\fR
|
||||
\fI\(-> 1011 {1 "child process exited abnormally" {
|
||||
CHILDSTATUS 1011 -1}}\fR
|
||||
|
||||
\fB::tcl::process purge\fR
|
||||
exec command1 1 2 3 &
|
||||
@@ -123,7 +141,8 @@ exec command1 1 2 3 &
|
||||
\fI\(-> 1213\fR
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
exec(n), open(n), Tcl_DetachPids(3), Tcl_WaitPid(3), Tcl_ReapDetachedProcs(3)
|
||||
exec(n), open(n), pid(n),
|
||||
Tcl_DetachPids(3), Tcl_WaitPid(3), Tcl_ReapDetachedProcs(3)
|
||||
.SH "KEYWORDS"
|
||||
background, child, detach, process, wait
|
||||
'\" Local Variables:
|
||||
|
||||
+1
-1
@@ -375,7 +375,7 @@ value of \fBU+\fI10ffff\fR.
|
||||
.TP
|
||||
\fB\ev\fR
|
||||
.
|
||||
vertical tab, as in C
|
||||
vertical tab, as in C are all available.
|
||||
.TP
|
||||
\fB\ex\fIhh\fR
|
||||
.
|
||||
|
||||
+4
-2
@@ -224,10 +224,12 @@ set string "#08D03F"
|
||||
\fBscan\fR $string "#%2x%2x%2x" r g b
|
||||
.CE
|
||||
.PP
|
||||
Parse a \fIHH:MM\fR time string:
|
||||
Parse a \fIHH:MM\fR time string, noting that this avoids problems with
|
||||
octal numbers by forcing interpretation as decimals (if we did not
|
||||
care, we would use the \fB%i\fR conversion instead):
|
||||
.PP
|
||||
.CS
|
||||
set string "08:08"
|
||||
set string "08:08" ;# *Not* octal!
|
||||
if {[\fBscan\fR $string "%d:%d" hours minutes] != 2} {
|
||||
error "not a valid time string"
|
||||
}
|
||||
|
||||
+11
-5
@@ -12,7 +12,7 @@
|
||||
.SH NAME
|
||||
string \- Manipulate strings
|
||||
.SH SYNOPSIS
|
||||
\fBstring \fIoption arg \fR?\fIarg ...?\fR
|
||||
\fBstring \fIoption arg \fR?\fIarg ...\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -20,7 +20,7 @@ Performs one of several string operations, depending on \fIoption\fR.
|
||||
The legal \fIoption\fRs (which may be abbreviated) are:
|
||||
.TP
|
||||
\fBstring cat\fR ?\fIstring1\fR? ?\fIstring2...\fR?
|
||||
.VS 8.6.2
|
||||
.
|
||||
Concatenate the given \fIstring\fRs just like placing them directly
|
||||
next to each other and return the resulting compound string. If no
|
||||
\fIstring\fRs are present, the result is an empty string.
|
||||
@@ -32,7 +32,6 @@ of a concatenation without resorting to \fBreturn\fR \fB\-level 0\fR,
|
||||
and is more efficient than building a list of arguments and using
|
||||
\fBjoin\fR with an empty join string.
|
||||
.RE
|
||||
.VE
|
||||
.TP
|
||||
\fBstring compare\fR ?\fB\-nocase\fR? ?\fB\-length\fI length\fR? \fIstring1 string2\fR
|
||||
.
|
||||
@@ -111,17 +110,24 @@ Any character with a value less than \eu0080 (those that are in the
|
||||
Any of the forms allowed to \fBTcl_GetBoolean\fR.
|
||||
.IP \fBcontrol\fR 12
|
||||
Any Unicode control character.
|
||||
.IP \fBdict\fR 12
|
||||
.VS TIP501
|
||||
Any proper dict structure, with optional surrounding whitespace. In
|
||||
case of improper dict structure, 0 is returned and the \fIvarname\fR
|
||||
will contain the index of the
|
||||
.QW element
|
||||
where the dict parsing fails, or \-1 if this cannot be determined.
|
||||
.VE TIP501
|
||||
.IP \fBdigit\fR 12
|
||||
Any Unicode digit character. Note that this includes characters
|
||||
outside of the [0\-9] range.
|
||||
.IP \fBdouble\fR 12
|
||||
Any of the forms allowed to \fBTcl_GetDoubleFromObj\fR.
|
||||
.IP \fBentier\fR 12
|
||||
.VS 8.6
|
||||
.
|
||||
Any of the valid string formats for an integer value of arbitrary size
|
||||
in Tcl, with optional surrounding whitespace. The formats accepted are
|
||||
exactly those accepted by the C routine \fBTcl_GetBignumFromObj\fR.
|
||||
.VE
|
||||
.IP \fBfalse\fR 12
|
||||
Any of the forms allowed to \fBTcl_GetBoolean\fR where the value is
|
||||
false.
|
||||
|
||||
+12
-2
@@ -8,7 +8,7 @@
|
||||
'\" See the file "license.terms" for information on usage and redistribution
|
||||
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||
'\"
|
||||
.TH "tcltest" n 2.3 tcltest "Tcl Bundled Packages"
|
||||
.TH "tcltest" n 2.5 tcltest "Tcl Bundled Packages"
|
||||
.so man.macros
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
@@ -16,7 +16,7 @@
|
||||
tcltest \- Test harness support code and utilities
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fBpackage require tcltest\fR ?\fB2.3\fR?
|
||||
\fBpackage require tcltest\fR ?\fB2.5\fR?
|
||||
|
||||
\fBtcltest::test \fIname description\fR ?\fI\-option value ...\fR?
|
||||
\fBtcltest::test \fIname description\fR ?\fIconstraints\fR? \fIbody result\fR
|
||||
@@ -454,6 +454,7 @@ The valid options for \fBtest\fR are summarized:
|
||||
?\fB\-output \fIexpectedOutput\fR?
|
||||
?\fB\-errorOutput \fIexpectedError\fR?
|
||||
?\fB\-returnCodes \fIcodeList\fR?
|
||||
?\fB\-errorCode \fIexpectedErrorCode\fR?
|
||||
?\fB\-match \fImode\fR?
|
||||
.CE
|
||||
.PP
|
||||
@@ -577,6 +578,15 @@ return codes known to \fBreturn\fR, in both numeric and symbolic
|
||||
form, including extended return codes, are acceptable elements in
|
||||
the \fIexpectedCodeList\fR. Default value is
|
||||
.QW "\fBok return\fR" .
|
||||
.TP
|
||||
\fB\-errorCode \fIexpectedErrorCode\fR
|
||||
.
|
||||
The optional \fB\-errorCode\fR attribute supplies \fIexpectedErrorCode\fR,
|
||||
a glob pattern that should match the error code reported from evaluation of the
|
||||
\fB\-body\fR script. If evaluation of the \fB\-body\fR script returns
|
||||
a code not matching \fIexpectedErrorCode\fR, the test fails. Default value is
|
||||
.QW "\fB*\fR" .
|
||||
If \fB\-returnCodes\fR does not include \fBerror\fR it is set to \fBerror\fR.
|
||||
.PP
|
||||
To pass, a test must successfully evaluate its \fB\-setup\fR, \fB\-body\fR,
|
||||
and \fB\-cleanup\fR scripts. The return code of the \fB\-body\fR script and
|
||||
|
||||
+65
-1
@@ -10,7 +10,7 @@
|
||||
.BS
|
||||
'\" Note: do not modify the .SH NAME line immediately below!
|
||||
.SH NAME
|
||||
argc, argv, argv0, auto_path, env, errorCode, errorInfo, tcl_interactive, tcl_library, tcl_nonwordchars, tcl_patchLevel, tcl_pkgPath, tcl_platform, tcl_rcFileName, tcl_traceCompile, tcl_traceExec, tcl_wordchars, tcl_version \- Variables used by Tcl
|
||||
argc, argv, argv0, auto_path, env, errorCode, errorInfo, tcl_interactive, tcl_library, tcl_nonwordchars, tcl_patchLevel, tcl_pkgPath, tcl_platform, tcl_precision, tcl_rcFileName, tcl_traceCompile, tcl_traceExec, tcl_wordchars, tcl_version \- Variables used by Tcl
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
@@ -356,6 +356,70 @@ This gives the size of the native-machine word in bytes (strictly, it
|
||||
is same as the result of evaluating \fIsizeof(long)\fR in C.)
|
||||
.RE
|
||||
.TP
|
||||
\fBtcl_precision\fR
|
||||
.
|
||||
This variable controls the number of digits to generate
|
||||
when converting floating-point values to strings. It defaults
|
||||
to 0. \fIApplications should not change this value;\fR it is
|
||||
provided for compatibility with legacy code.
|
||||
.PP
|
||||
.RS
|
||||
The default value of 0 is special, meaning that Tcl should
|
||||
convert numbers using as few digits as possible while still
|
||||
distinguishing any floating point number from its nearest
|
||||
neighbours. It differs from using an arbitrarily high value
|
||||
for \fItcl_precision\fR in that an inexact number like \fI1.4\fR
|
||||
will convert as \fI1.4\fR rather than \fI1.3999999999999999\fR
|
||||
even though the latter is nearer to the exact value of the
|
||||
binary number.
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
If \fBtcl_precision\fR is not zero, then when Tcl converts a floating
|
||||
point number, it creates a decimal representation of at most
|
||||
\fBtcl_precision\fR significant digits; the result may be shorter if
|
||||
the shorter result represents the original number exactly. If no
|
||||
result of at most \fBtcl_precision\fR digits is an exact representation
|
||||
of the original number, the one that is closest to the original
|
||||
number is chosen.
|
||||
If the original number lies precisely between two equally accurate
|
||||
decimal representations, then the one with an even value for the least
|
||||
significant digit is chosen; for instance, if \fBtcl_precision\fR is 3, then
|
||||
0.3125 will convert to 0.312, not 0.313, while 0.6875 will convert to
|
||||
0.688, not 0.687. Any string of trailing zeroes that remains is trimmed.
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
a \fBtcl_precision\fR value of 17 digits is
|
||||
.QW perfect
|
||||
for IEEE floating-point in that it allows
|
||||
double-precision values to be converted to strings and back to
|
||||
binary with no loss of information. For this reason, you will often
|
||||
see it as a value in legacy code that must run on Tcl versions before
|
||||
8.5. It is no longer recommended; as noted above, a zero value is the
|
||||
preferred method.
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
All interpreters in a thread share a single \fBtcl_precision\fR value:
|
||||
changing it in one interpreter will affect all other interpreters as
|
||||
well. Safe interpreters are not allowed to modify the
|
||||
variable.
|
||||
.RE
|
||||
.PP
|
||||
.RS
|
||||
Valid values for \fBtcl_precision\fR range from 0 to 17.
|
||||
.RE
|
||||
.TP
|
||||
\fBtcl_rcFileName\fR
|
||||
.
|
||||
This variable is used during initialization to indicate the name of a
|
||||
user-specific startup file. If it is set by application-specific
|
||||
initialization, then the Tcl startup code will check for the existence
|
||||
of this file and \fBsource\fR it if it exists. For example, for \fBwish\fR
|
||||
the variable is set to \fB~/.wishrc\fR for Unix and \fB~/wishrc.tcl\fR
|
||||
for Windows.
|
||||
.TP
|
||||
\fBtcl_traceCompile\fR
|
||||
.
|
||||
The value of this variable can be set to control
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ trace \- Monitor variable accesses, command usages and command executions
|
||||
This command causes Tcl commands to be executed whenever certain operations are
|
||||
invoked. The legal \fIoption\fRs (which may be abbreviated) are:
|
||||
.TP
|
||||
\fBtrace add \fItype name ops ?args?\fR
|
||||
\fBtrace add \fItype name ops\fR ?\fIargs\fR?
|
||||
.
|
||||
Where \fItype\fR is \fBcommand\fR, \fBexecution\fR, or \fBvariable\fR.
|
||||
.RS
|
||||
.TP
|
||||
|
||||
+147
-30
@@ -16,10 +16,13 @@ zipfs \- Mount and work with ZIP files within Tcl
|
||||
.nf
|
||||
\fBpackage require zipfs \fR?\fB1.0\fR?
|
||||
.sp
|
||||
\fBzipfs canonical\fR ?\fImntpnt\fR? \fIfilename\fR ?\fIZIPFS\fR?
|
||||
\fBzipfs exists\fR \fIfilename\fR
|
||||
\fBzipfs find\fR \fIdir\fR
|
||||
\fBzipfs find\fR \fIdirectoryName\fR
|
||||
\fBzipfs info\fR \fIfilename\fR
|
||||
\fBzipfs list\fR ?(\fB\-glob\fR|\fB\-regexp\fR)? ?\fIpattern\fR?
|
||||
\fBzipfs lmkimg\fR \fIoutfile inlist\fR ?\fIpassword infile\fR?
|
||||
\fBzipfs lmkzip\fR \fIoutfile inlist\fR ?\fIpassword\fR?
|
||||
\fBzipfs mkimg\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR? ?\fIinfile\fR?
|
||||
\fBzipfs mkkey\fR \fIpassword\fR
|
||||
\fBzipfs mkzip\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR?
|
||||
@@ -27,21 +30,33 @@ zipfs \- Mount and work with ZIP files within Tcl
|
||||
\fBzipfs root\fR
|
||||
\fBzipfs unmount\fR \fImountpoint\fR
|
||||
.fi
|
||||
'\" The following subcommand is *UNDOCUMENTED*
|
||||
'\" \fBzipfs mount_data\fR ?\fImountpoint\fR? ?\fIdata\fR?
|
||||
.BE
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fBzipfs\fR command (the sole public command provided by the built-in
|
||||
package with the same name) provides Tcl with the ability to mount the
|
||||
contents of a ZIP file as a virtual file system.
|
||||
contents of a ZIP archive file as a virtual file system. ZIP archives support
|
||||
simple encryption, sufficient to prevent casual inspection of their contents
|
||||
but not able to prevent access by even a moderately determined attacker.
|
||||
.TP
|
||||
\fBzipfs canonical\fR ?\fImountpoint\fR? \fIfilename\fR ?\fIinZipfs\fR?
|
||||
.
|
||||
This takes the name of a file, \fIfilename\fR, and produces where it would be
|
||||
mapped into a zipfs mount as its result. If specified, \fImountpoint\fR says
|
||||
within which mount the mapping will be done; if omitted, the main root of the
|
||||
zipfs system is used. The \fIinZipfs\fR argument is a an optional boolean
|
||||
which controls whether to fully canonicalise the name; it defaults to true.
|
||||
.TP
|
||||
\fBzipfs exists\fR \fIfilename\fR
|
||||
.
|
||||
Return 1 if the given filename exists in the mounted zipfs and 0 if it does not.
|
||||
.TP
|
||||
\fBzipfs find\fR \fIdir\fR
|
||||
\fBzipfs find\fR \fIdirectoryName\fR
|
||||
.
|
||||
Recursively lists files including and below the directory \fIdir\fR. The
|
||||
result list consists of relative path names starting from the given
|
||||
Recursively lists files including and below the directory \fIdirectoryName\fR.
|
||||
The result list consists of relative path names starting from the given
|
||||
directory. This command is also used by the \fBzipfs mkzip\fR and \fBzipfs
|
||||
mkimg\fR commands.
|
||||
.TP
|
||||
@@ -63,7 +78,7 @@ Note: querying the mount point gives the start of the zip data as the offset
|
||||
in (4), which can be used to truncate the zip information from an executable.
|
||||
.RE
|
||||
.TP
|
||||
\fBzipfs list\fR ?(\fB\-glob\fR|\fB\-regexp\fR)? \fI?pattern?\fR
|
||||
\fBzipfs list\fR ?(\fB\-glob\fR|\fB\-regexp\fR)? ?\fIpattern\fR?
|
||||
.
|
||||
Return a list of all files in the mounted zipfs, or just those matching
|
||||
\fIpattern\fR (optionally controlled by the option parameters). The order of
|
||||
@@ -79,6 +94,13 @@ in \fIzipfile\fR will appear to Tcl to be regular files at the mount point.
|
||||
With no \fIzipfile\fR, returns the zipfile mounted at \fImountpoint\fR. With
|
||||
no \fImountpoint\fR, return all zipfile/mount pairs. If \fImountpoint\fR is
|
||||
specified as an empty string, mount on file path.
|
||||
.PP
|
||||
\fBNB:\fR because the current working directory is a concept maintained by the
|
||||
operating system, using \fBcd\fR into a mounted archive will only work in the
|
||||
current process, and then not entirely consistently (e.g., if a shared library
|
||||
uses direct access to the OS rather than through Tcl's filesystem API, it will
|
||||
not see the current directory as being inside the mount and will not be able
|
||||
to access the files inside the mount).
|
||||
.RE
|
||||
.TP
|
||||
\fBzipfs root\fR
|
||||
@@ -97,40 +119,135 @@ Unmounts a previously mounted ZIP archive mounted to \fImountpoint\fR.
|
||||
This package also provides several commands to aid the creation of ZIP
|
||||
archives as Tcl applications.
|
||||
.TP
|
||||
\fBzipfs mkimg\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR? ?\fIinfile\fR?
|
||||
.
|
||||
Creates an image (potentially a new executable file) similar to \fBzipfs
|
||||
mkzip\fR. If the \fIinfile\fR parameter is specified, this file is prepended
|
||||
in front of the ZIP archive, otherwise the file returned by
|
||||
\fBinfo nameofexecutable\fR (i.e., the executable file of the running process)
|
||||
is used. If the \fIpassword\fR parameter is not empty, an obfuscated version
|
||||
of that password is placed between the image and ZIP chunks of the output file
|
||||
and the contents of the ZIP chunk are protected with that password.
|
||||
.RS
|
||||
.PP
|
||||
Caution: highly experimental, not usable on Android, only partially tested on
|
||||
Linux and Windows.
|
||||
.RE
|
||||
.TP
|
||||
\fBzipfs mkkey\fR \fIpassword\fR
|
||||
.
|
||||
For the clear text \fIpassword\fR argument, an obfuscated string version is
|
||||
returned with the same format used in the \fBzipfs mkimg\fR command.
|
||||
.TP
|
||||
\fBzipfs mkzip\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR?
|
||||
.
|
||||
Creates a ZIP archive file named \fIoutfile\fR from the contents of the input
|
||||
directory \fIindir\fR (contained regular files only) with optional ZIP
|
||||
password \fIpassword\fR. While processing the files below \fIindir\fR the
|
||||
optional file name prefix given in \fIstrip\fR is stripped off the beginning
|
||||
of the respective file name.
|
||||
of the respective file name. When stripping, it is common to remove either
|
||||
the whole source directory name or the name of its parent directory.
|
||||
.RS
|
||||
.PP
|
||||
Caution: the choice of the \fIindir\fR parameter (less the optional stripped
|
||||
prefix) determines the later root name of the archive's content.
|
||||
\fBCaution:\fR the choice of the \fIindir\fR parameter (less the optional
|
||||
stripped prefix) determines the later root name of the archive's content.
|
||||
.RE
|
||||
.TP
|
||||
\fBzipfs mkimg\fR \fIoutfile indir\fR ?\fIstrip\fR? ?\fIpassword\fR? ?\fIinfile\fR?
|
||||
.
|
||||
Creates an image (potentially a new executable file) similar to \fBzipfs
|
||||
mkzip\fR; see that command for a description of most parameters to this
|
||||
command, as they behave identically here.
|
||||
.RS
|
||||
.PP
|
||||
If the \fIinfile\fR parameter is specified, this file is prepended in front of
|
||||
the ZIP archive, otherwise the file returned by \fBinfo nameofexecutable\fR
|
||||
(i.e., the executable file of the running process) is used. If the
|
||||
\fIpassword\fR parameter is not empty, an obfuscated version of that password
|
||||
(see \fBzipfs mkkey\fR) is placed between the image and ZIP chunks of the
|
||||
output file and the contents of the ZIP chunk are protected with that
|
||||
password.
|
||||
.PP
|
||||
If there is a file, \fBmain.tcl\fR, in the root directory of the resulting
|
||||
archive and the image file that the archive is attached to is a \fBtclsh\fR
|
||||
(or \fBwish\fR) instance (true by default, but depends on your configuration),
|
||||
then the resulting image is an executable that will \fBsource\fR the script in
|
||||
that \fBmain.tcl\fR after mounting the ZIP archive, and will \fBexit\fR once
|
||||
that script has been executed.
|
||||
.PP
|
||||
\fBCaution:\fR highly experimental, not usable on Android, only partially
|
||||
tested on Linux and Windows.
|
||||
.RE
|
||||
.TP
|
||||
\fBzipfs mkkey\fR \fIpassword\fR
|
||||
.
|
||||
Given the clear text \fIpassword\fR argument, an obfuscated string version is
|
||||
returned with the same format used in the \fBzipfs mkimg\fR command.
|
||||
.TP
|
||||
\fBzipfs lmkimg\fR \fIoutfile inlist\fR ?\fIpassword infile\fR?
|
||||
.
|
||||
This command is like \fBzipfs mkimg\fR, but instead of an input directory,
|
||||
\fIinlist\fR must be a Tcl list where the odd elements are the names of files
|
||||
to be copied into the archive in the image, and the even elements are their
|
||||
respective names within that archive.
|
||||
.TP
|
||||
\fBzipfs lmkzip\fR \fIoutfile inlist\fR ?\fIpassword\fR?
|
||||
.
|
||||
This command is like \fBzipfs mkzip\fR, but instead of an input directory,
|
||||
\fIinlist\fR must be a Tcl list where the odd elements are the names of files
|
||||
to be copied into the archive, and the even elements are their respective
|
||||
names within that archive.
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
Mounting an ZIP archive as an application directory and running code out of it
|
||||
before unmounting it again:
|
||||
.PP
|
||||
.CS
|
||||
set zip myApp.zip
|
||||
set base [file join [\fbzipfs root\fR] myApp]
|
||||
|
||||
\fBzipfs mount\fR $base $zip
|
||||
# $base now has the contents of myApp.zip
|
||||
|
||||
source [file join $base app.tcl]
|
||||
# use the contents, load libraries from it, etc...
|
||||
|
||||
\fBzipfs unmount\fR $zip
|
||||
.CE
|
||||
.PP
|
||||
Creating a ZIP archive, given that a directory exists containing the content
|
||||
to put in the archive. Note that the source directory is given twice, in order
|
||||
to strip the exterior directory name from each filename in the archive.
|
||||
.PP
|
||||
.CS
|
||||
set sourceDirectory [file normalize myApp]
|
||||
set targetZip myApp.zip
|
||||
|
||||
\fBzipfs mkzip\fR $targetZip $sourceDirectory $sourceDirectory
|
||||
.CE
|
||||
.PP
|
||||
Encryption can be applied to ZIP archives by providing a password when
|
||||
building the ZIP and when mounting it.
|
||||
.PP
|
||||
.CS
|
||||
set zip myApp.zip
|
||||
set sourceDir [file normalize myApp]
|
||||
set password "hunter2"
|
||||
set base [file join [\fbzipfs root\fR] myApp]
|
||||
|
||||
# Create with password
|
||||
\fBzipfs mkzip\fR $targetZip $sourceDir $sourceDir $password
|
||||
|
||||
# Mount with password
|
||||
\fBzipfs mount\fR $base $zip $password
|
||||
.CE
|
||||
.PP
|
||||
When creating an executable image with a password, the password is placed
|
||||
within the executable in a shrouded form so that the application can read
|
||||
files inside the embedded ZIP archive yet casual inspection cannot read it.
|
||||
.PP
|
||||
.CS
|
||||
set appDir [file normalize myApp]
|
||||
set img "myApp.bin"
|
||||
set password "hunter2"
|
||||
|
||||
# Create some simple content to define a basic application
|
||||
file mkdir $appDir
|
||||
set f [open $appDir/main.tcl]
|
||||
puts $f {
|
||||
puts "Hi. This is [info script]"
|
||||
}
|
||||
close $f
|
||||
|
||||
# Create the executable
|
||||
\fBzipfs mkimg\fR $img $appDir $appDir $password
|
||||
|
||||
# Launch the executable, printing its output to stdout
|
||||
exec $img >@stdout
|
||||
# prints: \fIHi. This is //zipfs:/app/main.tcl\fR
|
||||
.CE
|
||||
.SH "SEE ALSO"
|
||||
tclsh(1), file(n), zlib(n)
|
||||
tclsh(1), file(n), zipfs(3), zlib(n)
|
||||
.SH "KEYWORDS"
|
||||
compress, filesystem, zip
|
||||
'\" Local Variables:
|
||||
|
||||
@@ -828,7 +828,7 @@ element(
|
||||
*/
|
||||
|
||||
Tcl_DStringInit(&ds);
|
||||
np = Tcl_UniCharToUtfDString(startp, len, &ds);
|
||||
np = Tcl_UniCharToUtfDString(startp, (int)len, &ds);
|
||||
for (cn=cnames; cn->name!=NULL; cn++) {
|
||||
if (strlen(cn->name)==len && strncmp(cn->name, np, len)==0) {
|
||||
break; /* NOTE BREAK OUT */
|
||||
@@ -1000,7 +1000,7 @@ cclass(
|
||||
|
||||
len = endp - startp;
|
||||
Tcl_DStringInit(&ds);
|
||||
np = Tcl_UniCharToUtfDString(startp, len, &ds);
|
||||
np = Tcl_UniCharToUtfDString(startp, (int)len, &ds);
|
||||
|
||||
/*
|
||||
* Map the name to the corresponding enumerated value.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user