Compare commits
106
Commits
http3
...
bll-array-for
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8cae66217 | ||
|
|
40ce2eccbc | ||
|
|
9306fa604c | ||
|
|
745b43f627 | ||
|
|
f18d453679 | ||
|
|
2332ac45ca | ||
|
|
4407704316 | ||
|
|
cdb25d8946 | ||
|
|
df974e71f9 | ||
|
|
7393032d5e | ||
|
|
252f75d8c8 | ||
|
|
69030a86c8 | ||
|
|
5b74714749 | ||
|
|
15a7950c9e | ||
|
|
75ecb090c6 | ||
|
|
b8e5e2909e | ||
|
|
d45863129f | ||
|
|
db3273f346 | ||
|
|
a15279ffd1 | ||
|
|
e08c86934d | ||
|
|
e3f7bc2783 | ||
|
|
564b991088 | ||
|
|
0ff317501d | ||
|
|
f42f0060be | ||
|
|
3ec5b35deb | ||
|
|
7afc6b1c17 | ||
|
|
ce58cdff9f | ||
|
|
e28f1eece4 | ||
|
|
25b97a7df9 | ||
|
|
11719ccf59 | ||
|
|
7c7a396fc5 | ||
|
|
a95a7dd265 | ||
|
|
5210283d10 | ||
|
|
29be40bf89 | ||
|
|
a04094e9a5 | ||
|
|
13d9910fd6 | ||
|
|
277f101d7f | ||
|
|
a50a381b04 | ||
|
|
e513ec3916 | ||
|
|
89fcfadbbf | ||
|
|
8ccd8d10ef | ||
|
|
c2982f8f62 | ||
|
|
545f5e64be | ||
|
|
385b618c74 | ||
|
|
3a07a6d26f | ||
|
|
df9ea61fbf | ||
|
|
5f7ca471e4 | ||
|
|
ac8ddf5d4a | ||
|
|
6da97c627b | ||
|
|
735ca3d3a8 | ||
|
|
72396a1929 | ||
|
|
816674cdb7 | ||
|
|
6bcfd54d3a | ||
|
|
b095f046e6 | ||
|
|
cee94b0658 | ||
|
|
f94f5914a8 | ||
|
|
440dbbf620 | ||
|
|
b1243f2603 | ||
|
|
f553fe3b01 | ||
|
|
578eeb06bc | ||
|
|
515f0f32c0 | ||
|
|
bcb9c34521 | ||
|
|
ac0fdb5bf8 | ||
|
|
2ee7180448 | ||
|
|
5541cc57f7 | ||
|
|
692ea37c40 | ||
|
|
d0996f3402 | ||
|
|
39356c4079 | ||
|
|
89f6884455 | ||
|
|
5314bbe0ef | ||
|
|
5b2c81a0f3 | ||
|
|
f242dd36bd | ||
|
|
fb2aa596ab | ||
|
|
5621809b18 | ||
|
|
7a8a4b15c4 | ||
|
|
f4615ea166 | ||
|
|
9983a05a80 | ||
|
|
952acc3754 | ||
|
|
94754be1d7 | ||
|
|
6168d91b0e | ||
|
|
16f3f234e8 | ||
|
|
f8bc248cc3 | ||
|
|
f165025992 | ||
|
|
8a90be9a10 | ||
|
|
2f9e40fef1 | ||
|
|
0d218fca03 | ||
|
|
f9d42ebf8c | ||
|
|
0177abb172 | ||
|
|
77822d9462 | ||
|
|
78a7a5b561 | ||
|
|
7fde7fcf7b | ||
|
|
cdccb19d1c | ||
|
|
a3fdca376e | ||
|
|
d2595ccfea | ||
|
|
5b059dfd6b | ||
|
|
1a3c0d9be9 | ||
|
|
1e22d92c69 | ||
|
|
f3a4ae987d | ||
|
|
5e45fd7662 | ||
|
|
d7802b428a | ||
|
|
b8d35358ad | ||
|
|
daac4e5d34 | ||
|
|
57ceb807ca | ||
|
|
91d32c4556 | ||
|
|
e9e0f57d92 | ||
|
|
f090fee89b |
@@ -3,6 +3,9 @@ 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
|
||||
|
||||
@@ -3,6 +3,9 @@ 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
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/tclsh*
|
||||
*/tcltest*
|
||||
*/versions.vc
|
||||
*/version.vc
|
||||
html
|
||||
libtommath/bn.ilg
|
||||
libtommath/bn.ind
|
||||
@@ -40,7 +41,8 @@ unix/dltest.marker
|
||||
unix/tcl.pc
|
||||
unix/tclIndex
|
||||
unix/pkgs/*
|
||||
win/Debug_VC*
|
||||
win/Release_VC*
|
||||
win/Debug*
|
||||
win/Release*
|
||||
win/pkgs/*
|
||||
win/tcl.hpj
|
||||
win/tcl.hpj
|
||||
win/nmhlp-out.txt
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
README: Tcl
|
||||
This is the Tcl 8.6.6 source distribution.
|
||||
This is the Tcl 8.6.7 source distribution.
|
||||
http://sourceforge.net/projects/tcl/files/Tcl/
|
||||
You can get any source release of Tcl from the URL above.
|
||||
|
||||
|
||||
@@ -8698,3 +8698,103 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
|
||||
2016-07-20 tzdata updated to Olson's tzdata2016f (venkat)
|
||||
|
||||
--- Released 8.6.6, July 27, 2016 --- http://core.tcl.tk/tcl/ for details
|
||||
|
||||
2016-09-07 (bug)[c09edf] Bad caching with custom resolver (neumann,nijtmans)
|
||||
|
||||
2016-09-07 (bug)[4dbdd9] Memleak in test var-8.3 (mr_calvin,porter)
|
||||
|
||||
2016-10-03 (bug)[2bf561] Allow empty command as alias target (yorick,nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2016-10-04 (bug)[4d5ae7] Crash in async connects host no address (gahr,fellows)
|
||||
|
||||
2016-10-08 (bug)[838e99] treat application/xml as text (gahr,fellows)
|
||||
=> http 2.8.10
|
||||
|
||||
2016-10-11 (bug)[3cc1d9] Thread finalization crash in zippy (neumann)
|
||||
|
||||
2016-10-12 (bug)[be003d] Fix [scan 0x1 %b], [scan 0x1 %o] (porter)
|
||||
|
||||
2016-10-14 (bug)[eb6b68] Fix stringComp-14.5 (porter)
|
||||
|
||||
2016-10-30 (bug)[b26e38] Fix zlib-7.8 (fellows)
|
||||
|
||||
2016-10-30 (bug)[1ae129] Fix memleak in [history] destruction (fellows)
|
||||
|
||||
2016-11-04 (feature) Provisional Tcl 9 support in msgcat and tcltest (nijtmans)
|
||||
=> msgcat 1.6.1
|
||||
=> tcltest 2.4.1
|
||||
|
||||
2016-11-04 (bug)[824752] Crash in Tcl_ListObjReplace() (gahr,porter)
|
||||
|
||||
2016-11-11 (bug)[79614f] invalidate VFS mounts on sytem encoding change (yorick)
|
||||
|
||||
2016-11-14 OSX: End panic() as legacy support macro; system conflicts (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2016-11-15 (bug) TclOO fix stops crash mixing Itcl and snit (fellows)
|
||||
|
||||
2016-11-17 (update) Reconcile libtommath updates; purge unused files (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2017-01-09 (bug)[b87ad7] Repair drifts in timer clock (sebres)
|
||||
|
||||
2017-01-17 (update) => zlib 1.2.11 (nijtmans)
|
||||
|
||||
2017-01-31 (bug)[39f630] Revise Tcl_LinkVar to tolerate some prefixes (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2017-02-01 (bug)[d0f7ba] Improper NAN optimization. expr-22.1[01] (aspect)
|
||||
|
||||
2017-02-26 (bug)[25842c] zlib stream finalization (aspect)
|
||||
|
||||
2017-03-07 (deprecate) Remove unmaintained makefile.bc file (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2017-03-14 (enhancement) [clock] and [encoding] are now ensembles (kenny)
|
||||
|
||||
2017-03-15 (enhancement) several [clock] subcommands bytecoded (kenny)
|
||||
|
||||
2017-03-23 tzdata updated to Olson's tzdata2017b (jima)
|
||||
|
||||
2017-03-29 (bug)[900cb0] Fix OO unexport introspection (napier)
|
||||
|
||||
2017-04-12 (bug)[42202b] Nesting imbalance in coro injection (nadkarni,sebres)
|
||||
|
||||
2017-04-18 (bug)[bc4322] http package support for safe interps (nash,nijtmans)
|
||||
|
||||
2017-04-28 (bug)[f34cf8] [file join a //b] => /b (neumann,porter)
|
||||
|
||||
2017-05-01 (bug)[8bd13f] Windows threads and pipes (sebres,nijtmans)
|
||||
|
||||
2017-05-01 (bug)[f9fe90] [file join //a b] EIAS violation (aspect,porter)
|
||||
|
||||
2017-05-04 (bug) Make test filesystem-1.52 pass on Windows (nijtmans)
|
||||
|
||||
2017-05-05 (bug)[601522] [binary] field spec overflow -> segfault (porter)
|
||||
|
||||
2017-05-08 (bug)[6ca52a] http memleak handling keep-alive (aspect,nijtmans)
|
||||
=> http 2.8.11
|
||||
|
||||
2017-05-29 (bug)[a3fb33] crash in [lsort] on long lists (sebres)
|
||||
|
||||
2017-06-05 (bug)[67aa9a] Tcl_UtfToUniChar() revised handling invalid UTF-8 (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2017-06-08 (bug)[2738427] Tcl_NumUtfChars() corner case utf-4.9 (nijtmans)
|
||||
|
||||
2017-06-22 (update) Update Unicode data to 10.0 (nijtmans)
|
||||
*** POTENTIAL INCOMPATIBILITY ***
|
||||
|
||||
2017-06-22 (TIP 473) Let [oo::copy] specify target namespace (fellows)
|
||||
|
||||
2017-06-26 (bug)[46f801] Repair autoloader fragility (porter)
|
||||
|
||||
2017-07-06 (bug)[adb198] Plug memleak in TclJoinPath (sebres,porter)
|
||||
|
||||
2017-07-17 (bug)[fb2208] Repeatable tclIndex generation (wiedemann,nijtmans)
|
||||
|
||||
--- Released 8.6.7, August 9, 2017 --- http://core.tcl.tk/tcl/ for details
|
||||
|
||||
2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann)
|
||||
=> http 2.8.12
|
||||
|
||||
@@ -47,6 +47,13 @@ been the return value from a previous invocation of
|
||||
Returns 1 if \fIarrayName\fR is an array variable, 0 if there
|
||||
is no variable by that name or if it is a scalar variable.
|
||||
.TP
|
||||
\fBarray for {\fIkeyVariable ?valueVariable?\fB} \fIarrayName body\fR
|
||||
The first argument is a one or two element list of variable names for the
|
||||
key and value of each entry in the array. The second argument is the
|
||||
array name to iterate over. The third argument is the body to execute
|
||||
for each key and value returned.
|
||||
The ordering of the returned keys is undefined.
|
||||
.TP
|
||||
\fBarray get \fIarrayName\fR ?\fIpattern\fR?
|
||||
Returns a list containing pairs of elements. The first
|
||||
element in each pair is the name of an element in \fIarrayName\fR
|
||||
|
||||
+2
-2
@@ -55,10 +55,10 @@ extern "C" {
|
||||
#define TCL_MAJOR_VERSION 8
|
||||
#define TCL_MINOR_VERSION 6
|
||||
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
|
||||
#define TCL_RELEASE_SERIAL 6
|
||||
#define TCL_RELEASE_SERIAL 7
|
||||
|
||||
#define TCL_VERSION "8.6"
|
||||
#define TCL_PATCH_LEVEL "8.6.6"
|
||||
#define TCL_PATCH_LEVEL "8.6.7"
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
|
||||
+104
-62
@@ -2042,11 +2042,11 @@ Tcl_CreateCommand(
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
ImportRef *oldRefPtr = NULL;
|
||||
Namespace *nsPtr, *dummy1, *dummy2;
|
||||
Command *cmdPtr, *refCmdPtr;
|
||||
Namespace *nsPtr;
|
||||
Command *cmdPtr;
|
||||
Tcl_HashEntry *hPtr;
|
||||
const char *tail;
|
||||
int isNew;
|
||||
int isNew = 0, deleted = 0;
|
||||
ImportedCmdData *dataPtr;
|
||||
|
||||
if (iPtr->flags & DELETED) {
|
||||
@@ -2059,32 +2059,52 @@ Tcl_CreateCommand(
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine where the command should reside. If its name contains
|
||||
* namespace qualifiers, we put it in the specified namespace; otherwise,
|
||||
* we always put it in the global namespace.
|
||||
* If the command name we seek to create already exists, we need to
|
||||
* delete that first. That can be tricky in the presence of traces.
|
||||
* Loop until we no longer find an existing command in the way, or
|
||||
* until we've deleted one command and that didn't finish the job.
|
||||
*/
|
||||
|
||||
if (strstr(cmdName, "::") != NULL) {
|
||||
TclGetNamespaceForQualName(interp, cmdName, NULL,
|
||||
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
|
||||
if ((nsPtr == NULL) || (tail == NULL)) {
|
||||
return (Tcl_Command) NULL;
|
||||
}
|
||||
} else {
|
||||
nsPtr = iPtr->globalNsPtr;
|
||||
tail = cmdName;
|
||||
}
|
||||
while (1) {
|
||||
/*
|
||||
* Determine where the command should reside. If its name contains
|
||||
* namespace qualifiers, we put it in the specified namespace;
|
||||
* otherwise, we always put it in the global namespace.
|
||||
*/
|
||||
|
||||
if (strstr(cmdName, "::") != NULL) {
|
||||
Namespace *dummy1, *dummy2;
|
||||
|
||||
TclGetNamespaceForQualName(interp, cmdName, NULL,
|
||||
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
|
||||
if ((nsPtr == NULL) || (tail == NULL)) {
|
||||
return (Tcl_Command) NULL;
|
||||
}
|
||||
} else {
|
||||
nsPtr = iPtr->globalNsPtr;
|
||||
tail = cmdName;
|
||||
}
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
|
||||
if (isNew || deleted) {
|
||||
/*
|
||||
* isNew - No conflict with existing command.
|
||||
* deleted - We've already deleted a conflicting command
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
/* An existing command conflicts. Try to delete it.. */
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
if (!isNew) {
|
||||
/*
|
||||
* Command already exists. Delete the old one. Be careful to preserve
|
||||
* Be careful to preserve
|
||||
* any existing import links so we can restore them down below. That
|
||||
* way, you can redefine a command and its import status will remain
|
||||
* intact.
|
||||
*/
|
||||
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
cmdPtr->refCount++;
|
||||
if (cmdPtr->importRefPtr) {
|
||||
cmdPtr->flags |= CMD_REDEF_IN_PROGRESS;
|
||||
@@ -2097,18 +2117,21 @@ Tcl_CreateCommand(
|
||||
cmdPtr->importRefPtr = NULL;
|
||||
}
|
||||
TclCleanupCommandMacro(cmdPtr);
|
||||
deleted = 1;
|
||||
}
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
if (!isNew) {
|
||||
/*
|
||||
* If the deletion callback recreated the command, just throw away
|
||||
* the new command (if we try to delete it again, we could get
|
||||
* stuck in an infinite loop).
|
||||
*/
|
||||
if (!isNew) {
|
||||
/*
|
||||
* If the deletion callback recreated the command, just throw away
|
||||
* the new command (if we try to delete it again, we could get
|
||||
* stuck in an infinite loop).
|
||||
*/
|
||||
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
}
|
||||
|
||||
if (!deleted) {
|
||||
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* Command resolvers (per-interp, per-namespace) might have resolved
|
||||
* to a command for the given namespace scope with this command not
|
||||
@@ -2156,7 +2179,7 @@ Tcl_CreateCommand(
|
||||
if (oldRefPtr != NULL) {
|
||||
cmdPtr->importRefPtr = oldRefPtr;
|
||||
while (oldRefPtr != NULL) {
|
||||
refCmdPtr = oldRefPtr->importedCmdPtr;
|
||||
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
|
||||
dataPtr = refCmdPtr->objClientData;
|
||||
dataPtr->realCmdPtr = cmdPtr;
|
||||
oldRefPtr = oldRefPtr->nextPtr;
|
||||
@@ -2217,11 +2240,11 @@ Tcl_CreateObjCommand(
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
ImportRef *oldRefPtr = NULL;
|
||||
Namespace *nsPtr, *dummy1, *dummy2;
|
||||
Command *cmdPtr, *refCmdPtr;
|
||||
Namespace *nsPtr;
|
||||
Command *cmdPtr;
|
||||
Tcl_HashEntry *hPtr;
|
||||
const char *tail;
|
||||
int isNew;
|
||||
int isNew = 0, deleted = 0;
|
||||
ImportedCmdData *dataPtr;
|
||||
|
||||
if (iPtr->flags & DELETED) {
|
||||
@@ -2234,29 +2257,45 @@ Tcl_CreateObjCommand(
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine where the command should reside. If its name contains
|
||||
* namespace qualifiers, we put it in the specified namespace; otherwise,
|
||||
* we always put it in the global namespace.
|
||||
* If the command name we seek to create already exists, we need to
|
||||
* delete that first. That can be tricky in the presence of traces.
|
||||
* Loop until we no longer find an existing command in the way, or
|
||||
* until we've deleted one command and that didn't finish the job.
|
||||
*/
|
||||
|
||||
if (strstr(cmdName, "::") != NULL) {
|
||||
TclGetNamespaceForQualName(interp, cmdName, NULL,
|
||||
while (1) {
|
||||
/*
|
||||
* Determine where the command should reside. If its name contains
|
||||
* namespace qualifiers, we put it in the specified namespace;
|
||||
* otherwise, we always put it in the global namespace.
|
||||
*/
|
||||
|
||||
if (strstr(cmdName, "::") != NULL) {
|
||||
Namespace *dummy1, *dummy2;
|
||||
|
||||
TclGetNamespaceForQualName(interp, cmdName, NULL,
|
||||
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
|
||||
if ((nsPtr == NULL) || (tail == NULL)) {
|
||||
return (Tcl_Command) NULL;
|
||||
}
|
||||
} else {
|
||||
nsPtr = iPtr->globalNsPtr;
|
||||
tail = cmdName;
|
||||
}
|
||||
if ((nsPtr == NULL) || (tail == NULL)) {
|
||||
return (Tcl_Command) NULL;
|
||||
}
|
||||
} else {
|
||||
nsPtr = iPtr->globalNsPtr;
|
||||
tail = cmdName;
|
||||
}
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
TclInvalidateNsPath(nsPtr);
|
||||
if (!isNew) {
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
|
||||
if (isNew || deleted) {
|
||||
/*
|
||||
* isNew - No conflict with existing command.
|
||||
* deleted - We've already deleted a conflicting command
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
/* An existing command conflicts. Try to delete it.. */
|
||||
cmdPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
/* Command already exists. */
|
||||
|
||||
/*
|
||||
* [***] This is wrong. See Tcl Bug a16752c252.
|
||||
* However, this buggy behavior is kept under particular
|
||||
@@ -2293,18 +2332,20 @@ Tcl_CreateObjCommand(
|
||||
cmdPtr->importRefPtr = NULL;
|
||||
}
|
||||
TclCleanupCommandMacro(cmdPtr);
|
||||
deleted = 1;
|
||||
}
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
|
||||
if (!isNew) {
|
||||
/*
|
||||
* If the deletion callback recreated the command, just throw away
|
||||
* the new command (if we try to delete it again, we could get
|
||||
* stuck in an infinite loop).
|
||||
*/
|
||||
if (!isNew) {
|
||||
/*
|
||||
* If the deletion callback recreated the command, just throw away
|
||||
* the new command (if we try to delete it again, we could get
|
||||
* stuck in an infinite loop).
|
||||
*/
|
||||
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
}
|
||||
} else {
|
||||
ckfree(Tcl_GetHashValue(hPtr));
|
||||
}
|
||||
|
||||
if (!deleted) {
|
||||
/*
|
||||
* Command resolvers (per-interp, per-namespace) might have resolved
|
||||
* to a command for the given namespace scope with this command not
|
||||
@@ -2324,6 +2365,7 @@ Tcl_CreateObjCommand(
|
||||
*/
|
||||
|
||||
TclInvalidateNsCmdLookup(nsPtr);
|
||||
TclInvalidateNsPath(nsPtr);
|
||||
}
|
||||
cmdPtr = ckalloc(sizeof(Command));
|
||||
Tcl_SetHashValue(hPtr, cmdPtr);
|
||||
@@ -2351,7 +2393,7 @@ Tcl_CreateObjCommand(
|
||||
if (oldRefPtr != NULL) {
|
||||
cmdPtr->importRefPtr = oldRefPtr;
|
||||
while (oldRefPtr != NULL) {
|
||||
refCmdPtr = oldRefPtr->importedCmdPtr;
|
||||
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
|
||||
dataPtr = refCmdPtr->objClientData;
|
||||
dataPtr->realCmdPtr = cmdPtr;
|
||||
oldRefPtr = oldRefPtr->nextPtr;
|
||||
|
||||
+3
-3
@@ -454,7 +454,7 @@ SetByteArrayFromAny(
|
||||
const char *src, *srcEnd;
|
||||
unsigned char *dst;
|
||||
ByteArray *byteArrayPtr;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
if (objPtr->typePtr != &tclByteArrayType) {
|
||||
src = TclGetStringFromObj(objPtr, &length);
|
||||
@@ -1210,7 +1210,7 @@ BinaryFormatCmd(
|
||||
|
||||
badField:
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
char buf[TCL_UTF_MAX + 1];
|
||||
|
||||
TclUtfToUniChar(errorString, &ch);
|
||||
@@ -1580,7 +1580,7 @@ BinaryScanCmd(
|
||||
|
||||
badField:
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
char buf[TCL_UTF_MAX + 1];
|
||||
|
||||
TclUtfToUniChar(errorString, &ch);
|
||||
|
||||
+1
-1
@@ -4345,7 +4345,7 @@ static int
|
||||
DictionaryCompare(
|
||||
const char *left, const char *right) /* The strings to compare. */
|
||||
{
|
||||
Tcl_UniChar uniLeft, uniRight, uniLeftLower, uniRightLower;
|
||||
Tcl_UniChar uniLeft = 0, uniRight = 0, uniLeftLower, uniRightLower;
|
||||
int diff, zeros;
|
||||
int secondaryDiff = 0;
|
||||
|
||||
|
||||
+5
-5
@@ -1037,7 +1037,7 @@ Tcl_SplitObjCmd(
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int len;
|
||||
const char *splitChars;
|
||||
const char *stringPtr;
|
||||
@@ -1122,7 +1122,7 @@ Tcl_SplitObjCmd(
|
||||
} else {
|
||||
const char *element, *p, *splitEnd;
|
||||
int splitLen;
|
||||
Tcl_UniChar splitChar;
|
||||
Tcl_UniChar splitChar = 0;
|
||||
|
||||
/*
|
||||
* Normal case: split on any of a given set of characters. Discard
|
||||
@@ -1451,7 +1451,7 @@ StringIsCmd(
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
const char *string1, *end, *stop;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int (*chcomp)(int) = NULL; /* The UniChar comparison function. */
|
||||
int i, failat = 0, result = 1, strict = 0, index, length1, length2;
|
||||
Tcl_Obj *objPtr, *failVarObj = NULL;
|
||||
@@ -2436,7 +2436,7 @@ StringStartCmd(
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
const char *p, *string;
|
||||
int cur, index, length, numChars;
|
||||
|
||||
@@ -2497,7 +2497,7 @@ StringEndCmd(
|
||||
int objc, /* Number of arguments. */
|
||||
Tcl_Obj *const objv[]) /* Argument objects. */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
const char *p, *end, *string;
|
||||
int cur, index, length, numChars;
|
||||
|
||||
|
||||
@@ -1885,7 +1885,7 @@ ParseLexeme(
|
||||
{
|
||||
const char *end;
|
||||
int scanned;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
Tcl_Obj *literal = NULL;
|
||||
unsigned char byte;
|
||||
|
||||
|
||||
+12
-12
@@ -2296,7 +2296,7 @@ UtfToUtfProc(
|
||||
const char *srcStart, *srcEnd, *srcClose;
|
||||
const char *dstStart, *dstEnd;
|
||||
int result, numChars, charLimit = INT_MAX;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
result = TCL_OK;
|
||||
|
||||
@@ -2329,7 +2329,7 @@ UtfToUtfProc(
|
||||
}
|
||||
if (UCHAR(*src) < 0x80 && !(UCHAR(*src) == 0 && pureNullMode == 0)) {
|
||||
/*
|
||||
* Copy 7bit chatacters, but skip null-bytes when we are in input
|
||||
* Copy 7bit characters, but skip null-bytes when we are in input
|
||||
* mode, so that they get converted to 0xc080.
|
||||
*/
|
||||
|
||||
@@ -2345,8 +2345,8 @@ UtfToUtfProc(
|
||||
} else if (!Tcl_UtfCharComplete(src, srcEnd - src)) {
|
||||
/*
|
||||
* Always check before using TclUtfToUniChar. Not doing can so
|
||||
* cause it run beyond the endof the buffer! If we happen such an
|
||||
* incomplete char its byts are made to represent themselves.
|
||||
* cause it run beyond the end of the buffer! If we happen such an
|
||||
* incomplete char its bytes are made to represent themselves.
|
||||
*/
|
||||
|
||||
ch = (unsigned char) *src;
|
||||
@@ -2410,7 +2410,7 @@ UnicodeToUtfProc(
|
||||
const char *srcStart, *srcEnd;
|
||||
const char *dstEnd, *dstStart;
|
||||
int result, numChars, charLimit = INT_MAX;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
if (flags & TCL_ENCODING_CHAR_LIMIT) {
|
||||
charLimit = *dstCharsPtr;
|
||||
@@ -2500,7 +2500,7 @@ UtfToUnicodeProc(
|
||||
{
|
||||
const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
|
||||
int result, numChars;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
srcStart = src;
|
||||
srcEnd = src + srcLen;
|
||||
@@ -2610,7 +2610,7 @@ TableToUtfProc(
|
||||
const char *srcStart, *srcEnd;
|
||||
const char *dstEnd, *dstStart, *prefixBytes;
|
||||
int result, byte, numChars, charLimit = INT_MAX;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
const unsigned short *const *toUnicode;
|
||||
const unsigned short *pageZero;
|
||||
TableEncodingData *dataPtr = clientData;
|
||||
@@ -2722,7 +2722,7 @@ TableFromUtfProc(
|
||||
{
|
||||
const char *srcStart, *srcEnd, *srcClose;
|
||||
const char *dstStart, *dstEnd, *prefixBytes;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int result, len, word, numChars;
|
||||
TableEncodingData *dataPtr = clientData;
|
||||
const unsigned short *const *fromUnicode;
|
||||
@@ -2856,7 +2856,7 @@ Iso88591ToUtfProc(
|
||||
|
||||
result = TCL_OK;
|
||||
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
if (dst > dstEnd) {
|
||||
result = TCL_CONVERT_NOSPACE;
|
||||
@@ -2942,7 +2942,7 @@ Iso88591FromUtfProc(
|
||||
dstEnd = dst + dstLen - 1;
|
||||
|
||||
for (numChars = 0; src < srcEnd; numChars++) {
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int len;
|
||||
|
||||
if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
|
||||
@@ -3329,7 +3329,7 @@ EscapeFromUtfProc(
|
||||
for (numChars = 0; src < srcEnd; numChars++) {
|
||||
unsigned len;
|
||||
int word;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
|
||||
/*
|
||||
@@ -3374,7 +3374,7 @@ EscapeFromUtfProc(
|
||||
|
||||
/*
|
||||
* The state variable has the value of oldState when word is 0.
|
||||
* In this case, the escape sequense should not be copied to dst
|
||||
* In this case, the escape sequence should not be copied to dst
|
||||
* because the current character set is not changed.
|
||||
*/
|
||||
|
||||
|
||||
+1
-1
@@ -6660,7 +6660,7 @@ Tcl_Flush(
|
||||
chanPtr = statePtr->topChanPtr;
|
||||
|
||||
if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) {
|
||||
return -1;
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
result = FlushChannel(NULL, chanPtr, 0);
|
||||
|
||||
@@ -41,6 +41,8 @@ static void ReflectWatch(ClientData clientData, int mask);
|
||||
static int ReflectBlock(ClientData clientData, int mode);
|
||||
#ifdef TCL_THREADS
|
||||
static void ReflectThread(ClientData clientData, int action);
|
||||
static int ReflectEventRun(Tcl_Event *ev, int flags);
|
||||
static int ReflectEventDelete(Tcl_Event *ev, ClientData cd);
|
||||
#endif
|
||||
static Tcl_WideInt ReflectSeekWide(ClientData clientData,
|
||||
Tcl_WideInt offset, int mode, int *errorCodePtr);
|
||||
@@ -748,6 +750,7 @@ TclChanCreateObjCmd(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifdef TCL_THREADS
|
||||
typedef struct ReflectEvent {
|
||||
Tcl_Event header;
|
||||
ReflectedChannel *rcPtr;
|
||||
@@ -791,6 +794,7 @@ ReflectEventDelete(
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
TclChanPostEventObjCmd(
|
||||
|
||||
+2
-2
@@ -1762,7 +1762,7 @@ Tcl_FSEvalFileEx(
|
||||
* this cross-platform to allow for scripted documents. [Bug: 2040]
|
||||
*/
|
||||
|
||||
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");
|
||||
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");
|
||||
|
||||
/*
|
||||
* If the encoding is specified, set it for the channel. Else don't touch
|
||||
@@ -1896,7 +1896,7 @@ TclNREvalFile(
|
||||
* this cross-platform to allow for scripted documents. [Bug: 2040]
|
||||
*/
|
||||
|
||||
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");
|
||||
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");
|
||||
|
||||
/*
|
||||
* If the encoding is specified, set it for the channel. Else don't touch
|
||||
|
||||
+1
-1
@@ -4359,7 +4359,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
|
||||
|
||||
#define TclUtfToUniChar(str, chPtr) \
|
||||
((((unsigned char) *(str)) < 0xC0) ? \
|
||||
((*(chPtr) = (Tcl_UniChar) *(str)), 1) \
|
||||
((*(chPtr) = (unsigned char) *(str)), 1) \
|
||||
: Tcl_UtfToUniChar(str, chPtr))
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ Tcl_LoadObjCmd(
|
||||
Tcl_PackageInitProc *initProc;
|
||||
const char *p, *fullFileName, *packageName;
|
||||
Tcl_LoadHandle loadHandle;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
unsigned len;
|
||||
int index, flags = 0;
|
||||
Tcl_Obj *const *savedobjv = objv;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
* win/tclooConfig.sh
|
||||
*/
|
||||
|
||||
#define TCLOO_VERSION "1.0.5"
|
||||
#define TCLOO_VERSION "1.1.0"
|
||||
#define TCLOO_PATCHLEVEL TCLOO_VERSION
|
||||
|
||||
#include "tcl.h"
|
||||
|
||||
+56
-19
@@ -53,7 +53,8 @@ static void AddClassFiltersToCallContext(Object *const oPtr,
|
||||
Class *clsPtr, struct ChainBuilder *const cbPtr,
|
||||
Tcl_HashTable *const doneFilters, int flags);
|
||||
static void AddClassMethodNames(Class *clsPtr, const int flags,
|
||||
Tcl_HashTable *const namesPtr);
|
||||
Tcl_HashTable *const namesPtr,
|
||||
Tcl_HashTable *const examinedClassesPtr);
|
||||
static inline void AddMethodToCallChain(Method *const mPtr,
|
||||
struct ChainBuilder *const cbPtr,
|
||||
Tcl_HashTable *const doneFilters,
|
||||
@@ -367,6 +368,10 @@ TclOOGetSortedMethodList(
|
||||
{
|
||||
Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list"
|
||||
* mapping. */
|
||||
Tcl_HashTable examinedClasses;
|
||||
/* Used to track what classes have been looked
|
||||
* at. Is set-like in nature and keyed by
|
||||
* pointer to class. */
|
||||
FOREACH_HASH_DECLS;
|
||||
int i;
|
||||
Class *mixinPtr;
|
||||
@@ -376,6 +381,7 @@ TclOOGetSortedMethodList(
|
||||
void *isWanted;
|
||||
|
||||
Tcl_InitObjHashTable(&names);
|
||||
Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS);
|
||||
|
||||
/*
|
||||
* Name the bits used in the names table values.
|
||||
@@ -436,11 +442,14 @@ TclOOGetSortedMethodList(
|
||||
* hierarchy.
|
||||
*/
|
||||
|
||||
AddClassMethodNames(oPtr->selfCls, flags, &names);
|
||||
AddClassMethodNames(oPtr->selfCls, flags, &names, &examinedClasses);
|
||||
FOREACH(mixinPtr, oPtr->mixins) {
|
||||
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names);
|
||||
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names,
|
||||
&examinedClasses);
|
||||
}
|
||||
|
||||
Tcl_DeleteHashTable(&examinedClasses);
|
||||
|
||||
/*
|
||||
* See how many (visible) method names there are. If none, we do not (and
|
||||
* should not) try to sort the list of them.
|
||||
@@ -495,18 +504,24 @@ TclOOGetSortedClassMethodList(
|
||||
{
|
||||
Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list"
|
||||
* mapping. */
|
||||
Tcl_HashTable examinedClasses;
|
||||
/* Used to track what classes have been looked
|
||||
* at. Is set-like in nature and keyed by
|
||||
* pointer to class. */
|
||||
FOREACH_HASH_DECLS;
|
||||
int i;
|
||||
Tcl_Obj *namePtr;
|
||||
void *isWanted;
|
||||
|
||||
Tcl_InitObjHashTable(&names);
|
||||
Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS);
|
||||
|
||||
/*
|
||||
* Process method names from the class hierarchy and the mixin hierarchy.
|
||||
*/
|
||||
|
||||
AddClassMethodNames(clsPtr, flags, &names);
|
||||
AddClassMethodNames(clsPtr, flags, &names, &examinedClasses);
|
||||
Tcl_DeleteHashTable(&examinedClasses);
|
||||
|
||||
/*
|
||||
* See how many (visible) method names there are. If none, we do not (and
|
||||
@@ -581,14 +596,28 @@ AddClassMethodNames(
|
||||
Class *clsPtr, /* Class to get method names from. */
|
||||
const int flags, /* Whether we are interested in just the
|
||||
* public method names. */
|
||||
Tcl_HashTable *const namesPtr)
|
||||
Tcl_HashTable *const namesPtr,
|
||||
/* Reference to the hash table to put the
|
||||
* information in. The hash table maps the
|
||||
* Tcl_Obj * method name to an integral value
|
||||
* describing whether the method is wanted.
|
||||
* This ensures that public/private override
|
||||
* semantics are handled correctly.*/
|
||||
* semantics are handled correctly. */
|
||||
Tcl_HashTable *const examinedClassesPtr)
|
||||
/* Hash table that tracks what classes have
|
||||
* already been looked at. The keys are the
|
||||
* pointers to the classes, and the values are
|
||||
* immaterial. */
|
||||
{
|
||||
/*
|
||||
* If we've already started looking at this class, stop working on it now
|
||||
* to prevent repeated work.
|
||||
*/
|
||||
|
||||
if (Tcl_FindHashEntry(examinedClassesPtr, (char *) clsPtr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scope all declarations so that the compiler can stand a good chance of
|
||||
* making the recursive step highly efficient. We also hand-implement the
|
||||
@@ -596,24 +625,31 @@ AddClassMethodNames(
|
||||
* tail-recursion optimization usefully.
|
||||
*/
|
||||
|
||||
if (clsPtr->mixins.num != 0) {
|
||||
Class *mixinPtr;
|
||||
int i;
|
||||
|
||||
/* TODO: Beware of infinite loops! */
|
||||
FOREACH(mixinPtr, clsPtr->mixins) {
|
||||
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, namesPtr);
|
||||
}
|
||||
}
|
||||
|
||||
while (1) {
|
||||
FOREACH_HASH_DECLS;
|
||||
Tcl_Obj *namePtr;
|
||||
Method *mPtr;
|
||||
int isNew;
|
||||
|
||||
(void) Tcl_CreateHashEntry(examinedClassesPtr, (char *) clsPtr,
|
||||
&isNew);
|
||||
if (!isNew) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (clsPtr->mixins.num != 0) {
|
||||
Class *mixinPtr;
|
||||
int i;
|
||||
|
||||
FOREACH(mixinPtr, clsPtr->mixins) {
|
||||
if (mixinPtr != clsPtr) {
|
||||
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN,
|
||||
namesPtr, examinedClassesPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
|
||||
int isNew;
|
||||
|
||||
hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew);
|
||||
if (isNew) {
|
||||
int isWanted = (!(flags & PUBLIC_METHOD)
|
||||
@@ -640,7 +676,8 @@ AddClassMethodNames(
|
||||
int i;
|
||||
|
||||
FOREACH(superPtr, clsPtr->superclasses) {
|
||||
AddClassMethodNames(superPtr, flags, namesPtr);
|
||||
AddClassMethodNames(superPtr, flags, namesPtr,
|
||||
examinedClassesPtr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1314,6 +1314,7 @@ CloneProcedureMethod(
|
||||
*/
|
||||
|
||||
bodyObj = Tcl_DuplicateObj(pmPtr->procPtr->bodyPtr);
|
||||
Tcl_GetString(bodyObj);
|
||||
TclFreeIntRep(bodyObj);
|
||||
|
||||
/*
|
||||
|
||||
@@ -4488,6 +4488,24 @@ Tcl_RepresentationCmd(
|
||||
objv[1]->typePtr ? objv[1]->typePtr->name : "pure string",
|
||||
objv[1]->refCount, ptrBuffer);
|
||||
|
||||
/*
|
||||
* This is a workaround to silence reports from `make valgrind`
|
||||
* on 64-bit systems. The problem is that the test suite
|
||||
* includes calling the [represenation] command on values of
|
||||
* &tclDoubleType. When these values are created, the "doubleValue"
|
||||
* is set, but when the "twoPtrValue" is examined, its "ptr2"
|
||||
* field has never been initialized. Since [representation]
|
||||
* presents the value of the ptr2 value in its output, valgrind
|
||||
* alerts about the read of uninitialized memory.
|
||||
*
|
||||
* The general problem with [representation], that it can read
|
||||
* and report uninitialized fields, is still present. This is
|
||||
* just the minimal workaround to silence one particular test.
|
||||
*/
|
||||
|
||||
if ((sizeof(void *) > 4) && objv[1]->typePtr == &tclDoubleType) {
|
||||
objv[1]->internalRep.twoPtrValue.ptr2 = NULL;
|
||||
}
|
||||
if (objv[1]->typePtr) {
|
||||
sprintf(ptrBuffer, "%p:%p",
|
||||
(void *) objv[1]->internalRep.twoPtrValue.ptr1,
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ Tcl_PanicVA(
|
||||
__builtin_trap();
|
||||
# elif defined(_WIN64)
|
||||
__debugbreak();
|
||||
# elif defined(_MSC_VER)
|
||||
# elif defined(_MSC_VER) && defined (_M_IX86)
|
||||
_asm {int 3}
|
||||
# else
|
||||
DebugBreak();
|
||||
|
||||
+1
-1
@@ -841,7 +841,7 @@ TclParseBackslash(
|
||||
* written there. */
|
||||
{
|
||||
register const char *p = src+1;
|
||||
Tcl_UniChar unichar;
|
||||
Tcl_UniChar unichar = 0;
|
||||
int result;
|
||||
int count;
|
||||
char buf[TCL_UTF_MAX];
|
||||
|
||||
+30
-30
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "tclInt.h"
|
||||
#include "tclFileSystem.h"
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* Prototypes for functions defined later in this file.
|
||||
@@ -849,18 +850,20 @@ TclJoinPath(
|
||||
int elements,
|
||||
Tcl_Obj * const objv[])
|
||||
{
|
||||
Tcl_Obj *res;
|
||||
Tcl_Obj *res = NULL;
|
||||
int i;
|
||||
const Tcl_Filesystem *fsPtr = NULL;
|
||||
|
||||
res = NULL;
|
||||
assert ( elements >= 0 );
|
||||
|
||||
for (i = 0; i < elements; i++) {
|
||||
int driveNameLength, strEltLen, length;
|
||||
Tcl_PathType type;
|
||||
char *strElt, *ptr;
|
||||
Tcl_Obj *driveName = NULL;
|
||||
Tcl_Obj *elt = objv[i];
|
||||
if (elements == 0) {
|
||||
return Tcl_NewObj();
|
||||
}
|
||||
|
||||
assert ( elements > 0 );
|
||||
|
||||
if (elements == 2) {
|
||||
Tcl_Obj *elt = objv[0];
|
||||
|
||||
/*
|
||||
* This is a special case where we can be much more efficient, where
|
||||
@@ -869,18 +872,17 @@ TclJoinPath(
|
||||
* object which can be normalized more efficiently. Currently we only
|
||||
* use the special case when we have exactly two elements, but we
|
||||
* could expand that in the future.
|
||||
*
|
||||
* Bugfix [a47641a0]. TclNewFSPathObj requires first argument
|
||||
* to be an absolute path. Added a check for that elt is absolute.
|
||||
*
|
||||
* Bugfix [a47641a0]. TclNewFSPathObj requires first argument
|
||||
* to be an absolute path. Added a check for that elt is absolute.
|
||||
*/
|
||||
|
||||
if ((i == (elements-2)) && (i == 0)
|
||||
&& (elt->typePtr == &tclFsPathType)
|
||||
if ((elt->typePtr == &tclFsPathType)
|
||||
&& !((elt->bytes != NULL) && (elt->bytes[0] == '\0'))
|
||||
&& TclGetPathType(elt, NULL, NULL, NULL) == TCL_PATH_ABSOLUTE) {
|
||||
Tcl_Obj *tailObj = objv[i+1];
|
||||
Tcl_Obj *tailObj = objv[1];
|
||||
Tcl_PathType type = TclGetPathType(tailObj, NULL, NULL, NULL);
|
||||
|
||||
type = TclGetPathType(tailObj, NULL, NULL, NULL);
|
||||
if (type == TCL_PATH_RELATIVE) {
|
||||
const char *str;
|
||||
int len;
|
||||
@@ -893,9 +895,6 @@ TclJoinPath(
|
||||
* the base itself is just fine!
|
||||
*/
|
||||
|
||||
if (res != NULL) {
|
||||
TclDecrRefCount(res);
|
||||
}
|
||||
return elt;
|
||||
}
|
||||
|
||||
@@ -918,9 +917,6 @@ TclJoinPath(
|
||||
|
||||
if ((tclPlatform != TCL_PLATFORM_WINDOWS)
|
||||
|| (strchr(Tcl_GetString(elt), '\\') == NULL)) {
|
||||
if (res != NULL) {
|
||||
TclDecrRefCount(res);
|
||||
}
|
||||
|
||||
if (PATHFLAGS(elt)) {
|
||||
return TclNewFSPathObj(elt, str, len);
|
||||
@@ -940,23 +936,28 @@ TclJoinPath(
|
||||
* more general code below handle things.
|
||||
*/
|
||||
} else if (tclPlatform == TCL_PLATFORM_UNIX) {
|
||||
if (res != NULL) {
|
||||
TclDecrRefCount(res);
|
||||
}
|
||||
return tailObj;
|
||||
} else {
|
||||
const char *str = TclGetString(tailObj);
|
||||
|
||||
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
|
||||
if (strchr(str, '\\') == NULL) {
|
||||
if (res != NULL) {
|
||||
TclDecrRefCount(res);
|
||||
}
|
||||
return tailObj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert ( res == NULL );
|
||||
|
||||
for (i = 0; i < elements; i++) {
|
||||
int driveNameLength, strEltLen, length;
|
||||
Tcl_PathType type;
|
||||
char *strElt, *ptr;
|
||||
Tcl_Obj *driveName = NULL;
|
||||
Tcl_Obj *elt = objv[i];
|
||||
|
||||
strElt = Tcl_GetStringFromObj(elt, &strEltLen);
|
||||
driveNameLength = 0;
|
||||
type = TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName);
|
||||
@@ -1087,6 +1088,7 @@ TclJoinPath(
|
||||
|
||||
if (sep != NULL) {
|
||||
separator = TclGetString(sep)[0];
|
||||
Tcl_DecrRefCount(sep);
|
||||
}
|
||||
/* Safety check in case the VFS driver caused sharing */
|
||||
if (Tcl_IsShared(res)) {
|
||||
@@ -1122,9 +1124,7 @@ TclJoinPath(
|
||||
Tcl_SetObjLength(res, length);
|
||||
}
|
||||
}
|
||||
if (res == NULL) {
|
||||
res = Tcl_NewObj();
|
||||
}
|
||||
assert ( res != NULL );
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -668,7 +668,13 @@ TclCreatePipeline(
|
||||
if (*p == '>') {
|
||||
p++;
|
||||
atOK = 0;
|
||||
flags = O_WRONLY | O_CREAT;
|
||||
|
||||
/*
|
||||
* Note that the O_APPEND flag only has an effect on POSIX
|
||||
* platforms. On Windows, we just have to carry on regardless.
|
||||
*/
|
||||
|
||||
flags = O_WRONLY | O_CREAT | O_APPEND;
|
||||
}
|
||||
if (errorClose != 0) {
|
||||
errorClose = 0;
|
||||
|
||||
+11
-4
@@ -502,10 +502,17 @@ Tcl_RegExpMatchObj(
|
||||
{
|
||||
Tcl_RegExp re;
|
||||
|
||||
re = Tcl_GetRegExpFromObj(interp, patternObj,
|
||||
TCL_REG_ADVANCED | TCL_REG_NOSUB);
|
||||
if (re == NULL) {
|
||||
return -1;
|
||||
/*
|
||||
* For performance reasons, first try compiling the RE without support for
|
||||
* subexpressions. On failure, try again without TCL_REG_NOSUB in case the
|
||||
* RE has backreferences in it. Closely related to [Bug 1366683]. If this
|
||||
* still fails, an error message will be left in the interpreter.
|
||||
*/
|
||||
|
||||
if (!(re = Tcl_GetRegExpFromObj(interp, patternObj,
|
||||
TCL_REG_ADVANCED | TCL_REG_NOSUB))
|
||||
&& !(re = Tcl_GetRegExpFromObj(interp, patternObj, TCL_REG_ADVANCED))) {
|
||||
return -1;
|
||||
}
|
||||
return Tcl_RegExpExecObj(interp, re, textObj, 0 /* offset */,
|
||||
0 /* nmatches */, 0 /* flags */);
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ BuildCharSet(
|
||||
CharSet *cset,
|
||||
const char *format) /* Points to first char of set. */
|
||||
{
|
||||
Tcl_UniChar ch, start;
|
||||
Tcl_UniChar ch = 0, start;
|
||||
int offset, nranges;
|
||||
const char *end;
|
||||
|
||||
@@ -257,7 +257,7 @@ ValidateFormat(
|
||||
{
|
||||
int gotXpg, gotSequential, value, i, flags;
|
||||
char *end;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int objIndex, xpgSize, nspace = numVars;
|
||||
int *nassign = TclStackAlloc(interp, nspace * sizeof(int));
|
||||
char buf[TCL_UTF_MAX+1];
|
||||
@@ -582,7 +582,7 @@ Tcl_ScanObjCmd(
|
||||
char op = 0;
|
||||
int width, underflow = 0;
|
||||
Tcl_WideInt wideValue;
|
||||
Tcl_UniChar ch, sch;
|
||||
Tcl_UniChar ch = 0, sch = 0;
|
||||
Tcl_Obj **objs = NULL, *objPtr = NULL;
|
||||
int flags;
|
||||
char buf[513]; /* Temporary buffer to hold scanned number
|
||||
|
||||
+26
-26
@@ -1973,7 +1973,7 @@ RefineApproximation(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
MulPow5(
|
||||
mp_int *base, /* Number to multiply. */
|
||||
unsigned n, /* Power of 5 to multiply by. */
|
||||
@@ -2018,7 +2018,7 @@ MulPow5(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
NormalizeRightward(
|
||||
Tcl_WideUInt *wPtr) /* INOUT: Number to shift. */
|
||||
{
|
||||
@@ -2109,7 +2109,7 @@ RequiredPrecision(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
DoubleToExpAndSig(
|
||||
double dv, /* Number to convert. */
|
||||
Tcl_WideUInt *significand, /* OUTPUT: Significand of the number. */
|
||||
@@ -2157,7 +2157,7 @@ DoubleToExpAndSig(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
TakeAbsoluteValue(
|
||||
Double *d, /* Number to replace with absolute value. */
|
||||
int *sign) /* Place to put the signum. */
|
||||
@@ -2188,7 +2188,7 @@ TakeAbsoluteValue(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
FormatInfAndNaN(
|
||||
Double *d, /* Exceptional number to format. */
|
||||
int *decpt, /* Decimal point to set to a bogus value. */
|
||||
@@ -2230,7 +2230,7 @@ FormatInfAndNaN(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
FormatZero(
|
||||
int *decpt, /* Location of the decimal point. */
|
||||
char **endPtr) /* Pointer to the end of the formatted data */
|
||||
@@ -2260,7 +2260,7 @@ FormatZero(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
ApproximateLog10(
|
||||
Tcl_WideUInt bw, /* Integer significand of the number. */
|
||||
int be, /* Power of two to scale bw. */
|
||||
@@ -2308,7 +2308,7 @@ ApproximateLog10(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
BetterLog10(
|
||||
double d, /* Original number to format. */
|
||||
int k, /* Characteristic(Log base 10) of the
|
||||
@@ -2351,7 +2351,7 @@ BetterLog10(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
ComputeScale(
|
||||
int be, /* Exponent part of number: d = bw * 2**be. */
|
||||
int k, /* Characteristic of log10(number). */
|
||||
@@ -2414,7 +2414,7 @@ ComputeScale(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
SetPrecisionLimits(
|
||||
int convType, /* Type of conversion: TCL_DD_SHORTEST,
|
||||
* TCL_DD_STEELE0, TCL_DD_E_FMT,
|
||||
@@ -2475,7 +2475,7 @@ SetPrecisionLimits(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
BumpUp(
|
||||
char *s, /* Cursor pointing one past the end of the
|
||||
* string. */
|
||||
@@ -2509,7 +2509,7 @@ BumpUp(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
AdjustRange(
|
||||
double *dPtr, /* INOUT: Number to adjust. */
|
||||
int k) /* IN: floor(log10(d)) */
|
||||
@@ -2582,7 +2582,7 @@ AdjustRange(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
ShorteningQuickFormat(
|
||||
double d, /* Number to convert. */
|
||||
int k, /* floor(log10(d)) */
|
||||
@@ -2657,7 +2657,7 @@ ShorteningQuickFormat(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
StrictQuickFormat(
|
||||
double d, /* Number to convert. */
|
||||
int k, /* floor(log10(d)) */
|
||||
@@ -2731,7 +2731,7 @@ StrictQuickFormat(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
QuickConversion(
|
||||
double e, /* Number to format. */
|
||||
int k, /* floor(log10(d)), approximately. */
|
||||
@@ -2836,7 +2836,7 @@ QuickConversion(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static void
|
||||
static inline void
|
||||
CastOutPowersOf2(
|
||||
int *b2, /* Power of 2 to multiply the significand. */
|
||||
int *m2, /* Power of 2 to multiply 1/2 ulp. */
|
||||
@@ -2880,7 +2880,7 @@ CastOutPowersOf2(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
ShorteningInt64Conversion(
|
||||
Double *dPtr, /* Original number to convert. */
|
||||
int convType, /* Type of conversion (shortest, Steele,
|
||||
@@ -3049,7 +3049,7 @@ ShorteningInt64Conversion(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
StrictInt64Conversion(
|
||||
Double *dPtr, /* Original number to convert. */
|
||||
int convType, /* Type of conversion (shortest, Steele,
|
||||
@@ -3155,7 +3155,7 @@ StrictInt64Conversion(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
ShouldBankerRoundUpPowD(
|
||||
mp_int *b, /* Numerator of the fraction. */
|
||||
int sd, /* Denominator is 2**(sd*DIGIT_BIT). */
|
||||
@@ -3193,7 +3193,7 @@ ShouldBankerRoundUpPowD(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
ShouldBankerRoundUpToNextPowD(
|
||||
mp_int *b, /* Numerator of the fraction. */
|
||||
mp_int *m, /* Numerator of the rounding tolerance. */
|
||||
@@ -3256,7 +3256,7 @@ ShouldBankerRoundUpToNextPowD(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
ShorteningBignumConversionPowD(
|
||||
Double *dPtr, /* Original number to convert. */
|
||||
int convType, /* Type of conversion (shortest, Steele,
|
||||
@@ -3449,7 +3449,7 @@ ShorteningBignumConversionPowD(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
StrictBignumConversionPowD(
|
||||
Double *dPtr, /* Original number to convert. */
|
||||
int convType, /* Type of conversion (shortest, Steele,
|
||||
@@ -3565,7 +3565,7 @@ StrictBignumConversionPowD(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
ShouldBankerRoundUp(
|
||||
mp_int *twor, /* 2x the remainder from thd division that
|
||||
* produced the last digit. */
|
||||
@@ -3600,7 +3600,7 @@ ShouldBankerRoundUp(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static int
|
||||
static inline int
|
||||
ShouldBankerRoundUpToNext(
|
||||
mp_int *b, /* Remainder from the division that produced
|
||||
* the last digit. */
|
||||
@@ -3654,7 +3654,7 @@ ShouldBankerRoundUpToNext(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
ShorteningBignumConversion(
|
||||
Double *dPtr, /* Original number being converted. */
|
||||
int convType, /* Conversion type. */
|
||||
@@ -3870,7 +3870,7 @@ ShorteningBignumConversion(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
inline static char *
|
||||
static inline char *
|
||||
StrictBignumConversion(
|
||||
Double *dPtr, /* Original number being converted. */
|
||||
int convType, /* Conversion type. */
|
||||
|
||||
+11
-12
@@ -1682,6 +1682,7 @@ Tcl_AppendFormatToObj(
|
||||
const char *span = format, *msg, *errCode;
|
||||
int numBytes = 0, objIndex = 0, gotXpg = 0, gotSequential = 0;
|
||||
int originalLength, limit;
|
||||
Tcl_UniChar ch = 0;
|
||||
static const char *mixedXPG =
|
||||
"cannot mix \"%\" and \"%n$\" conversion specifiers";
|
||||
static const char *const badIndex[2] = {
|
||||
@@ -1709,7 +1710,6 @@ Tcl_AppendFormatToObj(
|
||||
#endif
|
||||
int newXpg, numChars, allocSegment = 0, segmentLimit, segmentNumBytes;
|
||||
Tcl_Obj *segment;
|
||||
Tcl_UniChar ch;
|
||||
int step = TclUtfToUniChar(format, &ch);
|
||||
|
||||
format += step;
|
||||
@@ -2027,8 +2027,11 @@ Tcl_AppendFormatToObj(
|
||||
segmentLimit -= 1;
|
||||
precision--;
|
||||
break;
|
||||
case 'x':
|
||||
case 'X':
|
||||
Tcl_AppendToObj(segment, "0X", 2);
|
||||
segmentLimit -= 2;
|
||||
break;
|
||||
case 'x':
|
||||
Tcl_AppendToObj(segment, "0x", 2);
|
||||
segmentLimit -= 2;
|
||||
break;
|
||||
@@ -2192,7 +2195,11 @@ Tcl_AppendFormatToObj(
|
||||
}
|
||||
digitOffset = (int) (bits % base);
|
||||
if (digitOffset > 9) {
|
||||
bytes[numDigits] = 'a' + digitOffset - 10;
|
||||
if (ch == 'X') {
|
||||
bytes[numDigits] = 'A' + digitOffset - 10;
|
||||
} else {
|
||||
bytes[numDigits] = 'a' + digitOffset - 10;
|
||||
}
|
||||
} else {
|
||||
bytes[numDigits] = '0' + digitOffset;
|
||||
}
|
||||
@@ -2314,14 +2321,6 @@ Tcl_AppendFormatToObj(
|
||||
goto error;
|
||||
}
|
||||
|
||||
switch (ch) {
|
||||
case 'E':
|
||||
case 'G':
|
||||
case 'X': {
|
||||
Tcl_SetObjLength(segment, Tcl_UtfToUpper(TclGetString(segment)));
|
||||
}
|
||||
}
|
||||
|
||||
if (width>0 && numChars<0) {
|
||||
numChars = Tcl_GetCharLength(segment);
|
||||
}
|
||||
@@ -2693,7 +2692,7 @@ TclStringObjReverse(
|
||||
Tcl_Obj *objPtr)
|
||||
{
|
||||
String *stringPtr;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
if (TclIsPureByteArray(objPtr)) {
|
||||
int numBytes;
|
||||
|
||||
+54
-26
@@ -98,7 +98,7 @@ static int UtfCount(int ch);
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
INLINE static int
|
||||
static inline int
|
||||
UtfCount(
|
||||
int ch) /* The Tcl_UniChar whose size is returned. */
|
||||
{
|
||||
@@ -134,7 +134,7 @@ UtfCount(
|
||||
*---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
INLINE int
|
||||
int
|
||||
Tcl_UniCharToUtf(
|
||||
int ch, /* The Tcl_UniChar to be stored in the
|
||||
* buffer. */
|
||||
@@ -259,6 +259,15 @@ Tcl_UniCharToUtfDString(
|
||||
* Tcl_UtfCharComplete() before calling this routine to ensure that
|
||||
* enough bytes remain in the string.
|
||||
*
|
||||
* If TCL_UTF_MAX == 4, special handling of Surrogate pairs is done:
|
||||
* For any UTF-8 string containing a character outside of the BMP, the
|
||||
* first call to this function will fill *chPtr with the high surrogate
|
||||
* and generate a return value of 0. Calling Tcl_UtfToUniChar again
|
||||
* will produce the low surrogate and a return value of 4. Because *chPtr
|
||||
* is used to remember whether the high surrogate is already produced, it
|
||||
* is recommended to initialize the variable it points to as 0 before
|
||||
* the first call to Tcl_UtfToUniChar is done.
|
||||
*
|
||||
* Results:
|
||||
* *chPtr is filled with the Tcl_UniChar, and the return value is the
|
||||
* number of bytes from the UTF-8 string that were consumed.
|
||||
@@ -278,7 +287,7 @@ Tcl_UtfToUniChar(
|
||||
register int byte;
|
||||
|
||||
/*
|
||||
* Unroll 1 to 3 byte UTF-8 sequences, use loop to handle longer ones.
|
||||
* Unroll 1 to 3 (or 4) byte UTF-8 sequences.
|
||||
*/
|
||||
|
||||
byte = *((unsigned char *) src);
|
||||
@@ -331,12 +340,30 @@ Tcl_UtfToUniChar(
|
||||
/*
|
||||
* Four-byte-character lead byte followed by three trail bytes.
|
||||
*/
|
||||
#if TCL_UTF_MAX == 4
|
||||
Tcl_UniChar surrogate;
|
||||
|
||||
byte = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
|
||||
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)) - 0x10000;
|
||||
surrogate = (Tcl_UniChar) (0xD800 + (byte >> 10));
|
||||
if (byte & 0x100000) {
|
||||
/* out of range, < 0x10000 or > 0x10ffff */
|
||||
} else if (*chPtr != surrogate) {
|
||||
/* produce high surrogate, but don't advance source pointer */
|
||||
*chPtr = surrogate;
|
||||
return 0;
|
||||
} else {
|
||||
/* produce low surrogate, and advance source pointer */
|
||||
*chPtr = (Tcl_UniChar) (0xDC00 | (byte & 0x3FF));
|
||||
return 4;
|
||||
}
|
||||
#else
|
||||
*chPtr = (Tcl_UniChar) (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
|
||||
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
|
||||
if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
|
||||
return 4;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -377,7 +404,7 @@ Tcl_UtfToUniCharDString(
|
||||
* appended to this previously initialized
|
||||
* DString. */
|
||||
{
|
||||
Tcl_UniChar *w, *wString;
|
||||
Tcl_UniChar ch, *w, *wString;
|
||||
const char *p, *end;
|
||||
int oldLength;
|
||||
|
||||
@@ -399,8 +426,8 @@ Tcl_UtfToUniCharDString(
|
||||
w = wString;
|
||||
end = src + length;
|
||||
for (p = src; p < end; ) {
|
||||
p += TclUtfToUniChar(p, w);
|
||||
w++;
|
||||
p += TclUtfToUniChar(p, &ch);
|
||||
*w++ = ch;
|
||||
}
|
||||
*w = '\0';
|
||||
Tcl_DStringSetLength(dsPtr,
|
||||
@@ -434,10 +461,7 @@ Tcl_UtfCharComplete(
|
||||
* a complete UTF-8 character. */
|
||||
int length) /* Length of above string in bytes. */
|
||||
{
|
||||
int ch;
|
||||
|
||||
ch = *((unsigned char *) src);
|
||||
return length >= totalBytes[ch];
|
||||
return length >= totalBytes[(unsigned char)*src];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -464,8 +488,8 @@ Tcl_NumUtfChars(
|
||||
int length) /* The length of the string in bytes, or -1
|
||||
* for strlen(string). */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
register int i;
|
||||
Tcl_UniChar ch = 0;
|
||||
register int i = 0;
|
||||
|
||||
/*
|
||||
* The separate implementations are faster.
|
||||
@@ -474,7 +498,6 @@ Tcl_NumUtfChars(
|
||||
* single-byte char case specially.
|
||||
*/
|
||||
|
||||
i = 0;
|
||||
if (length < 0) {
|
||||
while (*src != '\0') {
|
||||
src += TclUtfToUniChar(src, &ch);
|
||||
@@ -525,7 +548,7 @@ Tcl_UtfFindFirst(
|
||||
int ch) /* The Tcl_UniChar to search for. */
|
||||
{
|
||||
int len;
|
||||
Tcl_UniChar find;
|
||||
Tcl_UniChar find = 0;
|
||||
|
||||
while (1) {
|
||||
len = TclUtfToUniChar(src, &find);
|
||||
@@ -564,7 +587,7 @@ Tcl_UtfFindLast(
|
||||
int ch) /* The Tcl_UniChar to search for. */
|
||||
{
|
||||
int len;
|
||||
Tcl_UniChar find;
|
||||
Tcl_UniChar find = 0;
|
||||
const char *last;
|
||||
|
||||
last = NULL;
|
||||
@@ -604,9 +627,15 @@ const char *
|
||||
Tcl_UtfNext(
|
||||
const char *src) /* The current location in the string. */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
int len = TclUtfToUniChar(src, &ch);
|
||||
|
||||
return src + TclUtfToUniChar(src, &ch);
|
||||
#if TCL_UTF_MAX == 4
|
||||
if (len == 0) {
|
||||
len = TclUtfToUniChar(src, &ch);
|
||||
}
|
||||
#endif
|
||||
return src + len;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -639,8 +668,7 @@ Tcl_UtfPrev(
|
||||
const char *look;
|
||||
int i, byte;
|
||||
|
||||
src--;
|
||||
look = src;
|
||||
look = --src;
|
||||
for (i = 0; i < TCL_UTF_MAX; i++) {
|
||||
if (look < start) {
|
||||
if (src < start) {
|
||||
@@ -713,7 +741,7 @@ Tcl_UtfAtIndex(
|
||||
register const char *src, /* The UTF-8 string. */
|
||||
register int index) /* The position of the desired character. */
|
||||
{
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
while (index > 0) {
|
||||
index--;
|
||||
@@ -797,7 +825,7 @@ int
|
||||
Tcl_UtfToUpper(
|
||||
char *str) /* String to convert in place. */
|
||||
{
|
||||
Tcl_UniChar ch, upChar;
|
||||
Tcl_UniChar ch = 0, upChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
|
||||
@@ -850,7 +878,7 @@ int
|
||||
Tcl_UtfToLower(
|
||||
char *str) /* String to convert in place. */
|
||||
{
|
||||
Tcl_UniChar ch, lowChar;
|
||||
Tcl_UniChar ch = 0, lowChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
|
||||
@@ -904,7 +932,7 @@ int
|
||||
Tcl_UtfToTitle(
|
||||
char *str) /* String to convert in place. */
|
||||
{
|
||||
Tcl_UniChar ch, titleChar, lowChar;
|
||||
Tcl_UniChar ch = 0, titleChar, lowChar;
|
||||
char *src, *dst;
|
||||
int bytes;
|
||||
|
||||
@@ -1013,7 +1041,7 @@ Tcl_UtfNcmp(
|
||||
const char *ct, /* UTF string cs is compared to. */
|
||||
unsigned long numChars) /* Number of UTF chars to compare. */
|
||||
{
|
||||
Tcl_UniChar ch1, ch2;
|
||||
Tcl_UniChar ch1 = 0, ch2 = 0;
|
||||
|
||||
/*
|
||||
* Cannot use 'memcmp(cs, ct, n);' as byte representation of \u0000 (the
|
||||
@@ -1061,7 +1089,7 @@ Tcl_UtfNcasecmp(
|
||||
const char *ct, /* UTF string cs is compared to. */
|
||||
unsigned long numChars) /* Number of UTF chars to compare. */
|
||||
{
|
||||
Tcl_UniChar ch1, ch2;
|
||||
Tcl_UniChar ch1 = 0, ch2 = 0;
|
||||
while (numChars-- > 0) {
|
||||
/*
|
||||
* n must be interpreted as chars, not bytes.
|
||||
@@ -1690,7 +1718,7 @@ Tcl_UniCharCaseMatch(
|
||||
* characters. */
|
||||
int nocase) /* 0 for case sensitive, 1 for insensitive */
|
||||
{
|
||||
Tcl_UniChar ch1, p;
|
||||
Tcl_UniChar ch1 = 0, p;
|
||||
|
||||
while (1) {
|
||||
p = *uniPattern;
|
||||
|
||||
+1
-1
@@ -1646,7 +1646,7 @@ Tcl_Backslash(
|
||||
* src, unless NULL. */
|
||||
{
|
||||
char buf[TCL_UTF_MAX];
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
Tcl_UtfBackslash(src, readPtr, buf);
|
||||
TclUtfToUniChar(buf, &ch);
|
||||
|
||||
+365
-23
@@ -165,6 +165,7 @@ typedef struct ArraySearch {
|
||||
struct ArraySearch *nextPtr;/* Next in list of all active searches for
|
||||
* this variable, or NULL if this is the last
|
||||
* one. */
|
||||
Tcl_Obj *arrayNameObj; /* name of the array object */
|
||||
} ArraySearch;
|
||||
|
||||
/*
|
||||
@@ -173,6 +174,8 @@ typedef struct ArraySearch {
|
||||
|
||||
static void AppendLocals(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Obj *patternPtr, int includeLinks);
|
||||
static void ArrayDoneSearch (Interp *iPtr, Var *varPtr, ArraySearch *searchPtr);
|
||||
static Tcl_NRPostProc ArrayForLoopCallback;
|
||||
static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr);
|
||||
static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr,
|
||||
Var *varPtr, int flags, int index);
|
||||
@@ -3095,6 +3098,321 @@ TclArraySet(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* ArrayForNRCmd
|
||||
* ArrayForLoopCallback
|
||||
* ArrayObjFirst
|
||||
* ArrayObjNext
|
||||
*
|
||||
* These functions implement the "array for" Tcl command.
|
||||
* array for {k v} a {}
|
||||
* The array for command iterates over the array, setting the
|
||||
* the specified loop variables, and executing the body each iteration.
|
||||
*
|
||||
* ArrayForNRCmd() sets up the ArraySearch structure, sets arrayNamePtr
|
||||
* inside the structure and calls VarHashFirstEntry to start the hash
|
||||
* iteration.
|
||||
*
|
||||
* ArrayForNRCmd() does not execute the body or set the loop variables,
|
||||
* it only initializes the iterator.
|
||||
*
|
||||
* ArrayForLoopCallback() iterates over the entire array, executing
|
||||
* the body each time.
|
||||
*
|
||||
* ArrayObjFirst() Does not execute the body or set the key/value variables.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
ArrayObjFirst(
|
||||
Tcl_Interp *interp,
|
||||
Tcl_Obj *arrayNameObj,
|
||||
Var *varPtr,
|
||||
ArraySearch *searchPtr)
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
Tcl_HashEntry *hPtr;
|
||||
int isNew;
|
||||
|
||||
searchPtr->varPtr = varPtr;
|
||||
searchPtr->arrayNameObj = arrayNameObj;
|
||||
|
||||
/* add the search to the search table */
|
||||
hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, varPtr, &isNew);
|
||||
if (isNew) {
|
||||
searchPtr->id = 1;
|
||||
varPtr->flags |= VAR_SEARCH_ACTIVE;
|
||||
searchPtr->nextPtr = NULL;
|
||||
} else {
|
||||
searchPtr->id = ((ArraySearch *) Tcl_GetHashValue(hPtr))->id + 1;
|
||||
searchPtr->nextPtr = Tcl_GetHashValue(hPtr);
|
||||
}
|
||||
searchPtr->nextEntry = VarHashFirstEntry(varPtr->value.tablePtr,
|
||||
&searchPtr->search);
|
||||
Tcl_SetHashValue(hPtr, searchPtr);
|
||||
}
|
||||
|
||||
int
|
||||
ArrayObjNext(
|
||||
Tcl_Interp *interp,
|
||||
Var *varPtr, /* array */
|
||||
ArraySearch *searchPtr,
|
||||
Tcl_Obj **keyPtrPtr, /* Pointer to a variable to have the key
|
||||
* written into, or NULL. */
|
||||
Tcl_Obj **valuePtrPtr /* Pointer to a variable to have the
|
||||
* value written into, or NULL.*/
|
||||
)
|
||||
{
|
||||
Tcl_Obj *keyObj;
|
||||
Tcl_Obj *valueObj = NULL;
|
||||
int gotValue;
|
||||
int donerc;
|
||||
|
||||
donerc = TCL_BREAK;
|
||||
|
||||
if ((varPtr->flags & VAR_SEARCH_ACTIVE) != VAR_SEARCH_ACTIVE) {
|
||||
donerc = TCL_ERROR;
|
||||
return donerc;
|
||||
}
|
||||
|
||||
gotValue = 0;
|
||||
while (1) {
|
||||
Tcl_HashEntry *hPtr = searchPtr->nextEntry;
|
||||
if (hPtr != NULL) {
|
||||
searchPtr->nextEntry = NULL;
|
||||
} else {
|
||||
hPtr = Tcl_NextHashEntry(&searchPtr->search);
|
||||
if (hPtr == NULL) {
|
||||
gotValue = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
varPtr = VarHashGetValue(hPtr);
|
||||
if (!TclIsVarUndefined(varPtr)) {
|
||||
gotValue = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! gotValue) {
|
||||
return donerc;
|
||||
}
|
||||
|
||||
donerc = TCL_CONTINUE;
|
||||
|
||||
keyObj = VarHashGetKey(varPtr);
|
||||
*keyPtrPtr = keyObj;
|
||||
valueObj = Tcl_ObjGetVar2(interp, searchPtr->arrayNameObj,
|
||||
keyObj, TCL_LEAVE_ERR_MSG);
|
||||
*valuePtrPtr = valueObj;
|
||||
|
||||
return donerc;
|
||||
}
|
||||
|
||||
static int
|
||||
ArrayForNRCmd(
|
||||
ClientData dummy,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const *objv)
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
Tcl_Obj *scriptObj, *keyVarObj, *valueVarObj;
|
||||
Tcl_Obj **varv;
|
||||
Tcl_Obj *arrayNameObj;
|
||||
ArraySearch *searchPtr = NULL;
|
||||
Var *varPtr;
|
||||
Var *arrayPtr;
|
||||
int varc;
|
||||
|
||||
/*
|
||||
* array for {k v} a body
|
||||
*/
|
||||
|
||||
if (objc != 4) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv,
|
||||
"{key value} arrayName script");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse arguments.
|
||||
*/
|
||||
|
||||
if (TclListObjGetElements(interp, objv[1], &varc, &varv) != TCL_OK) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
if (varc != 2) {
|
||||
Tcl_SetObjResult(interp, Tcl_NewStringObj(
|
||||
"must have two variable names", -1));
|
||||
Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "array", "for", NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
arrayNameObj = objv[2];
|
||||
keyVarObj = varv[0];
|
||||
valueVarObj = varv[1];
|
||||
scriptObj = objv[3];
|
||||
|
||||
/*
|
||||
* Locate the array variable.
|
||||
*/
|
||||
|
||||
varPtr = TclObjLookupVarEx(interp, arrayNameObj, NULL, /*flags*/ 0,
|
||||
/*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr);
|
||||
|
||||
/*
|
||||
* Special array trace used to keep the env array in sync for array names,
|
||||
* array get, etc.
|
||||
*/
|
||||
|
||||
if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY)
|
||||
&& (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) {
|
||||
if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, arrayNameObj, NULL,
|
||||
(TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY|
|
||||
TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Verify that it is indeed an array variable. This test comes after the
|
||||
* traces; the variable may actually become an array as an effect of said
|
||||
* traces.
|
||||
*/
|
||||
|
||||
if ((varPtr == NULL) || !TclIsVarArray(varPtr)
|
||||
|| TclIsVarUndefined(varPtr)) {
|
||||
const char *varName = Tcl_GetString(arrayNameObj);
|
||||
|
||||
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
|
||||
"\"%s\" isn't an array", varName));
|
||||
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", varName, NULL);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make a new array search, put it on the stack.
|
||||
*/
|
||||
|
||||
searchPtr = ckalloc(sizeof(ArraySearch));
|
||||
searchPtr->arrayNameObj = NULL;
|
||||
ArrayObjFirst(interp, arrayNameObj, varPtr, searchPtr);
|
||||
|
||||
/*
|
||||
* Make sure that these objects (which we need throughout the body of the
|
||||
* loop) don't vanish.
|
||||
*/
|
||||
|
||||
Tcl_IncrRefCount(keyVarObj);
|
||||
Tcl_IncrRefCount(valueVarObj);
|
||||
Tcl_IncrRefCount(scriptObj);
|
||||
|
||||
/*
|
||||
* Run the script.
|
||||
*/
|
||||
|
||||
TclNRAddCallback(interp, ArrayForLoopCallback, searchPtr, keyVarObj,
|
||||
valueVarObj, scriptObj);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
ArrayForLoopCallback(
|
||||
ClientData data[],
|
||||
Tcl_Interp *interp,
|
||||
int result)
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
ArraySearch *searchPtr = data[0];
|
||||
Tcl_Obj *keyVarObj = data[1];
|
||||
Tcl_Obj *valueVarObj = data[2];
|
||||
Tcl_Obj *scriptObj = data[3];
|
||||
Tcl_Obj *keyObj, *valueObj;
|
||||
Var *varPtr;
|
||||
Var *arrayPtr;
|
||||
int done;
|
||||
|
||||
/*
|
||||
* Process the result from the previous execution of the script body.
|
||||
*/
|
||||
|
||||
done = TCL_ERROR;
|
||||
varPtr = TclObjLookupVarEx(interp, searchPtr->arrayNameObj, NULL, /*flags*/ 0,
|
||||
/*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr);
|
||||
|
||||
if (result == TCL_CONTINUE) {
|
||||
result = TCL_OK;
|
||||
} else if (result != TCL_OK) {
|
||||
if (result == TCL_BREAK) {
|
||||
Tcl_ResetResult(interp);
|
||||
result = TCL_OK;
|
||||
} else if (result == TCL_ERROR) {
|
||||
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
|
||||
"\n (\"array for\" body line %d)",
|
||||
Tcl_GetErrorLine(interp)));
|
||||
}
|
||||
goto arrayfordone;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the next mapping from the array.
|
||||
*/
|
||||
|
||||
keyObj = NULL;
|
||||
valueObj = NULL;
|
||||
done = ArrayObjNext (interp, varPtr, searchPtr, &keyObj, &valueObj);
|
||||
|
||||
result = TCL_OK;
|
||||
if (done != TCL_CONTINUE) {
|
||||
Tcl_ResetResult(interp);
|
||||
if (done == TCL_ERROR) {
|
||||
varPtr->flags |= TCL_LEAVE_ERR_MSG;
|
||||
Tcl_AddErrorInfo(interp, "array changed during iteration");
|
||||
result = done;
|
||||
}
|
||||
goto arrayfordone;
|
||||
}
|
||||
if (Tcl_ObjSetVar2(interp, keyVarObj, NULL, keyObj, TCL_LEAVE_ERR_MSG) == NULL) {
|
||||
result = TCL_ERROR;
|
||||
goto arrayfordone;
|
||||
}
|
||||
if (valueObj != NULL) {
|
||||
if (Tcl_ObjSetVar2(interp, valueVarObj, NULL, valueObj, TCL_LEAVE_ERR_MSG) == NULL) {
|
||||
result = TCL_ERROR;
|
||||
goto arrayfordone;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Run the script.
|
||||
*/
|
||||
|
||||
TclNRAddCallback(interp, ArrayForLoopCallback, searchPtr, keyVarObj,
|
||||
valueVarObj, scriptObj);
|
||||
return TclNREvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 3);
|
||||
|
||||
/*
|
||||
* For unwinding everything once the iterating is done.
|
||||
*/
|
||||
|
||||
arrayfordone:
|
||||
/* if the search was terminated by an array change, the
|
||||
* VAR_SEARCH_ACTIVE flag will no longer be set
|
||||
*/
|
||||
if (done != TCL_ERROR) {
|
||||
ArrayDoneSearch (iPtr, varPtr, searchPtr);
|
||||
ckfree(searchPtr);
|
||||
}
|
||||
|
||||
TclDecrRefCount(keyVarObj);
|
||||
TclDecrRefCount(valueVarObj);
|
||||
TclDecrRefCount(scriptObj);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -3194,6 +3512,50 @@ ArrayStartSearchCmd(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* ArrayDoneSearch --
|
||||
*
|
||||
* Removes the search from the hash of active searches.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
ArrayDoneSearch (
|
||||
Interp *iPtr,
|
||||
Var *varPtr,
|
||||
ArraySearch *searchPtr)
|
||||
{
|
||||
Tcl_HashEntry *hPtr;
|
||||
ArraySearch *prevPtr;
|
||||
|
||||
/*
|
||||
* Unhook the search from the list of searches associated with the
|
||||
* variable.
|
||||
*/
|
||||
|
||||
hPtr = Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
|
||||
if (hPtr == NULL) {
|
||||
return;
|
||||
}
|
||||
if (searchPtr == Tcl_GetHashValue(hPtr)) {
|
||||
if (searchPtr->nextPtr) {
|
||||
Tcl_SetHashValue(hPtr, searchPtr->nextPtr);
|
||||
} else {
|
||||
varPtr->flags &= ~VAR_SEARCH_ACTIVE;
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
} else {
|
||||
for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) {
|
||||
if (prevPtr->nextPtr == searchPtr) {
|
||||
prevPtr->nextPtr = searchPtr->nextPtr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -3437,9 +3799,8 @@ ArrayDoneSearchCmd(
|
||||
{
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
Var *varPtr, *arrayPtr;
|
||||
Tcl_HashEntry *hPtr;
|
||||
Tcl_Obj *varNameObj, *searchObj;
|
||||
ArraySearch *searchPtr, *prevPtr;
|
||||
ArraySearch *searchPtr;
|
||||
|
||||
if (objc != 3) {
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId");
|
||||
@@ -3493,27 +3854,7 @@ ArrayDoneSearchCmd(
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unhook the search from the list of searches associated with the
|
||||
* variable.
|
||||
*/
|
||||
|
||||
hPtr = Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
|
||||
if (searchPtr == Tcl_GetHashValue(hPtr)) {
|
||||
if (searchPtr->nextPtr) {
|
||||
Tcl_SetHashValue(hPtr, searchPtr->nextPtr);
|
||||
} else {
|
||||
varPtr->flags &= ~VAR_SEARCH_ACTIVE;
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
} else {
|
||||
for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) {
|
||||
if (prevPtr->nextPtr == searchPtr) {
|
||||
prevPtr->nextPtr = searchPtr->nextPtr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ArrayDoneSearch (iPtr, varPtr, searchPtr);
|
||||
ckfree(searchPtr);
|
||||
return TCL_OK;
|
||||
}
|
||||
@@ -4372,6 +4713,7 @@ TclInitArrayCmd(
|
||||
{"anymore", ArrayAnyMoreCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
|
||||
{"donesearch", ArrayDoneSearchCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
|
||||
{"exists", ArrayExistsCmd, TclCompileArrayExistsCmd, NULL, NULL, 0},
|
||||
{"for", NULL, TclCompileBasic3ArgCmd, ArrayForNRCmd, NULL, 0},
|
||||
{"get", ArrayGetCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0},
|
||||
{"names", ArrayNamesCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 0},
|
||||
{"nextelement", ArrayNextElementCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
|
||||
|
||||
+2
-2
@@ -203,7 +203,7 @@ proc auto_mkindex {dir args} {
|
||||
}
|
||||
|
||||
auto_mkindex_parser::init
|
||||
foreach file [glob -- {*}$args] {
|
||||
foreach file [lsort [glob -- {*}$args]] {
|
||||
try {
|
||||
append index [auto_mkindex_parser::mkindex $file]
|
||||
} on error {msg opts} {
|
||||
@@ -236,7 +236,7 @@ proc auto_mkindex_old {dir args} {
|
||||
if {![llength $args]} {
|
||||
set args *.tcl
|
||||
}
|
||||
foreach file [glob -- {*}$args] {
|
||||
foreach file [lsort [glob -- {*}$args]] {
|
||||
set f ""
|
||||
set error [catch {
|
||||
set f [open $file]
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
package require Tcl 8.6-
|
||||
# Keep this in sync with pkgIndex.tcl and with the install directories in
|
||||
# Makefiles
|
||||
package provide http 2.8.11
|
||||
package provide http 2.8.12
|
||||
|
||||
namespace eval http {
|
||||
# Allow resourcing to not clobber existing data
|
||||
@@ -1027,6 +1027,7 @@ proc http::Event {sock token} {
|
||||
# We have now read all headers
|
||||
# We ignore HTTP/1.1 100 Continue returns. RFC2616 sec 8.2.3
|
||||
if {$state(http) == "" || ([regexp {^\S+\s(\d+)} $state(http) {} x] && $x == 100)} {
|
||||
set state(state) "connecting"
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
|
||||
package ifneeded http 2.8.11 [list tclPkgSetup $dir http 2.8.11 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
package ifneeded http 2.8.12 [list tclPkgSetup $dir http 2.8.12 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
|
||||
+30
-24
@@ -16,7 +16,7 @@
|
||||
if {[info commands package] == ""} {
|
||||
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
|
||||
}
|
||||
package require -exact Tcl 8.6.6
|
||||
package require -exact Tcl 8.6.7
|
||||
|
||||
# Compute the auto path to use in this interpreter.
|
||||
# The values on the path come from several locations:
|
||||
@@ -284,14 +284,9 @@ proc unknown args {
|
||||
}
|
||||
append cinfo ...
|
||||
}
|
||||
append cinfo "\"\n (\"uplevel\" body line 1)"
|
||||
append cinfo "\n invoked from within"
|
||||
append cinfo "\n\"uplevel 1 \$args\""
|
||||
#
|
||||
# Try each possible form of the stack trace
|
||||
# and trim the extra contribution from the matching case
|
||||
#
|
||||
set expect "$msg\n while executing\n\"$cinfo"
|
||||
set tail "\n (\"uplevel\" body line 1)\n invoked\
|
||||
from within\n\"uplevel 1 \$args\""
|
||||
set expect "$msg\n while executing\n\"$cinfo\"$tail"
|
||||
if {$errInfo eq $expect} {
|
||||
#
|
||||
# The stack has only the eval from the expanded command
|
||||
@@ -305,21 +300,32 @@ proc unknown args {
|
||||
# Stack trace is nested, trim off just the contribution
|
||||
# from the extra "eval" of $args due to the "catch" above.
|
||||
#
|
||||
set expect "\n invoked from within\n\"$cinfo"
|
||||
set exlen [string length $expect]
|
||||
set eilen [string length $errInfo]
|
||||
set i [expr {$eilen - $exlen - 1}]
|
||||
set einfo [string range $errInfo 0 $i]
|
||||
#
|
||||
# For now verify that $errInfo consists of what we are about
|
||||
# to return plus what we expected to trim off.
|
||||
#
|
||||
if {$errInfo ne "$einfo$expect"} {
|
||||
error "Tcl bug: unexpected stack trace in \"unknown\"" {} \
|
||||
[list CORE UNKNOWN BADTRACE $einfo $expect $errInfo]
|
||||
set last [string last $tail $errInfo]
|
||||
if {$last + [string length $tail] != [string length $errInfo]} {
|
||||
# Very likely cannot happen
|
||||
return -options $opts $msg
|
||||
}
|
||||
return -code error -errorcode $errCode \
|
||||
-errorinfo $einfo $msg
|
||||
set errInfo [string range $errInfo 0 $last-1]
|
||||
set tail "\"$cinfo\""
|
||||
set last [string last $tail $errInfo]
|
||||
if {$last + [string length $tail] != [string length $errInfo]} {
|
||||
return -code error -errorcode $errCode \
|
||||
-errorinfo $errInfo $msg
|
||||
}
|
||||
set errInfo [string range $errInfo 0 $last-1]
|
||||
set tail "\n invoked from within\n"
|
||||
set last [string last $tail $errInfo]
|
||||
if {$last + [string length $tail] == [string length $errInfo]} {
|
||||
return -code error -errorcode $errCode \
|
||||
-errorinfo [string range $errInfo 0 $last-1] $msg
|
||||
}
|
||||
set tail "\n while executing\n"
|
||||
set last [string last $tail $errInfo]
|
||||
if {$last + [string length $tail] == [string length $errInfo]} {
|
||||
return -code error -errorcode $errCode \
|
||||
-errorinfo [string range $errInfo 0 $last-1] $msg
|
||||
}
|
||||
return -options $opts $msg
|
||||
} else {
|
||||
dict incr opts -level
|
||||
return -options $opts $msg
|
||||
@@ -618,7 +624,7 @@ proc auto_import {pattern} {
|
||||
if {$tcl_platform(platform) eq "windows"} {
|
||||
# Windows version.
|
||||
#
|
||||
# Note that info executable doesn't work under Windows, so we have to
|
||||
# Note that file executable doesn't work under Windows, so we have to
|
||||
# look for files with .exe, .com, or .bat extensions. Also, the path
|
||||
# may be in the Path or PATH environment variables, and path
|
||||
# components are separated with semicolons, not colons as under Unix.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
package require Tcl 8.5-
|
||||
# When the version number changes, be sure to update the pkgIndex.tcl file,
|
||||
# and the installation directory in the Makefiles.
|
||||
package provide msgcat 1.6.0
|
||||
package provide msgcat 1.6.1
|
||||
|
||||
namespace eval msgcat {
|
||||
namespace export mc mcexists mcload mclocale mcmax mcmset mcpreferences mcset\
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
|
||||
package ifneeded msgcat 1.6.0 [list source [file join $dir msgcat.tcl]]
|
||||
if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
|
||||
package ifneeded msgcat 1.6.1 [list source [file join $dir msgcat.tcl]]
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
# full path name of this file's directory.
|
||||
|
||||
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
|
||||
package ifneeded tcltest 2.4.0 [list source [file join $dir tcltest.tcl]]
|
||||
package ifneeded tcltest 2.4.1 [list source [file join $dir tcltest.tcl]]
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace eval tcltest {
|
||||
# When the version number changes, be sure to update the pkgIndex.tcl file,
|
||||
# and the install directory in the Makefiles. When the minor version
|
||||
# changes (new feature) be sure to update the man page as well.
|
||||
variable Version 2.4.0
|
||||
variable Version 2.4.1
|
||||
|
||||
# Compatibility support for dumb variables defined in tcltest 1
|
||||
# Do not use these. Call [package provide Tcl] and [info patchlevel]
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
if {![info exists TZData(Africa/Khartoum)]} {
|
||||
LoadTimeZoneFile Africa/Khartoum
|
||||
|
||||
set TZData(:Africa/Juba) {
|
||||
{-9223372036854775808 7588 0 LMT}
|
||||
{-1230775588 7200 0 CAT}
|
||||
{10360800 10800 1 CAST}
|
||||
{24786000 7200 0 CAT}
|
||||
{41810400 10800 1 CAST}
|
||||
{56322000 7200 0 CAT}
|
||||
{73432800 10800 1 CAST}
|
||||
{87944400 7200 0 CAT}
|
||||
{104882400 10800 1 CAST}
|
||||
{119480400 7200 0 CAT}
|
||||
{136332000 10800 1 CAST}
|
||||
{151016400 7200 0 CAT}
|
||||
{167781600 10800 1 CAST}
|
||||
{182552400 7200 0 CAT}
|
||||
{199231200 10800 1 CAST}
|
||||
{214174800 7200 0 CAT}
|
||||
{230680800 10800 1 CAST}
|
||||
{245710800 7200 0 CAT}
|
||||
{262735200 10800 1 CAST}
|
||||
{277246800 7200 0 CAT}
|
||||
{294184800 10800 1 CAST}
|
||||
{308782800 7200 0 CAT}
|
||||
{325634400 10800 1 CAST}
|
||||
{340405200 7200 0 CAT}
|
||||
{357084000 10800 1 CAST}
|
||||
{371941200 7200 0 CAT}
|
||||
{388533600 10800 1 CAST}
|
||||
{403477200 7200 0 CAT}
|
||||
{419983200 10800 1 CAST}
|
||||
{435013200 7200 0 CAT}
|
||||
{452037600 10800 1 CAST}
|
||||
{466635600 7200 0 CAT}
|
||||
{483487200 10800 1 CAST}
|
||||
{498171600 7200 0 CAT}
|
||||
{947930400 10800 0 EAT}
|
||||
}
|
||||
set TZData(:Africa/Juba) $TZData(:Africa/Khartoum)
|
||||
|
||||
@@ -36,4 +36,5 @@ set TZData(:Africa/Khartoum) {
|
||||
{483487200 10800 1 CAST}
|
||||
{498171600 7200 0 CAT}
|
||||
{947930400 10800 0 EAT}
|
||||
{1509483600 7200 0 CAT}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ set TZData(:Africa/Windhoek) {
|
||||
{-860976000 10800 1 SAST}
|
||||
{-845254800 7200 0 SAST}
|
||||
{637970400 7200 0 CAT}
|
||||
{765324000 3600 0 WAT}
|
||||
{764200800 3600 0 WAT}
|
||||
{764204400 3600 0 WAT}
|
||||
{778640400 7200 1 WAST}
|
||||
{796780800 3600 0 WAT}
|
||||
{810090000 7200 1 WAST}
|
||||
@@ -54,169 +55,5 @@ set TZData(:Africa/Windhoek) {
|
||||
{1459641600 3600 0 WAT}
|
||||
{1472950800 7200 1 WAST}
|
||||
{1491091200 3600 0 WAT}
|
||||
{1504400400 7200 1 WAST}
|
||||
{1522540800 3600 0 WAT}
|
||||
{1535850000 7200 1 WAST}
|
||||
{1554595200 3600 0 WAT}
|
||||
{1567299600 7200 1 WAST}
|
||||
{1586044800 3600 0 WAT}
|
||||
{1599354000 7200 1 WAST}
|
||||
{1617494400 3600 0 WAT}
|
||||
{1630803600 7200 1 WAST}
|
||||
{1648944000 3600 0 WAT}
|
||||
{1662253200 7200 1 WAST}
|
||||
{1680393600 3600 0 WAT}
|
||||
{1693702800 7200 1 WAST}
|
||||
{1712448000 3600 0 WAT}
|
||||
{1725152400 7200 1 WAST}
|
||||
{1743897600 3600 0 WAT}
|
||||
{1757206800 7200 1 WAST}
|
||||
{1775347200 3600 0 WAT}
|
||||
{1788656400 7200 1 WAST}
|
||||
{1806796800 3600 0 WAT}
|
||||
{1820106000 7200 1 WAST}
|
||||
{1838246400 3600 0 WAT}
|
||||
{1851555600 7200 1 WAST}
|
||||
{1869696000 3600 0 WAT}
|
||||
{1883005200 7200 1 WAST}
|
||||
{1901750400 3600 0 WAT}
|
||||
{1914454800 7200 1 WAST}
|
||||
{1933200000 3600 0 WAT}
|
||||
{1946509200 7200 1 WAST}
|
||||
{1964649600 3600 0 WAT}
|
||||
{1977958800 7200 1 WAST}
|
||||
{1996099200 3600 0 WAT}
|
||||
{2009408400 7200 1 WAST}
|
||||
{2027548800 3600 0 WAT}
|
||||
{2040858000 7200 1 WAST}
|
||||
{2058998400 3600 0 WAT}
|
||||
{2072307600 7200 1 WAST}
|
||||
{2091052800 3600 0 WAT}
|
||||
{2104362000 7200 1 WAST}
|
||||
{2122502400 3600 0 WAT}
|
||||
{2135811600 7200 1 WAST}
|
||||
{2153952000 3600 0 WAT}
|
||||
{2167261200 7200 1 WAST}
|
||||
{2185401600 3600 0 WAT}
|
||||
{2198710800 7200 1 WAST}
|
||||
{2216851200 3600 0 WAT}
|
||||
{2230160400 7200 1 WAST}
|
||||
{2248905600 3600 0 WAT}
|
||||
{2261610000 7200 1 WAST}
|
||||
{2280355200 3600 0 WAT}
|
||||
{2293664400 7200 1 WAST}
|
||||
{2311804800 3600 0 WAT}
|
||||
{2325114000 7200 1 WAST}
|
||||
{2343254400 3600 0 WAT}
|
||||
{2356563600 7200 1 WAST}
|
||||
{2374704000 3600 0 WAT}
|
||||
{2388013200 7200 1 WAST}
|
||||
{2406153600 3600 0 WAT}
|
||||
{2419462800 7200 1 WAST}
|
||||
{2438208000 3600 0 WAT}
|
||||
{2450912400 7200 1 WAST}
|
||||
{2469657600 3600 0 WAT}
|
||||
{2482966800 7200 1 WAST}
|
||||
{2501107200 3600 0 WAT}
|
||||
{2514416400 7200 1 WAST}
|
||||
{2532556800 3600 0 WAT}
|
||||
{2545866000 7200 1 WAST}
|
||||
{2564006400 3600 0 WAT}
|
||||
{2577315600 7200 1 WAST}
|
||||
{2596060800 3600 0 WAT}
|
||||
{2608765200 7200 1 WAST}
|
||||
{2627510400 3600 0 WAT}
|
||||
{2640819600 7200 1 WAST}
|
||||
{2658960000 3600 0 WAT}
|
||||
{2672269200 7200 1 WAST}
|
||||
{2690409600 3600 0 WAT}
|
||||
{2703718800 7200 1 WAST}
|
||||
{2721859200 3600 0 WAT}
|
||||
{2735168400 7200 1 WAST}
|
||||
{2753308800 3600 0 WAT}
|
||||
{2766618000 7200 1 WAST}
|
||||
{2785363200 3600 0 WAT}
|
||||
{2798067600 7200 1 WAST}
|
||||
{2816812800 3600 0 WAT}
|
||||
{2830122000 7200 1 WAST}
|
||||
{2848262400 3600 0 WAT}
|
||||
{2861571600 7200 1 WAST}
|
||||
{2879712000 3600 0 WAT}
|
||||
{2893021200 7200 1 WAST}
|
||||
{2911161600 3600 0 WAT}
|
||||
{2924470800 7200 1 WAST}
|
||||
{2942611200 3600 0 WAT}
|
||||
{2955920400 7200 1 WAST}
|
||||
{2974665600 3600 0 WAT}
|
||||
{2987974800 7200 1 WAST}
|
||||
{3006115200 3600 0 WAT}
|
||||
{3019424400 7200 1 WAST}
|
||||
{3037564800 3600 0 WAT}
|
||||
{3050874000 7200 1 WAST}
|
||||
{3069014400 3600 0 WAT}
|
||||
{3082323600 7200 1 WAST}
|
||||
{3100464000 3600 0 WAT}
|
||||
{3113773200 7200 1 WAST}
|
||||
{3132518400 3600 0 WAT}
|
||||
{3145222800 7200 1 WAST}
|
||||
{3163968000 3600 0 WAT}
|
||||
{3177277200 7200 1 WAST}
|
||||
{3195417600 3600 0 WAT}
|
||||
{3208726800 7200 1 WAST}
|
||||
{3226867200 3600 0 WAT}
|
||||
{3240176400 7200 1 WAST}
|
||||
{3258316800 3600 0 WAT}
|
||||
{3271626000 7200 1 WAST}
|
||||
{3289766400 3600 0 WAT}
|
||||
{3303075600 7200 1 WAST}
|
||||
{3321820800 3600 0 WAT}
|
||||
{3334525200 7200 1 WAST}
|
||||
{3353270400 3600 0 WAT}
|
||||
{3366579600 7200 1 WAST}
|
||||
{3384720000 3600 0 WAT}
|
||||
{3398029200 7200 1 WAST}
|
||||
{3416169600 3600 0 WAT}
|
||||
{3429478800 7200 1 WAST}
|
||||
{3447619200 3600 0 WAT}
|
||||
{3460928400 7200 1 WAST}
|
||||
{3479673600 3600 0 WAT}
|
||||
{3492378000 7200 1 WAST}
|
||||
{3511123200 3600 0 WAT}
|
||||
{3524432400 7200 1 WAST}
|
||||
{3542572800 3600 0 WAT}
|
||||
{3555882000 7200 1 WAST}
|
||||
{3574022400 3600 0 WAT}
|
||||
{3587331600 7200 1 WAST}
|
||||
{3605472000 3600 0 WAT}
|
||||
{3618781200 7200 1 WAST}
|
||||
{3636921600 3600 0 WAT}
|
||||
{3650230800 7200 1 WAST}
|
||||
{3668976000 3600 0 WAT}
|
||||
{3681680400 7200 1 WAST}
|
||||
{3700425600 3600 0 WAT}
|
||||
{3713734800 7200 1 WAST}
|
||||
{3731875200 3600 0 WAT}
|
||||
{3745184400 7200 1 WAST}
|
||||
{3763324800 3600 0 WAT}
|
||||
{3776634000 7200 1 WAST}
|
||||
{3794774400 3600 0 WAT}
|
||||
{3808083600 7200 1 WAST}
|
||||
{3826224000 3600 0 WAT}
|
||||
{3839533200 7200 1 WAST}
|
||||
{3858278400 3600 0 WAT}
|
||||
{3871587600 7200 1 WAST}
|
||||
{3889728000 3600 0 WAT}
|
||||
{3903037200 7200 1 WAST}
|
||||
{3921177600 3600 0 WAT}
|
||||
{3934486800 7200 1 WAST}
|
||||
{3952627200 3600 0 WAT}
|
||||
{3965936400 7200 1 WAST}
|
||||
{3984076800 3600 0 WAT}
|
||||
{3997386000 7200 1 WAST}
|
||||
{4016131200 3600 0 WAT}
|
||||
{4028835600 7200 1 WAST}
|
||||
{4047580800 3600 0 WAT}
|
||||
{4060890000 7200 1 WAST}
|
||||
{4079030400 3600 0 WAT}
|
||||
{4092339600 7200 1 WAST}
|
||||
{1504400400 7200 0 CAT}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Adak) {
|
||||
{-9223372036854775808 44001 0 LMT}
|
||||
{-3225356001 -42398 0 LMT}
|
||||
{-9223372036854775808 44002 0 LMT}
|
||||
{-3225223727 -42398 0 LMT}
|
||||
{-2188944802 -39600 0 NST}
|
||||
{-883573200 -39600 0 NST}
|
||||
{-880196400 -36000 1 NWT}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:America/Anchorage) {
|
||||
{-9223372036854775808 50424 0 LMT}
|
||||
{-3225362424 -35976 0 LMT}
|
||||
{-3225223727 -35976 0 LMT}
|
||||
{-2188951224 -36000 0 AST}
|
||||
{-883576800 -36000 0 AST}
|
||||
{-880200000 -32400 1 AWT}
|
||||
|
||||
@@ -11,8 +11,6 @@ set TZData(:America/Detroit) {
|
||||
{-757364400 -18000 0 EST}
|
||||
{-684349200 -14400 1 EDT}
|
||||
{-671047200 -18000 0 EST}
|
||||
{-80499600 -14400 1 EDT}
|
||||
{-68666400 -18000 0 EST}
|
||||
{94712400 -18000 0 EST}
|
||||
{104914800 -14400 1 EDT}
|
||||
{120636000 -18000 0 EST}
|
||||
|
||||
@@ -79,4 +79,168 @@ set TZData(:America/Grand_Turk) {
|
||||
{1414908000 -18000 0 EST}
|
||||
{1425798000 -14400 1 EDT}
|
||||
{1446361200 -14400 0 AST}
|
||||
{1520751600 -14400 0 EDT}
|
||||
{1541311200 -18000 0 EST}
|
||||
{1552201200 -14400 1 EDT}
|
||||
{1572760800 -18000 0 EST}
|
||||
{1583650800 -14400 1 EDT}
|
||||
{1604210400 -18000 0 EST}
|
||||
{1615705200 -14400 1 EDT}
|
||||
{1636264800 -18000 0 EST}
|
||||
{1647154800 -14400 1 EDT}
|
||||
{1667714400 -18000 0 EST}
|
||||
{1678604400 -14400 1 EDT}
|
||||
{1699164000 -18000 0 EST}
|
||||
{1710054000 -14400 1 EDT}
|
||||
{1730613600 -18000 0 EST}
|
||||
{1741503600 -14400 1 EDT}
|
||||
{1762063200 -18000 0 EST}
|
||||
{1772953200 -14400 1 EDT}
|
||||
{1793512800 -18000 0 EST}
|
||||
{1805007600 -14400 1 EDT}
|
||||
{1825567200 -18000 0 EST}
|
||||
{1836457200 -14400 1 EDT}
|
||||
{1857016800 -18000 0 EST}
|
||||
{1867906800 -14400 1 EDT}
|
||||
{1888466400 -18000 0 EST}
|
||||
{1899356400 -14400 1 EDT}
|
||||
{1919916000 -18000 0 EST}
|
||||
{1930806000 -14400 1 EDT}
|
||||
{1951365600 -18000 0 EST}
|
||||
{1962860400 -14400 1 EDT}
|
||||
{1983420000 -18000 0 EST}
|
||||
{1994310000 -14400 1 EDT}
|
||||
{2014869600 -18000 0 EST}
|
||||
{2025759600 -14400 1 EDT}
|
||||
{2046319200 -18000 0 EST}
|
||||
{2057209200 -14400 1 EDT}
|
||||
{2077768800 -18000 0 EST}
|
||||
{2088658800 -14400 1 EDT}
|
||||
{2109218400 -18000 0 EST}
|
||||
{2120108400 -14400 1 EDT}
|
||||
{2140668000 -18000 0 EST}
|
||||
{2152162800 -14400 1 EDT}
|
||||
{2172722400 -18000 0 EST}
|
||||
{2183612400 -14400 1 EDT}
|
||||
{2204172000 -18000 0 EST}
|
||||
{2215062000 -14400 1 EDT}
|
||||
{2235621600 -18000 0 EST}
|
||||
{2246511600 -14400 1 EDT}
|
||||
{2267071200 -18000 0 EST}
|
||||
{2277961200 -14400 1 EDT}
|
||||
{2298520800 -18000 0 EST}
|
||||
{2309410800 -14400 1 EDT}
|
||||
{2329970400 -18000 0 EST}
|
||||
{2341465200 -14400 1 EDT}
|
||||
{2362024800 -18000 0 EST}
|
||||
{2372914800 -14400 1 EDT}
|
||||
{2393474400 -18000 0 EST}
|
||||
{2404364400 -14400 1 EDT}
|
||||
{2424924000 -18000 0 EST}
|
||||
{2435814000 -14400 1 EDT}
|
||||
{2456373600 -18000 0 EST}
|
||||
{2467263600 -14400 1 EDT}
|
||||
{2487823200 -18000 0 EST}
|
||||
{2499318000 -14400 1 EDT}
|
||||
{2519877600 -18000 0 EST}
|
||||
{2530767600 -14400 1 EDT}
|
||||
{2551327200 -18000 0 EST}
|
||||
{2562217200 -14400 1 EDT}
|
||||
{2582776800 -18000 0 EST}
|
||||
{2593666800 -14400 1 EDT}
|
||||
{2614226400 -18000 0 EST}
|
||||
{2625116400 -14400 1 EDT}
|
||||
{2645676000 -18000 0 EST}
|
||||
{2656566000 -14400 1 EDT}
|
||||
{2677125600 -18000 0 EST}
|
||||
{2688620400 -14400 1 EDT}
|
||||
{2709180000 -18000 0 EST}
|
||||
{2720070000 -14400 1 EDT}
|
||||
{2740629600 -18000 0 EST}
|
||||
{2751519600 -14400 1 EDT}
|
||||
{2772079200 -18000 0 EST}
|
||||
{2782969200 -14400 1 EDT}
|
||||
{2803528800 -18000 0 EST}
|
||||
{2814418800 -14400 1 EDT}
|
||||
{2834978400 -18000 0 EST}
|
||||
{2846473200 -14400 1 EDT}
|
||||
{2867032800 -18000 0 EST}
|
||||
{2877922800 -14400 1 EDT}
|
||||
{2898482400 -18000 0 EST}
|
||||
{2909372400 -14400 1 EDT}
|
||||
{2929932000 -18000 0 EST}
|
||||
{2940822000 -14400 1 EDT}
|
||||
{2961381600 -18000 0 EST}
|
||||
{2972271600 -14400 1 EDT}
|
||||
{2992831200 -18000 0 EST}
|
||||
{3003721200 -14400 1 EDT}
|
||||
{3024280800 -18000 0 EST}
|
||||
{3035775600 -14400 1 EDT}
|
||||
{3056335200 -18000 0 EST}
|
||||
{3067225200 -14400 1 EDT}
|
||||
{3087784800 -18000 0 EST}
|
||||
{3098674800 -14400 1 EDT}
|
||||
{3119234400 -18000 0 EST}
|
||||
{3130124400 -14400 1 EDT}
|
||||
{3150684000 -18000 0 EST}
|
||||
{3161574000 -14400 1 EDT}
|
||||
{3182133600 -18000 0 EST}
|
||||
{3193023600 -14400 1 EDT}
|
||||
{3213583200 -18000 0 EST}
|
||||
{3225078000 -14400 1 EDT}
|
||||
{3245637600 -18000 0 EST}
|
||||
{3256527600 -14400 1 EDT}
|
||||
{3277087200 -18000 0 EST}
|
||||
{3287977200 -14400 1 EDT}
|
||||
{3308536800 -18000 0 EST}
|
||||
{3319426800 -14400 1 EDT}
|
||||
{3339986400 -18000 0 EST}
|
||||
{3350876400 -14400 1 EDT}
|
||||
{3371436000 -18000 0 EST}
|
||||
{3382930800 -14400 1 EDT}
|
||||
{3403490400 -18000 0 EST}
|
||||
{3414380400 -14400 1 EDT}
|
||||
{3434940000 -18000 0 EST}
|
||||
{3445830000 -14400 1 EDT}
|
||||
{3466389600 -18000 0 EST}
|
||||
{3477279600 -14400 1 EDT}
|
||||
{3497839200 -18000 0 EST}
|
||||
{3508729200 -14400 1 EDT}
|
||||
{3529288800 -18000 0 EST}
|
||||
{3540178800 -14400 1 EDT}
|
||||
{3560738400 -18000 0 EST}
|
||||
{3572233200 -14400 1 EDT}
|
||||
{3592792800 -18000 0 EST}
|
||||
{3603682800 -14400 1 EDT}
|
||||
{3624242400 -18000 0 EST}
|
||||
{3635132400 -14400 1 EDT}
|
||||
{3655692000 -18000 0 EST}
|
||||
{3666582000 -14400 1 EDT}
|
||||
{3687141600 -18000 0 EST}
|
||||
{3698031600 -14400 1 EDT}
|
||||
{3718591200 -18000 0 EST}
|
||||
{3730086000 -14400 1 EDT}
|
||||
{3750645600 -18000 0 EST}
|
||||
{3761535600 -14400 1 EDT}
|
||||
{3782095200 -18000 0 EST}
|
||||
{3792985200 -14400 1 EDT}
|
||||
{3813544800 -18000 0 EST}
|
||||
{3824434800 -14400 1 EDT}
|
||||
{3844994400 -18000 0 EST}
|
||||
{3855884400 -14400 1 EDT}
|
||||
{3876444000 -18000 0 EST}
|
||||
{3887334000 -14400 1 EDT}
|
||||
{3907893600 -18000 0 EST}
|
||||
{3919388400 -14400 1 EDT}
|
||||
{3939948000 -18000 0 EST}
|
||||
{3950838000 -14400 1 EDT}
|
||||
{3971397600 -18000 0 EST}
|
||||
{3982287600 -14400 1 EDT}
|
||||
{4002847200 -18000 0 EST}
|
||||
{4013737200 -14400 1 EDT}
|
||||
{4034296800 -18000 0 EST}
|
||||
{4045186800 -14400 1 EDT}
|
||||
{4065746400 -18000 0 EST}
|
||||
{4076636400 -14400 1 EDT}
|
||||
{4097196000 -18000 0 EST}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:America/Juneau) {
|
||||
{-9223372036854775808 54139 0 LMT}
|
||||
{-3225366139 -32261 0 LMT}
|
||||
{-3225223727 -32261 0 LMT}
|
||||
{-2188954939 -28800 0 PST}
|
||||
{-883584000 -28800 0 PST}
|
||||
{-880207200 -25200 1 PWT}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:America/Metlakatla) {
|
||||
{-9223372036854775808 54822 0 LMT}
|
||||
{-3225366822 -31578 0 LMT}
|
||||
{-3225223727 -31578 0 LMT}
|
||||
{-2188955622 -28800 0 PST}
|
||||
{-883584000 -28800 0 PST}
|
||||
{-880207200 -25200 1 PWT}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:America/Nome) {
|
||||
{-9223372036854775808 46701 0 LMT}
|
||||
{-3225358701 -39698 0 LMT}
|
||||
{-9223372036854775808 46702 0 LMT}
|
||||
{-3225223727 -39698 0 LMT}
|
||||
{-2188947502 -39600 0 NST}
|
||||
{-883573200 -39600 0 NST}
|
||||
{-880196400 -36000 1 NWT}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:America/Sitka) {
|
||||
{-9223372036854775808 53927 0 LMT}
|
||||
{-3225365927 -32473 0 LMT}
|
||||
{-3225223727 -32473 0 LMT}
|
||||
{-2188954727 -28800 0 PST}
|
||||
{-883584000 -28800 0 PST}
|
||||
{-880207200 -25200 1 PWT}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:America/Yakutat) {
|
||||
{-9223372036854775808 52865 0 LMT}
|
||||
{-3225364865 -33535 0 LMT}
|
||||
{-3225223727 -33535 0 LMT}
|
||||
{-2188953665 -32400 0 YST}
|
||||
{-883580400 -32400 0 YST}
|
||||
{-880203600 -28800 1 YWT}
|
||||
|
||||
@@ -88,4 +88,169 @@ set TZData(:Asia/Famagusta) {
|
||||
{1445734800 7200 0 EET}
|
||||
{1459040400 10800 1 EEST}
|
||||
{1473285600 10800 0 +03}
|
||||
{1509238800 7200 0 EET}
|
||||
{1521939600 10800 1 EEST}
|
||||
{1540688400 7200 0 EET}
|
||||
{1553994000 10800 1 EEST}
|
||||
{1572138000 7200 0 EET}
|
||||
{1585443600 10800 1 EEST}
|
||||
{1603587600 7200 0 EET}
|
||||
{1616893200 10800 1 EEST}
|
||||
{1635642000 7200 0 EET}
|
||||
{1648342800 10800 1 EEST}
|
||||
{1667091600 7200 0 EET}
|
||||
{1679792400 10800 1 EEST}
|
||||
{1698541200 7200 0 EET}
|
||||
{1711846800 10800 1 EEST}
|
||||
{1729990800 7200 0 EET}
|
||||
{1743296400 10800 1 EEST}
|
||||
{1761440400 7200 0 EET}
|
||||
{1774746000 10800 1 EEST}
|
||||
{1792890000 7200 0 EET}
|
||||
{1806195600 10800 1 EEST}
|
||||
{1824944400 7200 0 EET}
|
||||
{1837645200 10800 1 EEST}
|
||||
{1856394000 7200 0 EET}
|
||||
{1869094800 10800 1 EEST}
|
||||
{1887843600 7200 0 EET}
|
||||
{1901149200 10800 1 EEST}
|
||||
{1919293200 7200 0 EET}
|
||||
{1932598800 10800 1 EEST}
|
||||
{1950742800 7200 0 EET}
|
||||
{1964048400 10800 1 EEST}
|
||||
{1982797200 7200 0 EET}
|
||||
{1995498000 10800 1 EEST}
|
||||
{2014246800 7200 0 EET}
|
||||
{2026947600 10800 1 EEST}
|
||||
{2045696400 7200 0 EET}
|
||||
{2058397200 10800 1 EEST}
|
||||
{2077146000 7200 0 EET}
|
||||
{2090451600 10800 1 EEST}
|
||||
{2108595600 7200 0 EET}
|
||||
{2121901200 10800 1 EEST}
|
||||
{2140045200 7200 0 EET}
|
||||
{2153350800 10800 1 EEST}
|
||||
{2172099600 7200 0 EET}
|
||||
{2184800400 10800 1 EEST}
|
||||
{2203549200 7200 0 EET}
|
||||
{2216250000 10800 1 EEST}
|
||||
{2234998800 7200 0 EET}
|
||||
{2248304400 10800 1 EEST}
|
||||
{2266448400 7200 0 EET}
|
||||
{2279754000 10800 1 EEST}
|
||||
{2297898000 7200 0 EET}
|
||||
{2311203600 10800 1 EEST}
|
||||
{2329347600 7200 0 EET}
|
||||
{2342653200 10800 1 EEST}
|
||||
{2361402000 7200 0 EET}
|
||||
{2374102800 10800 1 EEST}
|
||||
{2392851600 7200 0 EET}
|
||||
{2405552400 10800 1 EEST}
|
||||
{2424301200 7200 0 EET}
|
||||
{2437606800 10800 1 EEST}
|
||||
{2455750800 7200 0 EET}
|
||||
{2469056400 10800 1 EEST}
|
||||
{2487200400 7200 0 EET}
|
||||
{2500506000 10800 1 EEST}
|
||||
{2519254800 7200 0 EET}
|
||||
{2531955600 10800 1 EEST}
|
||||
{2550704400 7200 0 EET}
|
||||
{2563405200 10800 1 EEST}
|
||||
{2582154000 7200 0 EET}
|
||||
{2595459600 10800 1 EEST}
|
||||
{2613603600 7200 0 EET}
|
||||
{2626909200 10800 1 EEST}
|
||||
{2645053200 7200 0 EET}
|
||||
{2658358800 10800 1 EEST}
|
||||
{2676502800 7200 0 EET}
|
||||
{2689808400 10800 1 EEST}
|
||||
{2708557200 7200 0 EET}
|
||||
{2721258000 10800 1 EEST}
|
||||
{2740006800 7200 0 EET}
|
||||
{2752707600 10800 1 EEST}
|
||||
{2771456400 7200 0 EET}
|
||||
{2784762000 10800 1 EEST}
|
||||
{2802906000 7200 0 EET}
|
||||
{2816211600 10800 1 EEST}
|
||||
{2834355600 7200 0 EET}
|
||||
{2847661200 10800 1 EEST}
|
||||
{2866410000 7200 0 EET}
|
||||
{2879110800 10800 1 EEST}
|
||||
{2897859600 7200 0 EET}
|
||||
{2910560400 10800 1 EEST}
|
||||
{2929309200 7200 0 EET}
|
||||
{2942010000 10800 1 EEST}
|
||||
{2960758800 7200 0 EET}
|
||||
{2974064400 10800 1 EEST}
|
||||
{2992208400 7200 0 EET}
|
||||
{3005514000 10800 1 EEST}
|
||||
{3023658000 7200 0 EET}
|
||||
{3036963600 10800 1 EEST}
|
||||
{3055712400 7200 0 EET}
|
||||
{3068413200 10800 1 EEST}
|
||||
{3087162000 7200 0 EET}
|
||||
{3099862800 10800 1 EEST}
|
||||
{3118611600 7200 0 EET}
|
||||
{3131917200 10800 1 EEST}
|
||||
{3150061200 7200 0 EET}
|
||||
{3163366800 10800 1 EEST}
|
||||
{3181510800 7200 0 EET}
|
||||
{3194816400 10800 1 EEST}
|
||||
{3212960400 7200 0 EET}
|
||||
{3226266000 10800 1 EEST}
|
||||
{3245014800 7200 0 EET}
|
||||
{3257715600 10800 1 EEST}
|
||||
{3276464400 7200 0 EET}
|
||||
{3289165200 10800 1 EEST}
|
||||
{3307914000 7200 0 EET}
|
||||
{3321219600 10800 1 EEST}
|
||||
{3339363600 7200 0 EET}
|
||||
{3352669200 10800 1 EEST}
|
||||
{3370813200 7200 0 EET}
|
||||
{3384118800 10800 1 EEST}
|
||||
{3402867600 7200 0 EET}
|
||||
{3415568400 10800 1 EEST}
|
||||
{3434317200 7200 0 EET}
|
||||
{3447018000 10800 1 EEST}
|
||||
{3465766800 7200 0 EET}
|
||||
{3479072400 10800 1 EEST}
|
||||
{3497216400 7200 0 EET}
|
||||
{3510522000 10800 1 EEST}
|
||||
{3528666000 7200 0 EET}
|
||||
{3541971600 10800 1 EEST}
|
||||
{3560115600 7200 0 EET}
|
||||
{3573421200 10800 1 EEST}
|
||||
{3592170000 7200 0 EET}
|
||||
{3604870800 10800 1 EEST}
|
||||
{3623619600 7200 0 EET}
|
||||
{3636320400 10800 1 EEST}
|
||||
{3655069200 7200 0 EET}
|
||||
{3668374800 10800 1 EEST}
|
||||
{3686518800 7200 0 EET}
|
||||
{3699824400 10800 1 EEST}
|
||||
{3717968400 7200 0 EET}
|
||||
{3731274000 10800 1 EEST}
|
||||
{3750022800 7200 0 EET}
|
||||
{3762723600 10800 1 EEST}
|
||||
{3781472400 7200 0 EET}
|
||||
{3794173200 10800 1 EEST}
|
||||
{3812922000 7200 0 EET}
|
||||
{3825622800 10800 1 EEST}
|
||||
{3844371600 7200 0 EET}
|
||||
{3857677200 10800 1 EEST}
|
||||
{3875821200 7200 0 EET}
|
||||
{3889126800 10800 1 EEST}
|
||||
{3907270800 7200 0 EET}
|
||||
{3920576400 10800 1 EEST}
|
||||
{3939325200 7200 0 EET}
|
||||
{3952026000 10800 1 EEST}
|
||||
{3970774800 7200 0 EET}
|
||||
{3983475600 10800 1 EEST}
|
||||
{4002224400 7200 0 EET}
|
||||
{4015530000 10800 1 EEST}
|
||||
{4033674000 7200 0 EET}
|
||||
{4046979600 10800 1 EEST}
|
||||
{4065123600 7200 0 EET}
|
||||
{4078429200 10800 1 EEST}
|
||||
{4096573200 7200 0 EET}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
set TZData(:Asia/Kolkata) {
|
||||
{-9223372036854775808 21208 0 LMT}
|
||||
{-2840162008 21200 0 HMT}
|
||||
{-891582800 23400 0 +0630}
|
||||
{-3645237208 21200 0 HMT}
|
||||
{-3155694800 19270 0 MMT}
|
||||
{-2019705670 19800 0 IST}
|
||||
{-891581400 23400 1 +0630}
|
||||
{-872058600 19800 0 IST}
|
||||
{-862637400 23400 1 +0630}
|
||||
{-764145000 19800 0 IST}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# created by tools/tclZIC.tcl - do not edit
|
||||
|
||||
set TZData(:Asia/Yangon) {
|
||||
{-9223372036854775808 23080 0 LMT}
|
||||
{-2840163880 23080 0 RMT}
|
||||
{-1577946280 23400 0 +0630}
|
||||
{-9223372036854775808 23087 0 LMT}
|
||||
{-2840163887 23087 0 RMT}
|
||||
{-1577946287 23400 0 +0630}
|
||||
{-873268200 32400 0 +09}
|
||||
{-778410000 23400 0 +0630}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ set TZData(:Asia/Yerevan) {
|
||||
{1256421600 14400 0 +04}
|
||||
{1269727200 18000 1 +05}
|
||||
{1288476000 14400 0 +04}
|
||||
{1293825600 14400 0 +04}
|
||||
{1301176800 18000 1 +05}
|
||||
{1319925600 14400 0 +04}
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ set TZData(:Europe/Dublin) {
|
||||
{-986162400 0 0 IST}
|
||||
{-969228000 3600 1 IST}
|
||||
{-950479200 0 0 IST}
|
||||
{-942015600 3600 1 IST}
|
||||
{-733359600 0 0 GMT}
|
||||
{-942012000 3600 1 IST}
|
||||
{-733356000 0 0 GMT}
|
||||
{-719445600 3600 1 IST}
|
||||
{-699490800 0 0 GMT}
|
||||
{-699487200 0 0 GMT}
|
||||
{-684972000 3600 0 IST}
|
||||
{-668037600 0 0 IST}
|
||||
{-654732000 3600 1 IST}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
set TZData(:Pacific/Apia) {
|
||||
{-9223372036854775808 45184 0 LMT}
|
||||
{-2855737984 -41216 0 LMT}
|
||||
{-2445424384 -41216 0 LMT}
|
||||
{-1861878784 -41400 0 -1130}
|
||||
{-631110600 -39600 0 -10}
|
||||
{1285498800 -36000 1 -10}
|
||||
|
||||
+12
-12
@@ -24,7 +24,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{1478354400 46800 1 +13}
|
||||
{1484402400 43200 0 +12}
|
||||
{1509804000 46800 1 +13}
|
||||
{1516456800 43200 0 +12}
|
||||
{1515852000 43200 0 +12}
|
||||
{1541253600 46800 1 +13}
|
||||
{1547906400 43200 0 +12}
|
||||
{1572703200 46800 1 +13}
|
||||
@@ -36,7 +36,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{1667656800 46800 1 +13}
|
||||
{1673704800 43200 0 +12}
|
||||
{1699106400 46800 1 +13}
|
||||
{1705759200 43200 0 +12}
|
||||
{1705154400 43200 0 +12}
|
||||
{1730556000 46800 1 +13}
|
||||
{1737208800 43200 0 +12}
|
||||
{1762005600 46800 1 +13}
|
||||
@@ -46,7 +46,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{1825509600 46800 1 +13}
|
||||
{1831557600 43200 0 +12}
|
||||
{1856959200 46800 1 +13}
|
||||
{1863612000 43200 0 +12}
|
||||
{1863007200 43200 0 +12}
|
||||
{1888408800 46800 1 +13}
|
||||
{1895061600 43200 0 +12}
|
||||
{1919858400 46800 1 +13}
|
||||
@@ -58,7 +58,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{2014812000 46800 1 +13}
|
||||
{2020860000 43200 0 +12}
|
||||
{2046261600 46800 1 +13}
|
||||
{2052914400 43200 0 +12}
|
||||
{2052309600 43200 0 +12}
|
||||
{2077711200 46800 1 +13}
|
||||
{2084364000 43200 0 +12}
|
||||
{2109160800 46800 1 +13}
|
||||
@@ -80,7 +80,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{2361967200 46800 1 +13}
|
||||
{2368015200 43200 0 +12}
|
||||
{2393416800 46800 1 +13}
|
||||
{2400069600 43200 0 +12}
|
||||
{2399464800 43200 0 +12}
|
||||
{2424866400 46800 1 +13}
|
||||
{2431519200 43200 0 +12}
|
||||
{2456316000 46800 1 +13}
|
||||
@@ -92,7 +92,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{2551269600 46800 1 +13}
|
||||
{2557317600 43200 0 +12}
|
||||
{2582719200 46800 1 +13}
|
||||
{2589372000 43200 0 +12}
|
||||
{2588767200 43200 0 +12}
|
||||
{2614168800 46800 1 +13}
|
||||
{2620821600 43200 0 +12}
|
||||
{2645618400 46800 1 +13}
|
||||
@@ -102,7 +102,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{2709122400 46800 1 +13}
|
||||
{2715170400 43200 0 +12}
|
||||
{2740572000 46800 1 +13}
|
||||
{2747224800 43200 0 +12}
|
||||
{2746620000 43200 0 +12}
|
||||
{2772021600 46800 1 +13}
|
||||
{2778674400 43200 0 +12}
|
||||
{2803471200 46800 1 +13}
|
||||
@@ -114,7 +114,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{2898424800 46800 1 +13}
|
||||
{2904472800 43200 0 +12}
|
||||
{2929874400 46800 1 +13}
|
||||
{2936527200 43200 0 +12}
|
||||
{2935922400 43200 0 +12}
|
||||
{2961324000 46800 1 +13}
|
||||
{2967976800 43200 0 +12}
|
||||
{2992773600 46800 1 +13}
|
||||
@@ -136,7 +136,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{3245580000 46800 1 +13}
|
||||
{3251628000 43200 0 +12}
|
||||
{3277029600 46800 1 +13}
|
||||
{3283682400 43200 0 +12}
|
||||
{3283077600 43200 0 +12}
|
||||
{3308479200 46800 1 +13}
|
||||
{3315132000 43200 0 +12}
|
||||
{3339928800 46800 1 +13}
|
||||
@@ -148,7 +148,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{3434882400 46800 1 +13}
|
||||
{3440930400 43200 0 +12}
|
||||
{3466332000 46800 1 +13}
|
||||
{3472984800 43200 0 +12}
|
||||
{3472380000 43200 0 +12}
|
||||
{3497781600 46800 1 +13}
|
||||
{3504434400 43200 0 +12}
|
||||
{3529231200 46800 1 +13}
|
||||
@@ -158,7 +158,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{3592735200 46800 1 +13}
|
||||
{3598783200 43200 0 +12}
|
||||
{3624184800 46800 1 +13}
|
||||
{3630837600 43200 0 +12}
|
||||
{3630232800 43200 0 +12}
|
||||
{3655634400 46800 1 +13}
|
||||
{3662287200 43200 0 +12}
|
||||
{3687084000 46800 1 +13}
|
||||
@@ -170,7 +170,7 @@ set TZData(:Pacific/Fiji) {
|
||||
{3782037600 46800 1 +13}
|
||||
{3788085600 43200 0 +12}
|
||||
{3813487200 46800 1 +13}
|
||||
{3820140000 43200 0 +12}
|
||||
{3819535200 43200 0 +12}
|
||||
{3844936800 46800 1 +13}
|
||||
{3851589600 43200 0 +12}
|
||||
{3876386400 46800 1 +13}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
set TZData(:Pacific/Pago_Pago) {
|
||||
{-9223372036854775808 45432 0 LMT}
|
||||
{-2855738232 -40968 0 LMT}
|
||||
{-2445424632 -40968 0 LMT}
|
||||
{-1861879032 -39600 0 SST}
|
||||
}
|
||||
|
||||
@@ -13,169 +13,4 @@ set TZData(:Pacific/Tongatapu) {
|
||||
{1012046400 46800 0 +13}
|
||||
{1478350800 50400 1 +14}
|
||||
{1484398800 46800 0 +13}
|
||||
{1509800400 50400 1 +14}
|
||||
{1516453200 46800 0 +13}
|
||||
{1541250000 50400 1 +14}
|
||||
{1547902800 46800 0 +13}
|
||||
{1572699600 50400 1 +14}
|
||||
{1579352400 46800 0 +13}
|
||||
{1604149200 50400 1 +14}
|
||||
{1610802000 46800 0 +13}
|
||||
{1636203600 50400 1 +14}
|
||||
{1642251600 46800 0 +13}
|
||||
{1667653200 50400 1 +14}
|
||||
{1673701200 46800 0 +13}
|
||||
{1699102800 50400 1 +14}
|
||||
{1705755600 46800 0 +13}
|
||||
{1730552400 50400 1 +14}
|
||||
{1737205200 46800 0 +13}
|
||||
{1762002000 50400 1 +14}
|
||||
{1768654800 46800 0 +13}
|
||||
{1793451600 50400 1 +14}
|
||||
{1800104400 46800 0 +13}
|
||||
{1825506000 50400 1 +14}
|
||||
{1831554000 46800 0 +13}
|
||||
{1856955600 50400 1 +14}
|
||||
{1863608400 46800 0 +13}
|
||||
{1888405200 50400 1 +14}
|
||||
{1895058000 46800 0 +13}
|
||||
{1919854800 50400 1 +14}
|
||||
{1926507600 46800 0 +13}
|
||||
{1951304400 50400 1 +14}
|
||||
{1957957200 46800 0 +13}
|
||||
{1983358800 50400 1 +14}
|
||||
{1989406800 46800 0 +13}
|
||||
{2014808400 50400 1 +14}
|
||||
{2020856400 46800 0 +13}
|
||||
{2046258000 50400 1 +14}
|
||||
{2052910800 46800 0 +13}
|
||||
{2077707600 50400 1 +14}
|
||||
{2084360400 46800 0 +13}
|
||||
{2109157200 50400 1 +14}
|
||||
{2115810000 46800 0 +13}
|
||||
{2140606800 50400 1 +14}
|
||||
{2147259600 46800 0 +13}
|
||||
{2172661200 50400 1 +14}
|
||||
{2178709200 46800 0 +13}
|
||||
{2204110800 50400 1 +14}
|
||||
{2210158800 46800 0 +13}
|
||||
{2235560400 50400 1 +14}
|
||||
{2242213200 46800 0 +13}
|
||||
{2267010000 50400 1 +14}
|
||||
{2273662800 46800 0 +13}
|
||||
{2298459600 50400 1 +14}
|
||||
{2305112400 46800 0 +13}
|
||||
{2329909200 50400 1 +14}
|
||||
{2336562000 46800 0 +13}
|
||||
{2361963600 50400 1 +14}
|
||||
{2368011600 46800 0 +13}
|
||||
{2393413200 50400 1 +14}
|
||||
{2400066000 46800 0 +13}
|
||||
{2424862800 50400 1 +14}
|
||||
{2431515600 46800 0 +13}
|
||||
{2456312400 50400 1 +14}
|
||||
{2462965200 46800 0 +13}
|
||||
{2487762000 50400 1 +14}
|
||||
{2494414800 46800 0 +13}
|
||||
{2519816400 50400 1 +14}
|
||||
{2525864400 46800 0 +13}
|
||||
{2551266000 50400 1 +14}
|
||||
{2557314000 46800 0 +13}
|
||||
{2582715600 50400 1 +14}
|
||||
{2589368400 46800 0 +13}
|
||||
{2614165200 50400 1 +14}
|
||||
{2620818000 46800 0 +13}
|
||||
{2645614800 50400 1 +14}
|
||||
{2652267600 46800 0 +13}
|
||||
{2677064400 50400 1 +14}
|
||||
{2683717200 46800 0 +13}
|
||||
{2709118800 50400 1 +14}
|
||||
{2715166800 46800 0 +13}
|
||||
{2740568400 50400 1 +14}
|
||||
{2747221200 46800 0 +13}
|
||||
{2772018000 50400 1 +14}
|
||||
{2778670800 46800 0 +13}
|
||||
{2803467600 50400 1 +14}
|
||||
{2810120400 46800 0 +13}
|
||||
{2834917200 50400 1 +14}
|
||||
{2841570000 46800 0 +13}
|
||||
{2866971600 50400 1 +14}
|
||||
{2873019600 46800 0 +13}
|
||||
{2898421200 50400 1 +14}
|
||||
{2904469200 46800 0 +13}
|
||||
{2929870800 50400 1 +14}
|
||||
{2936523600 46800 0 +13}
|
||||
{2961320400 50400 1 +14}
|
||||
{2967973200 46800 0 +13}
|
||||
{2992770000 50400 1 +14}
|
||||
{2999422800 46800 0 +13}
|
||||
{3024219600 50400 1 +14}
|
||||
{3030872400 46800 0 +13}
|
||||
{3056274000 50400 1 +14}
|
||||
{3062322000 46800 0 +13}
|
||||
{3087723600 50400 1 +14}
|
||||
{3093771600 46800 0 +13}
|
||||
{3119173200 50400 1 +14}
|
||||
{3125826000 46800 0 +13}
|
||||
{3150622800 50400 1 +14}
|
||||
{3157275600 46800 0 +13}
|
||||
{3182072400 50400 1 +14}
|
||||
{3188725200 46800 0 +13}
|
||||
{3213522000 50400 1 +14}
|
||||
{3220174800 46800 0 +13}
|
||||
{3245576400 50400 1 +14}
|
||||
{3251624400 46800 0 +13}
|
||||
{3277026000 50400 1 +14}
|
||||
{3283678800 46800 0 +13}
|
||||
{3308475600 50400 1 +14}
|
||||
{3315128400 46800 0 +13}
|
||||
{3339925200 50400 1 +14}
|
||||
{3346578000 46800 0 +13}
|
||||
{3371374800 50400 1 +14}
|
||||
{3378027600 46800 0 +13}
|
||||
{3403429200 50400 1 +14}
|
||||
{3409477200 46800 0 +13}
|
||||
{3434878800 50400 1 +14}
|
||||
{3440926800 46800 0 +13}
|
||||
{3466328400 50400 1 +14}
|
||||
{3472981200 46800 0 +13}
|
||||
{3497778000 50400 1 +14}
|
||||
{3504430800 46800 0 +13}
|
||||
{3529227600 50400 1 +14}
|
||||
{3535880400 46800 0 +13}
|
||||
{3560677200 50400 1 +14}
|
||||
{3567330000 46800 0 +13}
|
||||
{3592731600 50400 1 +14}
|
||||
{3598779600 46800 0 +13}
|
||||
{3624181200 50400 1 +14}
|
||||
{3630834000 46800 0 +13}
|
||||
{3655630800 50400 1 +14}
|
||||
{3662283600 46800 0 +13}
|
||||
{3687080400 50400 1 +14}
|
||||
{3693733200 46800 0 +13}
|
||||
{3718530000 50400 1 +14}
|
||||
{3725182800 46800 0 +13}
|
||||
{3750584400 50400 1 +14}
|
||||
{3756632400 46800 0 +13}
|
||||
{3782034000 50400 1 +14}
|
||||
{3788082000 46800 0 +13}
|
||||
{3813483600 50400 1 +14}
|
||||
{3820136400 46800 0 +13}
|
||||
{3844933200 50400 1 +14}
|
||||
{3851586000 46800 0 +13}
|
||||
{3876382800 50400 1 +14}
|
||||
{3883035600 46800 0 +13}
|
||||
{3907832400 50400 1 +14}
|
||||
{3914485200 46800 0 +13}
|
||||
{3939886800 50400 1 +14}
|
||||
{3945934800 46800 0 +13}
|
||||
{3971336400 50400 1 +14}
|
||||
{3977384400 46800 0 +13}
|
||||
{4002786000 50400 1 +14}
|
||||
{4009438800 46800 0 +13}
|
||||
{4034235600 50400 1 +14}
|
||||
{4040888400 46800 0 +13}
|
||||
{4065685200 50400 1 +14}
|
||||
{4072338000 46800 0 +13}
|
||||
{4097134800 50400 1 +14}
|
||||
}
|
||||
|
||||
@@ -224,6 +224,21 @@ test basic-15.1 {Tcl_CreateObjCommand, new cmd goes into a namespace specified i
|
||||
list [test_ns_basic::cmd] \
|
||||
[namespace delete test_ns_basic]
|
||||
} {::test_ns_basic {}}
|
||||
test basic-15.2 {Tcl_CreateObjCommand, Bug 0e4d88b650} -setup {
|
||||
proc deleter {ns args} {
|
||||
namespace delete $ns
|
||||
}
|
||||
namespace eval n {
|
||||
proc p {} {}
|
||||
}
|
||||
trace add command n::p delete [list [namespace which deleter] [namespace current]::n]
|
||||
} -body {
|
||||
proc n::p {} {}
|
||||
} -cleanup {
|
||||
namespace delete n
|
||||
rename deleter {}
|
||||
}
|
||||
|
||||
|
||||
test basic-16.1 {TclInvokeStringCommand} {emptyTest} {
|
||||
} {}
|
||||
|
||||
+3
-24
@@ -15416,30 +15416,9 @@ test clock-5.29 {time zone boundary case 1948-09-26 01:00:01} detroit {
|
||||
clock format -671047199 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {01:00:01 -0500 EST}
|
||||
test clock-5.30 {time zone boundary case 1967-06-14 01:59:59} detroit {
|
||||
clock format -80499601 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {01:59:59 -0500 EST}
|
||||
test clock-5.31 {time zone boundary case 1967-06-14 03:00:00} detroit {
|
||||
clock format -80499600 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {03:00:00 -0400 EDT}
|
||||
test clock-5.32 {time zone boundary case 1967-06-14 03:00:01} detroit {
|
||||
clock format -80499599 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {03:00:01 -0400 EDT}
|
||||
test clock-5.33 {time zone boundary case 1967-10-29 01:59:59} detroit {
|
||||
clock format -68666401 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {01:59:59 -0400 EDT}
|
||||
test clock-5.34 {time zone boundary case 1967-10-29 01:00:00} detroit {
|
||||
clock format -68666400 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {01:00:00 -0500 EST}
|
||||
test clock-5.35 {time zone boundary case 1967-10-29 01:00:01} detroit {
|
||||
clock format -68666399 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
} {01:00:01 -0500 EST}
|
||||
|
||||
# Detroit did not observe Daylight Saving Time in 1967
|
||||
|
||||
test clock-5.36 {time zone boundary case 1972-12-31 23:59:59} detroit {
|
||||
clock format 94712399 -format {%H:%M:%S %z %Z} \
|
||||
-timezone :America/Detroit
|
||||
|
||||
+6
-2
@@ -670,9 +670,13 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup {
|
||||
# file, which is why the result is 14 and not 12
|
||||
exec /bin/sh -c \
|
||||
{for a in 1 2 3; do sleep 1; echo $a; done} >>$tmpfile &
|
||||
exec /bin/sh -c \
|
||||
{for a in 4 5 6; do sleep 1; echo $a >&2; done} 2>>$tmpfile &
|
||||
exec /bin/sh -c \
|
||||
{for a in a b c; do sleep 1; echo $a; done} >>$tmpfile &
|
||||
# The above two shell invokations take about 3 seconds to finish, so allow
|
||||
exec /bin/sh -c \
|
||||
{for a in d e f; do sleep 1; echo $a >&2; done} 2>>$tmpfile &
|
||||
# The above four shell invokations take about 3 seconds to finish, so allow
|
||||
# 5s (in case the machine is busy)
|
||||
after 5000
|
||||
# Check that no bytes have got lost through mixups with overlapping
|
||||
@@ -681,7 +685,7 @@ test exec-19.1 {exec >> uses O_APPEND} -constraints {exec unix} -setup {
|
||||
file size $tmpfile
|
||||
} -cleanup {
|
||||
removeFile $tmpfile
|
||||
} -result 14
|
||||
} -result 26
|
||||
|
||||
# Tests to ensure batch files and .CMD (Bug 9ece99d58b)
|
||||
# can be executed on Windows
|
||||
|
||||
+28
-15
@@ -36,6 +36,13 @@ proc bgerror {args} {
|
||||
puts stderr $errorInfo
|
||||
}
|
||||
|
||||
if {$::tcl_platform(os) eq "Darwin"} {
|
||||
# Name resolution often a problem on OSX; not focus of HTTP package anyway
|
||||
set HOST localhost
|
||||
} else {
|
||||
set HOST [info hostname]
|
||||
}
|
||||
|
||||
set port 8010
|
||||
set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null"
|
||||
catch {unset data}
|
||||
@@ -118,8 +125,8 @@ test http-3.1 {http::geturl} -returnCodes error -body {
|
||||
test http-3.2 {http::geturl} -returnCodes error -body {
|
||||
http::geturl http:junk
|
||||
} -result {Unsupported URL: http:junk}
|
||||
set url //[info hostname]:$port
|
||||
set badurl //[info hostname]:[expr $port+1]
|
||||
set url //${::HOST}:$port
|
||||
set badurl //${::HOST}:[expr $port+1]
|
||||
test http-3.3 {http::geturl} -body {
|
||||
set token [http::geturl $url]
|
||||
http::data $token
|
||||
@@ -130,13 +137,13 @@ test http-3.3 {http::geturl} -body {
|
||||
<h2>GET /</h2>
|
||||
</body></html>"
|
||||
set tail /a/b/c
|
||||
set url //[info hostname]:$port/a/b/c
|
||||
set fullurl HTTP://user:pass@[info hostname]:$port/a/b/c
|
||||
set binurl //[info hostname]:$port/binary
|
||||
set xmlurl //[info hostname]:$port/xml
|
||||
set posturl //[info hostname]:$port/post
|
||||
set badposturl //[info hostname]:$port/droppost
|
||||
set authorityurl //[info hostname]:$port
|
||||
set url //${::HOST}:$port/a/b/c
|
||||
set fullurl HTTP://user:pass@${::HOST}:$port/a/b/c
|
||||
set binurl //${::HOST}:$port/binary
|
||||
set xmlurl //${::HOST}:$port/xml
|
||||
set posturl //${::HOST}:$port/post
|
||||
set badposturl //${::HOST}:$port/droppost
|
||||
set authorityurl //${::HOST}:$port
|
||||
set ipv6url http://\[::1\]:$port/
|
||||
test http-3.4 {http::geturl} -body {
|
||||
set token [http::geturl $url]
|
||||
@@ -149,7 +156,7 @@ test http-3.4 {http::geturl} -body {
|
||||
</body></html>"
|
||||
proc selfproxy {host} {
|
||||
global port
|
||||
return [list [info hostname] $port]
|
||||
return [list ${::HOST} $port]
|
||||
}
|
||||
test http-3.5 {http::geturl} -body {
|
||||
http::config -proxyfilter selfproxy
|
||||
@@ -592,14 +599,20 @@ test http-4.15 {http::Event} -body {
|
||||
} -cleanup {
|
||||
catch {http::cleanup $token}
|
||||
} -returnCodes 1 -match glob -result "couldn't open socket*"
|
||||
test http-4.16 {Leak with Close vs Keepalive (bug [6ca52aec14]} -body {
|
||||
test http-4.16 {Leak with Close vs Keepalive (bug [6ca52aec14]} -setup {
|
||||
proc list-difference {l1 l2} {
|
||||
lmap item $l2 {if {$item in $l1} continue; set item}
|
||||
}
|
||||
} -body {
|
||||
set before [chan names]
|
||||
set token [http::geturl $url -headers {X-Connection keep-alive}]
|
||||
http::cleanup $token
|
||||
update
|
||||
set after [chan names]
|
||||
expr {$before eq $after}
|
||||
} -result 1
|
||||
# Compute what channels have been unexpectedly leaked past cleanup
|
||||
list-difference $before [chan names]
|
||||
} -cleanup {
|
||||
rename list-difference {}
|
||||
} -result {}
|
||||
|
||||
test http-5.1 {http::formatQuery} {
|
||||
http::formatQuery name1 value1 name2 "value two"
|
||||
@@ -620,7 +633,7 @@ test http-5.5 {http::formatQuery} {
|
||||
} {name1=~bwelch&name2=%A1%A2%A2}
|
||||
|
||||
test http-6.1 {http::ProxyRequired} -body {
|
||||
http::config -proxyhost [info hostname] -proxyport $port
|
||||
http::config -proxyhost ${::HOST} -proxyport $port
|
||||
set token [http::geturl $url]
|
||||
http::wait $token
|
||||
upvar #0 $token data
|
||||
|
||||
+8
-1
@@ -10,6 +10,13 @@
|
||||
|
||||
#set httpLog 1
|
||||
|
||||
if {$::tcl_platform(os) eq "Darwin"} {
|
||||
# Name resolution often a problem on OSX; not focus of HTTP package anyway
|
||||
set HOST localhost
|
||||
} else {
|
||||
set HOST [info hostname]
|
||||
}
|
||||
|
||||
proc httpd_init {{port 8015}} {
|
||||
socket -server httpdAccept $port
|
||||
}
|
||||
@@ -168,7 +175,7 @@ proc httpdRespond { sock } {
|
||||
|
||||
switch -glob -- $data(url) {
|
||||
*binary* {
|
||||
set html "$bindata[info hostname]:$port$data(url)"
|
||||
set html "$bindata${::HOST}:$port$data(url)"
|
||||
set type application/octet-stream
|
||||
}
|
||||
*xml* {
|
||||
|
||||
+12
-5
@@ -33,6 +33,13 @@ if {[catch {package require http 1.0}]} {
|
||||
}
|
||||
}
|
||||
|
||||
if {$::tcl_platform(os) eq "Darwin"} {
|
||||
# Name resolution often a problem on OSX; not focus of HTTP package anyway
|
||||
set HOST localhost
|
||||
} else {
|
||||
set HOST [info hostname]
|
||||
}
|
||||
|
||||
set bindata "This is binary data\x0d\x0amore\x0dmore\x0amore\x00null"
|
||||
catch {unset data}
|
||||
|
||||
@@ -85,7 +92,7 @@ test httpold-3.2 {http_get} {
|
||||
set err
|
||||
} {Unsupported URL: http:junk}
|
||||
|
||||
set url [info hostname]:$port
|
||||
set url ${::HOST}:$port
|
||||
test httpold-3.3 {http_get} {
|
||||
set token [http_get $url]
|
||||
http_data $token
|
||||
@@ -95,8 +102,8 @@ test httpold-3.3 {http_get} {
|
||||
</body></html>"
|
||||
|
||||
set tail /a/b/c
|
||||
set url [info hostname]:$port/a/b/c
|
||||
set binurl [info hostname]:$port/binary
|
||||
set url ${::HOST}:$port/a/b/c
|
||||
set binurl ${::HOST}:$port/binary
|
||||
|
||||
test httpold-3.4 {http_get} {
|
||||
set token [http_get $url]
|
||||
@@ -108,7 +115,7 @@ test httpold-3.4 {http_get} {
|
||||
|
||||
proc selfproxy {host} {
|
||||
global port
|
||||
return [list [info hostname] $port]
|
||||
return [list ${::HOST} $port]
|
||||
}
|
||||
test httpold-3.5 {http_get} {
|
||||
http_config -proxyfilter selfproxy
|
||||
@@ -273,7 +280,7 @@ test httpold-5.3 {http_formatQuery} {
|
||||
|
||||
test httpold-6.1 {httpProxyRequired} {
|
||||
update
|
||||
http_config -proxyhost [info hostname] -proxyport $port
|
||||
http_config -proxyhost ${::HOST} -proxyport $port
|
||||
set token [http_get $url]
|
||||
http_wait $token
|
||||
http_config -proxyhost {} -proxyport {}
|
||||
|
||||
@@ -168,6 +168,16 @@ foreach arg [subst -nocommands -novariables {
|
||||
incr count
|
||||
}
|
||||
|
||||
test init-4.$count {[Bug 46f801ed5a]} -setup {
|
||||
auto_reset
|
||||
array set auto_index {demo {proc demo {} {tailcall error foo}}}
|
||||
} -body {
|
||||
demo
|
||||
} -cleanup {
|
||||
array unset auto_index demo
|
||||
rename demo {}
|
||||
} -returnCodes error -result foo
|
||||
|
||||
test init-5.0 {return options passed through ::unknown} -setup {
|
||||
catch {rename xxx {}}
|
||||
set ::auto_index(::xxx) {proc ::xxx {} {
|
||||
|
||||
+34
-1
@@ -2048,6 +2048,17 @@ test oo-15.14 {OO: object cloning with target NS} -setup {
|
||||
} -cleanup {
|
||||
Cls destroy
|
||||
} -result {{} ::dupens::test-15.14}
|
||||
test oo-15.15 {method cloning must ensure that there is a string representation of bodies} -setup {
|
||||
oo::class create cls
|
||||
} -body {
|
||||
cls create foo
|
||||
oo::objdefine foo {
|
||||
method m1 {} [string map {a b} {return hello}]
|
||||
}
|
||||
[oo::copy foo] m1
|
||||
} -cleanup {
|
||||
cls destroy
|
||||
} -result hello
|
||||
|
||||
test oo-16.1 {OO: object introspection} -body {
|
||||
info object
|
||||
@@ -3799,7 +3810,29 @@ test oo-35.4 {Bug 593baa032c: mixins list teardown} {
|
||||
oo::class create D {mixin B}
|
||||
namespace eval [info object namespace D] [list [namespace which B] destroy]
|
||||
} {}
|
||||
|
||||
test oo-35.5 {Bug 1a56550e96: introspectors must traverse mixin links correctly} -setup {
|
||||
oo::class create base {
|
||||
unexport destroy
|
||||
}
|
||||
} -body {
|
||||
oo::class create C {
|
||||
superclass base
|
||||
method c {} {}
|
||||
}
|
||||
oo::class create D {
|
||||
superclass base
|
||||
mixin C
|
||||
method d {} {}
|
||||
}
|
||||
oo::class create E {
|
||||
superclass D
|
||||
method e {} {}
|
||||
}
|
||||
E create e1
|
||||
list [lsort [info class methods E -all]] [lsort [info object methods e1 -all]]
|
||||
} -cleanup {
|
||||
base destroy
|
||||
} -result {{c d e} {c d e}}
|
||||
|
||||
cleanupTests
|
||||
return
|
||||
|
||||
+9
-2
@@ -340,7 +340,7 @@ test set-old-8.6 {array command} {
|
||||
catch {unset a}
|
||||
set a(22) 3
|
||||
list [catch {array gorp a} msg] $msg
|
||||
} {1 {unknown or ambiguous subcommand "gorp": must be anymore, donesearch, exists, get, names, nextelement, set, size, startsearch, statistics, or unset}}
|
||||
} {1 {unknown or ambiguous subcommand "gorp": must be anymore, donesearch, exists, for, get, names, nextelement, set, size, startsearch, statistics, or unset}}
|
||||
test set-old-8.7 {array command, anymore option} {
|
||||
catch {unset a}
|
||||
list [catch {array anymore a x} msg] $msg
|
||||
@@ -652,6 +652,13 @@ test set-old-8.52 {array command, array names -regexp on regexp pattern} {
|
||||
set a(11) 1
|
||||
list [catch {lsort [array names a -regexp ^1]} msg] $msg
|
||||
} {0 {1*2 11 12}}
|
||||
test set-old-8.52.1 {array command, array names -regexp, backrefs} {
|
||||
catch {unset a}
|
||||
set a(1*2) 1
|
||||
set a(12) 1
|
||||
set a(11) 1
|
||||
list [catch {lsort [array names a -regexp {^(.)\1}]} msg] $msg
|
||||
} {0 11}
|
||||
test set-old-8.53 {array command, array names -regexp} {
|
||||
catch {unset a}
|
||||
set a(-glob) 1
|
||||
@@ -933,7 +940,7 @@ catch {rename foo {}}
|
||||
|
||||
# cleanup
|
||||
::tcltest::cleanupTests
|
||||
return
|
||||
return
|
||||
|
||||
# Local Variables:
|
||||
# mode: tcl
|
||||
|
||||
+153
-7
@@ -53,7 +53,7 @@ catch {unset arr}
|
||||
test var-1.1 {TclLookupVar, Array handling} -setup {
|
||||
catch {unset a}
|
||||
} -body {
|
||||
set x "incr" ;# force no compilation and runtime call to Tcl_IncrCmd
|
||||
set x "incr" ;# force no compilation and runtime call to Tcl_IncrCmd
|
||||
set i 10
|
||||
set arr(foo) 37
|
||||
list [$x i] $i [$x arr(foo)] $arr(foo)
|
||||
@@ -234,7 +234,7 @@ test var-3.3 {MakeUpvar, my var has TCL_GLOBAL_ONLY specified} -setup {
|
||||
set a 123321
|
||||
proc p {} {
|
||||
# create global xx linked to global a
|
||||
testupvar 1 a {} xx global
|
||||
testupvar 1 a {} xx global
|
||||
}
|
||||
list [p] $xx [set xx 789] $a
|
||||
} -result {{} 123321 789 789}
|
||||
@@ -246,7 +246,7 @@ test var-3.4 {MakeUpvar, my var has TCL_NAMESPACE_ONLY specified} -setup {
|
||||
catch {unset ::test_ns_var::vv}
|
||||
proc p {} {
|
||||
# create namespace var vv linked to global a
|
||||
testupvar 1 a {} vv namespace
|
||||
testupvar 1 a {} vv namespace
|
||||
}
|
||||
p
|
||||
}
|
||||
@@ -548,11 +548,11 @@ test var-7.14 {Tcl_VariableObjCmd, array element parameter} -body {
|
||||
namespace eval test_ns_var { variable arrayvar(1) }
|
||||
} -returnCodes error -result "can't define \"arrayvar(1)\": name refers to an element in an array"
|
||||
test var-7.15 {Tcl_VariableObjCmd, array element parameter} -body {
|
||||
namespace eval test_ns_var {
|
||||
namespace eval test_ns_var {
|
||||
variable arrayvar
|
||||
set arrayvar(1) x
|
||||
variable arrayvar(1) y
|
||||
}
|
||||
}
|
||||
} -returnCodes error -result "can't define \"arrayvar(1)\": name refers to an element in an array"
|
||||
test var-7.16 {Tcl_VariableObjCmd, no args (TIP 323)} {
|
||||
variable
|
||||
@@ -790,7 +790,7 @@ test var-15.1 {segfault in [unset], [Bug 735335]} {
|
||||
set var $name
|
||||
}
|
||||
#
|
||||
# Note that the variable name has to be
|
||||
# Note that the variable name has to be
|
||||
# unused previously for the segfault to
|
||||
# be triggered.
|
||||
#
|
||||
@@ -997,7 +997,153 @@ test var-22.1 {leak in localVarName intrep: Bug 80304238ac} -setup {
|
||||
rename getbytes {}
|
||||
rename doit {}
|
||||
} -result 0
|
||||
|
||||
|
||||
unset -nocomplain a k v
|
||||
test var-23.1 {array command, for loop, too many args} -returnCodes error -body {
|
||||
array for {k v} c d e {}
|
||||
} -result {wrong # args: should be "array for {key value} arrayName script"}
|
||||
test var-23.2 {array command, for loop, not enough args} -returnCodes error -body {
|
||||
array for {k v} {}
|
||||
} -result {wrong # args: should be "array for {key value} arrayName script"}
|
||||
test var-23.3 {array command, for loop, too many list args} -setup {
|
||||
unset -nocomplain a
|
||||
} -returnCodes error -body {
|
||||
array for {k v w} a {}
|
||||
} -result {must have two variable names}
|
||||
test var-23.4 {array command, for loop, not enough list args} -setup {
|
||||
unset -nocomplain a
|
||||
} -returnCodes error -body {
|
||||
array for {k} a {}
|
||||
} -result {must have two variable names}
|
||||
test var-23.5 {array command, for loop, no array} -setup {
|
||||
unset -nocomplain a
|
||||
} -returnCodes error -body {
|
||||
array for {k v} a {}
|
||||
} -result {"a" isn't an array}
|
||||
test var-23.6 {array command, for loop, array doesn't exist yet but has compiler-allocated procedure slot} -setup {
|
||||
catch {rename p ""}
|
||||
} -returnCodes error -body {
|
||||
apply {{x} {
|
||||
if {$x==1} {
|
||||
return [array for {k v} a {}]
|
||||
}
|
||||
set a(x) 123
|
||||
}} 1
|
||||
} -result {"a" isn't an array}
|
||||
test var-23.7 {array enumeration} -setup {
|
||||
unset -nocomplain a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
array set a {a 1 b 2 c 3}
|
||||
array for {k v} a {
|
||||
lappend reslist $k $v
|
||||
}
|
||||
lsort -stride 2 -index 0 $reslist
|
||||
} -cleanup {
|
||||
unset -nocomplain a
|
||||
unset -nocomplain reslist
|
||||
} -result {a 1 b 2 c 3}
|
||||
test var-23.9 {array enumeration, nested} -setup {
|
||||
unset -nocomplain a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
array set a {a 1 b 2 c 3}
|
||||
array for {k1 v1} a {
|
||||
lappend reslist $k1 $v1
|
||||
set r2 {}
|
||||
array for {k2 v2} a {
|
||||
lappend r2 $k2 $v2
|
||||
}
|
||||
lappend reslist [lsort -stride 2 -index 0 $r2]
|
||||
}
|
||||
# there is no guarantee in which order the array contents will be
|
||||
# returned.
|
||||
lsort -stride 3 -index 0 $reslist
|
||||
} -cleanup {
|
||||
unset -nocomplain a
|
||||
unset -nocomplain reslist
|
||||
} -result {a 1 {a 1 b 2 c 3} b 2 {a 1 b 2 c 3} c 3 {a 1 b 2 c 3}}
|
||||
test var-23.10 {array enumeration, delete key} -match glob -setup {
|
||||
unset -nocomplain a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
set retval {}
|
||||
try {
|
||||
array set a {a 1 b 2 c 3 d 4}
|
||||
array for {k v} a {
|
||||
lappend reslist $k $v
|
||||
if { $k eq "a" } {
|
||||
unset a(c)
|
||||
}
|
||||
}
|
||||
lsort -stride 2 -index 0 $reslist
|
||||
} on error {err res} {
|
||||
set retval [dict get $res -errorinfo]
|
||||
}
|
||||
set retval
|
||||
} -cleanup {
|
||||
unset -nocomplain a
|
||||
unset -nocomplain reslist
|
||||
unset -nocomplain retval
|
||||
} -result {array changed during iteration*}
|
||||
test var-23.11 {array enumeration, insert key} -match glob -setup {
|
||||
unset -nocomplain a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
set retval {}
|
||||
try {
|
||||
array set a {a 1 b 2 c 3 d 4}
|
||||
array for {k v} a {
|
||||
lappend reslist $k $v
|
||||
if { $k eq "a" } {
|
||||
set a(e) 5
|
||||
}
|
||||
}
|
||||
lsort -stride 2 -index 0 $reslist
|
||||
} on error {err res} {
|
||||
set retval [dict get $res -errorinfo]
|
||||
}
|
||||
} -cleanup {
|
||||
unset -nocomplain a
|
||||
unset -nocomplain reslist
|
||||
} -result {array changed during iteration*}
|
||||
test var-23.12 {array enumeration, change value} -setup {
|
||||
unset -nocomplain a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
array set a {a 1 b 2 c 3}
|
||||
array for {k v} a {
|
||||
lappend reslist $k $v
|
||||
if { $k eq "a" } {
|
||||
set a(c) 9
|
||||
}
|
||||
}
|
||||
lsort -stride 2 -index 0 $reslist
|
||||
} -cleanup {
|
||||
unset -nocomplain a
|
||||
unset -nocomplain reslist
|
||||
} -result {a 1 b 2 c 9}
|
||||
test var-23.13 {array enumeration, number of traces} -setup {
|
||||
set ::countarrayfor 0
|
||||
proc ::tracearrayfor { args } {
|
||||
incr ::countarrayfor
|
||||
}
|
||||
unset -nocomplain ::a
|
||||
set reslist [list]
|
||||
} -body {
|
||||
array set ::a {a 1 b 2 c 3}
|
||||
foreach {k} [array names a] {
|
||||
trace add variable ::a($k) read ::tracearrayfor
|
||||
}
|
||||
array for {k v} ::a {
|
||||
lappend reslist $k $v
|
||||
}
|
||||
set ::countarrayfor
|
||||
} -cleanup {
|
||||
unset -nocomplain ::countarrayfor
|
||||
unset -nocomplain ::a
|
||||
unset -nocomplain reslist
|
||||
} -result 3
|
||||
|
||||
catch {namespace delete ns}
|
||||
catch {unset arr}
|
||||
|
||||
+6
-6
@@ -840,17 +840,17 @@ install-libraries: libraries
|
||||
do \
|
||||
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/http1.0; \
|
||||
done;
|
||||
@echo "Installing package http 2.8.11 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.11.tm;
|
||||
@echo "Installing package http 2.8.12 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.6/http-2.8.12.tm;
|
||||
@echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/";
|
||||
@for i in $(TOP_DIR)/library/opt/*.tcl ; \
|
||||
do \
|
||||
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \
|
||||
done;
|
||||
@echo "Installing package msgcat 1.6.0 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.0.tm;
|
||||
@echo "Installing package tcltest 2.4.0 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.0.tm;
|
||||
@echo "Installing package msgcat 1.6.1 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/msgcat-1.6.1.tm;
|
||||
@echo "Installing package tcltest 2.4.1 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.4.1.tm;
|
||||
|
||||
@echo "Installing package platform 1.0.14 as a Tcl Module";
|
||||
@$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.14.tm;
|
||||
|
||||
Vendored
+1
-1
@@ -1335,7 +1335,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
TCL_VERSION=8.6
|
||||
TCL_MAJOR_VERSION=8
|
||||
TCL_MINOR_VERSION=6
|
||||
TCL_PATCH_LEVEL=".6"
|
||||
TCL_PATCH_LEVEL=".7"
|
||||
VERSION=${TCL_VERSION}
|
||||
|
||||
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
|
||||
TCL_VERSION=8.6
|
||||
TCL_MAJOR_VERSION=8
|
||||
TCL_MINOR_VERSION=6
|
||||
TCL_PATCH_LEVEL=".6"
|
||||
TCL_PATCH_LEVEL=".7"
|
||||
VERSION=${TCL_VERSION}
|
||||
|
||||
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
Name: tcl
|
||||
Summary: Tcl scripting language development environment
|
||||
Version: 8.6.6
|
||||
Version: 8.6.7
|
||||
Release: 2
|
||||
License: BSD
|
||||
Group: Development/Languages
|
||||
|
||||
@@ -48,7 +48,9 @@
|
||||
#endif /* TCL_DYLD_USE_DLFCN */
|
||||
|
||||
#if TCL_DYLD_USE_NSMODULE || defined(TCL_LOAD_FROM_MEMORY)
|
||||
#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
#include <mach-o/dyld.h>
|
||||
#include <mach-o/fat.h>
|
||||
#include <mach-o/swap.h>
|
||||
|
||||
+4
-4
@@ -125,11 +125,11 @@ typedef off_t Tcl_SeekOffset;
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
#if HAVE_SYS_TIME_H
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#else
|
||||
# include <time.h>
|
||||
@@ -138,11 +138,11 @@ typedef off_t Tcl_SeekOffset;
|
||||
#ifndef NO_SYS_WAIT_H
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#if HAVE_STDINT_H
|
||||
#ifdef HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
||||
+173
-126
@@ -19,6 +19,7 @@
|
||||
|
||||
#define SET_BITS(var, bits) ((var) |= (bits))
|
||||
#define CLEAR_BITS(var, bits) ((var) &= ~(bits))
|
||||
#define GOT_BITS(var, bits) (((var) & (bits)) != 0)
|
||||
|
||||
/* "sock" + a pointer in hex + \0 */
|
||||
#define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1)
|
||||
@@ -117,8 +118,7 @@ struct TcpState {
|
||||
* Static routines for this file:
|
||||
*/
|
||||
|
||||
static int TcpConnect(Tcl_Interp *interp,
|
||||
TcpState *state);
|
||||
static int TcpConnect(Tcl_Interp *interp, TcpState *state);
|
||||
static void TcpAccept(ClientData data, int mask);
|
||||
static int TcpBlockModeProc(ClientData data, int mode);
|
||||
static int TcpCloseProc(ClientData instanceData,
|
||||
@@ -173,21 +173,24 @@ static ProcessGlobalValue hostName =
|
||||
|
||||
#if 0
|
||||
/* printf debugging */
|
||||
void printaddrinfo(struct addrinfo *addrlist, char *prefix)
|
||||
void
|
||||
printaddrinfo(
|
||||
struct addrinfo *addrlist,
|
||||
char *prefix)
|
||||
{
|
||||
char host[NI_MAXHOST], port[NI_MAXSERV];
|
||||
struct addrinfo *ai;
|
||||
|
||||
for (ai = addrlist; ai != NULL; ai = ai->ai_next) {
|
||||
getnameinfo(ai->ai_addr, ai->ai_addrlen,
|
||||
host, sizeof(host),
|
||||
port, sizeof(port),
|
||||
NI_NUMERICHOST|NI_NUMERICSERV);
|
||||
host, sizeof(host), port, sizeof(port),
|
||||
NI_NUMERICHOST|NI_NUMERICSERV);
|
||||
fprintf(stderr,"%s: %s:%s\n", prefix, host, port);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* InitializeHostName --
|
||||
*
|
||||
@@ -197,7 +200,7 @@ void printaddrinfo(struct addrinfo *addrlist, char *prefix)
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
@@ -271,12 +274,12 @@ InitializeHostName(
|
||||
|
||||
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
|
||||
*lengthPtr = strlen(native);
|
||||
*valuePtr = ckalloc((*lengthPtr) + 1);
|
||||
memcpy(*valuePtr, native, (size_t)(*lengthPtr)+1);
|
||||
*valuePtr = ckalloc(*lengthPtr + 1);
|
||||
memcpy(*valuePtr, native, (size_t)(*lengthPtr) + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_GetHostName --
|
||||
*
|
||||
@@ -290,7 +293,7 @@ InitializeHostName(
|
||||
* Side effects:
|
||||
* Caches the name to return for future calls.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const char *
|
||||
@@ -300,7 +303,7 @@ Tcl_GetHostName(void)
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TclpHasSockets --
|
||||
*
|
||||
@@ -312,7 +315,7 @@ Tcl_GetHostName(void)
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int
|
||||
@@ -323,7 +326,7 @@ TclpHasSockets(
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TclpFinalizeSockets --
|
||||
*
|
||||
@@ -335,7 +338,7 @@ TclpHasSockets(
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -345,7 +348,7 @@ TclpFinalizeSockets(void)
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TcpBlockModeProc --
|
||||
*
|
||||
@@ -358,7 +361,7 @@ TclpFinalizeSockets(void)
|
||||
* Side effects:
|
||||
* Sets the device into blocking or nonblocking mode.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
@@ -376,7 +379,7 @@ TcpBlockModeProc(
|
||||
} else {
|
||||
SET_BITS(statePtr->flags, TCP_NONBLOCKING);
|
||||
}
|
||||
if (statePtr->flags & TCP_ASYNC_CONNECT) {
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) {
|
||||
statePtr->cachedBlocking = mode;
|
||||
return 0;
|
||||
}
|
||||
@@ -387,33 +390,32 @@ TcpBlockModeProc(
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* WaitForConnect --
|
||||
*
|
||||
* Check the state of an async connect process. If a connection
|
||||
* attempt terminated, process it, which may finalize it or may
|
||||
* start the next attempt. If a connect error occures, it is saved
|
||||
* in statePtr->connectError to be reported by 'fconfigure -error'.
|
||||
* Check the state of an async connect process. If a connection attempt
|
||||
* terminated, process it, which may finalize it or may start the next
|
||||
* attempt. If a connect error occures, it is saved in
|
||||
* statePtr->connectError to be reported by 'fconfigure -error'.
|
||||
*
|
||||
* There are two modes of operation, defined by errorCodePtr:
|
||||
* * non-NULL: Called by explicite read/write command. block if
|
||||
* * non-NULL: Called by explicite read/write command. Blocks if the
|
||||
* socket is blocking.
|
||||
* May return two error codes:
|
||||
* * EWOULDBLOCK: if connect is still in progress
|
||||
* * ENOTCONN: if connect failed. This would be the error
|
||||
* message of a rect or sendto syscall so this is
|
||||
* emulated here.
|
||||
* * NULL: Called by a backround operation. Do not block and
|
||||
* don't return any error code.
|
||||
* * ENOTCONN: if connect failed. This would be the error message
|
||||
* of a rect or sendto syscall so this is emulated here.
|
||||
* * NULL: Called by a backround operation. Do not block and do not
|
||||
* return any error code.
|
||||
*
|
||||
* Results:
|
||||
* 0 if the connection has completed, -1 if still in progress
|
||||
* or there is an error.
|
||||
* 0 if the connection has completed, -1 if still in progress or there is
|
||||
* an error.
|
||||
*
|
||||
* Side effects:
|
||||
* Processes socket events off the system queue.
|
||||
* May process asynchroneous connect.
|
||||
* Processes socket events off the system queue. May process
|
||||
* asynchroneous connects.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
@@ -426,11 +428,11 @@ WaitForConnect(
|
||||
int timeout;
|
||||
|
||||
/*
|
||||
* Check if an async connect failed already and error reporting is demanded,
|
||||
* return the error ENOTCONN
|
||||
* Check if an async connect failed already and error reporting is
|
||||
* demanded, return the error ENOTCONN
|
||||
*/
|
||||
|
||||
if (errorCodePtr != NULL && (statePtr->flags & TCP_ASYNC_FAILED)) {
|
||||
if (errorCodePtr != NULL && GOT_BITS(statePtr->flags, TCP_ASYNC_FAILED)) {
|
||||
*errorCodePtr = ENOTCONN;
|
||||
return -1;
|
||||
}
|
||||
@@ -439,26 +441,29 @@ WaitForConnect(
|
||||
* Check if an async connect is running. If not return ok
|
||||
*/
|
||||
|
||||
if (!(statePtr->flags & TCP_ASYNC_PENDING)) {
|
||||
if (!GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (errorCodePtr == NULL || (statePtr->flags & TCP_NONBLOCKING)) {
|
||||
if (errorCodePtr == NULL || GOT_BITS(statePtr->flags, TCP_NONBLOCKING)) {
|
||||
timeout = 0;
|
||||
} else {
|
||||
timeout = -1;
|
||||
}
|
||||
do {
|
||||
if (TclUnixWaitForFile(statePtr->fds.fd,
|
||||
TCL_WRITABLE | TCL_EXCEPTION, timeout) != 0) {
|
||||
TCL_WRITABLE | TCL_EXCEPTION, timeout) != 0) {
|
||||
TcpConnect(NULL, statePtr);
|
||||
}
|
||||
/* Do this only once in the nonblocking case and repeat it until the
|
||||
* socket is final when blocking */
|
||||
} while (timeout == -1 && statePtr->flags & TCP_ASYNC_CONNECT);
|
||||
|
||||
/*
|
||||
* Do this only once in the nonblocking case and repeat it until the
|
||||
* socket is final when blocking.
|
||||
*/
|
||||
} while (timeout == -1 && GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT));
|
||||
|
||||
if (errorCodePtr != NULL) {
|
||||
if (statePtr->flags & TCP_ASYNC_PENDING) {
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) {
|
||||
*errorCodePtr = EAGAIN;
|
||||
return -1;
|
||||
} else if (statePtr->connectError != 0) {
|
||||
@@ -615,7 +620,8 @@ TcpCloseProc(
|
||||
fds = statePtr->fds.next;
|
||||
while (fds != NULL) {
|
||||
TcpFdList *next = fds->next;
|
||||
ckfree(fds);
|
||||
|
||||
ckfree(fds);
|
||||
fds = next;
|
||||
}
|
||||
if (statePtr->addrlist != NULL) {
|
||||
@@ -685,10 +691,9 @@ TcpClose2Proc(
|
||||
*
|
||||
* TcpHostPortList --
|
||||
*
|
||||
* This function is called by the -gethostname and -getpeername
|
||||
* switches of TcpGetOptionProc() to add three list elements
|
||||
* with the textual representation of the given address to the
|
||||
* given DString.
|
||||
* This function is called by the -gethostname and -getpeername switches
|
||||
* of TcpGetOptionProc() to add three list elements with the textual
|
||||
* representation of the given address to the given DString.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
@@ -700,6 +705,10 @@ TcpClose2Proc(
|
||||
*/
|
||||
|
||||
#ifndef NEED_FAKE_RFC2553
|
||||
#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif
|
||||
static inline int
|
||||
IPv6AddressNeedsNumericRendering(
|
||||
struct in6_addr addr)
|
||||
@@ -713,16 +722,16 @@ IPv6AddressNeedsNumericRendering(
|
||||
* at least some versions of OSX.
|
||||
*/
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
if (!IN6_IS_ADDR_V4MAPPED(&addr)) {
|
||||
#pragma GCC diagnostic pop
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0
|
||||
&& addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0);
|
||||
}
|
||||
#if defined (__clang__) || ((__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
#endif /* NEED_FAKE_RFC2553 */
|
||||
|
||||
static void
|
||||
@@ -736,14 +745,15 @@ TcpHostPortList(
|
||||
char host[NI_MAXHOST], nhost[NI_MAXHOST], nport[NI_MAXSERV];
|
||||
int flags = 0;
|
||||
|
||||
getnameinfo(&addr.sa, salen,
|
||||
nhost, sizeof(nhost), nport, sizeof(nport),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
getnameinfo(&addr.sa, salen, nhost, sizeof(nhost), nport, sizeof(nport),
|
||||
NI_NUMERICHOST | NI_NUMERICSERV);
|
||||
Tcl_DStringAppendElement(dsPtr, nhost);
|
||||
|
||||
/*
|
||||
* We don't want to resolve INADDR_ANY and sin6addr_any; they
|
||||
* can sometimes cause problems (and never have a name).
|
||||
* We don't want to resolve INADDR_ANY and sin6addr_any; they can
|
||||
* sometimes cause problems (and never have a name).
|
||||
*/
|
||||
|
||||
if (addr.sa.sa_family == AF_INET) {
|
||||
if (addr.sa4.sin_addr.s_addr == INADDR_ANY) {
|
||||
flags |= NI_NUMERICHOST;
|
||||
@@ -755,15 +765,27 @@ TcpHostPortList(
|
||||
}
|
||||
#endif /* NEED_FAKE_RFC2553 */
|
||||
}
|
||||
/* Check if reverse DNS has been switched off globally */
|
||||
if (interp != NULL && Tcl_GetVar(interp, SUPPRESS_RDNS_VAR, 0) != NULL) {
|
||||
|
||||
/*
|
||||
* Check if reverse DNS has been switched off globally.
|
||||
*/
|
||||
|
||||
if (interp != NULL &&
|
||||
Tcl_GetVar2(interp, SUPPRESS_RDNS_VAR, NULL, 0) != NULL) {
|
||||
flags |= NI_NUMERICHOST;
|
||||
}
|
||||
if (getnameinfo(&addr.sa, salen, host, sizeof(host), NULL, 0, flags) == 0) {
|
||||
/* Reverse mapping worked */
|
||||
if (getnameinfo(&addr.sa, salen, host, sizeof(host), NULL, 0,
|
||||
flags) == 0) {
|
||||
/*
|
||||
* Reverse mapping worked.
|
||||
*/
|
||||
|
||||
Tcl_DStringAppendElement(dsPtr, host);
|
||||
} else {
|
||||
/* Reverse mappong failed - use the numeric rep once more */
|
||||
/*
|
||||
* Reverse mapping failed - use the numeric rep once more.
|
||||
*/
|
||||
|
||||
Tcl_DStringAppendElement(dsPtr, nhost);
|
||||
}
|
||||
Tcl_DStringAppendElement(dsPtr, nport);
|
||||
@@ -813,16 +835,20 @@ TcpGetOptionProc(
|
||||
(strncmp(optionName, "-error", len) == 0)) {
|
||||
socklen_t optlen = sizeof(int);
|
||||
|
||||
if (statePtr->flags & TCP_ASYNC_CONNECT) {
|
||||
/* Suppress errors as long as we are not done */
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) {
|
||||
/*
|
||||
* Suppress errors as long as we are not done.
|
||||
*/
|
||||
|
||||
errno = 0;
|
||||
} else if (statePtr->connectError != 0) {
|
||||
errno = statePtr->connectError;
|
||||
statePtr->connectError = 0;
|
||||
} else {
|
||||
int err;
|
||||
getsockopt(statePtr->fds.fd, SOL_SOCKET, SO_ERROR,
|
||||
(char *) &err, &optlen);
|
||||
|
||||
getsockopt(statePtr->fds.fd, SOL_SOCKET, SO_ERROR, (char *) &err,
|
||||
&optlen);
|
||||
errno = err;
|
||||
}
|
||||
if (errno != 0) {
|
||||
@@ -833,9 +859,8 @@ TcpGetOptionProc(
|
||||
|
||||
if ((len > 1) && (optionName[1] == 'c') &&
|
||||
(strncmp(optionName, "-connecting", len) == 0)) {
|
||||
|
||||
Tcl_DStringAppend(dsPtr,
|
||||
(statePtr->flags & TCP_ASYNC_CONNECT) ? "1" : "0", -1);
|
||||
GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT) ? "1" : "0", -1);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -844,10 +869,11 @@ TcpGetOptionProc(
|
||||
address peername;
|
||||
socklen_t size = sizeof(peername);
|
||||
|
||||
if ( (statePtr->flags & TCP_ASYNC_CONNECT) ) {
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) {
|
||||
/*
|
||||
* In async connect output an empty string
|
||||
*/
|
||||
|
||||
if (len == 0) {
|
||||
Tcl_DStringAppendElement(dsPtr, "-peername");
|
||||
Tcl_DStringAppendElement(dsPtr, "");
|
||||
@@ -858,6 +884,7 @@ TcpGetOptionProc(
|
||||
/*
|
||||
* Peername fetch succeeded - output list
|
||||
*/
|
||||
|
||||
if (len == 0) {
|
||||
Tcl_DStringAppendElement(dsPtr, "-peername");
|
||||
Tcl_DStringStartSublist(dsPtr);
|
||||
@@ -897,11 +924,12 @@ TcpGetOptionProc(
|
||||
Tcl_DStringAppendElement(dsPtr, "-sockname");
|
||||
Tcl_DStringStartSublist(dsPtr);
|
||||
}
|
||||
if ( (statePtr->flags & TCP_ASYNC_CONNECT) ) {
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) {
|
||||
/*
|
||||
* In async connect output an empty string
|
||||
*/
|
||||
found = 1;
|
||||
|
||||
found = 1;
|
||||
} else {
|
||||
for (fds = &statePtr->fds; fds != NULL; fds = fds->next) {
|
||||
size = sizeof(sockname);
|
||||
@@ -926,14 +954,15 @@ TcpGetOptionProc(
|
||||
}
|
||||
|
||||
if (len > 0) {
|
||||
return Tcl_BadChannelOption(interp, optionName, "connecting peername sockname");
|
||||
return Tcl_BadChannelOption(interp, optionName,
|
||||
"connecting peername sockname");
|
||||
}
|
||||
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TcpWatchProc --
|
||||
*
|
||||
@@ -946,7 +975,7 @@ TcpGetOptionProc(
|
||||
* Sets up the notifier so that a future event on the channel will be
|
||||
* seen by Tcl.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
@@ -959,17 +988,17 @@ WrapNotify(
|
||||
|
||||
if (newmask == 0) {
|
||||
/*
|
||||
* There was no overlap between the states the channel is
|
||||
* interested in notifications for, and the states that are
|
||||
* reported present on the file descriptor by select(). The
|
||||
* only way that can happen is when the channel is interested
|
||||
* in a writable condition, and only a readable state is reported
|
||||
* present (see TcpWatchProc() below). In that case, signal back
|
||||
* to the caller the writable state, which is really an error
|
||||
* condition. As an extra check on that assumption, check for
|
||||
* a non-zero value of errno before reporting an artificial
|
||||
* There was no overlap between the states the channel is interested
|
||||
* in notifications for, and the states that are reported present on
|
||||
* the file descriptor by select(). The only way that can happen is
|
||||
* when the channel is interested in a writable condition, and only a
|
||||
* readable state is reported present (see TcpWatchProc() below). In
|
||||
* that case, signal back to the caller the writable state, which is
|
||||
* really an error condition. As an extra check on that assumption,
|
||||
* check for a non-zero value of errno before reporting an artificial
|
||||
* writable state.
|
||||
*/
|
||||
|
||||
if (errno == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -993,33 +1022,36 @@ TcpWatchProc(
|
||||
* be readable or writable at the Tcl level. This keeps Tcl scripts
|
||||
* from interfering with the -accept behavior (bug #3394732).
|
||||
*/
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (statePtr->flags & TCP_ASYNC_PENDING) {
|
||||
/* Async sockets use a FileHandler internally while connecting, so we
|
||||
* need to cache this request until the connection has succeeded. */
|
||||
if (GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) {
|
||||
/*
|
||||
* Async sockets use a FileHandler internally while connecting, so we
|
||||
* need to cache this request until the connection has succeeded.
|
||||
*/
|
||||
|
||||
statePtr->filehandlers = mask;
|
||||
} else if (mask) {
|
||||
|
||||
/*
|
||||
* Whether it is a bug or feature or otherwise, it is a fact
|
||||
* of life that on at least some Linux kernels select() fails
|
||||
* to report that a socket file descriptor is writable when
|
||||
* the other end of the socket is closed. This is in contrast
|
||||
* to the guarantees Tcl makes that its channels become
|
||||
* writable and fire writable events on an error conditon.
|
||||
* This has caused a leak of file descriptors in a state of
|
||||
* Whether it is a bug or feature or otherwise, it is a fact of life
|
||||
* that on at least some Linux kernels select() fails to report that a
|
||||
* socket file descriptor is writable when the other end of the socket
|
||||
* is closed. This is in contrast to the guarantees Tcl makes that
|
||||
* its channels become writable and fire writable events on an error
|
||||
* conditon. This has caused a leak of file descriptors in a state of
|
||||
* background flushing. See Tcl ticket 1758a0b603.
|
||||
*
|
||||
* As a workaround, when our caller indicates an interest in
|
||||
* writable notifications, we must tell the notifier built
|
||||
* around select() that we are interested in the readable state
|
||||
* of the file descriptor as well, as that is the only reliable
|
||||
* means to get notified of error conditions. Then it is the
|
||||
* task of WrapNotify() above to untangle the meaning of these
|
||||
* channel states and report the chan events as best it can.
|
||||
* We save a copy of the mask passed in to assist with that.
|
||||
* As a workaround, when our caller indicates an interest in writable
|
||||
* notifications, we must tell the notifier built around select() that
|
||||
* we are interested in the readable state of the file descriptor as
|
||||
* well, as that is the only reliable means to get notified of error
|
||||
* conditions. Then it is the task of WrapNotify() above to untangle
|
||||
* the meaning of these channel states and report the chan events as
|
||||
* best it can. We save a copy of the mask passed in to assist with
|
||||
* that.
|
||||
*/
|
||||
|
||||
statePtr->interest = mask;
|
||||
@@ -1031,7 +1063,7 @@ TcpWatchProc(
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TcpGetHandleProc --
|
||||
*
|
||||
@@ -1045,7 +1077,7 @@ TcpWatchProc(
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* ARGSUSED */
|
||||
@@ -1062,16 +1094,17 @@ TcpGetHandleProc(
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TcpAsyncCallback --
|
||||
*
|
||||
* Called by the event handler that TcpConnect sets up
|
||||
* internally for [socket -async] to get notified when the
|
||||
* asyncronous connection attempt has succeeded or failed.
|
||||
* Called by the event handler that TcpConnect sets up internally for
|
||||
* [socket -async] to get notified when the asyncronous connection
|
||||
* attempt has succeeded or failed.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void
|
||||
TcpAsyncCallback(
|
||||
ClientData clientData, /* The socket state. */
|
||||
@@ -1083,7 +1116,7 @@ TcpAsyncCallback(
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* TcpConnect --
|
||||
*
|
||||
@@ -1109,7 +1142,7 @@ TcpAsyncCallback(
|
||||
* return and the loops resume as if they had never been interrupted.
|
||||
* For syncronously connecting sockets, the loops work the usual way.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static int
|
||||
@@ -1118,9 +1151,9 @@ TcpConnect(
|
||||
TcpState *statePtr)
|
||||
{
|
||||
socklen_t optlen;
|
||||
int async_callback = statePtr->flags & TCP_ASYNC_PENDING;
|
||||
int async_callback = GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING);
|
||||
int ret = -1, error = EHOSTUNREACH;
|
||||
int async = statePtr->flags & TCP_ASYNC_CONNECT;
|
||||
int async = GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT);
|
||||
|
||||
if (async_callback) {
|
||||
goto reenter;
|
||||
@@ -1128,8 +1161,8 @@ TcpConnect(
|
||||
|
||||
for (statePtr->addr = statePtr->addrlist; statePtr->addr != NULL;
|
||||
statePtr->addr = statePtr->addr->ai_next) {
|
||||
|
||||
for (statePtr->myaddr = statePtr->myaddrlist; statePtr->myaddr != NULL;
|
||||
for (statePtr->myaddr = statePtr->myaddrlist;
|
||||
statePtr->myaddr != NULL;
|
||||
statePtr->myaddr = statePtr->myaddr->ai_next) {
|
||||
int reuseaddr = 1;
|
||||
|
||||
@@ -1153,7 +1186,8 @@ TcpConnect(
|
||||
errno = 0;
|
||||
}
|
||||
|
||||
statePtr->fds.fd = socket(statePtr->addr->ai_family, SOCK_STREAM, 0);
|
||||
statePtr->fds.fd = socket(statePtr->addr->ai_family, SOCK_STREAM,
|
||||
0);
|
||||
if (statePtr->fds.fd < 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -1172,14 +1206,18 @@ TcpConnect(
|
||||
TclSockMinimumBuffers(INT2PTR(statePtr->fds.fd), SOCKET_BUFSIZE);
|
||||
|
||||
if (async) {
|
||||
ret = TclUnixSetBlockingMode(statePtr->fds.fd,TCL_MODE_NONBLOCKING);
|
||||
ret = TclUnixSetBlockingMode(statePtr->fds.fd,
|
||||
TCL_MODE_NONBLOCKING);
|
||||
if (ret < 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Gotta reset the error variable here, before we use it for the
|
||||
* first time in this iteration. */
|
||||
/*
|
||||
* Must reset the error variable here, before we use it for the
|
||||
* first time in this iteration.
|
||||
*/
|
||||
|
||||
error = 0;
|
||||
|
||||
(void) setsockopt(statePtr->fds.fd, SOL_SOCKET, SO_REUSEADDR,
|
||||
@@ -1200,10 +1238,13 @@ TcpConnect(
|
||||
|
||||
ret = connect(statePtr->fds.fd, statePtr->addr->ai_addr,
|
||||
statePtr->addr->ai_addrlen);
|
||||
if (ret < 0) error = errno;
|
||||
if (ret < 0) {
|
||||
error = errno;
|
||||
}
|
||||
if (ret < 0 && errno == EINPROGRESS) {
|
||||
Tcl_CreateFileHandler(statePtr->fds.fd,
|
||||
TCL_WRITABLE|TCL_EXCEPTION, TcpAsyncCallback, statePtr);
|
||||
TCL_WRITABLE | TCL_EXCEPTION, TcpAsyncCallback,
|
||||
statePtr);
|
||||
errno = EWOULDBLOCK;
|
||||
SET_BITS(statePtr->flags, TCP_ASYNC_PENDING);
|
||||
return TCL_OK;
|
||||
@@ -1231,7 +1272,7 @@ TcpConnect(
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
out:
|
||||
statePtr->connectError = error;
|
||||
CLEAR_BITS(statePtr->flags, TCP_ASYNC_CONNECT);
|
||||
if (async_callback) {
|
||||
@@ -1329,6 +1370,7 @@ Tcl_OpenTcpClient(
|
||||
/*
|
||||
* Allocate a new TcpState for this socket.
|
||||
*/
|
||||
|
||||
statePtr = ckalloc(sizeof(TcpState));
|
||||
memset(statePtr, 0, sizeof(TcpState));
|
||||
statePtr->flags = async ? TCP_ASYNC_CONNECT : 0;
|
||||
@@ -1340,6 +1382,7 @@ Tcl_OpenTcpClient(
|
||||
/*
|
||||
* Create a new client socket and wrap it in a channel.
|
||||
*/
|
||||
|
||||
if (TcpConnect(interp, statePtr) != TCL_OK) {
|
||||
TcpCloseProc(statePtr, NULL);
|
||||
return NULL;
|
||||
@@ -1347,8 +1390,8 @@ Tcl_OpenTcpClient(
|
||||
|
||||
sprintf(channelName, SOCK_TEMPLATE, (long) statePtr);
|
||||
|
||||
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, statePtr,
|
||||
(TCL_READABLE | TCL_WRITABLE));
|
||||
statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
|
||||
statePtr, TCL_READABLE | TCL_WRITABLE);
|
||||
if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation",
|
||||
"auto crlf") == TCL_ERROR) {
|
||||
Tcl_Close(NULL, statePtr->channel);
|
||||
@@ -1377,7 +1420,8 @@ Tcl_Channel
|
||||
Tcl_MakeTcpClientChannel(
|
||||
ClientData sock) /* The socket to wrap up into a channel. */
|
||||
{
|
||||
return (Tcl_Channel) TclpMakeTcpClientChannelMode(sock, (TCL_READABLE | TCL_WRITABLE));
|
||||
return (Tcl_Channel) TclpMakeTcpClientChannelMode(sock,
|
||||
TCL_READABLE | TCL_WRITABLE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1516,7 +1560,10 @@ Tcl_OpenTcpServer(
|
||||
}
|
||||
|
||||
#ifdef IPV6_V6ONLY
|
||||
/* Missing on: Solaris 2.8 */
|
||||
/*
|
||||
* Missing on: Solaris 2.8
|
||||
*/
|
||||
|
||||
if (addrPtr->ai_family == AF_INET6) {
|
||||
int v6only = 1;
|
||||
|
||||
@@ -1662,7 +1709,7 @@ TcpAccept(
|
||||
|
||||
sprintf(channelName, SOCK_TEMPLATE, (long) newSockState);
|
||||
newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
|
||||
newSockState, (TCL_READABLE | TCL_WRITABLE));
|
||||
newSockState, TCL_READABLE | TCL_WRITABLE);
|
||||
|
||||
Tcl_SetChannelOption(NULL, newSockState->channel, "-translation",
|
||||
"auto crlf");
|
||||
|
||||
+1
-1
@@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC=""
|
||||
TCLOO_INCLUDE_SPEC=""
|
||||
TCLOO_PRIVATE_INCLUDE_SPEC=""
|
||||
TCLOO_CFLAGS=""
|
||||
TCLOO_VERSION=1.0.4
|
||||
TCLOO_VERSION=1.1.0
|
||||
|
||||
+6
-6
@@ -651,17 +651,17 @@ install-libraries: libraries install-tzdata install-msgs
|
||||
do \
|
||||
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/http1.0"; \
|
||||
done;
|
||||
@echo "Installing package http 2.8.11 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.11.tm;
|
||||
@echo "Installing package http 2.8.12 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.6/http-2.8.12.tm;
|
||||
@echo "Installing library opt0.4 directory";
|
||||
@for j in $(ROOT_DIR)/library/opt/*.tcl; \
|
||||
do \
|
||||
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
|
||||
done;
|
||||
@echo "Installing package msgcat 1.6.0 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.6.0.tm;
|
||||
@echo "Installing package tcltest 2.4.0 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.4.0.tm;
|
||||
@echo "Installing package msgcat 1.6.1 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.6.1.tm;
|
||||
@echo "Installing package tcltest 2.4.1 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.4.1.tm;
|
||||
@echo "Installing package platform 1.0.14 as a Tcl Module";
|
||||
@$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.14.tm;
|
||||
@echo "Installing package platform::shell 1.1.4 as a Tcl Module";
|
||||
|
||||
Vendored
+1
-1
@@ -1311,7 +1311,7 @@ SHELL=/bin/sh
|
||||
TCL_VERSION=8.6
|
||||
TCL_MAJOR_VERSION=8
|
||||
TCL_MINOR_VERSION=6
|
||||
TCL_PATCH_LEVEL=".6"
|
||||
TCL_PATCH_LEVEL=".7"
|
||||
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
|
||||
|
||||
TCL_DDE_VERSION=1.4
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ SHELL=/bin/sh
|
||||
TCL_VERSION=8.6
|
||||
TCL_MAJOR_VERSION=8
|
||||
TCL_MINOR_VERSION=6
|
||||
TCL_PATCH_LEVEL=".6"
|
||||
TCL_PATCH_LEVEL=".7"
|
||||
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
|
||||
|
||||
TCL_DDE_VERSION=1.4
|
||||
|
||||
+11
-2
@@ -121,7 +121,7 @@ the build instructions.
|
||||
# nodep = Turns off compatibility macros to ensure the core
|
||||
# isn't being built with deprecated functions.
|
||||
#
|
||||
# MACHINE=(ALPHA|AMD64|IA64|IX86)
|
||||
# MACHINE=(ARM|AMD64|IA64|IX86)
|
||||
# Set the machine type used for the compiler, linker, and
|
||||
# resource compiler. This hook is needed to tell the tools
|
||||
# when alternate platforms are requested. IX86 is the default
|
||||
@@ -484,9 +484,16 @@ cdebug = -Zi -Od $(DEBUGFLAGS)
|
||||
cdebug = -Zi -WX $(DEBUGFLAGS)
|
||||
!endif
|
||||
|
||||
### Common compiler options that are architecture specific
|
||||
!if "$(MACHINE)" == "ARM"
|
||||
carch = -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
|
||||
!else
|
||||
carch =
|
||||
!endif
|
||||
|
||||
### Declarations common to all compiler options
|
||||
cwarn = $(WARNINGS) -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
|
||||
cflags = -nologo -c $(COMPILERFLAGS) $(cwarn) -Fp$(TMP_DIR)^\
|
||||
cflags = -nologo -c $(COMPILERFLAGS) $(carch) $(cwarn) -Fp$(TMP_DIR)^\
|
||||
|
||||
!if $(MSVCRT)
|
||||
!if $(DEBUG) && !$(UNCHECKED)
|
||||
@@ -1222,6 +1229,8 @@ clean: clean-pkgs
|
||||
@if exist $(WINDIR)\nmakehlp.obj del $(WINDIR)\nmakehlp.obj
|
||||
@echo Cleaning $(WINDIR)\nmakehlp.exe ...
|
||||
@if exist $(WINDIR)\nmakehlp.exe del $(WINDIR)\nmakehlp.exe
|
||||
@echo Cleaning $(WINDIR)\nmhlp-out.txt ...
|
||||
@if exist $(WINDIR)\nmhlp-out.txt del $(WINDIR)\nmhlp-out.txt
|
||||
@echo Cleaning $(WINDIR)\_junk.pch ...
|
||||
@if exist $(WINDIR)\_junk.pch del $(WINDIR)\_junk.pch
|
||||
@echo Cleaning $(WINDIR)\vercl.x ...
|
||||
|
||||
+8
-2
@@ -74,6 +74,7 @@ main(
|
||||
char msg[300];
|
||||
DWORD dwWritten;
|
||||
int chars;
|
||||
char *s;
|
||||
|
||||
/*
|
||||
* Make sure children (cl.exe and link.exe) are kept quiet.
|
||||
@@ -153,8 +154,13 @@ main(
|
||||
&dwWritten, NULL);
|
||||
return 0;
|
||||
}
|
||||
printf("%s\n", GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0'));
|
||||
return 0;
|
||||
s = GetVersionFromFile(argv[2], argv[3], *(argv[1]+2) - '0');
|
||||
if (s && *s) {
|
||||
printf("%s\n", s);
|
||||
return 0;
|
||||
} else
|
||||
return 1; /* Version not found. Return non-0 exit code */
|
||||
|
||||
case 'Q':
|
||||
if (argc != 3) {
|
||||
chars = snprintf(msg, sizeof(msg) - 1,
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ static int platformId; /* Running under NT, or 95/98? */
|
||||
* VC++ 5.x has no 'cpuid' assembler instruction, so we must emulate it
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1100)
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1100) && defined (_M_IX86)
|
||||
#define cpuid __asm __emit 0fh __asm __emit 0a2h
|
||||
#endif
|
||||
|
||||
@@ -735,7 +735,7 @@ TclWinCPUID(
|
||||
__cpuid(regsPtr, index);
|
||||
status = TCL_OK;
|
||||
|
||||
# else
|
||||
# elif defined (_M_IX86)
|
||||
/*
|
||||
* Define a structure in the stack frame to hold the registers.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -828,7 +828,7 @@ tclWinDebugPanic(
|
||||
__builtin_trap();
|
||||
#elif defined(_WIN64)
|
||||
__debugbreak();
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && defined (_M_IX86)
|
||||
_asm {int 3}
|
||||
#else
|
||||
DebugBreak();
|
||||
|
||||
+27
-3
@@ -66,6 +66,7 @@ TclpDlopen(
|
||||
HINSTANCE hInstance;
|
||||
const TCHAR *nativeName;
|
||||
Tcl_LoadHandle handlePtr;
|
||||
DWORD firstError;
|
||||
|
||||
/*
|
||||
* First try the full path the user gave us. This is particularly
|
||||
@@ -84,6 +85,12 @@ TclpDlopen(
|
||||
|
||||
Tcl_DString ds;
|
||||
|
||||
/*
|
||||
* Remember the first error on load attempt to be used if the
|
||||
* second load attempt below also fails.
|
||||
*/
|
||||
firstError = GetLastError();
|
||||
|
||||
nativeName = Tcl_WinUtfToTChar(Tcl_GetString(pathPtr), -1, &ds);
|
||||
hInstance = LoadLibraryEx(nativeName, NULL,
|
||||
LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||
@@ -91,8 +98,21 @@ TclpDlopen(
|
||||
}
|
||||
|
||||
if (hInstance == NULL) {
|
||||
DWORD lastError = GetLastError();
|
||||
Tcl_Obj *errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ",
|
||||
DWORD lastError;
|
||||
Tcl_Obj *errMsg;
|
||||
|
||||
/*
|
||||
* We choose to only use the error from the second call if the first
|
||||
* call failed due to the file not being found. Else stick to the
|
||||
* first error for reporting purposes.
|
||||
*/
|
||||
if (firstError == ERROR_MOD_NOT_FOUND ||
|
||||
firstError == ERROR_DLL_NOT_FOUND)
|
||||
lastError = GetLastError();
|
||||
else
|
||||
lastError = firstError;
|
||||
|
||||
errMsg = Tcl_ObjPrintf("couldn't load library \"%s\": ",
|
||||
Tcl_GetString(pathPtr));
|
||||
|
||||
/*
|
||||
@@ -129,7 +149,11 @@ TclpDlopen(
|
||||
Tcl_AppendToObj(errMsg, "the library initialization"
|
||||
" routine failed", -1);
|
||||
break;
|
||||
default:
|
||||
case ERROR_BAD_EXE_FORMAT:
|
||||
Tcl_SetErrorCode(interp, "WIN_LOAD", "BAD_EXE_FORMAT", NULL);
|
||||
Tcl_AppendToObj(errMsg, "Bad exe format. Possibly a 32/64-bit mismatch.", -1);
|
||||
break;
|
||||
default:
|
||||
TclWinConvertError(lastError);
|
||||
Tcl_AppendToObj(errMsg, Tcl_PosixError(interp), -1);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1479,7 +1479,7 @@ BuildCommandLine(
|
||||
quote = 1;
|
||||
} else {
|
||||
int count;
|
||||
Tcl_UniChar ch;
|
||||
Tcl_UniChar ch = 0;
|
||||
|
||||
for (start = arg; *start != '\0'; start += count) {
|
||||
count = TclUtfToUniChar(start, &ch);
|
||||
|
||||
+1
-1
@@ -16,4 +16,4 @@ TCLOO_STUB_LIB_SPEC=""
|
||||
TCLOO_INCLUDE_SPEC=""
|
||||
TCLOO_PRIVATE_INCLUDE_SPEC=""
|
||||
TCLOO_CFLAGS=""
|
||||
TCLOO_VERSION=1.0.4
|
||||
TCLOO_VERSION=1.1.0
|
||||
|
||||
Reference in New Issue
Block a user