Compare commits

...
Author SHA1 Message Date
dgp f0992177e4 Revert the revised macros used in developing the new tests. 2013-07-11 04:00:57 +00:00
dgp 6f4f296706 Add tests for the SetLineInformation() calls in tclEnsemble.c, and fix
the bugs around those calls exposed by the tests.
2013-07-11 03:48:40 +00:00
dgp 75bc23d59c Add tests for SetLineInformation() calls in tclCompCmdsSZ.c as well as some
obvious refactoring improvements.
2013-07-10 20:33:45 +00:00
dgp 9d91a3db0b Add tests for SetLineInformation() calls in tclCompCmdsGR.c. 2013-07-10 19:43:56 +00:00
dgp 1dc19d8370 Add tests for, and fix bugs in, the SetLineInformation() calls in tclCompCmds.c. 2013-07-10 19:34:55 +00:00
dgp 458197828b merge trunk 2013-07-10 18:02:20 +00:00
dgp c079ab076f Fix for [86fb5ea28e]. Test will eventually merge in from tip280-test-coverage. 2013-07-10 17:58:45 +00:00
dgp d69c39d52e Next attempt. Appears to have uncovered a bug. 2013-07-10 16:43:01 +00:00
dgp 7a53c36e3a First additional test. Remove dup macros in tclEnsemble.c. 2013-07-10 16:27:09 +00:00
dgp ee74db1cbf Disabling the SetLineInformation() macro entirely causes only 3 tests
in the test suite to fail.  Restoring just 2 SetLineInformation() calls
fixes those failures.  The need for all the other SLI() calls is not
demonstrated by any test.  Without more complete test coverage, it is
difficult to confidently tweak the TIP 280 implementation without fear
that changes are introducing breakage.
2013-07-10 16:17:12 +00:00
jan.nijtmans 7183692271 Unbreak MSVC6 debug build (thanks Andreas Kupries!) 2013-07-08 18:56:13 +00:00
jan.nijtmans b7fbf3c433 Unbreak MSVC6 debug build (thanks Andreas Kupries!) 2013-07-08 18:55:23 +00:00
jan.nijtmans fb3fc7d5d3 Build stub objects with -DSTATIC_BUILD on all platforms. Only important on win32 (already done) and cygwin, on other platforms it should not have any effect. 2013-07-08 06:51:16 +00:00
jan.nijtmans de31df63e7 Build stub objects with -DSTATIC_BUILD on all platforms. Only important on win32 (already done) and cygwin, on other platforms it should not have any effect. 2013-07-08 06:49:44 +00:00
jan.nijtmans a7bebaafdb merge-mark 2013-07-07 09:15:37 +00:00
stwo bd6afa9af5 OpenBSD/m88k is now elf. Remove unneeded elf check. 2013-07-07 02:19:20 +00:00
stwo c8629fcad6 OpenBSD/m88k is now elf. Remove unneeded elf check. 2013-07-07 02:11:57 +00:00
Kevin B Kenny b52ba9ae90 Merge mark 2013-07-06 22:29:36 +00:00
Kevin B Kenny a6fe3119b2 http://www.iana.org/time-zones/repository/releases/tzdata2013d.tar.gz 2013-07-06 22:24:52 +00:00
Kevin B Kenny 28bc2e5adf http://www.iana.org/time-zones/repository/releases/tzdata2013d.tar.gz 2013-07-06 22:22:01 +00:00
jan.nijtmans 421cc90918 Use X11/Xlib.h for checking where X11 can be found in stead of X11/XIntrinsic.h. Suggested by Pietro Cerutti.
(backported from tclconfig)
2013-07-05 14:56:24 +00:00
jan.nijtmans e26d6e29c1 Use X11/Xlib.h for checking where X11 can be found in stead of X11/XIntrinsic.h. Suggested by Pietro Cerutti.
(Backported from tclconfig)
2013-07-05 14:52:07 +00:00
jan.nijtmans 57f4decd9b CONST -> const in one place 2013-07-05 14:04:03 +00:00
jan.nijtmans e0373f12ec Allow successfull compilation, even if Tcl_GetErrorLine/Tcl_SetErrorLine are redefined as macros. 2013-07-05 14:02:59 +00:00
jan.nijtmans fa8b071f04 Bug [817249]: bring tclXtNotify.c up to date with Tcl_SetNotifier() change 2013-07-03 10:43:49 +00:00
jan.nijtmans 6f68b762d3 Bug [817249]: bring tclXtNotify.c up to date with Tcl_SetNotifier() change 2013-07-03 10:39:50 +00:00
jan.nijtmans ade4e6d9bb Fix compiler warning when compiling Itcl 4.0:
In file included from ./generic/itcl2TclOO.c:12:0:
/Tcl/include/tclInt.h:3012:8: warning: ‘struct addrinfo’ declared inside parameter list [enabled by default]
        const char **errorMsgPtr);
        ^
2013-07-03 08:59:09 +00:00
jan.nijtmans a6b67f2ef2 Fix compiler warning when compiling Cygwin port with -Wwrite-strings 2013-07-03 08:56:34 +00:00
jan.nijtmans 73faa3bbb6 Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4. Thanks to Brian Griffin. 2013-07-02 07:17:19 +00:00
jan.nijtmans 89b2fc0982 Don't forget ChangeLog for previous commit 2013-07-02 07:16:22 +00:00
jan.nijtmans 7d8dff7c72 Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4. Thanks to Brian Griffin. 2013-07-02 07:14:59 +00:00
jan.nijtmans eec0dcb530 Fix [34538ba43f] 2013-06-27 12:35:47 +00:00
jan.nijtmans c0f408b9cd Fix [34538ba43f] 2013-06-27 12:34:49 +00:00
jan.nijtmans e592a6c9d5 Bug [9b2e636361]: Tcl_CreateInterp() needs initialized encodings. 2013-06-27 08:51:40 +00:00
jan.nijtmans 5ea3e8b570 Bug [9b2e636361]: Tcl_CreateInterp() needs initialized encodings. 2013-06-27 08:28:42 +00:00
dgp a9f49cd781 Stop buffer overrun into undefined values detected by valgrind. 2013-06-26 20:13:57 +00:00
dgp b3fea91162 Correct typo detected by valgrind. 2013-06-26 17:26:16 +00:00
jan.nijtmans eaf387ef13 typos.
On Cygwin, Tcl_SetPanicProc(NULL) should set back the panic proc to its default, which is not NULL.
2013-06-26 14:24:20 +00:00
jan.nijtmans 78b0a4a13c formatting, typo 2013-06-26 14:20:26 +00:00
jan.nijtmans f7fd65de47 Allocate encoding name, so caller of Tcl_RegisterConfig() doesn't need to keep it forever.
Fix some comments.
2013-06-26 08:10:36 +00:00
jan.nijtmans d751f58f9d Proposed solution for [9b2e636361] 2013-06-26 07:42:53 +00:00
dgp c012287fc8 Replace always true test with assertion. 2013-06-25 19:23:24 +00:00
dgp adb4b18477 Make more use of the CompileTokens() macro. 2013-06-25 15:01:03 +00:00
jan.nijtmans 708da35f79 Don't use deprecated Tcl_DStringTrunc any more 2013-06-25 12:06:07 +00:00
jan.nijtmans 07bfe18a21 Don't use deprecated Tcl_DStringTrunc any more. 2013-06-25 12:02:56 +00:00
jan.nijtmans 9497794406 Remove TclInitStubTable() function (but keep it in the "initsubsystems" branch). 2013-06-25 10:02:14 +00:00
jan.nijtmans 8d8c38c7c7 Don't use TclpInetNtoa any more, use inet_ntoa in stead. Since IP6 support it's even not necessary any more (except for fake-rfc2553, but mutexes are used here already) , but it's in the internal stub table so we cannot remove it until 9.0 2013-06-21 11:57:59 +00:00
jan.nijtmans dcb4da22fa Modify internal TclStubInfoType type: use TclStubs * in stead of ClientData, so less type casts are needed in the code.
Disadvantage: somewhat more code duplication, but it makes the code much more understandable.
2013-06-21 11:53:11 +00:00
dgp 130c6dd203 TclCompileScript() should not overwrite envPtr->numSrcBytes.
The envPtr already has the right value stored in it.
2013-06-20 14:20:59 +00:00
dgp bbca4ec51b TclCompileScript() should not overwrite envPtr->numSrcBytes.
The envPtr already has the right value stored in it.
2013-06-20 14:17:05 +00:00
dkf 4a6f1d02be Fixed bug with optimizing with INST_START_CMD about. 2013-06-19 22:44:42 +00:00
dgp 202a7c4db1 More use of simplifying macros.
Replace dynamic allocation with automatic storage on the call stack.
2013-06-19 19:33:21 +00:00
jan.nijtmans 4d9fc81c0f Eliminate a lot of dead code (for Windows 95/98/ME only).
Eliminate all usage of TclWinSetInterfaces(), which does exactly the same as TclpSetInterfaces(), but keep exported symbol and stub entry.
2013-06-19 12:53:53 +00:00
jan.nijtmans cdd8467ca9 Fix [3611974]: InitSubsystems multiple thread issue 2013-06-18 10:36:06 +00:00
jan.nijtmans 099345d98c Fix [3611974]: InitSubsystems multiple thread issue 2013-06-18 10:33:33 +00:00
jan.nijtmans 76df95e6e4 Fix uniClass tool which was the real cause for [a876646efe], and add test-case for it. 2013-06-18 07:50:19 +00:00
jan.nijtmans 7243b34d80 Fix uniClass tool which was the real cause for [a876646efe], and add test-case for it. 2013-06-18 07:43:59 +00:00
jan.nijtmans 6a445a3fe6 Better place to put vsnprintf switch, so it is usable by all *.c files.
Fix comment on _ANSI_ARGS_ which is no longer true since 8.6.
2013-06-18 07:00:04 +00:00
dgp d6ca452640 Updates to redirect bug reports to the new tracker location. 2013-06-17 17:05:07 +00:00
jan.nijtmans 7b9871647a Fix [42b8083613] 2013-06-17 17:03:49 +00:00
dgp 5f13065a33 Updates to redirect bug reports to the new tracker location. 2013-06-17 17:03:18 +00:00
jan.nijtmans e80db5fa35 Use more portable TclIsSpaceProc() in stead of isspace(). 2013-06-17 13:29:39 +00:00
jan.nijtmans 3215339ef0 Use more portable TclIsSpaceProc() in stead of isspace().
Make sure that "string is space \u180e" continues to return 1 for whatever unicode version.
2013-06-17 13:23:29 +00:00
jan.nijtmans b7289f092d Fix [a876646efe]: re_expr character class [:cntrl:] should contain \u0000 - \u001f 2013-06-17 04:54:35 +00:00
jan.nijtmans ded13430f9 Fix [a876646efe]: re_expr character class [:cntrl:] should contain \u0000 - \u001f 2013-06-17 04:52:01 +00:00
jan.nijtmans 6eb0e8555d On 32-bit platforms, 12 characters for version is enough, on 64-bit platforms it will be aligned to 16 characters anyway. 2013-06-17 04:41:57 +00:00
jan.nijtmans c05b753e95 link tclsh with stub library, just like xttest and tcltest, in order to allow additional static stub-enabled libraries to be linked with it. 2013-06-16 20:48:57 +00:00
jan.nijtmans f332c17690 split off TclInitStubTable() as separate function - which does the actual stub table initialization - previously part of Tcl_InitStubs(). 2013-06-16 20:32:50 +00:00
jan.nijtmans df6a99b1f7 Don't use deprecated stricmp/strnicmp any more, but underscored variant for non-GNU compilers.
Some formatting - improved comments.
2013-06-14 10:15:50 +00:00
jan.nijtmans 07096327dc Don't use deprecated stricmp/strnicmp any more, but underscored variant for non-GNU compilers. 2013-06-14 10:11:08 +00:00
jan.nijtmans a831b299f7 Fix env.test when running mingw-w64 (AMD64 build) test-suite on wine64.
Fix some gcc warnings which become visible with -Wextra
2013-06-13 07:23:08 +00:00
jan.nijtmans b6b9185fa8 Fix some gcc warnings which become visible with -Wextra 2013-06-13 07:13:09 +00:00
jan.nijtmans bd6f6a89c6 Fix env.test when running mingw-w64 (AMD64 build) test-suite on wine64 2013-06-12 19:36:49 +00:00
jan.nijtmans 169288808b Workaround for mingw-w64 (AMD64-only) bug: It appears that zdll.lib (as produced by Microsoft tools) doesn't import the zlib symbols correctly, so use "libz.dll.a" produced with mingw-w64 tools in stead. 2013-06-12 12:24:23 +00:00
jan.nijtmans 615ab1a0d4 Silence various warnings when doing a 64-bit build with MSVC: Those warnings can only _really_ be fixed in "novem" (so, don't silence them there).
Use vsnprintf (more portable) in stead of _vsnprintf, except on MSVC
2013-06-12 10:29:01 +00:00
jan.nijtmans c961880a26 Silence various warnings when doing a 64-bit build with MSVC: Those warnings can only _really_ be fixed in "novem" (so, don't silence them there) 2013-06-12 10:24:52 +00:00
dgp f118d91a3d Revise INST_EXPAND_STKTOP so that it no longer makes use of its operand.
All the information required to do a proper expansion of the exec stack
to support expanded command invocation is already present.  The operand
doesn't provide any essential information.  By ignoring it, we eliminate
the risk that the compiler might fill in the operand with a bad stack depth
estimate value.  INST_EXPAND_STKTOP doesn't need an operand, but in order
to support loading of existing bytecodes we cannot change it now.  There's
also no need to change what the compiler tries to place in the operand,
though changing it to always be zeros would be acceptable now.
2013-06-11 22:47:22 +00:00
dgp 3c473ee0c4 Select improvements in stack depth estimates brought over from mig-review.
Mostly these are just simplifications, removing code that wasn't needed.
Some changes make the stack depth estimate more accurate instruction by
instruction.
2013-06-11 20:38:00 +00:00
dgp 67264f1e10 Repairs to compile/exec debugging output. 2013-06-11 19:41:55 +00:00
dgp 9cccd5fd91 Stack housekeeping repair for last checkin. 2013-06-11 17:58:49 +00:00
dgp 470fc04dd0 [33b7abb8a2] [7174354ecb] Rewrite TclCompileThrowCmd(). 2013-06-11 16:44:34 +00:00
jan.nijtmans 46db2c3edd Improve compatibility detection for <time.h> and <sys/stat.h>:
- Move <time.h> before other includes on Windows, so we are sure the time_t definition being checked doesn't come from <sys/types.h>. 
- Padding at the end of Tcl_StatBuf doesn't influcence binary compatibility, so relax panic check accordingly.
2013-06-11 08:12:09 +00:00
jan.nijtmans 52ce2fdeb0 Improve compatibility detection for <time.h> and <sys/stat.h>:
- Move <time.h> before other includes on Windows, so we are sure the time_t definition being checked doesn't come from <sys/types.h>. 
- Padding at the end of Tcl_StatBuf doesn't influcence binary compatibility, so relax panic check accordingly.
2013-06-11 07:58:01 +00:00
65 changed files with 1605 additions and 1068 deletions
+34
View File
@@ -1,3 +1,37 @@
2013-07-05 Kevin B. Kenny <kennykb@acm.org>
* library/tzdata/Africa/Casablanca:
* library/tzdata/America/Asuncion:
* library/tzdata/Antarctica/Macquarie:
* library/tzdata/Asia/Gaza:
* library/tzdata/Asia/Hebron:
* library/tzdata/Asia/Jerusalem:
http://www.iana.org/time-zones/repository/releases/tzdata2013d.tar.gz
2013-07-03 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tclXtNotify.c: Bug [817249]: bring tclXtNotify.c up to date with
Tcl_SetNotifier() change.
2013-07-02 Jan Nijtmans <nijtmans@users.sf.net>
* unix/tcl.m4: Bug [32afa6e256]: dirent64 check is incorrect in tcl.m4
* unix/configure: (thanks to Brian Griffin)
2013-06-27 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclConfig.c: Bug [9b2e636361]: Tcl_CreateInterp() needs initialized
* generic/tclMain.c: encodings.
2013-06-18 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclEvent.c: Bug [3611974]: InitSubsystems multiple thread issue.
2013-06-17 Jan Nijtmans <nijtmans@users.sf.net>
* generic/regc_locale.c: Bug [a876646efe]: re_expr character class
[:cntrl:] should contain \u0000 - \u001f
2013-06-09 Donal K. Fellows <dkf@users.sf.net>
* generic/tclCompCmdsSZ.c (TclCompileTryCmd): [Bug 779d38b996]:
+14 -15
View File
@@ -1,8 +1,7 @@
README: Tcl
This is the Tcl 8.6.0 source distribution.
http://tcl.sourceforge.net/
You can get any source release of Tcl from the file distributions
link at the above URL.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tcl from the URL above.
Contents
--------
@@ -27,9 +26,14 @@ Tcl can also be used for a variety of web-related tasks and for creating
powerful command languages for applications.
Tcl is maintained, enhanced, and distributed freely by the Tcl community.
The home for Tcl/Tk releases and bug/patch database is on SourceForge:
Source code development and tracking of bug reports and feature requests
takes place at:
http://tcl.sourceforge.net/
http://core.tcl.tk/
Tcl/Tk release and mailing list services are hosted by SourceForge:
http://sourceforge.net/projects/tcl/
with the Tcl Developer Xchange hosted at:
@@ -49,7 +53,7 @@ The home page for this release, including new features, is
Detailed release notes can be found at the file distributions page
by clicking on the relevant version.
http://sourceforge.net/projects/tcl/files/
http://sourceforge.net/projects/tcl/files/Tcl/
Information about Tcl itself can be found at
http://www.tcl.tk/about/
@@ -146,18 +150,13 @@ and go to the Mailing Lists page.
------------------------
We are very interested in receiving bug reports, patches, and suggestions
for improvements. We prefer that you send this information to us via the
bug form at SourceForge, rather than emailing us directly. The bug
database is at:
for improvements. We prefer that you send this information to us as
tickets entered into our tracker at:
http://tcl.sourceforge.net/
The bug form was designed to give uniform structure to bug reports as
well as to solicit enough information to minimize followup questions.
http://core.tcl.tk/tcl/reportlist
We will log and follow-up on each bug, although we cannot promise a
specific turn-around time. Enhancements, reported via the Feature
Requests form at the same web site, may take longer and may not happen
specific turn-around time. Enhancements may take longer and may not happen
at all unless there is widespread support for them (we're trying to
slow the rate at which Tcl/Tk turns into a kitchen sink). It's very
difficult to make incompatible changes to Tcl/Tk at this point, due to
Binary file not shown.
+3 -2
View File
@@ -259,8 +259,9 @@ static const chr alphaCharTable[] = {
*/
static const crange controlRangeTable[] = {
{0x7f, 0x9f}, {0x600, 0x604}, {0x200b, 0x200f}, {0x202a, 0x202e},
{0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff}, {0xfff9, 0xfffb}
{0x0, 0x1f}, {0x7f, 0x9f}, {0x600, 0x604}, {0x200b, 0x200f},
{0x202a, 0x202e}, {0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff},
{0xfff9, 0xfffb}
#if TCL_UTF_MAX > 4
,{0x1d173, 0x1d17a}, {0xe0020, 0xe007f}, {0xf0000, 0xffffd}, {0x100000, 0x10fffd}
#endif
+1 -1
View File
@@ -2417,7 +2417,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
*/
#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
(Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)()))
((Tcl_CreateInterp)()))
EXTERN void Tcl_MainEx(int argc, char **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
+4 -3
View File
@@ -489,11 +489,12 @@ Tcl_CreateInterp(void)
#if defined(_WIN32) && !defined(_WIN64)
if (sizeof(time_t) != 4) {
/*NOTREACHED*/
Tcl_Panic("sys/time.h is not compatible with MSVC");
Tcl_Panic("<time.h> is not compatible with MSVC");
}
if (sizeof(Tcl_StatBuf) != 48) {
if ((TclOffset(Tcl_StatBuf,st_atime) != 32)
|| (TclOffset(Tcl_StatBuf,st_ctime) != 40)) {
/*NOTREACHED*/
Tcl_Panic("sys/stat.h is not compatible with MSVC");
Tcl_Panic("<sys/stat.h> is not compatible with MSVC");
}
#endif
+3 -4
View File
@@ -194,8 +194,7 @@ Tcl_CaseObjCmd(
for (i = 0; i < caseObjc; i += 2) {
int patObjc, j;
const char **patObjv;
const char *pat;
unsigned char *p;
const char *pat, *p;
if (i == caseObjc-1) {
Tcl_ResetResult(interp);
@@ -210,8 +209,8 @@ Tcl_CaseObjCmd(
*/
pat = TclGetString(caseObjv[i]);
for (p = (unsigned char *) pat; *p != '\0'; p++) {
if (isspace(*p) || (*p == '\\')) { /* INTL: ISO space, UCHAR */
for (p = pat; *p != '\0'; p++) {
if (TclIsSpaceProc(*p) || (*p == '\\')) {
break;
}
}
+6 -26
View File
@@ -545,7 +545,6 @@ TclCompileCatchCmd(
Tcl_Token *cmdTokenPtr, *resultNameTokenPtr, *optsNameTokenPtr;
int resultIndex, optsIndex, range;
int initStackDepth = envPtr->currStackDepth;
int savedStackDepth;
DefineLineInformation; /* TIP #280 */
/*
@@ -613,13 +612,11 @@ TclCompileCatchCmd(
SetLineInformation(1);
if (cmdTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
savedStackDepth = envPtr->currStackDepth;
TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr);
ExceptionRangeStarts(envPtr, range);
CompileBody(envPtr, cmdTokenPtr, interp);
} else {
CompileTokens(envPtr, cmdTokenPtr, interp);
savedStackDepth = envPtr->currStackDepth;
TclEmitInstInt4( INST_BEGIN_CATCH4, range, envPtr);
ExceptionRangeStarts(envPtr, range);
TclEmitOpcode( INST_DUP, envPtr);
@@ -641,7 +638,7 @@ TclCompileCatchCmd(
TclEmitOpcode( INST_POP, envPtr);
PushStringLiteral(envPtr, "0");
TclEmitInstInt1( INST_JUMP1, 3, envPtr);
envPtr->currStackDepth = savedStackDepth;
TclAdjustStackDepth(-1, envPtr);
ExceptionRangeTarget(envPtr, range, catchOffset);
TclEmitOpcode( INST_PUSH_RETURN_CODE, envPtr);
ExceptionRangeEnds(envPtr, range);
@@ -670,7 +667,7 @@ TclCompileCatchCmd(
* return code.
*/
envPtr->currStackDepth = savedStackDepth;
TclAdjustStackDepth(-2, envPtr);
ExceptionRangeTarget(envPtr, range, catchOffset);
/* Stack at this point: ?script? */
TclEmitOpcode( INST_PUSH_RESULT, envPtr);
@@ -1286,6 +1283,7 @@ TclCompileDictMergeCmd(
* subsequent) dicts. This is strictly not necessary, but it is nice.
*/
TclAdjustStackDepth(-1, envPtr);
ExceptionRangeTarget(envPtr, outLoop, catchOffset);
TclEmitOpcode( INST_PUSH_RETURN_OPTIONS, envPtr);
TclEmitOpcode( INST_PUSH_RESULT, envPtr);
@@ -1295,7 +1293,6 @@ TclCompileDictMergeCmd(
TclEmitInstInt1( INST_UNSET_SCALAR, 0, envPtr);
TclEmitInt4( infoIndex, envPtr);
TclEmitOpcode( INST_RETURN_STK, envPtr);
TclAdjustStackDepth(-1, envPtr);
return TCL_OK;
}
@@ -1345,9 +1342,6 @@ CompileDictEachCmd(
int numVars, endTargetOffset;
int collectVar = -1; /* Index of temp var holding the result
* dict. */
int savedStackDepth = envPtr->currStackDepth;
/* Needed because jumps confuse the stack
* space calculator. */
const char **argv;
Tcl_DString buffer;
@@ -1510,6 +1504,7 @@ CompileDictEachCmd(
* and rethrows the error.
*/
TclAdjustStackDepth(-1, envPtr);
ExceptionRangeTarget(envPtr, catchRange, catchOffset);
TclEmitOpcode( INST_PUSH_RETURN_OPTIONS, envPtr);
TclEmitOpcode( INST_PUSH_RESULT, envPtr);
@@ -1528,7 +1523,6 @@ CompileDictEachCmd(
* easy!) Note that we skip the END_CATCH. [Bug 1382528]
*/
envPtr->currStackDepth = savedStackDepth + 2;
jumpDisplacement = CurrentOffset(envPtr) - emptyTargetOffset;
TclUpdateInstInt4AtPc(INST_JUMP_TRUE4, jumpDisplacement,
envPtr->codeStart + emptyTargetOffset);
@@ -2240,7 +2234,6 @@ TclCompileForCmd(
JumpFixup jumpEvalCondFixup;
int testCodeOffset, bodyCodeOffset, nextCodeOffset, jumpDist;
int bodyRange, nextRange;
int savedStackDepth = envPtr->currStackDepth;
DefineLineInformation; /* TIP #280 */
if (parsePtr->numWords != 5) {
@@ -2302,7 +2295,6 @@ TclCompileForCmd(
SetLineInformation(4);
CompileBody(envPtr, bodyTokenPtr, interp);
ExceptionRangeEnds(envPtr, bodyRange);
envPtr->currStackDepth = savedStackDepth + 1;
TclEmitOpcode(INST_POP, envPtr);
/*
@@ -2313,14 +2305,11 @@ TclCompileForCmd(
nextRange = TclCreateExceptRange(LOOP_EXCEPTION_RANGE, envPtr);
envPtr->exceptAuxArrayPtr[nextRange].supportsContinue = 0;
envPtr->currStackDepth = savedStackDepth;
nextCodeOffset = ExceptionRangeStarts(envPtr, nextRange);
SetLineInformation(3);
CompileBody(envPtr, nextTokenPtr, interp);
ExceptionRangeEnds(envPtr, nextRange);
envPtr->currStackDepth = savedStackDepth + 1;
TclEmitOpcode(INST_POP, envPtr);
envPtr->currStackDepth = savedStackDepth;
/*
* Compile the test expression then emit the conditional jump that
@@ -2337,9 +2326,7 @@ TclCompileForCmd(
}
SetLineInformation(2);
envPtr->currStackDepth = savedStackDepth;
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
envPtr->currStackDepth = savedStackDepth + 1;
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
@@ -2367,7 +2354,6 @@ TclCompileForCmd(
* The for command's result is an empty string.
*/
envPtr->currStackDepth = savedStackDepth;
PushStringLiteral(envPtr, "");
return TCL_OK;
@@ -2478,9 +2464,8 @@ CompileEachloopCmd(
Tcl_Token *tokenPtr, *bodyTokenPtr;
unsigned char *jumpPc;
JumpFixup jumpFalseFixup;
int jumpBackDist, jumpBackOffset, infoIndex, range, bodyIndex;
int jumpBackDist, jumpBackOffset, infoIndex, range;
int numWords, numLists, numVars, loopIndex, tempVar, i, j, code;
int savedStackDepth = envPtr->currStackDepth;
DefineLineInformation; /* TIP #280 */
/*
@@ -2519,8 +2504,6 @@ CompileEachloopCmd(
return TCL_ERROR;
}
bodyIndex = i-1;
/*
* Allocate storage for the varcList and varvList arrays if necessary.
*/
@@ -2699,11 +2682,10 @@ CompileEachloopCmd(
* Inline compile the loop body.
*/
SetLineInformation(bodyIndex);
SetLineInformation(numWords - 1);
ExceptionRangeStarts(envPtr, range);
CompileBody(envPtr, bodyTokenPtr, interp);
ExceptionRangeEnds(envPtr, range);
envPtr->currStackDepth = savedStackDepth + 1;
if (collect == TCL_EACH_COLLECT) {
Emit14Inst( INST_LAPPEND_SCALAR, collectVar,envPtr);
@@ -2763,7 +2745,6 @@ CompileEachloopCmd(
* list of results from evaluating the loop body.
*/
envPtr->currStackDepth = savedStackDepth;
if (collect == TCL_EACH_COLLECT) {
Emit14Inst( INST_LOAD_SCALAR, collectVar, envPtr);
TclEmitInstInt1(INST_UNSET_SCALAR, 0, envPtr);
@@ -2771,7 +2752,6 @@ CompileEachloopCmd(
} else {
PushStringLiteral(envPtr, "");
}
envPtr->currStackDepth = savedStackDepth + 1;
done:
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
+1 -14
View File
@@ -142,10 +142,6 @@ TclCompileIfCmd(
int jumpIndex = 0; /* Avoid compiler warning. */
int jumpFalseDist, numWords, wordIdx, numBytes, j, code;
const char *word;
int savedStackDepth = envPtr->currStackDepth;
/* Saved stack depth at the start of the first
* test; the envPtr current depth is restored
* to this value at the start of each test. */
int realCond = 1; /* Set to 0 for static conditions:
* "if 0 {..}" */
int boolVal; /* Value of static condition. */
@@ -203,7 +199,6 @@ TclCompileIfCmd(
* the "then" part.
*/
envPtr->currStackDepth = savedStackDepth;
testTokenPtr = tokenPtr;
if (realCond) {
@@ -270,7 +265,6 @@ TclCompileIfCmd(
if (compileScripts) {
SetLineInformation(wordIdx);
envPtr->currStackDepth = savedStackDepth;
CompileBody(envPtr, tokenPtr, interp);
}
@@ -295,6 +289,7 @@ TclCompileIfCmd(
* with a 4 byte jump.
*/
TclAdjustStackDepth(-1, envPtr);
if (TclFixupForwardJumpToHere(envPtr,
jumpFalseFixupArray.fixup+jumpIndex, 120)) {
/*
@@ -324,13 +319,6 @@ TclCompileIfCmd(
wordIdx++;
}
/*
* Restore the current stack depth in the environment; the "else" clause
* (or its default) will add 1 to this.
*/
envPtr->currStackDepth = savedStackDepth;
/*
* Check for the optional else clause. Do not compile anything if this was
* an "if 1 {...}" case.
@@ -416,7 +404,6 @@ TclCompileIfCmd(
*/
done:
envPtr->currStackDepth = savedStackDepth + 1;
TclFreeJumpFixupArray(&jumpFalseFixupArray);
TclFreeJumpFixupArray(&jumpEndFixupArray);
return code;
+77 -134
View File
@@ -40,17 +40,14 @@ static int CompileUnaryOpCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, int instruction,
CompileEnv *envPtr);
static void IssueSwitchChainedTests(Tcl_Interp *interp,
CompileEnv *envPtr, ExtCmdLoc *mapPtr,
int eclIndex, int mode, int noCase,
int valueIndex, Tcl_Token *valueTokenPtr,
int numWords, Tcl_Token **bodyToken,
int *bodyLines, int **bodyNext);
static void IssueSwitchJumpTable(Tcl_Interp *interp,
CompileEnv *envPtr, ExtCmdLoc *mapPtr,
int eclIndex, int valueIndex,
Tcl_Token *valueTokenPtr, int numWords,
CompileEnv *envPtr, int mode, int noCase,
int valueIndex, int numWords,
Tcl_Token **bodyToken, int *bodyLines,
int **bodyContLines);
int **bodyNext);
static void IssueSwitchJumpTable(Tcl_Interp *interp,
CompileEnv *envPtr, int valueIndex,
int numWords, Tcl_Token **bodyToken,
int *bodyLines, int **bodyContLines);
static int IssueTryClausesInstructions(Tcl_Interp *interp,
CompileEnv *envPtr, Tcl_Token *bodyToken,
int numHandlers, int *matchCodes,
@@ -865,6 +862,7 @@ TclSubstCompile(
/* Substitution produced TCL_OK */
OP( END_CATCH);
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &okFixup);
TclAdjustStackDepth(-1, envPtr);
/* Exceptional return codes processed here */
ExceptionRangeTarget(envPtr, catchRange, catchOffset);
@@ -890,6 +888,7 @@ TclSubstCompile(
/* OTHER */
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &otherFixup);
TclAdjustStackDepth(1, envPtr);
/* BREAK destination */
if (TclFixupForwardJumpToHere(envPtr, &breakFixup, 127)) {
Tcl_Panic("TclCompileSubstCmd: bad break jump distance %d",
@@ -905,6 +904,7 @@ TclSubstCompile(
OP1(JUMP1, -breakJump);
}
TclAdjustStackDepth(2, envPtr);
/* CONTINUE destination */
if (TclFixupForwardJumpToHere(envPtr, &continueFixup, 127)) {
Tcl_Panic("TclCompileSubstCmd: bad continue jump distance %d",
@@ -914,6 +914,7 @@ TclSubstCompile(
OP( POP);
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP, &endFixup);
TclAdjustStackDepth(2, envPtr);
/* RETURN + other destination */
if (TclFixupForwardJumpToHere(envPtr, &returnFixup, 127)) {
Tcl_Panic("TclCompileSubstCmd: bad return jump distance %d",
@@ -931,17 +932,6 @@ TclSubstCompile(
OP4( REVERSE, 2);
OP( POP);
/*
* We've emitted several POP instructions, and the automatic
* computations for stack depth requirements have been decrementing
* for every one. However, we know that every branch actually taken
* only encounters some of those instructions. No branch passes
* through them all. So, we now have a stack requirements estimate
* that is too low. Here we manually fix that up.
*/
TclAdjustStackDepth(4, envPtr);
/* OK destination */
if (TclFixupForwardJumpToHere(envPtr, &okFixup, 127)) {
Tcl_Panic("TclCompileSubstCmd: bad ok jump distance %d",
@@ -1293,13 +1283,16 @@ TclCompileSwitchCmd(
* but it handles the most common case well enough.
*/
/* Both methods push the value to match against onto the stack. */
SetLineInformation(valueIndex);
CompileTokens(envPtr, valueTokenPtr, interp);
if (mode == Switch_Exact) {
IssueSwitchJumpTable(interp, envPtr, mapPtr, eclIndex, valueIndex,
valueTokenPtr, numWords, bodyToken, bodyLines, bodyContLines);
IssueSwitchJumpTable(interp, envPtr, valueIndex, numWords, bodyToken,
bodyLines, bodyContLines);
} else {
IssueSwitchChainedTests(interp, envPtr, mapPtr, eclIndex, mode,noCase,
valueIndex, valueTokenPtr, numWords, bodyToken, bodyLines,
bodyContLines);
IssueSwitchChainedTests(interp, envPtr, mode, noCase, valueIndex,
numWords, bodyToken, bodyLines, bodyContLines);
}
result = TCL_OK;
@@ -1337,13 +1330,9 @@ static void
IssueSwitchChainedTests(
Tcl_Interp *interp, /* Context for compiling script bodies. */
CompileEnv *envPtr, /* Holds resulting instructions. */
ExtCmdLoc *mapPtr, /* For mapping tokens to their source code
* location. */
int eclIndex,
int mode, /* Exact, Glob or Regexp */
int noCase, /* Case-insensitivity flag. */
int valueIndex, /* The value to match against. */
Tcl_Token *valueTokenPtr,
int numBodyTokens, /* Number of tokens describing things the
* switch can match against and bodies to
* execute when the match succeeds. */
@@ -1353,7 +1342,6 @@ IssueSwitchChainedTests(
int **bodyContLines) /* Array of continuation line info. */
{
enum {Switch_Exact, Switch_Glob, Switch_Regexp};
int savedStackDepth = envPtr->currStackDepth;
int foundDefault; /* Flag to indicate whether a "default" clause
* is present. */
JumpFixup *fixupArray; /* Array of forward-jump fixup records. */
@@ -1368,13 +1356,6 @@ IssueSwitchChainedTests(
int simple, exact; /* For extracting the type of regexp. */
int i;
/*
* First, we push the value we're matching against on the stack.
*/
SetLineInformation(valueIndex);
CompileTokens(envPtr, valueTokenPtr, interp);
/*
* Generate a test for each arm.
*/
@@ -1388,7 +1369,6 @@ IssueSwitchChainedTests(
foundDefault = 0;
for (i=0 ; i<numBodyTokens ; i+=2) {
nextArmFixupIndex = -1;
envPtr->currStackDepth = savedStackDepth + 1;
if (i!=numBodyTokens-2 || bodyToken[numBodyTokens-2]->size != 7 ||
memcmp(bodyToken[numBodyTokens-2]->start, "default", 7)) {
/*
@@ -1525,7 +1505,6 @@ IssueSwitchChainedTests(
*/
OP( POP);
envPtr->currStackDepth = savedStackDepth;
envPtr->line = bodyLines[i+1]; /* TIP #280 */
envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */
TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr);
@@ -1583,8 +1562,6 @@ IssueSwitchChainedTests(
}
TclStackFree(interp, fixupTargetArray);
TclStackFree(interp, fixupArray);
envPtr->currStackDepth = savedStackDepth + 1;
}
/*
@@ -1604,11 +1581,7 @@ static void
IssueSwitchJumpTable(
Tcl_Interp *interp, /* Context for compiling script bodies. */
CompileEnv *envPtr, /* Holds resulting instructions. */
ExtCmdLoc *mapPtr, /* For mapping tokens to their source code
* location. */
int eclIndex,
int valueIndex, /* The value to match against. */
Tcl_Token *valueTokenPtr,
int numBodyTokens, /* Number of tokens describing things the
* switch can match against and bodies to
* execute when the match succeeds. */
@@ -1618,19 +1591,11 @@ IssueSwitchJumpTable(
int **bodyContLines) /* Array of continuation line info. */
{
JumptableInfo *jtPtr;
int savedStackDepth = envPtr->currStackDepth;
int infoIndex, isNew, *finalFixups, numRealBodies = 0, jumpLocation;
int mustGenerate, foundDefault, jumpToDefault, i;
Tcl_DString buffer;
Tcl_HashEntry *hPtr;
/*
* First, we push the value we're matching against on the stack.
*/
SetLineInformation(valueIndex);
CompileTokens(envPtr, valueTokenPtr, interp);
/*
* Compile the switch by using a jump table, which is basically a
* hashtable that maps from literal values to match against to the offset
@@ -1731,7 +1696,6 @@ IssueSwitchJumpTable(
* Compile the body of the arm.
*/
envPtr->currStackDepth = savedStackDepth;
envPtr->line = bodyLines[i+1]; /* TIP #280 */
envPtr->clNext = bodyContLines[i+1]; /* TIP #280 */
TclCompileCmdWord(interp, bodyToken[i+1], 1, envPtr);
@@ -1753,6 +1717,7 @@ IssueSwitchJumpTable(
*/
OP4( JUMP4, 0);
TclAdjustStackDepth(-1, envPtr);
}
}
@@ -1763,7 +1728,6 @@ IssueSwitchJumpTable(
*/
if (!foundDefault) {
envPtr->currStackDepth = savedStackDepth;
TclStoreInt4AtPtr(CurrentOffset(envPtr)-jumpToDefault,
envPtr->codeStart+jumpToDefault+1);
PUSH("");
@@ -1784,7 +1748,6 @@ IssueSwitchJumpTable(
*/
TclStackFree(interp, finalFixups);
envPtr->currStackDepth = savedStackDepth + 1;
}
/*
@@ -1942,9 +1905,9 @@ TclCompileThrowCmd(
{
DefineLineInformation; /* TIP #280 */
int numWords = parsePtr->numWords;
int savedStackDepth = envPtr->currStackDepth;
Tcl_Token *codeToken, *msgToken;
Tcl_Obj *objPtr;
int codeKnown, codeIsList, codeIsValid, len;
if (numWords != 3) {
return TCL_ERROR;
@@ -1954,77 +1917,66 @@ TclCompileThrowCmd(
TclNewObj(objPtr);
Tcl_IncrRefCount(objPtr);
if (TclWordKnownAtCompileTime(codeToken, objPtr)) {
codeKnown = TclWordKnownAtCompileTime(codeToken, objPtr);
/*
* First we must emit the code to substitute the arguments. This
* must come first in case substitution raises errors.
*/
if (!codeKnown) {
CompileWord(envPtr, codeToken, interp, 1);
PUSH( "-errorcode");
}
CompileWord(envPtr, msgToken, interp, 2);
codeIsList = codeKnown && (TCL_OK ==
Tcl_ListObjLength(interp, objPtr, &len));
codeIsValid = codeIsList && (len != 0);
if (codeIsValid) {
Tcl_Obj *errPtr, *dictPtr;
const char *string;
int len;
/*
* The code is known at compilation time. This allows us to issue a
* very efficient sequence of instructions.
*/
if (Tcl_ListObjLength(interp, objPtr, &len) != TCL_OK) {
/*
* Must still do this; might generate an error when getting this
* "ignored" value prepared as an argument.
*/
CompileWord(envPtr, msgToken, interp, 2);
TclCompileSyntaxError(interp, envPtr);
Tcl_DecrRefCount(objPtr);
envPtr->currStackDepth = savedStackDepth + 1;
return TCL_OK;
}
if (len == 0) {
/*
* Must still do this; might generate an error when getting this
* "ignored" value prepared as an argument.
*/
CompileWord(envPtr, msgToken, interp, 2);
goto issueErrorForEmptyCode;
}
TclNewLiteralStringObj(errPtr, "-errorcode");
TclNewObj(dictPtr);
Tcl_DictObjPut(NULL, dictPtr, errPtr, objPtr);
Tcl_IncrRefCount(dictPtr);
string = Tcl_GetStringFromObj(dictPtr, &len);
CompileWord(envPtr, msgToken, interp, 2);
PushLiteral(envPtr, string, len);
TclDecrRefCount(dictPtr);
OP44( RETURN_IMM, 1, 0);
envPtr->currStackDepth = savedStackDepth + 1;
} else {
/*
* When the code token is not known at compilation time, we need to do
* a little bit more work. The main tricky bit here is that the error
* code has to be a list (a [throw] restriction) so we must emit extra
* instructions to enforce that condition.
*/
CompileWord(envPtr, codeToken, interp, 1);
PUSH( "-errorcode");
CompileWord(envPtr, msgToken, interp, 2);
OP4( REVERSE, 3);
OP( DUP);
OP( LIST_LENGTH);
OP1( JUMP_FALSE1, 16);
OP4( LIST, 2);
OP44( RETURN_IMM, 1, 0);
/*
* Generate an error for being an empty list. Can't leverage anything
* else to do this for us.
*/
issueErrorForEmptyCode:
PUSH( "type must be non-empty list");
PUSH( "");
OP44( RETURN_IMM, 1, 0);
TclEmitPush(TclAddLiteralObj(envPtr, dictPtr, NULL), envPtr);
}
envPtr->currStackDepth = savedStackDepth + 1;
TclDecrRefCount(objPtr);
/*
* Simpler bytecodes when we detect invalid arguments at compile time.
*/
if (codeKnown && !codeIsValid) {
OP( POP);
if (codeIsList) {
/* Must be an empty list */
goto issueErrorForEmptyCode;
}
TclCompileSyntaxError(interp, envPtr);
return TCL_OK;
}
if (!codeKnown) {
/*
* Argument validity checking has to be done by bytecode at
* run time.
*/
OP4( REVERSE, 3);
OP( DUP);
OP( LIST_LENGTH);
OP1( JUMP_FALSE1, 16);
OP4( LIST, 2);
OP44( RETURN_IMM, 1, 0);
TclAdjustStackDepth(2, envPtr);
OP( POP);
OP( POP);
OP( POP);
issueErrorForEmptyCode:
PUSH( "type must be non-empty list");
PUSH( "-errorcode {TCL OPERATION THROW BADEXCEPTION}");
}
OP44( RETURN_IMM, 1, 0);
return TCL_OK;
}
@@ -2074,8 +2026,7 @@ TclCompileTryCmd(
*/
DefineLineInformation; /* TIP #280 */
SetLineInformation(1);
CompileBody(envPtr, bodyToken, interp);
BODY(bodyToken, 1);
return TCL_OK;
}
@@ -2703,15 +2654,13 @@ IssueTryClausesFinallyInstructions(
/* Skip POP at end; can clean up with subsequent POP */
if (i+1 < numHandlers) {
OP( POP);
} else {
TclAdjustStackDepth(-1, envPtr);
}
endOfThisArm:
if (i+1 < numHandlers) {
JUMP4( JUMP, addrsToFix[i]);
TclAdjustStackDepth(1, envPtr);
}
TclAdjustStackDepth(1, envPtr);
if (matchClauses[i]) {
FIXJUMP4( notECJumpSource);
}
@@ -2965,7 +2914,6 @@ TclCompileWhileCmd(
Tcl_Token *testTokenPtr, *bodyTokenPtr;
JumpFixup jumpEvalCondFixup;
int testCodeOffset, bodyCodeOffset, jumpDist, range, code, boolVal;
int savedStackDepth = envPtr->currStackDepth;
int loopMayEnd = 1; /* This is set to 0 if it is recognized as an
* infinite loop. */
Tcl_Obj *boolObj;
@@ -3057,15 +3005,13 @@ TclCompileWhileCmd(
* Compile the loop body.
*/
SetLineInformation(2);
bodyCodeOffset = ExceptionRangeStarts(envPtr, range);
if (!loopMayEnd) {
envPtr->exceptArrayPtr[range].continueOffset = testCodeOffset;
envPtr->exceptArrayPtr[range].codeOffset = bodyCodeOffset;
}
CompileBody(envPtr, bodyTokenPtr, interp);
BODY(bodyTokenPtr, 2);
ExceptionRangeEnds(envPtr, range);
envPtr->currStackDepth = savedStackDepth + 1;
OP( POP);
/*
@@ -3080,10 +3026,8 @@ TclCompileWhileCmd(
bodyCodeOffset += 3;
testCodeOffset += 3;
}
envPtr->currStackDepth = savedStackDepth;
SetLineInformation(1);
TclCompileExprWords(interp, testTokenPtr, 1, envPtr);
envPtr->currStackDepth = savedStackDepth + 1;
jumpDist = CurrentOffset(envPtr) - bodyCodeOffset;
if (jumpDist > 127) {
@@ -3114,7 +3058,6 @@ TclCompileWhileCmd(
*/
pushResult:
envPtr->currStackDepth = savedStackDepth;
PUSH("");
return TCL_OK;
}
+2 -2
View File
@@ -2401,6 +2401,7 @@ CompileExprTree(
(nodePtr->lexeme == AND) ? "1" : "0", 1), envPtr);
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
&jumpPtr->next->next->jump);
TclAdjustStackDepth(-1, envPtr);
TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->jump, 127);
if (TclFixupForwardJumpToHere(envPtr, &jumpPtr->jump, 127)) {
jumpPtr->next->next->jump.codeOffset += 3;
@@ -2485,8 +2486,7 @@ CompileExprTree(
break;
}
case OT_TOKENS:
TclCompileTokens(interp, tokenPtr+1, tokenPtr->numComponents,
envPtr);
CompileTokens(envPtr, tokenPtr, interp);
tokenPtr += tokenPtr->numComponents + 1;
break;
default:
+22 -23
View File
@@ -1232,7 +1232,12 @@ CompileSubstObj(
codePtr->localCachePtr = iPtr->varFramePtr->localCachePtr;
codePtr->localCachePtr->refCount++;
}
/* TODO: Debug printing? */
#ifdef TCL_COMPILE_DEBUG
if (tclTraceCompile >= 2) {
TclPrintByteCodeObj(interp, objPtr);
fflush(stdout);
}
#endif /* TCL_COMPILE_DEBUG */
}
return codePtr;
}
@@ -1757,7 +1762,7 @@ TclCompileScript(
/* TIP #280 */
ExtCmdLoc *eclPtr = envPtr->extCmdMapPtr;
int *wlines, wlineat, cmdLine, *clNext;
Tcl_Parse *parsePtr = TclStackAlloc(interp, sizeof(Tcl_Parse));
Tcl_Parse parse, *parsePtr = &parse;
if (envPtr->iPtr == NULL) {
Tcl_Panic("TclCompileScript() called on uninitialized CompileEnv");
@@ -1931,8 +1936,7 @@ TclCompileScript(
* The word is not a simple string of characters.
*/
TclCompileTokens(interp, tokenPtr+1,
tokenPtr->numComponents, envPtr);
CompileTokens(envPtr, tokenPtr, interp);
if (expand && tokenPtr->type == TCL_TOKEN_EXPAND_WORD) {
TclEmitInstInt4(INST_EXPAND_STKTOP,
envPtr->currStackDepth, envPtr);
@@ -2004,8 +2008,7 @@ TclCompileScript(
#ifdef TCL_COMPILE_DEBUG
int diff = envPtr->currStackDepth-startStackDepth;
if (diff != 1 && (diff != 0 ||
*(envPtr->codeNext-1) != INST_DONE)) {
if (diff != 1) {
Tcl_Panic("bad stack adjustment when compiling"
" %.*s (was %d instead of 1)",
parsePtr->tokenPtr->size,
@@ -2095,6 +2098,7 @@ TclCompileScript(
* Emit an invoke instruction for the command. We skip this if a
* compile procedure was found for the command.
*/
assert(wordIdx > 0);
if (expand) {
/*
@@ -2116,7 +2120,7 @@ TclCompileScript(
TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr);
envPtr->expandCount--;
TclAdjustStackDepth(1 - wordIdx, envPtr);
} else if (wordIdx > 0) {
} else {
/*
* Save PC -> command map for the TclArgumentBC* functions.
*/
@@ -2186,11 +2190,8 @@ TclCompileScript(
*/
if (envPtr->codeNext == entryCodeNext) {
TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr);
PushStringLiteral(envPtr, "");
}
envPtr->numSrcBytes = p - script;
TclStackFree(interp, parsePtr);
}
/*
@@ -2254,7 +2255,7 @@ TclCompileVarSubst(
localVar = TclFindCompiledLocal(name, nameBytes, localVarName, envPtr);
}
if (localVar < 0) {
TclEmitPush(TclRegisterNewLiteral(envPtr, name, nameBytes), envPtr);
PushLiteral(envPtr, name, nameBytes);
}
/*
@@ -2462,7 +2463,7 @@ TclCompileTokens(
*/
if (envPtr->codeNext == entryCodeNext) {
TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr);
PushStringLiteral(envPtr, "");
}
Tcl_DStringFree(&textBuffer);
@@ -2577,9 +2578,9 @@ TclCompileExprWords(
wordPtr = tokenPtr;
for (i = 0; i < numWords; i++) {
TclCompileTokens(interp, wordPtr+1, wordPtr->numComponents, envPtr);
CompileTokens(envPtr, wordPtr, interp);
if (i < (numWords - 1)) {
TclEmitPush(TclRegisterNewLiteral(envPtr, " ", 1), envPtr);
PushStringLiteral(envPtr, " ");
}
wordPtr += wordPtr->numComponents + 1;
}
@@ -2623,21 +2624,17 @@ TclCompileNoOp(
{
Tcl_Token *tokenPtr;
int i;
int savedStackDepth = envPtr->currStackDepth;
tokenPtr = parsePtr->tokenPtr;
for (i = 1; i < parsePtr->numWords; i++) {
tokenPtr = tokenPtr + tokenPtr->numComponents + 1;
envPtr->currStackDepth = savedStackDepth;
if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) {
TclCompileTokens(interp, tokenPtr+1, tokenPtr->numComponents,
envPtr);
CompileTokens(envPtr, tokenPtr, interp);
TclEmitOpcode(INST_POP, envPtr);
}
}
envPtr->currStackDepth = savedStackDepth;
TclEmitPush(TclRegisterNewLiteral(envPtr, "", 0), envPtr);
PushStringLiteral(envPtr, "");
return TCL_OK;
}
@@ -3434,6 +3431,7 @@ TclCleanupStackForBreakContinue(
CompileEnv *envPtr,
ExceptionAux *auxPtr)
{
int savedStackDepth = envPtr->currStackDepth;
int toPop = envPtr->expandCount - auxPtr->expandTarget;
if (toPop > 0) {
@@ -3441,20 +3439,21 @@ TclCleanupStackForBreakContinue(
TclEmitOpcode(INST_EXPAND_DROP, envPtr);
toPop--;
}
TclAdjustStackDepth(auxPtr->expandTargetDepth - envPtr->currStackDepth,
envPtr);
toPop = auxPtr->expandTargetDepth - auxPtr->stackDepth;
while (toPop > 0) {
TclEmitOpcode(INST_POP, envPtr);
TclAdjustStackDepth(1, envPtr);
toPop--;
}
} else {
toPop = envPtr->currStackDepth - auxPtr->stackDepth;
while (toPop > 0) {
TclEmitOpcode(INST_POP, envPtr);
TclAdjustStackDepth(1, envPtr);
toPop--;
}
}
envPtr->currStackDepth = savedStackDepth;
}
/*
+62 -51
View File
@@ -26,14 +26,15 @@
#define ASSOC_KEY "tclPackageAboutDict"
/*
* A ClientData struct for the QueryConfig command. Store the two bits
* A ClientData struct for the QueryConfig command. Store the three bits
* of data we need; the package name for which we store a config dict,
* and the (Tcl_Interp *) in which it is stored.
* the (Tcl_Interp *) in which it is stored, and the encoding.
*/
typedef struct QCCD {
Tcl_Obj *pkg;
Tcl_Interp *interp;
char *encoding;
} QCCD;
/*
@@ -75,22 +76,28 @@ Tcl_RegisterConfig(
const char *valEncoding) /* Name of the encoding used to store the
* configuration values, ASCII, thus UTF-8. */
{
Tcl_Obj *pDB, *pkgDict;
Tcl_DString cmdName;
const Tcl_Config *cfg;
Tcl_Encoding venc = Tcl_GetEncoding(NULL, valEncoding);
QCCD *cdPtr = ckalloc(sizeof(QCCD));
cdPtr->interp = interp;
if (valEncoding) {
cdPtr->encoding = ckalloc(strlen(valEncoding)+1);
strcpy(cdPtr->encoding, valEncoding);
} else {
cdPtr->encoding = NULL;
}
cdPtr->pkg = Tcl_NewStringObj(pkgName, -1);
/*
* Phase I: Adding the provided information to the internal database of
* package meta data. Only if we have an ok encoding.
* package meta data.
*
* Phase II: Create a command for querying this database, specific to the
* package registerting its configuration. This is the approved interface
* package registering its configuration. This is the approved interface
* in TIP 59. In the future a more general interface should be done, as
* followup to TIP 59. Simply because our database is now general across
* follow-up to TIP 59. Simply because our database is now general across
* packages, and not a structure tied to one package.
*
* Note, the created command will have a reference through its clientdata.
@@ -103,52 +110,36 @@ Tcl_RegisterConfig(
* dictionaries visible at Tcl level. I.e. they are not filled
*/
if (venc != NULL) {
Tcl_Obj *pkgDict, *pDB = GetConfigDict(interp);
pDB = GetConfigDict(interp);
/*
* Retrieve package specific configuration...
*/
/*
* Retrieve package specific configuration...
*/
if (Tcl_DictObjGet(interp, pDB, cdPtr->pkg, &pkgDict) != TCL_OK
|| (pkgDict == NULL)) {
pkgDict = Tcl_NewDictObj();
} else if (Tcl_IsShared(pkgDict)) {
pkgDict = Tcl_DuplicateObj(pkgDict);
}
/*
* Extend the package configuration...
*/
for (cfg=configuration ; cfg->key!=NULL && cfg->key[0]!='\0' ; cfg++) {
Tcl_DString conv;
const char *convValue =
Tcl_ExternalToUtfDString(venc, cfg->value, -1, &conv);
/*
* We know that the keys are in ASCII/UTF-8, so for them is no
* conversion required.
*/
Tcl_DictObjPut(interp, pkgDict, Tcl_NewStringObj(cfg->key, -1),
Tcl_NewStringObj(convValue, -1));
Tcl_DStringFree(&conv);
}
/*
* We're now done with the encoding, so drop it.
*/
Tcl_FreeEncoding(venc);
/*
* Write the changes back into the overall database.
*/
Tcl_DictObjPut(interp, pDB, cdPtr->pkg, pkgDict);
if (Tcl_DictObjGet(interp, pDB, cdPtr->pkg, &pkgDict) != TCL_OK
|| (pkgDict == NULL)) {
pkgDict = Tcl_NewDictObj();
} else if (Tcl_IsShared(pkgDict)) {
pkgDict = Tcl_DuplicateObj(pkgDict);
}
/*
* Extend the package configuration...
* We cannot assume that the encodings are initialized, therefore
* store the value as-is in a byte array. See Bug [9b2e636361].
*/
for (cfg=configuration ; cfg->key!=NULL && cfg->key[0]!='\0' ; cfg++) {
Tcl_DictObjPut(interp, pkgDict, Tcl_NewStringObj(cfg->key, -1),
Tcl_NewByteArrayObj((unsigned char *)cfg->value, strlen(cfg->value)));
}
/*
* Write the changes back into the overall database.
*/
Tcl_DictObjPut(interp, pDB, cdPtr->pkg, pkgDict);
/*
* Now create the interface command for retrieval of the package
* information.
@@ -218,6 +209,9 @@ QueryConfigObjCmd(
enum subcmds {
CFG_GET, CFG_LIST
};
Tcl_DString conv;
Tcl_Encoding venc = NULL;
const char *value;
if ((objc < 2) || (objc > 3)) {
Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg?");
@@ -257,7 +251,21 @@ QueryConfigObjCmd(
return TCL_ERROR;
}
Tcl_SetObjResult(interp, val);
if (cdPtr->encoding) {
venc = Tcl_GetEncoding(interp, cdPtr->encoding);
if (!venc) {
return TCL_ERROR;
}
}
/*
* Value is stored as-is in a byte array, see Bug [9b2e636361],
* so we have to decode it first.
*/
value = (const char *) Tcl_GetByteArrayFromObj(val, &n);
value = Tcl_ExternalToUtfDString(venc, value, n, &conv);
Tcl_SetObjResult(interp, Tcl_NewStringObj(value,
Tcl_DStringLength(&conv)));
Tcl_DStringFree(&conv);
return TCL_OK;
case CFG_LIST:
@@ -324,7 +332,10 @@ QueryConfigDelete(
Tcl_DictObjRemove(NULL, pDB, pkgName);
Tcl_DecrRefCount(pkgName);
ckfree(cdPtr);
if (cdPtr->encoding) {
ckfree((char *)cdPtr->encoding);
}
ckfree((char *)cdPtr);
}
/*
@@ -366,7 +377,7 @@ GetConfigDict(
*
* This function is associated with the "Package About dict" assoc data
* for an interpreter; it is invoked when the interpreter is deleted in
* order to free the information assoicated with any pending error
* order to free the information associated with any pending error
* reports.
*
* Results:
+1 -1
View File
@@ -2686,7 +2686,7 @@ TclDatelex(
location->first_column = yyInput - info->dateStart;
for ( ; ; ) {
while (isspace(UCHAR(*yyInput))) {
while (TclIsSpaceProc(*yyInput)) {
yyInput++;
}
+19 -16
View File
@@ -88,16 +88,6 @@ const Tcl_ObjType tclEnsembleCmdType = {
NULL /* setFromAnyProc */
};
/*
* Copied from tclCompCmds.c
*/
#define DefineLineInformation \
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
int eclIndex = mapPtr->nuloc - 1
#define SetLineInformation(word) \
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
static inline Tcl_Obj *
NewNsObj(
@@ -3059,6 +3049,7 @@ CompileToCompiledCommand(
int savedNumCmds = envPtr->numCommands;
int savedStackDepth = envPtr->currStackDepth;
unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart;
DefineLineInformation;
if (cmdPtr->compileProc == NULL) {
return TCL_ERROR;
@@ -3106,12 +3097,27 @@ CompileToCompiledCommand(
tokenPtr = TokenAfter(tokenPtr);
}
/*
* Shift the line information arrays to account for different word
* index values.
*/
mapPtr->loc[eclIndex].line += (depth - 1);
mapPtr->loc[eclIndex].next += (depth - 1);
/*
* Hand off compilation to the subcommand compiler. At last!
*/
result = cmdPtr->compileProc(interp, &synthetic, cmdPtr, envPtr);
/*
* Undo the shift.
*/
mapPtr->loc[eclIndex].line -= (depth - 1);
mapPtr->loc[eclIndex].next -= (depth - 1);
/*
* If our target fails to compile, revert the number of commands and the
* pointer to the place to issue the next instruction. [Bug 3600328]
@@ -3162,6 +3168,7 @@ CompileToInvokedCommand(
bytes = Tcl_GetStringFromObj(words[i-1], &length);
PushLiteral(envPtr, bytes, length);
} else if (tokPtr->type == TCL_TOKEN_SIMPLE_WORD) {
/* TODO: Check about registering Cmd Literals here */
int literal = TclRegisterNewLiteral(envPtr,
tokPtr[1].start, tokPtr[1].size);
@@ -3173,9 +3180,7 @@ CompileToInvokedCommand(
}
TclEmitPush(literal, envPtr);
} else {
if (envPtr->clNext) {
SetLineInformation(i);
}
SetLineInformation(i);
CompileTokens(envPtr, tokPtr, interp);
}
tokPtr = TokenAfter(tokPtr);
@@ -3249,12 +3254,10 @@ CompileBasicNArgCommand(
tokenPtr = TokenAfter(parsePtr->tokenPtr);
for (i=1 ; i<parsePtr->numWords ; i++) {
if (envPtr->clNext) {
SetLineInformation(i);
}
if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) {
PushLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size);
} else {
SetLineInformation(i);
CompileTokens(envPtr, tokenPtr, interp);
}
tokenPtr = TokenAfter(tokenPtr);
+2 -7
View File
@@ -1030,14 +1030,8 @@ TclInitSubsystems(void)
TclpInitLock();
if (subsystemsInitialized == 0) {
/*
* Have to set this bit here to avoid deadlock with the routines
* below us that call into TclInitSubsystems.
*/
subsystemsInitialized = 1;
/*
/*
* Initialize locks used by the memory allocators before anything
* interesting happens so we can use the allocators in the
* implementation of self-initializing locks.
@@ -1061,6 +1055,7 @@ TclInitSubsystems(void)
TclInitEncodingSubsystem(); /* Process wide encoding init. */
TclpSetInterfaces();
TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */
subsystemsInitialized = 1;
}
TclpInitUnlock();
}
+33 -21
View File
@@ -202,6 +202,9 @@ typedef struct TEBCdata {
#define PUSH_TAUX_OBJ(objPtr) \
do { \
if (auxObjList) { \
objPtr->length += auxObjList->length; \
} \
objPtr->internalRep.ptrAndLongRep.ptr = auxObjList; \
auxObjList = objPtr; \
} while (0)
@@ -2320,7 +2323,7 @@ TEBCresume(
goto instLoadScalar1;
} else if (inst == INST_PUSH1) {
PUSH_OBJECT(codePtr->objArrayPtr[TclGetUInt1AtPtr(pc+1)]);
TRACE_WITH_OBJ(("%u => ", TclGetInt1AtPtr(pc+1)), OBJ_AT_TOS);
TRACE_WITH_OBJ(("%u => ", TclGetUInt1AtPtr(pc+1)), OBJ_AT_TOS);
inst = *(pc += 2);
goto peepholeStart;
} else if (inst == INST_START_CMD) {
@@ -2362,7 +2365,7 @@ TEBCresume(
TRACE(("%u %u => ", code, level));
result = TclProcessReturn(interp, code, level, OBJ_AT_TOS);
if (result == TCL_OK) {
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")",
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")\n",
O2S(objResultPtr)));
NEXT_INST_F(9, 1, 0);
}
@@ -2371,6 +2374,7 @@ TEBCresume(
iPtr->flags &= ~ERR_ALREADY_LOGGED;
}
cleanup = 2;
TRACE_APPEND(("\n"));
goto processExceptionReturn;
}
@@ -2381,7 +2385,7 @@ TEBCresume(
if (result == TCL_OK) {
Tcl_DecrRefCount(OBJ_AT_TOS);
OBJ_AT_TOS = objResultPtr;
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")",
TRACE_APPEND(("continuing to next instruction (result=\"%.30s\")\n",
O2S(objResultPtr)));
NEXT_INST_F(1, 0, 0);
} else if (result == TCL_ERROR) {
@@ -2401,6 +2405,7 @@ TEBCresume(
Tcl_SetObjResult(interp, objResultPtr);
}
cleanup = 1;
TRACE_APPEND(("\n"));
goto processExceptionReturn;
case INST_YIELD: {
@@ -2715,6 +2720,7 @@ TEBCresume(
TclNewObj(objPtr);
objPtr->internalRep.ptrAndLongRep.value = CURR_DEPTH;
objPtr->length = 0;
PUSH_TAUX_OBJ(objPtr);
NEXT_INST_F(1, 0, 0);
@@ -2759,22 +2765,27 @@ TEBCresume(
* stack depth, as seen by the compiler.
*/
length = objc + (codePtr->maxStackDepth - TclGetInt4AtPtr(pc+1));
DECACHE_STACK_INFO();
moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1)
- (Tcl_Obj **) TD;
if (moved) {
/*
* Change the global data to point to the new stack: move the
* TEBCdataPtr TD, recompute the position of every other
* stack-allocated parameter, update the stack pointers.
*/
auxObjList->length += objc - 1;
if ((objc > 1) && (auxObjList->length > 0)) {
length = auxObjList->length /* Total expansion room we need */
+ codePtr->maxStackDepth /* Beyond the original max */
- CURR_DEPTH; /* Relative to where we are */
DECACHE_STACK_INFO();
moved = GrowEvaluationStack(iPtr->execEnvPtr, length, 1)
- (Tcl_Obj **) TD;
if (moved) {
/*
* Change the global data to point to the new stack: move the
* TEBCdataPtr TD, recompute the position of every other
* stack-allocated parameter, update the stack pointers.
*/
esPtr = iPtr->execEnvPtr->execStackPtr;
TD = (TEBCdata *) (((Tcl_Obj **)TD) + moved);
esPtr = iPtr->execEnvPtr->execStackPtr;
TD = (TEBCdata *) (((Tcl_Obj **)TD) + moved);
catchTop += moved;
tosPtr += moved;
catchTop += moved;
tosPtr += moved;
}
}
/*
@@ -3662,7 +3673,7 @@ TEBCresume(
arrayPtr = NULL;
part1Ptr = part2Ptr = NULL;
cleanup = 0;
TRACE(("%u %ld => ", opnd, increment));
TRACE(("%u %s => ", opnd, Tcl_GetString(incrPtr)));
doIncrVar:
if (TclIsVarDirectModifyable2(varPtr, arrayPtr)) {
@@ -4227,7 +4238,7 @@ TEBCresume(
} else {
TRACE(("%d => %.20s false, new pc %u\n", jmpOffset[0],
O2S(valuePtr),
(unsigned)(pc + jmpOffset[1] - codePtr->codeStart)));
(unsigned)(pc + jmpOffset[0] - codePtr->codeStart)));
}
}
#endif
@@ -6610,7 +6621,7 @@ TEBCresume(
}
#endif
TRACE_APPEND(("\"%.30s\" \"%.30s\" %d",
TRACE_APPEND(("\"%.30s\" \"%.30s\" %d\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), done));
objResultPtr = TCONST(done);
/* TODO: consider opt like INST_FOREACH_STEP4 */
@@ -6624,7 +6635,7 @@ TEBCresume(
while (TclIsVarLink(varPtr)) {
varPtr = varPtr->value.linkPtr;
}
TRACE(("%u => ", opnd));
TRACE(("%u => \n", opnd));
if (TclIsVarDirectReadable(varPtr)) {
dictPtr = varPtr->value.objPtr;
} else {
@@ -6753,6 +6764,7 @@ TEBCresume(
O2S(dictPtr), O2S(listPtr)), Tcl_GetObjResult(interp));
goto gotError;
}
TRACE((" => "));
TRACE_APPEND(("%.30s\n", O2S(objResultPtr)));
NEXT_INST_F(1, 2, 1);
+2 -2
View File
@@ -139,7 +139,7 @@ int
TclCreateSocketAddress(
Tcl_Interp *interp, /* Interpreter for querying
* the desired socket family */
struct addrinfo **addrlist, /* Socket address list */
void **addrlist, /* Socket address list */
const char *host, /* Host. NULL implies INADDR_ANY */
int port, /* Port number */
int willBind, /* Is this an address to bind() to or
@@ -213,7 +213,7 @@ TclCreateSocketAddress(
hints.ai_flags |= AI_PASSIVE;
}
result = getaddrinfo(native, portstring, &hints, addrlist);
result = getaddrinfo(native, portstring, &hints, (struct addrinfo **) addrlist);
if (host != NULL) {
Tcl_DStringFree(&ds);
+7 -5
View File
@@ -30,8 +30,7 @@
* here, so that system-dependent personalizations for the include files only
* have to be made in once place. This results in a few extra includes, but
* greater modularity. The order of the three groups of #includes is
* important. For example, stdio.h is needed by tcl.h, and the _ANSI_ARGS_
* declaration in tcl.h is needed by stdlib.h in some configurations.
* important. For example, stdio.h is needed by tcl.h.
*/
#include "tclPort.h"
@@ -119,6 +118,10 @@ typedef int ptrdiff_t;
# endif
#endif
#if defined(_WIN32) && defined(_MSC_VER)
# define vsnprintf _vsnprintf
#endif
/*
* The following procedures allow namespaces to be customized to support
* special name resolution rules for commands/variables.
@@ -3007,9 +3010,8 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
MODULE_SCOPE void TclpFinalizePipes(void);
MODULE_SCOPE void TclpFinalizeSockets(void);
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
struct addrinfo **addrlist,
const char *host, int port, int willBind,
const char **errorMsgPtr);
void **addrlist, const char *host, int port,
int willBind, const char **errorMsgPtr);
MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
Tcl_ThreadCreateProc *proc, ClientData clientData,
int stackSize, int flags);
+2
View File
@@ -545,6 +545,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
#undef TclpGmtime_unix
#undef TclWinConvertWSAError
#define TclWinConvertWSAError TclWinConvertError
#undef TclpInetNtoa
#define TclpInetNtoa inet_ntoa
#if defined(__WIN32__) || defined(__CYGWIN__)
# undef TclWinNToHS
+3 -1
View File
@@ -313,6 +313,9 @@ Tcl_MainEx(
Tcl_Channel chan;
InteractiveState is;
TclpSetInitialEncodings();
TclpFindExecutable((const char *)argv[0]);
Tcl_InitMemory(interp);
is.interp = interp;
@@ -640,7 +643,6 @@ Tcl_Main(
* function to call after most initialization
* but before starting to execute commands. */
{
Tcl_FindExecutable(argv[0]);
Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp());
}
#endif /* TCL_MAJOR_VERSION == 8 && !UNICODE */
+3 -3
View File
@@ -86,6 +86,7 @@ LocateTargetAddresses(
case INST_JUMP4:
case INST_JUMP_TRUE4:
case INST_JUMP_FALSE4:
case INST_START_CMD:
targetInstPtr = currentInstPtr+TclGetInt4AtPtr(currentInstPtr+1);
goto storeTarget;
case INST_BEGIN_CATCH4:
@@ -109,8 +110,6 @@ LocateTargetAddresses(
DefineTargetAddress(tablePtr, currentInstPtr + 2*i - 1);
}
break;
case INST_START_CMD:
assert (envPtr->atCmdStart < 2);
}
}
@@ -213,7 +212,8 @@ ConvertZeroEffectToNOP(
int blank = 0, i, nextInst;
size = AddrLength(currentInstPtr);
while (*(currentInstPtr+size) == INST_NOP) {
while ((currentInstPtr + size < envPtr->codeNext)
&& *(currentInstPtr+size) == INST_NOP) {
if (IsTargetAddress(&targets, currentInstPtr + size)) {
break;
}
+4
View File
@@ -52,6 +52,10 @@ Tcl_SetPanicProc(
#if defined(_WIN32)
/* tclWinDebugPanic only installs if there is no panicProc yet. */
if ((proc != tclWinDebugPanic) || (panicProc == NULL))
#elif defined(__CYGWIN__)
if (proc == NULL)
panicProc = tclWinDebugPanic;
else
#endif
panicProc = proc;
}
+2
View File
@@ -1112,6 +1112,7 @@ Tcl_SetObjErrorCode(
*----------------------------------------------------------------------
*/
#undef Tcl_GetErrorLine
int
Tcl_GetErrorLine(
Tcl_Interp *interp)
@@ -1129,6 +1130,7 @@ Tcl_GetErrorLine(
*----------------------------------------------------------------------
*/
#undef Tcl_SetErrorLine
void
Tcl_SetErrorLine(
Tcl_Interp *interp,
+1
View File
@@ -43,6 +43,7 @@
#undef TclSockMinimumBuffers
#define TclBackgroundException Tcl_BackgroundException
#undef Tcl_SetIntObj
#undef TclpInetNtoa
/* See bug 510001: TclSockMinimumBuffers needs plat imp */
#ifdef _WIN64
+58
View File
@@ -0,0 +1,58 @@
/*
* tclStubLibTbl.c --
*
* Stub object that will be statically linked into extensions that want
* to access Tcl.
*
* Copyright (c) 1998-1999 by Scriptics Corporation.
* Copyright (c) 1998 Paul Duffin.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#include "tclInt.h"
/*
*----------------------------------------------------------------------
*
* TclInitStubTable --
*
* Initialize the stub table, using the structure pointed at
* by the "version" argument.
*
* Results:
* Outputs the value of the "version" argument.
*
* Side effects:
* Sets the stub table pointers.
*
*----------------------------------------------------------------------
*/
MODULE_SCOPE const char *
TclInitStubTable(
const char *version) /* points to the version field of a
TclStubInfoType structure variable. */
{
tclStubsPtr = ((const TclStubInfoType *) version)->stubs;
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
} else {
tclPlatStubsPtr = NULL;
tclIntStubsPtr = NULL;
tclIntPlatStubsPtr = NULL;
}
return version;
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
* fill-column: 78
* End:
*/
+1 -1
View File
@@ -1856,7 +1856,7 @@ TestdstringCmd(
if (Tcl_GetInt(interp, argv[2], &count) != TCL_OK) {
return TCL_ERROR;
}
Tcl_DStringTrunc(&dstring, count);
Tcl_DStringSetLength(&dstring, count);
} else if (strcmp(argv[1], "start") == 0) {
if (argc != 2) {
goto wrongNumArgs;
+9 -9
View File
@@ -337,7 +337,7 @@ ThreadObjCmd(
*/
if (objc == 2) {
idObj = Tcl_NewLongObj((long)(size_t)Tcl_GetCurrentThread());
idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)Tcl_GetCurrentThread());
} else if (objc == 3
&& strcmp("-main", Tcl_GetString(objv[2])) == 0) {
Tcl_MutexLock(&threadMutex);
@@ -355,14 +355,14 @@ ThreadObjCmd(
return TCL_ERROR;
}
case THREAD_JOIN: {
long id;
Tcl_WideInt id;
int result, status;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "id");
return TCL_ERROR;
}
if (Tcl_GetLongFromObj(interp, objv[2], &id) != TCL_OK) {
if (Tcl_GetWideIntFromObj(interp, objv[2], &id) != TCL_OK) {
return TCL_ERROR;
}
@@ -372,7 +372,7 @@ ThreadObjCmd(
} else {
char buf[20];
TclFormatInt(buf, id);
sprintf(buf, "%" TCL_LL_MODIFIER "d", id);
Tcl_AppendResult(interp, "cannot join thread ", buf, NULL);
}
return result;
@@ -384,7 +384,7 @@ ThreadObjCmd(
}
return ThreadList(interp);
case THREAD_SEND: {
long id;
Tcl_WideInt id;
const char *script;
int wait, arg;
@@ -403,7 +403,7 @@ ThreadObjCmd(
wait = 1;
arg = 2;
}
if (Tcl_GetLongFromObj(interp, objv[arg], &id) != TCL_OK) {
if (Tcl_GetWideIntFromObj(interp, objv[arg], &id) != TCL_OK) {
return TCL_ERROR;
}
arg++;
@@ -523,7 +523,7 @@ ThreadCreate(
Tcl_ConditionWait(&ctrl.condWait, &threadMutex, NULL);
Tcl_MutexUnlock(&threadMutex);
Tcl_ConditionFinalize(&ctrl.condWait);
Tcl_SetObjResult(interp, Tcl_NewLongObj((long)(size_t)id));
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)(size_t)id));
return TCL_OK;
}
@@ -655,7 +655,7 @@ ThreadErrorProc(
char *script;
char buf[TCL_DOUBLE_SPACE+1];
TclFormatInt(buf, (size_t) Tcl_GetCurrentThread());
sprintf(buf, "%" TCL_LL_MODIFIER "d", (Tcl_WideInt)(size_t)Tcl_GetCurrentThread());
errorInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
if (errorProcString == NULL) {
@@ -773,7 +773,7 @@ ThreadList(
Tcl_MutexLock(&threadMutex);
for (tsdPtr = threadList ; tsdPtr ; tsdPtr = tsdPtr->nextPtr) {
Tcl_ListObjAppendElement(interp, listPtr,
Tcl_NewLongObj((long)(size_t)tsdPtr->threadId));
Tcl_NewWideIntObj((Tcl_WideInt)(size_t)tsdPtr->threadId));
}
Tcl_MutexUnlock(&threadMutex);
Tcl_SetObjResult(interp, listPtr);
+1 -1
View File
@@ -1555,7 +1555,7 @@ Tcl_UniCharIsSpace(
*/
if (((Tcl_UniChar) ch) < ((Tcl_UniChar) 0x80)) {
return isspace(UCHAR(ch)); /* INTL: ISO space */
return TclIsSpaceProc((char) ch);
} else if ((Tcl_UniChar) ch == 0x0085 || (Tcl_UniChar) ch == 0x180e
|| (Tcl_UniChar) ch == 0x200b || (Tcl_UniChar) ch == 0x2060
|| (Tcl_UniChar) ch == 0xfeff) {
+1 -1
View File
@@ -3861,7 +3861,7 @@ proc ::tcl::clock::ProcessPosixTimeZone { z } {
# Put DST in effect in all years from 1916 to 2099.
for { set y 1916 } { $y < 2099 } { incr y } {
for { set y 1916 } { $y < 2100 } { incr y } {
set startTime [DeterminePosixDSTTime $z start $y]
incr startTime [expr { - wide($stdOffset) }]
set endTime [DeterminePosixDSTTime $z end $y]
+2 -2
View File
@@ -34,8 +34,8 @@ set TZData(:Africa/Casablanca) {
{1345428000 3600 1 WEST}
{1348970400 0 0 WET}
{1367114400 3600 1 WEST}
{1373335200 0 0 WET}
{1375927200 3600 1 WEST}
{1373162400 0 0 WET}
{1376100000 3600 1 WEST}
{1380420000 0 0 WET}
{1398564000 3600 1 WEST}
{1404007200 0 0 WET}
+86 -87
View File
@@ -83,178 +83,177 @@ set TZData(:America/Asuncion) {
{1333854000 -14400 0 PYT}
{1349582400 -10800 1 PYST}
{1364094000 -14400 0 PYT}
{1365912000 -14400 0 PYT}
{1381032000 -10800 1 PYST}
{1397358000 -14400 0 PYT}
{1395543600 -14400 0 PYT}
{1412481600 -10800 1 PYST}
{1428807600 -14400 0 PYT}
{1426993200 -14400 0 PYT}
{1443931200 -10800 1 PYST}
{1460257200 -14400 0 PYT}
{1459047600 -14400 0 PYT}
{1475380800 -10800 1 PYST}
{1491706800 -14400 0 PYT}
{1490497200 -14400 0 PYT}
{1506830400 -10800 1 PYST}
{1523156400 -14400 0 PYT}
{1521946800 -14400 0 PYT}
{1538884800 -10800 1 PYST}
{1555210800 -14400 0 PYT}
{1553396400 -14400 0 PYT}
{1570334400 -10800 1 PYST}
{1586660400 -14400 0 PYT}
{1584846000 -14400 0 PYT}
{1601784000 -10800 1 PYST}
{1618110000 -14400 0 PYT}
{1616900400 -14400 0 PYT}
{1633233600 -10800 1 PYST}
{1649559600 -14400 0 PYT}
{1648350000 -14400 0 PYT}
{1664683200 -10800 1 PYST}
{1681009200 -14400 0 PYT}
{1679799600 -14400 0 PYT}
{1696132800 -10800 1 PYST}
{1713063600 -14400 0 PYT}
{1711249200 -14400 0 PYT}
{1728187200 -10800 1 PYST}
{1744513200 -14400 0 PYT}
{1742698800 -14400 0 PYT}
{1759636800 -10800 1 PYST}
{1775962800 -14400 0 PYT}
{1774148400 -14400 0 PYT}
{1791086400 -10800 1 PYST}
{1807412400 -14400 0 PYT}
{1806202800 -14400 0 PYT}
{1822536000 -10800 1 PYST}
{1838862000 -14400 0 PYT}
{1837652400 -14400 0 PYT}
{1853985600 -10800 1 PYST}
{1870311600 -14400 0 PYT}
{1869102000 -14400 0 PYT}
{1886040000 -10800 1 PYST}
{1902366000 -14400 0 PYT}
{1900551600 -14400 0 PYT}
{1917489600 -10800 1 PYST}
{1933815600 -14400 0 PYT}
{1932001200 -14400 0 PYT}
{1948939200 -10800 1 PYST}
{1965265200 -14400 0 PYT}
{1964055600 -14400 0 PYT}
{1980388800 -10800 1 PYST}
{1996714800 -14400 0 PYT}
{1995505200 -14400 0 PYT}
{2011838400 -10800 1 PYST}
{2028164400 -14400 0 PYT}
{2026954800 -14400 0 PYT}
{2043288000 -10800 1 PYST}
{2059614000 -14400 0 PYT}
{2058404400 -14400 0 PYT}
{2075342400 -10800 1 PYST}
{2091668400 -14400 0 PYT}
{2089854000 -14400 0 PYT}
{2106792000 -10800 1 PYST}
{2123118000 -14400 0 PYT}
{2121303600 -14400 0 PYT}
{2138241600 -10800 1 PYST}
{2154567600 -14400 0 PYT}
{2153358000 -14400 0 PYT}
{2169691200 -10800 1 PYST}
{2186017200 -14400 0 PYT}
{2184807600 -14400 0 PYT}
{2201140800 -10800 1 PYST}
{2217466800 -14400 0 PYT}
{2216257200 -14400 0 PYT}
{2233195200 -10800 1 PYST}
{2249521200 -14400 0 PYT}
{2247706800 -14400 0 PYT}
{2264644800 -10800 1 PYST}
{2280970800 -14400 0 PYT}
{2279156400 -14400 0 PYT}
{2296094400 -10800 1 PYST}
{2312420400 -14400 0 PYT}
{2310606000 -14400 0 PYT}
{2327544000 -10800 1 PYST}
{2343870000 -14400 0 PYT}
{2342660400 -14400 0 PYT}
{2358993600 -10800 1 PYST}
{2375319600 -14400 0 PYT}
{2374110000 -14400 0 PYT}
{2390443200 -10800 1 PYST}
{2406769200 -14400 0 PYT}
{2405559600 -14400 0 PYT}
{2422497600 -10800 1 PYST}
{2438823600 -14400 0 PYT}
{2437009200 -14400 0 PYT}
{2453947200 -10800 1 PYST}
{2470273200 -14400 0 PYT}
{2468458800 -14400 0 PYT}
{2485396800 -10800 1 PYST}
{2501722800 -14400 0 PYT}
{2500513200 -14400 0 PYT}
{2516846400 -10800 1 PYST}
{2533172400 -14400 0 PYT}
{2531962800 -14400 0 PYT}
{2548296000 -10800 1 PYST}
{2564622000 -14400 0 PYT}
{2563412400 -14400 0 PYT}
{2579745600 -10800 1 PYST}
{2596676400 -14400 0 PYT}
{2594862000 -14400 0 PYT}
{2611800000 -10800 1 PYST}
{2628126000 -14400 0 PYT}
{2626311600 -14400 0 PYT}
{2643249600 -10800 1 PYST}
{2659575600 -14400 0 PYT}
{2657761200 -14400 0 PYT}
{2674699200 -10800 1 PYST}
{2691025200 -14400 0 PYT}
{2689815600 -14400 0 PYT}
{2706148800 -10800 1 PYST}
{2722474800 -14400 0 PYT}
{2721265200 -14400 0 PYT}
{2737598400 -10800 1 PYST}
{2753924400 -14400 0 PYT}
{2752714800 -14400 0 PYT}
{2769652800 -10800 1 PYST}
{2785978800 -14400 0 PYT}
{2784164400 -14400 0 PYT}
{2801102400 -10800 1 PYST}
{2817428400 -14400 0 PYT}
{2815614000 -14400 0 PYT}
{2832552000 -10800 1 PYST}
{2848878000 -14400 0 PYT}
{2847668400 -14400 0 PYT}
{2864001600 -10800 1 PYST}
{2880327600 -14400 0 PYT}
{2879118000 -14400 0 PYT}
{2895451200 -10800 1 PYST}
{2911777200 -14400 0 PYT}
{2910567600 -14400 0 PYT}
{2926900800 -10800 1 PYST}
{2943226800 -14400 0 PYT}
{2942017200 -14400 0 PYT}
{2958955200 -10800 1 PYST}
{2975281200 -14400 0 PYT}
{2973466800 -14400 0 PYT}
{2990404800 -10800 1 PYST}
{3006730800 -14400 0 PYT}
{3004916400 -14400 0 PYT}
{3021854400 -10800 1 PYST}
{3038180400 -14400 0 PYT}
{3036970800 -14400 0 PYT}
{3053304000 -10800 1 PYST}
{3069630000 -14400 0 PYT}
{3068420400 -14400 0 PYT}
{3084753600 -10800 1 PYST}
{3101079600 -14400 0 PYT}
{3099870000 -14400 0 PYT}
{3116808000 -10800 1 PYST}
{3133134000 -14400 0 PYT}
{3131319600 -14400 0 PYT}
{3148257600 -10800 1 PYST}
{3164583600 -14400 0 PYT}
{3162769200 -14400 0 PYT}
{3179707200 -10800 1 PYST}
{3196033200 -14400 0 PYT}
{3194218800 -14400 0 PYT}
{3211156800 -10800 1 PYST}
{3227482800 -14400 0 PYT}
{3226273200 -14400 0 PYT}
{3242606400 -10800 1 PYST}
{3258932400 -14400 0 PYT}
{3257722800 -14400 0 PYT}
{3274056000 -10800 1 PYST}
{3290382000 -14400 0 PYT}
{3289172400 -14400 0 PYT}
{3306110400 -10800 1 PYST}
{3322436400 -14400 0 PYT}
{3320622000 -14400 0 PYT}
{3337560000 -10800 1 PYST}
{3353886000 -14400 0 PYT}
{3352071600 -14400 0 PYT}
{3369009600 -10800 1 PYST}
{3385335600 -14400 0 PYT}
{3384126000 -14400 0 PYT}
{3400459200 -10800 1 PYST}
{3416785200 -14400 0 PYT}
{3415575600 -14400 0 PYT}
{3431908800 -10800 1 PYST}
{3448234800 -14400 0 PYT}
{3447025200 -14400 0 PYT}
{3463358400 -10800 1 PYST}
{3480289200 -14400 0 PYT}
{3478474800 -14400 0 PYT}
{3495412800 -10800 1 PYST}
{3511738800 -14400 0 PYT}
{3509924400 -14400 0 PYT}
{3526862400 -10800 1 PYST}
{3543188400 -14400 0 PYT}
{3541374000 -14400 0 PYT}
{3558312000 -10800 1 PYST}
{3574638000 -14400 0 PYT}
{3573428400 -14400 0 PYT}
{3589761600 -10800 1 PYST}
{3606087600 -14400 0 PYT}
{3604878000 -14400 0 PYT}
{3621211200 -10800 1 PYST}
{3637537200 -14400 0 PYT}
{3636327600 -14400 0 PYT}
{3653265600 -10800 1 PYST}
{3669591600 -14400 0 PYT}
{3667777200 -14400 0 PYT}
{3684715200 -10800 1 PYST}
{3701041200 -14400 0 PYT}
{3699226800 -14400 0 PYT}
{3716164800 -10800 1 PYST}
{3732490800 -14400 0 PYT}
{3731281200 -14400 0 PYT}
{3747614400 -10800 1 PYST}
{3763940400 -14400 0 PYT}
{3762730800 -14400 0 PYT}
{3779064000 -10800 1 PYST}
{3795390000 -14400 0 PYT}
{3794180400 -14400 0 PYT}
{3810513600 -10800 1 PYST}
{3826839600 -14400 0 PYT}
{3825630000 -14400 0 PYT}
{3842568000 -10800 1 PYST}
{3858894000 -14400 0 PYT}
{3857079600 -14400 0 PYT}
{3874017600 -10800 1 PYST}
{3890343600 -14400 0 PYT}
{3888529200 -14400 0 PYT}
{3905467200 -10800 1 PYST}
{3921793200 -14400 0 PYT}
{3920583600 -14400 0 PYT}
{3936916800 -10800 1 PYST}
{3953242800 -14400 0 PYT}
{3952033200 -14400 0 PYT}
{3968366400 -10800 1 PYST}
{3984692400 -14400 0 PYT}
{3983482800 -14400 0 PYT}
{4000420800 -10800 1 PYST}
{4016746800 -14400 0 PYT}
{4014932400 -14400 0 PYT}
{4031870400 -10800 1 PYST}
{4048196400 -14400 0 PYT}
{4046382000 -14400 0 PYT}
{4063320000 -10800 1 PYST}
{4079646000 -14400 0 PYT}
{4077831600 -14400 0 PYT}
{4094769600 -10800 1 PYST}
}
+2 -7
View File
@@ -2,16 +2,11 @@
set TZData(:Antarctica/Macquarie) {
{-9223372036854775808 0 0 zzz}
{-1861920000 36000 0 EST}
{-2214259200 36000 0 EST}
{-1680508800 39600 1 EST}
{-1669892400 39600 0 EST}
{-1665392400 36000 0 EST}
{-883641600 39600 1 EST}
{-876128400 36000 0 EST}
{-860400000 39600 1 EST}
{-844678800 36000 0 EST}
{-828345600 39600 1 EST}
{-813229200 36000 0 EST}
{-1601719200 0 0 zzz}
{-94730400 36000 0 EST}
{-71136000 39600 1 EST}
{-55411200 36000 0 EST}
+183 -6
View File
@@ -88,14 +88,191 @@ set TZData(:Asia/Gaza) {
{1158872400 7200 0 EET}
{1175378400 10800 1 EEST}
{1189638000 7200 0 EET}
{1207000800 10800 1 EEST}
{1219957200 7200 0 EET}
{1206655200 10800 1 EEST}
{1219960800 7200 0 EET}
{1220220000 7200 0 EET}
{1238104800 10800 1 EEST}
{1252018800 7200 0 EET}
{1269640860 10800 1 EEST}
{1252015200 7200 0 EET}
{1262296800 7200 0 EET}
{1269640860 10800 0 EEST}
{1281474000 7200 0 EET}
{1301738460 10800 1 EEST}
{1312146000 7200 0 EET}
{1301608860 10800 1 EEST}
{1312149600 7200 0 EET}
{1325368800 7200 0 EET}
{1333058400 10800 1 EEST}
{1348178400 7200 0 EET}
{1364508000 10800 1 EEST}
{1380232800 7200 0 EET}
{1395957600 10800 1 EEST}
{1411682400 7200 0 EET}
{1427407200 10800 1 EEST}
{1443132000 7200 0 EET}
{1459461600 10800 1 EEST}
{1474581600 7200 0 EET}
{1490911200 10800 1 EEST}
{1506031200 7200 0 EET}
{1522360800 10800 1 EEST}
{1537480800 7200 0 EET}
{1553810400 10800 1 EEST}
{1569535200 7200 0 EET}
{1585260000 10800 1 EEST}
{1600984800 7200 0 EET}
{1616709600 10800 1 EEST}
{1632434400 7200 0 EET}
{1648764000 10800 1 EEST}
{1663884000 7200 0 EET}
{1680213600 10800 1 EEST}
{1695333600 7200 0 EET}
{1711663200 10800 1 EEST}
{1727388000 7200 0 EET}
{1743112800 10800 1 EEST}
{1758837600 7200 0 EET}
{1774562400 10800 1 EEST}
{1790287200 7200 0 EET}
{1806012000 10800 1 EEST}
{1821736800 7200 0 EET}
{1838066400 10800 1 EEST}
{1853186400 7200 0 EET}
{1869516000 10800 1 EEST}
{1884636000 7200 0 EET}
{1900965600 10800 1 EEST}
{1916690400 7200 0 EET}
{1932415200 10800 1 EEST}
{1948140000 7200 0 EET}
{1963864800 10800 1 EEST}
{1979589600 7200 0 EET}
{1995919200 10800 1 EEST}
{2011039200 7200 0 EET}
{2027368800 10800 1 EEST}
{2042488800 7200 0 EET}
{2058818400 10800 1 EEST}
{2073938400 7200 0 EET}
{2090268000 10800 1 EEST}
{2105992800 7200 0 EET}
{2121717600 10800 1 EEST}
{2137442400 7200 0 EET}
{2153167200 10800 1 EEST}
{2168892000 7200 0 EET}
{2185221600 10800 1 EEST}
{2200341600 7200 0 EET}
{2216671200 10800 1 EEST}
{2231791200 7200 0 EET}
{2248120800 10800 1 EEST}
{2263845600 7200 0 EET}
{2279570400 10800 1 EEST}
{2295295200 7200 0 EET}
{2311020000 10800 1 EEST}
{2326744800 7200 0 EET}
{2343074400 10800 1 EEST}
{2358194400 7200 0 EET}
{2374524000 10800 1 EEST}
{2389644000 7200 0 EET}
{2405973600 10800 1 EEST}
{2421093600 7200 0 EET}
{2437423200 10800 1 EEST}
{2453148000 7200 0 EET}
{2468872800 10800 1 EEST}
{2484597600 7200 0 EET}
{2500322400 10800 1 EEST}
{2516047200 7200 0 EET}
{2532376800 10800 1 EEST}
{2547496800 7200 0 EET}
{2563826400 10800 1 EEST}
{2578946400 7200 0 EET}
{2595276000 10800 1 EEST}
{2611000800 7200 0 EET}
{2626725600 10800 1 EEST}
{2642450400 7200 0 EET}
{2658175200 10800 1 EEST}
{2673900000 7200 0 EET}
{2689624800 10800 1 EEST}
{2705349600 7200 0 EET}
{2721679200 10800 1 EEST}
{2736799200 7200 0 EET}
{2753128800 10800 1 EEST}
{2768248800 7200 0 EET}
{2784578400 10800 1 EEST}
{2800303200 7200 0 EET}
{2816028000 10800 1 EEST}
{2831752800 7200 0 EET}
{2847477600 10800 1 EEST}
{2863202400 7200 0 EET}
{2879532000 10800 1 EEST}
{2894652000 7200 0 EET}
{2910981600 10800 1 EEST}
{2926101600 7200 0 EET}
{2942431200 10800 1 EEST}
{2957551200 7200 0 EET}
{2973880800 10800 1 EEST}
{2989605600 7200 0 EET}
{3005330400 10800 1 EEST}
{3021055200 7200 0 EET}
{3036780000 10800 1 EEST}
{3052504800 7200 0 EET}
{3068834400 10800 1 EEST}
{3083954400 7200 0 EET}
{3100284000 10800 1 EEST}
{3115404000 7200 0 EET}
{3131733600 10800 1 EEST}
{3147458400 7200 0 EET}
{3163183200 10800 1 EEST}
{3178908000 7200 0 EET}
{3194632800 10800 1 EEST}
{3210357600 7200 0 EET}
{3226687200 10800 1 EEST}
{3241807200 7200 0 EET}
{3258136800 10800 1 EEST}
{3273256800 7200 0 EET}
{3289586400 10800 1 EEST}
{3304706400 7200 0 EET}
{3321036000 10800 1 EEST}
{3336760800 7200 0 EET}
{3352485600 10800 1 EEST}
{3368210400 7200 0 EET}
{3383935200 10800 1 EEST}
{3399660000 7200 0 EET}
{3415989600 10800 1 EEST}
{3431109600 7200 0 EET}
{3447439200 10800 1 EEST}
{3462559200 7200 0 EET}
{3478888800 10800 1 EEST}
{3494613600 7200 0 EET}
{3510338400 10800 1 EEST}
{3526063200 7200 0 EET}
{3541788000 10800 1 EEST}
{3557512800 7200 0 EET}
{3573237600 10800 1 EEST}
{3588962400 7200 0 EET}
{3605292000 10800 1 EEST}
{3620412000 7200 0 EET}
{3636741600 10800 1 EEST}
{3651861600 7200 0 EET}
{3668191200 10800 1 EEST}
{3683916000 7200 0 EET}
{3699640800 10800 1 EEST}
{3715365600 7200 0 EET}
{3731090400 10800 1 EEST}
{3746815200 7200 0 EET}
{3763144800 10800 1 EEST}
{3778264800 7200 0 EET}
{3794594400 10800 1 EEST}
{3809714400 7200 0 EET}
{3826044000 10800 1 EEST}
{3841164000 7200 0 EET}
{3857493600 10800 1 EEST}
{3873218400 7200 0 EET}
{3888943200 10800 1 EEST}
{3904668000 7200 0 EET}
{3920392800 10800 1 EEST}
{3936117600 7200 0 EET}
{3952447200 10800 1 EEST}
{3967567200 7200 0 EET}
{3983896800 10800 1 EEST}
{3999016800 7200 0 EET}
{4015346400 10800 1 EEST}
{4031071200 7200 0 EET}
{4046796000 10800 1 EEST}
{4062520800 7200 0 EET}
{4078245600 10800 1 EEST}
{4093970400 7200 0 EET}
}
+179 -6
View File
@@ -88,17 +88,190 @@ set TZData(:Asia/Hebron) {
{1158872400 7200 0 EET}
{1175378400 10800 1 EEST}
{1189638000 7200 0 EET}
{1207000800 10800 1 EEST}
{1217541600 10800 1 EEST}
{1206655200 10800 1 EEST}
{1220216400 7200 0 EET}
{1238104800 10800 1 EEST}
{1252018800 7200 0 EET}
{1269640860 10800 1 EEST}
{1252015200 7200 0 EET}
{1269554400 10800 1 EEST}
{1281474000 7200 0 EET}
{1301652060 10800 1 EEST}
{1301608860 10800 1 EEST}
{1312146000 7200 0 EET}
{1314655200 10800 1 EEST}
{1317340800 7200 0 EET}
{1317330000 7200 0 EET}
{1333058400 10800 1 EEST}
{1348178400 7200 0 EET}
{1364508000 10800 1 EEST}
{1380232800 7200 0 EET}
{1395957600 10800 1 EEST}
{1411682400 7200 0 EET}
{1427407200 10800 1 EEST}
{1443132000 7200 0 EET}
{1459461600 10800 1 EEST}
{1474581600 7200 0 EET}
{1490911200 10800 1 EEST}
{1506031200 7200 0 EET}
{1522360800 10800 1 EEST}
{1537480800 7200 0 EET}
{1553810400 10800 1 EEST}
{1569535200 7200 0 EET}
{1585260000 10800 1 EEST}
{1600984800 7200 0 EET}
{1616709600 10800 1 EEST}
{1632434400 7200 0 EET}
{1648764000 10800 1 EEST}
{1663884000 7200 0 EET}
{1680213600 10800 1 EEST}
{1695333600 7200 0 EET}
{1711663200 10800 1 EEST}
{1727388000 7200 0 EET}
{1743112800 10800 1 EEST}
{1758837600 7200 0 EET}
{1774562400 10800 1 EEST}
{1790287200 7200 0 EET}
{1806012000 10800 1 EEST}
{1821736800 7200 0 EET}
{1838066400 10800 1 EEST}
{1853186400 7200 0 EET}
{1869516000 10800 1 EEST}
{1884636000 7200 0 EET}
{1900965600 10800 1 EEST}
{1916690400 7200 0 EET}
{1932415200 10800 1 EEST}
{1948140000 7200 0 EET}
{1963864800 10800 1 EEST}
{1979589600 7200 0 EET}
{1995919200 10800 1 EEST}
{2011039200 7200 0 EET}
{2027368800 10800 1 EEST}
{2042488800 7200 0 EET}
{2058818400 10800 1 EEST}
{2073938400 7200 0 EET}
{2090268000 10800 1 EEST}
{2105992800 7200 0 EET}
{2121717600 10800 1 EEST}
{2137442400 7200 0 EET}
{2153167200 10800 1 EEST}
{2168892000 7200 0 EET}
{2185221600 10800 1 EEST}
{2200341600 7200 0 EET}
{2216671200 10800 1 EEST}
{2231791200 7200 0 EET}
{2248120800 10800 1 EEST}
{2263845600 7200 0 EET}
{2279570400 10800 1 EEST}
{2295295200 7200 0 EET}
{2311020000 10800 1 EEST}
{2326744800 7200 0 EET}
{2343074400 10800 1 EEST}
{2358194400 7200 0 EET}
{2374524000 10800 1 EEST}
{2389644000 7200 0 EET}
{2405973600 10800 1 EEST}
{2421093600 7200 0 EET}
{2437423200 10800 1 EEST}
{2453148000 7200 0 EET}
{2468872800 10800 1 EEST}
{2484597600 7200 0 EET}
{2500322400 10800 1 EEST}
{2516047200 7200 0 EET}
{2532376800 10800 1 EEST}
{2547496800 7200 0 EET}
{2563826400 10800 1 EEST}
{2578946400 7200 0 EET}
{2595276000 10800 1 EEST}
{2611000800 7200 0 EET}
{2626725600 10800 1 EEST}
{2642450400 7200 0 EET}
{2658175200 10800 1 EEST}
{2673900000 7200 0 EET}
{2689624800 10800 1 EEST}
{2705349600 7200 0 EET}
{2721679200 10800 1 EEST}
{2736799200 7200 0 EET}
{2753128800 10800 1 EEST}
{2768248800 7200 0 EET}
{2784578400 10800 1 EEST}
{2800303200 7200 0 EET}
{2816028000 10800 1 EEST}
{2831752800 7200 0 EET}
{2847477600 10800 1 EEST}
{2863202400 7200 0 EET}
{2879532000 10800 1 EEST}
{2894652000 7200 0 EET}
{2910981600 10800 1 EEST}
{2926101600 7200 0 EET}
{2942431200 10800 1 EEST}
{2957551200 7200 0 EET}
{2973880800 10800 1 EEST}
{2989605600 7200 0 EET}
{3005330400 10800 1 EEST}
{3021055200 7200 0 EET}
{3036780000 10800 1 EEST}
{3052504800 7200 0 EET}
{3068834400 10800 1 EEST}
{3083954400 7200 0 EET}
{3100284000 10800 1 EEST}
{3115404000 7200 0 EET}
{3131733600 10800 1 EEST}
{3147458400 7200 0 EET}
{3163183200 10800 1 EEST}
{3178908000 7200 0 EET}
{3194632800 10800 1 EEST}
{3210357600 7200 0 EET}
{3226687200 10800 1 EEST}
{3241807200 7200 0 EET}
{3258136800 10800 1 EEST}
{3273256800 7200 0 EET}
{3289586400 10800 1 EEST}
{3304706400 7200 0 EET}
{3321036000 10800 1 EEST}
{3336760800 7200 0 EET}
{3352485600 10800 1 EEST}
{3368210400 7200 0 EET}
{3383935200 10800 1 EEST}
{3399660000 7200 0 EET}
{3415989600 10800 1 EEST}
{3431109600 7200 0 EET}
{3447439200 10800 1 EEST}
{3462559200 7200 0 EET}
{3478888800 10800 1 EEST}
{3494613600 7200 0 EET}
{3510338400 10800 1 EEST}
{3526063200 7200 0 EET}
{3541788000 10800 1 EEST}
{3557512800 7200 0 EET}
{3573237600 10800 1 EEST}
{3588962400 7200 0 EET}
{3605292000 10800 1 EEST}
{3620412000 7200 0 EET}
{3636741600 10800 1 EEST}
{3651861600 7200 0 EET}
{3668191200 10800 1 EEST}
{3683916000 7200 0 EET}
{3699640800 10800 1 EEST}
{3715365600 7200 0 EET}
{3731090400 10800 1 EEST}
{3746815200 7200 0 EET}
{3763144800 10800 1 EEST}
{3778264800 7200 0 EET}
{3794594400 10800 1 EEST}
{3809714400 7200 0 EET}
{3826044000 10800 1 EEST}
{3841164000 7200 0 EET}
{3857493600 10800 1 EEST}
{3873218400 7200 0 EET}
{3888943200 10800 1 EEST}
{3904668000 7200 0 EET}
{3920392800 10800 1 EEST}
{3936117600 7200 0 EET}
{3952447200 10800 1 EEST}
{3967567200 7200 0 EET}
{3983896800 10800 1 EEST}
{3999016800 7200 0 EET}
{4015346400 10800 1 EEST}
{4031071200 7200 0 EET}
{4046796000 10800 1 EEST}
{4062520800 7200 0 EET}
{4078245600 10800 1 EEST}
{4093970400 7200 0 EET}
}
+89 -89
View File
@@ -1,8 +1,8 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:Asia/Jerusalem) {
{-9223372036854775808 8456 0 LMT}
{-2840149256 8440 0 JMT}
{-9223372036854775808 8454 0 LMT}
{-2840149254 8440 0 JMT}
{-1641003640 7200 0 IST}
{-933645600 10800 1 IDT}
{-857358000 7200 0 IST}
@@ -96,177 +96,177 @@ set TZData(:Asia/Jerusalem) {
{1333065600 10800 1 IDT}
{1348354800 7200 0 IST}
{1364515200 10800 1 IDT}
{1381014000 7200 0 IST}
{1382828400 7200 0 IST}
{1395964800 10800 1 IDT}
{1412463600 7200 0 IST}
{1414278000 7200 0 IST}
{1427414400 10800 1 IDT}
{1443913200 7200 0 IST}
{1445727600 7200 0 IST}
{1458864000 10800 1 IDT}
{1475362800 7200 0 IST}
{1477782000 7200 0 IST}
{1490313600 10800 1 IDT}
{1507417200 7200 0 IST}
{1509231600 7200 0 IST}
{1521763200 10800 1 IDT}
{1538866800 7200 0 IST}
{1540681200 7200 0 IST}
{1553817600 10800 1 IDT}
{1570316400 7200 0 IST}
{1572130800 7200 0 IST}
{1585267200 10800 1 IDT}
{1601766000 7200 0 IST}
{1603580400 7200 0 IST}
{1616716800 10800 1 IDT}
{1633215600 7200 0 IST}
{1635634800 7200 0 IST}
{1648166400 10800 1 IDT}
{1664665200 7200 0 IST}
{1667084400 7200 0 IST}
{1679616000 10800 1 IDT}
{1696719600 7200 0 IST}
{1698534000 7200 0 IST}
{1711670400 10800 1 IDT}
{1728169200 7200 0 IST}
{1729983600 7200 0 IST}
{1743120000 10800 1 IDT}
{1759618800 7200 0 IST}
{1761433200 7200 0 IST}
{1774569600 10800 1 IDT}
{1791068400 7200 0 IST}
{1792882800 7200 0 IST}
{1806019200 10800 1 IDT}
{1822604400 7200 0 IST}
{1824937200 7200 0 IST}
{1837468800 10800 1 IDT}
{1854572400 7200 0 IST}
{1856386800 7200 0 IST}
{1868918400 10800 1 IDT}
{1886022000 7200 0 IST}
{1887836400 7200 0 IST}
{1900972800 10800 1 IDT}
{1917471600 7200 0 IST}
{1919286000 7200 0 IST}
{1932422400 10800 1 IDT}
{1948921200 7200 0 IST}
{1950735600 7200 0 IST}
{1963872000 10800 1 IDT}
{1980370800 7200 0 IST}
{1982790000 7200 0 IST}
{1995321600 10800 1 IDT}
{2011820400 7200 0 IST}
{2014239600 7200 0 IST}
{2026771200 10800 1 IDT}
{2043874800 7200 0 IST}
{2045689200 7200 0 IST}
{2058220800 10800 1 IDT}
{2075324400 7200 0 IST}
{2077138800 7200 0 IST}
{2090275200 10800 1 IDT}
{2106774000 7200 0 IST}
{2108588400 7200 0 IST}
{2121724800 10800 1 IDT}
{2138223600 7200 0 IST}
{2140038000 7200 0 IST}
{2153174400 10800 1 IDT}
{2169673200 7200 0 IST}
{2172092400 7200 0 IST}
{2184624000 10800 1 IDT}
{2201122800 7200 0 IST}
{2203542000 7200 0 IST}
{2216073600 10800 1 IDT}
{2233177200 7200 0 IST}
{2234991600 7200 0 IST}
{2248128000 10800 1 IDT}
{2264626800 7200 0 IST}
{2266441200 7200 0 IST}
{2279577600 10800 1 IDT}
{2296076400 7200 0 IST}
{2297890800 7200 0 IST}
{2311027200 10800 1 IDT}
{2327526000 7200 0 IST}
{2329340400 7200 0 IST}
{2342476800 10800 1 IDT}
{2358975600 7200 0 IST}
{2361394800 7200 0 IST}
{2373926400 10800 1 IDT}
{2391030000 7200 0 IST}
{2392844400 7200 0 IST}
{2405376000 10800 1 IDT}
{2422479600 7200 0 IST}
{2424294000 7200 0 IST}
{2437430400 10800 1 IDT}
{2453929200 7200 0 IST}
{2455743600 7200 0 IST}
{2468880000 10800 1 IDT}
{2485378800 7200 0 IST}
{2487193200 7200 0 IST}
{2500329600 10800 1 IDT}
{2516828400 7200 0 IST}
{2519247600 7200 0 IST}
{2531779200 10800 1 IDT}
{2548278000 7200 0 IST}
{2550697200 7200 0 IST}
{2563228800 10800 1 IDT}
{2580332400 7200 0 IST}
{2582146800 7200 0 IST}
{2595283200 10800 1 IDT}
{2611782000 7200 0 IST}
{2613596400 7200 0 IST}
{2626732800 10800 1 IDT}
{2643231600 7200 0 IST}
{2645046000 7200 0 IST}
{2658182400 10800 1 IDT}
{2674681200 7200 0 IST}
{2676495600 7200 0 IST}
{2689632000 10800 1 IDT}
{2706130800 7200 0 IST}
{2708550000 7200 0 IST}
{2721081600 10800 1 IDT}
{2738185200 7200 0 IST}
{2739999600 7200 0 IST}
{2752531200 10800 1 IDT}
{2769634800 7200 0 IST}
{2771449200 7200 0 IST}
{2784585600 10800 1 IDT}
{2801084400 7200 0 IST}
{2802898800 7200 0 IST}
{2816035200 10800 1 IDT}
{2832534000 7200 0 IST}
{2834348400 7200 0 IST}
{2847484800 10800 1 IDT}
{2863983600 7200 0 IST}
{2866402800 7200 0 IST}
{2878934400 10800 1 IDT}
{2895433200 7200 0 IST}
{2897852400 7200 0 IST}
{2910384000 10800 1 IDT}
{2927487600 7200 0 IST}
{2929302000 7200 0 IST}
{2941833600 10800 1 IDT}
{2958937200 7200 0 IST}
{2960751600 7200 0 IST}
{2973888000 10800 1 IDT}
{2990386800 7200 0 IST}
{2992201200 7200 0 IST}
{3005337600 10800 1 IDT}
{3021836400 7200 0 IST}
{3023650800 7200 0 IST}
{3036787200 10800 1 IDT}
{3053286000 7200 0 IST}
{3055705200 7200 0 IST}
{3068236800 10800 1 IDT}
{3084735600 7200 0 IST}
{3087154800 7200 0 IST}
{3099686400 10800 1 IDT}
{3116790000 7200 0 IST}
{3118604400 7200 0 IST}
{3131740800 10800 1 IDT}
{3148239600 7200 0 IST}
{3150054000 7200 0 IST}
{3163190400 10800 1 IDT}
{3179689200 7200 0 IST}
{3181503600 7200 0 IST}
{3194640000 10800 1 IDT}
{3211138800 7200 0 IST}
{3212953200 7200 0 IST}
{3226089600 10800 1 IDT}
{3242588400 7200 0 IST}
{3245007600 7200 0 IST}
{3257539200 10800 1 IDT}
{3274642800 7200 0 IST}
{3276457200 7200 0 IST}
{3288988800 10800 1 IDT}
{3306092400 7200 0 IST}
{3307906800 7200 0 IST}
{3321043200 10800 1 IDT}
{3337542000 7200 0 IST}
{3339356400 7200 0 IST}
{3352492800 10800 1 IDT}
{3368991600 7200 0 IST}
{3370806000 7200 0 IST}
{3383942400 10800 1 IDT}
{3400441200 7200 0 IST}
{3402860400 7200 0 IST}
{3415392000 10800 1 IDT}
{3431890800 7200 0 IST}
{3434310000 7200 0 IST}
{3446841600 10800 1 IDT}
{3463945200 7200 0 IST}
{3465759600 7200 0 IST}
{3478896000 10800 1 IDT}
{3495394800 7200 0 IST}
{3497209200 7200 0 IST}
{3510345600 10800 1 IDT}
{3526844400 7200 0 IST}
{3528658800 7200 0 IST}
{3541795200 10800 1 IDT}
{3558294000 7200 0 IST}
{3560108400 7200 0 IST}
{3573244800 10800 1 IDT}
{3589743600 7200 0 IST}
{3592162800 7200 0 IST}
{3604694400 10800 1 IDT}
{3621798000 7200 0 IST}
{3623612400 7200 0 IST}
{3636144000 10800 1 IDT}
{3653247600 7200 0 IST}
{3655062000 7200 0 IST}
{3668198400 10800 1 IDT}
{3684697200 7200 0 IST}
{3686511600 7200 0 IST}
{3699648000 10800 1 IDT}
{3716146800 7200 0 IST}
{3717961200 7200 0 IST}
{3731097600 10800 1 IDT}
{3747596400 7200 0 IST}
{3750015600 7200 0 IST}
{3762547200 10800 1 IDT}
{3779046000 7200 0 IST}
{3781465200 7200 0 IST}
{3793996800 10800 1 IDT}
{3811100400 7200 0 IST}
{3812914800 7200 0 IST}
{3825446400 10800 1 IDT}
{3842550000 7200 0 IST}
{3844364400 7200 0 IST}
{3857500800 10800 1 IDT}
{3873999600 7200 0 IST}
{3875814000 7200 0 IST}
{3888950400 10800 1 IDT}
{3905449200 7200 0 IST}
{3907263600 7200 0 IST}
{3920400000 10800 1 IDT}
{3936898800 7200 0 IST}
{3939318000 7200 0 IST}
{3951849600 10800 1 IDT}
{3968348400 7200 0 IST}
{3970767600 7200 0 IST}
{3983299200 10800 1 IDT}
{4000402800 7200 0 IST}
{4002217200 7200 0 IST}
{4015353600 10800 1 IDT}
{4031852400 7200 0 IST}
{4033666800 7200 0 IST}
{4046803200 10800 1 IDT}
{4063302000 7200 0 IST}
{4065116400 7200 0 IST}
{4078252800 10800 1 IDT}
{4094751600 7200 0 IST}
{4096566000 7200 0 IST}
}
+2 -2
View File
@@ -20,8 +20,8 @@ before asking on the list, many questions have already been answered).
http://wiki.tcl.tk/_/ref?N=3753
http://wiki.tcl.tk/_/ref?N=8361
- Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
http://tcl.sourceforge.net/
- Please report bugs with Tcl on Mac OS X to the tracker:
http://core.tcl.tk/tcl/reportlist
2. Using Tcl on Mac OS X
------------------------
+2 -2
View File
@@ -89,7 +89,7 @@ set printenvScript [makeFile {
SHLIB_PATH SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
__CF_USER_TEXT_ENCODING SECURITYSESSIONID LANG WINDIR TERM
CommonProgramFiles ProgramFiles
CommonProgramFiles ProgramFiles CommonProgramW6432 ProgramW6432
} {
lrem names $name
}
@@ -121,7 +121,7 @@ foreach name [array names env] {
SYSTEMDRIVE SYSTEMROOT DYLD_LIBRARY_PATH DYLD_FRAMEWORK_PATH
DYLD_NEW_LOCAL_SHARED_REGIONS DYLD_NO_FIX_PREBINDING
SECURITYSESSIONID LANG WINDIR TERM
CommonProgramFiles ProgramFiles
CONNOMPROGRAMFILES PROGRAMFILES COMMONPROGRAMW6432 PROGRAMW6432
}} {
unset env($name)
}
+6
View File
@@ -317,6 +317,12 @@ test error-8.8 {throw syntax checks} -returnCodes error -body {
test error-8.9 {throw syntax checks} -returnCodes error -body {
throw {} foo
} -result {type must be non-empty list}
test error-8.10 {Bug 33b7abb8a2: throw stack usage} -returnCodes error -body {
apply {code {throw $code foo}} {}
} -result {type must be non-empty list}
test error-8.11 {Bug 7174354ecb: throw error message} -returnCodes error -body {
throw {not {}a list} x[]y
} -result {list element in braces followed by "a" instead of space}
# simple try tests: body completes with code ok
+409
View File
@@ -1961,6 +1961,415 @@ test info-9.13 {info level option, value in global context} -body {
uplevel #0 {info level 2}
} -returnCodes error -result {bad level "2"}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
catch {*}{
{info frame 0}
res
}
return $res
}
test info-33.4 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 1968 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
dict for {a b} {c d} {*}{
{set res [info frame 0]}
}
return $res
}
test info-33.5 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 1983 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
set d {a b}
dict update d x y {*}{
{set res [info frame 0]}
}
return $res
}
test info-33.6 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 1998 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
set d {}
dict with d {*}{
{set res [info frame 0]}
}
return $res
}
test info-33.7 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2013 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
for {*}{
{set res [info frame 0]}
{1} {} {break}
}
return $res
}
test info-33.8 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2027 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
for {*}{
{} {1} {}
{set res [info frame 0]; break}
}
return $res
}
test info-33.9 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2043 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
for {*}{
{} {1}
{return [info frame 0]}
{}
}
}
test info-33.10 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2058 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
for {*}{
{}
{[return [info frame 0]]}
{} {}
}
}
test info-33.11 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2073 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
foreach {*}{
x
} [return [info frame 0]] {}
}
test info-33.12 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2088 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
foreach {*}{
x y
{set res [info frame 0]}
}
return $res
}
test info-33.13 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2101 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
if {*}{
{[return [info frame 0]]}
{}
}
}
test info-33.14 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2115 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
if 0 {*}{
{} else
{return [info frame 0]}
}
}
test info-33.15 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2130 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
incr {*}{
x
} [return [info frame 0]]
}
test info-33.16 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2144 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
info level {*}{
} [return [info frame 0]]
}
test info-33.17 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2156 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
string match {*}{
} [return [info frame 0]] {}
}
test info-33.18 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2168 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
string match {*}{
{}
} [return [info frame 0]]
}
test info-33.19 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2181 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
string length {*}{
} [return [info frame 0]]
}
test info-33.20 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2193 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
while {*}{
{[return [info frame 0]]}
} {}
}
test info-33.21 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2205 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
switch -- {*}{
} [return [info frame 0]] {*}{
} x y
}
test info-33.22 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2218 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {*}{
{set res [info frame 0]}
}
return $res
}
test info-33.23 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2231 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {*}{
{set res [info frame 0]}
} finally {}
return $res
}
test info-33.24 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2245 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {*}{
{set res [info frame 0]}
} on ok {} {}
return $res
}
test info-33.25 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2259 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {*}{
{set res [info frame 0]}
} on ok {} {} finally {}
return $res
}
test info-33.26 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2273 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
while 1 {*}{
{return [info frame 0]}
}
}
test info-33.27 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2287 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {} finally {*}{
{return [info frame 0]}
}
}
test info-33.28 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2300 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {} on ok {} {} finally {*}{
{return [info frame 0]}
}
}
test info-33.29 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2313 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {} on ok {} {*}{
{return [info frame 0]}
}
}
test info-33.30 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2326 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
try {} on ok {} {*}{
{return [info frame 0]}
} finally {}
}
test info-33.31 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2339 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
binary format {*}{
} [return [info frame 0]]
}
test info-33.32 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2352 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
namespace eval foo {}
proc foo::bar {} {
set format format
binary $format {*}{
} [return [info frame 0]]
}
test info-33.33 {{*}, literal, simple, bytecompiled} -body {
reduce [foo::bar]
} -cleanup {
namespace delete foo
} -result {type source line 2365 file info.test cmd {info frame 0} proc ::foo::bar level 0}
# -------------------------------------------------------------------------
unset -nocomplain res
+2 -2
View File
@@ -337,8 +337,8 @@ test utf-21.11 {TclUniCharIsControl} {
string is control \u00ad
} {1}
test utf-21.12 {unicode control char in regc_locale.c} {
# [Bug 3464428]
regexp {^[[:cntrl:]]$} \u00ad
# [Bug 3464428], [Bug a876646efe]
regexp {^[[:cntrl:]]*$} \u0000\u001f\u00ad
} {1}
test utf-22.1 {TclUniCharIsWordChar} {
+1 -1
View File
@@ -72,7 +72,7 @@ proc genTable {type} {
if {$i == ($last + 1)} {
set last $i
} else {
if {$first > 0} {
if {$first >= 0} {
emitRange $first $last
}
set first $i
+3 -3
View File
@@ -632,9 +632,9 @@ tclLibObjs:
# This targets actually build the objects needed for the lib in the above case
objs: ${OBJS}
${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE}
${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE}
${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} \
@TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \
@TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \
${CC_SEARCH_FLAGS} -o ${TCL_EXE}
# Must be empty so it doesn't conflict with rule for ${TCL_EXE} above
@@ -1683,7 +1683,7 @@ Zzutil.o: $(ZLIB_DIR)/zutil.c
#--------------------------------------------------------------------------
tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD $(GENERIC_DIR)/tclStubLib.c
tclTomMathStubLib.o: $(GENERIC_DIR)/tclTomMathStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tclTomMathStubLib.c
+3 -2
View File
@@ -163,6 +163,7 @@ you'll see a much more substantial printout for each error. See the README
file in the "tests" directory for more information on the test suite. Note:
don't run the tests as superuser: this will cause several of them to fail. If
a test is failing consistently, please send us a bug report with as much
detail as you can manage. Please use the online database at
http://tcl.sourceforge.net/
detail as you can manage to our tracker:
http://core.tcl.tk/tcl/reportlist
+5 -40
View File
@@ -7727,11 +7727,12 @@ fi
OpenBSD-*)
arch=`arch -s`
case "$arch" in
m88k|vax)
vax)
# Equivalent using configure option --disable-load
# Step 4 will set the necessary variables
DL_OBJS=""
SHLIB_LD_LIBS=""
LDFLAGS=""
;;
*)
SHLIB_CFLAGS="-fPIC"
@@ -7746,10 +7747,11 @@ fi
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
LDFLAGS="-Wl,-export-dynamic"
;;
esac
case "$arch" in
m88k|vax)
vax)
CFLAGS_OPTIMIZE="-O1"
;;
sh)
@@ -7759,43 +7761,6 @@ fi
CFLAGS_OPTIMIZE="-O2"
;;
esac
echo "$as_me:$LINENO: checking for ELF" >&5
echo $ECHO_N "checking for ELF... $ECHO_C" >&6
if test "${tcl_cv_ld_elf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __ELF__
yes
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
tcl_cv_ld_elf=yes
else
tcl_cv_ld_elf=no
fi
rm -f conftest*
fi
echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
echo "${ECHO_T}$tcl_cv_ld_elf" >&6
if test $tcl_cv_ld_elf = yes; then
LDFLAGS=-Wl,-export-dynamic
else
LDFLAGS=""
fi
if test "${TCL_THREADS}" = "1"; then
# On OpenBSD: Compile with -pthread
@@ -9788,7 +9753,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/dirent.h>
#include <dirent.h>
int
main ()
{
+9 -16
View File
@@ -1473,11 +1473,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
OpenBSD-*)
arch=`arch -s`
case "$arch" in
m88k|vax)
vax)
# Equivalent using configure option --disable-load
# Step 4 will set the necessary variables
DL_OBJS=""
SHLIB_LD_LIBS=""
LDFLAGS=""
;;
*)
SHLIB_CFLAGS="-fPIC"
@@ -1489,10 +1490,11 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
LDFLAGS="-Wl,-export-dynamic"
;;
esac
case "$arch" in
m88k|vax)
vax)
CFLAGS_OPTIMIZE="-O1"
;;
sh)
@@ -1502,15 +1504,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
CFLAGS_OPTIMIZE="-O2"
;;
esac
AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
AC_EGREP_CPP(yes, [
#ifdef __ELF__
yes
#endif
], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
AS_IF([test $tcl_cv_ld_elf = yes], [
LDFLAGS=-Wl,-export-dynamic
], [LDFLAGS=""])
AS_IF([test "${TCL_THREADS}" = "1"], [
# On OpenBSD: Compile with -pthread
# Don't link with -lpthread
@@ -2255,9 +2248,9 @@ AC_DEFUN([SC_PATH_X], [
not_really_there=""
if test "$no_x" = ""; then
if test "$x_includes" = ""; then
AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
AC_TRY_CPP([#include <X11/Xlib.h>], , not_really_there="yes")
else
if test ! -r $x_includes/X11/Intrinsic.h; then
if test ! -r $x_includes/X11/Xlib.h; then
not_really_there="yes"
fi
fi
@@ -2265,11 +2258,11 @@ AC_DEFUN([SC_PATH_X], [
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
AC_MSG_CHECKING([for X11 header files])
found_xincludes="no"
AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
if test "$found_xincludes" = "no"; then
dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
for i in $dirs ; do
if test -r $i/X11/Intrinsic.h; then
if test -r $i/X11/Xlib.h; then
AC_MSG_RESULT([$i])
XINCLUDES=" -I$i"
found_xincludes="yes"
@@ -2640,7 +2633,7 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [
# Now check for auxiliary declarations
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/dirent.h>],[struct dirent64 p;],
#include <dirent.h>],[struct dirent64 p;],
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
+7 -7
View File
@@ -22,14 +22,14 @@ extern Tcl_PackageInitProc Tcltest_SafeInit;
#endif /* TCL_TEST */
#ifdef TCL_XT_TEST
extern void XtToolkitInitialize(void);
extern int Tclxttest_Init(Tcl_Interp *interp);
#endif
extern void XtToolkitInitialize(void);
extern Tcl_PackageInitProc Tclxttest_Init;
#endif /* TCL_XT_TEST */
/*
* The following #if block allows you to change the AppInit function by using
* a #define of TCL_LOCAL_APPINIT instead of rewriting this entire file. The
* #if checks for that #define and uses Tcl_AppInit if it doesn't exist.
* #if checks for that #define and uses Tcl_AppInit if it does not exist.
*/
#ifndef TCL_LOCAL_APPINIT
@@ -71,7 +71,7 @@ MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, char ***argv);
int
main(
int argc, /* Number of command-line arguments. */
char **argv) /* Values of command-line arguments. */
char *argv[]) /* Values of command-line arguments. */
{
#ifdef TCL_XT_TEST
XtToolkitInitialize();
@@ -145,8 +145,8 @@ Tcl_AppInit(
/*
* Specify a user-specific startup file to invoke if the application is
* run interactively. Typically the startup file is "~/.apprc" where "app"
* is the name of the application. If this line is deleted then no user-
* specific startup file will be run under any conditions.
* is the name of the application. If this line is deleted then no
* user-specific startup file will be run under any conditions.
*/
#ifdef DJGPP
+6 -6
View File
@@ -96,7 +96,7 @@ typedef struct ThreadSpecificData {
* that an event is ready to be processed
* by sending this event. */
void *hwnd; /* Messaging window. */
#else
#else /* !__CYGWIN__ */
Tcl_Condition waitCV; /* Any other thread alerts a notifier that an
* event is ready to be processed by signaling
* this condition variable. */
@@ -184,9 +184,9 @@ static Tcl_ThreadId notifierThread;
*/
#ifdef TCL_THREADS
static void NotifierThreadProc(ClientData clientData);
static void NotifierThreadProc(ClientData clientData);
#endif
static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
/*
* Import of Windows API when building threaded with Cygwin.
@@ -213,14 +213,14 @@ typedef struct {
void *hCursor;
void *hbrBackground;
void *lpszMenuName;
void *lpszClassName;
const void *lpszClassName;
} WNDCLASS;
extern void __stdcall CloseHandle(void *);
extern void *__stdcall CreateEventW(void *, unsigned char, unsigned char,
void *);
extern void * __stdcall CreateWindowExW(void *, void *, void *, DWORD, int,
int, int, int, void *, void *, void *, void *);
extern void * __stdcall CreateWindowExW(void *, const void *, const void *,
DWORD, int, int, int, int, void *, void *, void *, void *);
extern DWORD __stdcall DefWindowProcW(void *, int, void *, void *);
extern unsigned char __stdcall DestroyWindow(void *);
extern int __stdcall DispatchMessageW(const MSG *);
-2
View File
@@ -700,8 +700,6 @@ typedef int socklen_t;
#ifdef TCL_THREADS
# include <pthread.h>
# undef inet_ntoa
# define inet_ntoa(x) TclpInetNtoa(x)
#endif /* TCL_THREADS */
/* FIXME - Hyper-enormous platform assumption! */
+3 -2
View File
@@ -1131,7 +1131,7 @@ Tcl_OpenTcpClient(
{
TcpState *state;
const char *errorMsg = NULL;
struct addrinfo *addrlist = NULL, *myaddrlist = NULL;
void *addrlist = NULL, *myaddrlist = NULL;
char channelName[SOCK_CHAN_LENGTH];
/*
@@ -1276,7 +1276,8 @@ Tcl_OpenTcpServer(
ClientData acceptProcData) /* Data for the callback. */
{
int status = 0, sock = -1, reuseaddr = 1, chosenport = 0;
struct addrinfo *addrlist = NULL, *addrPtr; /* socket address */
void *addrlist = NULL;
struct addrinfo *addrPtr; /* socket address */
TcpState *statePtr = NULL;
char channelName[SOCK_CHAN_LENGTH];
const char *errorMsg = NULL;
+1
View File
@@ -659,6 +659,7 @@ TclpReaddir(
return TclOSreaddir(dir);
}
#undef TclpInetNtoa
char *
TclpInetNtoa(
struct in_addr addr)
+15 -11
View File
@@ -77,10 +77,10 @@ static int initialized = 0;
*/
static int FileHandlerEventProc(Tcl_Event *evPtr, int flags);
static void FileProc(ClientData clientData, int *source,
static void FileProc(XtPointer clientData, int *source,
XtInputId *id);
static void NotifierExitHandler(ClientData clientData);
static void TimerProc(ClientData clientData, XtIntervalId *id);
static void TimerProc(XtPointer clientData, XtIntervalId *id);
static void CreateFileHandler(int fd, int mask,
Tcl_FileProc *proc, ClientData clientData);
static void DeleteFileHandler(int fd);
@@ -181,7 +181,7 @@ TclSetAppContext(
void
InitNotifier(void)
{
Tcl_NotifierProcs notifier;
Tcl_NotifierProcs np;
/*
* Only reinitialize if we are not in exit handling. The notifier can get
@@ -193,11 +193,15 @@ InitNotifier(void)
return;
}
notifier.createFileHandlerProc = CreateFileHandler;
notifier.deleteFileHandlerProc = DeleteFileHandler;
notifier.setTimerProc = SetTimer;
notifier.waitForEventProc = WaitForEvent;
Tcl_SetNotifier(&notifier);
np.createFileHandlerProc = CreateFileHandler;
np.deleteFileHandlerProc = DeleteFileHandler;
np.setTimerProc = SetTimer;
np.waitForEventProc = WaitForEvent;
np.initNotifierProc = Tcl_InitNotifier;
np.finalizeNotifierProc = Tcl_FinalizeNotifier;
np.alertNotifierProc = Tcl_AlertNotifier;
np.serviceModeHookProc = Tcl_ServiceModeHook;
Tcl_SetNotifier(&np);
/*
* DO NOT create the application context yet; doing so would prevent
@@ -205,7 +209,7 @@ InitNotifier(void)
*/
initialized = 1;
memset(&notifier, 0, sizeof(notifier));
memset(&np, 0, sizeof(np));
Tcl_CreateExitHandler(NotifierExitHandler, NULL);
}
@@ -301,7 +305,7 @@ SetTimer(
static void
TimerProc(
ClientData clientData, /* Not used. */
XtPointer clientData, /* Not used. */
XtIntervalId *id)
{
if (*id != notifier.currentTimeout) {
@@ -488,7 +492,7 @@ DeleteFileHandler(
static void
FileProc(
ClientData clientData,
XtPointer clientData,
int *fd,
XtInputId *id)
{
+1 -1
View File
@@ -458,7 +458,7 @@ ${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE}
# use pre-built zlib1.dll
${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE}
@if test "@ZLIB_LIBS@set" == "${ZLIB_DIR}/win64/zdll.libset" ; then \
@if test "@ZLIB_LIBS@set" != "${ZLIB_DIR}/win32/zdll.libset" ; then \
$(COPY) $(ZLIB_DIR)/win64/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
else \
$(COPY) $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} ${ZLIB_DLL_FILE}; \
+2 -2
View File
@@ -91,9 +91,9 @@ Note: Tcl no longer provides support for Win32s.
This distribution contains an extensive test suite for Tcl. Some of the
tests are timing dependent and will fail from time to time. If a test is
failing consistently, please send us a bug report with as much detail as
you can manage. Please use the online database at
you can manage to our tracker:
http://tcl.sourceforge.net/
http://core.tcl.tk/tcl/reportlist
In order to run the test suite, you build the "test" target using the
appropriate makefile for your compiler.
+11 -1
View File
@@ -4362,7 +4362,17 @@ if test "$tcl_ok" = "yes"; then
if test "$do64bit" = "yes"; then
ZLIB_LIBS=\${ZLIB_DIR}/win64/zdll.lib
if test "$GCC" == "yes"; then
ZLIB_LIBS=\${ZLIB_DIR}/win64/libz.dll.a
else
ZLIB_LIBS=\${ZLIB_DIR}/win64/zdll.lib
fi
else
+5 -1
View File
@@ -129,7 +129,11 @@ AS_IF([test "${enable_shared+set}" = "set"], [
AS_IF([test "$tcl_ok" = "yes"], [
AC_SUBST(ZLIB_DLL_FILE,[\${ZLIB_DLL_FILE}])
AS_IF([test "$do64bit" = "yes"], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/zdll.lib])
AS_IF([test "$GCC" == "yes"],[
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/libz.dll.a])
], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win64/zdll.lib])
])
], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR}/win32/zdll.lib])
])
+11 -10
View File
@@ -3,7 +3,8 @@
*
* Provides a default version of the main program and Tcl_AppInit
* procedure for tclsh and other Tcl-based applications (without Tk).
* Note that this program must be built in Win32 console mode to work properly.
* Note that this program must be built in Win32 console mode to work
* properly.
*
* Copyright (c) 1993 The Regents of the University of California.
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -34,12 +35,12 @@ extern Tcl_PackageInitProc Dde_SafeInit;
#ifdef TCL_BROKEN_MAINARGS
static void setargv(int *argcPtr, TCHAR ***argvPtr);
#endif
#endif /* TCL_BROKEN_MAINARGS */
/*
* The following #if block allows you to change the AppInit function by using
* a #define of TCL_LOCAL_APPINIT instead of rewriting this entire file. The
* #if checks for that #define and uses Tcl_AppInit if it doesn't exist.
* #if checks for that #define and uses Tcl_AppInit if it does not exist.
*/
#ifndef TCL_LOCAL_APPINIT
@@ -80,15 +81,15 @@ MODULE_SCOPE int TCL_LOCAL_MAIN_HOOK(int *argc, TCHAR ***argv);
#ifdef TCL_BROKEN_MAINARGS
int
main(
int argc,
char *dummy[])
int argc, /* Number of command-line arguments. */
char *dummy[]) /* Not used. */
{
TCHAR **argv;
#else
int
_tmain(
int argc,
TCHAR *argv[])
int argc, /* Number of command-line arguments. */
TCHAR *argv[]) /* Values of command-line arguments. */
{
#endif
TCHAR *p;
@@ -102,7 +103,7 @@ _tmain(
#ifdef TCL_BROKEN_MAINARGS
/*
* Get our args from the c-runtime. Ignore lpszCmdLine.
* Get our args from the c-runtime. Ignore command line.
*/
setargv(&argc, &argv);
@@ -192,8 +193,8 @@ Tcl_AppInit(
/*
* Specify a user-specific startup file to invoke if the application is
* run interactively. Typically the startup file is "~/.apprc" where "app"
* is the name of the application. If this line is deleted then no user-
* specific startup file will be run under any conditions.
* is the name of the application. If this line is deleted then no
* user-specific startup file will be run under any conditions.
*/
(Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+6 -22
View File
@@ -281,16 +281,9 @@ TclWinNoBackslash(
/*
*---------------------------------------------------------------------------
*
* TclWinSetInterfaces --
* TclpSetInterfaces --
*
* A helper proc that allows the test library to change the tclWinProcs
* structure to dispatch to either the wide-character or multi-byte
* versions of the operating system calls, depending on whether Unicode
* is the system encoding.
*
* As well as this, we can also try to load in some additional procs
* which may/may not be present depending on the current Windows version
* (e.g. Win95 will not have the procs below).
* A helper proc that initializes winTCharEncoding.
*
* Results:
* None.
@@ -302,15 +295,10 @@ TclWinNoBackslash(
*/
void
TclWinSetInterfaces(
int wide) /* Non-zero to use wide interfaces, 0
* otherwise. */
TclpSetInterfaces(void)
{
TclWinResetInterfaces();
if (wide) {
winTCharEncoding = Tcl_GetEncoding(NULL, "unicode");
}
TclWinResetInterfaces();
winTCharEncoding = Tcl_GetEncoding(NULL, "unicode");
}
/*
@@ -318,9 +306,7 @@ TclWinSetInterfaces(
*
* TclWinEncodingsCleanup --
*
* Called during finalization to free up any encodings we use. The
* tclWinProcs-> look up table is still ok to use after this call,
* provided no encoding conversion is required.
* Called during finalization to free up any encodings we use.
*
* We also clean up any memory allocated in our mount point map which is
* used to follow certain kinds of symlinks. That code should never be
@@ -363,8 +349,6 @@ TclWinEncodingsCleanup(void)
* TclWinResetInterfaces --
*
* Called during finalization to reset us to a safe state for reuse.
* After this call, it is best not to use the tclWinProcs-> look up table
* since it is likely to be different to what is expected.
*
* Results:
* None.
-43
View File
@@ -1105,49 +1105,6 @@ DoRemoveJustDirectory(
SetFileAttributes(nativePath,
attr | FILE_ATTRIBUTE_READONLY);
}
/*
* Windows 95 reports removing a non-empty directory as
* EACCES, not EEXIST. If the directory is not empty, change errno
* so caller knows what's going on.
*/
if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_WINDOWS) {
const char *path, *find;
HANDLE handle;
WIN32_FIND_DATAA data;
Tcl_DString buffer;
int len;
path = (const char *) nativePath;
Tcl_DStringInit(&buffer);
len = strlen(path);
find = Tcl_DStringAppend(&buffer, path, len);
if ((len > 0) && (find[len - 1] != '\\')) {
TclDStringAppendLiteral(&buffer, "\\");
}
find = TclDStringAppendLiteral(&buffer, "*.*");
handle = FindFirstFileA(find, &data);
if (handle != INVALID_HANDLE_VALUE) {
while (1) {
if ((strcmp(data.cFileName, ".") != 0)
&& (strcmp(data.cFileName, "..") != 0)) {
/*
* Found something in this directory.
*/
Tcl_SetErrno(EEXIST);
break;
}
if (FindNextFileA(handle, &data) == FALSE) {
break;
}
}
FindClose(handle);
}
Tcl_DStringFree(&buffer);
}
}
}
+158 -318
View File
@@ -799,7 +799,7 @@ tclWinDebugPanic(
WCHAR msgString[TCL_MAX_WARN_LEN];
va_start(argList, format);
_vsnprintf(buf, sizeof(buf), format, argList);
vsnprintf(buf, sizeof(buf), format, argList);
msgString[TCL_MAX_WARN_LEN-1] = L'\0';
MultiByteToWideChar(CP_UTF8, 0, buf, -1, msgString, TCL_MAX_WARN_LEN);
@@ -2415,373 +2415,213 @@ TclpObjNormalizePath(
Tcl_DStringInit(&dsNorm);
path = Tcl_GetString(pathPtr);
if (TclWinGetPlatformId() == VER_PLATFORM_WIN32_WINDOWS) {
/*
* We're on Win95, 98 or ME. There are two assumptions in this block
* of code. First that the native (NULL) encoding is basically ascii,
* and second that symbolic links are not possible. Both of these
* assumptions appear to be true of these operating systems.
*
* FIXME: This code branch may be derelict as those are not supported
* platforms any more.
*/
currentPathEndPosition = path + nextCheckpoint;
if (*currentPathEndPosition == '/') {
currentPathEndPosition++;
}
while (1) {
char cur = *currentPathEndPosition;
currentPathEndPosition = path + nextCheckpoint;
if (*currentPathEndPosition == '/') {
currentPathEndPosition++;
}
if ((cur=='/' || cur==0) && (path != currentPathEndPosition)) {
/*
* Reached directory separator, or end of string.
*/
while (1) {
char cur = *currentPathEndPosition;
WIN32_FILE_ATTRIBUTE_DATA data;
const TCHAR *nativePath = Tcl_WinUtfToTChar(path,
currentPathEndPosition - path, &ds);
if ((cur=='/' || cur==0) && (path != currentPathEndPosition)) {
if (GetFileAttributesEx(nativePath,
GetFileExInfoStandard, &data) != TRUE) {
/*
* Reached directory separator, or end of string.
*/
const char *nativePath = Tcl_UtfToExternalDString(NULL, path,
currentPathEndPosition - path, &ds);
/*
* Now we convert the tail of the current path to its 'long
* form', and append it to 'dsNorm' which holds the current
* normalized path, if the file exists.
* File doesn't exist.
*/
if (isDrive) {
if (GetFileAttributesA(nativePath)
== INVALID_FILE_ATTRIBUTES) {
int len = WinIsReserved(path);
if (len > 0) {
/*
* File doesn't exist.
* Actually it does exist - COM1, etc.
*/
if (isDrive) {
int len = WinIsReserved(path);
int i;
if (len > 0) {
/*
* Actually it does exist - COM1, etc.
*/
for (i=0 ; i<len ; i++) {
WCHAR wc = ((WCHAR *) nativePath)[i];
int i;
for (i=0 ; i<len ; i++) {
if (nativePath[i] >= 'a') {
((char *) nativePath)[i] -= ('a'-'A');
}
}
Tcl_DStringAppend(&dsNorm, nativePath, len);
lastValidPathEnd = currentPathEndPosition;
} else if (nextCheckpoint == 0) {
/* Path starts with a drive designation
* that's not actually on the system.
* We still must normalize up past the
* first separator. [Bug 3603434] */
currentPathEndPosition++;
if (wc >= L'a') {
wc -= (L'a' - L'A');
((WCHAR *) nativePath)[i] = wc;
}
}
Tcl_DStringFree(&ds);
break;
}
if (nativePath[0] >= 'a') {
((char *) nativePath)[0] -= ('a' - 'A');
}
Tcl_DStringAppend(&dsNorm, nativePath,
Tcl_DStringLength(&ds));
} else {
char *checkDots = NULL;
if (lastValidPathEnd[1] == '.') {
checkDots = lastValidPathEnd + 1;
while (checkDots < currentPathEndPosition) {
if (*checkDots != '.') {
checkDots = NULL;
break;
}
checkDots++;
}
}
if (checkDots != NULL) {
int dotLen = currentPathEndPosition-lastValidPathEnd;
/*
* Path is just dots. We shouldn't really ever see a
* path like that. However, to be nice we at least
* don't mangle the path - we just add the dots as a
* path segment and continue
*/
Tcl_DStringAppend(&dsNorm, (const char *)
(nativePath + Tcl_DStringLength(&ds)-dotLen),
dotLen);
} else {
/*
* Normal path.
*/
WIN32_FIND_DATAA fData;
HANDLE handle;
handle = FindFirstFileA(nativePath, &fData);
if (handle == INVALID_HANDLE_VALUE) {
if (GetFileAttributesA(nativePath)
== INVALID_FILE_ATTRIBUTES) {
/*
* File doesn't exist.
*/
Tcl_DStringFree(&ds);
break;
}
/*
* This is usually the '/' in 'c:/' at end of
* string.
*/
TclDStringAppendLiteral(&dsNorm, "/");
} else {
char *nativeName;
if (fData.cFileName[0] != '\0') {
nativeName = fData.cFileName;
} else {
nativeName = fData.cAlternateFileName;
}
FindClose(handle);
TclDStringAppendLiteral(&dsNorm, "/");
Tcl_DStringAppend(&dsNorm, nativeName, -1);
}
Tcl_DStringAppend(&dsNorm,
(const char *)nativePath,
(int)(sizeof(WCHAR) * len));
lastValidPathEnd = currentPathEndPosition;
} else if (nextCheckpoint == 0) {
/* Path starts with a drive designation
* that's not actually on the system.
* We still must normalize up past the
* first separator. [Bug 3603434] */
currentPathEndPosition++;
}
}
Tcl_DStringFree(&ds);
lastValidPathEnd = currentPathEndPosition;
if (cur == 0) {
break;
}
/*
* If we get here, we've got past one directory delimiter, so
* we know it is no longer a drive.
*/
isDrive = 0;
break;
}
currentPathEndPosition++;
}
} else {
/*
* We're on WinNT (or 2000 or XP; something with an NT core).
*/
currentPathEndPosition = path + nextCheckpoint;
if (*currentPathEndPosition == '/') {
currentPathEndPosition++;
}
while (1) {
char cur = *currentPathEndPosition;
/*
* File 'nativePath' does exist if we get here. We now want to
* check if it is a symlink and otherwise continue with the
* rest of the path.
*/
if ((cur=='/' || cur==0) && (path != currentPathEndPosition)) {
/*
* Reached directory separator, or end of string.
*/
/*
* Check for symlinks, except at last component of path (we
* don't follow final symlinks). Also a drive (C:/) for
* example, may sometimes have the reparse flag set for some
* reason I don't understand. We therefore don't perform this
* check for drives.
*/
WIN32_FILE_ATTRIBUTE_DATA data;
const TCHAR *nativePath = Tcl_WinUtfToTChar(path,
currentPathEndPosition - path, &ds);
if (cur != 0 && !isDrive &&
data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT){
Tcl_Obj *to = WinReadLinkDirectory(nativePath);
if (GetFileAttributesEx(nativePath,
GetFileExInfoStandard, &data) != TRUE) {
if (to != NULL) {
/*
* File doesn't exist.
* Read the reparse point ok. Now, reparse points need
* not be normalized, otherwise we could use:
*
* Tcl_GetStringFromObj(to, &pathLen);
* nextCheckpoint = pathLen;
*
* So, instead we have to start from the beginning.
*/
if (isDrive) {
int len = WinIsReserved(path);
nextCheckpoint = 0;
Tcl_AppendToObj(to, currentPathEndPosition, -1);
if (len > 0) {
/*
* Actually it does exist - COM1, etc.
*/
/*
* Convert link to forward slashes.
*/
int i;
for (i=0 ; i<len ; i++) {
WCHAR wc = ((WCHAR *) nativePath)[i];
if (wc >= L'a') {
wc -= (L'a' - L'A');
((WCHAR *) nativePath)[i] = wc;
}
}
Tcl_DStringAppend(&dsNorm,
(const char *)nativePath,
(int)(sizeof(WCHAR) * len));
lastValidPathEnd = currentPathEndPosition;
} else if (nextCheckpoint == 0) {
/* Path starts with a drive designation
* that's not actually on the system.
* We still must normalize up past the
* first separator. [Bug 3603434] */
currentPathEndPosition++;
for (path = Tcl_GetString(to); *path != 0; path++) {
if (*path == '\\') {
*path = '/';
}
}
path = Tcl_GetString(to);
currentPathEndPosition = path + nextCheckpoint;
if (temp != NULL) {
Tcl_DecrRefCount(temp);
}
temp = to;
/*
* Reset variables so we can restart normalization.
*/
isDrive = 1;
Tcl_DStringFree(&dsNorm);
Tcl_DStringFree(&ds);
break;
}
/*
* File 'nativePath' does exist if we get here. We now want to
* check if it is a symlink and otherwise continue with the
* rest of the path.
*/
/*
* Check for symlinks, except at last component of path (we
* don't follow final symlinks). Also a drive (C:/) for
* example, may sometimes have the reparse flag set for some
* reason I don't understand. We therefore don't perform this
* check for drives.
*/
if (cur != 0 && !isDrive &&
data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT){
Tcl_Obj *to = WinReadLinkDirectory(nativePath);
if (to != NULL) {
/*
* Read the reparse point ok. Now, reparse points need
* not be normalized, otherwise we could use:
*
* Tcl_GetStringFromObj(to, &pathLen);
* nextCheckpoint = pathLen;
*
* So, instead we have to start from the beginning.
*/
nextCheckpoint = 0;
Tcl_AppendToObj(to, currentPathEndPosition, -1);
/*
* Convert link to forward slashes.
*/
for (path = Tcl_GetString(to); *path != 0; path++) {
if (*path == '\\') {
*path = '/';
}
}
path = Tcl_GetString(to);
currentPathEndPosition = path + nextCheckpoint;
if (temp != NULL) {
Tcl_DecrRefCount(temp);
}
temp = to;
/*
* Reset variables so we can restart normalization.
*/
isDrive = 1;
Tcl_DStringFree(&dsNorm);
Tcl_DStringFree(&ds);
continue;
}
continue;
}
}
#ifndef TclNORM_LONG_PATH
/*
* Now we convert the tail of the current path to its 'long
* form', and append it to 'dsNorm' which holds the current
* normalized path
*/
/*
* Now we convert the tail of the current path to its 'long
* form', and append it to 'dsNorm' which holds the current
* normalized path
*/
if (isDrive) {
WCHAR drive = ((WCHAR *) nativePath)[0];
if (isDrive) {
WCHAR drive = ((WCHAR *) nativePath)[0];
if (drive >= L'a') {
drive -= (L'a' - L'A');
((WCHAR *) nativePath)[0] = drive;
if (drive >= L'a') {
drive -= (L'a' - L'A');
((WCHAR *) nativePath)[0] = drive;
}
Tcl_DStringAppend(&dsNorm, (const char *)nativePath,
Tcl_DStringLength(&ds));
} else {
char *checkDots = NULL;
if (lastValidPathEnd[1] == '.') {
checkDots = lastValidPathEnd + 1;
while (checkDots < currentPathEndPosition) {
if (*checkDots != '.') {
checkDots = NULL;
break;
}
checkDots++;
}
Tcl_DStringAppend(&dsNorm, (const char *)nativePath,
Tcl_DStringLength(&ds));
}
if (checkDots != NULL) {
int dotLen = currentPathEndPosition-lastValidPathEnd;
/*
* Path is just dots. We shouldn't really ever see a
* path like that. However, to be nice we at least
* don't mangle the path - we just add the dots as a
* path segment and continue.
*/
Tcl_DStringAppend(&dsNorm, ((const char *)nativePath)
+ Tcl_DStringLength(&ds)
- (dotLen * sizeof(TCHAR)),
(int)(dotLen * sizeof(TCHAR)));
} else {
char *checkDots = NULL;
/*
* Normal path.
*/
if (lastValidPathEnd[1] == '.') {
checkDots = lastValidPathEnd + 1;
while (checkDots < currentPathEndPosition) {
if (*checkDots != '.') {
checkDots = NULL;
break;
}
checkDots++;
}
}
if (checkDots != NULL) {
int dotLen = currentPathEndPosition-lastValidPathEnd;
WIN32_FIND_DATAW fData;
HANDLE handle;
handle = FindFirstFileW((WCHAR *) nativePath, &fData);
if (handle == INVALID_HANDLE_VALUE) {
/*
* Path is just dots. We shouldn't really ever see a
* path like that. However, to be nice we at least
* don't mangle the path - we just add the dots as a
* path segment and continue.
* This is usually the '/' in 'c:/' at end of
* string.
*/
Tcl_DStringAppend(&dsNorm, ((const char *)nativePath)
+ Tcl_DStringLength(&ds)
- (dotLen * sizeof(TCHAR)),
(int)(dotLen * sizeof(TCHAR)));
Tcl_DStringAppend(&dsNorm, (const char *) L"/",
sizeof(WCHAR));
} else {
/*
* Normal path.
*/
WCHAR *nativeName;
WIN32_FIND_DATAW fData;
HANDLE handle;
handle = FindFirstFileW((WCHAR *) nativePath, &fData);
if (handle == INVALID_HANDLE_VALUE) {
/*
* This is usually the '/' in 'c:/' at end of
* string.
*/
Tcl_DStringAppend(&dsNorm, (const char *) L"/",
sizeof(WCHAR));
if (fData.cFileName[0] != '\0') {
nativeName = fData.cFileName;
} else {
WCHAR *nativeName;
if (fData.cFileName[0] != '\0') {
nativeName = fData.cFileName;
} else {
nativeName = fData.cAlternateFileName;
}
FindClose(handle);
Tcl_DStringAppend(&dsNorm, (const char *) L"/",
sizeof(WCHAR));
Tcl_DStringAppend(&dsNorm,
(const char *) nativeName,
(int) (wcslen(nativeName)*sizeof(WCHAR)));
nativeName = fData.cAlternateFileName;
}
FindClose(handle);
Tcl_DStringAppend(&dsNorm, (const char *) L"/",
sizeof(WCHAR));
Tcl_DStringAppend(&dsNorm,
(const char *) nativeName,
(int) (wcslen(nativeName)*sizeof(WCHAR)));
}
}
#endif /* !TclNORM_LONG_PATH */
Tcl_DStringFree(&ds);
lastValidPathEnd = currentPathEndPosition;
if (cur == 0) {
break;
}
/*
* If we get here, we've got past one directory delimiter, so
* we know it is no longer a drive.
*/
isDrive = 0;
}
currentPathEndPosition++;
#endif /* !TclNORM_LONG_PATH */
Tcl_DStringFree(&ds);
lastValidPathEnd = currentPathEndPosition;
if (cur == 0) {
break;
}
/*
* If we get here, we've got past one directory delimiter, so
* we know it is no longer a drive.
*/
isDrive = 0;
}
currentPathEndPosition++;
#ifdef TclNORM_LONG_PATH
/*
+3 -6
View File
@@ -486,13 +486,10 @@ TclpSetInitialEncodings(void)
Tcl_DStringFree(&encodingName);
}
void
TclpSetInterfaces(void)
void TclWinSetInterfaces(
int dummy) /* Not used. */
{
int useWide;
useWide = (TclWinGetPlatformId() != VER_PLATFORM_WIN32_WINDOWS);
TclWinSetInterfaces(useWide);
TclpSetInterfaces();
}
const char *
-6
View File
@@ -33,12 +33,6 @@
# define TCL_I_MODIFIER ""
#endif
#ifdef _WIN64
# define TCL_I_MODIFIER "I"
#else
# define TCL_I_MODIFIER ""
#endif
/*
* Declarations of functions that are not accessible by way of the
* stubs table.
+3 -10
View File
@@ -1049,15 +1049,8 @@ TclpCreateProcess(
* sink.
*/
if ((TclWinGetPlatformId() == VER_PLATFORM_WIN32_WINDOWS)
&& (applType == APPL_DOS)) {
if (CreatePipe(&h, &startInfo.hStdOutput, &secAtts, 0) != FALSE) {
CloseHandle(h);
}
} else {
startInfo.hStdOutput = CreateFileA("NUL:", GENERIC_WRITE, 0,
&secAtts, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
}
startInfo.hStdOutput = CreateFile(TEXT("NUL:"), GENERIC_WRITE, 0,
&secAtts, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
} else {
DuplicateHandle(hProcess, outputHandle, hProcess,
&startInfo.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
@@ -1076,7 +1069,7 @@ TclpCreateProcess(
* sink.
*/
startInfo.hStdError = CreateFileA("NUL:", GENERIC_WRITE, 0,
startInfo.hStdError = CreateFile(TEXT("NUL:"), GENERIC_WRITE, 0,
&secAtts, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
} else {
DuplicateHandle(hProcess, errorHandle, hProcess, &startInfo.hStdError,
+8 -10
View File
@@ -82,6 +82,7 @@ typedef DWORD_PTR * PDWORD_PTR;
*---------------------------------------------------------------------------
*/
#include <time.h>
#include <wchar.h>
#include <io.h>
#include <errno.h>
@@ -92,11 +93,9 @@ typedef DWORD_PTR * PDWORD_PTR;
#include <signal.h>
#include <limits.h>
#ifndef strncasecmp
# define strncasecmp strnicmp
#endif
#ifndef strcasecmp
# define strcasecmp stricmp
#ifndef __GNUC__
# define strncasecmp _strnicmp
# define strcasecmp _stricmp
#endif
/*
@@ -114,8 +113,6 @@ typedef DWORD_PTR * PDWORD_PTR;
# endif /* __BORLANDC__ */
#endif /* __MWERKS__ */
#include <time.h>
/*
* The following defines redefine the Windows Socket errors as
* BSD errors so Tcl_PosixError can do the right thing.
@@ -469,11 +466,12 @@ typedef DWORD_PTR * PDWORD_PTR;
* including the *printf family and others. Tell it to shut up.
* (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0)
*/
#if _MSC_VER >= 1400
#pragma warning(disable:4996)
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
# pragma warning(disable:4244)
# pragma warning(disable:4267)
# pragma warning(disable:4996)
#endif
/*
*---------------------------------------------------------------------------
* The following macros and declarations represent the interface between
+4 -2
View File
@@ -1131,9 +1131,10 @@ CreateSocket(
int asyncConnect = 0; /* Will be 1 if async connect is in
* progress. */
unsigned short chosenport = 0;
struct addrinfo *addrlist = NULL, *addrPtr;
void *addrlist = NULL, *myaddrlist = NULL;
struct addrinfo *addrPtr;
/* Socket address to connect to. */
struct addrinfo *myaddrlist = NULL, *myaddrPtr;
struct addrinfo *myaddrPtr;
/* Socket address for our side. */
const char *errorMsg = NULL;
SOCKET sock = INVALID_SOCKET;
@@ -2735,6 +2736,7 @@ TclWinSetSockOpt(
return setsockopt(s, level, optname, optval, optlen);
}
#undef TclpInetNtoa
char *
TclpInetNtoa(
struct in_addr addr)