Compare commits

...
Author SHA1 Message Date
jan.nijtmans d3b843bcbb Experiment: make "encoding" mandatory, when preceded by -strict/-failvar/-nocomplain options 2023-01-25 17:09:18 +00:00
pooryorick 7426076e0f Test TableFromUtfProc() with strict handling of encoding errors. 2023-01-25 10:02:27 +00:00
pooryorick ca4e244cca Test TableFromUtfProc() with strict handling of encoding errors. 2023-01-25 02:52:24 +00:00
jan.nijtmans 1dd572d476 First part of fix for [4a7397e0b3]. Not complete yet. 2023-01-24 20:00:22 +00:00
jan.nijtmans 20ace1aa6c Merge 9.0 2023-01-24 09:30:00 +00:00
jan.nijtmans ef42e37c44 Merge-mark. Fix testConstraint utf32 (in tests/string.test) 2023-01-23 20:51:36 +00:00
jan.nijtmans 42b0b497a1 Merge-mark 2023-01-23 20:08:40 +00:00
jan.nijtmans 46dcc60e41 Better error-message for previous commit. Some more code-cleanup, backported from 8.7 2023-01-23 19:18:39 +00:00
jan.nijtmans c5f7f66ceb Merge 8.7 2023-01-22 23:35:38 +00:00
jan.nijtmans b31d886479 Merge-mark 2023-01-22 23:03:09 +00:00
jan.nijtmans c08798d0f4 Fix [3e8074aea7]: [interp limit time -seconds] has a y2k38 problem 2023-01-22 22:53:36 +00:00
jan.nijtmans 04eb2cc696 Allow "-strict" and "-failindex" to be used together in "encoding convertfrom|convertto". As requested in ticket [a31caff057] 2023-01-22 22:51:41 +00:00
Kevin B Kenny 2b516939bd Merge 8.7 (Bug [e3dcab1d14]) 2023-01-22 02:02:37 +00:00
Kevin B Kenny 47b385e3db Bug [e3dcab1d14] - merge fix from 8.6 2023-01-22 01:55:54 +00:00
Kevin B Kenny 4ef7c0c4b8 Missed one more off-by-one error, also, tests misnumbered for merge forward. 2023-01-22 01:48:02 +00:00
Kevin B Kenny 119519c4df Remove unneeded hard-coded array size 2023-01-22 01:37:07 +00:00
Kevin B Kenny 52948a790c Bug [e3dcab1d14] fix 2023-01-22 01:33:44 +00:00
jan.nijtmans 792c57a7fb Make documentation conform to implementation in this branch 2023-01-20 20:59:22 +00:00
jan.nijtmans 073e6715d1 Better error-message 2023-01-20 16:51:50 +00:00
jan.nijtmans c611835152 Proposed fix for [3e8074aea7]: [interp limit time -seconds] has a y2k38 problem 2023-01-19 21:36:05 +00:00
jan.nijtmans 22657ad365 New proposal: Allow "-strict" immediately before or after "-failindex var". 2023-01-19 17:01:40 +00:00
jan.nijtmans 02838226fe Merge 8.7 2023-01-19 15:50:49 +00:00
jan.nijtmans 1c6b1c9e6c Merge 8.7 2023-01-19 15:00:07 +00:00
jan.nijtmans 6c8d9886b5 Fix [https://core.tcl-lang.org/tk/tktview?name=370b1ff03e|370b1ff03e]: Wrong Tk_MeasureChars result when linking with Tcl 9 (--disable-xft only)
This turned out to be an error in Tcl 8.7, after all. Since some test-cases depend on the replacement behavior on Tcl 8.6, we need to add "-nocomplainencoding" to make it work in Tcl 9.0.
2023-01-19 14:19:00 +00:00
jan.nijtmans 45bfcbb267 Merge 8.7 2023-01-18 17:06:05 +00:00
jan.nijtmans c18f5f7f8c Merge 8.6 2023-01-18 16:54:07 +00:00
jan.nijtmans 31226696c3 Some test-cases need -nocomplainencoding 1, because they use the fallback behavior. 2023-01-18 14:10:09 +00:00
jan.nijtmans 5d50502a29 Forget about TCL_ENCODING_HACK_FLAG, this should be the fix. Testing ... 2023-01-18 13:26:15 +00:00
jan.nijtmans 925f00c5ca Use TCL_ENCODING_HACK_FLAG in TableFromUtfProc too 2023-01-17 14:15:39 +00:00
jan.nijtmans 5c38cce8df Merge trunk. Make test-cases pass (again). This might indicate a bug in utf-8 decoder, but that will be handled separately. 2023-01-17 13:42:59 +00:00
jan.nijtmans 6efbc1b278 merge-mark 2023-01-16 23:03:41 +00:00
jan.nijtmans 40b6b98401 Merge 8.7 2023-01-16 13:11:01 +00:00
jan.nijtmans 5021d1c11f New flag TCL_ENCODING_HACK_FLAG to control the behaviour. (This is NOT the way to do it, but it's only meant for experimenting) 2023-01-16 13:10:07 +00:00
jan.nijtmans ca87000eac merge-mark 2023-01-16 10:07:31 +00:00
jan.nijtmans 56bcf3dcbe Merge 8.7 2023-01-15 20:56:58 +00:00
jan.nijtmans 7faef9ce70 Update documentation, matching current implementation 2023-01-15 19:45:54 +00:00
pooryorick 81262438a7 Fix issue [8f7fdea2d], string-2.20.1 fails on big endian, and also fix issues in TclStringCmp when checkEq is 1. 2023-01-15 19:26:36 +00:00
jan.nijtmans b9537d1098 Merge 9.0 2023-01-14 23:41:10 +00:00
jan.nijtmans 25f6837582 Same change for "encoding convertto" 2023-01-14 22:57:15 +00:00
jan.nijtmans 5aef206d2d Proposed fix for [a31caff057]: encoding command does not allow -strict to be used with -failindex 2023-01-14 22:20:53 +00:00
pooryorick 24656c2805 Properly quote contents of Make variables to pass through gdb.run file. 2023-01-14 22:07:21 +00:00
jan.nijtmans 33f4149ee5 Fix for [https://core.tcl-lang.org/tk/tktview?name=370b1ff03e|370b1ff03e]. Not complete/correct yet, since this backouts the fix for [4dbfa46caa] 2023-01-08 22:47:45 +00:00
jan.nijtmans 95e7615fc4 Merge 8.7 2023-01-06 17:35:08 +00:00
jan.nijtmans ba6fe47daa Merge 8.6 2023-01-06 17:33:59 +00:00
jan.nijtmans cf560b3fb9 Fix [0f19edcb78]: Windows 11 not reported in tcl_platform(osVersion) 2023-01-06 17:32:06 +00:00
jan.nijtmans 507af3b425 Merge 8.6 2023-01-06 17:11:20 +00:00
jan.nijtmans 72eb4e4229 Fix [ad393071c2]: Use different LD_LIBRARY_PATH_VAR on macOS 2023-01-06 16:56:14 +00:00
jan.nijtmans ce9fb3bcfb Fix [0f19edcb78]: Windows 11 not reported in tcl_platform(osVersion) 2023-01-04 23:21:16 +00:00
jan.nijtmans 8494cde084 Merge 8.7 2023-01-01 23:37:48 +00:00
jan.nijtmans 9ab6f4a7c5 Merge 8.6 2023-01-01 23:36:02 +00:00
jan.nijtmans 7be69be5fe Fix [8e811bc1f1]: Wrong formatting of arguments in man page 2023-01-01 23:32:10 +00:00
fvogel 23d30205a5 Instead of fiddling with html tags, simply enlarge a bit the width in the CSS stylesheet. 2022-12-29 17:04:43 +00:00
fvogel dbd4edc3d5 Fix [8e811bc1f1]: Wrong formatting of arguments in man page 2022-12-28 20:39:17 +00:00
jan.nijtmans a1de562f5c First part of fix for [4a7397e0b3]: Take flags into account when deciding to do a binary fcopy or not. TODO: Handle generating an exception 2022-12-24 14:36:57 +00:00
jan.nijtmans 6a1c2d8f52 Merge 8.7 2022-12-21 21:43:59 +00:00
jan.nijtmans ecaf98ffad Make two more functions static 2022-12-21 21:07:33 +00:00
jan.nijtmans a01390fa0b Add 'interp' argument to some arith functions, for better error-handling 2022-12-21 20:43:53 +00:00
jan.nijtmans 1faa0cca77 Merge 8.7 2022-12-21 13:19:16 +00:00
jan.nijtmans e872538a2e Tweaks to dde and registry extension, so they "load" without 3th argument in Tcl 8.6 too. 2022-12-21 13:15:54 +00:00
jan.nijtmans 7561bdb176 Merge 8.7 2022-12-20 09:42:26 +00:00
jan.nijtmans ac4faee232 Fix [17a1cb8d6e2a51bd]. From now on, noncharacters are no longer rejected in -strict mode 2022-12-20 09:32:22 +00:00
jan.nijtmans af98d8fa20 Remove all checks for noncharacters 2022-12-19 22:19:59 +00:00
jan.nijtmans d61473e631 Merge 8.7 2022-12-19 15:44:27 +00:00
jan.nijtmans 5db223f8ec Add two testcases, showing how we can distinguish Invalid Byte sequences, Surrogates, and Noncharacters when an exception occurred. 2022-12-19 15:43:22 +00:00
jan.nijtmans 9dabd6f1ac When changing the -nocomplainencoding or -strictencoding settings of a channel, reset the CHANNEL_NEED_MORE_DATA and CHANNEL_ENCODING_ERROR flags, so we can continue reading the channel and find out what's going on. 2022-12-19 15:40:40 +00:00
jan.nijtmans 002511bea4 MODULE_SCOPE TclLengthOne (in stead of 2 separate static functions doing the same) 2022-12-18 18:08:38 +00:00
jan.nijtmans 8b3ccee931 Merge 8.7 2022-12-16 15:31:52 +00:00
jan.nijtmans 553147da53 Merge 8.6 2022-12-16 15:31:02 +00:00
jan.nijtmans c05419204a Update tclConfig.h.in 2022-12-16 15:26:40 +00:00
jan.nijtmans 42eb37a48c Merge 8.7 2022-12-16 15:19:30 +00:00
jan.nijtmans b82707b4a1 Merge 8.6 2022-12-16 15:18:19 +00:00
jan.nijtmans 2031d40f81 Add checks to the configure script for mknod, tcdrain and uname, for systems (like VxWorks) which don't have it. See [aa4d088e5d] 2022-12-16 15:16:56 +00:00
jan.nijtmans d748e3debf merge-mark 2022-12-16 12:19:52 +00:00
jan.nijtmans 0846deb770 merge-mark 2022-12-16 12:19:02 +00:00
jan.nijtmans f632ecb406 Now that 32-bit cygwin is dead, eliminate the need for --enable-64bit in a Cygwin build 2022-12-16 12:16:54 +00:00
jan.nijtmans 5d7537b823 Merge 8.7 2022-12-16 10:25:02 +00:00
jan.nijtmans fd98096770 Addendum to [https://core.tcl-lang.org/tips/doc/trunk/tip/601.md|TIP #601]. Add check for characters > U+10FFFF in utf-32. Since utf-8 cannot handle that, either replace it with the replacement character (-nocomplain) or throw an exception (-strict). 2022-12-16 10:23:56 +00:00
jan.nijtmans 4cca4b0b1c Merge 8.7 2022-12-16 09:50:33 +00:00
jan.nijtmans edee881fb2 Follow-up for [084ab982fe]: Use -strict to disable noncharacters. This change was only done for utf-8, but the same change should be done for utf-16 and utf-32 too 2022-12-16 09:40:03 +00:00
jan.nijtmans d762cb9331 Merge 8.7 2022-12-16 09:28:11 +00:00
jan.nijtmans a06b13bb4a Merge 8.7 2022-12-16 09:27:14 +00:00
jan.nijtmans c78879e707 Adapt iocmd-8.* testcases to change in previous commit 2022-12-16 09:25:54 +00:00
jan.nijtmans 94c928a859 Add testcase 2022-12-16 08:15:02 +00:00
jan.nijtmans 9faf91402b Make -strict work the same for UTF-16 as for UTF-8 2022-12-15 23:59:48 +00:00
jan.nijtmans 10775523d9 Merge 8.7 2022-12-15 14:39:26 +00:00
jan.nijtmans 7b36aa11b6 Fix Tcl_BadChannelOption(), new -nocomplainencoding and -strictencoding options were still missing (reported by Rolf Ade, thanks!) 2022-12-15 14:38:24 +00:00
jan.nijtmans 532559323e Merge 8.7 2022-12-13 07:44:12 +00:00
jan.nijtmans 2e1db6850f Clarify what "-strict" means for the utf-8 encoder, making it clear that this is not the same as "strict" in python 2022-12-13 07:42:17 +00:00
apnadkarni d9baa9e3de Merge 8.7 - change copyright in Windows build to UCal. 2022-12-12 06:11:22 +00:00
apnadkarni 53b2a5fdf9 Merge 8.6 - change copyright in Windows build to UCal. 2022-12-12 06:09:50 +00:00
apnadkarni 89be5d2d3d Change copyright in Windows rc from Activestate to UCal and others to match license. 2022-12-12 06:08:21 +00:00
jan.nijtmans 3251fdbab4 Merge 8.7 2022-12-11 18:16:16 +00:00
jan.nijtmans 196f704d08 More io test-cases. Mostly backported (and modified) from 9.0 2022-12-11 17:57:55 +00:00
jan.nijtmans 3b293d276c Merge 8.7 2022-12-09 23:27:19 +00:00
jan.nijtmans 4aa0db664d Fix [b8f575aa23]: eof erroneously flagged with not reported encoding read error 2022-12-09 23:23:24 +00:00
jan.nijtmans b81e0a5459 Merge 8.7. Adapt testcase, showing that after an encoding error we can change encoding and continue reading 2022-12-09 22:27:50 +00:00
jan.nijtmans 4f69a6f297 Fix compilation with tcc. Thanks, Cyan Ogilvie for the report 2022-12-09 19:55:38 +00:00
jan.nijtmans ae31cee4ae Add 2 unit-tests, for the 2 cornercases mentioned in the TIP. This shows that the fix works as expected 2022-12-09 14:53:25 +00:00
jan.nijtmans 768fa22c43 Partial solution for [b8f575aa23]. Still missing: 1) testcases. 2) What if both EOF and ENCODING_ERROR happens (because there is both an eofchar and an invalid byte in the stream) 2022-12-09 10:22:11 +00:00
jan.nijtmans 1a21edb592 Eliminate TclArithSeriesObjLength and TclArithSeriesObjStep from tclArithSeries.h: they can be static internal. 2022-12-08 17:17:48 +00:00
jan.nijtmans 62c5b0bfb7 Merge 8.7 2022-12-05 23:49:03 +00:00
jan.nijtmans a58f5f14b0 Merge 8.6 2022-12-05 23:31:44 +00:00
jan.nijtmans 7b53037339 dev_t -> unsigned for Cygwin in tcl.h, so we don't need sys/types.h any more. There's no gap in Tcl_StatBuf for 64-bit Cygwin 2022-12-05 23:05:25 +00:00
jan.nijtmans b8c736d82c Merge 8.7 2022-12-05 15:42:06 +00:00
jan.nijtmans d8d1a902ef There's no gap on Cygwin any more 2022-12-05 15:39:50 +00:00
jan.nijtmans ba427c0bc2 Merge 8.7 2022-12-05 15:35:05 +00:00
jan.nijtmans b1af92a6e9 On Cygwin, dev_t == unsigned, and long long == long 2022-12-05 15:33:57 +00:00
jan.nijtmans b58aa65f02 Merge 8.7 2022-12-05 13:11:31 +00:00
jan.nijtmans f029161eb7 Eliminate (gcc) warning in tclTest.c 2022-12-05 13:10:20 +00:00
jan.nijtmans 635dd1a696 Fix utf32 lables in testcases (some not necessary any more, one missing), indicating differences between Tcl 8.x and 9.0 2022-12-02 11:27:10 +00:00
jan.nijtmans 25b3cffdd2 Oops, that's the wrong one ... 2022-12-02 08:35:05 +00:00
jan.nijtmans ae11579286 Make options -nocomplain and -strictencoding truly independant. Leftover from initial implementation. Noted by Rolf Ade (thanks!) 2022-12-02 08:19:36 +00:00
jan.nijtmans 975b7c5dcb Merge 8.7 2022-12-01 17:36:04 +00:00
jan.nijtmans ef8a00717e Merge 8.6 2022-12-01 17:33:29 +00:00
jan.nijtmans b3838ea445 Backport TIP #402: General Platform UNC Support from 8.7, but only for Cygwin and QNX. This was already partially present, but was never completed. 2022-12-01 17:27:03 +00:00
jan.nijtmans 36c94773b4 Handle "deprecated" condition correctly in test-cases 2022-12-01 10:18:35 +00:00
jan.nijtmans fdb4ca1567 Merge 8.7 2022-11-30 21:46:57 +00:00
jan.nijtmans 6c7ad3b118 Let Tcl_GetEncodingNulLength() return size_t on 9.0, for consisancy with other API's. No change on 8.7 2022-11-30 21:16:15 +00:00
jan.nijtmans 4d23589861 Merge 8.7. This also fixes [133456085a] 2022-11-30 11:11:28 +00:00
jan.nijtmans a7d6b92abf Fix for [084ab982fe]: Use -strict to disable noncharacte 2022-11-30 10:48:40 +00:00
jan.nijtmans 5cb9dc5ddc Stop shimmering for "llength". Internal optimization (but using TIP #644) 2022-11-30 10:36:06 +00:00
jan.nijtmans c157333a7d Merge 8.7 2022-11-30 08:16:52 +00:00
jan.nijtmans f9ded1a928 Merge 8.7 2022-11-30 08:15:59 +00:00
jan.nijtmans 99e3536c5d Update to tzdata 2022g 2022-11-30 08:14:36 +00:00
jan.nijtmans 521b3bfb0e Update to tzdata 2022g 2022-11-30 08:12:16 +00:00
jan.nijtmans 111352203a merge-mark 2022-11-29 20:59:36 +00:00
jan.nijtmans a744c509d4 Remove ARGSUSED. More type-casts 2022-11-29 20:54:20 +00:00
jan.nijtmans e648065fe1 Merge 8.7 2022-11-29 16:07:45 +00:00
jan.nijtmans 6d6996d99f make Windows dde (-> 1.4.5) and registry (-> 1.3.7) extensions ready for the Tcl 9.0 era. 2022-11-29 16:05:33 +00:00
jan.nijtmans 4813d492ca Proposed fix for [084ab982fe]: Use -strict to disable noncharacters 2022-11-29 14:51:03 +00:00
jan.nijtmans 426dd171f6 Merge 8.7 2022-11-29 10:35:23 +00:00
jan.nijtmans 11af978f51 Merge 8.6 2022-11-29 10:33:42 +00:00
jan.nijtmans cdb467ed61 Update all "8.5" versions in Tcl_InitStubs() to "8.5-", since they can be compiled for Tcl 9.0 as well. 2022-11-29 10:30:41 +00:00
jan.nijtmans 8b03ef0b29 Merge 8.7 2022-11-28 23:44:33 +00:00
jan.nijtmans 71b0ad990c Reduce shimmering: If a conclusion can be drawn about the number of list elements, don't get the elements before the list length is checked 2022-11-28 23:16:31 +00:00
jan.nijtmans dabfa1a053 Merge 9.0. New macro ABSTRACTLIST_PROC 2022-11-28 15:58:49 +00:00
jan.nijtmans 8f6442b0c9 Merge 8.7 2022-11-28 15:08:04 +00:00
jan.nijtmans da196c3345 No reservation for TIP #648 any more in stub table. 2022-11-28 12:58:18 +00:00
jan.nijtmans 85f19595dc Merge 8.7 2022-11-28 12:34:28 +00:00
jan.nijtmans 18f90309e4 Use Tcl_Size for ArithSeries.len 2022-11-28 12:06:41 +00:00
jan.nijtmans 82fb7b1d55 size_t result for lengthProc. More usage of Tcl_GetWideUIntFromObj 2022-11-27 23:37:32 +00:00
jan.nijtmans 513b2d5031 HAS_ABSTRACTLIST_PROC 2022-11-26 23:57:26 +00:00
jan.nijtmans bfe8928bed Merge 9.0 2022-11-25 23:38:50 +00:00
jan.nijtmans ba490472b5 Remove "knownBug" constraint: no longer necessary 2022-11-25 22:40:47 +00:00
jan.nijtmans d0d0e3642f Merge 8.7 2022-11-25 22:08:19 +00:00
jan.nijtmans bc23abb929 (partial) fix for [6978c01b65] 2022-11-25 22:00:10 +00:00
jan.nijtmans 481aa42029 Merge 8.7 2022-11-25 16:26:04 +00:00
jan.nijtmans b816a585c0 Tcl_NewDoubleObj -> TclNewDoubleObj and Tcl_NewWideIntObj -> TclNewIntObj (and similar). Gives more info when debugging 2022-11-25 16:11:38 +00:00
jan.nijtmans 7bf0253a43 Merge 9.0 2022-11-25 10:16:35 +00:00
jan.nijtmans 73116e2c54 one more int -> size_t 2022-11-25 10:12:32 +00:00
jan.nijtmans 66e2117d20 Unbreak Windows build. More int -> size_t, being able to handle longer strings 2022-11-25 10:01:00 +00:00
jan.nijtmans 0bc6d7d341 merge-mark 2022-11-25 08:32:31 +00:00
jan.nijtmans d6fedf7854 Document some more differences between Tcl 8.7 and 9.0 in tcl.h 2022-11-25 08:31:21 +00:00
jan.nijtmans 191fa0458a Handle closeProc == NULL the same as closeProc == TCL_CLOSE2PROC in stead of panicing. Backported from 8.7 (undocumented feature) 2022-11-25 08:29:06 +00:00
jan.nijtmans 21920649b5 Move Tcl_Size definition earlier in tcl.h 2022-11-24 21:04:48 +00:00
jan.nijtmans 9faff5cc94 Merge 8.7 2022-11-24 17:44:02 +00:00
jan.nijtmans a4ac44fccc Fix gcc warning, seen on Ubuntu with select notifier 2022-11-24 17:43:12 +00:00
jan.nijtmans 3795a0f7dc Merge 8.7 2022-11-24 17:41:44 +00:00
jan.nijtmans ec4cf7a995 Use some more TCL_INDEX_NONE and Tcl_Size 2022-11-24 16:16:53 +00:00
jan.nijtmans ddf4a5f158 Use Tcl_GetByteArrayFromObj(... in stead of Tcl_GetBytesFromObj(NULL,.... Add some more error-checking for invalid byte-arrays 2022-11-24 14:05:58 +00:00
jan.nijtmans 2a569c94ef Since Tcl 9.0 throws exceptions on an illegal byte sequence (no longer simply truncates it), adapt test-case for that 2022-11-24 10:17:51 +00:00
jan.nijtmans 6932d0c2d0 Fix [da63e4c1e]: Crash in Tcl_WriteChars(). Make everything compile (again) with a C++ compiler. 2022-11-23 21:03:13 +00:00
jan.nijtmans 9c802c440b Writing characters > \xFF to a binary channel is deprecated, this will start throwing an exception in Tcl 9.0 2022-11-23 20:42:38 +00:00
jan.nijtmans e4f687d978 -1 -> TCL_INDEX_NONE 2022-11-23 20:41:34 +00:00
jan.nijtmans 826db93d76 Internal abstract list, don't let "llength" shimmer any more. 2022-11-23 17:04:18 +00:00
jan.nijtmans d8dac38437 Proposed fix for [da63e4c1e]. First version, not 100% as expected yet. 2022-11-23 15:21:29 +00:00
jan.nijtmans b432766202 Make "read" throwing a "illegal byte sequence" exception. Doesn't work for "gets" yet. 2022-11-23 12:15:24 +00:00
jan.nijtmans 52aada907a Merge 8.7 2022-11-23 09:26:06 +00:00
jan.nijtmans 5b4f454e1c Change assert, since the new flag CHANNEL_ENCODING_ERROR could be set as well 2022-11-23 09:24:06 +00:00
jan.nijtmans 42dae31b61 merge-mark 2022-11-23 07:43:17 +00:00
jan.nijtmans 86f51a0a0b Add mp_pack, mp_pack_count and mp_unpack to the libtommath stub table. Not used by Tcl, but can be used by extensions (backported from 8.7) 2022-11-23 07:38:49 +00:00
jan.nijtmans 7129a50b10 Re-generate configure scripts (with correct autoconf version) 2022-11-23 07:36:49 +00:00
jan.nijtmans e57b9fe9c3 Merge 8.7 2022-11-23 00:34:36 +00:00
jan.nijtmans 13eb211d5a leave unixInit-3.2 as-is 2022-11-23 00:19:46 +00:00
jan.nijtmans e37308d78c Merge 8.7 2022-11-23 00:09:05 +00:00
jan.nijtmans b5e5883c33 Progress in fixing [6978c01b65]. Not complete yet 2022-11-22 23:58:31 +00:00
dgp 096106f202 merge 8.7 2022-11-22 23:26:44 +00:00
dgp ff294480b9 merge 8.6 2022-11-22 23:25:57 +00:00
dgp 02892b17b9 merge release 2022-11-22 22:48:05 +00:00
jan.nijtmans d942525e22 Better -strict checking, with testcases 2022-11-22 22:25:46 +00:00
jan.nijtmans 976fff1b3a merge-mark 2022-11-22 20:12:49 +00:00
jan.nijtmans 95cac7dd26 Merge 8.5 2022-11-22 20:11:58 +00:00
jan.nijtmans eddb2b2801 Unused stub entries up to Tcl_DStringToObj() (for Tcl 8.7/9.0) 2022-11-22 20:08:07 +00:00
jan.nijtmans ef78b1558f Merge 8.7 2022-11-21 23:54:42 +00:00
jan.nijtmans c1e4942181 TIP #650: New function Tcl_GetWideUIntFromObj() 2022-11-21 23:54:06 +00:00
jan.nijtmans b1432e6e0d Mark unixInit-3.2 as "knownBug". See [fccb9f322f] 2022-11-21 23:52:36 +00:00
jan.nijtmans 948fd24ddb Remove TCL_OUT_LINE_COMPILE in favour of TCL_ERROR 2022-11-21 23:28:57 +00:00
jan.nijtmans 0fd21c5dd0 TCL_OUT_LINE_COMPILE is deprecated 2022-11-21 23:22:03 +00:00
jan.nijtmans 8a4e71640b Merge 8.7. More utf-8 checks with --strict 2022-11-21 22:01:54 +00:00
dgp 338c669267 improve accuracy of a changes line 2022-11-21 17:37:38 +00:00
jan.nijtmans 654f4d3b58 Merge 8.7 2022-11-21 16:20:09 +00:00
jan.nijtmans 23ef10a6a4 There is no guarantee that sizeof(Tcl_WideInt) == sizeof(double), so the offset of 'isDouble' in the struct could vary between ArithSeries and ArithSeriesDbl. Solution: put those fields last 2022-11-21 16:18:56 +00:00
jan.nijtmans 91e64fb475 indenting 2022-11-20 23:27:09 +00:00
jan.nijtmans e9cf2c8707 Merge 8.7 2022-11-20 23:22:26 +00:00
dgp e82a18be40 merge 8.7 2022-11-20 22:37:42 +00:00
dgp 49cb764a5a In most testing scenarios, the TCL_LIBRARY variable is masking a bug
in system encoding discovery.  Adapted test unixInit-3.2 to stop shielding
this problem from view.
2022-11-20 22:08:19 +00:00
dgp 8f9ddfae66 missing constraints 2022-11-20 21:39:43 +00:00
jan.nijtmans a53281f50b Rebase to latest 8.7 2022-11-20 20:14:07 +00:00
jan.nijtmans 2ba1a5f081 merge-mark 2022-11-20 19:35:01 +00:00
jan.nijtmans bfdd211de9 Don't use "package require tcltests" any more, as in other tests 2022-11-20 19:33:00 +00:00
jan.nijtmans b71ebc2746 Constraints http2.9.x make no sense, when testing http2.10 2022-11-20 19:29:53 +00:00
dgp f39cef2590 close fork 2022-11-20 19:18:51 +00:00
dgp 4e1d89f819 merge 8.6 2022-11-20 19:10:17 +00:00
jan.nijtmans a1a443ef1d Merge 8.7 2022-11-20 17:51:42 +00:00
jan.nijtmans 66386bc18b Merge 8.6. TIP #651 implementation (since there are already 2 YES votes, no NO votes expected) 2022-11-20 17:38:12 +00:00
dgp 0666836834 bump release date 2022-11-20 15:34:08 +00:00
dgp 0c93e6a978 merge 8.6 2022-11-20 14:22:33 +00:00
dgp 124340611e Newest tests must have most recent releases of http to pass. 2022-11-20 14:16:36 +00:00
jan.nijtmans 43d67c651c Merge 8.7 2022-11-19 16:22:24 +00:00
jan.nijtmans 797aa89a30 Merge 8.7 2022-11-19 16:12:56 +00:00
jan.nijtmans 90d13253bd Revert [52a52a65f0]. There appears to be a problem with the mp_pack function on Windows 2022-11-19 16:07:51 +00:00
jan.nijtmans 1c1ee1c59d Backout [52a52a65f0], let's see if this fixes the Windows crash 2022-11-18 21:43:40 +00:00
jan.nijtmans 0bcca87681 Backout [52a52a65f0], let's see if this fixes the Windows crash 2022-11-18 20:26:52 +00:00
jan.nijtmans 4245f0e5a3 merge-mark 2022-11-18 19:54:45 +00:00
jan.nijtmans 90a23f176d Fix [https://core.tcl-lang.org/thread/tktview?name=16bf24d70b|16bf24d70b]: Installed Thread for Tcl 8.7 breaks availability of Thread in 8.6 2022-11-18 19:43:09 +00:00
jan.nijtmans 2e64df7857 Merge 8.7 2022-11-18 19:18:12 +00:00
jan.nijtmans 78bce4ec93 Fix [bec4219123]: test utf-4.12 fails in custom builds 2022-11-18 19:17:32 +00:00
dgp 10a5b6e4c7 merge 8.6 2022-11-18 18:30:56 +00:00
dgp 3e4ac217aa Bring back the common facilities of the tcltests "package", but use a less
fragile method to gain access to them.
2022-11-18 17:53:54 +00:00
jan.nijtmans ae54d4dd89 Another bug in TIP #628: dde and registry extensions didn't really load in tclsh8.7. One reason: handle TclpReaddir correctly in tcl8 compatibility mode 2022-11-18 16:24:27 +00:00
dgp 2eebbe64ab merge 8.6 2022-11-18 15:30:50 +00:00
jan.nijtmans a65db858ff Fix bug in TIP #628: Tcl 8.x version of registry/dde dll was not correct 2022-11-18 15:24:44 +00:00
jan.nijtmans dc6366fef8 TIP #644: Make Tcl_ObjType extensible 2022-11-17 20:29:59 +00:00
jan.nijtmans b669079dd6 Add dummy TCL_OBJTYPE_V0 #define. Minimal no-op backport of TIP #644 2022-11-17 20:24:20 +00:00
jan.nijtmans 0824522016 Merge 8.7 2022-11-17 11:20:03 +00:00
jan.nijtmans 8b9fe0fa53 doc update 2022-11-17 11:18:51 +00:00
apnadkarni e0becc6161 TIP 651 implementation 2022-11-17 04:54:02 +00:00
apnadkarni 2a62e1f0dd Merge 8.7 - reserve stub entry 687 2022-11-17 03:54:14 +00:00
apnadkarni 00c7d174e4 Reserve stub entry 687 for TIP #651 2022-11-17 03:52:45 +00:00
jan.nijtmans 197060f097 one more (Tcl_UniCharToUtf), and adapt documentation 2022-11-16 20:52:30 +00:00
jan.nijtmans f9c4e3a8b2 Change 5 functions signatures from int -> size_t. Those should have been part of TIP #494 (Thanks, Gustaf!) 2022-11-16 20:39:34 +00:00
jan.nijtmans 640c0098d1 Merge 8.7 2022-11-16 09:43:42 +00:00
jan.nijtmans c432e303c0 http 2.10a4 -> 2.10b1, for upcoming release 2022-11-16 09:37:42 +00:00
jan.nijtmans a6680c4b9f Merge 8.7 2022-11-15 22:15:47 +00:00
jan.nijtmans bc7b50deb0 Make httpd11.tcl work with Tcl 8.6 too 2022-11-15 22:09:09 +00:00
jan.nijtmans b3caf035b4 Merge 8.7 2022-11-15 14:39:11 +00:00
jan.nijtmans 5f892535a1 Merge 8.7 2022-11-15 14:36:58 +00:00
jan.nijtmans 9d2a40a826 Reserve stub entries 684/685 for TIP #648 and 686 for TIP #650 2022-11-15 14:36:01 +00:00
jan.nijtmans d13a3cd502 New function Tcl_GetWideUIntFromObj 2022-11-15 14:03:34 +00:00
jan.nijtmans 1412e9b9f0 Merge 8.7 2022-11-15 13:31:35 +00:00
jan.nijtmans 870cb82c96 Change all mp_to_ubin() usages to mp_pack(). It makes the code much more clear 2022-11-15 13:06:59 +00:00
jan.nijtmans 386c7ea2d3 Since this FIXME! is already fixed, adapt documentation 2022-11-15 11:24:44 +00:00
jan.nijtmans c381a17784 Merge 8.7 2022-11-15 11:04:26 +00:00
jan.nijtmans 79f559fdb5 Add mp_pack to the libtommath stub-table: it's easier to work with than mp_to_ubin 2022-11-15 10:57:59 +00:00
dgp 1a3ade0a6f merge 8.6 2022-11-14 17:24:56 +00:00
dgp 2a1443e0e0 Test suite hygiene
- Several tests missing the "testdstring" constraint
  - [package require tcltests] is fragile, and almost all test files that
    had it were not making use of anything it provides.  Removed.
2022-11-14 17:23:52 +00:00
jan.nijtmans 369b286297 Merge 8.7 2022-11-13 21:26:11 +00:00
jan.nijtmans 14225bf184 fix filename 2022-11-13 21:25:31 +00:00
jan.nijtmans 84e2b419ac Rebase to latest 9.0 2022-11-13 19:02:37 +00:00
jan.nijtmans 64adc99e08 Merge 8.7 2022-11-13 16:58:46 +00:00
jan.nijtmans 46a5d4b5fa Fix compilation error for STATS=memdbg. Fix incorrect comment 2022-11-13 16:53:43 +00:00
apnadkarni 7dc710b2f4 Update Tcl_ObjType documentation 2022-11-13 06:37:55 +00:00
apnadkarni da2f3cbd20 Merge trunk 2022-11-13 06:23:50 +00:00
apnadkarni 67e92c7ada Fix compilation error for STATS=memdbg 2022-11-13 06:06:43 +00:00
jan.nijtmans 2a94e80188 Merge 8.7 2022-11-11 21:51:31 +00:00
jan.nijtmans 874327229c Add (internal) TclNewUIntObj(), and use it to fix TCL_LINK_WIDE_UINT for big (>= 2^63) integers. With testcase 2022-11-11 21:09:21 +00:00
jan.nijtmans 1b232cf14c Merge 8.7 2022-11-11 09:59:24 +00:00
kjnash b2b0452937 Merge http-bugfixes-2022H2. Fix bugs in recent http.tcl code related to https over a proxy server, especially cleanup after a failed CONNECT request to the proxy. Add new tests to httpProxy.test. 2022-11-10 17:10:49 +00:00
kjnash 1684b35abb Merge 8.7 2022-11-10 17:00:28 +00:00
jan.nijtmans 6065eb2868 Forgot one TCL_OBJTYPE_V0 2022-11-10 11:20:02 +00:00
jan.nijtmans 50f633ff28 No trailing ',' 2022-11-09 17:15:52 +00:00
apnadkarni 973b944b33 Merge trunk. Also update Tcl_ObjType.version to match TIP 644 2022-11-09 13:45:46 +00:00
dgp 7c58993680 update target release date 2022-11-09 13:15:55 +00:00
kjnash 822d3017ef Bugfix to socketPhQueue. Add some Log commands for debugging. 2022-11-09 10:53:23 +00:00
jan.nijtmans e18b1490d5 Merge 8.7 2022-11-08 22:15:37 +00:00
jan.nijtmans a90bc45a54 int -> size_t in Tcl_CmdObjTraceProc2 (for 'level'). Add missing documentation 2022-11-08 21:58:01 +00:00
jan.nijtmans b6c0957a8f More int -> size_t (argc and level) in trace handling 2022-11-08 20:27:01 +00:00
jan.nijtmans 0423cdcf31 Merge 8.7 2022-11-08 10:01:41 +00:00
jan.nijtmans 2afe485f41 NEVER use sizeof(FLEXARRAY)! Use offsetof() 2022-11-08 09:59:28 +00:00
jan.nijtmans 742323f725 Merge 8.7 2022-11-08 07:31:35 +00:00
jan.nijtmans 008001c3b5 More TCLFLEXARRAY usage 2022-11-08 07:30:42 +00:00
jan.nijtmans 7e8c940ac1 Fix "package files tcl", considering TIP #590 2022-11-08 07:28:44 +00:00
kjnash e977d6e7af library/http/http.tcl - bugfix OpenSocket to replay any requests in the socketPhQueue placeholder queue, if the socket was not created. 2022-11-07 22:06:42 +00:00
jan.nijtmans 03a9eaa951 Use TCLFLEXARRAY 2022-11-07 22:04:59 +00:00
kjnash c3e9fc9aed library/http/http.tcl - define http::socketProxyId and use it to record the proxy (if any) used by each persistent socket. Minor fix to socketPhQueue. 2022-11-07 22:02:33 +00:00
kjnash 0a9238b48a library/http/http.tcl - in http::SecureProxyConnect, bugfix state(proxyUsed) so the correct value SecureProxyFailed or SecureProxy is returned. 2022-11-07 21:53:19 +00:00
kjnash 95b74de5c2 library/http/http.tcl - in http::SecureProxyConnect and its caller, bugfix cleanup after 407 from HTTPS proxy. Close the connection to the proxy. Do not copy all values of state() from the proxy CONNECT to the main request, especially leave out state(sock). Raise an error for a 3xx and 401 response to CONNECT. In http::Event, trap TLS handshake errors in a place where they do not occur for a non-proxy request. 2022-11-07 21:49:08 +00:00
kjnash 4c3d010bff library/http/http.tcl - replace lremove with lreplace for compatibility with 8.6. 2022-11-07 21:44:39 +00:00
kjnash bf454b34d5 tests/httpProxy.test - add new tests for cleanup (mainly after 407 request) by checking that a second request is handled correctly. 2022-11-07 21:40:55 +00:00
kjnash aed83779fd tests/httpProxy.test - test for leftover socket placeholders, improve result layout, for https fetch with status 407 expect result SecureProxyFailed not SecureProxy. 2022-11-07 21:35:41 +00:00
jan.nijtmans af07dcfdda Merge 8.7 2022-11-07 21:16:31 +00:00
jan.nijtmans 82a4bb8618 Deprecate TclpHasSockets(): Every system nowadays has sockets 2022-11-07 20:46:49 +00:00
kjnash d9c7aa01ef Merge 8.7 2022-11-07 19:09:09 +00:00
jan.nijtmans 44ce8c245f TclInitSockets() only exists on Windows 2022-11-07 10:50:39 +00:00
jan.nijtmans fac57136f2 Remove TclpHasSockets(): Every system nowadays has sockets 2022-11-06 21:01:12 +00:00
jan.nijtmans b07c7ad8ae Update Tcl_Filesystem documentation 2022-11-06 20:27:51 +00:00
apnadkarni c3c5a80a02 Merge 8.7. lreplace4 bcc instruction and FLT_MAX fix 2022-11-05 11:49:08 +00:00
apnadkarni d9033672db Add lreplace4 BCC instruction. Rewrite linsert, lreplace to use it. 2022-11-05 10:28:32 +00:00
jan.nijtmans 4e5e2be585 Fix for [85ce4bf928]: binary format R Inf] stores FLT_MAX 2022-11-05 10:08:36 +00:00
apnadkarni dbfc7435e6 Merge core-8-branch 2022-11-05 09:27:11 +00:00
apnadkarni f768eb3bf2 Rewrite lreplace4 implementation not to need extra immediate operands. 2022-11-03 17:04:07 +00:00
apnadkarni 6559f4084e Bug [0f98bce669]. Fix limits for string replace. 2022-11-03 12:26:41 +00:00
jan.nijtmans 9cc14dacd9 Fix formatting of error-message 2022-11-03 08:15:19 +00:00
apnadkarni 5a3d2ddfed Bug #0f98bce669 - string cat support for > 2**31 characters. Tests pending 2022-11-02 16:28:59 +00:00
jan.nijtmans 59ee35fd38 Fix testcase failure (assemble-15.9), only seen on 32-bit 2022-11-02 16:25:59 +00:00
jan.nijtmans 330034ec02 Make Tcl_WCharToUtfDString() usable (again) on Windows. Was lost due to previous commit 2022-11-02 16:20:27 +00:00
jan.nijtmans 3920a8f42a Fix [d2c2baac2]: Tcl 9 32-bit build exits immediately with stack overflow on Windows 2022-11-02 16:02:07 +00:00
apnadkarni 0dfd2bdc9d Bug #0f98bce669 - string repeat support for > 2**31 characters 2022-11-02 15:56:42 +00:00
jan.nijtmans 809aebe98e Proposed fix for [85ce4bf928]: Fix for problems with storing Inf with [binary format R] 2022-11-02 15:00:38 +00:00
jan.nijtmans 366778e86e Fix [00cced7b87]: Incorrect handling of indices > 0x80000000 in byte compiler (64-bit Tcl) 2022-11-02 13:18:42 +00:00
jan.nijtmans a8faa8e87d Merge 8.7 2022-11-02 10:46:49 +00:00
jan.nijtmans 6ab05e04d1 If CFLAGS contains -DTCL_NO_DEPRECATED, remove TclInitCompiledLocals. More code cleanup (backported from 9.0) 2022-11-02 10:00:17 +00:00
jan.nijtmans 7b395ecf51 code cleanup (e.g. ProcGetIntRep -> ProcGetInternalRep, size_t -> Tcl_Size) 2022-11-02 08:30:20 +00:00
jan.nijtmans da371061f6 Merge 8.7 2022-11-02 08:04:16 +00:00
jan.nijtmans 954b5db3bb Make robust against TIP #288 proposed change 2022-11-02 08:02:00 +00:00
jan.nijtmans ec21e9f7de Merge 8.7. Eliminate gcc warning 2022-11-01 22:04:09 +00:00
jan.nijtmans cbbee69874 Backout previous change: test-cases are failing 2022-11-01 21:45:49 +00:00
jan.nijtmans 4b553938e3 Merge 8.7 2022-11-01 17:06:52 +00:00
jan.nijtmans 67319477f1 Bug-fix for TIP #502 implementation: Two missing out-of-bound situations in TclIndexEncode(), one for index > MAX_INT, one for index < end-MAX_INT 2022-11-01 17:02:02 +00:00
jan.nijtmans 4d9dcbbcbc Two missing out-of-bound situations in TclIndexEncode(), one for index > MAX_INT, one for index < end-MAX_INT 2022-11-01 16:13:26 +00:00
dgp c837d06e2b merge 8.6 2022-11-01 14:17:55 +00:00
griffin 026e32d86a Fix refCount crash. Improve ArithSeries regression coverage. 2022-11-01 02:05:11 +00:00
apnadkarni d9a19f9512 Bytecode compiler for ledit 2022-10-30 17:41:56 +00:00
jan.nijtmans 66a9d2307a Merge 8.7 2022-10-30 14:29:25 +00:00
jan.nijtmans 3516771eb6 Merge 8.6 2022-10-30 14:28:50 +00:00
jan.nijtmans a76725bab7 Merge 8.5. Update to tzdata 2022f 2022-10-30 12:55:36 +00:00
jan.nijtmans 1e2cce6389 Update to tzdata 2022f 2022-10-30 12:52:39 +00:00
jan.nijtmans e2ee6601c9 One more unused stub entry 2022-10-30 12:51:57 +00:00
apnadkarni b2223e8eaf New bytecode implementation for lreplace 2022-10-30 10:43:58 +00:00
apnadkarni 5da6b8e3c3 New bytecode for linsert 2022-10-30 04:27:03 +00:00
apnadkarni 61814ba324 Implement lreplace4 BCC instruction 2022-10-30 03:04:11 +00:00
dgp a0fa55773b merge 8.7 2022-10-29 16:36:49 +00:00
dgp 60da2df16c [c7f3977380] Balance stack operations in the mode with no Thread package. 2022-10-29 16:35:11 +00:00
jan.nijtmans 41c34da9da Simplify -eofchar parsing (just check for " {}" at the end, in stead of full list parsing) 2022-10-29 14:08:52 +00:00
dgp f27f0773c4 Update test result 2022-10-28 17:50:50 +00:00
jan.nijtmans 6ea0113127 Merge 8.7 2022-10-28 16:40:18 +00:00
dgp f8f170cfd3 Duplicate test names 2022-10-28 16:18:29 +00:00
oehhar 38e64470ca Merge mark with no changes to avoid to get the core-8-changes in main. 2022-10-28 16:14:36 +00:00
oehhar 5ba7f2ce37 Document TCL 8.7 behaviour of TIP601 and TIP607. 2022-10-28 16:10:17 +00:00
oehhar ebaccb9022 Merge core-8-branch 2022-10-28 16:00:48 +00:00
oehhar b0b713c9dc Close fork 2022-10-28 15:54:15 +00:00
oehhar 78241e0ee7 TIP346, TIP607, TIP601: document encoding command 2022-10-28 15:53:09 +00:00
dgp 0faf7ec075 merge 8.6 2022-10-28 15:30:53 +00:00
dgp d3cc950d62 merge 8.6 2022-10-28 15:19:56 +00:00
oehhar 98005a91dc Merge core-8-branch 2022-10-28 15:03:05 +00:00
oehhar a333cf0f8e Correct issues in safe.n reported by tcltk-man2html.tcl 2022-10-28 14:58:52 +00:00
dgp 6db74fe6eb The file $(builddir)/tclUuid.h is not part of the source code distribution.
The `make distclean` target should delete it.
2022-10-28 14:37:56 +00:00
oehhar 1f207f9a0d Resolve tcltk-man2html.tcl errors in fconfigure.n 2022-10-28 13:51:18 +00:00
oehhar 9d428d86eb Resolve tcltk-man2html.tcl errors in fconfigure.n 2022-10-28 13:50:46 +00:00
oehhar 008d15c04e fconfigure man: correct chapter syntax 2022-10-28 13:36:21 +00:00
oehhar d48c9ac13e TIP 633 and TIP 346: add man page entry for fconfigure (TCL 8.7) 2022-10-28 13:33:55 +00:00
oehhar 8fb4c52383 TIP 633 and TIP 346: add man page entry for fconfigure 2022-10-28 13:18:55 +00:00
dgp 0b20d5aff1 Restore test suite fix. If [try] is too confusing, then I will use [eval].
The stack is a stack of commands.

Test hygiene.  This was creating one more thread than it destroyed.
In a -singleproc 1 test run, this caused tests in later test files to fail
because the stray thread causes test results to be different.
2022-10-28 12:55:40 +00:00
jan.nijtmans 18fb378072 TIP #646 correction: let "fconfigure $chan -eofchar" return a single character, not a list element 2022-10-28 11:18:53 +00:00
jan.nijtmans d1e2a1ab3c Merge 8.7 2022-10-27 22:01:49 +00:00
jan.nijtmans c0cffed37f backout [95cb836c8c]: "try [lpop threadStack]", that cannot be right 2022-10-27 21:58:38 +00:00
jan.nijtmans f87e100731 try -> catch 2022-10-27 21:19:36 +00:00
jan.nijtmans 63b8879b83 Merge 8.7 2022-10-27 21:02:32 +00:00
dgp c74a13788a duplicate test names 2022-10-27 18:38:55 +00:00
dgp d74dc7638c Test hygiene. This was creating one more thread than it destroyed.
In a -singleproc 1 test run, this caused tests in later test files to fail
because the stray thread causes test results to be different.
2022-10-27 17:10:04 +00:00
dgp 81696e00bb merge 8.6 2022-10-27 14:43:37 +00:00
dgp 949e577fe0 merge 8.6 2022-10-27 14:35:43 +00:00
dgp a7a483bf2a Revised fix to the -singleproc 1 issue in load.test 2022-10-27 14:35:12 +00:00
dgp 237a5ad333 merge 8.6 2022-10-27 14:10:59 +00:00
jan.nijtmans 6de2b2c1d6 Handle TCL_ENCODING_STRICT and TCL_CLOSE2PROC correctly, when building in --with-tcl8 mode 2022-10-27 14:01:17 +00:00
dgp 4a0240f153 In a -singleproc 1 test run, [info loaded] can report libraries brought in
by other test files.  Protect the tests that care about that.
2022-10-27 13:48:34 +00:00
jan.nijtmans 2a8ceac888 Fix [8e2d10698b]: ioCmd.test tests need updates for -eofchar changes 2022-10-27 13:33:10 +00:00
jan.nijtmans dac15673b8 Merge 8.7 2022-10-27 07:13:44 +00:00
jan.nijtmans 0a6e6c4977 TIP #468: Support Passing TCP listen Backlog Size Option to TCP Socket Creation 2022-10-27 07:11:49 +00:00
dgp 6e31c76fb5 merge 8.6 2022-10-27 00:21:08 +00:00
kjnash bc27d6bcb6 Merge http-bugfixes-2022H2 - fix ticket 1173760, https over proxy server. 2022-10-26 12:39:28 +00:00
kjnash 1e0a98c9aa Merge 8.7 2022-10-26 12:35:18 +00:00
kjnash 2ecf92f50b Minor changes to http tests. 2022-10-26 11:28:29 +00:00
jan.nijtmans b8b4026cbf TIP #646: Change -eofchar handling 2022-10-26 09:55:41 +00:00
jan.nijtmans 42b1c58705 merge-mark 2022-10-26 09:44:42 +00:00
jan.nijtmans 27f09fdb5c www.tcl-tk.org -> www.tcl-lang.org 2022-10-26 09:43:48 +00:00
jan.nijtmans 837f6c4dc0 TIP #646: Change -eofchar handling (Tcl 8.7 part) 2022-10-26 09:36:30 +00:00
kjnash ba62d5de6e Fix bug 1173760 (proxy server for https). Add http::config options -proxynot, -proxyauth. 2022-10-25 16:23:54 +00:00
jan.nijtmans 3bbc297ec7 Merge 8.7 2022-10-25 13:22:46 +00:00
jan.nijtmans d33fc57550 Some more int -> Tcl_Size conversions, making the diff with the Tcl 9.0 header-files smaller 2022-10-25 12:23:26 +00:00
apnadkarni 53f5424bb2 Create new branch named "apn-bcc" 2022-10-25 11:42:07 +00:00
jan.nijtmans 415503775a Merge 8.7 2022-10-25 08:48:44 +00:00
jan.nijtmans cb8b6e12a2 Merge 8.6. Bug in rules.vc (visible in Tk: handle TK_MAJOR_VERSION the same as TCL_MAJOR_VERSION) 2022-10-25 08:47:55 +00:00
jan.nijtmans df72732868 Since MacOS 12.6 reports as 12.5 .... 2022-10-25 06:12:11 +00:00
jan.nijtmans 728edc0cbf Merge 8.7 2022-10-24 12:01:54 +00:00
jan.nijtmans 1dfa3c7740 Merge 8.6 2022-10-24 11:57:17 +00:00
jan.nijtmans 2c5609394c Fix env-2.1, env-2.2, env-2.1, env-2.3, env-2.4, env-3.1, env-4.1, env-4.3, env-4.4, env-4.5 testcases on win32 2022-10-24 11:54:10 +00:00
jan.nijtmans 7894a24f8f Merge 8.7 2022-10-23 20:44:02 +00:00
jan.nijtmans 33ac44d5e4 Merge 8.7 2022-10-23 20:42:06 +00:00
jan.nijtmans 4288b3bee9 Add support for macOS Ventura 2022-10-23 20:40:32 +00:00
jan.nijtmans 5a60ace74d off-by-one in TCL_MAJOR_VERSION check 2022-10-23 14:46:44 +00:00
jan.nijtmans 24512e7131 Merge 8.7 2022-10-23 14:40:36 +00:00
jan.nijtmans 1f58beed10 Change back some Tcl_Size usages to int (e.g. in MODULE_SCOPE definitions) 2022-10-23 14:32:54 +00:00
jan.nijtmans 649be23ea6 Change back some Tcl_Size usage to size_t (e.g. in MODULE_SCOPE definitions, which are not supported by TIP #628) 2022-10-23 14:08:49 +00:00
jan.nijtmans d9708a0e08 Rebase to latest 9.0 2022-10-23 13:40:39 +00:00
jan.nijtmans ccb5ae0529 Merge 9.0 2022-10-23 13:39:40 +00:00
jan.nijtmans 5ae2506499 TIP #628: Shared 8.7/9.0 build environment 2022-10-23 11:00:48 +00:00
jan.nijtmans f833c48881 Merge 8.7 2022-10-23 10:53:41 +00:00
jan.nijtmans 12d41d9775 Update rules.vc to version 11 (with TIP #628 support) 2022-10-23 10:44:39 +00:00
jan.nijtmans a8896d0fd0 TIP #641: Let Tcl_GetBoolean(FromObj) handle (C99) bool 2022-10-23 10:43:04 +00:00
jan.nijtmans b184464e94 Merge 9.0 2022-10-23 00:16:47 +00:00
jan.nijtmans dd5c058db2 Merge 8.7 2022-10-23 00:01:24 +00:00
jan.nijtmans 9cfb05d5b2 TIP #643: Provide a public API to retrieve nul terminator length for an encoding 2022-10-22 23:48:10 +00:00
dgp a77ee23ce2 merge 8.6 2022-10-22 11:53:32 +00:00
jan.nijtmans 0343f605e6 Merge 9.0 2022-10-21 15:28:15 +00:00
jan.nijtmans c74a310d21 Merge 8.7 2022-10-21 15:18:11 +00:00
jan.nijtmans 500e1529f1 typedef Tcl_Size as int (which is the Tcl 8.7 part of TIP #628) 2022-10-21 15:00:03 +00:00
jan.nijtmans c08af43916 Don't bother _MSC_VER < 1900 any more 2022-10-21 14:58:54 +00:00
jan.nijtmans c8a85bbc05 Change version field to Tcl_ObjTypeVersion 2022-10-21 09:01:36 +00:00
jan.nijtmans 95b85f336a Rebase to 9.0 2022-10-21 08:55:50 +00:00
jan.nijtmans 106d95266d Merge 8.7 2022-10-21 08:53:46 +00:00
jan.nijtmans 31489aa2fa Merge 8.6 2022-10-21 08:25:51 +00:00
jan.nijtmans 5a7f45638f Fix [d554e5554e]: fix typo “defintion” 2022-10-20 15:31:47 +00:00
jan.nijtmans 50abb43dbe Fix [af65af3655]: clock.n: unbalanced parenthesis 2022-10-20 15:28:10 +00:00
jan.nijtmans 0d62ec8715 Merge 8.7 2022-10-20 15:21:13 +00:00
jan.nijtmans 72bac6d72c Merge 8.7 2022-10-20 15:18:13 +00:00
jan.nijtmans ef9867bd58 Merge 9.0 2022-10-20 15:17:13 +00:00
jan.nijtmans 94f27cdf49 Merge 8.7 2022-10-20 15:15:27 +00:00
jan.nijtmans 3405e90b04 Merge 8.7 2022-10-19 20:07:52 +00:00
dgp 4d0d124928 merge 8.6 2022-10-19 16:29:21 +00:00
kjnash d2d5e829ae Merge 8.7 2022-10-19 13:31:18 +00:00
dgp c84fb00aed Draft updates to changes file for 8.6.13 release. 2022-10-18 19:37:44 +00:00
jan.nijtmans 7972edd0e2 Merge 9.0 2022-10-18 15:34:13 +00:00
jan.nijtmans c0b6a93d8f Fix [20157fbd14]: Failed tests safe-9.[67], since "-autoPath" is added 2022-10-18 14:42:27 +00:00
jan.nijtmans 59dd8794c5 Change the default for AutoPathSync in Tcl 9.0 (as described in TIP #579) 2022-10-18 13:35:53 +00:00
jan.nijtmans 19d02aa031 Merge 9.0 2022-10-18 13:06:47 +00:00
jan.nijtmans 4ee4ed8efe Merge-mark 2022-10-18 13:05:31 +00:00
jan.nijtmans f748e43a22 Merge 8.7 2022-10-18 12:55:01 +00:00
jan.nijtmans bff9eb8b3b TIP #579 implementation: Improved auto_path for Safe Base interpreters 2022-10-18 12:37:58 +00:00
jan.nijtmans 842fb667f5 Allow any single character for -eofchar, even if it's not a valid list 2022-10-18 10:25:35 +00:00
jan.nijtmans 39c9836950 Allow any single character for -eofchar, even if it's not a valid list 2022-10-18 10:12:51 +00:00
jan.nijtmans d9174b0f8d Merge 9.0. More strict -eofchar parsing 2022-10-17 20:18:43 +00:00
jan.nijtmans f1806f6f50 Merge 8.7 2022-10-17 20:04:36 +00:00
jan.nijtmans a76f86e565 Merge 8.7 2022-10-17 19:46:07 +00:00
dgp 51448d4167 Implementation of TIP 637. 2022-10-17 19:23:28 +00:00
dgp ce85e0375a merge 8.7 2022-10-17 18:43:28 +00:00
dgp d04ef78cd6 merge 8.6 2022-10-17 17:55:38 +00:00
jan.nijtmans e50b4e4c59 Merge 9.0. Change the default -eofchar on Windows 2022-10-17 10:49:43 +00:00
jan.nijtmans a11e803c73 Merge 8.7 2022-10-16 17:57:26 +00:00
jan.nijtmans 3c0ca65978 Minor change to -eofchar handling 2022-10-16 17:56:23 +00:00
jan.nijtmans 6cda753ae0 new TIP about -eofchar handling 2022-10-16 11:10:36 +00:00
jan.nijtmans c5a0eca4bc Merge 8.7 2022-10-14 22:26:38 +00:00
jan.nijtmans 1d1c1fb982 Merge 8.7 2022-10-14 20:55:35 +00:00
jan.nijtmans e245507505 Merge 9.0 2022-10-14 13:46:06 +00:00
jan.nijtmans ca67362ec8 Merge 8.7 2022-10-14 13:37:16 +00:00
jan.nijtmans e7e044e968 Build-fix 2022-10-14 11:22:20 +00:00
jan.nijtmans 5ba73ded05 Merge 9.0 2022-10-13 21:28:55 +00:00
jan.nijtmans c4ac9665cb merge-mark 2022-10-13 21:28:12 +00:00
jan.nijtmans a64794ef40 Merge 8.7 2022-10-13 21:12:07 +00:00
jan.nijtmans 0f77e154ab More progress in handling rules.vc 2022-10-13 14:56:20 +00:00
jan.nijtmans 7e5d03d4cc Merge 8.7 2022-10-13 10:40:23 +00:00
jan.nijtmans 8886d91a73 rebase to 8.7. Add documentation 2022-10-13 10:31:22 +00:00
jan.nijtmans 138fdcf62c Merge 8.7 2022-10-13 09:15:37 +00:00
jan.nijtmans 0bb9723a64 Merge 9.0 2022-10-13 09:14:04 +00:00
jan.nijtmans bef79e3c75 Merge 9.0 2022-10-13 09:11:02 +00:00
jan.nijtmans 1ce12936bb Merge 8.7 2022-10-13 09:08:12 +00:00
jan.nijtmans 4addfd1f1e Extract TIP #637 implementation from "novem" branch 2022-10-12 16:04:12 +00:00
jan.nijtmans 45952551e2 Rebase to 9.0 2022-10-12 12:37:52 +00:00
jan.nijtmans 58462852c6 Merge 8.7 2022-10-12 11:26:18 +00:00
jan.nijtmans 8edc9b3888 Rebase to 8.7 2022-10-12 11:22:47 +00:00
jan.nijtmans 24b2e0513d Merge 8.7 2022-10-12 10:50:38 +00:00
dgp 18aaf57faf merge 8.6 2022-10-11 18:26:51 +00:00
apnadkarni aa198f54a8 Merge 9.0 2022-10-11 16:45:30 +00:00
jan.nijtmans a1b8aa387d Merge 8.7 2022-10-11 15:55:06 +00:00
jan.nijtmans 7a961752a9 Make TCL_ENCODING_STRICT and TCL_ENCODING_NOCOMPLAIN work independant from each other (suggested by Harald Oehlmann) 2022-10-11 15:48:43 +00:00
apnadkarni 4391b633d9 TIP 644 - Make Tcl_ObjType extensible 2022-10-11 15:07:33 +00:00
jan.nijtmans 5bef9acff1 Update man-page 2022-10-11 14:41:29 +00:00
jan.nijtmans d6c7097242 Merge 9.0 2022-10-11 14:40:13 +00:00
jan.nijtmans f284e2a2d8 merge fork 2022-10-11 14:39:43 +00:00
jan.nijtmans bc48d7a26e Merge 8.7 2022-10-11 14:37:35 +00:00
jan.nijtmans 8c301f2c53 Merge 8.7 2022-10-11 14:04:36 +00:00
sbron 6b05e4086f Update Tcl_TraceVar manual page. 2022-10-11 10:37:03 +00:00
jan.nijtmans 622fa7382f Merge 8.7 2022-10-11 06:41:59 +00:00
jan.nijtmans b17bb4724c Making a start fixing [6978c01b65]: Channel encoding difference 8.6 <-> 9.0 2022-10-11 06:22:10 +00:00
jan.nijtmans b2c3781bb0 Merge 8.7 2022-10-10 15:22:13 +00:00
jan.nijtmans d2a2b049b7 Merge 8.7 2022-10-10 11:20:26 +00:00
jan.nijtmans 131bf290a5 Merge 8.7 2022-10-09 20:59:49 +00:00
jan.nijtmans 8958065cc3 Merge 8.7 2022-10-09 16:29:02 +00:00
jan.nijtmans ae9355b9f2 Merge 8.7 2022-10-09 16:16:31 +00:00
jan.nijtmans 1f8db5d00d Merge 9.0 2022-10-08 17:17:04 +00:00
jan.nijtmans 56de8426b7 Merge 8.7 2022-10-08 17:02:45 +00:00
jan.nijtmans e502bcacc7 Merge 9.0 2022-10-08 16:44:21 +00:00
jan.nijtmans a79de57d37 Merge 8.7 2022-10-08 15:43:40 +00:00
jan.nijtmans 891c0fbcaa Merge 9.0 2022-10-07 22:56:15 +00:00
jan.nijtmans 6b3bcba42d Merge 8.7 2022-10-07 15:21:04 +00:00
jan.nijtmans 7d93750b87 Merge 8.7 2022-10-07 14:15:15 +00:00
apnadkarni ded4be46c9 Merge 8.7 tests for memory leaks in list C API 2022-10-07 11:44:36 +00:00
jan.nijtmans 15f8c1d28b Merge 8.7 2022-10-07 11:19:06 +00:00
jan.nijtmans d80b660921 TIP #640: Remove Tcl_SaveResult 2022-10-06 13:36:24 +00:00
jan.nijtmans 5d7d542b25 Merge 8.7 2022-10-06 10:15:49 +00:00
jan.nijtmans 36fcd880b6 TIP #634: Remove inconsistency in variable tracing of an array 2022-10-05 07:39:44 +00:00
jan.nijtmans a019958ca7 Merge 8.7 2022-10-05 07:36:50 +00:00
griffin 4b1d6e9ae2 Fix some bugs in lseq 2022-10-04 22:05:19 +00:00
dgp dfa6b32e11 silence compiler warning 2022-10-04 18:25:18 +00:00
jan.nijtmans 7a0c0b2034 Merge 9.0 2022-10-04 16:06:01 +00:00
jan.nijtmans ca8b1a6887 TIP #465: Change Rule 8 of the Dodekalogue to Cut Some Corner Cases 2022-10-04 16:04:29 +00:00
jan.nijtmans c5b5c4f8a4 Merge 8.7 2022-10-04 15:57:51 +00:00
jan.nijtmans 2d5ed059a0 TIP #641 implementation: Let Tcl_GetBoolean(FromObj) handle (C99) bool 2022-10-04 15:52:13 +00:00
griffin 55cc9137eb Fix Obj leaks in ArithSeries. 2022-10-02 19:03:35 +00:00
dgp f9753a5e41 Replace incorrect use of TclGetNumberFromObj 2022-09-30 11:30:11 +00:00
dgp d03849d2cd merge trunk 2022-09-29 19:17:24 +00:00
dgp b2befe7629 merge trunk 2022-09-29 19:17:10 +00:00
griffin a5a978ca98 Fix bug-99e834bf33 2022-09-29 16:30:31 +00:00
jan.nijtmans eea655f851 Remove "unknown" constraint, since it now works 2022-09-29 06:45:20 +00:00
griffin f67437d6f3 Fix bug-9933cc4d88 - not an error in 9 2022-09-28 16:53:47 +00:00
jan.nijtmans 447a4d740e Merge 9.0 2022-09-28 14:06:37 +00:00
jan.nijtmans cef8229a3a Merge 9.0 2022-09-28 14:05:57 +00:00
jan.nijtmans e91c9f74d8 Merge 9.0 2022-09-28 14:05:14 +00:00
jan.nijtmans 6cd7c9e3c2 Merge 8.7 2022-09-28 13:58:56 +00:00
jan.nijtmans 9548cf370e Merge 9.0 2022-09-28 13:15:42 +00:00
jan.nijtmans e5a0178736 Merge 8.7 2022-09-28 13:02:23 +00:00
jan.nijtmans 69ac37dbae Don't worry deprecation warnings for Tcl_SaveResult: If TIP #640 is accepted it won't matter any more.
Eliminate some compiler warnings
Mark some lseq testcases as "knownBug", they still need to be fixed
2022-09-28 11:55:26 +00:00
jan.nijtmans 27e907b473 Merge 9.0 2022-09-28 11:29:02 +00:00
jan.nijtmans c31e41a91d Merge 9.0 2022-09-28 08:34:47 +00:00
jan.nijtmans 300b6e7e76 Merge trunk 2022-09-28 08:33:54 +00:00
jan.nijtmans 5a103eaacb Merge 8.7 2022-09-28 08:31:35 +00:00
jan.nijtmans 9634f3a9ed Merge trunk 2022-09-27 13:43:26 +00:00
jan.nijtmans 28121876fd Merge 9.0 2022-09-27 13:42:27 +00:00
jan.nijtmans 3dab933938 Merge 9.0 2022-09-27 13:40:21 +00:00
jan.nijtmans f68a36c8be Merge 8.7 2022-09-27 10:25:16 +00:00
apnadkarni 1080644af8 Merge 8.7 (primarily TIP 631) 2022-09-27 04:04:50 +00:00
jan.nijtmans 3e959978b2 Merge 9.0 2022-09-26 19:00:53 +00:00
jan.nijtmans 34de786a93 Merge 9.0. Change implementation: Now really remove Tcl_SaveResult() and friends 2022-09-26 16:10:18 +00:00
jan.nijtmans 74cf960de8 Merge 8.7 2022-09-26 15:58:55 +00:00
dgp 1a5bf4932e merge trunk 2022-09-26 13:13:01 +00:00
dgp 80965aae21 merge trunk 2022-09-26 13:12:53 +00:00
dgp d516bc4611 merge 8.6 2022-09-26 12:44:22 +00:00
jan.nijtmans 1900149ee6 Merge 9.0 2022-09-26 12:35:58 +00:00
jan.nijtmans 6dc3f732c1 Merge 8.7 2022-09-26 12:24:31 +00:00
jan.nijtmans 9ca4f08e3a Merge 8.7 2022-09-26 07:43:08 +00:00
dgp 51748fd064 merge trunk 2022-09-25 20:36:46 +00:00
dgp 93fa9836fd merge trunk 2022-09-25 20:35:51 +00:00
jan.nijtmans d72c457096 Merge 8.7 2022-09-25 19:51:14 +00:00
jan.nijtmans 24aa257810 merge-mark 2022-09-23 09:57:38 +00:00
dgp 55a1074384 merge 8.6 2022-09-22 20:28:29 +00:00
jan.nijtmans 21178dbbd4 Merge 8.7 2022-09-22 15:48:25 +00:00
jan.nijtmans d15e74d08c Merge 8.7 2022-09-22 15:36:44 +00:00
dgp 867a57806b merge trunk 2022-09-22 13:46:24 +00:00
dgp 6a34b586f6 merge trunk 2022-09-22 13:45:21 +00:00
dgp 54c6432df5 merge 8.6 2022-09-22 13:28:47 +00:00
jan.nijtmans 0fb01a32c6 Merge 8.7 2022-09-22 12:40:24 +00:00
jan.nijtmans a68d5e71e2 rebase to latest 9.0 2022-09-22 10:57:53 +00:00
jan.nijtmans d00000e816 fix testcase 2022-09-22 10:56:56 +00:00
dgp 170a21862b merge 8.6 2022-09-21 19:12:53 +00:00
dgp 85c05d7a3d Include TYPE_OPEN_PAREN in the comment. 2022-09-21 15:39:02 +00:00
jan.nijtmans ed4c583b06 TIP #640 implementation: Tcl_SaveResult reuse for Tcl 9.0 2022-09-21 15:25:25 +00:00
dgp 6a3c75c37f Reduce chances for test conflicts. 2022-09-21 14:59:40 +00:00
dgp 9a87f872f4 merge trunk 2022-09-21 14:09:14 +00:00
dgp 74275b1fb2 merge trunk 2022-09-21 13:54:43 +00:00
dgp 3116cddfd5 merge 8.6 2022-09-21 13:22:05 +00:00
jan.nijtmans 092e5f9f72 Merge 8.7 2022-09-21 13:10:43 +00:00
jan.nijtmans 14a73a2125 Merge 8.7 2022-09-21 12:39:42 +00:00
jan.nijtmans 01f391fe61 Merge 8.7 2022-09-21 12:37:43 +00:00
jan.nijtmans 0f9d17b141 rebase to latest trunk 2022-09-20 12:09:12 +00:00
oehhar 9d536c3831 TIP633 fconfigure -nocomplainencoding (TCL9): replace "-strictencoding 0" by "-nocomplainencoding 1". 2022-09-19 17:40:28 +00:00
jan.nijtmans 20ba5858ce Merge 8.7 2022-09-19 14:19:16 +00:00
dgp 6944eab64c merge 8.7 2022-09-19 14:06:59 +00:00
jan.nijtmans 0ef6cc44a3 merge 8.7 2022-09-19 13:44:27 +00:00
jan.nijtmans 2e6ebdc591 Merge 8.7 2022-09-19 08:56:26 +00:00
jan.nijtmans 4076c637ad Merge 9.0 2022-09-17 12:44:44 +00:00
dgp 7b46c41c05 remove obsolete comments 2022-09-16 14:59:14 +00:00
dgp f5300c9a09 merge 8.6 2022-09-16 12:18:03 +00:00
jan.nijtmans ce9541840d Merge 8.7 2022-09-16 06:58:54 +00:00
dgp 284f73c56c merge 8.7 2022-09-15 18:35:44 +00:00
apnadkarni 7b28b96939 Remove tilde expansion from docs. Fix comments that referenced the same. 2022-09-15 16:45:20 +00:00
dgp 4968ffa1ce [51d5f22997] Protect against passing negative size to Tcl_NewListObj. 2022-09-15 15:59:11 +00:00
apnadkarni 105dbed51f Merge 8.7 - docs for file home and tildeexpand 2022-09-15 14:39:39 +00:00
dgp ddde6c7c50 Update test results 2022-09-15 11:55:46 +00:00
dgp 7a073b3366 Silence compiler warnings. 2022-09-15 11:48:56 +00:00
bch 184e43e860 doc - describe proper prototype -- even though they are identical signatures atm 2022-09-15 04:49:33 +00:00
jan.nijtmans 4469be4f10 Merge 8.7 2022-09-14 17:56:13 +00:00
jan.nijtmans fbc66143c5 TIP #602: Remove tilde expansion in file paths 2022-09-14 17:50:55 +00:00
dgp fe7a8b7742 merge 8.6 2022-09-14 11:30:32 +00:00
jan.nijtmans 126f9f6dda Merge 8.7 2022-09-14 07:21:05 +00:00
jan.nijtmans a267b4feeb More logical-or markup fixes in documentation 2022-09-14 07:19:10 +00:00
bch fd14473a4c fix logical-or markup in documentation 2022-09-13 21:50:17 +00:00
jan.nijtmans 2e97ff6575 Mark 2 testcases as knownBug. Looks related to [6978c01b65] 2022-09-13 15:59:22 +00:00
dgp 60d91fb699 merge 8.6 2022-09-13 12:24:46 +00:00
jan.nijtmans 0b00b0f11d Merge 8.7 2022-09-13 08:31:34 +00:00
oehhar 872d25e128 TIP633 fconfigure -strictencoding: also implement read part 2022-09-12 14:47:48 +00:00
oehhar 436a48c900 Merge 8.7. Renumber tests and add current (IMHO wrong) results as results. 2022-09-12 12:14:20 +00:00
jan.nijtmans 62043b6882 Merge 8.7 2022-09-12 11:12:46 +00:00
oehhar c36fa478b2 TIP633 fconfigure -strictencoding: move transfer over the loop. Adapt test suite to use hex results to prevent blocking on console output. 2022-09-12 10:59:44 +00:00
oehhar f5846ef8f5 TIP633 fconfigure -strictencoding: implement write -strictencoding 0. 2022-09-12 10:47:30 +00:00
oehhar 74efc29448 Merge main 2022-09-12 10:16:59 +00:00
jan.nijtmans a6b22dc4b3 Merge 8.7 2022-09-11 21:47:06 +00:00
jan.nijtmans 8f0f3b1165 Change io-75.5 to test for both written output and which exception is thrown. This shows the bug is not fixed yet .... :-( 2022-09-11 20:48:49 +00:00
dgp b2fe600f53 merge 8.6 2022-09-11 20:12:55 +00:00
oehhar 32439d945e Ticket [6978c01b65]: write not encodable character->report to script level Test io-75.5 now ok. 2022-09-11 13:45:04 +00:00
oehhar 14086d3b4a TIP633 fconfigure -strictencoding: TCL 9 command line implementation 2022-09-11 09:55:09 +00:00
oehhar 1c7b977c44 Merge 8.7. Make place for future tests with tolerant encoding. Number tests for strict encoding 75.4-75.6. 2022-09-11 08:48:25 +00:00
oehhar 77334ba0ad TIP633 fconfigure -strctencoding: TCL 9 branch: prepare test cases with -strictencoding 0 and 1 2022-09-11 08:24:21 +00:00
jan.nijtmans f3e9e16aa8 Merge 8.7 2022-09-10 23:45:13 +00:00
jan.nijtmans ff752c7b91 Merge 8.7 2022-09-10 21:08:26 +00:00
jan.nijtmans a890c6f587 merge-mark 2022-09-10 12:23:21 +00:00
oehhar b07f60b43b Ticket [6978c01b65]: add file encoding test io-75.3 with incomplete multibyte sequence which should fail in 9.0. As it does not fail, it is marked as knownBug 2022-09-10 06:13:39 +00:00
oehhar c6e1d19c9e Ticket [6978c01b65]: add file encoding tests which should fail. As they don't fail jet, they are marked as "knownBug". 2022-09-09 14:01:14 +00:00
jan.nijtmans e1b9a033d7 Merge 8.7 2022-09-09 13:22:46 +00:00
jan.nijtmans d6b88eb797 Change 'skip' argument from int to size_t. Should have been part of TIP #630 (TclOO commands > 2^31 (for 8.7)) 2022-09-09 12:42:04 +00:00
jan.nijtmans 4cbc02c80f re-base to Tcl 9.0 2022-09-08 16:27:30 +00:00
jan.nijtmans 3239564179 Merge 9.0 2022-09-08 14:17:12 +00:00
jan.nijtmans d2ed22d022 Merge 8.7 2022-09-08 14:14:08 +00:00
jan.nijtmans d12caa5cd9 Tcl_Size -> size_t (twice) 2022-09-07 14:47:52 +00:00
jan.nijtmans 558466820c Merge 9.0 2022-09-07 14:32:16 +00:00
dgp fbd6220149 merge 8.6 2022-09-07 13:59:47 +00:00
jan.nijtmans 4c66b6ec43 Merge 8.7 2022-09-07 07:47:21 +00:00
jan.nijtmans ad1c9644ec Correct Tcl_DriverWideSeekProc documentation, matching implementation 2022-09-06 13:35:30 +00:00
apnadkarni c7522c3f93 Merge 8.7. Primarily ticket [55a02f20ec] 2022-09-05 15:25:58 +00:00
jan.nijtmans 6a866ef98b Finish TIP #627 implementation for Tcl 9.0: handle objProc2/objClientData2 fields for Tcl_CmdInfo 2022-09-03 13:22:24 +00:00
jan.nijtmans cd5e1b2e6c Complete Tcl_SetCommandInfoFromToken() implementation, in case Tcl_CreateObjCommand() is used to create the original Command, while objProc2 is filled later 2022-09-02 22:41:50 +00:00
jan.nijtmans 191d1f5847 Merge 8.7 2022-09-02 15:20:44 +00:00
jan.nijtmans 007dfc95a9 Some additional protection for objc < 0 2022-09-02 14:41:09 +00:00
jan.nijtmans c453ac8b82 Merge 9.0 2022-09-02 14:32:33 +00:00
jan.nijtmans 792b2f5aff Merge 8.7 2022-09-02 14:14:54 +00:00
jan.nijtmans 16510ceb16 Merge 9.0 2022-09-02 13:06:48 +00:00
jan.nijtmans 585d7c7548 Merge 8.7 2022-09-02 12:58:27 +00:00
jan.nijtmans 70d6ba8746 Finish remaining part of TIP-627 for Tcl 9.0: Handle objProc2/objClientData2 fields correctly in Tcl_CmdInfo struct. 2022-09-02 10:17:44 +00:00
jan.nijtmans 5573c07b32 close fork 2022-09-02 10:14:48 +00:00
jan.nijtmans e03ac7f9c6 Some more (internal) ClientData -> void * changes 2022-09-02 07:42:51 +00:00
jan.nijtmans 5da91af337 Merge 8.7 2022-09-01 15:46:33 +00:00
jan.nijtmans 32835dc33e Merge 8.7 2022-09-01 15:16:36 +00:00
sbron abf853d0bb Implement modification of the 'name2' trace callback argument. 2022-08-31 11:06:38 +00:00
jan.nijtmans dc58da9c45 Merge 8.7 2022-08-31 10:06:20 +00:00
jan.nijtmans b437bfcd3a Since numAfterRangeEnd (of type size_t) is always >= 0, those LIST_ASSERT's are useless 2022-08-31 09:12:57 +00:00
jan.nijtmans 21d39f41b1 Merge 8.7 2022-08-31 09:07:58 +00:00
jan.nijtmans 614375d561 Merge 8.7 2022-08-30 22:48:21 +00:00
jan.nijtmans f4cb160b56 merge-mark 2022-08-29 21:10:56 +00:00
jan.nijtmans 1bca425d6d Merge 9.0 2022-08-29 14:00:14 +00:00
jan.nijtmans e2dae42575 Merge 8.7 (already mostly prepared in tip-625-for-9 branch) 2022-08-29 10:15:03 +00:00
jan.nijtmans dc471da433 Merge 9.0 2022-08-29 10:00:23 +00:00
sbron 18da054782 Alternative fix for the error messages by chw, which doesn't break traces on
non-existing array elements.
2022-08-27 08:14:31 +00:00
jan.nijtmans f0a6c93a0e Merge 8.7 2022-08-26 23:12:48 +00:00
jan.nijtmans 5efd0904e3 Close fork 2022-08-26 20:26:05 +00:00
jan.nijtmans 8e84ff6bb0 Merge 8.7 2022-08-26 20:25:34 +00:00
bch 2f0f646a07 Tcl_GetVersion(3) - we just use int for components now, not Tcl_ReleaseType; Cleanup stray tag. 2022-08-26 17:19:02 +00:00
jan.nijtmans 143111498e Merge 8.7 2022-08-25 20:46:41 +00:00
sbron 8b4623feb4 Use whitespace consistent with the surrounding code. 2022-08-24 12:03:08 +00:00
sbron 66ebfaa06d Fix env array access through upvar to a single element. 2022-08-24 11:53:24 +00:00
sbron 10cc2ae8fd Fix error message, so trace tests 16.2, 16.9, and 16.16 pass again. 2022-08-24 11:28:19 +00:00
sbron 42dd6088a6 Add tests for the TIP #634 functionality. 2022-08-24 11:19:14 +00:00
sbron 2d455c75b9 Start TIP #634 implementation using modified patch from ticket #2969488 by ferrieux. 2022-08-24 11:18:28 +00:00
bch abe4d4223d fix(?) stray ckalloc()/ckfree(); ref TIP 494. 2022-08-23 20:29:58 +00:00
jan.nijtmans 176e98222e Merge 8.7 2022-08-23 10:51:34 +00:00
sebres 29dd909281 small amend to [d052d2a1b01ba2c8], code review 2022-08-23 10:22:25 +00:00
jan.nijtmans 2dd98970cf Merge 8.7 2022-08-23 07:37:06 +00:00
jan.nijtmans 529ef6feb2 Fix [d052d2a1b01ba2c8]: avoid leak in TestsetbytearraylengthObjCmd() 2022-08-23 07:03:31 +00:00
jan.nijtmans 9934337df5 Merge 8.7 2022-08-23 06:45:54 +00:00
dgp 63505a86ca merge 8.6 2022-08-22 13:56:15 +00:00
apnadkarni 6203b90b2a Merge 8.7 winConsole fixes. 2022-08-22 04:24:08 +00:00
jan.nijtmans e0b98db0d7 Merge 8.7 2022-08-21 21:33:18 +00:00
apnadkarni daf1875e01 Merged fix for bug [baa51423c2] 2022-08-20 17:09:54 +00:00
apnadkarni de7a5967d0 Do tilde expansion when initializing from TCLLIBPATH and TM env vars 2022-08-19 17:02:47 +00:00
apnadkarni e52c7c3a41 Implement file tildeexpand 2022-08-19 16:52:07 +00:00
apnadkarni ff9ac0bfbd Merge trunk 2022-08-19 05:49:58 +00:00
dgp 9c7a5755f2 merge 8.6 2022-08-08 12:41:18 +00:00
apnadkarni b4eda6649f Remove code that was ifdef'ed out 2022-08-07 10:11:42 +00:00
max eb3d10d523 Fix a case of lf not being flushed in certain cases when the crlf sequence gets split across two buffers on channels in crlf mode with line buffering [https://core.tcl-lang.org/tcllib/tktview?name=c9d8a52fe] 2022-08-04 15:15:46 +00:00
apnadkarni 7754129cab Update tests for TIP 602 2022-08-01 17:07:54 +00:00
apnadkarni 515f8ab044 Add 'file home' command 2022-07-31 11:54:14 +00:00
apnadkarni d2518017c7 Merged trunk. 2022-07-31 06:32:22 +00:00
jan.nijtmans 4e9c7a9ae0 Undo knownBug constraint: no longer necessary 2022-07-30 21:47:58 +00:00
jan.nijtmans e4e7ee53a4 Merge 9.0 and tip-625 2022-07-30 20:48:45 +00:00
sebres 13384df4af merge 8.7 2022-07-29 11:10:47 +00:00
jan.nijtmans 8f94fc24ac Merge 8.7 2022-07-28 10:52:33 +00:00
jan.nijtmans af346e6e70 merge tip-625 2022-07-27 16:21:59 +00:00
jan.nijtmans f5ba1ba55f Merge tip-625 2022-07-27 16:19:42 +00:00
jan.nijtmans 62933f5324 merge-mark 2022-07-25 14:08:21 +00:00
dgp 7c1a9c588c merge 8.6 2022-07-25 13:10:16 +00:00
jan.nijtmans 33683032c2 Merge tip-625 2022-07-24 20:41:32 +00:00
jan.nijtmans 12039fa008 Merge 9.0 2022-07-24 20:10:51 +00:00
jan.nijtmans 4b57621b7a Merge 8.7 2022-07-22 22:10:27 +00:00
jan.nijtmans 1fd08ea7d0 Merge 8.7 2022-07-22 14:38:47 +00:00
jan.nijtmans ccd2ac73e9 Merge 8.7 2022-07-21 15:28:09 +00:00
dgp 707c03da77 merge 8.6 2022-07-21 12:58:09 +00:00
jan.nijtmans 6d64f87088 Merge 8.7 2022-07-20 16:36:08 +00:00
jan.nijtmans 25c9cb2e55 merge-mark 2022-07-19 12:21:57 +00:00
jan.nijtmans 2310d12319 Merge 8.7 2022-07-19 09:56:17 +00:00
jan.nijtmans 5131efcb13 Merge 8.7 2022-07-19 08:56:37 +00:00
dgp 599cd8496e merge 8.6 2022-07-18 15:35:03 +00:00
jan.nijtmans bd7c6ae5d3 Merge tip-625 2022-07-18 12:57:14 +00:00
jan.nijtmans c2350850a9 Merge 8.7 2022-07-17 13:13:24 +00:00
jan.nijtmans 41c87a4bf5 More progress 2022-07-14 15:25:47 +00:00
jan.nijtmans a41449f1cd First shot at TIP #625 for Tcl 9.0.
Mark lrepeat-1.8 as 'knownBug', that's OK for now.
2022-07-14 12:35:19 +00:00
jan.nijtmans 7c405a789e merge-mark 2022-07-14 10:55:47 +00:00
jan.nijtmans 20aa103e7b Merge 8.7 2022-07-13 13:03:08 +00:00
jan.nijtmans 8d65c702fa merge-mark 2022-07-13 07:35:21 +00:00
dgp 527f510103 merge 8.6 2022-07-12 20:33:24 +00:00
jan.nijtmans 8320295018 merge-mark 2022-07-12 13:31:06 +00:00
jan.nijtmans 640839dd01 Merge 8.7 2022-07-12 09:22:32 +00:00
apnadkarni 132576b7dd Merge 8.7 - winConsole.test 2022-07-12 03:14:30 +00:00
jan.nijtmans c297ad4104 Merge 8.7 2022-07-11 11:34:49 +00:00
jan.nijtmans 424c53931b Merge 8.7 2022-07-10 20:42:29 +00:00
jan.nijtmans a3ea58d94b Merge 8.7 2022-07-10 19:58:03 +00:00
apnadkarni 3674905dbd Resolve ~ for MacOS during initialization 2022-07-08 13:48:36 +00:00
apnadkarni 9336a020ee Start on TIP-602 implementation. Work in progress 2022-07-08 04:06:35 +00:00
jan.nijtmans b0874b989e Merge 8.7 2022-07-07 11:02:23 +00:00
apnadkarni aa59356ae9 Create new branch named "tip-602" 2022-07-06 16:02:18 +00:00
jan.nijtmans 0e71e665cb Merge 8.7 2022-07-05 12:19:33 +00:00
jan.nijtmans 9e72f54150 Merge 8.7 2022-07-05 10:22:57 +00:00
jan.nijtmans 5ef498d3ec Merge 9.0 2022-07-04 11:39:31 +00:00
jan.nijtmans b78fe450ce Merge 8.7 2022-07-04 11:36:13 +00:00
jan.nijtmans ebf3d00e75 TIP #619: New TCL_COMBINE flag for Tcl_UniCharToUtf() 2022-07-04 11:21:06 +00:00
jan.nijtmans 2a491f190d Merge 8.7 2022-07-03 22:32:18 +00:00
jan.nijtmans 2ae930bbe4 Merge 8.7 2022-07-02 19:52:54 +00:00
jan.nijtmans 6d4603bb45 Merge 9.0 2022-07-01 15:28:57 +00:00
jan.nijtmans bf70c2d93b Merge 8.7 2022-07-01 15:21:37 +00:00
jan.nijtmans fabaafee56 Merge 9.0. Fix MacOSX build 2022-07-01 11:53:18 +00:00
jan.nijtmans 57b2b2606f Merge-mark 2022-06-30 11:32:19 +00:00
jan.nijtmans 9fccffbdfa Merge 8.7. Don't worry about Tcl_GetErrorLine() any more 2022-06-28 09:42:08 +00:00
jan.nijtmans 3df7fe883e Handle tclIntPlatDecls.h 2022-06-28 08:02:08 +00:00
jan.nijtmans 1ff4bd27f4 Fix superflous !endif 2022-06-27 10:07:13 +00:00
jan.nijtmans 2f8db2f926 Add OPTS=tcl8 2022-06-26 22:49:16 +00:00
jan.nijtmans 7974d5f010 Fix TclpGetClicks/TclpGetSeconds's Tcl 8 compabitility 2022-06-26 21:59:53 +00:00
jan.nijtmans 9b6113c6b1 Better Tcl8 compatibility for tclPlatDecls.h and tclInt.h 2022-06-26 21:23:55 +00:00
jan.nijtmans 946598bb9f Merge-mark 9.0. Use Tcl_Size (but not in tclWinDde.c/tclWinReg.c) 2022-06-24 20:55:03 +00:00
jan.nijtmans 8a3c1f7a68 merge-mark 2022-06-24 20:11:38 +00:00
jan.nijtmans b456ce6d74 Complete removal of version from stub library 2022-06-24 14:44:08 +00:00
jan.nijtmans 5aa22835cf Merge 9.0 2022-06-24 14:29:01 +00:00
jan.nijtmans 294105b452 Merge 8.7 2022-06-24 14:28:06 +00:00
jan.nijtmans e16ffc4a1e Merge 9.0 2022-06-24 14:01:15 +00:00
jan.nijtmans 5db5b84aef Merge 8.7 2022-06-24 13:56:34 +00:00
jan.nijtmans 5ad300bf4a Use TCL_MAJOR_VERSION to document (kind of) what's the difference between Tcl8 and Tcl9 2022-06-24 13:30:14 +00:00
jan.nijtmans 6ebde0d075 Better tcl8 compatibility for tclInt.h 2022-06-24 13:07:16 +00:00
jan.nijtmans 5c49161ab0 merge-mark 2022-06-24 11:42:14 +00:00
jan.nijtmans 4a20ed377e Merge 8.7 2022-06-24 11:41:39 +00:00
jan.nijtmans 232f84b9dc Merge 9.0 2022-06-24 11:36:53 +00:00
jan.nijtmans c355f9a6cf Merge 8.7 2022-06-24 11:10:30 +00:00
jan.nijtmans a6fb6b32ca Merge 8.7 2022-06-24 07:17:05 +00:00
jan.nijtmans b988139b8a Merge 9.0 2022-06-23 15:56:42 +00:00
jan.nijtmans 11766bbb13 Merge 8.7 2022-06-23 15:47:16 +00:00
jan.nijtmans 355be4d5f2 Merge 9.0 2022-06-23 15:00:46 +00:00
jan.nijtmans 78d1e3a624 Merge 8.7 2022-06-23 14:58:44 +00:00
jan.nijtmans 0bdd633abc Merge 9.0 2022-06-23 14:06:31 +00:00
jan.nijtmans d36655ac53 Merge 8.7. Update documentation 2022-06-23 13:16:17 +00:00
jan.nijtmans ca4bfa2564 Merge 9.0 2022-06-23 12:26:06 +00:00
jan.nijtmans 6487dd7257 Merge 8.7 2022-06-23 12:24:05 +00:00
jan.nijtmans 01abe6a8b4 Merge 9.0 2022-06-23 09:49:41 +00:00
jan.nijtmans 5f8f24a948 Merge 8.7 2022-06-23 09:11:51 +00:00
jan.nijtmans 5ea6733979 Forget about TCL_8_COMPAT 2022-06-22 22:25:44 +00:00
jan.nijtmans bb0f1f8083 Merge 9.0 2022-06-22 16:50:37 +00:00
jan.nijtmans 178df447b7 Merge 8.7 2022-06-22 16:49:46 +00:00
jan.nijtmans daf02b80dd No quotes when testing for TCL_MAJOR_VERSION 2022-06-22 14:24:51 +00:00
jan.nijtmans 0cbabbe0d8 Merge 9.0 2022-06-20 21:49:28 +00:00
jan.nijtmans 26e99bad85 Fix (internal) TclFindElement() signature (int -> size_t) 2022-06-20 21:47:26 +00:00
jan.nijtmans 105bdf44be More Tcl_Size
,
2022-06-20 21:26:54 +00:00
jan.nijtmans c43ea691ad Merge 8.7 2022-06-20 15:21:03 +00:00
jan.nijtmans 573a1e9219 More Tcl_Size 2022-06-20 15:13:48 +00:00
jan.nijtmans a9fa4bed1f Merge 8.7 2022-06-20 09:47:14 +00:00
jan.nijtmans d3517188b2 merge-mark 2022-06-19 20:26:02 +00:00
dgp 02669f7c03 merge 8.6 2022-06-15 12:46:04 +00:00
jan.nijtmans a8ddc9d2a2 Merge 9.0 2022-06-15 12:23:22 +00:00
jan.nijtmans de7e7bc0ba Merge 9.0 2022-06-15 11:59:13 +00:00
jan.nijtmans ba767ab772 Merge 9.0 2022-06-15 10:11:01 +00:00
jan.nijtmans a24682c16d Merge 9.0 2022-06-15 06:40:02 +00:00
jan.nijtmans 94394a076d Use Tcl_Size in dde/registry 2022-06-13 13:46:45 +00:00
jan.nijtmans bde9c622c0 Merge 9.0 2022-06-13 12:11:38 +00:00
jan.nijtmans 887f84bb45 Use TCL_8_COMPAT to change Tcl_Size to ptrdiff_t 2022-06-13 07:32:21 +00:00
jan.nijtmans 21b4101075 Handle Tcl_GetByteArrayFromObj() better 2022-06-12 21:23:17 +00:00
jan.nijtmans 6187c67f3b Handle list/dict compatibility better 2022-06-12 20:08:56 +00:00
jan.nijtmans 55031f3989 Handle Tcl_Close, Tcl_CallFrame and Tcl_StatBuf correctly 2022-06-12 19:27:26 +00:00
jan.nijtmans 778ad9fdfa Enhance for Windows 2022-06-12 16:54:04 +00:00
jan.nijtmans 9aebf1d8a6 Merge 9.0 2022-06-12 16:35:57 +00:00
jan.nijtmans 98974ab123 Merge 9.0 2022-06-12 16:04:38 +00:00
jan.nijtmans e396c1dd36 Make the idea (finally) work 2022-06-12 15:13:33 +00:00
jan.nijtmans 82fccbc6dc Merge 9.0 2022-06-12 11:49:16 +00:00
jan.nijtmans 3c3ebea410 Merge 9.0 2022-06-09 20:25:18 +00:00
dgp 9b1a7da59b Bump to 8.6.13 for release 2022-06-06 16:51:24 +00:00
jan.nijtmans d307130311 Merge 9.0 2022-05-19 15:05:42 +00:00
jan.nijtmans 59f20f23bd Merge 9.0 2022-05-17 16:27:19 +00:00
jan.nijtmans c0d3b18e36 Merge 9.0 2022-04-26 16:02:00 +00:00
jan.nijtmans 77a24f6300 Merge 9.0 2022-04-26 07:19:51 +00:00
jan.nijtmans aabe2cbb33 Merge 9.0 2022-04-14 20:49:02 +00:00
jan.nijtmans 1391eda7db Merge 9.0 2022-04-14 13:17:58 +00:00
jan.nijtmans 776820c81f Merge 9.0 2022-04-08 13:01:04 +00:00
jan.nijtmans cb0acd5a7d Merge 9.0 2022-04-08 09:37:12 +00:00
jan.nijtmans 4717ea14fd Merge 9.0 2022-04-01 13:12:08 +00:00
jan.nijtmans 05de893f6f Fix some more testcases (involving string reverse/trim) 2022-04-01 09:48:44 +00:00
jan.nijtmans e0f543167d Final tweaks in testcases 2022-03-31 10:08:13 +00:00
jan.nijtmans e9f9cac4be Oops 2022-03-31 09:44:20 +00:00
jan.nijtmans e9e4041670 Minor change in utf.test 2022-03-31 07:20:00 +00:00
jan.nijtmans 3185a0b150 Merge 9.0. Restore some testcases working correctly with TCL_UTF_MAX=3 2022-03-31 07:08:34 +00:00
jan.nijtmans a2a0ca2a17 Merge 9.0. Fix CONTINUATION macro, and testcases 2022-03-29 22:17:33 +00:00
jan.nijtmans b19862400b Merge 9.0 2022-03-18 14:04:05 +00:00
jan.nijtmans a5055aa3db Merge 9.0 2022-03-18 11:18:58 +00:00
jan.nijtmans 2ceb66085c Merge 9.0. Don't combine surrogates when appending UTF-32 strings 2022-03-15 13:59:15 +00:00
jan.nijtmans e59865fa40 Merge 9.0 2022-03-11 15:20:04 +00:00
jan.nijtmans 02131d1f1b Merge 9.0. Update documentation 2022-03-11 14:45:16 +00:00
jan.nijtmans 08666ed474 Merge 9.0 2022-03-03 16:06:27 +00:00
jan.nijtmans b488f3edf6 TIP #619 implementation. tests not working yet 2022-03-03 13:05:38 +00:00
jan.nijtmans 1a08f93391 Experiment: Make tcl.h from Tcl 9.0 usable to compile extensions for Tcl 8.x too (WIP) 2021-12-04 17:55:32 +00:00
jan.nijtmans e732b20a4d Merge 8.7 2019-12-03 16:22:52 +00:00
jan.nijtmans afff904993 Merge 8.7 2019-11-17 19:47:08 +00:00
jan.nijtmans 1f6c360968 Merge tip-468 branch 2018-10-28 19:36:34 +00:00
jan.nijtmans ccb97d88ff Merge 8.7 2018-10-28 19:26:49 +00:00
dgp 1b03667a27 merge 8.7 2018-10-17 19:47:01 +00:00
dgp 5c24bebd2b merge 8.7 2018-06-04 13:16:39 +00:00
dgp e51e79f343 merge 8.7 2018-05-24 13:12:26 +00:00
dgp 03fd40904f merge 8.7 2018-05-11 11:38:54 +00:00
dgp 13bcd282e3 merge 8.7 2018-04-25 15:00:53 +00:00
dgp 26e714137a merge 8.7 2018-03-15 13:40:40 +00:00
jan.nijtmans 63b8d1466d Merge "tip-468" branch. Add new function Tcl_OpenTcpClientEx() with same change as Tcl_OpenTcpServerEx(): in stead of a port number, supplie a "service" string. 2017-04-10 11:01:52 +00:00
jan.nijtmans 3c4cc0a001 merge (minor style issues from) trunk 2017-04-10 09:35:51 +00:00
dkf d64611a414 TIP 468 implementation from Shannon Noe. 2017-04-09 14:32:26 +00:00
avl a457b16dfc Deal with backslashes in ${...}, change "char" to "character" in error, fix tests. 2017-03-05 19:38:43 +00:00
avl 9372c6c29f cherrypick 3bcf97f766: array index syntax done. ${...} not yet complete wrt backslashes. 2017-03-05 11:22:33 +00:00
avl 7ad70bd837 Create new branch named "tip-465" 2017-03-05 11:04:36 +00:00
jan.nijtmans 8c52e2d45d Further experimental follow-up: Add internal function TclOpenTcpClientEx(), as companion to Tcl_OpenTcpServerEx(). Should be exported through new TIP. 2017-01-10 14:35:13 +00:00
jan.nijtmans d61a4c1757 Experimental follow-up: Change internal TclCreateSocketAddress() signature, from using "int port" to "const char *service". 2017-01-10 13:56:10 +00:00
dkf 9244b6ed08 [85ce4bf928] Fix for problems with storing Inf with [binary format R]. 2015-05-15 22:14:32 +00:00
176 changed files with 5662 additions and 5295 deletions
+1 -1
View File
@@ -1939,7 +1939,7 @@
2008-07-28 Jan Nijtmans <nijtmans@users.sf.net>
* doc/FileSystem.3: CONSTified many functions using
* generic/tcl.decls: Tcl_FileSystem which all are supposed
* generic/tcl.decls: Tcl_Filesystem which all are supposed
* generic/tclDecls.h: to be a constant, but this was not
* generic/tclFileSystem.h: reflected in the API: Tcl_FSData,
* generic/tclIOUtil.c: Tcl_FSGetInternalRep, Tcl_FSRegister,
+52 -1
View File
@@ -9232,7 +9232,7 @@ See RFC 2045
2020-09-17 (bug)[835c93] Support TIP 525 exit code for -singleproc 1 (nijtmans)
=> tcltest 2.5.3
2020-09-25 (new) force -eofchar \032 when evaluating library scripts (nijtmans)
2020-09-25 (new) force -eofchar \x1A when evaluating library scripts (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2020-09-29 (bug)[0063cb] http::geturl -headers must be dict (oehlmann,nijtmans)
@@ -9375,3 +9375,54 @@ in this changeset (new minor version) rather than bug fixes:
2021-10-27 tzdata updated to Olson's tzdata2021e (nijtmans)
- Released 8.6.12, Nov 5, 2021 - details at https://core.tcl-lang.org/tcl/ -
2021-12-08 (update) tcltest package to version 2.5.4
2022-01-13 (bug)[26f132] Crash when sizeof(int) < sizeof(void *) (Plan 9 port)
2022-01-19 (TIP 623)[e9a271] Tcl_GetRange index args < 0 (petasis,nijtmans)
2022-03-08 (bug) test string-5.22 (porter)
2022-03-11 (bug)[8a7ec8] fat binary compile on Mac M1 (davis, nijtmans)
2022-04-04 (bug)[e5ed1b] numeric IPv6 in URLs (nijtmans)
=> http 2.9.6
2022-04-26 (bug)[27520c] test error-9.6 (goth,sebres)
2022-05-04 (bug)[8eb64b] http package tolerant again invalid reply header
2022-05-11 (bug)[6898f9] http package failed detection of shiftjis charset
2022-05-25 (bug)[76ad7a] tests string-6.13[23] (mistachkin, nijtmans)
2022-06-20 (bug)[55bf73] Avoid connection reuse after response code 101.
=> http 2.9.8
2022-07-22 (bug)[713653] FP rounding exposed by x86 musl (rubicon,sebres)
2022-07-22 More portable notation of microseconds in verbose output (sebres)
=> tcltest 2.5.5
2022-07-27 (bug)[b3977d] Process CR-LF split across packets (nadkarni,sebres)
2022-07-29 (bug)[4eb3a1] crash due to undetected bytecode invalidity (nadkarni)
2022-08-23 (new)[371080] Portability to CHERI-enabled Morello processor (jrtc27)
2022-09-06 (bug)[55a02f] Fallback init env(HOME) from USERPROFILE (nadkarni)
2022-09-13 (bug)[1073da] crash writing invalid utf-8 (nijtmans)
2022-09-14 (new) Update to Unicode-15 (nijtmans)
2022-10-14 tzdata updated to Olson's tzdata2022e (nijtmans)
Update bundled zlib to 1.2.13
Update bundled libtommath
Many code fixes to avoid overflow or undefined behavior. Thanks chrstphrchvz.
- Released 8.6.13, Nov 22, 2022 - details at https://core.tcl-lang.org/tcl/ -
+6 -6
View File
@@ -20,7 +20,7 @@ Tcl_Obj *
\fBTcl_SetBooleanObj\fR(\fIobjPtr, intValue\fR)
.sp
int
\fBTcl_GetBooleanFromObj\fR(\fIinterp, objPtr, intPtr\fR)
\fBTcl_GetBooleanFromObj\fR(\fIinterp, objPtr, boolPtr\fR)
.sp
int
\fBTcl_GetBoolFromObj\fR(\fIinterp, objPtr, flags. charPtr\fR)
@@ -35,7 +35,7 @@ retrieve a boolean value.
If a boolean value cannot be retrieved,
an error message is left in the interpreter's result value
unless \fIinterp\fR is NULL.
.AP int *intPtr out
.AP "bool \&| int" *boolPtr out
Points to place where \fBTcl_GetBooleanFromObj\fR
stores the boolean value (0 or 1) obtained from \fIobjPtr\fR.
.AP char *charPtr out
@@ -71,13 +71,13 @@ any former value stored in \fI*objPtr\fR.
from the value stored in \fI*objPtr\fR.
If \fIobjPtr\fR holds a string value recognized by \fBTcl_GetBoolean\fR,
then the recognized boolean value is written at the address given
by \fIintPtr\fR.
by \fIboolPtr\fR.
If \fIobjPtr\fR holds any value recognized as
a number by Tcl, then if that value is zero a 0 is written at
the address given by \fIintPtr\fR and if that
value is non-zero a 1 is written at the address given by \fIintPtr\fR.
the address given by \fIboolPtr\fR and if that
value is non-zero a 1 is written at the address given by \fIboolPtr\fR.
In all cases where a value is written at the address given
by \fIintPtr\fR, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fR.
by \fIboolPtr\fR, \fBTcl_GetBooleanFromObj\fR returns \fBTCL_OK\fR.
If the value of \fIobjPtr\fR does not meet any of the conditions
above, then \fBTCL_ERROR\fR is returned and an error message is
left in the interpreter's result unless \fIinterp\fR is NULL.
+19 -5
View File
@@ -47,7 +47,7 @@ details of the calling sequence.
.AP Tcl_CmdTraceProc *proc in
Procedure to call for each command that is executed. See below for
details on the calling sequence.
.AP ClientData clientData in
.AP void *clientData in
Arbitrary one-word value to pass to \fIobjProc\fR, \fIobjProc2\fR or \fIproc\fR.
.AP Tcl_CmdObjTraceDeleteProc *deleteProc in
Procedure to call when the trace is deleted. See below for details of
@@ -72,7 +72,7 @@ interpreter.
.PP
.CS
typedef int \fBTcl_CmdObjTraceProc\fR(
\fBClientData\fR \fIclientData\fR,
\fBvoid *\fR \fIclientData\fR,
\fBTcl_Interp\fR* \fIinterp\fR,
int \fIlevel\fR,
const char *\fIcommand\fR,
@@ -81,6 +81,20 @@ typedef int \fBTcl_CmdObjTraceProc\fR(
\fBTcl_Obj\fR *const \fIobjv\fR[]);
.CE
.PP
\fIobjProc2\fR should have arguments and result that match the type,
\fBTcl_CmdObjTraceProc2\fR:
.PP
.CS
typedef int \fBTcl_CmdObjTraceProc2\fR(
\fBvoid *\fR \fIclientData\fR,
\fBTcl_Interp\fR* \fIinterp\fR,
size_t \fIlevel\fR,
const char *\fIcommand\fR,
\fBTcl_Command\fR \fIcommandToken\fR,
size_t \fIobjc\fR,
\fBTcl_Obj\fR *const \fIobjv\fR[]);
.CE
.PP
The \fIclientData\fR and \fIinterp\fR parameters are copies of the
corresponding arguments given to \fBTcl_CreateTrace\fR.
\fIClientData\fR typically points to an application-specific data
@@ -146,7 +160,7 @@ When \fBTcl_DeleteTrace\fR is called, the interpreter invokes the
.PP
.CS
typedef void \fBTcl_CmdObjTraceDeleteProc\fR(
\fBClientData\fR \fIclientData\fR);
\fBvoid *\fR \fIclientData\fR);
.CE
.PP
The \fIclientData\fR parameter will be the same as the
@@ -162,12 +176,12 @@ match the type \fBTcl_CmdTraceProc\fR:
.PP
.CS
typedef void \fBTcl_CmdTraceProc\fR(
ClientData \fIclientData\fR,
void *\fIclientData\fR,
Tcl_Interp *\fIinterp\fR,
int \fIlevel\fR,
char *\fIcommand\fR,
Tcl_CmdProc *\fIcmdProc\fR,
ClientData \fIcmdClientData\fR,
void *\fIcmdClientData\fR,
int \fIargc\fR,
const char *\fIargv\fR[]);
.CE
+17
View File
@@ -41,6 +41,10 @@ char *
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
.sp
\fBTcl_DStringGetResult\fR(\fIinterp, dsPtr\fR)
.sp
Tcl_Obj *
\fBTcl_DStringToObj\fR(\fIdsPtr\fR)
.sp
.SH ARGUMENTS
.AS Tcl_DString newLength in/out
.AP Tcl_DString *dsPtr in/out
@@ -142,12 +146,25 @@ a pointer from \fIdsPtr\fR to the interpreter's result.
This saves the cost of allocating new memory and copying the string.
\fBTcl_DStringResult\fR also reinitializes the dynamic string to
an empty string.
Since the dynamic string is reinitialized, there is no need to
further call \fBTcl_DStringFree\fR on it and it can be reused without
calling \fBTcl_DStringInit\fR.
.PP
\fBTcl_DStringGetResult\fR does the opposite of \fBTcl_DStringResult\fR.
It sets the value of \fIdsPtr\fR to the result of \fIinterp\fR and
it clears \fIinterp\fR's result.
If possible it does this by moving a pointer rather than by copying
the string.
.PP
\fBTcl_DStringToObj\fR returns a \fBTcl_Obj\fR containing the value of
the dynamic string given by \fIdsPtr\fR. It does this by moving
a pointer from \fIdsPtr\fR to a newly allocated \fBTcl_Obj\fR
and reinitializing to dynamic string to an empty string.
This saves the cost of allocating new memory and copying the string.
Since the dynamic string is reinitialized, there is no need to
further call \fBTcl_DStringFree\fR on it and it can be reused without
calling \fBTcl_DStringInit\fR.
The returned \fBTcl_Obj\fR has a reference count of 0.
.SH KEYWORDS
append, dynamic string, free, result
+3 -3
View File
@@ -347,7 +347,7 @@ typedef struct Tcl_EncodingType {
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
Tcl_EncodingFreeProc *\fIfreeProc\fR;
ClientData \fIclientData\fR;
void *\fIclientData\fR;
int \fInullSize\fR;
} \fBTcl_EncodingType\fR;
.CE
@@ -378,7 +378,7 @@ type \fBTcl_EncodingConvertProc\fR:
.PP
.CS
typedef int \fBTcl_EncodingConvertProc\fR(
ClientData \fIclientData\fR,
void *\fIclientData\fR,
const char *\fIsrc\fR,
int \fIsrcLen\fR,
int \fIflags\fR,
@@ -410,7 +410,7 @@ The callback procedure \fIfreeProc\fR, if non-NULL, should match the type
.PP
.CS
typedef void \fBTcl_EncodingFreeProc\fR(
ClientData \fIclientData\fR);
void *\fIclientData\fR);
.CE
.PP
This \fIfreeProc\fR function is called when the encoding is deleted. The
+6 -1
View File
@@ -8,7 +8,7 @@
.so man.macros
.BS
.SH NAME
Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers
Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_GetWideUIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -40,6 +40,9 @@ int
int
\fBTcl_GetWideIntFromObj\fR(\fIinterp, objPtr, widePtr\fR)
.sp
int
\fBTcl_GetWideUIntFromObj\fR(\fIinterp, objPtr, uwidePtr\fR)
.sp
.sp
\fB#include <tclTomMath.h>\fR
.sp
@@ -82,6 +85,8 @@ Points to place to store the integer value retrieved from \fIobjPtr\fR.
Points to place to store the long integer value retrieved from \fIobjPtr\fR.
.AP Tcl_WideInt *widePtr out
Points to place to store the wide integer value retrieved from \fIobjPtr\fR.
.AP Tcl_WideUInt *uwidePtr out
Points to place to store the unsigned wide integer value retrieved from \fIobjPtr\fR.
.AP mp_int *bigValue in/out
Points to a multi-precision integer structure declared by the LibTomMath
library.
+1 -3
View File
@@ -239,9 +239,7 @@ The C variable, or each element of the C array, is of type \fBTcl_WideUInt\fR
(which is an unsigned integer type at least 64-bits wide on all platforms that
can support it.)
Any value written into the Tcl variable must have a proper unsigned
integer form acceptable to \fBTcl_GetWideIntFromObj\fR (it will be
cast to unsigned);
.\" FIXME! Use bignums instead.
wideinteger form acceptable to \fBTcl_GetWideUIntFromObj\fR;
attempts to write non-integer values into \fIvarName\fR will be
rejected with Tcl errors. Incomplete integer representations (like
the empty string, '+', '-' or the hex/octal/decimal/binary prefix) are accepted
+12 -12
View File
@@ -406,10 +406,10 @@ to UTF-8 based on the channel's encoding and storing the produced data in
\fIreadObjPtr\fR's string representation. The return value of
\fBTcl_ReadChars\fR is the number of characters, up to \fIcharsToRead\fR,
that were stored in \fIreadObjPtr\fR. If an error occurs while reading, the
return value is \-1 and \fBTcl_ReadChars\fR records a POSIX error code that
return value is TCL_INDEX_NONE and \fBTcl_ReadChars\fR records a POSIX error code that
can be retrieved with \fBTcl_GetErrno\fR.
.PP
Setting \fIcharsToRead\fR to \fB\-1\fR will cause the command to read
Setting \fIcharsToRead\fR to TCL_INDEX_NONE will cause the command to read
all characters currently available (non-blocking) or everything until
eof (blocking mode).
.PP
@@ -471,14 +471,14 @@ character(s) are read and discarded.
.PP
If a line was successfully read, the return value is greater than or equal
to zero and indicates the number of bytes stored in \fIlineObjPtr\fR. If an
error occurs, \fBTcl_GetsObj\fR returns \-1 and records a POSIX error code
error occurs, \fBTcl_GetsObj\fR returns TCL_INDEX_NONE and records a POSIX error code
that can be retrieved with \fBTcl_GetErrno\fR. \fBTcl_GetsObj\fR also
returns \-1 if the end of the file is reached; the \fBTcl_Eof\fR procedure
returns TCL_INDEX_NONE if the end of the file is reached; the \fBTcl_Eof\fR procedure
can be used to distinguish an error from an end-of-file condition.
.PP
If the channel is in nonblocking mode, the return value can also be \-1 if
no data was available or the data that was available did not contain an
end-of-line character. When \-1 is returned, the \fBTcl_InputBlocked\fR
If the channel is in nonblocking mode, the return value can also be TCL_INDEX_NONE
if no data was available or the data that was available did not contain an
end-of-line character. When TCL_INDEX_NONE is returned, the \fBTcl_InputBlocked\fR
procedure may be invoked to determine if the channel is blocked because
of input unavailability.
.PP
@@ -496,7 +496,7 @@ head of the queue. If \fIchannel\fR has a
.QW sticky
EOF set, no data will be
added to the input queue. \fBTcl_Ungets\fR returns \fIinputLen\fR or
\-1 if an error occurs.
TCL_INDEX_NONE if an error occurs.
.SH "TCL_WRITECHARS, TCL_WRITEOBJ, AND TCL_WRITE"
.PP
\fBTcl_WriteChars\fR accepts \fIbytesToWrite\fR bytes of character data at
@@ -513,10 +513,10 @@ to appear as soon as a complete line is accepted for output, set the
\fB\-buffering\fR option on the channel to \fBline\fR mode.
.PP
The return value of \fBTcl_WriteChars\fR is a count of how many bytes were
accepted for output to the channel. This is either greater than zero to
indicate success or \-1 to indicate that an error occurred. If an error
occurs, \fBTcl_WriteChars\fR records a POSIX error code that may be
retrieved with \fBTcl_GetErrno\fR.
accepted for output to the channel. This is either TCL_INDEX_NONE to
indicate that an error occurred or another number greater than
zero to indicate success. If an error occurs, \fBTcl_WriteChars\fR records
a POSIX error code that may be retrieved with \fBTcl_GetErrno\fR.
.PP
Newline characters in the output data are translated to platform-specific
end-of-line sequences according to the \fB\-translation\fR option for the
+3 -1
View File
@@ -24,7 +24,7 @@ Tcl_Channel
\fBTcl_OpenTcpServer\fR(\fIinterp, port, myaddr, proc, clientData\fR)
.sp
Tcl_Channel
\fBTcl_OpenTcpServerEx\fR(\fIinterp, service, myaddr, flags, proc, clientData\fR)
\fBTcl_OpenTcpServerEx\fR(\fIinterp, service, myaddr, flags, backlog, proc, clientData\fR)
.sp
.SH ARGUMENTS
.AS Tcl_TcpAcceptProc clientData
@@ -47,6 +47,8 @@ for the local end of the connection. If NULL, a default interface is
chosen.
.AP int async in
If nonzero, the client socket is connected asynchronously to the server.
.AP int backlog in
Length of OS listen backlog queue. Use -1 for default value.
.AP "unsigned int" flags in
ORed combination of \fBTCL_TCPSERVER\fR flags that specify additional
informations about the socket being created.
+3 -4
View File
@@ -144,15 +144,14 @@ interface with the operating system,
.TP
\fB\-eofchar\fR \fIchar\fR
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
\fB\-eofchar\fR \fB{\fIchar outChar\fB}\fR
.
\fIchar\fR signals the end of the data when it is encountered in the input.
For output, the character is added when the channel is closed. If \fIchar\fR
For output, \fIoutChar\fR is added when the channel is closed. If \fIchar\fR
is the empty string, there is no special character that marks the end of the
data. For read-write channels, one end-of-file character for input and another
for output may be given. When only one end-of-file character is given it is
applied to both input and output. For a read-write channel two values are
returned even if they are are identical.
applied to input only.
The default value is the empty string, except that under Windows the default
value for reading is Control-z (\ex1A). The acceptable range is \ex01 -
+2 -2
View File
@@ -186,9 +186,9 @@ Surprising results
may be obtained when crossing a point at which a leap second is
inserted or removed; the \fBclock add\fR command simply ignores
leap seconds and therefore assumes that times come in sequence,
23:59:58, 23:59:59, 00:00:00. (This assumption is handled by
23:59:58, 23:59:59, 00:00:00. This assumption is handled by
the fact that Tcl's model of time reacts to leap seconds by speeding
or slowing the clock by a minuscule amount until Tcl's time
or slowing the clock by a miniscule amount until Tcl's time
is back in step with the world.
.PP
The fact that adding and subtracting hours is defined in terms of
+81 -38
View File
@@ -28,52 +28,76 @@ formats.
Performs one of several encoding related operations, depending on
\fIoption\fR. The legal \fIoption\fRs are:
.TP
\fBencoding convertfrom\fR ?\fB-nocomplain\fR? ?\fB-failindex var\fR?
?\fIencoding\fR? \fIdata\fR
\fBencoding convertfrom\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
\fBencoding convertfrom\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
.
Convert \fIdata\fR to a Unicode string from the specified \fIencoding\fR. The
characters in \fIdata\fR are 8 bit binary data. The resulting
sequence of bytes is a string created by applying the given \fIencoding\fR
to the data. If \fIencoding\fR is not specified, the current
system encoding is used.
.
The call fails on convertion errors, like an incomplete utf-8 sequence.
The option \fB-failindex\fR is followed by a variable name. The variable
is set to \fI-1\fR if no conversion error occured. It is set to the
first error location in \fIdata\fR in case of a conversion error. All data
until this error location is transformed and retured. This option may not
be used together with \fB-nocomplain\fR.
.
The call does not fail on conversion errors, if the option
\fB-nocomplain\fR is given. In this case, any error locations are replaced
by \fB?\fR. Incomplete sequences are written verbatim to the output string.
The purpose of this switch is to gain compatibility to prior versions of TCL.
It is not recommended for any other usage.
system encoding is used. If at least one of \fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
is provided, this makes the \fIencoding\fR argument mandatory.
.VS "TCL8.7 TIP346, TIP607, TIP601"
.PP
.RS
The command does not fail on encoding errors. Instead, any not convertable bytes
(like incomplete UTF-8 sequences, see example below) are put as byte values into
the output stream.
.PP
If the option \fB-failindex\fR with a variable name is given, the error reporting
is changed in the following manner:
in case of a conversion error, the position of the input byte causing the error
is returned in the given variable. The return value of the command are the
converted characters until the first error position.
In case of no error, the value \fI-1\fR is written to the variable. This option
may not be used together with \fB-nocomplain\fR.
.PP
The option \fB-nocomplain\fR has no effect and is available for compatibility with
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
This switch restores the TCL8.7 behaviour.
.PP
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
encoder, it disallows invalid byte sequences and surrogates (which -
otherwise - are just passed through). This option may not be used together
with \fB-nocomplain\fR.
.VE "TCL8.7 TIP346, TIP607, TIP601"
.RE
.TP
\fBencoding convertto\fR ?\fB-nocomplain\fR? ?\fB-failindex var\fR?
?\fIencoding\fR? \fIstring\fR
\fBencoding convertto\fR ?\fB-strict\fR? ?\fB-failindex var\fR? ?\fIencoding\fR? \fIdata\fR
\fBencoding convertto\fR \fB-nocomplain\fR ?\fIencoding\fR? \fIdata\fR
.
Convert \fIstring\fR from Unicode to the specified \fIencoding\fR.
The result is a sequence of bytes that represents the converted
string. Each byte is stored in the lower 8-bits of a Unicode
character (indeed, the resulting string is a binary string as far as
Tcl is concerned, at least initially). If \fIencoding\fR is not
specified, the current system encoding is used.
.
The call fails on convertion errors, like a Unicode character not representable
in the given \fIencoding\fR.
.
The option \fB-failindex\fR is followed by a variable name. The variable
is set to \fI-1\fR if no conversion error occured. It is set to the
first error location in \fIdata\fR in case of a conversion error. All data
until this error location is transformed and retured. This option may not
be used together with \fB-nocomplain\fR.
.
The call does not fail on conversion errors, if the option
\fB-nocomplain\fR is given. In this case, any error locations are replaced
by \fB?\fR. Incomplete sequences are written verbatim to the output string.
The purpose of this switch is to gain compatibility to prior versions of TCL.
It is not recommended for any other usage.
specified, the current system encoding is used. If at least one of
\fB-strict\fR/\fB-failindex var\fR/\fB-nocomplain\fR
is provided, this makes the \fIencoding\fR argument mandatory.
.VS "TCL8.7 TIP346, TIP607, TIP601"
.PP
.RS
The command does not fail on encoding errors. Instead, the replacement character
\fB?\fR is output for any not representable character (like the dot \fB\\U2022\fR
in \fBiso-8859-1\fR encoding, see example below).
.PP
If the option \fB-failindex\fR with a variable name is given, the error reporting
is changed in the following manner:
in case of a conversion error, the position of the input character causing the error
is returned in the given variable. The return value of the command are the
converted bytes until the first error position. No error condition is raised.
In case of no error, the value \fI-1\fR is written to the variable. This option
may not be used together with \fB-nocomplain\fR.
.PP
The option \fB-nocomplain\fR has no effect and is available for compatibility with
TCL 9. In TCL 9, the encoding command fails with an error on any encoding issue.
This switch restores the TCL8.7 behaviour.
.PP
The \fB-strict\fR option follows more strict rules in conversion. For the \fButf-8\fR
encoder, it disallows surrogates (which - otherwise - are just passed through). This
option may not be used together with \fB-nocomplain\fR.
.VE "TCL8.7 TIP346, TIP607, TIP601"
.RE
.TP
\fBencoding dirs\fR ?\fIdirectoryList\fR?
.
@@ -104,7 +128,7 @@ omitted then the command returns the current system encoding. The
system encoding is used whenever Tcl passes strings to system calls.
.SH EXAMPLE
.PP
The following example converts a byte sequence in Japanese euc-jp encoding to a TCL string:
Example 1: convert a byte sequence in Japanese euc-jp encoding to a TCL string:
.PP
.CS
set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"]
@@ -113,8 +137,9 @@ set s [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"]
The result is the unicode codepoint:
.QW "\eu306F" ,
which is the Hiragana letter HA.
.VS "TCL8.7 TIP346, TIP607, TIP601"
.PP
The following example detects the error location in an incomplete UTF-8 sequence:
Example 2: detect the error location in an incomplete UTF-8 sequence:
.PP
.CS
% set s [\fBencoding convertfrom\fR -failindex i utf-8 "A\exC3"]
@@ -123,7 +148,15 @@ A
1
.CE
.PP
The following example detects the error location while transforming to ISO8859-1
Example 3: return the incomplete UTF-8 sequence by raw bytes:
.PP
.CS
% set s [\fBencoding convertfrom\fR -nocomplain utf-8 "A\exC3"]
.CE
The result is "A" followed by the byte \exC3. The option \fB-nocomplain\fR
has no effect, but assures to get the same result with TCL9.
.PP
Example 4: detect the error location while transforming to ISO8859-1
(ISO-Latin 1):
.PP
.CS
@@ -133,8 +166,18 @@ A
1
.CE
.PP
Example 5: replace a not representable character by the replacement character:
.PP
.CS
% set s [\fBencoding convertto\fR -nocomplain utf-8 "A\eu0141"]
A?
.CE
The option \fB-nocomplain\fR has no effect, but assures to get the same result
with TCL9.
.VE "TCL8.7 TIP346, TIP607, TIP601"
.PP
.SH "SEE ALSO"
Tcl_GetEncoding(3)
Tcl_GetEncoding(3), fconfigure(n)
.SH KEYWORDS
encoding, unicode
.\" Local Variables:
+26 -1
View File
@@ -103,7 +103,7 @@ system, as returned by \fBencoding system\fR.
.TP
\fB\-eofchar\fR \fIchar\fR
.TP
\fB\-eofchar\fR \fB{\fIinChar outChar\fB}\fR
\fB\-eofchar\fR \fB{\fIchar outChar\fB}\fR
.
This option supports DOS file systems that use Control-z (\ex1A) as an
end of file marker. If \fIchar\fR is not an empty string, then this
@@ -122,6 +122,31 @@ reading and the empty string for writing.
The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7F;
attempting to set \fB\-eofchar\fR to a value outside of this range will
generate an error.
.VS "TCL8.7 TIP633"
.TP
\fB\-nocomplainencoding\fR \fIbool\fR
.
Reporting mode of encoding errors.
If set to a \fItrue\fR value, encoding errors are resolved by a replacement
character (output) or verbatim bytes (input). No error is thrown.
This is the only available mode in Tcl 8.7.
.RS
.PP
Starting from TCL 9.0, this value may be set to a \fIfalse\fR value to throw errors
in case of encoding errors.
.RE
.VE "TCL8.7 TIP633"
.VS "TCL8.7 TIP346"
.TP
\fB\-strictencoding\fR \fIbool\fR
.
Activate additional stricter encoding application rules.
Default value is \fIfalse\fR.
.RS
.PP
See the \fI\-strict\fR option of the \fBencoding\fR command for more information.
.VE "TCL8.7 TIP346"
.RE
.TP
\fB\-translation\fR \fImode\fR
.TP
+40 -11
View File
@@ -172,14 +172,15 @@ fresh socket, overriding the \fB\-keepalive\fR option of
command \fBhttp::geturl\fR. See the \fBPERSISTENT SOCKETS\fR section for
details. The default is 0.
.TP
\fB\-proxyhost\fR \fIhostname\fR
\fB\-proxyauth\fR \fIstring\fR
.
The name of the proxy host, if any. If this value is the
empty string, the URL host is contacted directly.
.TP
\fB\-proxyport\fR \fInumber\fR
.
The proxy port number.
If non-empty, the string is supplied to the proxy server as the value of the
request header Proxy-Authorization. This option can be used for HTTP Basic
Authentication. If the proxy server requires authentication by another
technique, e.g. Digest Authentication, the \fB\-proxyauth\fR option is not
useful. In that case the caller must expect a 407 response from the proxy,
compute the authentication value to be supplied, and use the \fB\-headers\fR
option to supply it as the value of the Proxy-Authorization header.
.TP
\fB\-proxyfilter\fR \fIcommand\fR
.
@@ -188,18 +189,46 @@ The command is a callback that is made during
to determine if a proxy is required for a given host. One argument, a
host name, is added to \fIcommand\fR when it is invoked. If a proxy
is required, the callback should return a two-element list containing
the proxy server and proxy port. Otherwise the filter should return
an empty list. The default filter returns the values of the
\fB\-proxyhost\fR and \fB\-proxyport\fR settings if they are
non-empty.
the proxy server and proxy port. Otherwise the filter command should return
an empty list.
.RS
.PP
The default value of \fB\-proxyfilter\fR is \fBhttp::ProxyRequired\fR, and
this command returns the values of the \fB\-proxyhost\fR and
\fB\-proxyport\fR settings if they are non-empty. The options
\fB\-proxyhost\fR, \fB\-proxyport\fR, and \fB\-proxynot\fR are used only
by \fBhttp::ProxyRequired\fR, and nowhere else in \fB::http::geturl\fR.
A user-supplied \fB\-proxyfilter\fR command may use these options, or
alternatively it may obtain values from elsewhere in the calling script.
In the latter case, any values provided for \fB\-proxyhost\fR,
\fB\-proxyport\fR, and \fB\-proxynot\fR are unused.
.PP
The \fB::http::geturl\fR command runs the \fB\-proxyfilter\fR callback inside
a \fBcatch\fR command. Therefore an error in the callback command does
not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
details.
.RE
.TP
\fB\-proxyhost\fR \fIhostname\fR
.
The host name or IP address of the proxy server, if any. If this value is
the empty string, the URL host is contacted directly. See
\fB\-proxyfilter\fR for how the value is used.
.TP
\fB\-proxynot\fR \fIlist\fR
.
A Tcl list of domain names and IP addresses that should be accessed directly,
not through the proxy server. The target hostname is compared with each list
element using a case-insensitive \fBstring match\fR. It is often convenient
to use the wildcard "*" at the start of a domain name (e.g. *.example.com) or
at the end of an IP address (e.g. 192.168.0.*). See \fB\-proxyfilter\fR for
how the value is used.
.TP
\fB\-proxyport\fR \fInumber\fR
.
The port number of the proxy server. See \fB\-proxyfilter\fR for how the
value is used.
.TP
\fB\-repost\fR \fIboolean\fR
.
Specifies what to do if a POST request over a persistent connection fails
+2 -3
View File
@@ -468,7 +468,7 @@ Examples of use with "Sync Mode" off: any of these commands will set the
safe::interpConfigure foo -accessPath {}
.CE
.RE
.TP
.PP
Example of use with "Sync Mode" off: when initializing a safe interpreter
with a non-empty access path, the ::auto_path will be set to {} unless its
own value is also specified:
@@ -506,7 +506,7 @@ own value is also specified:
}
.CE
.RE
.TP
.PP
Example of use with "Sync Mode" off: the command
\fBsafe::interpAddToAccessPath\fR does not change the safe interpreter's
::auto_path, and so any necessary change must be made by the script:
@@ -520,7 +520,6 @@ Example of use with "Sync Mode" off: the command
safe::interpConfigure foo -autoPath $childAutoPath
.CE
.RE
.TP
.SH "SEE ALSO"
interp(n), library(n), load(n), package(n), pkg_mkIndex(n), source(n),
tm(n), unknown(n)
+139 -123
View File
@@ -86,10 +86,10 @@ declare 15 {
void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...)
}
declare 16 {
void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, int length)
void Tcl_AppendToObj(Tcl_Obj *objPtr, const char *bytes, Tcl_Size length)
}
declare 17 {
Tcl_Obj *Tcl_ConcatObj(int objc, Tcl_Obj *const objv[])
Tcl_Obj *Tcl_ConcatObj(Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 18 {
int Tcl_ConvertToType(Tcl_Interp *interp, Tcl_Obj *objPtr,
@@ -109,14 +109,14 @@ declare 22 {deprecated {No longer in use, changed to macro}} {
}
declare 23 {
Tcl_Obj *Tcl_DbNewByteArrayObj(const unsigned char *bytes,
int numBytes, const char *file, int line)
Tcl_Size numBytes, const char *file, int line)
}
declare 24 {
Tcl_Obj *Tcl_DbNewDoubleObj(double doubleValue, const char *file,
int line)
}
declare 25 {
Tcl_Obj *Tcl_DbNewListObj(int objc, Tcl_Obj *const *objv,
Tcl_Obj *Tcl_DbNewListObj(Tcl_Size objc, Tcl_Obj *const *objv,
const char *file, int line)
}
declare 26 {deprecated {No longer in use, changed to macro}} {
@@ -126,7 +126,7 @@ declare 27 {
Tcl_Obj *Tcl_DbNewObj(const char *file, int line)
}
declare 28 {
Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, int length,
Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, Tcl_Size length,
const char *file, int line)
}
declare 29 {
@@ -188,7 +188,7 @@ declare 45 {
int *objcPtr, Tcl_Obj ***objvPtr)
}
declare 46 {
int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, int index,
int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size index,
Tcl_Obj **objPtrPtr)
}
declare 47 {
@@ -196,14 +196,14 @@ declare 47 {
int *lengthPtr)
}
declare 48 {
int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, int first,
int count, int objc, Tcl_Obj *const objv[])
int Tcl_ListObjReplace(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Size first,
Tcl_Size count, Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 49 {deprecated {No longer in use, changed to macro}} {
Tcl_Obj *Tcl_NewBooleanObj(int intValue)
}
declare 50 {
Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char *bytes, int numBytes)
Tcl_Obj *Tcl_NewByteArrayObj(const unsigned char *bytes, Tcl_Size numBytes)
}
declare 51 {
Tcl_Obj *Tcl_NewDoubleObj(double doubleValue)
@@ -212,7 +212,7 @@ declare 52 {deprecated {No longer in use, changed to macro}} {
Tcl_Obj *Tcl_NewIntObj(int intValue)
}
declare 53 {
Tcl_Obj *Tcl_NewListObj(int objc, Tcl_Obj *const objv[])
Tcl_Obj *Tcl_NewListObj(Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 54 {deprecated {No longer in use, changed to macro}} {
Tcl_Obj *Tcl_NewLongObj(long longValue)
@@ -221,17 +221,17 @@ declare 55 {
Tcl_Obj *Tcl_NewObj(void)
}
declare 56 {
Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length)
Tcl_Obj *Tcl_NewStringObj(const char *bytes, Tcl_Size length)
}
declare 57 {deprecated {No longer in use, changed to macro}} {
void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int intValue)
}
declare 58 {
unsigned char *Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int numBytes)
unsigned char *Tcl_SetByteArrayLength(Tcl_Obj *objPtr, Tcl_Size numBytes)
}
declare 59 {
void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, const unsigned char *bytes,
int numBytes)
Tcl_Size numBytes)
}
declare 60 {
void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue)
@@ -240,16 +240,16 @@ declare 61 {deprecated {No longer in use, changed to macro}} {
void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue)
}
declare 62 {
void Tcl_SetListObj(Tcl_Obj *objPtr, int objc, Tcl_Obj *const objv[])
void Tcl_SetListObj(Tcl_Obj *objPtr, Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 63 {deprecated {No longer in use, changed to macro}} {
void Tcl_SetLongObj(Tcl_Obj *objPtr, long longValue)
}
declare 64 {
void Tcl_SetObjLength(Tcl_Obj *objPtr, int length)
void Tcl_SetObjLength(Tcl_Obj *objPtr, Tcl_Size length)
}
declare 65 {
void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, int length)
void Tcl_SetStringObj(Tcl_Obj *objPtr, const char *bytes, Tcl_Size length)
}
declare 66 {deprecated {No longer in use, changed to macro}} {
void Tcl_AddErrorInfo(Tcl_Interp *interp, const char *message)
@@ -308,23 +308,23 @@ declare 82 {
int Tcl_CommandComplete(const char *cmd)
}
declare 83 {
char *Tcl_Concat(int argc, const char *const *argv)
char *Tcl_Concat(Tcl_Size argc, const char *const *argv)
}
declare 84 {
int Tcl_ConvertElement(const char *src, char *dst, int flags)
Tcl_Size Tcl_ConvertElement(const char *src, char *dst, int flags)
}
declare 85 {
int Tcl_ConvertCountedElement(const char *src, int length, char *dst,
Tcl_Size Tcl_ConvertCountedElement(const char *src, Tcl_Size length, char *dst,
int flags)
}
declare 86 {
int Tcl_CreateAlias(Tcl_Interp *childInterp, const char *childCmd,
Tcl_Interp *target, const char *targetCmd, int argc,
Tcl_Interp *target, const char *targetCmd, Tcl_Size argc,
const char *const *argv)
}
declare 87 {
int Tcl_CreateAliasObj(Tcl_Interp *childInterp, const char *childCmd,
Tcl_Interp *target, const char *targetCmd, int objc,
Tcl_Interp *target, const char *targetCmd, Tcl_Size objc,
Tcl_Obj *const objv[])
}
declare 88 {
@@ -374,7 +374,7 @@ declare 98 {
Tcl_TimerProc *proc, void *clientData)
}
declare 99 {
Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, int level,
Tcl_Trace Tcl_CreateTrace(Tcl_Interp *interp, Tcl_Size level,
Tcl_CmdTraceProc *proc, void *clientData)
}
declare 100 {
@@ -414,7 +414,7 @@ declare 110 {
void Tcl_DeleteInterp(Tcl_Interp *interp)
}
declare 111 {
void Tcl_DetachPids(int numPids, Tcl_Pid *pidPtr)
void Tcl_DetachPids(Tcl_Size numPids, Tcl_Pid *pidPtr)
}
declare 112 {
void Tcl_DeleteTimerHandler(Tcl_TimerToken token)
@@ -433,7 +433,7 @@ declare 116 {
void Tcl_DoWhenIdle(Tcl_IdleProc *proc, void *clientData)
}
declare 117 {
char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length)
char *Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, Tcl_Size length)
}
declare 118 {
char *Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element)
@@ -454,7 +454,7 @@ declare 123 {
void Tcl_DStringResult(Tcl_Interp *interp, Tcl_DString *dsPtr)
}
declare 124 {
void Tcl_DStringSetLength(Tcl_DString *dsPtr, int length)
void Tcl_DStringSetLength(Tcl_DString *dsPtr, Tcl_Size length)
}
declare 125 {
void Tcl_DStringStartSublist(Tcl_DString *dsPtr)
@@ -547,7 +547,7 @@ declare 151 {
int *modePtr)
}
declare 152 {
int Tcl_GetChannelBufferSize(Tcl_Channel chan)
Tcl_Size Tcl_GetChannelBufferSize(Tcl_Channel chan)
}
declare 153 {
int Tcl_GetChannelHandle(Tcl_Channel chan, int direction,
@@ -609,10 +609,10 @@ declare 168 {
Tcl_PathType Tcl_GetPathType(const char *path)
}
declare 169 {
int Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr)
Tcl_Size Tcl_Gets(Tcl_Channel chan, Tcl_DString *dsPtr)
}
declare 170 {
int Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr)
Tcl_Size Tcl_GetsObj(Tcl_Channel chan, Tcl_Obj *objPtr)
}
declare 171 {
int Tcl_GetServiceMode(void)
@@ -664,7 +664,7 @@ declare 185 {
}
# Obsolete, use Tcl_FSJoinPath
declare 186 {
char *Tcl_JoinPath(int argc, const char *const *argv,
char *Tcl_JoinPath(Tcl_Size argc, const char *const *argv,
Tcl_DString *resultPtr)
}
declare 187 {
@@ -687,7 +687,7 @@ declare 191 {
Tcl_Channel Tcl_MakeTcpClientChannel(void *tcpSocket)
}
declare 192 {
char *Tcl_Merge(int argc, const char *const *argv)
char *Tcl_Merge(Tcl_Size argc, const char *const *argv)
}
declare 193 {
Tcl_HashEntry *Tcl_NextHashEntry(Tcl_HashSearch *searchPtr)
@@ -704,7 +704,7 @@ declare 196 {
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags)
}
declare 197 {
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, int argc,
Tcl_Channel Tcl_OpenCommandChannel(Tcl_Interp *interp, Tcl_Size argc,
const char **argv, int flags)
}
# This is obsolete, use Tcl_FSOpenFileChannel
@@ -714,7 +714,7 @@ declare 198 {
}
declare 199 {
Tcl_Channel Tcl_OpenTcpClient(Tcl_Interp *interp, int port,
const char *address, const char *myaddr, int myport, int async)
const char *address, const char *myaddr, int myport, int flags)
}
declare 200 {
Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port,
@@ -737,7 +737,7 @@ declare 205 {
void Tcl_QueueEvent(Tcl_Event *evPtr, int position)
}
declare 206 {
int Tcl_Read(Tcl_Channel chan, char *bufPtr, int toRead)
Tcl_Size Tcl_Read(Tcl_Channel chan, char *bufPtr, Tcl_Size toRead)
}
declare 207 {
void Tcl_ReapDetachedProcs(void)
@@ -766,7 +766,7 @@ declare 214 {
const char *pattern)
}
declare 215 {
void Tcl_RegExpRange(Tcl_RegExp regexp, int index,
void Tcl_RegExpRange(Tcl_RegExp regexp, Tcl_Size index,
const char **startPtr, const char **endPtr)
}
declare 216 {
@@ -776,10 +776,10 @@ declare 217 {
void Tcl_ResetResult(Tcl_Interp *interp)
}
declare 218 {
int Tcl_ScanElement(const char *src, int *flagPtr)
Tcl_Size Tcl_ScanElement(const char *src, int *flagPtr)
}
declare 219 {
int Tcl_ScanCountedElement(const char *src, int length, int *flagPtr)
Tcl_Size Tcl_ScanCountedElement(const char *src, Tcl_Size length, int *flagPtr)
}
declare 220 {deprecated {}} {
int Tcl_SeekOld(Tcl_Channel chan, int offset, int mode)
@@ -795,7 +795,7 @@ declare 223 {
Tcl_InterpDeleteProc *proc, void *clientData)
}
declare 224 {
void Tcl_SetChannelBufferSize(Tcl_Channel chan, int sz)
void Tcl_SetChannelBufferSize(Tcl_Channel chan, Tcl_Size sz)
}
declare 225 {
int Tcl_SetChannelOption(Tcl_Interp *interp, Tcl_Channel chan,
@@ -818,7 +818,7 @@ declare 230 {nostub {Don't use this function in a stub-enabled extension}} {
const char *Tcl_SetPanicProc(TCL_NORETURN1 Tcl_PanicProc *panicProc)
}
declare 231 {
int Tcl_SetRecursionLimit(Tcl_Interp *interp, int depth)
Tcl_Size Tcl_SetRecursionLimit(Tcl_Interp *interp, Tcl_Size depth)
}
declare 232 {
void Tcl_SetResult(Tcl_Interp *interp, char *result,
@@ -884,7 +884,7 @@ declare 249 {
Tcl_DString *bufferPtr)
}
declare 250 {
int Tcl_Ungets(Tcl_Channel chan, const char *str, int len, int atHead)
Tcl_Size Tcl_Ungets(Tcl_Channel chan, const char *str, Tcl_Size len, int atHead)
}
declare 251 {
void Tcl_UnlinkVar(Tcl_Interp *interp, const char *varName)
@@ -932,10 +932,10 @@ declare 262 {
void *prevClientData)
}
declare 263 {
int Tcl_Write(Tcl_Channel chan, const char *s, int slen)
Tcl_Size Tcl_Write(Tcl_Channel chan, const char *s, Tcl_Size slen)
}
declare 264 {
void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc,
void Tcl_WrongNumArgs(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], const char *message)
}
declare 265 {
@@ -1047,11 +1047,11 @@ declare 290 {deprecated {Use Tcl_DiscardInterpState}} {
void Tcl_DiscardResult(Tcl_SavedResult *statePtr)
}
declare 291 {
int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes,
int Tcl_EvalEx(Tcl_Interp *interp, const char *script, Tcl_Size numBytes,
int flags)
}
declare 292 {
int Tcl_EvalObjv(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[],
int Tcl_EvalObjv(Tcl_Interp *interp, Tcl_Size objc, Tcl_Obj *const objv[],
int flags)
}
declare 293 {
@@ -1062,13 +1062,13 @@ declare 294 {
}
declare 295 {
int Tcl_ExternalToUtf(Tcl_Interp *interp, Tcl_Encoding encoding,
const char *src, int srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, int dstLen,
const char *src, Tcl_Size srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen,
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
}
declare 296 {
char *Tcl_ExternalToUtfDString(Tcl_Encoding encoding,
const char *src, int srcLen, Tcl_DString *dsPtr)
const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr)
}
declare 297 {
void Tcl_FinalizeThread(void)
@@ -1093,11 +1093,11 @@ declare 303 {
}
declare 304 {
int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr,
const void *tablePtr, int offset, const char *msg, int flags,
const void *tablePtr, Tcl_Size offset, const char *msg, int flags,
void *indexPtr)
}
declare 305 {
void *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, int size)
void *Tcl_GetThreadData(Tcl_ThreadDataKey *keyPtr, Tcl_Size size)
}
declare 306 {
Tcl_Obj *Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1,
@@ -1120,11 +1120,11 @@ declare 311 {
const Tcl_Time *timePtr)
}
declare 312 {
int Tcl_NumUtfChars(const char *src, int length)
Tcl_Size Tcl_NumUtfChars(const char *src, Tcl_Size length)
}
declare 313 {
int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
int charsToRead, int appendFlag)
Tcl_Size Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr,
Tcl_Size charsToRead, int appendFlag)
}
declare 314 {deprecated {Use Tcl_RestoreInterpState}} {
void Tcl_RestoreResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr)
@@ -1147,7 +1147,7 @@ declare 319 {
int position)
}
declare 320 {
int Tcl_UniCharAtIndex(const char *src, int index)
int Tcl_UniCharAtIndex(const char *src, Tcl_Size index)
}
declare 321 {
int Tcl_UniCharToLower(int ch)
@@ -1162,13 +1162,13 @@ declare 324 {
int Tcl_UniCharToUtf(int ch, char *buf)
}
declare 325 {
const char *Tcl_UtfAtIndex(const char *src, int index)
const char *Tcl_UtfAtIndex(const char *src, Tcl_Size index)
}
declare 326 {
int TclUtfCharComplete(const char *src, int length)
int TclUtfCharComplete(const char *src, Tcl_Size length)
}
declare 327 {
int Tcl_UtfBackslash(const char *src, int *readPtr, char *dst)
Tcl_Size Tcl_UtfBackslash(const char *src, int *readPtr, char *dst)
}
declare 328 {
const char *Tcl_UtfFindFirst(const char *src, int ch)
@@ -1184,13 +1184,13 @@ declare 331 {
}
declare 332 {
int Tcl_UtfToExternal(Tcl_Interp *interp, Tcl_Encoding encoding,
const char *src, int srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, int dstLen,
const char *src, Tcl_Size srcLen, int flags,
Tcl_EncodingState *statePtr, char *dst, Tcl_Size dstLen,
int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr)
}
declare 333 {
char *Tcl_UtfToExternalDString(Tcl_Encoding encoding,
const char *src, int srcLen, Tcl_DString *dsPtr)
const char *src, Tcl_Size srcLen, Tcl_DString *dsPtr)
}
declare 334 {
int Tcl_UtfToLower(char *src)
@@ -1205,10 +1205,10 @@ declare 337 {
int Tcl_UtfToUpper(char *src)
}
declare 338 {
int Tcl_WriteChars(Tcl_Channel chan, const char *src, int srcLen)
Tcl_Size Tcl_WriteChars(Tcl_Channel chan, const char *src, Tcl_Size srcLen)
}
declare 339 {
int Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr)
Tcl_Size Tcl_WriteObj(Tcl_Channel chan, Tcl_Obj *objPtr)
}
declare 340 {
char *Tcl_GetString(Tcl_Obj *objPtr)
@@ -1247,7 +1247,7 @@ declare 351 {
int Tcl_UniCharIsWordChar(int ch)
}
declare 352 {
int Tcl_Char16Len(const unsigned short *uniStr)
Tcl_Size Tcl_Char16Len(const unsigned short *uniStr)
}
declare 353 {deprecated {Use Tcl_UtfNcmp}} {
int Tcl_UniCharNcmp(const unsigned short *ucs, const unsigned short *uct,
@@ -1255,11 +1255,11 @@ declare 353 {deprecated {Use Tcl_UtfNcmp}} {
}
declare 354 {
char *Tcl_Char16ToUtfDString(const unsigned short *uniStr,
int uniLength, Tcl_DString *dsPtr)
Tcl_Size uniLength, Tcl_DString *dsPtr)
}
declare 355 {
unsigned short *Tcl_UtfToChar16DString(const char *src,
int length, Tcl_DString *dsPtr)
Tcl_Size length, Tcl_DString *dsPtr)
}
declare 356 {
Tcl_RegExp Tcl_GetRegExpFromObj(Tcl_Interp *interp, Tcl_Obj *patObj,
@@ -1274,29 +1274,29 @@ declare 358 {
}
declare 359 {
void Tcl_LogCommandInfo(Tcl_Interp *interp, const char *script,
const char *command, int length)
const char *command, Tcl_Size length)
}
declare 360 {
int Tcl_ParseBraces(Tcl_Interp *interp, const char *start,
int numBytes, Tcl_Parse *parsePtr, int append,
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append,
const char **termPtr)
}
declare 361 {
int Tcl_ParseCommand(Tcl_Interp *interp, const char *start,
int numBytes, int nested, Tcl_Parse *parsePtr)
Tcl_Size numBytes, int nested, Tcl_Parse *parsePtr)
}
declare 362 {
int Tcl_ParseExpr(Tcl_Interp *interp, const char *start,
int numBytes, Tcl_Parse *parsePtr)
Tcl_Size numBytes, Tcl_Parse *parsePtr)
}
declare 363 {
int Tcl_ParseQuotedString(Tcl_Interp *interp, const char *start,
int numBytes, Tcl_Parse *parsePtr, int append,
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append,
const char **termPtr)
}
declare 364 {
int Tcl_ParseVarName(Tcl_Interp *interp, const char *start,
int numBytes, Tcl_Parse *parsePtr, int append)
Tcl_Size numBytes, Tcl_Parse *parsePtr, int append)
}
# These 4 functions are obsolete, use Tcl_FSGetCwd, Tcl_FSChdir,
# Tcl_FSAccess and Tcl_FSStat
@@ -1335,33 +1335,33 @@ declare 375 {
}
declare 376 {
int Tcl_RegExpExecObj(Tcl_Interp *interp, Tcl_RegExp regexp,
Tcl_Obj *textObj, int offset, int nmatches, int flags)
Tcl_Obj *textObj, Tcl_Size offset, Tcl_Size nmatches, int flags)
}
declare 377 {
void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr)
}
declare 378 {
Tcl_Obj *Tcl_NewUnicodeObj(const unsigned short *unicode, int numChars)
Tcl_Obj *Tcl_NewUnicodeObj(const unsigned short *unicode, Tcl_Size numChars)
}
declare 379 {
void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, const unsigned short *unicode,
int numChars)
Tcl_Size numChars)
}
declare 380 {
int Tcl_GetCharLength(Tcl_Obj *objPtr)
Tcl_Size Tcl_GetCharLength(Tcl_Obj *objPtr)
}
declare 381 {
int Tcl_GetUniChar(Tcl_Obj *objPtr, int index)
int Tcl_GetUniChar(Tcl_Obj *objPtr, Tcl_Size index)
}
declare 382 {deprecated {No longer in use, changed to macro}} {
unsigned short *Tcl_GetUnicode(Tcl_Obj *objPtr)
}
declare 383 {
Tcl_Obj *Tcl_GetRange(Tcl_Obj *objPtr, int first, int last)
Tcl_Obj *Tcl_GetRange(Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last)
}
declare 384 {
void Tcl_AppendUnicodeToObj(Tcl_Obj *objPtr, const unsigned short *unicode,
int length)
Tcl_Size length)
}
declare 385 {
int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *textObj,
@@ -1381,7 +1381,7 @@ declare 389 {
}
declare 390 {
int Tcl_ProcObjCmd(void *clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[])
Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 391 {
void Tcl_ConditionFinalize(Tcl_Condition *condPtr)
@@ -1391,15 +1391,15 @@ declare 392 {
}
declare 393 {
int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc,
void *clientData, int stackSize, int flags)
void *clientData, Tcl_Size stackSize, int flags)
}
# Introduced in 8.3.2
declare 394 {
int Tcl_ReadRaw(Tcl_Channel chan, char *dst, int bytesToRead)
Tcl_Size Tcl_ReadRaw(Tcl_Channel chan, char *dst, Tcl_Size bytesToRead)
}
declare 395 {
int Tcl_WriteRaw(Tcl_Channel chan, const char *src, int srcLen)
Tcl_Size Tcl_WriteRaw(Tcl_Channel chan, const char *src, Tcl_Size srcLen)
}
declare 396 {
Tcl_Channel Tcl_GetTopChannel(Tcl_Channel chan)
@@ -1534,7 +1534,7 @@ declare 431 {
const char *file, int line)
}
declare 432 {
int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, int length)
int Tcl_AttemptSetObjLength(Tcl_Obj *objPtr, Tcl_Size length)
}
# TIP#10 (thread-aware channels) akupries
@@ -1640,7 +1640,7 @@ declare 459 {
int Tcl_FSConvertToPathType(Tcl_Interp *interp, Tcl_Obj *pathPtr)
}
declare 460 {
Tcl_Obj *Tcl_FSJoinPath(Tcl_Obj *listObj, int elements)
Tcl_Obj *Tcl_FSJoinPath(Tcl_Obj *listObj, Tcl_Size elements)
}
declare 461 {
Tcl_Obj *Tcl_FSSplitPath(Tcl_Obj *pathPtr, int *lenPtr)
@@ -1652,7 +1652,7 @@ declare 463 {
Tcl_Obj *Tcl_FSGetNormalizedPath(Tcl_Interp *interp, Tcl_Obj *pathPtr)
}
declare 464 {
Tcl_Obj *Tcl_FSJoinToPath(Tcl_Obj *pathPtr, int objc,
Tcl_Obj *Tcl_FSJoinToPath(Tcl_Obj *pathPtr, Tcl_Size objc,
Tcl_Obj *const objv[])
}
declare 465 {
@@ -1712,7 +1712,7 @@ declare 480 {
# TIP#56 (evaluate a parsed script) msofer
declare 481 {
int Tcl_EvalTokensStandard(Tcl_Interp *interp, Tcl_Token *tokenPtr,
int count)
Tcl_Size count)
}
# TIP#73 (access to current time) kbk
@@ -1722,7 +1722,7 @@ declare 482 {
# TIP#32 (object-enabled traces) kbk
declare 483 {
Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, int level, int flags,
Tcl_Trace Tcl_CreateObjTrace(Tcl_Interp *interp, Tcl_Size level, int flags,
Tcl_CmdObjTraceProc *objProc, void *clientData,
Tcl_CmdObjTraceDeleteProc *delProc)
}
@@ -1798,11 +1798,11 @@ declare 500 {
}
declare 501 {
int Tcl_DictObjPutKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr,
int keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr)
Tcl_Size keyc, Tcl_Obj *const *keyv, Tcl_Obj *valuePtr)
}
declare 502 {
int Tcl_DictObjRemoveKeyList(Tcl_Interp *interp, Tcl_Obj *dictPtr,
int keyc, Tcl_Obj *const *keyv)
Tcl_Size keyc, Tcl_Obj *const *keyv)
}
declare 503 {
Tcl_Obj *Tcl_NewDictObj(void)
@@ -1895,7 +1895,7 @@ declare 524 {
int Tcl_LimitExceeded(Tcl_Interp *interp)
}
declare 525 {
void Tcl_LimitSetCommands(Tcl_Interp *interp, int commandLimit)
void Tcl_LimitSetCommands(Tcl_Interp *interp, Tcl_Size commandLimit)
}
declare 526 {
void Tcl_LimitSetTime(Tcl_Interp *interp, Tcl_Time *timeLimitPtr)
@@ -2084,7 +2084,7 @@ declare 572 {
# TIP#268 (extended version numbers and requirements) akupries
declare 573 {
int Tcl_PkgRequireProc(Tcl_Interp *interp, const char *name,
int objc, Tcl_Obj *const objv[], void *clientDataPtr)
Tcl_Size objc, Tcl_Obj *const objv[], void *clientDataPtr)
}
# TIP#270 (utility C routines for string formatting) dgp
@@ -2093,15 +2093,15 @@ declare 574 {
}
declare 575 {
void Tcl_AppendLimitedToObj(Tcl_Obj *objPtr, const char *bytes,
int length, int limit, const char *ellipsis)
Tcl_Size length, Tcl_Size limit, const char *ellipsis)
}
declare 576 {
Tcl_Obj *Tcl_Format(Tcl_Interp *interp, const char *format, int objc,
Tcl_Obj *Tcl_Format(Tcl_Interp *interp, const char *format, Tcl_Size objc,
Tcl_Obj *const objv[])
}
declare 577 {
int Tcl_AppendFormatToObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
const char *format, int objc, Tcl_Obj *const objv[])
const char *format, Tcl_Size objc, Tcl_Obj *const objv[])
}
declare 578 {
Tcl_Obj *Tcl_ObjPrintf(const char *format, ...)
@@ -2138,11 +2138,11 @@ declare 584 {
int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags)
}
declare 585 {
int Tcl_NREvalObjv(Tcl_Interp *interp, int objc,
int Tcl_NREvalObjv(Tcl_Interp *interp, Tcl_Size objc,
Tcl_Obj *const objv[], int flags)
}
declare 586 {
int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, int objc,
int Tcl_NRCmdSwap(Tcl_Interp *interp, Tcl_Command cmd, Tcl_Size objc,
Tcl_Obj *const objv[], int flags)
}
declare 587 {
@@ -2154,7 +2154,7 @@ declare 587 {
# classic objProc
declare 588 {
int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc,
void *clientData, int objc, Tcl_Obj *const objv[])
void *clientData, Tcl_Size objc, Tcl_Obj *const objv[])
}
# TIP#316 (Tcl_StatBuf reader functions) dkf
@@ -2245,15 +2245,15 @@ declare 610 {
}
declare 611 {
int Tcl_ZlibInflate(Tcl_Interp *interp, int format, Tcl_Obj *data,
int buffersize, Tcl_Obj *gzipHeaderDictObj)
Tcl_Size buffersize, Tcl_Obj *gzipHeaderDictObj)
}
declare 612 {
unsigned int Tcl_ZlibCRC32(unsigned int crc, const unsigned char *buf,
int len)
Tcl_Size len)
}
declare 613 {
unsigned int Tcl_ZlibAdler32(unsigned int adler, const unsigned char *buf,
int len)
Tcl_Size len)
}
declare 614 {
int Tcl_ZlibStreamInit(Tcl_Interp *interp, int mode, int format,
@@ -2273,7 +2273,7 @@ declare 618 {
}
declare 619 {
int Tcl_ZlibStreamGet(Tcl_ZlibStream zshandle, Tcl_Obj *data,
int count)
Tcl_Size count)
}
declare 620 {
int Tcl_ZlibStreamClose(Tcl_ZlibStream zshandle)
@@ -2327,11 +2327,11 @@ declare 630 {
# ----- BASELINE -- FOR -- 8.6.0 ----- #
# TIP #456
# TIP #456/#468
declare 631 {
Tcl_Channel Tcl_OpenTcpServerEx(Tcl_Interp *interp, const char *service,
const char *host, unsigned int flags, Tcl_TcpAcceptProc *acceptProc,
void *callbackData)
const char *host, unsigned int flags, int backlog,
Tcl_TcpAcceptProc *acceptProc, void *callbackData)
}
# TIP #430
@@ -2385,12 +2385,12 @@ declare 643 {
# TIP#312 New Tcl_LinkArray() function
declare 644 {
int Tcl_LinkArray(Tcl_Interp *interp, const char *varName, void *addr,
int type, int size)
int type, Tcl_Size size)
}
declare 645 {
int Tcl_GetIntForIndex(Tcl_Interp *interp, Tcl_Obj *objPtr,
int endValue, int *indexPtr)
Tcl_Size endValue, Tcl_Size *indexPtr)
}
# TIP #548
@@ -2399,11 +2399,11 @@ declare 646 {
}
declare 647 {
char *Tcl_UniCharToUtfDString(const int *uniStr,
int uniLength, Tcl_DString *dsPtr)
Tcl_Size uniLength, Tcl_DString *dsPtr)
}
declare 648 {
int *Tcl_UtfToUniCharDString(const char *src,
int length, Tcl_DString *dsPtr)
Tcl_Size length, Tcl_DString *dsPtr)
}
# TIP #568
@@ -2430,7 +2430,7 @@ declare 653 {
# TIP #575
declare 654 {
int Tcl_UtfCharComplete(const char *src, int length)
int Tcl_UtfCharComplete(const char *src, Tcl_Size length)
}
declare 655 {
const char *Tcl_UtfNext(const char *src)
@@ -2442,12 +2442,12 @@ declare 657 {
int Tcl_UniCharIsUnicode(int ch)
}
declare 658 {
int Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding,
const char *src, int srcLen, int flags, Tcl_DString *dsPtr)
Tcl_Size Tcl_ExternalToUtfDStringEx(Tcl_Encoding encoding,
const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr)
}
declare 659 {
int Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding,
const char *src, int srcLen, int flags, Tcl_DString *dsPtr)
Tcl_Size Tcl_UtfToExternalDStringEx(Tcl_Encoding encoding,
const char *src, Tcl_Size srcLen, int flags, Tcl_DString *dsPtr)
}
# TIP #511
@@ -2484,22 +2484,22 @@ declare 667 {
# TIP #617
declare 668 {
int Tcl_UniCharLen(const int *uniStr)
Tcl_Size Tcl_UniCharLen(const int *uniStr)
}
declare 669 {
int TclNumUtfChars(const char *src, int length)
Tcl_Size TclNumUtfChars(const char *src, Tcl_Size length)
}
declare 670 {
int TclGetCharLength(Tcl_Obj *objPtr)
Tcl_Size TclGetCharLength(Tcl_Obj *objPtr)
}
declare 671 {
const char *TclUtfAtIndex(const char *src, int index)
const char *TclUtfAtIndex(const char *src, Tcl_Size index)
}
declare 672 {
Tcl_Obj *TclGetRange(Tcl_Obj *objPtr, int first, int last)
Tcl_Obj *TclGetRange(Tcl_Obj *objPtr, Tcl_Size first, Tcl_Size last)
}
declare 673 {
int TclGetUniChar(Tcl_Obj *objPtr, int index)
int TclGetUniChar(Tcl_Obj *objPtr, Tcl_Size index)
}
declare 674 {
@@ -2517,7 +2517,7 @@ declare 676 {
Tcl_CmdDeleteProc *deleteProc)
}
declare 677 {
Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp, int level, int flags,
Tcl_Trace Tcl_CreateObjTrace2(Tcl_Interp *interp, Tcl_Size level, int flags,
Tcl_CmdObjTraceProc2 *objProc2, void *clientData,
Tcl_CmdObjTraceDeleteProc *delProc)
}
@@ -2547,11 +2547,26 @@ declare 682 {
int Tcl_RemoveChannelMode(Tcl_Interp *interp, Tcl_Channel chan, int mode)
}
# ----- BASELINE -- FOR -- 8.7.0 ----- #
# TIP 643
declare 683 {
int Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
Tcl_Size Tcl_GetEncodingNulLength(Tcl_Encoding encoding)
}
# TIP #650
declare 684 {
int Tcl_GetWideUIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
Tcl_WideUInt *uwidePtr)
}
# TIP 651
declare 685 {
Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr)
}
# ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- #
declare 687 {
void TclUnusedStubEntry(void)
}
##############################################################################
@@ -2602,10 +2617,10 @@ declare 2 macosx {
# Public functions that are not accessible via the stubs table.
export {
void Tcl_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc)
void Tcl_Main(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc)
}
export {
void Tcl_MainEx(int argc, char **argv, Tcl_AppInitProc *appInitProc,
void Tcl_MainEx(Tcl_Size argc, char **argv, Tcl_AppInitProc *appInitProc,
Tcl_Interp *interp)
}
export {
@@ -2643,6 +2658,7 @@ export {
const char *TclZipfs_AppHook(int *argc, char ***argv)
}
# Local Variables:
# mode: tcl
# End:
+117 -120
View File
@@ -48,10 +48,10 @@ extern "C" {
*/
#if !defined(TCL_MAJOR_VERSION)
#define TCL_MAJOR_VERSION 8
# define TCL_MAJOR_VERSION 8
#endif
#if TCL_MAJOR_VERSION != 8
#error "This header-file is for Tcl 8 only"
# error "This header-file is for Tcl 8 only"
#endif
#define TCL_MINOR_VERSION 7
#define TCL_RELEASE_LEVEL TCL_ALPHA_RELEASE
@@ -156,7 +156,7 @@ extern "C" {
# endif
#else
# define TCL_FORMAT_PRINTF(a,b)
# if defined(_MSC_VER) && (_MSC_VER >= 1310)
# if defined(_MSC_VER)
# define TCL_NORETURN _declspec(noreturn)
# define TCL_NOINLINE __declspec(noinline)
# else
@@ -323,10 +323,7 @@ typedef long LONG;
* Miscellaneous declarations.
*/
#ifndef _CLIENTDATA
typedef void *ClientData;
# define _CLIENTDATA
#endif
typedef void *ClientData;
/*
* Darwin specific configure overrides (to support fat compiles, where
@@ -407,30 +404,35 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
#define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
#if TCL_MAJOR_VERSION > 8
typedef size_t Tcl_Size;
#else
typedef int Tcl_Size;
#endif
#ifdef _WIN32
# if defined(_WIN64) || defined(_USE_64BIT_TIME_T)
# if TCL_MAJOR_VERSION > 8 || defined(_WIN64) || defined(_USE_64BIT_TIME_T)
typedef struct __stat64 Tcl_StatBuf;
# elif (defined(_MSC_VER) && (_MSC_VER < 1400)) || defined(_USE_32BIT_TIME_T)
# elif defined(_USE_32BIT_TIME_T)
typedef struct _stati64 Tcl_StatBuf;
# else
typedef struct _stat32i64 Tcl_StatBuf;
# endif /* _MSC_VER < 1400 */
# endif
#elif defined(__CYGWIN__)
typedef struct {
dev_t st_dev;
unsigned st_dev;
unsigned short st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
/* Here is a 2-byte gap */
dev_t st_rdev;
unsigned st_rdev;
/* Here is a 4-byte gap */
long long st_size;
struct {long tv_sec;} st_atim;
struct {long tv_sec;} st_mtim;
struct {long tv_sec;} st_ctim;
/* Here is a 4-byte gap */
} Tcl_StatBuf;
#elif defined(HAVE_STRUCT_STAT64) && !defined(__APPLE__)
typedef struct stat64 Tcl_StatBuf;
@@ -499,9 +501,9 @@ typedef struct Tcl_ZLibStream_ *Tcl_ZlibStream;
*/
#if defined _WIN32
typedef unsigned (__stdcall Tcl_ThreadCreateProc) (ClientData clientData);
typedef unsigned (__stdcall Tcl_ThreadCreateProc) (void *clientData);
#else
typedef void (Tcl_ThreadCreateProc) (ClientData clientData);
typedef void (Tcl_ThreadCreateProc) (void *clientData);
#endif
/*
@@ -665,67 +667,67 @@ struct Tcl_Obj;
*/
typedef int (Tcl_AppInitProc) (Tcl_Interp *interp);
typedef int (Tcl_AsyncProc) (ClientData clientData, Tcl_Interp *interp,
typedef int (Tcl_AsyncProc) (void *clientData, Tcl_Interp *interp,
int code);
typedef void (Tcl_ChannelProc) (ClientData clientData, int mask);
typedef void (Tcl_CloseProc) (ClientData data);
typedef void (Tcl_CmdDeleteProc) (ClientData clientData);
typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp,
typedef void (Tcl_ChannelProc) (void *clientData, int mask);
typedef void (Tcl_CloseProc) (void *data);
typedef void (Tcl_CmdDeleteProc) (void *clientData);
typedef int (Tcl_CmdProc) (void *clientData, Tcl_Interp *interp,
int argc, const char *argv[]);
typedef void (Tcl_CmdTraceProc) (ClientData clientData, Tcl_Interp *interp,
typedef void (Tcl_CmdTraceProc) (void *clientData, Tcl_Interp *interp,
int level, char *command, Tcl_CmdProc *proc,
ClientData cmdClientData, int argc, const char *argv[]);
typedef int (Tcl_CmdObjTraceProc) (ClientData clientData, Tcl_Interp *interp,
void *cmdClientData, int argc, const char *argv[]);
typedef int (Tcl_CmdObjTraceProc) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, int objc,
struct Tcl_Obj *const *objv);
typedef int (Tcl_CmdObjTraceProc2) (void *clientData, Tcl_Interp *interp,
int level, const char *command, Tcl_Command commandInfo, size_t objc,
size_t level, const char *command, Tcl_Command commandInfo, size_t objc,
struct Tcl_Obj *const *objv);
typedef void (Tcl_CmdObjTraceDeleteProc) (ClientData clientData);
typedef void (Tcl_CmdObjTraceDeleteProc) (void *clientData);
typedef void (Tcl_DupInternalRepProc) (struct Tcl_Obj *srcPtr,
struct Tcl_Obj *dupPtr);
typedef int (Tcl_EncodingConvertProc) (ClientData clientData, const char *src,
typedef int (Tcl_EncodingConvertProc) (void *clientData, const char *src,
int srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
int dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
typedef void (Tcl_EncodingFreeProc) (ClientData clientData);
typedef void (Tcl_EncodingFreeProc) (void *clientData);
typedef int (Tcl_EventProc) (Tcl_Event *evPtr, int flags);
typedef void (Tcl_EventCheckProc) (ClientData clientData, int flags);
typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, ClientData clientData);
typedef void (Tcl_EventSetupProc) (ClientData clientData, int flags);
typedef void (Tcl_ExitProc) (ClientData clientData);
typedef void (Tcl_FileProc) (ClientData clientData, int mask);
typedef void (Tcl_FileFreeProc) (ClientData clientData);
typedef void (Tcl_EventCheckProc) (void *clientData, int flags);
typedef int (Tcl_EventDeleteProc) (Tcl_Event *evPtr, void *clientData);
typedef void (Tcl_EventSetupProc) (void *clientData, int flags);
typedef void (Tcl_ExitProc) (void *clientData);
typedef void (Tcl_FileProc) (void *clientData, int mask);
typedef void (Tcl_FileFreeProc) (void *clientData);
typedef void (Tcl_FreeInternalRepProc) (struct Tcl_Obj *objPtr);
typedef void (Tcl_FreeProc) (char *blockPtr);
typedef void (Tcl_IdleProc) (ClientData clientData);
typedef void (Tcl_InterpDeleteProc) (ClientData clientData,
typedef void (Tcl_IdleProc) (void *clientData);
typedef void (Tcl_InterpDeleteProc) (void *clientData,
Tcl_Interp *interp);
typedef int (Tcl_MathProc) (ClientData clientData, Tcl_Interp *interp,
typedef int (Tcl_MathProc) (void *clientData, Tcl_Interp *interp,
Tcl_Value *args, Tcl_Value *resultPtr);
typedef void (Tcl_NamespaceDeleteProc) (ClientData clientData);
typedef int (Tcl_ObjCmdProc) (ClientData clientData, Tcl_Interp *interp,
typedef void (Tcl_NamespaceDeleteProc) (void *clientData);
typedef int (Tcl_ObjCmdProc) (void *clientData, Tcl_Interp *interp,
int objc, struct Tcl_Obj *const *objv);
typedef int (Tcl_ObjCmdProc2) (void *clientData, Tcl_Interp *interp,
size_t objc, struct Tcl_Obj *const *objv);
typedef int (Tcl_LibraryInitProc) (Tcl_Interp *interp);
typedef int (Tcl_LibraryUnloadProc) (Tcl_Interp *interp, int flags);
typedef void (Tcl_PanicProc) (const char *format, ...);
typedef void (Tcl_TcpAcceptProc) (ClientData callbackData, Tcl_Channel chan,
typedef void (Tcl_TcpAcceptProc) (void *callbackData, Tcl_Channel chan,
char *address, int port);
typedef void (Tcl_TimerProc) (ClientData clientData);
typedef void (Tcl_TimerProc) (void *clientData);
typedef int (Tcl_SetFromAnyProc) (Tcl_Interp *interp, struct Tcl_Obj *objPtr);
typedef void (Tcl_UpdateStringProc) (struct Tcl_Obj *objPtr);
typedef char * (Tcl_VarTraceProc) (ClientData clientData, Tcl_Interp *interp,
typedef char * (Tcl_VarTraceProc) (void *clientData, Tcl_Interp *interp,
const char *part1, const char *part2, int flags);
typedef void (Tcl_CommandTraceProc) (ClientData clientData, Tcl_Interp *interp,
typedef void (Tcl_CommandTraceProc) (void *clientData, Tcl_Interp *interp,
const char *oldName, const char *newName, int flags);
typedef void (Tcl_CreateFileHandlerProc) (int fd, int mask, Tcl_FileProc *proc,
ClientData clientData);
void *clientData);
typedef void (Tcl_DeleteFileHandlerProc) (int fd);
typedef void (Tcl_AlertNotifierProc) (ClientData clientData);
typedef void (Tcl_AlertNotifierProc) (void *clientData);
typedef void (Tcl_ServiceModeHookProc) (int mode);
typedef ClientData (Tcl_InitNotifierProc) (void);
typedef void (Tcl_FinalizeNotifierProc) (ClientData clientData);
typedef void *(Tcl_InitNotifierProc) (void);
typedef void (Tcl_FinalizeNotifierProc) (void *clientData);
typedef void (Tcl_MainLoopProc) (void);
#ifndef TCL_NO_DEPRECATED
@@ -757,6 +759,7 @@ typedef struct Tcl_ObjType {
* to this type. Frees the internal rep of the
* old type. Returns TCL_ERROR on failure. */
} Tcl_ObjType;
#define TCL_OBJTYPE_V0 /* just empty */
/*
* The following structure stores an internal representation (internalrep) for
@@ -788,7 +791,7 @@ typedef union Tcl_ObjInternalRep { /* The internal representation: */
*/
typedef struct Tcl_Obj {
int refCount; /* When 0 the object will be freed. */
Tcl_Size refCount; /* When 0 the object will be freed. */
char *bytes; /* This points to the first byte of the
* object's string representation. The array
* must be followed by a null byte (i.e., at
@@ -800,7 +803,7 @@ typedef struct Tcl_Obj {
* should use Tcl_GetStringFromObj or
* Tcl_GetString to get a pointer to the byte
* array as a readonly value. */
int length; /* The number of bytes at *bytes, not
Tcl_Size length; /* The number of bytes at *bytes, not
* including the terminating null. */
const Tcl_ObjType *typePtr; /* Denotes the object's type. Always
* corresponds to the type of the object's
@@ -843,7 +846,7 @@ typedef struct Tcl_Namespace {
* is an synonym. */
char *fullName; /* The namespace's fully qualified name. This
* starts with ::. */
ClientData clientData; /* Arbitrary value associated with this
void *clientData; /* Arbitrary value associated with this
* namespace. */
Tcl_NamespaceDeleteProc *deleteProc;
/* Function invoked when deleting the
@@ -880,14 +883,14 @@ typedef struct Tcl_Namespace {
typedef struct Tcl_CallFrame {
Tcl_Namespace *nsPtr;
int dummy1;
int dummy2;
Tcl_Size dummy2;
void *dummy3;
void *dummy4;
void *dummy5;
int dummy6;
Tcl_Size dummy6;
void *dummy7;
void *dummy8;
int dummy9;
Tcl_Size dummy9;
void *dummy10;
void *dummy11;
void *dummy12;
@@ -943,9 +946,9 @@ typedef struct Tcl_CmdInfo {
typedef struct Tcl_DString {
char *string; /* Points to beginning of string: either
* staticSpace below or a malloced array. */
int length; /* Number of non-NULL characters in the
Tcl_Size length; /* Number of non-NULL characters in the
* string. */
int spaceAvl; /* Total number of bytes available for the
Tcl_Size spaceAvl; /* Total number of bytes available for the
* string and its terminating NULL char. */
char staticSpace[TCL_DSTRING_STATIC_SIZE];
/* Space to use in common case where string is
@@ -960,8 +963,8 @@ typedef struct Tcl_DString {
/*
* Definitions for the maximum number of digits of precision that may be
* specified in the "tcl_precision" variable, and the number of bytes of
* buffer space required by Tcl_PrintDouble.
* produced by Tcl_PrintDouble, and the number of bytes of buffer space
* required by Tcl_PrintDouble.
*/
#define TCL_MAX_PREC 17
@@ -1020,8 +1023,11 @@ typedef struct Tcl_DString {
* TCL_COMBINE Combine surrogates (default in Tcl 8.x)
*/
#define TCL_COMBINE 0
#if TCL_MAJOR_VERSION > 8
# define TCL_COMBINE 0x1000000
#else
# define TCL_COMBINE 0
#endif
/*
*----------------------------------------------------------------------------
* Flag values passed to Tcl_RecordAndEval, Tcl_EvalObj, Tcl_EvalObjv.
@@ -1150,8 +1156,12 @@ typedef struct Tcl_DString {
*/
#ifndef TCL_HASH_TYPE
#if TCL_MAJOR_VERSION > 8
# define TCL_HASH_TYPE size_t
#else
# define TCL_HASH_TYPE unsigned
#endif
#endif
typedef struct Tcl_HashKeyType Tcl_HashKeyType;
typedef struct Tcl_HashTable Tcl_HashTable;
@@ -1175,7 +1185,7 @@ struct Tcl_HashEntry {
void *hash; /* Hash value, stored as pointer to ensure
* that the offsets of the fields in this
* structure are not changed. */
ClientData clientData; /* Application stores something here with
void *clientData; /* Application stores something here with
* Tcl_SetHashValue. */
union { /* Key has one of these forms: */
char *oneWordValue; /* One-word value for key. */
@@ -1263,11 +1273,11 @@ struct Tcl_HashTable {
Tcl_HashEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
/* Bucket array used for small tables (to
* avoid mallocs and frees). */
int numBuckets; /* Total number of buckets allocated at
Tcl_Size numBuckets; /* Total number of buckets allocated at
* **bucketPtr. */
int numEntries; /* Total number of entries present in
Tcl_Size numEntries; /* Total number of entries present in
* table. */
int rebuildSize; /* Enlarge table when numEntries gets to be
Tcl_Size rebuildSize; /* Enlarge table when numEntries gets to be
* this large. */
int downShift; /* Shift count used in hashing function.
* Designed to use high-order bits of
@@ -1293,7 +1303,7 @@ struct Tcl_HashTable {
typedef struct Tcl_HashSearch {
Tcl_HashTable *tablePtr; /* Table being searched. */
int nextIndex; /* Index of next bucket to be enumerated after
Tcl_Size nextIndex; /* Index of next bucket to be enumerated after
* present one. */
Tcl_HashEntry *nextEntryPtr;/* Next entry to be enumerated in the current
* bucket. */
@@ -1401,8 +1411,8 @@ typedef int (Tcl_WaitForEventProc) (CONST86 Tcl_Time *timePtr);
* TIP #233 (Virtualized Time)
*/
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, ClientData clientData);
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
typedef void (Tcl_GetTimeProc) (Tcl_Time *timebuf, void *clientData);
typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, void *clientData);
/*
*----------------------------------------------------------------------------
@@ -1463,35 +1473,35 @@ typedef void (Tcl_ScaleTimeProc) (Tcl_Time *timebuf, ClientData clientData);
* Typedefs for the various operations in a channel type:
*/
typedef int (Tcl_DriverBlockModeProc) (ClientData instanceData, int mode);
typedef int (Tcl_DriverCloseProc) (ClientData instanceData,
typedef int (Tcl_DriverBlockModeProc) (void *instanceData, int mode);
typedef int (Tcl_DriverCloseProc) (void *instanceData,
Tcl_Interp *interp);
typedef int (Tcl_DriverClose2Proc) (ClientData instanceData,
typedef int (Tcl_DriverClose2Proc) (void *instanceData,
Tcl_Interp *interp, int flags);
typedef int (Tcl_DriverInputProc) (ClientData instanceData, char *buf,
typedef int (Tcl_DriverInputProc) (void *instanceData, char *buf,
int toRead, int *errorCodePtr);
typedef int (Tcl_DriverOutputProc) (ClientData instanceData,
typedef int (Tcl_DriverOutputProc) (void *instanceData,
const char *buf, int toWrite, int *errorCodePtr);
typedef int (Tcl_DriverSeekProc) (ClientData instanceData, long offset,
typedef int (Tcl_DriverSeekProc) (void *instanceData, long offset,
int mode, int *errorCodePtr);
typedef int (Tcl_DriverSetOptionProc) (ClientData instanceData,
typedef int (Tcl_DriverSetOptionProc) (void *instanceData,
Tcl_Interp *interp, const char *optionName,
const char *value);
typedef int (Tcl_DriverGetOptionProc) (ClientData instanceData,
typedef int (Tcl_DriverGetOptionProc) (void *instanceData,
Tcl_Interp *interp, const char *optionName,
Tcl_DString *dsPtr);
typedef void (Tcl_DriverWatchProc) (ClientData instanceData, int mask);
typedef int (Tcl_DriverGetHandleProc) (ClientData instanceData,
int direction, ClientData *handlePtr);
typedef int (Tcl_DriverFlushProc) (ClientData instanceData);
typedef int (Tcl_DriverHandlerProc) (ClientData instanceData,
typedef void (Tcl_DriverWatchProc) (void *instanceData, int mask);
typedef int (Tcl_DriverGetHandleProc) (void *instanceData,
int direction, void **handlePtr);
typedef int (Tcl_DriverFlushProc) (void *instanceData);
typedef int (Tcl_DriverHandlerProc) (void *instanceData,
int interestMask);
typedef long long (Tcl_DriverWideSeekProc) (ClientData instanceData,
typedef long long (Tcl_DriverWideSeekProc) (void *instanceData,
long long offset, int mode, int *errorCodePtr);
/*
* TIP #218, Channel Thread Actions
*/
typedef void (Tcl_DriverThreadActionProc) (ClientData instanceData,
typedef void (Tcl_DriverThreadActionProc) (void *instanceData,
int action);
/*
* TIP #208, File Truncation (etc.)
@@ -1678,13 +1688,13 @@ typedef Tcl_Obj * (Tcl_FSLinkProc) (Tcl_Obj *pathPtr, Tcl_Obj *toPtr,
typedef int (Tcl_FSLoadFileProc) (Tcl_Interp *interp, Tcl_Obj *pathPtr,
Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
typedef int (Tcl_FSPathInFilesystemProc) (Tcl_Obj *pathPtr,
ClientData *clientDataPtr);
void **clientDataPtr);
typedef Tcl_Obj * (Tcl_FSFilesystemPathTypeProc) (Tcl_Obj *pathPtr);
typedef Tcl_Obj * (Tcl_FSFilesystemSeparatorProc) (Tcl_Obj *pathPtr);
typedef void (Tcl_FSFreeInternalRepProc) (ClientData clientData);
typedef ClientData (Tcl_FSDupInternalRepProc) (ClientData clientData);
typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (ClientData clientData);
typedef ClientData (Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
typedef void (Tcl_FSFreeInternalRepProc) (void *clientData);
typedef void *(Tcl_FSDupInternalRepProc) (void *clientData);
typedef Tcl_Obj * (Tcl_FSInternalToNormalizedProc) (void *clientData);
typedef void *(Tcl_FSCreateInternalRepProc) (Tcl_Obj *pathPtr);
typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
@@ -1714,7 +1724,7 @@ typedef struct Tcl_FSVersion_ *Tcl_FSVersion;
typedef struct Tcl_Filesystem {
const char *typeName; /* The name of the filesystem. */
int structureLength; /* Length of this structure, so future binary
Tcl_Size structureLength; /* Length of this structure, so future binary
* compatibility can be assured. */
Tcl_FSVersion version; /* Version of the filesystem type. */
Tcl_FSPathInFilesystemProc *pathInFilesystemProc;
@@ -1876,8 +1886,8 @@ typedef struct Tcl_Token {
int type; /* Type of token, such as TCL_TOKEN_WORD; see
* below for valid types. */
const char *start; /* First character in token. */
int size; /* Number of bytes in token. */
int numComponents; /* If this token is composed of other tokens,
Tcl_Size size; /* Number of bytes in token. */
Tcl_Size numComponents; /* If this token is composed of other tokens,
* this field tells how many of them there are
* (including components of components, etc.).
* The component tokens immediately follow
@@ -1991,25 +2001,25 @@ typedef struct Tcl_Token {
typedef struct Tcl_Parse {
const char *commentStart; /* Pointer to # that begins the first of one
* or more comments preceding the command. */
int commentSize; /* Number of bytes in comments (up through
Tcl_Size commentSize; /* Number of bytes in comments (up through
* newline character that terminates the last
* comment). If there were no comments, this
* field is 0. */
const char *commandStart; /* First character in first word of
* command. */
int commandSize; /* Number of bytes in command, including first
Tcl_Size commandSize; /* Number of bytes in command, including first
* character of first word, up through the
* terminating newline, close bracket, or
* semicolon. */
int numWords; /* Total number of words in command. May be
Tcl_Size numWords; /* Total number of words in command. May be
* 0. */
Tcl_Token *tokenPtr; /* Pointer to first token representing the
* words of the command. Initially points to
* staticTokens, but may change to point to
* malloc-ed space if command exceeds space in
* staticTokens. */
int numTokens; /* Total number of tokens in command. */
int tokensAvailable; /* Total number of tokens available at
Tcl_Size numTokens; /* Total number of tokens in command. */
Tcl_Size tokensAvailable; /* Total number of tokens available at
* *tokenPtr. */
int errorType; /* One of the parsing error types defined
* above. */
@@ -2062,13 +2072,13 @@ typedef struct Tcl_EncodingType {
Tcl_EncodingFreeProc *freeProc;
/* If non-NULL, function to call when this
* encoding is deleted. */
ClientData clientData; /* Arbitrary value associated with encoding
void *clientData; /* Arbitrary value associated with encoding
* type. Passed to conversion functions. */
int nullSize; /* Number of zero bytes that signify
Tcl_Size nullSize; /* Number of zero bytes that signify
* end-of-string in this encoding. This number
* is used to determine the source string
* length when the srcLen argument is
* negative. Must be 1 or 2. */
* negative. Must be 1, 2, or 4. */
} Tcl_EncodingType;
/*
@@ -2229,8 +2239,8 @@ typedef struct Tcl_Config {
* command- or time-limit is exceeded by an interpreter.
*/
typedef void (Tcl_LimitHandlerProc) (ClientData clientData, Tcl_Interp *interp);
typedef void (Tcl_LimitHandlerDeleteProc) (ClientData clientData);
typedef void (Tcl_LimitHandlerProc) (void *clientData, Tcl_Interp *interp);
typedef void (Tcl_LimitHandlerDeleteProc) (void *clientData);
#if 0
/*
@@ -2268,7 +2278,7 @@ typedef struct {
* depends on type.*/
const char *helpStr; /* Documentation message describing this
* option. */
ClientData clientData; /* Word to pass to function callbacks. */
void *clientData; /* Word to pass to function callbacks. */
} Tcl_ArgvInfo;
/*
@@ -2291,9 +2301,9 @@ typedef struct {
* argument types:
*/
typedef int (Tcl_ArgvFuncProc)(ClientData clientData, Tcl_Obj *objPtr,
typedef int (Tcl_ArgvFuncProc)(void *clientData, Tcl_Obj *objPtr,
void *dstPtr);
typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
typedef int (Tcl_ArgvGenFuncProc)(void *clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const *objv, void *dstPtr);
/*
@@ -2366,19 +2376,19 @@ typedef int (Tcl_ArgvGenFuncProc)(ClientData clientData, Tcl_Interp *interp,
#define TCL_TCPSERVER_REUSEPORT (1<<1)
/*
* Constants for special int-typed values, see TIP #494
* Constants for special Tcl_Size-typed values, see TIP #494
*/
#define TCL_IO_FAILURE (-1)
#define TCL_AUTO_LENGTH (-1)
#define TCL_INDEX_NONE (-1)
#define TCL_IO_FAILURE ((Tcl_Size)-1)
#define TCL_AUTO_LENGTH ((Tcl_Size)-1)
#define TCL_INDEX_NONE ((Tcl_Size)-1)
/*
*----------------------------------------------------------------------------
* Single public declaration for NRE.
*/
typedef int (Tcl_NRPostProc) (ClientData data[], Tcl_Interp *interp,
typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp,
int result);
/*
@@ -2407,27 +2417,14 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
#endif
#ifdef USE_TCL_STUBS
#if TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
# define Tcl_InitStubs(interp, version, exact) \
(Tcl_InitStubs)(interp, version, \
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
TCL_STUB_MAGIC)
#else
# define Tcl_InitStubs(interp, version, exact) \
(Tcl_InitStubs)(interp, TCL_PATCH_LEVEL, \
1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16), \
TCL_STUB_MAGIC)
#endif
#else
#if TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
# define Tcl_InitStubs(interp, version, exact) \
Tcl_PkgInitStubsCheck(interp, version, \
(exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
#else
# define Tcl_InitStubs(interp, version, exact) \
Tcl_PkgInitStubsCheck(interp, TCL_PATCH_LEVEL, \
1|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16))
#endif
#endif
/*
@@ -2437,7 +2434,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \
((Tcl_SetPanicProc(Tcl_ConsolePanic), Tcl_CreateInterp)()))
EXTERN void Tcl_MainEx(int argc, char **argv,
EXTERN void Tcl_MainEx(Tcl_Size argc, char **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
const char *version, int exact);
+125 -104
View File
@@ -41,7 +41,8 @@
static void DupArithSeriesInternalRep (Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
static void FreeArithSeriesInternalRep (Tcl_Obj *listPtr);
static int SetArithSeriesFromAny (Tcl_Interp *interp, Tcl_Obj *objPtr);
static void UpdateStringOfArithSeries (Tcl_Obj *listPtr);
static void UpdateStringOfArithSeries (Tcl_Obj *arithSeriesObj);
static Tcl_Obj *ArithSeriesObjStep(Tcl_Obj *arithSeriesPtr);
/*
* The structure below defines the arithmetic series Tcl object type by
@@ -64,7 +65,7 @@ static void UpdateStringOfArithSeries (Tcl_Obj *listPtr);
* And where the equivalent's list I-th element is calculated
* as:
*
* LIST[i] = START+(STEP*i)
* LIST[i] = START + (STEP * i)
*
* Zero elements ranges, like in the case of START=10 END=10 STEP=1
* are valid and will be equivalent to the empty list.
@@ -116,7 +117,7 @@ ArithSeriesLen(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step)
/*
*----------------------------------------------------------------------
*
* TclNewArithSeriesInt --
* NewArithSeriesInt --
*
* Creates a new ArithSeries object. The returned object has
* refcount = 0.
@@ -131,17 +132,18 @@ ArithSeriesLen(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step)
* None.
*----------------------------------------------------------------------
*/
static
Tcl_Obj *
TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_WideInt len)
NewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_WideInt len)
{
Tcl_WideInt length = (len>=0 ? len : ArithSeriesLen(start, end, step));
Tcl_Obj *arithSeriesPtr;
Tcl_Obj *arithSeriesObj;
ArithSeries *arithSeriesRepPtr;
TclNewObj(arithSeriesPtr);
TclNewObj(arithSeriesObj);
if (length <= 0) {
return arithSeriesPtr;
return arithSeriesObj;
}
arithSeriesRepPtr = (ArithSeries*) ckalloc(sizeof (ArithSeries));
@@ -151,19 +153,19 @@ TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_W
arithSeriesRepPtr->step = step;
arithSeriesRepPtr->len = length;
arithSeriesRepPtr->elements = NULL;
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
arithSeriesPtr->internalRep.twoPtrValue.ptr2 = NULL;
arithSeriesPtr->typePtr = &tclArithSeriesType;
arithSeriesObj->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
arithSeriesObj->internalRep.twoPtrValue.ptr2 = NULL;
arithSeriesObj->typePtr = &tclArithSeriesType;
if (length > 0)
Tcl_InvalidateStringRep(arithSeriesPtr);
Tcl_InvalidateStringRep(arithSeriesObj);
return arithSeriesPtr;
return arithSeriesObj;
}
/*
*----------------------------------------------------------------------
*
* TclNewArithSeriesDbl --
* NewArithSeriesDbl --
*
* Creates a new ArithSeries object with doubles. The returned object has
* refcount = 0.
@@ -178,17 +180,18 @@ TclNewArithSeriesInt(Tcl_WideInt start, Tcl_WideInt end, Tcl_WideInt step, Tcl_W
* None.
*----------------------------------------------------------------------
*/
static
Tcl_Obj *
TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
NewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
{
Tcl_WideInt length = (len>=0 ? len : ArithSeriesLen(start, end, step));
Tcl_Obj *arithSeriesPtr;
Tcl_Obj *arithSeriesObj;
ArithSeriesDbl *arithSeriesRepPtr;
TclNewObj(arithSeriesPtr);
TclNewObj(arithSeriesObj);
if (length <= 0) {
return arithSeriesPtr;
return arithSeriesObj;
}
arithSeriesRepPtr = (ArithSeriesDbl*) ckalloc(sizeof (ArithSeriesDbl));
@@ -198,13 +201,13 @@ TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
arithSeriesRepPtr->step = step;
arithSeriesRepPtr->len = length;
arithSeriesRepPtr->elements = NULL;
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
arithSeriesPtr->internalRep.twoPtrValue.ptr2 = NULL;
arithSeriesPtr->typePtr = &tclArithSeriesType;
arithSeriesObj->internalRep.twoPtrValue.ptr1 = arithSeriesRepPtr;
arithSeriesObj->internalRep.twoPtrValue.ptr2 = NULL;
arithSeriesObj->typePtr = &tclArithSeriesType;
if (length > 0)
Tcl_InvalidateStringRep(arithSeriesPtr);
Tcl_InvalidateStringRep(arithSeriesObj);
return arithSeriesPtr;
return arithSeriesObj;
}
/*
@@ -227,7 +230,11 @@ TclNewArithSeriesDbl(double start, double end, double step, Tcl_WideInt len)
*----------------------------------------------------------------------
*/
static void
assignNumber(int useDoubles, Tcl_WideInt *intNumberPtr, double *dblNumberPtr, Tcl_Obj *numberObj)
assignNumber(
int useDoubles,
Tcl_WideInt *intNumberPtr,
double *dblNumberPtr,
Tcl_Obj *numberObj)
{
void *clientData;
int tcl_number_type;
@@ -270,6 +277,7 @@ assignNumber(int useDoubles, Tcl_WideInt *intNumberPtr, double *dblNumberPtr, Tc
* None.
*----------------------------------------------------------------------
*/
int
TclNewArithSeriesObj(
Tcl_Interp *interp, /* For error reporting */
@@ -351,8 +359,8 @@ TclNewArithSeriesObj(
if (arithSeriesObj) {
*arithSeriesObj = (useDoubles)
? TclNewArithSeriesDbl(dstart, dend, dstep, len)
: TclNewArithSeriesInt(start, end, step, len);
? NewArithSeriesDbl(dstart, dend, dstep, len)
: NewArithSeriesInt(start, end, step, len);
}
return TCL_OK;
}
@@ -360,7 +368,7 @@ TclNewArithSeriesObj(
/*
*----------------------------------------------------------------------
*
* TclArithSeriesObjStep --
* ArithSeriesObjStep --
*
* Return a Tcl_Obj with the step value from the give ArithSeries Obj.
* refcount = 0.
@@ -375,26 +383,23 @@ TclNewArithSeriesObj(
* None.
*----------------------------------------------------------------------
*/
/*
* TclArithSeriesObjStep --
*/
int
TclArithSeriesObjStep(
Tcl_Obj *arithSeriesPtr,
Tcl_Obj **stepObj)
Tcl_Obj *
ArithSeriesObjStep(
Tcl_Obj *arithSeriesObj)
{
ArithSeries *arithSeriesRepPtr;
Tcl_Obj *stepObj;
if (arithSeriesPtr->typePtr != &tclArithSeriesType) {
Tcl_Panic("TclArithSeriesObjIndex called with a not ArithSeries Obj.");
if (arithSeriesObj->typePtr != &tclArithSeriesType) {
Tcl_Panic("ArithSeriesObjStep called with a not ArithSeries Obj.");
}
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesPtr);
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesObj);
if (arithSeriesRepPtr->isDouble) {
*stepObj = Tcl_NewDoubleObj(((ArithSeriesDbl*)(arithSeriesRepPtr))->step);
TclNewDoubleObj(stepObj, ((ArithSeriesDbl*)(arithSeriesRepPtr))->step);
} else {
*stepObj = Tcl_NewWideIntObj(arithSeriesRepPtr->step);
TclNewIntObj(stepObj, arithSeriesRepPtr->step);
}
return TCL_OK;
return stepObj;
}
@@ -405,13 +410,11 @@ TclArithSeriesObjStep(
*
* Returns the element with the specified index in the list
* represented by the specified Arithmetic Sequence object.
* If the index is out of range, TCL_ERROR is returned,
* otherwise TCL_OK is returned and the integer value of the
* element is stored in *element.
* If the index is out of range, NULL is returned.
*
* Results:
*
* TCL_OK on success, TCL_ERROR on index out of range.
* The element on success, NULL on index out of range.
*
* Side Effects:
*
@@ -420,27 +423,35 @@ TclArithSeriesObjStep(
*----------------------------------------------------------------------
*/
int
TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **elementObj)
Tcl_Obj *
TclArithSeriesObjIndex(
Tcl_Interp *interp,
Tcl_Obj *arithSeriesObj,
Tcl_Size index)
{
ArithSeries *arithSeriesRepPtr;
if (arithSeriesPtr->typePtr != &tclArithSeriesType) {
if (arithSeriesObj->typePtr != &tclArithSeriesType) {
Tcl_Panic("TclArithSeriesObjIndex called with a not ArithSeries Obj.");
}
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesPtr);
arithSeriesRepPtr = ArithSeriesRepPtr(arithSeriesObj);
if (index < 0 || index >= arithSeriesRepPtr->len) {
return TCL_ERROR;
if (interp) {
Tcl_SetObjResult(interp,
Tcl_ObjPrintf("index %d is out of bounds 0 to %"
"d", index, (arithSeriesRepPtr->len-1)));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
return NULL;
}
/* List[i] = Start + (Step * index) */
if (arithSeriesRepPtr->isDouble) {
*elementObj = Tcl_NewDoubleObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
return Tcl_NewDoubleObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
} else {
*elementObj = Tcl_NewWideIntObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
return Tcl_NewWideIntObj(ArithSeriesIndexM(arithSeriesRepPtr, index));
}
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
@@ -458,10 +469,10 @@ TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr, Tcl_WideInt index, Tcl_Obj **ele
*
*----------------------------------------------------------------------
*/
Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr)
Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesObj)
{
ArithSeries *arithSeriesRepPtr = (ArithSeries*)
arithSeriesPtr->internalRep.twoPtrValue.ptr1;
arithSeriesObj->internalRep.twoPtrValue.ptr1;
return arithSeriesRepPtr->len;
}
@@ -477,17 +488,17 @@ Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr)
* None.
*
* Side effects:
* Frees arithSeriesPtr's ArithSeries* internal representation and
* Frees arithSeriesObj's ArithSeries* internal representation and
* sets listPtr's internalRep.twoPtrValue.ptr1 to NULL.
*
*----------------------------------------------------------------------
*/
static void
FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesPtr)
FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesObj)
{
ArithSeries *arithSeriesRepPtr =
(ArithSeries *) arithSeriesPtr->internalRep.twoPtrValue.ptr1;
(ArithSeries *) arithSeriesObj->internalRep.twoPtrValue.ptr1;
if (arithSeriesRepPtr->elements) {
Tcl_WideInt i;
Tcl_Obj**elmts = arithSeriesRepPtr->elements;
@@ -499,7 +510,7 @@ FreeArithSeriesInternalRep(Tcl_Obj *arithSeriesPtr)
ckfree((char *) arithSeriesRepPtr->elements);
}
ckfree((char *) arithSeriesRepPtr);
arithSeriesPtr->internalRep.twoPtrValue.ptr1 = NULL;
arithSeriesObj->internalRep.twoPtrValue.ptr1 = NULL;
}
/*
@@ -568,10 +579,10 @@ DupArithSeriesInternalRep(
*/
static void
UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
UpdateStringOfArithSeries(Tcl_Obj *arithSeriesObj)
{
ArithSeries *arithSeriesRepPtr =
(ArithSeries*) arithSeriesPtr->internalRep.twoPtrValue.ptr1;
(ArithSeries*) arithSeriesObj->internalRep.twoPtrValue.ptr1;
char *elem, *p;
Tcl_Obj *elemObj;
Tcl_WideInt i;
@@ -582,7 +593,7 @@ UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
* Pass 1: estimate space.
*/
for (i = 0; i < arithSeriesRepPtr->len; i++) {
TclArithSeriesObjIndex(arithSeriesPtr, i, &elemObj);
elemObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, i);
elem = TclGetStringFromObj(elemObj, &slen);
Tcl_DecrRefCount(elemObj);
slen += 1; /* + 1 is for the space or the nul-term */
@@ -593,17 +604,17 @@ UpdateStringOfArithSeries(Tcl_Obj *arithSeriesPtr)
* Pass 2: generate the string repr.
*/
p = Tcl_InitStringRep(arithSeriesPtr, NULL, length);
p = Tcl_InitStringRep(arithSeriesObj, NULL, length);
for (i = 0; i < arithSeriesRepPtr->len; i++) {
TclArithSeriesObjIndex(arithSeriesPtr, i, &elemObj);
elemObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, i);
elem = TclGetStringFromObj(elemObj, &slen);
strcpy(p, elem);
p[slen] = ' ';
p += slen+1;
Tcl_DecrRefCount(elemObj);
}
if (length > 0) arithSeriesPtr->bytes[length-1] = '\0';
arithSeriesPtr->length = length-1;
if (length > 0) arithSeriesObj->bytes[length-1] = '\0';
arithSeriesObj->length = length-1;
}
/*
@@ -649,8 +660,8 @@ SetArithSeriesFromAny(
* Results:
*
* Normally returns a pointer to a new Tcl_Obj, that contains the same
* arithSeries value as *arithSeriesPtr does. The returned Tcl_Obj has a
* refCount of zero. If *arithSeriesPtr does not hold an arithSeries,
* arithSeries value as *arithSeriesObj does. The returned Tcl_Obj has a
* refCount of zero. If *arithSeriesObj does not hold an arithSeries,
* NULL is returned, and if interp is non-NULL, an error message is
* recorded there.
*
@@ -663,15 +674,15 @@ SetArithSeriesFromAny(
Tcl_Obj *
TclArithSeriesObjCopy(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *arithSeriesPtr) /* List object for which an element array is
Tcl_Obj *arithSeriesObj) /* List object for which an element array is
* to be returned. */
{
Tcl_Obj *copyPtr;
ArithSeries *arithSeriesRepPtr;
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
if (NULL == arithSeriesRepPtr) {
if (SetArithSeriesFromAny(interp, arithSeriesPtr) != TCL_OK) {
if (SetArithSeriesFromAny(interp, arithSeriesObj) != TCL_OK) {
/* We know this is going to panic, but it's the message we want */
return NULL;
}
@@ -679,7 +690,7 @@ TclArithSeriesObjCopy(
TclNewObj(copyPtr);
TclInvalidateStringRep(copyPtr);
DupArithSeriesInternalRep(arithSeriesPtr, copyPtr);
DupArithSeriesInternalRep(arithSeriesObj, copyPtr);
return copyPtr;
}
@@ -689,7 +700,7 @@ TclArithSeriesObjCopy(
* TclArithSeriesObjRange --
*
* Makes a slice of an ArithSeries value.
* *arithSeriesPtr must be known to be a valid list.
* *arithSeriesObj must be known to be a valid list.
*
* Results:
* Returns a pointer to the sliced series.
@@ -705,14 +716,14 @@ TclArithSeriesObjCopy(
Tcl_Obj *
TclArithSeriesObjRange(
Tcl_Interp *interp, /* For error message(s) */
Tcl_Obj *arithSeriesPtr, /* List object to take a range from. */
int fromIdx, /* Index of first element to include. */
int toIdx) /* Index of last element to include. */
Tcl_Obj *arithSeriesObj, /* List object to take a range from. */
Tcl_Size fromIdx, /* Index of first element to include. */
Tcl_Size toIdx) /* Index of last element to include. */
{
ArithSeries *arithSeriesRepPtr;
Tcl_Obj *startObj, *endObj, *stepObj;
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
if (fromIdx < 0) {
fromIdx = 0;
@@ -723,15 +734,21 @@ TclArithSeriesObjRange(
return obj;
}
TclArithSeriesObjIndex(arithSeriesPtr, fromIdx, &startObj);
startObj = TclArithSeriesObjIndex(interp, arithSeriesObj, fromIdx);
if (startObj == NULL) {
return NULL;
}
Tcl_IncrRefCount(startObj);
TclArithSeriesObjIndex(arithSeriesPtr, toIdx, &endObj);
endObj = TclArithSeriesObjIndex(interp, arithSeriesObj, toIdx);
if (endObj == NULL) {
return NULL;
}
Tcl_IncrRefCount(endObj);
TclArithSeriesObjStep(arithSeriesPtr, &stepObj);
stepObj = ArithSeriesObjStep(arithSeriesObj);
Tcl_IncrRefCount(stepObj);
if (Tcl_IsShared(arithSeriesPtr) ||
((arithSeriesPtr->refCount > 1))) {
if (Tcl_IsShared(arithSeriesObj) ||
((arithSeriesObj->refCount > 1))) {
Tcl_Obj *newSlicePtr;
if (TclNewArithSeriesObj(interp, &newSlicePtr,
arithSeriesRepPtr->isDouble, startObj, endObj,
@@ -753,10 +770,10 @@ TclArithSeriesObjRange(
* string-canonizing effect of [lrange 0 end].
*/
TclInvalidateStringRep(arithSeriesPtr);
TclInvalidateStringRep(arithSeriesObj);
if (arithSeriesRepPtr->isDouble) {
ArithSeriesDbl *arithSeriesDblRepPtr = (ArithSeriesDbl*)arithSeriesPtr;
ArithSeriesDbl *arithSeriesDblRepPtr = (ArithSeriesDbl*)arithSeriesObj;
double start, end, step;
Tcl_GetDoubleFromObj(NULL, startObj, &start);
Tcl_GetDoubleFromObj(NULL, endObj, &end);
@@ -783,7 +800,7 @@ TclArithSeriesObjRange(
Tcl_DecrRefCount(endObj);
Tcl_DecrRefCount(stepObj);
return arithSeriesPtr;
return arithSeriesObj;
}
/*
@@ -818,9 +835,9 @@ TclArithSeriesObjRange(
int
TclArithSeriesGetElements(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *objPtr, /* AbstractList object for which an element
Tcl_Obj *objPtr, /* ArithSeries object for which an element
* array is to be returned. */
ListSizeT *objcPtr, /* Where to store the count of objects
Tcl_Size *objcPtr, /* Where to store the count of objects
* referenced by objv. */
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
* pointers to the list's objects. */
@@ -850,13 +867,8 @@ TclArithSeriesGetElements(
}
arithSeriesRepPtr->elements = objv;
for (i = 0; i < objc; i++) {
if (TclArithSeriesObjIndex(objPtr, i, &objv[i]) != TCL_OK) {
if (interp) {
Tcl_SetObjResult(
interp,
Tcl_NewStringObj("indexing error", -1));
Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL);
}
objv[i] = TclArithSeriesObjIndex(interp, objPtr, i);
if (objv[i] == NULL) {
return TCL_ERROR;
}
Tcl_IncrRefCount(objv[i]);
@@ -885,7 +897,7 @@ TclArithSeriesGetElements(
* TclArithSeriesObjReverse --
*
* Reverse the order of the ArithSeries value.
* *arithSeriesPtr must be known to be a valid list.
* *arithSeriesObj must be known to be a valid list.
*
* Results:
* Returns a pointer to the reordered series.
@@ -901,7 +913,7 @@ TclArithSeriesGetElements(
Tcl_Obj *
TclArithSeriesObjReverse(
Tcl_Interp *interp, /* For error message(s) */
Tcl_Obj *arithSeriesPtr) /* List object to reverse. */
Tcl_Obj *arithSeriesObj) /* List object to reverse. */
{
ArithSeries *arithSeriesRepPtr;
Tcl_Obj *startObj, *endObj, *stepObj;
@@ -910,16 +922,16 @@ TclArithSeriesObjReverse(
double dstart, dend, dstep;
int isDouble;
ArithSeriesGetInternalRep(arithSeriesPtr, arithSeriesRepPtr);
ArithSeriesGetInternalRep(arithSeriesObj, arithSeriesRepPtr);
isDouble = arithSeriesRepPtr->isDouble;
len = arithSeriesRepPtr->len;
TclArithSeriesObjIndex(arithSeriesPtr, (len-1), &startObj);
startObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, (len-1));
Tcl_IncrRefCount(startObj);
TclArithSeriesObjIndex(arithSeriesPtr, 0, &endObj);
endObj = TclArithSeriesObjIndex(NULL, arithSeriesObj, 0);
Tcl_IncrRefCount(endObj);
TclArithSeriesObjStep(arithSeriesPtr, &stepObj);
stepObj = ArithSeriesObjStep(arithSeriesObj);
Tcl_IncrRefCount(stepObj);
if (isDouble) {
@@ -936,9 +948,10 @@ TclArithSeriesObjReverse(
TclSetIntObj(stepObj, step);
}
if (Tcl_IsShared(arithSeriesPtr) ||
((arithSeriesPtr->refCount > 1))) {
Tcl_Obj *lenObj = Tcl_NewWideIntObj(len);
if (Tcl_IsShared(arithSeriesObj) ||
((arithSeriesObj->refCount > 1))) {
Tcl_Obj *lenObj;
TclNewIntObj(lenObj, len);
if (TclNewArithSeriesObj(interp, &resultObj,
isDouble, startObj, endObj, stepObj, lenObj) != TCL_OK) {
resultObj = NULL;
@@ -950,7 +963,7 @@ TclArithSeriesObjReverse(
* In-place is possible.
*/
TclInvalidateStringRep(arithSeriesPtr);
TclInvalidateStringRep(arithSeriesObj);
if (isDouble) {
ArithSeriesDbl *arithSeriesDblRepPtr =
@@ -972,7 +985,7 @@ TclArithSeriesObjReverse(
}
arithSeriesRepPtr->elements = NULL;
resultObj = arithSeriesPtr;
resultObj = arithSeriesObj;
}
Tcl_DecrRefCount(startObj);
@@ -981,3 +994,11 @@ TclArithSeriesObjReverse(
return resultObj;
}
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
* fill-column: 78
* End:
*/
+20 -19
View File
@@ -15,43 +15,44 @@
* Note that the len can in theory be always computed by start,end,step
* but it's faster to cache it inside the internal representation.
*/
typedef struct ArithSeries {
typedef struct {
Tcl_Size len;
Tcl_Obj **elements;
int isDouble;
Tcl_WideInt start;
Tcl_WideInt end;
Tcl_WideInt step;
Tcl_WideInt len;
} ArithSeries;
typedef struct {
Tcl_Size len;
Tcl_Obj **elements;
int isDouble;
} ArithSeries;
typedef struct ArithSeriesDbl {
double start;
double end;
double step;
Tcl_WideInt len;
Tcl_Obj **elements;
int isDouble;
} ArithSeriesDbl;
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjCopy(Tcl_Interp *interp,
Tcl_Obj *arithSeriesPtr);
MODULE_SCOPE int TclArithSeriesObjStep(Tcl_Obj *arithSeriesPtr,
Tcl_Obj **stepObj);
MODULE_SCOPE int TclArithSeriesObjIndex(Tcl_Obj *arithSeriesPtr,
Tcl_WideInt index, Tcl_Obj **elementObj);
MODULE_SCOPE Tcl_WideInt TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr);
MODULE_SCOPE Tcl_Obj *TclArithSeriesObjIndex(Tcl_Interp *, Tcl_Obj *,
Tcl_Size index);
MODULE_SCOPE Tcl_Size TclArithSeriesObjLength(Tcl_Obj *arithSeriesPtr);
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjRange(Tcl_Interp *interp,
Tcl_Obj *arithSeriesPtr, int fromIdx, int toIdx);
Tcl_Obj *arithSeriesPtr, Tcl_Size fromIdx, Tcl_Size toIdx);
MODULE_SCOPE Tcl_Obj * TclArithSeriesObjReverse(Tcl_Interp *interp,
Tcl_Obj *arithSeriesPtr);
MODULE_SCOPE int TclArithSeriesGetElements(Tcl_Interp *interp,
Tcl_Obj *objPtr, int *objcPtr, Tcl_Obj ***objvPtr);
MODULE_SCOPE Tcl_Obj * TclNewArithSeriesInt(Tcl_WideInt start,
Tcl_WideInt end, Tcl_WideInt step,
Tcl_WideInt len);
MODULE_SCOPE Tcl_Obj * TclNewArithSeriesDbl(double start, double end,
double step, Tcl_WideInt len);
Tcl_Obj *objPtr, Tcl_Size *objcPtr, Tcl_Obj ***objvPtr);
MODULE_SCOPE int TclNewArithSeriesObj(Tcl_Interp *interp,
Tcl_Obj **arithSeriesObj, int useDoubles,
Tcl_Obj *startObj, Tcl_Obj *endObj,
Tcl_Obj *stepObj, Tcl_Obj *lenObj);
/*
* Local Variables:
* mode: c
* c-basic-offset: 4
* fill-column: 78
* End:
*/
+4 -1
View File
@@ -1985,7 +1985,7 @@ CreateMirrorJumpTable(
* table. */
int i;
if (TclListObjGetElementsM(interp, jumps, &objc, &objv) != TCL_OK) {
if (TclListObjLengthM(interp, jumps, &objc) != TCL_OK) {
return TCL_ERROR;
}
if (objc % 2 != 0) {
@@ -1997,6 +1997,9 @@ CreateMirrorJumpTable(
}
return TCL_ERROR;
}
if (TclListObjGetElementsM(interp, jumps, &objc, &objv) != TCL_OK) {
return TCL_ERROR;
}
/*
* Allocate the jumptable.
+2 -2
View File
@@ -310,6 +310,7 @@ static const CmdInfo builtInCmds[] = {
{"join", Tcl_JoinObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lappend", Tcl_LappendObjCmd, TclCompileLappendCmd, NULL, CMD_IS_SAFE},
{"lassign", Tcl_LassignObjCmd, TclCompileLassignCmd, NULL, CMD_IS_SAFE},
{"ledit", Tcl_LeditObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lindex", Tcl_LindexObjCmd, TclCompileLindexCmd, NULL, CMD_IS_SAFE},
{"linsert", Tcl_LinsertObjCmd, TclCompileLinsertCmd, NULL, CMD_IS_SAFE},
{"list", Tcl_ListObjCmd, TclCompileListCmd, NULL, CMD_IS_SAFE|CMD_COMPILES_EXPANDED},
@@ -322,10 +323,9 @@ static const CmdInfo builtInCmds[] = {
{"lreplace", Tcl_LreplaceObjCmd, TclCompileLreplaceCmd, NULL, CMD_IS_SAFE},
{"lreverse", Tcl_LreverseObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lsearch", Tcl_LsearchObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lseq", Tcl_LseqObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lseq", Tcl_LseqObjCmd, NULL, NULL, CMD_IS_SAFE},
{"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, CMD_IS_SAFE},
{"lsort", Tcl_LsortObjCmd, NULL, NULL, CMD_IS_SAFE},
{"ledit", Tcl_LeditObjCmd, NULL, NULL, CMD_IS_SAFE},
{"package", Tcl_PackageObjCmd, NULL, TclNRPackageObjCmd, CMD_IS_SAFE},
{"proc", Tcl_ProcObjCmd, NULL, NULL, CMD_IS_SAFE},
{"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, CMD_IS_SAFE},
+11 -3
View File
@@ -1125,11 +1125,10 @@ BinaryFormatCmd(
* The macro evals its args more than once: avoid arg++
*/
if (TclListObjGetElementsM(interp, objv[arg], &listc,
&listv) != TCL_OK) {
if (TclListObjLengthM(interp, objv[arg], &listc
) != TCL_OK) {
return TCL_ERROR;
}
arg++;
if (count == BINARY_ALL) {
count = listc;
@@ -1139,6 +1138,11 @@ BinaryFormatCmd(
-1));
return TCL_ERROR;
}
if (TclListObjGetElementsM(interp, objv[arg], &listc,
&listv) != TCL_OK) {
return TCL_ERROR;
}
arg++;
}
offset += count*size;
break;
@@ -2194,7 +2198,11 @@ FormatNumber(
*/
if (fabs(dvalue) > (double) FLT_MAX) {
if (fabs(dvalue) > (FLT_MAX + pow(2, (FLT_MAX_EXP - FLT_MANT_DIG - 1)))) {
fvalue = (dvalue >= 0.0) ? INFINITY : -INFINITY; // c99
} else {
fvalue = (dvalue >= 0.0) ? FLT_MAX : -FLT_MAX;
}
} else {
fvalue = (float) dvalue;
}
+9 -3
View File
@@ -14,6 +14,7 @@
*/
#include "tclInt.h"
#include "tclTomMath.h"
/*
* Windows has mktime. The configurators do not check.
@@ -1804,14 +1805,16 @@ ClockMillisecondsObjCmd(
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
Tcl_Obj *timeObj;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
Tcl_GetTime(&now);
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)
now.sec * 1000 + now.usec / 1000));
TclNewUIntObj(timeObj, (Tcl_WideUInt)
now.sec * 1000 + now.usec / 1000);
Tcl_SetObjResult(interp, timeObj);
return TCL_OK;
}
@@ -1992,13 +1995,16 @@ ClockSecondsObjCmd(
Tcl_Obj *const *objv) /* Parameter values */
{
Tcl_Time now;
Tcl_Obj *timeObj;
if (objc != 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
Tcl_GetTime(&now);
Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt) now.sec));
TclNewUIntObj(timeObj, (Tcl_WideUInt)now.sec);
Tcl_SetObjResult(interp, timeObj);
return TCL_OK;
}
+74 -23
View File
@@ -12,6 +12,7 @@
*/
#include "tclInt.h"
#include "tclIO.h"
#ifdef _WIN32
# include "tclWinInt.h"
#endif
@@ -563,18 +564,22 @@ EncodingConvertfromObjCmd(
* Possible combinations:
* 1) data -> objc = 2
* 2) encoding data -> objc = 3
* 3) -nocomplain data -> objc = 3
* 4) -nocomplain encoding data -> objc = 4
* 5) -strict data -> objc = 3
* 6) -strict encoding data -> objc = 4
* 7) -failindex val data -> objc = 4
* 8) -failindex val encoding data -> objc = 5
* 3) -nocomplain encoding data -> objc = 4
* 4) -strict -failindex val encoding data -> objc = 6
* 5) -strict encoding data -> objc = 4
* 6) -failindex val encoding data -> objc = 5
* 7) -failindex val -strict encoding data -> objc = 6
*/
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc > 2 && objc < 6) {
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else if (objc > 3 && objc < 7) {
int objcUnprocessed = objc;
data = objv[objc - 1];
bytesPtr = Tcl_GetString(objv[1]);
@@ -586,15 +591,31 @@ EncodingConvertfromObjCmd(
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed--;
bytesPtr = Tcl_GetString(objv[2]);
if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
/* at least three additional arguments needed */
if (objc < 6) {
goto encConvFromError;
}
failVarObj = objv[3];
objcUnprocessed -= 2;
}
} else if (bytesPtr[0] == '-' && bytesPtr[1] == 'f'
&& !strncmp(bytesPtr, "-failindex", strlen(bytesPtr))) {
/* at least two additional arguments needed */
if (objc < 4) {
/* at least three additional arguments needed */
if (objc < 5) {
goto encConvFromError;
}
failVarObj = objv[2];
flags = TCL_ENCODING_STOPONERROR;
flags = ENCODING_FAILINDEX;
objcUnprocessed -= 2;
bytesPtr = Tcl_GetString(objv[3]);
if (bytesPtr[0] == '-' && bytesPtr[1] == 's'
&& !strncmp(bytesPtr, "-strict", strlen(bytesPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed --;
}
}
switch (objcUnprocessed) {
case 3:
@@ -610,7 +631,9 @@ EncodingConvertfromObjCmd(
}
} else {
encConvFromError:
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain? ?-strict? ?-failindex var? ?encoding? data");
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
return TCL_ERROR;
}
@@ -654,7 +677,7 @@ EncodingConvertfromObjCmd(
* truncate the string at the first null byte.
*/
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds));
/*
* We're done with the encoding
@@ -704,16 +727,22 @@ EncodingConverttoObjCmd(
* Possible combinations:
* 1) data -> objc = 2
* 2) encoding data -> objc = 3
* 3) -nocomplain data -> objc = 3
* 4) -nocomplain encoding data -> objc = 4
* 5) -failindex val data -> objc = 4
* 3) -nocomplain encoding data -> objc = 4
* 4) -strict -failindex val encoding data -> objc = 6
* 5) -strict encoding data -> objc = 4
* 6) -failindex val encoding data -> objc = 5
* 7) -failindex val -strict encoding data -> objc = 6
*/
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc > 2 && objc < 6) {
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else if (objc > 3 && objc < 7) {
int objcUnprocessed = objc;
data = objv[objc - 1];
stringPtr = Tcl_GetString(objv[1]);
@@ -725,15 +754,31 @@ EncodingConverttoObjCmd(
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed--;
stringPtr = Tcl_GetString(objv[2]);
if (stringPtr[0] == '-' && stringPtr[1] == 'f'
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
/* at least three additional arguments needed */
if (objc < 6) {
goto encConvToError;
}
failVarObj = objv[3];
objcUnprocessed -= 2;
}
} else if (stringPtr[0] == '-' && stringPtr[1] == 'f'
&& !strncmp(stringPtr, "-failindex", strlen(stringPtr))) {
/* at least two additional arguments needed */
if (objc < 4) {
/* at least three additional arguments needed */
if (objc < 5) {
goto encConvToError;
}
failVarObj = objv[2];
flags = TCL_ENCODING_STOPONERROR;
objcUnprocessed -= 2;
stringPtr = Tcl_GetString(objv[3]);
if (stringPtr[0] == '-' && stringPtr[1] == 's'
&& !strncmp(stringPtr, "-strict", strlen(stringPtr))) {
flags = TCL_ENCODING_STRICT;
objcUnprocessed --;
}
}
switch (objcUnprocessed) {
case 3:
@@ -749,7 +794,10 @@ EncodingConverttoObjCmd(
}
} else {
encConvToError:
Tcl_WrongNumArgs(interp, 1, objv, "?-nocomplain? ?-strict? ?-failindex var? ?encoding? data");
Tcl_WrongNumArgs(interp, 1, objv, "?-strict? ?-failindex var? ?encoding? data");
((Interp *) interp)->flags |= INTERP_ALTERNATE_WRONG_ARGS;
Tcl_WrongNumArgs(interp, 1, objv, "-nocomplain ?encoding? data");
return TCL_ERROR;
}
@@ -2060,7 +2108,7 @@ PathNativeNameCmd(
if (Tcl_TranslateFileName(interp, TclGetString(objv[1]), &ds) == NULL) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
Tcl_SetObjResult(interp, Tcl_DStringToObj(&ds));
return TCL_OK;
}
@@ -2860,8 +2908,8 @@ EachloopCmd(
result = TCL_ERROR;
goto done;
}
TclListObjGetElementsM(NULL, statePtr->vCopyList[i],
&statePtr->varcList[i], &statePtr->varvList[i]);
TclListObjLengthM(NULL, statePtr->vCopyList[i],
&statePtr->varcList[i]);
if (statePtr->varcList[i] < 1) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s varlist is empty",
@@ -2872,6 +2920,8 @@ EachloopCmd(
result = TCL_ERROR;
goto done;
}
TclListObjGetElementsM(NULL, statePtr->vCopyList[i],
&statePtr->varcList[i], &statePtr->varvList[i]);
/* Values */
if (TclHasInternalRep(objv[2+i*2],&tclArithSeriesType)) {
@@ -3020,7 +3070,8 @@ ForeachAssignments(
k = statePtr->index[i]++;
if (k < statePtr->argcList[i]) {
if (isarithseries) {
if (TclArithSeriesObjIndex(statePtr->aCopyList[i], k, &valuePtr) != TCL_OK) {
valuePtr = TclArithSeriesObjIndex(interp, statePtr->aCopyList[i], k);
if (valuePtr == NULL) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (setting %s loop variable \"%s\")",
(statePtr->resultList != NULL ? "lmap" : "foreach"),
+15 -8
View File
@@ -20,6 +20,7 @@
#include "tclInt.h"
#include "tclRegexp.h"
#include "tclArithSeries.h"
#include "tclTomMath.h"
#include <math.h>
#include <assert.h>
@@ -2231,8 +2232,8 @@ Tcl_JoinObjCmd(
if (listLen == 1) {
/* One element; return it */
if (isArithSeries) {
Tcl_Obj *valueObj;
if (TclArithSeriesObjIndex(objv[1], 0, &valueObj) != TCL_OK) {
Tcl_Obj *valueObj = TclArithSeriesObjIndex(interp, objv[1], 0);
if (valueObj == NULL) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, valueObj);
@@ -2266,7 +2267,8 @@ Tcl_JoinObjCmd(
Tcl_AppendObjToObj(resObjPtr, joinObjPtr);
}
if (TclArithSeriesObjIndex(objv[1], i, &valueObj) != TCL_OK) {
valueObj = TclArithSeriesObjIndex(interp, objv[1], i);
if (valueObj == NULL) {
return TCL_ERROR;
}
Tcl_AppendObjToObj(resObjPtr, valueObj);
@@ -2573,6 +2575,7 @@ Tcl_LlengthObjCmd(
/* Argument objects. */
{
int listLen, result;
Tcl_Obj *objPtr;
if (objc != 2) {
Tcl_WrongNumArgs(interp, 1, objv, "list");
@@ -2589,7 +2592,8 @@ Tcl_LlengthObjCmd(
* length.
*/
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(listLen));
TclNewUIntObj(objPtr, listLen);
Tcl_SetObjResult(interp, objPtr);
return TCL_OK;
}
@@ -3152,7 +3156,7 @@ Tcl_LreverseObjCmd(
} /* end ArithSeries */
/* True List */
if (TclListObjGetElementsM(interp, objv[1], &elemc, &elemv) != TCL_OK) {
if (TclListObjLengthM(interp, objv[1], &elemc) != TCL_OK) {
return TCL_ERROR;
}
@@ -3164,6 +3168,9 @@ Tcl_LreverseObjCmd(
Tcl_SetObjResult(interp, objv[1]);
return TCL_OK;
}
if (TclListObjGetElementsM(interp, objv[1], &elemc, &elemv) != TCL_OK) {
return TCL_ERROR;
}
if (Tcl_IsShared(objv[1])
|| ListObjRepIsShared(objv[1])) { /* Bug 1675044 */
@@ -3607,7 +3614,7 @@ Tcl_LsearchObjCmd(
if (allMatches || inlineReturn) {
Tcl_ResetResult(interp);
} else {
TclNewIndexObj(itemPtr, TCL_INDEX_NONE);
TclNewIntObj(itemPtr, -1);
Tcl_SetObjResult(interp, itemPtr);
}
goto done;
@@ -4103,10 +4110,10 @@ SequenceIdentifyArgument(
exprValueObj = argPtr;
} else {
if (floor(dvalue) == dvalue) {
exprValueObj = Tcl_NewWideIntObj(value);
TclNewIntObj(exprValueObj, value);
keyword = TCL_NUMBER_INT;
} else {
exprValueObj = Tcl_NewDoubleObj(dvalue);
TclNewDoubleObj(exprValueObj, dvalue);
keyword = TCL_NUMBER_DOUBLE;
}
}
+9 -6
View File
@@ -2673,7 +2673,7 @@ StringEqualCmd(
*/
objv += objc-2;
match = TclStringCmp(objv[0], objv[1], 0, nocase, reqlength);
match = TclStringCmp(objv[0], objv[1], 1, nocase, reqlength);
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(match ? 0 : 1));
return TCL_OK;
}
@@ -3610,7 +3610,7 @@ TclNRSwitchObjCmd(
Tcl_Obj **listv;
blist = objv[0];
if (TclListObjGetElementsM(interp, objv[0], &objc, &listv) != TCL_OK) {
if (TclListObjLengthM(interp, objv[0], &objc) != TCL_OK) {
return TCL_ERROR;
}
@@ -3623,6 +3623,9 @@ TclNRSwitchObjCmd(
"?-option ...? string {?pattern body ...? ?default body?}");
return TCL_ERROR;
}
if (TclListObjGetElementsM(interp, objv[0], &objc, &listv) != TCL_OK) {
return TCL_ERROR;
}
objv = listv;
splitObjs = 1;
}
@@ -3775,7 +3778,7 @@ TclNRSwitchObjCmd(
TclNewIndexObj(rangeObjAry[0], info.matches[j].start);
TclNewIndexObj(rangeObjAry[1], info.matches[j].end-1);
} else {
TclNewIndexObj(rangeObjAry[1], TCL_INDEX_NONE);
TclNewIntObj(rangeObjAry[1], -1);
rangeObjAry[0] = rangeObjAry[1];
}
@@ -4099,9 +4102,9 @@ Tcl_TimeObjCmd(
* Use int obj since we know time is not fractional. [Bug 1202178]
*/
objs[0] = Tcl_NewWideIntObj((count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
TclNewIntObj(objs[0], (count <= 0) ? 0 : (Tcl_WideInt)totalMicroSec);
} else {
objs[0] = Tcl_NewDoubleObj(totalMicroSec/count);
TclNewDoubleObj(objs[0], totalMicroSec/count);
}
/*
@@ -4586,7 +4589,7 @@ Tcl_TimeRateObjCmd(
if (measureOverhead > ((double) usec) / count) {
measureOverhead = ((double) usec) / count;
}
objs[0] = Tcl_NewDoubleObj(measureOverhead);
TclNewDoubleObj(objs[0], measureOverhead);
TclNewLiteralStringObj(objs[1], "\xC2\xB5s/#-overhead"); /* mics */
objs += 2;
}
+28 -28
View File
@@ -122,7 +122,7 @@ TclCompileAppendCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -279,7 +279,7 @@ TclCompileArraySetCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -452,7 +452,7 @@ TclCompileArrayUnsetCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -816,7 +816,7 @@ TclCompileClockReadingCmd(
TCL_UNUSED(Tcl_Interp *),
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1053,7 +1053,7 @@ TclCompileDictIncrCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1228,7 +1228,7 @@ TclCompileDictUnsetCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1281,7 +1281,7 @@ TclCompileDictCreateCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1374,7 +1374,7 @@ TclCompileDictMergeCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1488,7 +1488,7 @@ TclCompileDictForCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1501,7 +1501,7 @@ TclCompileDictMapCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1514,7 +1514,7 @@ CompileDictEachCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr, /* Holds resulting instructions. */
int collect) /* Flag == TCL_EACH_COLLECT to collect and
@@ -1743,7 +1743,7 @@ TclCompileDictUpdateCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1894,7 +1894,7 @@ TclCompileDictAppendCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1949,7 +1949,7 @@ TclCompileDictLappendCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1994,7 +1994,7 @@ TclCompileDictWithCmd(
Tcl_Interp *interp, /* Used for looking up stuff. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -2263,9 +2263,9 @@ TclCompileDictWithCmd(
*----------------------------------------------------------------------
*/
static ClientData
static void *
DupDictUpdateInfo(
ClientData clientData)
void *clientData)
{
DictUpdateInfo *dui1Ptr, *dui2Ptr;
size_t len;
@@ -2279,14 +2279,14 @@ DupDictUpdateInfo(
static void
FreeDictUpdateInfo(
ClientData clientData)
void *clientData)
{
ckfree(clientData);
}
static void
PrintDictUpdateInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *appendObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
@@ -2304,7 +2304,7 @@ PrintDictUpdateInfo(
static void
DisassembleDictUpdateInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *dictObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
@@ -2610,7 +2610,7 @@ TclCompileForeachCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -2882,9 +2882,9 @@ CompileEachloopCmd(
*----------------------------------------------------------------------
*/
static ClientData
static void *
DupForeachInfo(
ClientData clientData) /* The foreach command's compilation auxiliary
void *clientData) /* The foreach command's compilation auxiliary
* data to duplicate. */
{
ForeachInfo *srcPtr = (ForeachInfo *)clientData;
@@ -2933,7 +2933,7 @@ DupForeachInfo(
static void
FreeForeachInfo(
ClientData clientData) /* The foreach command's compilation auxiliary
void *clientData) /* The foreach command's compilation auxiliary
* data to free. */
{
ForeachInfo *infoPtr = (ForeachInfo *)clientData;
@@ -2967,7 +2967,7 @@ FreeForeachInfo(
static void
PrintForeachInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *appendObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
@@ -3007,7 +3007,7 @@ PrintForeachInfo(
static void
PrintNewForeachInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *appendObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
@@ -3037,7 +3037,7 @@ PrintNewForeachInfo(
static void
DisassembleForeachInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *dictObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
@@ -3084,7 +3084,7 @@ DisassembleForeachInfo(
static void
DisassembleNewForeachInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *dictObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
+47 -174
View File
@@ -181,7 +181,8 @@ TclCompileIfCmd(
* determined. */
Tcl_Token *tokenPtr, *testTokenPtr;
int jumpIndex = 0; /* Avoid compiler warning. */
int jumpFalseDist, numWords, wordIdx, numBytes, j, code;
int numBytes, j;
int jumpFalseDist, numWords, wordIdx, code;
const char *word;
int realCond = 1; /* Set to 0 for static conditions:
* "if 0 {..}" */
@@ -580,7 +581,7 @@ TclCompileInfoCommandsCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr)
{
@@ -1355,84 +1356,34 @@ TclCompileLinsertCmd(
CompileEnv *envPtr) /* Holds the resulting instructions. */
{
DefineLineInformation; /* TIP #280 */
Tcl_Token *tokenPtr, *listTokenPtr;
int idx, i;
Tcl_Token *tokenPtr;
int i;
if (parsePtr->numWords < 3) {
return TCL_ERROR;
}
listTokenPtr = TokenAfter(parsePtr->tokenPtr);
/*
* Parse the index. Will only compile if it is constant and not an
* _integer_ less than zero (since we reserve negative indices here for
* end-relative indexing) or an end-based index greater than 'end' itself.
*/
tokenPtr = TokenAfter(listTokenPtr);
/*
* NOTE: This command treats all inserts at indices before the list
* the same as inserts at the start of the list, and all inserts
* after the list the same as inserts at the end of the list. We
* make that transformation here so we can use the optimized bytecode
* as much as possible.
*/
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_END,
&idx) != TCL_OK) {
return TCL_ERROR;
}
/*
* There are four main cases. If there are no values to insert, this is
* just a confirm-listiness check. If the index is '0', this is a prepend.
* If the index is 'end' (== TCL_INDEX_END), this is an append. Otherwise,
* this is a splice (== split, insert values as list, concat-3).
*/
CompileWord(envPtr, listTokenPtr, interp, 1);
if (parsePtr->numWords == 3) {
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
return TCL_OK;
}
/* Push list, insertion index onto the stack */
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 2);
/* Push new elements to be inserted */
for (i=3 ; i<parsePtr->numWords ; i++) {
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, i);
}
TclEmitInstInt4( INST_LIST, i - 3, envPtr);
if (idx == (int)TCL_INDEX_START) {
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
} else if (idx == (int)TCL_INDEX_END) {
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
} else {
/*
* Here we handle two ranges for idx. First when idx > 0, we
* want the first half of the split to end at index idx-1 and
* the second half to start at index idx.
* Second when idx < TCL_INDEX_END, indicating "end-N" indexing,
* we want the first half of the split to end at index end-N and
* the second half to start at index end-N+1. We accomplish this
* with a pre-adjustment of the end-N value.
* The root of this is that the commands [lrange] and [linsert]
* differ in their interpretation of the "end" index.
*/
if (idx < (int)TCL_INDEX_END) {
idx++;
}
TclEmitInstInt4( INST_OVER, 1, envPtr);
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
TclEmitInt4( idx - 1, envPtr);
TclEmitInstInt4( INST_REVERSE, 3, envPtr);
TclEmitInstInt4( INST_LIST_RANGE_IMM, idx, envPtr);
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
}
/* First operand is count of arguments */
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
/*
* Second operand is bitmask
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
* TCL_LREPLACE4_SINGLE_INDEX - second index is not present
* indicating this is a pure insert
*/
TclEmitInt1(TCL_LREPLACE4_SINGLE_INDEX, envPtr);
return TCL_OK;
}
@@ -1457,116 +1408,34 @@ TclCompileLreplaceCmd(
CompileEnv *envPtr) /* Holds the resulting instructions. */
{
DefineLineInformation; /* TIP #280 */
Tcl_Token *tokenPtr, *listTokenPtr;
int idx1, idx2, i;
int emptyPrefix=1, suffixStart = 0;
Tcl_Token *tokenPtr;
int i;
if (parsePtr->numWords < 4) {
return TCL_ERROR;
}
listTokenPtr = TokenAfter(parsePtr->tokenPtr);
tokenPtr = TokenAfter(listTokenPtr);
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_NONE,
&idx1) != TCL_OK) {
return TCL_ERROR;
}
/* Push list, first, last onto the stack */
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
tokenPtr = TokenAfter(tokenPtr);
if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_NONE, TCL_INDEX_END,
&idx2) != TCL_OK) {
return TCL_ERROR;
}
CompileWord(envPtr, tokenPtr, interp, 2);
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 3);
/*
* General structure of the [lreplace] result is
* prefix replacement suffix
* In a few cases we can predict various parts will be empty and
* take advantage.
*
* The proper suffix begins with the greater of indices idx1 or
* idx2 + 1. If we cannot tell at compile time which is greater,
* we must defer to direct evaluation.
*/
if (idx1 == (int)TCL_INDEX_NONE) {
suffixStart = (int)TCL_INDEX_NONE;
} else if (idx2 == (int)TCL_INDEX_NONE) {
suffixStart = idx1;
} else if (idx2 == (int)TCL_INDEX_END) {
suffixStart = (int)TCL_INDEX_NONE;
} else if (((idx2 < (int)TCL_INDEX_END) && (idx1 <= (int)TCL_INDEX_END))
|| ((idx2 >= (int)TCL_INDEX_START) && (idx1 >= (int)TCL_INDEX_START))) {
suffixStart = (idx1 > idx2 + 1) ? idx1 : idx2 + 1;
} else {
return TCL_ERROR;
}
/* All paths start with computing/pushing the original value. */
CompileWord(envPtr, listTokenPtr, interp, 1);
/*
* Push all the replacement values next so any errors raised in
* creating them get raised first.
*/
if (parsePtr->numWords > 4) {
/* Push the replacement arguments */
/* Push new elements to be inserted */
for (i=4 ; i<parsePtr->numWords ; i++) {
tokenPtr = TokenAfter(tokenPtr);
for (i=4 ; i<parsePtr->numWords ; i++) {
CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
/* Make a list of them... */
TclEmitInstInt4( INST_LIST, i - 4, envPtr);
emptyPrefix = 0;
CompileWord(envPtr, tokenPtr, interp, i);
}
if ((idx1 == suffixStart) && (parsePtr->numWords == 4)) {
/*
* This is a "no-op". Example: [lreplace {a b c} 2 0]
* We still do a list operation to get list-verification
* and canonicalization side effects.
*/
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
return TCL_OK;
}
if (idx1 != (int)TCL_INDEX_START) {
/* Prefix may not be empty; generate bytecode to push it */
if (emptyPrefix) {
TclEmitOpcode( INST_DUP, envPtr);
} else {
TclEmitInstInt4( INST_OVER, 1, envPtr);
}
TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr);
TclEmitInt4( idx1 - 1, envPtr);
if (!emptyPrefix) {
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
}
emptyPrefix = 0;
}
if (!emptyPrefix) {
TclEmitInstInt4( INST_REVERSE, 2, envPtr);
}
if (suffixStart == (int)TCL_INDEX_NONE) {
TclEmitOpcode( INST_POP, envPtr);
if (emptyPrefix) {
PushStringLiteral(envPtr, "");
}
} else {
/* Suffix may not be empty; generate bytecode to push it */
TclEmitInstInt4( INST_LIST_RANGE_IMM, suffixStart, envPtr);
TclEmitInt4( (int)TCL_INDEX_END, envPtr);
if (!emptyPrefix) {
TclEmitOpcode( INST_LIST_CONCAT, envPtr);
}
}
/* First operand is count of arguments */
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
/*
* Second operand is bitmask
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
*/
TclEmitInt1(TCL_LREPLACE4_END_IS_LAST, envPtr);
return TCL_OK;
}
@@ -2056,7 +1925,8 @@ TclCompileRegexpCmd(
DefineLineInformation; /* TIP #280 */
Tcl_Token *varTokenPtr; /* Pointer to the Tcl_Token representing the
* parse of the RE or string. */
int i, len, nocase, exact, sawLast, simple;
int len;
int i, nocase, exact, sawLast, simple;
const char *str;
/*
@@ -2242,7 +2112,8 @@ TclCompileRegsubCmd(
Tcl_Obj *patternObj = NULL, *replacementObj = NULL;
Tcl_DString pattern;
const char *bytes;
int len, exact, quantified, result = TCL_ERROR;
int exact, quantified, result = TCL_ERROR;
int len;
if (parsePtr->numWords < 5 || parsePtr->numWords > 6) {
return TCL_ERROR;
@@ -2396,7 +2267,8 @@ TclCompileReturnCmd(
* General syntax: [return ?-option value ...? ?result?]
* An even number of words means an explicit result argument is present.
*/
int level, code, objc, size, status = TCL_OK;
int level, code, objc, status = TCL_OK;
int size;
int numWords = parsePtr->numWords;
int explicitResult = (0 == (numWords % 2));
int numOptionWords = numWords - 1 - explicitResult;
@@ -2506,7 +2378,7 @@ TclCompileReturnCmd(
ExceptionRange range = envPtr->exceptArrayPtr[index];
if ((range.type == CATCH_EXCEPTION_RANGE)
&& (range.catchOffset == -1)) {
&& (range.catchOffset == TCL_INDEX_NONE)) {
enclosingCatch = 1;
break;
}
@@ -2832,7 +2704,8 @@ IndexTailVarIfKnown(
{
Tcl_Obj *tailPtr;
const char *tailName, *p;
int len, n = varTokenPtr->numComponents;
int n = varTokenPtr->numComponents;
int len;
Tcl_Token *lastTokenPtr;
int full, localIndex;
+11 -11
View File
@@ -497,7 +497,7 @@ TclCompileStringIsCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -788,7 +788,7 @@ TclCompileStringMatchCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -908,7 +908,7 @@ TclCompileStringMapCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1325,7 +1325,7 @@ TclCompileStringToUpperCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1347,7 +1347,7 @@ TclCompileStringToLowerCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -1369,7 +1369,7 @@ TclCompileStringToTitleCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -2547,9 +2547,9 @@ IssueSwitchJumpTable(
*----------------------------------------------------------------------
*/
static ClientData
static void *
DupJumptableInfo(
ClientData clientData)
void *clientData)
{
JumptableInfo *jtPtr = (JumptableInfo *)clientData;
JumptableInfo *newJtPtr = (JumptableInfo *)ckalloc(sizeof(JumptableInfo));
@@ -2569,7 +2569,7 @@ DupJumptableInfo(
static void
FreeJumptableInfo(
ClientData clientData)
void *clientData)
{
JumptableInfo *jtPtr = (JumptableInfo *)clientData;
@@ -2579,7 +2579,7 @@ FreeJumptableInfo(
static void
PrintJumptableInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *appendObj,
TCL_UNUSED(ByteCode *),
unsigned int pcOffset)
@@ -2608,7 +2608,7 @@ PrintJumptableInfo(
static void
DisassembleJumptableInfo(
ClientData clientData,
void *clientData,
Tcl_Obj *dictObj,
TCL_UNUSED(ByteCode *),
TCL_UNUSED(unsigned int))
+1 -1
View File
@@ -2787,7 +2787,7 @@ TclVariadicOpCmd(
nodes[1].p.parent = 0;
} else {
if (lexeme == DIVIDE) {
litObjv[0] = Tcl_NewDoubleObj(1.0);
TclNewDoubleObj(litObjv[0], 1.0);
} else {
TclNewIntObj(litObjv[0], occdPtr->i.identity);
}
+7
View File
@@ -675,6 +675,13 @@ InstructionDesc const tclInstructionTable[] = {
/* String Less or equal: push (stknext <= stktop) */
{"strge", 1, -1, 0, {OPERAND_NONE}},
/* String Greater or equal: push (stknext >= stktop) */
{"lreplace4", 6, INT_MIN, 2, {OPERAND_UINT4, OPERAND_UINT1}},
/* Operands: number of arguments, flags
* flags: Combination of TCL_LREPLACE4_* flags
* Stack: ... listobj index1 ?index2? new1 ... newN => ... newlistobj
* where index2 is present only if TCL_LREPLACE_SINGLE_INDEX is not
* set in flags.
*/
{NULL, 0, 0, 0, {OPERAND_NONE}}
};
+86 -79
View File
@@ -87,22 +87,22 @@ typedef enum {
* to a catch PC offset. */
} ExceptionRangeType;
typedef struct ExceptionRange {
typedef struct {
ExceptionRangeType type; /* The kind of ExceptionRange. */
int nestingLevel; /* Static depth of the exception range. Used
Tcl_Size nestingLevel; /* Static depth of the exception range. Used
* to find the most deeply-nested range
* surrounding a PC at runtime. */
int codeOffset; /* Offset of the first instruction byte of the
Tcl_Size codeOffset; /* Offset of the first instruction byte of the
* code range. */
int numCodeBytes; /* Number of bytes in the code range. */
int breakOffset; /* If LOOP_EXCEPTION_RANGE, the target PC
Tcl_Size numCodeBytes; /* Number of bytes in the code range. */
Tcl_Size breakOffset; /* If LOOP_EXCEPTION_RANGE, the target PC
* offset for a break command in the range. */
int continueOffset; /* If LOOP_EXCEPTION_RANGE and not TCL_INDEX_NONE, the
Tcl_Size continueOffset; /* If LOOP_EXCEPTION_RANGE and not TCL_INDEX_NONE, the
* target PC offset for a continue command in
* the code range. Otherwise, ignore this
* range when processing a continue
* command. */
int catchOffset; /* If a CATCH_EXCEPTION_RANGE, the target PC
Tcl_Size catchOffset; /* If a CATCH_EXCEPTION_RANGE, the target PC
* offset for any "exception" in range. */
} ExceptionRange;
@@ -118,21 +118,21 @@ typedef struct ExceptionAux {
* one (see [for] next-clause) then we must
* not pick up the range when scanning for a
* target to continue to. */
int stackDepth; /* The stack depth at the point where the
Tcl_Size stackDepth; /* The stack depth at the point where the
* exception range was created. This is used
* to calculate the number of POPs required to
* restore the stack to its prior state. */
int expandTarget; /* The number of expansions expected on the
Tcl_Size expandTarget; /* The number of expansions expected on the
* auxData stack at the time the loop starts;
* we can't currently discard them except by
* doing INST_INVOKE_EXPANDED; this is a known
* problem. */
int expandTargetDepth; /* The stack depth expected at the outermost
Tcl_Size expandTargetDepth; /* The stack depth expected at the outermost
* expansion within the loop. Not meaningful
* if there are no open expansions between the
* looping level and the point of jump
* issue. */
int numBreakTargets; /* The number of [break]s that want to be
Tcl_Size numBreakTargets; /* The number of [break]s that want to be
* targeted to the place where this loop
* exception will be bound to. */
TCL_HASH_TYPE *breakTargets; /* The offsets of the INST_JUMP4 instructions
@@ -141,8 +141,8 @@ typedef struct ExceptionAux {
* TclFixupForwardJump) can cause the contents
* of this array to be updated. When
* numBreakTargets==0, this is NULL. */
int allocBreakTargets; /* The size of the breakTargets array. */
int numContinueTargets; /* The number of [continue]s that want to be
Tcl_Size allocBreakTargets; /* The size of the breakTargets array. */
Tcl_Size numContinueTargets; /* The number of [continue]s that want to be
* targeted to the place where this loop
* exception will be bound to. */
TCL_HASH_TYPE *continueTargets; /* The offsets of the INST_JUMP4 instructions
@@ -151,7 +151,7 @@ typedef struct ExceptionAux {
* TclFixupForwardJump) can cause the contents
* of this array to be updated. When
* numContinueTargets==0, this is NULL. */
int allocContinueTargets; /* The size of the continueTargets array. */
Tcl_Size allocContinueTargets; /* The size of the continueTargets array. */
} ExceptionAux;
/*
@@ -162,11 +162,11 @@ typedef struct ExceptionAux {
* source offset is not monotonic.
*/
typedef struct CmdLocation {
int codeOffset; /* Offset of first byte of command code. */
int numCodeBytes; /* Number of bytes for command's code. */
int srcOffset; /* Offset of first char of the command. */
int numSrcBytes; /* Number of command source chars. */
typedef struct {
Tcl_Size codeOffset; /* Offset of first byte of command code. */
Tcl_Size numCodeBytes; /* Number of bytes for command's code. */
Tcl_Size srcOffset; /* Offset of first char of the command. */
Tcl_Size numSrcBytes; /* Number of command source chars. */
} CmdLocation;
/*
@@ -180,9 +180,9 @@ typedef struct CmdLocation {
* frame and associated information, like the path of a sourced file.
*/
typedef struct ECL {
int srcOffset; /* Command location to find the entry. */
int nline; /* Number of words in the command */
typedef struct {
Tcl_Size srcOffset; /* Command location to find the entry. */
Tcl_Size nline; /* Number of words in the command */
int *line; /* Line information for all words in the
* command. */
int **next; /* Transient information used by the compiler
@@ -190,7 +190,7 @@ typedef struct ECL {
* lines. */
} ECL;
typedef struct ExtCmdLoc {
typedef struct {
int type; /* Context type. */
int start; /* Starting line for compiled script. Needed
* for the extended recompile check in
@@ -198,8 +198,8 @@ typedef struct ExtCmdLoc {
Tcl_Obj *path; /* Path of the sourced file the command is
* in. */
ECL *loc; /* Command word locations (lines). */
int nloc; /* Number of allocated entries in 'loc'. */
int nuloc; /* Number of used entries in 'loc'. */
Tcl_Size nloc; /* Number of allocated entries in 'loc'. */
Tcl_Size nuloc; /* Number of used entries in 'loc'. */
} ExtCmdLoc;
/*
@@ -217,7 +217,7 @@ typedef struct ExtCmdLoc {
* the AuxData structure.
*/
typedef void *(AuxDataDupProc) (void *clientData);
typedef void *(AuxDataDupProc) (void *clientData);
typedef void (AuxDataFreeProc) (void *clientData);
typedef void (AuxDataPrintProc)(void *clientData,
Tcl_Obj *appendObj, struct ByteCode *codePtr,
@@ -290,21 +290,21 @@ typedef struct CompileEnv {
* SetByteCodeFromAny. This pointer is not
* owned by the CompileEnv and must not be
* freed or changed by it. */
int numSrcBytes; /* Number of bytes in source. */
Tcl_Size numSrcBytes; /* Number of bytes in source. */
Proc *procPtr; /* If a procedure is being compiled, a pointer
* to its Proc structure; otherwise NULL. Used
* to compile local variables. Set from
* information provided by ObjInterpProc in
* tclProc.c. */
int numCommands; /* Number of commands compiled. */
int exceptDepth; /* Current exception range nesting level; TCL_INDEX_NONE
Tcl_Size numCommands; /* Number of commands compiled. */
Tcl_Size exceptDepth; /* Current exception range nesting level; TCL_INDEX_NONE
* if not in any range currently. */
int maxExceptDepth; /* Max nesting level of exception ranges; TCL_INDEX_NONE
Tcl_Size maxExceptDepth; /* Max nesting level of exception ranges; TCL_INDEX_NONE
* if no ranges have been compiled. */
int maxStackDepth; /* Maximum number of stack elements needed to
Tcl_Size maxStackDepth; /* Maximum number of stack elements needed to
* execute the code. Set by compilation
* procedures before returning. */
int currStackDepth; /* Current stack depth. */
Tcl_Size currStackDepth; /* Current stack depth. */
LiteralTable localLitTable; /* Contains LiteralEntry's describing all Tcl
* objects referenced by this compiled code.
* Indexed by the string representations of
@@ -318,18 +318,18 @@ typedef struct CompileEnv {
* codeStart points into the heap.*/
LiteralEntry *literalArrayPtr;
/* Points to start of LiteralEntry array. */
int literalArrayNext; /* Index of next free object array entry. */
int literalArrayEnd; /* Index just after last obj array entry. */
Tcl_Size literalArrayNext; /* Index of next free object array entry. */
Tcl_Size literalArrayEnd; /* Index just after last obj array entry. */
int mallocedLiteralArray; /* 1 if object array was expanded and objArray
* points into the heap, else 0. */
ExceptionRange *exceptArrayPtr;
/* Points to start of the ExceptionRange
* array. */
int exceptArrayNext; /* Next free ExceptionRange array index.
Tcl_Size exceptArrayNext; /* Next free ExceptionRange array index.
* exceptArrayNext is the number of ranges and
* (exceptArrayNext-1) is the index of the
* current range's array entry. */
int exceptArrayEnd; /* Index after the last ExceptionRange array
Tcl_Size exceptArrayEnd; /* Index after the last ExceptionRange array
* entry. */
int mallocedExceptArray; /* 1 if ExceptionRange array was expanded and
* exceptArrayPtr points in heap, else 0. */
@@ -342,15 +342,15 @@ typedef struct CompileEnv {
* numCommands is the index of the next entry
* to use; (numCommands-1) is the entry index
* for the last command. */
int cmdMapEnd; /* Index after last CmdLocation entry. */
Tcl_Size cmdMapEnd; /* Index after last CmdLocation entry. */
int mallocedCmdMap; /* 1 if command map array was expanded and
* cmdMapPtr points in the heap, else 0. */
AuxData *auxDataArrayPtr; /* Points to auxiliary data array start. */
int auxDataArrayNext; /* Next free compile aux data array index.
Tcl_Size auxDataArrayNext; /* Next free compile aux data array index.
* auxDataArrayNext is the number of aux data
* items and (auxDataArrayNext-1) is index of
* current aux data array entry. */
int auxDataArrayEnd; /* Index after last aux data array entry. */
Tcl_Size auxDataArrayEnd; /* Index after last aux data array entry. */
int mallocedAuxDataArray; /* 1 if aux data array was expanded and
* auxDataArrayPtr points in heap else 0. */
unsigned char staticCodeSpace[COMPILEENV_INIT_CODE_BYTES];
@@ -369,7 +369,7 @@ typedef struct CompileEnv {
/* TIP #280 */
ExtCmdLoc *extCmdMapPtr; /* Extended command location information for
* 'info frame'. */
int line; /* First line of the script, based on the
Tcl_Size line; /* First line of the script, based on the
* invoking context, then the line of the
* command currently compiled. */
int atCmdStart; /* Flag to say whether an INST_START_CMD
@@ -378,7 +378,7 @@ typedef struct CompileEnv {
* inefficient. If set to 2, that instruction
* should not be issued at all (by the generic
* part of the command compiler). */
int expandCount; /* Number of INST_EXPAND_START instructions
Tcl_Size expandCount; /* Number of INST_EXPAND_START instructions
* encountered that have not yet been paired
* with a corresponding
* INST_INVOKE_EXPANDED. */
@@ -417,7 +417,7 @@ typedef struct ByteCode {
* procs are specific to an interpreter so the
* code emitted will depend on the
* interpreter. */
int compileEpoch; /* Value of iPtr->compileEpoch when this
Tcl_Size compileEpoch; /* Value of iPtr->compileEpoch when this
* ByteCode was compiled. Used to invalidate
* code when, e.g., commands with compile
* procs are redefined. */
@@ -425,11 +425,11 @@ typedef struct ByteCode {
* compiled. If the code is executed if a
* different namespace, it must be
* recompiled. */
int nsEpoch; /* Value of nsPtr->resolverEpoch when this
Tcl_Size nsEpoch; /* Value of nsPtr->resolverEpoch when this
* ByteCode was compiled. Used to invalidate
* code when new namespace resolution rules
* are put into effect. */
int refCount; /* Reference count: set 1 when created plus 1
Tcl_Size refCount; /* Reference count: set 1 when created plus 1
* for each execution of the code currently
* active. This structure can be freed when
* refCount becomes zero. */
@@ -449,17 +449,17 @@ typedef struct ByteCode {
* itself. Does not include heap space for
* literal Tcl objects or storage referenced
* by AuxData entries. */
int numCommands; /* Number of commands compiled. */
int numSrcBytes; /* Number of source bytes compiled. */
int numCodeBytes; /* Number of code bytes. */
int numLitObjects; /* Number of objects in literal array. */
int numExceptRanges; /* Number of ExceptionRange array elems. */
int numAuxDataItems; /* Number of AuxData items. */
int numCmdLocBytes; /* Number of bytes needed for encoded command
Tcl_Size numCommands; /* Number of commands compiled. */
Tcl_Size numSrcBytes; /* Number of source bytes compiled. */
Tcl_Size numCodeBytes; /* Number of code bytes. */
Tcl_Size numLitObjects; /* Number of objects in literal array. */
Tcl_Size numExceptRanges; /* Number of ExceptionRange array elems. */
Tcl_Size numAuxDataItems; /* Number of AuxData items. */
Tcl_Size numCmdLocBytes; /* Number of bytes needed for encoded command
* location information. */
int maxExceptDepth; /* Maximum nesting level of ExceptionRanges;
Tcl_Size maxExceptDepth; /* Maximum nesting level of ExceptionRanges;
* TCL_INDEX_NONE if no ranges were compiled. */
int maxStackDepth; /* Maximum number of stack elements needed to
Tcl_Size maxStackDepth; /* Maximum number of stack elements needed to
* execute the code. */
unsigned char *codeStart; /* Points to the first byte of the code. This
* is just after the final ByteCode member
@@ -536,7 +536,7 @@ typedef struct ByteCode {
* Opcodes for the Tcl bytecode instructions. These must correspond to the
* entries in the table of instruction descriptions, tclInstructionTable, in
* tclCompile.c. Also, the order and number of the expression opcodes (e.g.,
* INST_LOR) must match the entries in the array operatorStrings in
* INST_BITOR) must match the entries in the array operatorStrings in
* tclExecute.c.
*/
@@ -848,8 +848,10 @@ typedef struct ByteCode {
#define INST_STR_LE 193
#define INST_STR_GE 194
#define INST_LREPLACE4 195
/* The last opcode */
#define LAST_INST_OPCODE 194
#define LAST_INST_OPCODE 195
/*
* Table describing the Tcl bytecode instructions: their name (for displaying
@@ -887,7 +889,7 @@ typedef enum InstOperandType {
typedef struct InstructionDesc {
const char *name; /* Name of instruction. */
int numBytes; /* Total number of bytes for instruction. */
Tcl_Size numBytes; /* Total number of bytes for instruction. */
int stackEffect; /* The worst-case balance stack effect of the
* instruction, used for stack requirements
* computations. The value INT_MIN signals
@@ -975,8 +977,8 @@ typedef struct JumpFixup {
typedef struct JumpFixupArray {
JumpFixup *fixup; /* Points to start of jump fixup array. */
int next; /* Index of next free array entry. */
int end; /* Index of last usable entry in array. */
Tcl_Size next; /* Index of next free array entry. */
Tcl_Size end; /* Index of last usable entry in array. */
int mallocedArray; /* 1 if array was expanded and fixups points
* into the heap, else 0. */
JumpFixup staticFixupSpace[JUMPFIXUP_INIT_ENTRIES];
@@ -991,8 +993,8 @@ typedef struct JumpFixupArray {
*/
typedef struct ForeachVarList {
int numVars; /* The number of variables in the list. */
int varIndexes[TCLFLEXARRAY];/* An array of the indexes ("slot numbers")
Tcl_Size numVars; /* The number of variables in the list. */
Tcl_Size varIndexes[TCLFLEXARRAY];/* An array of the indexes ("slot numbers")
* for each variable in the procedure's array
* of local variables. Only scalar variables
* are supported. The actual size of this
@@ -1008,11 +1010,11 @@ typedef struct ForeachVarList {
*/
typedef struct ForeachInfo {
int numLists; /* The number of both the variable and value
Tcl_Size numLists; /* The number of both the variable and value
* lists of the foreach command. */
int firstValueTemp; /* Index of the first temp var in a proc frame
Tcl_Size firstValueTemp; /* Index of the first temp var in a proc frame
* used to point to a value list. */
int loopCtTemp; /* Index of temp var in a proc frame holding
Tcl_Size loopCtTemp; /* Index of temp var in a proc frame holding
* the loop's iteration count. Used to
* determine next value list element to assign
* each loop var. */
@@ -1046,8 +1048,8 @@ MODULE_SCOPE const AuxDataType tclJumptableInfoType;
*/
typedef struct {
int length; /* Size of array */
int varIndices[TCLFLEXARRAY]; /* Array of variable indices to manage when
Tcl_Size length; /* Size of array */
Tcl_Size varIndices[TCLFLEXARRAY]; /* Array of variable indices to manage when
* processing the start and end of a [dict
* update]. There is really more than one
* entry, and the structure is allocated to
@@ -1212,7 +1214,6 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int isLambda);
/*
*----------------------------------------------------------------
@@ -1260,10 +1261,10 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
#define TclCheckStackDepth(depth, envPtr) \
do { \
int _dd = (depth); \
if (_dd != (envPtr)->currStackDepth) { \
Tcl_Panic("bad stack depth computations: is %i, should be %i", \
(envPtr)->currStackDepth, _dd); \
size_t _dd = (depth); \
if (_dd != (size_t)(envPtr)->currStackDepth) { \
Tcl_Panic("bad stack depth computations: is %" TCL_Z_MODIFIER "u, should be %" TCL_Z_MODIFIER "u", \
(size_t)(envPtr)->currStackDepth, _dd); \
} \
} while (0)
@@ -1505,7 +1506,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
(*((p)+3))))
/*
* Macros used to compute the minimum and maximum of two integers. The ANSI C
* Macros used to compute the minimum and maximum of two values. The ANSI C
* "prototypes" for these macros are:
*
* int TclMin(int i, int j);
@@ -1551,7 +1552,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
#define PushLiteral(envPtr, string, length) \
TclEmitPush(TclRegisterLiteral((envPtr), (string), (length), 0), (envPtr))
#define PushStringLiteral(envPtr, string) \
PushLiteral((envPtr), (string), (int) (sizeof(string "") - 1))
PushLiteral((envPtr), (string), sizeof(string "") - 1)
/*
* Macro to advance to the next token; it is more mnemonic than the address
@@ -1567,7 +1568,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
* Macro to get the offset to the next instruction to be issued. The ANSI C
* "prototype" for this macro is:
*
* static int CurrentOffset(CompileEnv *envPtr);
* static ptrdiff_t CurrentOffset(CompileEnv *envPtr);
*/
#define CurrentOffset(envPtr) \
@@ -1580,9 +1581,9 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
* of LOOP ranges is an interesting datum for debugging purposes, and that is
* what we compute now.
*
* static int ExceptionRangeStarts(CompileEnv *envPtr, int index);
* static void ExceptionRangeEnds(CompileEnv *envPtr, int index);
* static void ExceptionRangeTarget(CompileEnv *envPtr, int index, LABEL);
* static int ExceptionRangeStarts(CompileEnv *envPtr, Tcl_Size index);
* static void ExceptionRangeEnds(CompileEnv *envPtr, Tcl_Size index);
* static void ExceptionRangeTarget(CompileEnv *envPtr, Tcl_Size index, LABEL);
*/
#define ExceptionRangeStarts(envPtr, index) \
@@ -1641,7 +1642,7 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
#define DefineLineInformation \
ExtCmdLoc *mapPtr = envPtr->extCmdMapPtr; \
int eclIndex = mapPtr->nuloc - 1
Tcl_Size eclIndex = mapPtr->nuloc - 1
#define SetLineInformation(word) \
envPtr->line = mapPtr->loc[eclIndex].line[(word)]; \
@@ -1682,6 +1683,12 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData,
#define TCL_NO_LARGE_INDEX 1 /* Do not return localIndex value > 255 */
#define TCL_NO_ELEMENT 2 /* Do not push the array element. */
/*
* Flags bits used by lreplace4 instruction
*/
#define TCL_LREPLACE4_END_IS_LAST 1 /* "end" refers to last element */
#define TCL_LREPLACE4_SINGLE_INDEX 2 /* Second index absent (pure insert) */
/*
* DTrace probe macros (NOPs if DTrace support is not enabled).
*/
@@ -1819,8 +1826,8 @@ MODULE_SCOPE void TclDTraceInfo(Tcl_Obj *info, const char **args, int *argsi);
FILE *tclDTraceDebugLog = NULL; \
void TclDTraceOpenDebugLog(void) { \
char n[35]; \
sprintf(n, "/tmp/tclDTraceDebug-%lu.log", \
(unsigned long) getpid()); \
sprintf(n, "/tmp/tclDTraceDebug-%" TCL_Z_MODIFIER "u.log", \
(size_t) getpid()); \
tclDTraceDebugLog = fopen(n, "a"); \
}
+309 -256
View File
File diff suppressed because it is too large Load Diff
+37 -27
View File
@@ -10,6 +10,7 @@
*/
#include "tclInt.h"
#include "tclIO.h"
typedef size_t (LengthProc)(const char *src);
@@ -33,13 +34,13 @@ typedef struct {
Tcl_EncodingFreeProc *freeProc;
/* If non-NULL, function to call when this
* encoding is deleted. */
void *clientData; /* Arbitrary value associated with encoding
* type. Passed to conversion functions. */
int nullSize; /* Number of 0x00 bytes that signify
* end-of-string in this encoding. This number
* is used to determine the source string
* length when the srcLen argument is
* negative. This number can be 1, 2, or 4. */
void *clientData; /* Arbitrary value associated with encoding
* type. Passed to conversion functions. */
LengthProc *lengthProc; /* Function to compute length of
* null-terminated strings in this encoding.
* If nullSize is 1, this is strlen; if
@@ -562,7 +563,7 @@ TclInitEncodingSubsystem(void)
type.nullSize = 1;
type.clientData = INT2PTR(TCL_ENCODING_UTF);
Tcl_CreateEncoding(&type);
type.clientData = INT2PTR(0);
type.clientData = INT2PTR(TCL_ENCODING_NOCOMPLAIN);
type.encodingName = "cesu-8";
Tcl_CreateEncoding(&type);
@@ -571,13 +572,13 @@ TclInitEncodingSubsystem(void)
type.freeProc = NULL;
type.nullSize = 2;
type.encodingName = "ucs-2le";
type.clientData = INT2PTR(TCL_ENCODING_LE);
type.clientData = INT2PTR(TCL_ENCODING_LE|TCL_ENCODING_NOCOMPLAIN);
Tcl_CreateEncoding(&type);
type.encodingName = "ucs-2be";
type.clientData = INT2PTR(0);
type.clientData = INT2PTR(TCL_ENCODING_NOCOMPLAIN);
Tcl_CreateEncoding(&type);
type.encodingName = "ucs-2";
type.clientData = INT2PTR(isLe.c);
type.clientData = INT2PTR(isLe.c|TCL_ENCODING_NOCOMPLAIN);
Tcl_CreateEncoding(&type);
type.toUtfProc = Utf32ToUtfProc;
@@ -888,7 +889,7 @@ FreeEncoding(
*
* Tcl_GetEncodingName --
*
* Given an encoding, return the name that was used to constuct the
* Given an encoding, return the name that was used to construct the
* encoding.
*
* Results:
@@ -991,7 +992,7 @@ Tcl_GetEncodingNames(
* string termination.
*
* Results:
* The name of the encoding.
* The number of nul bytes used for the string termination.
*
* Side effects:
* None.
@@ -2386,12 +2387,12 @@ UtfToUtfProc(
*dst++ = *src++;
} else if ((UCHAR(*src) == 0xC0) && (src + 1 < srcEnd)
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) {
&& (UCHAR(src[1]) == 0x80) && (!(flags & TCL_ENCODING_MODIFIED) || ((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX))) {
/*
* If in input mode, and -strict is specified: This is an error.
* If in input mode, and -strict or -failindex is specified: This is an error.
*/
if (flags & TCL_ENCODING_MODIFIED) {
result = TCL_CONVERT_UNKNOWN;
result = TCL_CONVERT_SYNTAX;
break;
}
@@ -2413,6 +2414,10 @@ UtfToUtfProc(
result = TCL_CONVERT_MULTIBYTE;
break;
}
if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT) || (flags & ENCODING_FAILINDEX)) {
result = TCL_CONVERT_SYNTAX;
break;
}
ch = UCHAR(*src++);
} else {
char chbuf[2];
@@ -2424,8 +2429,8 @@ UtfToUtfProc(
int low;
const char *saveSrc = src;
size_t len = TclUtfToUCS4(src, &ch);
if ((len < 2) && (ch != 0) && STOPONERROR
&& (flags & TCL_ENCODING_MODIFIED)) {
if ((len < 2) && (ch != 0) && (flags & TCL_ENCODING_MODIFIED)
&& (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT))) {
result = TCL_CONVERT_SYNTAX;
break;
}
@@ -2464,15 +2469,15 @@ UtfToUtfProc(
src += len;
dst += Tcl_UniCharToUtf(ch, dst);
ch = low;
} else if (!Tcl_UniCharIsUnicode(ch)) {
if (STOPONERROR) {
result = TCL_CONVERT_UNKNOWN;
src = saveSrc;
break;
}
if (!(flags & TCL_ENCODING_MODIFIED)) {
ch = 0xFFFD;
}
} else if (STOPONERROR && !(flags & TCL_ENCODING_MODIFIED) && (((ch & ~0x7FF) == 0xD800))) {
result = TCL_CONVERT_UNKNOWN;
src = saveSrc;
break;
} else if (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT)
&& (flags & TCL_ENCODING_MODIFIED) && ((ch & ~0x7FF) == 0xD800)) {
result = TCL_CONVERT_SYNTAX;
src = saveSrc;
break;
}
dst += Tcl_UniCharToUtf(ch, dst);
}
@@ -2560,6 +2565,13 @@ Utf32ToUtfProc(
} else {
ch = (src[0] & 0xFF) << 24 | (src[1] & 0xFF) << 16 | (src[2] & 0xFF) << 8 | (src[3] & 0xFF);
}
if ((unsigned)ch > 0x10FFFF || (((flags & TCL_ENCODING_STRICT) == TCL_ENCODING_STRICT)
&& ((ch & ~0x7FF) == 0xD800))) {
if (STOPONERROR) {
result = TCL_CONVERT_SYNTAX;
break;
}
}
/*
* Special case for 1-byte utf chars for speed. Make sure we work with
@@ -2650,12 +2662,11 @@ UtfToUtf32Proc(
break;
}
len = TclUtfToUCS4(src, &ch);
if (!Tcl_UniCharIsUnicode(ch)) {
if ((ch & ~0x7FF) == 0xD800) {
if (STOPONERROR) {
result = TCL_CONVERT_UNKNOWN;
break;
}
ch = 0xFFFD;
}
src += len;
if (flags & TCL_ENCODING_LE) {
@@ -2853,12 +2864,11 @@ UtfToUtf16Proc(
break;
}
len = TclUtfToUCS4(src, &ch);
if (!Tcl_UniCharIsUnicode(ch)) {
if ((ch & ~0x7FF) == 0xD800) {
if (STOPONERROR) {
result = TCL_CONVERT_UNKNOWN;
break;
}
ch = 0xFFFD;
}
src += len;
if (flags & TCL_ENCODING_LE) {
@@ -3190,7 +3200,7 @@ TableFromUtfProc(
word = fromUnicode[(ch >> 8)][ch & 0xFF];
if ((word == 0) && (ch != 0)) {
if ((STOPONERROR) && (flags & TCL_ENCODING_CHAR_LIMIT)) {
if (STOPONERROR) {
result = TCL_CONVERT_UNKNOWN;
break;
}
+24 -16
View File
@@ -562,8 +562,8 @@ TclNamespaceEnsembleCmd(
continue;
}
do {
if (TclListObjGetElementsM(interp, listObj, &len,
&listv) != TCL_OK) {
if (TclListObjLengthM(interp, listObj, &len
) != TCL_OK) {
Tcl_DictObjDone(&search);
if (patchedDict) {
Tcl_DecrRefCount(patchedDict);
@@ -582,6 +582,14 @@ TclNamespaceEnsembleCmd(
}
goto freeMapAndError;
}
if (TclListObjGetElementsM(interp, listObj, &len,
&listv) != TCL_OK) {
Tcl_DictObjDone(&search);
if (patchedDict) {
Tcl_DecrRefCount(patchedDict);
}
goto freeMapAndError;
}
cmd = TclGetString(listv[0]);
if (!(cmd[0] == ':' && cmd[1] == ':')) {
Tcl_Obj *newList = Tcl_DuplicateObj(listObj);
@@ -2903,7 +2911,7 @@ TclCompileEnsemble(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3460,7 +3468,7 @@ CompileBasicNArgCommand(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3480,7 +3488,7 @@ TclCompileBasic0ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3502,7 +3510,7 @@ TclCompileBasic1ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3524,7 +3532,7 @@ TclCompileBasic2ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3546,7 +3554,7 @@ TclCompileBasic3ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3568,7 +3576,7 @@ TclCompileBasic0Or1ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3590,7 +3598,7 @@ TclCompileBasic1Or2ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3612,7 +3620,7 @@ TclCompileBasic2Or3ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3634,7 +3642,7 @@ TclCompileBasic0To2ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3656,7 +3664,7 @@ TclCompileBasic1To3ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3678,7 +3686,7 @@ TclCompileBasicMin0ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3700,7 +3708,7 @@ TclCompileBasicMin1ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
@@ -3722,7 +3730,7 @@ TclCompileBasicMin2ArgCmd(
Tcl_Interp *interp, /* Used for error reporting. */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
Command *cmdPtr, /* Points to definition of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
+100 -8
View File
@@ -4876,7 +4876,8 @@ TEBCresume(
TRACE_ERROR(interp);
goto gotError;
}
if (TclArithSeriesObjIndex(valuePtr, index, &objResultPtr) != TCL_OK) {
objResultPtr = TclArithSeriesObjIndex(interp, valuePtr, index);
if (objResultPtr == NULL) {
CACHE_STACK_INFO();
TRACE_ERROR(interp);
goto gotError;
@@ -4941,7 +4942,8 @@ TEBCresume(
/* Compute value @ index */
if (index >= 0 && index < length) {
if (TclArithSeriesObjIndex(valuePtr, index, &objResultPtr) != TCL_OK) {
objResultPtr = TclArithSeriesObjIndex(interp, valuePtr, index);
if (objResultPtr == NULL) {
CACHE_STACK_INFO();
TRACE_ERROR(interp);
goto gotError;
@@ -5187,7 +5189,7 @@ TEBCresume(
do {
if (isArithSeries) {
TclArithSeriesObjIndex(value2Ptr, i, &o);
o = TclArithSeriesObjIndex(NULL, value2Ptr, i);
} else {
Tcl_ListObjIndex(NULL, value2Ptr, i, &o);
}
@@ -5244,11 +5246,101 @@ TEBCresume(
NEXT_INST_F(1, 1, 0);
}
/*
* End of INST_LIST and related instructions.
* -----------------------------------------------------------------
* Start of string-related instructions.
*/
case INST_LREPLACE4:
{
int numToDelete, numNewElems, end_indicator;
int haveSecondIndex, flags;
Tcl_Obj *fromIdxObj, *toIdxObj;
opnd = TclGetInt4AtPtr(pc + 1);
flags = TclGetInt1AtPtr(pc + 5);
/* Stack: ... listobj index1 ?index2? new1 ... newN */
valuePtr = OBJ_AT_DEPTH(opnd-1);
/* haveSecondIndex==0 => pure insert */
haveSecondIndex = (flags & TCL_LREPLACE4_SINGLE_INDEX) == 0;
numNewElems = opnd - 2 - haveSecondIndex;
/* end_indicator==1 => "end" is last element's index, 0=>index beyond */
end_indicator = (flags & TCL_LREPLACE4_END_IS_LAST) != 0;
fromIdxObj = OBJ_AT_DEPTH(opnd - 2);
toIdxObj = haveSecondIndex ? OBJ_AT_DEPTH(opnd - 3) : NULL;
if (Tcl_ListObjLength(interp, valuePtr, &length) != TCL_OK) {
TRACE_ERROR(interp);
goto gotError;
}
DECACHE_STACK_INFO();
if (TclGetIntForIndexM(
interp, fromIdxObj, length - end_indicator, &fromIdx)
!= TCL_OK) {
CACHE_STACK_INFO();
TRACE_ERROR(interp);
goto gotError;
}
if (fromIdx == TCL_INDEX_NONE) {
fromIdx = 0;
}
else if (fromIdx > length) {
fromIdx = length;
}
numToDelete = 0;
if (toIdxObj) {
if (TclGetIntForIndexM(
interp, toIdxObj, length - end_indicator, &toIdx)
!= TCL_OK) {
CACHE_STACK_INFO();
TRACE_ERROR(interp);
goto gotError;
}
if (toIdx > length) {
toIdx = length;
}
if (toIdx >= fromIdx) {
numToDelete = toIdx - fromIdx + 1;
}
}
CACHE_STACK_INFO();
if (Tcl_IsShared(valuePtr)) {
objResultPtr = Tcl_DuplicateObj(valuePtr);
if (Tcl_ListObjReplace(interp,
objResultPtr,
fromIdx,
numToDelete,
numNewElems,
&OBJ_AT_DEPTH(numNewElems - 1))
!= TCL_OK) {
TRACE_ERROR(interp);
Tcl_DecrRefCount(objResultPtr);
goto gotError;
}
TRACE_APPEND(("\"%.30s\"\n", O2S(objResultPtr)));
NEXT_INST_V(6, opnd, 1);
}
else {
if (Tcl_ListObjReplace(interp,
valuePtr,
fromIdx,
numToDelete,
numNewElems,
&OBJ_AT_DEPTH(numNewElems - 1))
!= TCL_OK) {
TRACE_ERROR(interp);
goto gotError;
}
TRACE_APPEND(("\"%.30s\"\n", O2S(valuePtr)));
NEXT_INST_V(6, opnd - 1, 0);
}
}
/*
* End of INST_LIST and related instructions.
* -----------------------------------------------------------------
* Start of string-related instructions.
*/
case INST_STR_EQ:
case INST_STR_NEQ: /* String (in)equality check */
+4 -4
View File
@@ -454,7 +454,7 @@ TclpGetNativePathType(
if ((rootEnd != path) && (driveNameLengthPtr != NULL)) {
*driveNameLengthPtr = rootEnd - path;
if (driveNameRef != NULL) {
*driveNameRef = TclDStringToObj(&ds);
*driveNameRef = Tcl_DStringToObj(&ds);
Tcl_IncrRefCount(*driveNameRef);
}
}
@@ -734,7 +734,7 @@ SplitWinPath(
*/
if (p != path) {
Tcl_ListObjAppendElement(NULL, result, TclDStringToObj(&buf));
Tcl_ListObjAppendElement(NULL, result, Tcl_DStringToObj(&buf));
}
Tcl_DStringFree(&buf);
@@ -1767,7 +1767,7 @@ TclGlob(
if (head != Tcl_DStringValue(&buffer)) {
Tcl_DStringAppend(&buffer, head, -1);
}
pathPrefix = TclDStringToObj(&buffer);
pathPrefix = Tcl_DStringToObj(&buffer);
Tcl_IncrRefCount(pathPrefix);
globFlags |= TCL_GLOBMODE_DIR;
if (c != '\0') {
@@ -2427,7 +2427,7 @@ DoGlob(
*/
if (pathPtr == NULL) {
joinedPtr = TclDStringToObj(&append);
joinedPtr = Tcl_DStringToObj(&append);
} else if (flags) {
joinedPtr = TclNewFSPathObj(pathPtr, Tcl_DStringValue(&append),
Tcl_DStringLength(&append));
+1 -1
View File
@@ -1,7 +1,7 @@
/*
* tclFileSystem.h --
*
* This file contains the common defintions and prototypes for use by
* This file contains the common definitions and prototypes for use by
* Tcl's filesystem and path handling layers.
*
* Copyright (c) 2003 Vince Darley.
+123 -82
View File
@@ -125,12 +125,12 @@ typedef struct {
* ChannelState exists per set of stacked
* channels. */
Tcl_Channel stdinChannel; /* Static variable for the stdin channel. */
int stdinInitialized;
Tcl_Channel stdoutChannel; /* Static variable for the stdout channel. */
int stdoutInitialized;
Tcl_Channel stderrChannel; /* Static variable for the stderr channel. */
int stderrInitialized;
Tcl_Encoding binaryEncoding;
int stdinInitialized;
int stdoutInitialized;
int stderrInitialized;
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
@@ -393,13 +393,13 @@ ChanClose(
* Results:
* The return value of the driver inputProc,
* - number of bytes stored at dst, ot
* - -1 on error, with a Posix error code available to the caller by
* - TCL_INDEX_NONE on error, with a Posix error code available to the caller by
* calling Tcl_GetErrno().
*
* Side effects:
* The CHANNEL_BLOCKED and CHANNEL_EOF flags of the channel state are set
* as appropriate. On EOF, the inputEncodingFlags are set to perform
* ending operations on decoding.
* The CHANNEL_ENCODING_ERROR, CHANNEL_BLOCKED and CHANNEL_EOF flags
* of the channel state are set as appropriate. On EOF, the
* inputEncodingFlags are set to perform ending operations on decoding.
*
* TODO - Is this really the right place for that?
*
@@ -431,7 +431,7 @@ ChanRead(
ResetFlag(chanPtr->state, CHANNEL_BLOCKED | CHANNEL_EOF);
chanPtr->state->inputEncodingFlags &= ~TCL_ENCODING_END;
if (WillRead(chanPtr) < 0) {
return -1;
return TCL_INDEX_NONE;
}
bytesRead = chanPtr->typePtr->inputProc(chanPtr->instanceData,
@@ -486,14 +486,14 @@ ChanSeek(
#ifndef TCL_NO_DEPRECATED
if (offset<LONG_MIN || offset>LONG_MAX) {
*errnoPtr = EOVERFLOW;
return -1;
return TCL_INDEX_NONE;
}
return Tcl_ChannelSeekProc(chanPtr->typePtr)(chanPtr->instanceData,
offset, mode, errnoPtr);
#else
*errnoPtr = EINVAL;
return -1;
return TCL_INDEX_NONE;
#endif
}
@@ -1237,7 +1237,7 @@ Tcl_UnregisterChannel(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"illegal recursive call to close through close-handler"
" of channel", -1));
" of channel", TCL_INDEX_NONE));
}
return TCL_ERROR;
}
@@ -2720,7 +2720,7 @@ CheckForDeadChannel(
Tcl_SetErrno(EINVAL);
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"unable to access channel: invalid channel", -1));
"unable to access channel: invalid channel", TCL_INDEX_NONE));
}
return 1;
}
@@ -2918,7 +2918,7 @@ FlushChannel(
if (interp != NULL && !TclChanCaughtErrorBypass(interp,
(Tcl_Channel) chanPtr)) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
}
/*
@@ -3493,7 +3493,7 @@ Tcl_Close(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"illegal recursive call to close through close-handler"
" of channel", -1));
" of channel", TCL_INDEX_NONE));
}
return TCL_ERROR;
}
@@ -3606,7 +3606,7 @@ Tcl_Close(
Tcl_SetErrno(stickyError);
if (interp != NULL) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
}
return TCL_ERROR;
}
@@ -3624,7 +3624,7 @@ Tcl_Close(
&& 0 == TclGetCharLength(Tcl_GetObjResult(interp))) {
Tcl_SetErrno(result);
Tcl_SetObjResult(interp,
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
Tcl_NewStringObj(Tcl_PosixError(interp), TCL_INDEX_NONE));
}
if (result != 0) {
return TCL_ERROR;
@@ -3696,7 +3696,7 @@ Tcl_CloseEx(
if (chanPtr != statePtr->topChanPtr) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"half-close not applicable to stack of transformations", -1));
"half-close not applicable to stack of transformations", TCL_INDEX_NONE));
return TCL_ERROR;
}
@@ -3729,7 +3729,7 @@ Tcl_CloseEx(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"illegal recursive call to close through close-handler"
" of channel", -1));
" of channel", TCL_INDEX_NONE));
}
return TCL_ERROR;
}
@@ -4111,7 +4111,7 @@ Tcl_Write(
chanPtr = statePtr->topChanPtr;
if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) {
return -1;
return TCL_INDEX_NONE;
}
if (srcLen < 0) {
@@ -4208,7 +4208,7 @@ Tcl_WriteChars(
Tcl_Channel chan, /* The channel to buffer output for. */
const char *src, /* UTF-8 characters to queue in output
* buffer. */
int len) /* Length of string in bytes, or < 0 for
int len) /* Length of string in bytes, or TCL_INDEX_NONE for
* strlen(). */
{
Channel *chanPtr = (Channel *) chan;
@@ -4330,7 +4330,7 @@ WillRead(
DiscardInputQueued(chanPtr->state, 0);
Tcl_SetErrno(EINVAL);
return -1;
return TCL_INDEX_NONE;
}
if (((Tcl_ChannelWideSeekProc(chanPtr->typePtr) != NULL)
#ifndef TCL_NO_DEPRECATED
@@ -4348,7 +4348,7 @@ WillRead(
*/
if (FlushChannel(NULL, chanPtr, 0) != 0) {
return -1;
return TCL_INDEX_NONE;
}
}
return 0;
@@ -4365,7 +4365,7 @@ WillRead(
* ready e.g. if it contains a newline and we are in line buffering mode.
*
* Results:
* The number of bytes written or -1 in case of error. If -1,
* The number of bytes written or TCL_INDEX_NONE in case of error. If TCL_INDEX_NONE,
* Tcl_GetErrno will return the error code.
*
* Side effects:
@@ -4394,7 +4394,7 @@ Write(
}
/*
* Transfer encoding strict/nocomplain option to the encoding flags
* Transfer encoding nocomplain/strict option to the encoding flags
*/
if (GotFlag(statePtr, CHANNEL_ENCODING_STRICT)) {
@@ -4466,7 +4466,7 @@ Write(
* current output encoding and strict encoding is active.
*/
if (result == TCL_CONVERT_UNKNOWN) {
if (result == TCL_CONVERT_UNKNOWN || result == TCL_CONVERT_SYNTAX) {
encodingError = 1;
result = TCL_OK;
}
@@ -4546,7 +4546,7 @@ Write(
if (IsBufferFull(bufPtr)) {
if (FlushChannel(NULL, chanPtr, 0) != 0) {
return -1;
return TCL_INDEX_NONE;
}
flushed += statePtr->bufSize;
@@ -4569,7 +4569,7 @@ Write(
if (((flushed < total) && GotFlag(statePtr, CHANNEL_UNBUFFERED)) ||
(needNlFlush && GotFlag(statePtr, CHANNEL_LINEBUFFERED))) {
if (FlushChannel(NULL, chanPtr, 0) != 0) {
return -1;
return TCL_INDEX_NONE;
}
}
@@ -4577,7 +4577,7 @@ Write(
if (encodingError) {
Tcl_SetErrno(EILSEQ);
return -1;
return TCL_INDEX_NONE;
}
return total;
}
@@ -4590,8 +4590,8 @@ Write(
* Reads a complete line of input from the channel into a Tcl_DString.
*
* Results:
* Length of line read (in characters) or -1 if error, EOF, or blocked.
* If -1, use Tcl_GetErrno() to retrieve the POSIX error code for the
* Length of line read (in characters) or TCL_INDEX_NONE if error, EOF, or blocked.
* If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error code for the
* error or condition that occurred.
*
* Side effects:
@@ -4631,8 +4631,8 @@ Tcl_Gets(
* converted to UTF-8 using the encoding specified by the channel.
*
* Results:
* Number of characters accumulated in the object or -1 if error,
* blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
* Number of characters accumulated in the object or TCL_INDEX_NONE if error,
* blocked, or EOF. If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error
* code for the error or condition that occurred.
*
* Side effects:
@@ -4655,11 +4655,18 @@ Tcl_GetsObj(
ChannelState *statePtr = chanPtr->state;
/* State info for channel */
ChannelBuffer *bufPtr;
int inEofChar, skip, copiedTotal, oldLength, oldFlags, oldRemoved;
int inEofChar, skip, copiedTotal, oldFlags, oldRemoved;
int oldLength;
Tcl_Encoding encoding;
char *dst, *dstEnd, *eol, *eof;
Tcl_EncodingState oldState;
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
UpdateInterest(chanPtr);
Tcl_SetErrno(EILSEQ);
return TCL_INDEX_NONE;
}
if (CheckChannelErrors(statePtr, TCL_READABLE) != 0) {
return TCL_INDEX_NONE;
}
@@ -5030,6 +5037,7 @@ Tcl_GetsObj(
done:
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
@@ -5063,8 +5071,8 @@ Tcl_GetsObj(
* may be called when an -eofchar is set on the channel.
*
* Results:
* Number of characters accumulated in the object or -1 if error,
* blocked, or EOF. If -1, use Tcl_GetErrno() to retrieve the POSIX error
* Number of characters accumulated in the object or TCL_INDEX_NONE if error,
* blocked, or EOF. If TCL_INDEX_NONE, use Tcl_GetErrno() to retrieve the POSIX error
* code for the error or condition that occurred.
*
* Side effects:
@@ -5212,12 +5220,12 @@ TclGetsObjBinary(
if ((dst == dstEnd) && (byteLen == oldLength)) {
/*
* If we didn't append any bytes before encountering EOF,
* caller needs to see -1.
* caller needs to see TCL_INDEX_NONE.
*/
byteArray = Tcl_SetByteArrayLength(objPtr, oldLength);
CommonGetsCleanup(chanPtr);
copiedTotal = -1;
copiedTotal = TCL_INDEX_NONE;
ResetFlag(statePtr, CHANNEL_BLOCKED);
goto done;
}
@@ -5306,7 +5314,7 @@ TclGetsObjBinary(
*/
SetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
copiedTotal = -1;
copiedTotal = TCL_INDEX_NONE;
/*
* Update the notifier state so we don't block while there is still data
@@ -5516,6 +5524,11 @@ FilterInputBytes(
&statePtr->inputEncodingState, dst, spaceLeft, &gsPtr->rawRead,
&gsPtr->bytesWrote, &gsPtr->charsWrote);
if (result == TCL_CONVERT_UNKNOWN || result == TCL_CONVERT_SYNTAX) {
SetFlag(statePtr, CHANNEL_ENCODING_ERROR);
result = TCL_OK;
}
/*
* Make sure that if we go through 'gets', that we reset the
* TCL_ENCODING_START flag still. [Bug #523988]
@@ -5735,7 +5748,7 @@ CommonGetsCleanup(
* No encoding conversions are applied to the bytes being read.
*
* Results:
* The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
* The number of bytes read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
* retrieve the error code for the error that occurred.
*
* Side effects:
@@ -5780,7 +5793,7 @@ Tcl_Read(
* No encoding conversions are applied to the bytes being read.
*
* Results:
* The number of bytes read, or -1 on error. Use Tcl_GetErrno() to
* The number of bytes read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
* retrieve the error code for the error that occurred.
*
* Side effects:
@@ -5868,7 +5881,7 @@ Tcl_ReadRaw(
*/
if (!GotFlag(statePtr, CHANNEL_BLOCKED) || copied == 0) {
copied = -1;
copied = TCL_INDEX_NONE;
}
} else if (nread > 0) {
/*
@@ -5898,7 +5911,7 @@ Tcl_ReadRaw(
* object.
*
* Results:
* The number of characters read, or -1 on error. Use Tcl_GetErrno() to
* The number of characters read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
* retrieve the error code for the error that occurred.
*
* Side effects:
@@ -5912,7 +5925,7 @@ Tcl_ReadChars(
Tcl_Channel chan, /* The channel to read. */
Tcl_Obj *objPtr, /* Input data is stored in this object. */
int toRead, /* Maximum number of characters to store, or
* -1 to read all available data (up to EOF or
* TCL_INDEX_NONE to read all available data (up to EOF or
* when channel blocks). */
int appendFlag) /* If non-zero, data read from the channel
* will be appended to the object. Otherwise,
@@ -5936,7 +5949,7 @@ Tcl_ReadChars(
*/
UpdateInterest(chanPtr);
return -1;
return TCL_INDEX_NONE;
}
return DoReadChars(chanPtr, objPtr, toRead, appendFlag);
@@ -5954,7 +5967,7 @@ Tcl_ReadChars(
* object.
*
* Results:
* The number of characters read, or -1 on error. Use Tcl_GetErrno() to
* The number of characters read, or TCL_INDEX_NONE on error. Use Tcl_GetErrno() to
* retrieve the error code for the error that occurred.
*
* Side effects:
@@ -5968,7 +5981,7 @@ DoReadChars(
Channel *chanPtr, /* The channel to read. */
Tcl_Obj *objPtr, /* Input data is stored in this object. */
int toRead, /* Maximum number of characters to store, or
* -1 to read all available data (up to EOF or
* TCL_INDEX_NONE to read all available data (up to EOF or
* when channel blocks). */
int appendFlag) /* If non-zero, data read from the channel
* will be appended to the object. Otherwise,
@@ -6010,6 +6023,12 @@ DoReadChars(
}
}
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
/* TODO: We don't need this call? */
UpdateInterest(chanPtr);
Tcl_SetErrno(EILSEQ);
return -1;
}
/*
* Early out when next read will see eofchar.
*
@@ -6058,7 +6077,7 @@ DoReadChars(
ResetFlag(statePtr, CHANNEL_BLOCKED|CHANNEL_EOF);
statePtr->inputEncodingFlags &= ~TCL_ENCODING_END;
for (copied = 0; (unsigned) toRead > 0; ) {
copiedNow = -1;
copiedNow = TCL_INDEX_NONE;
if (statePtr->inQueueHead != NULL) {
if (binaryMode) {
copiedNow = ReadBytes(statePtr, objPtr, toRead);
@@ -6098,7 +6117,7 @@ DoReadChars(
}
if (result != 0) {
if (!GotFlag(statePtr, CHANNEL_BLOCKED)) {
copied = -1;
copied = TCL_INDEX_NONE;
}
break;
}
@@ -6136,6 +6155,7 @@ DoReadChars(
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
@@ -6159,7 +6179,7 @@ DoReadChars(
*
* Results:
* The return value is the number of bytes appended to the object, or
* -1 to indicate that zero bytes were read due to an EOF.
* TCL_INDEX_NONE to indicate that zero bytes were read due to an EOF.
*
* Side effects:
* The storage of bytes in objPtr can cause (re-)allocation of memory.
@@ -6228,7 +6248,7 @@ ReadChars(
* allocated to hold data, not how many bytes
* of data have been stored in the object. */
int charsToRead, /* Maximum number of characters to store, or
* -1 to get all available characters.
* TCL_INDEX_NONE to get all available characters.
* Characters are obtained from the first
* buffer in the queue -- even if this number
* is larger than the number of characters
@@ -6344,6 +6364,11 @@ ReadChars(
flags, &statePtr->inputEncodingState,
dst, dstLimit, &srcRead, &dstDecoded, &numChars);
if (code == TCL_CONVERT_UNKNOWN || code == TCL_CONVERT_SYNTAX) {
SetFlag(statePtr, CHANNEL_ENCODING_ERROR);
code = TCL_OK;
}
/*
* Perform the translation transformation in place. Read no more than
* the dstDecoded bytes the encoding transformation actually produced.
@@ -6371,12 +6396,12 @@ ReadChars(
* the stopping, but the value of dstRead does not include it.
*
* Also rather bizarre, our caller can only notice an EOF
* condition if we return the value -1 as the number of chars
* condition if we return the value TCL_INDEX_NONE as the number of chars
* read. This forces us to perform a 2-call dance where the
* first call can read all the chars up to the eof char, and
* the second call is solely for consuming the encoded eof
* char then pointed at by src so that we can return that
* magic -1 value. This seems really wasteful, especially
* magic TCL_INDEX_NONE value. This seems really wasteful, especially
* since the first decoding pass of each call is likely to
* decode many bytes beyond that eof char that's all we care
* about.
@@ -6391,7 +6416,7 @@ ReadChars(
*/
Tcl_SetObjLength(objPtr, numBytes);
return -1;
return TCL_INDEX_NONE;
}
{
@@ -6566,7 +6591,7 @@ ReadChars(
SetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
}
Tcl_SetObjLength(objPtr, numBytes);
return -1;
return TCL_INDEX_NONE;
}
/*
@@ -7563,7 +7588,7 @@ Tcl_Eof(
ChannelState *statePtr = ((Channel *) chan)->state;
/* State of real channel structure. */
return GotFlag(statePtr, CHANNEL_EOF) ? 1 : 0;
return (GotFlag(statePtr, CHANNEL_EOF) && !GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) ? 1 : 0;
}
/*
@@ -7837,17 +7862,17 @@ Tcl_BadChannelOption(
{
if (interp != NULL) {
const char *genericopt =
"blocking buffering buffersize encoding eofchar translation";
"blocking buffering buffersize encoding eofchar nocomplainencoding strictencoding translation";
const char **argv;
int argc, i;
Tcl_DString ds;
Tcl_Obj *errObj;
Tcl_DStringInit(&ds);
Tcl_DStringAppend(&ds, genericopt, -1);
Tcl_DStringAppend(&ds, genericopt, TCL_INDEX_NONE);
if (optionList && (*optionList)) {
TclDStringAppendLiteral(&ds, " ");
Tcl_DStringAppend(&ds, optionList, -1);
Tcl_DStringAppend(&ds, optionList, TCL_INDEX_NONE);
}
if (Tcl_SplitList(interp, Tcl_DStringValue(&ds),
&argc, &argv) != TCL_OK) {
@@ -8156,7 +8181,7 @@ Tcl_SetChannelOption(
/* State info for channel */
size_t len; /* Length of optionName string. */
int argc;
const char **argv;
const char **argv = NULL;
/*
* If the channel is in the middle of a background copy, fail.
@@ -8166,7 +8191,7 @@ Tcl_SetChannelOption(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"unable to set channel options: background copy in"
" progress", -1));
" progress", TCL_INDEX_NONE));
}
return TCL_ERROR;
}
@@ -8217,7 +8242,7 @@ Tcl_SetChannelOption(
} else if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -buffering: must be one of"
" full, line, or none", -1));
" full, line, or none", TCL_INDEX_NONE));
return TCL_ERROR;
}
return TCL_OK;
@@ -8258,26 +8283,29 @@ Tcl_SetChannelOption(
statePtr->inputEncodingFlags = TCL_ENCODING_START;
statePtr->outputEncodingState = NULL;
statePtr->outputEncodingFlags = TCL_ENCODING_START;
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA);
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
UpdateInterest(chanPtr);
return TCL_OK;
} else if (HaveOpt(2, "-eofchar")) {
if (Tcl_SplitList(interp, newValue, &argc, &argv) == TCL_ERROR) {
if (!newValue[0] || (!(newValue[0] & 0x80) && !newValue[1])) {
if (GotFlag(statePtr, TCL_READABLE)) {
statePtr->inEofChar = newValue[0];
}
statePtr->outEofChar = 0;
} else if (Tcl_SplitList(interp, newValue, &argc, &argv) == TCL_ERROR) {
return TCL_ERROR;
}
if (argc == 0) {
} else if (argc == 0) {
statePtr->inEofChar = 0;
statePtr->outEofChar = 0;
} else if (argc == 1 || argc == 2) {
int outIndex = (argc - 1);
int inValue = (int) argv[0][0];
int outValue = (int) argv[outIndex][0];
int outValue = (argc == 2) ? (int) argv[1][0] : 0;
if (inValue & 0x80 || outValue & 0x80) {
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -eofchar: must be non-NUL ASCII"
" character", -1));
" character", TCL_INDEX_NONE));
}
ckfree(argv);
return TCL_ERROR;
@@ -8292,7 +8320,7 @@ Tcl_SetChannelOption(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -eofchar: should be a list of zero,"
" one, or two elements", -1));
" one, or two elements", TCL_INDEX_NONE));
}
ckfree(argv);
return TCL_ERROR;
@@ -8336,6 +8364,7 @@ Tcl_SetChannelOption(
}
#endif
}
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
return TCL_OK;
} else if (HaveOpt(1, "-strictencoding")) {
int newMode;
@@ -8349,6 +8378,7 @@ Tcl_SetChannelOption(
} else {
ResetFlag(statePtr, CHANNEL_ENCODING_STRICT);
}
ResetFlag(statePtr, CHANNEL_NEED_MORE_DATA|CHANNEL_ENCODING_ERROR);
return TCL_OK;
} else if (HaveOpt(1, "-translation")) {
const char *readMode, *writeMode;
@@ -8367,7 +8397,7 @@ Tcl_SetChannelOption(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -translation: must be a one or two"
" element list", -1));
" element list", TCL_INDEX_NONE));
}
ckfree(argv);
return TCL_ERROR;
@@ -8397,7 +8427,7 @@ Tcl_SetChannelOption(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -translation: must be one of "
"auto, binary, cr, lf, crlf, or platform", -1));
"auto, binary, cr, lf, crlf, or platform", TCL_INDEX_NONE));
}
ckfree(argv);
return TCL_ERROR;
@@ -8447,7 +8477,7 @@ Tcl_SetChannelOption(
if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -translation: must be one of "
"auto, binary, cr, lf, crlf, or platform", -1));
"auto, binary, cr, lf, crlf, or platform", TCL_INDEX_NONE));
}
ckfree(argv);
return TCL_ERROR;
@@ -9442,7 +9472,9 @@ TclCopyChannel(
moveBytes = inStatePtr->inEofChar == '\0' /* No eofChar to stop input */
&& inStatePtr->inputTranslation == TCL_TRANSLATE_LF
&& outStatePtr->outputTranslation == TCL_TRANSLATE_LF
&& inStatePtr->encoding == outStatePtr->encoding;
&& inStatePtr->encoding == outStatePtr->encoding
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
/*
* Allocate a new CopyState to maintain info about the current copy in
@@ -9769,7 +9801,9 @@ CopyData(
inBinary = (inStatePtr->encoding == NULL);
outBinary = (outStatePtr->encoding == NULL);
sameEncoding = (inStatePtr->encoding == outStatePtr->encoding);
sameEncoding = inStatePtr->encoding == outStatePtr->encoding
&& (inStatePtr->flags & TCL_ENCODING_STRICT) != TCL_ENCODING_STRICT
&& outStatePtr->flags & TCL_ENCODING_NOCOMPLAIN;
if (!(inBinary || sameEncoding)) {
TclNewObj(bufObj);
@@ -10052,7 +10086,7 @@ CopyData(
*
* Results:
* The number of bytes actually stored (<= bytesToRead),
* or -1 if there is an error in reading the channel. Use
* or TCL_INDEX_NONE if there is an error in reading the channel. Use
* Tcl_GetErrno() to retrieve the error code for the error
* that occurred.
*
@@ -10061,7 +10095,7 @@ CopyData(
* - EOF is reached on the channel; or
* - the channel is non-blocking, and we've read all we can
* without blocking.
* - a channel reading error occurs (and we return -1)
* - a channel reading error occurs (and we return TCL_INDEX_NONE)
*
* Side effects:
* May cause input to be buffered.
@@ -10093,6 +10127,11 @@ DoRead(
* too. Keep on keeping on for now.
*/
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
UpdateInterest(chanPtr);
Tcl_SetErrno(EILSEQ);
return -1;
}
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
SetFlag(statePtr, CHANNEL_EOF);
assert(statePtr->inputEncodingFlags & TCL_ENCODING_END);
@@ -10160,7 +10199,7 @@ DoRead(
UpdateInterest(chanPtr);
TclChannelRelease((Tcl_Channel)chanPtr);
return -1;
return TCL_INDEX_NONE;
}
assert(IsBufferFull(bufPtr));
@@ -10190,10 +10229,10 @@ DoRead(
}
/*
* 1) We're @EOF because we saw eof char.
* 1) We're @EOF because we saw eof char, or there was an encoding error.
*/
if (GotFlag(statePtr, CHANNEL_STICKY_EOF)) {
if (GotFlag(statePtr, CHANNEL_STICKY_EOF|CHANNEL_ENCODING_ERROR)) {
break;
}
@@ -10278,6 +10317,7 @@ DoRead(
assert(!GotFlag(statePtr, CHANNEL_EOF)
|| GotFlag(statePtr, CHANNEL_STICKY_EOF)
|| GotFlag(statePtr, CHANNEL_ENCODING_ERROR)
|| Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0);
assert(!(GotFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED)
== (CHANNEL_EOF|CHANNEL_BLOCKED)));
@@ -10568,7 +10608,7 @@ Tcl_GetChannelNamesEx(
&& (pattern[2] == 'd'))) {
if ((Tcl_FindHashEntry(hTblPtr, pattern) != NULL)
&& (Tcl_ListObjAppendElement(interp, resultPtr,
Tcl_NewStringObj(pattern, -1)) != TCL_OK)) {
Tcl_NewStringObj(pattern, TCL_INDEX_NONE)) != TCL_OK)) {
goto error;
}
goto done;
@@ -10595,7 +10635,7 @@ Tcl_GetChannelNamesEx(
if (((pattern == NULL) || Tcl_StringMatch(name, pattern)) &&
(Tcl_ListObjAppendElement(interp, resultPtr,
Tcl_NewStringObj(name, -1)) != TCL_OK)) {
Tcl_NewStringObj(name, TCL_INDEX_NONE)) != TCL_OK)) {
error:
TclDecrRefCount(resultPtr);
return TCL_ERROR;
@@ -11551,8 +11591,8 @@ DumpFlags(
char *str,
int flags)
{
char buf[20];
int i = 0;
char buf[24];
#define ChanFlag(chr, bit) (buf[i++] = ((flags & (bit)) ? (chr) : '_'))
@@ -11565,6 +11605,7 @@ DumpFlags(
ChanFlag('c', CHANNEL_CLOSED);
ChanFlag('E', CHANNEL_EOF);
ChanFlag('S', CHANNEL_STICKY_EOF);
ChanFlag('U', CHANNEL_ENCODING_ERROR);
ChanFlag('B', CHANNEL_BLOCKED);
ChanFlag('/', INPUT_SAW_CR);
ChanFlag('D', CHANNEL_DEAD);
+11 -8
View File
@@ -36,12 +36,12 @@
*/
typedef struct ChannelBuffer {
int refCount; /* Current uses count */
int nextAdded; /* The next position into which a character
Tcl_Size refCount; /* Current uses count */
Tcl_Size nextAdded; /* The next position into which a character
* will be put in the buffer. */
int nextRemoved; /* Position of next byte to be removed from
Tcl_Size nextRemoved; /* Position of next byte to be removed from
* the buffer. */
int bufLength; /* How big is the buffer? */
Tcl_Size bufLength; /* How big is the buffer? */
struct ChannelBuffer *nextPtr;
/* Next buffer in chain. */
char buf[TCLFLEXARRAY]; /* Placeholder for real buffer. The real
@@ -113,7 +113,7 @@ typedef struct Channel {
ChannelBuffer *inQueueHead; /* Points at first buffer in input queue. */
ChannelBuffer *inQueueTail; /* Points at last buffer in input queue. */
int refCount;
Tcl_Size refCount;
} Channel;
/*
@@ -163,7 +163,7 @@ typedef struct ChannelState {
int unreportedError; /* Non-zero if an error report was deferred
* because it happened in the background. The
* value is the POSIX error code. */
int refCount; /* How many interpreters hold references to
Tcl_Size refCount; /* How many interpreters hold references to
* this IO channel? */
struct CloseCallback *closeCbPtr;
/* Callbacks registered to be called when the
@@ -186,7 +186,7 @@ typedef struct ChannelState {
EventScriptRecord *scriptRecordPtr;
/* Chain of all scripts registered for event
* handlers ("fileevent") on this channel. */
int bufSize; /* What size buffers to allocate? */
Tcl_Size bufSize; /* What size buffers to allocate? */
Tcl_TimerToken timer; /* Handle to wakeup timer for this channel. */
struct CopyState *csPtrR; /* State of background copy for which channel
* is input, or NULL. */
@@ -271,10 +271,12 @@ typedef struct ChannelState {
* delivered for buffered data until
* the state of the channel
* changes. */
#define CHANNEL_ENCODING_ERROR (1<<15) /* set if channel
* encountered an encoding error */
#define CHANNEL_RAW_MODE (1<<16) /* When set, notes that the Raw API is
* being used. */
#define CHANNEL_ENCODING_NOCOMPLAIN (1<<17) /* set if option
* -nocomplaincoding is set to 1 */
* -nocomplainencoding is set to 1 */
#define CHANNEL_ENCODING_STRICT (1<<18) /* set if option
* -strictencoding is set to 1 */
#define CHANNEL_INCLOSE (1<<19) /* Channel is currently being closed.
@@ -282,6 +284,7 @@ typedef struct ChannelState {
* usable, but it may not be closed
* again from within the close
* handler. */
#define ENCODING_FAILINDEX (1<<20) /* Internal flag, fail on Invalid bytes only */
#define CHANNEL_CLOSEDWRITE (1<<21) /* Channel write side has been closed.
* No further Tcl-level write IO on
* the channel is allowed. */
+53 -43
View File
@@ -15,7 +15,7 @@
* Callback structure for accept callback in a TCP server.
*/
typedef struct AcceptCallback {
typedef struct {
Tcl_Obj *script; /* Script to invoke. */
Tcl_Interp *interp; /* Interpreter in which to run it. */
} AcceptCallback;
@@ -44,7 +44,7 @@ static void RegisterTcpServerInterpCleanup(
Tcl_Interp *interp,
AcceptCallback *acceptCallbackPtr);
static Tcl_InterpDeleteProc TcpAcceptCallbacksDeleteProc;
static void TcpServerCloseProc(ClientData callbackData);
static void TcpServerCloseProc(void *callbackData);
static void UnregisterTcpServerInterpCleanupProc(
Tcl_Interp *interp,
AcceptCallback *acceptCallbackPtr);
@@ -67,7 +67,7 @@ static void UnregisterTcpServerInterpCleanupProc(
static void
FinalizeIOCmdTSD(
TCL_UNUSED(ClientData))
TCL_UNUSED(void *))
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -97,7 +97,7 @@ FinalizeIOCmdTSD(
int
Tcl_PutsObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -223,7 +223,7 @@ Tcl_PutsObjCmd(
int
Tcl_FlushObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -287,7 +287,7 @@ Tcl_FlushObjCmd(
int
Tcl_GetsObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -335,7 +335,7 @@ Tcl_GetsObjCmd(
code = TCL_ERROR;
goto done;
}
lineLen = -1;
lineLen = TCL_INDEX_NONE;
}
if (objc == 3) {
if (Tcl_ObjSetVar2(interp, objv[2], NULL, linePtr,
@@ -371,7 +371,7 @@ Tcl_GetsObjCmd(
int
Tcl_ReadObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -514,7 +514,7 @@ Tcl_ReadObjCmd(
int
Tcl_SeekObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -589,7 +589,7 @@ Tcl_SeekObjCmd(
int
Tcl_TellObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -651,7 +651,7 @@ Tcl_TellObjCmd(
int
Tcl_CloseObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -759,7 +759,7 @@ Tcl_CloseObjCmd(
int
Tcl_FconfigureObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -834,7 +834,7 @@ Tcl_FconfigureObjCmd(
int
Tcl_EofObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -873,7 +873,7 @@ Tcl_EofObjCmd(
int
Tcl_ExecObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -883,8 +883,8 @@ Tcl_ExecObjCmd(
* on the _Tcl_ stack. */
const char *string;
Tcl_Channel chan;
int argc, background, i, index, keepNewline, result, skip, length;
int ignoreStderr;
int argc, background, i, index, keepNewline, result, skip, ignoreStderr;
int length;
static const char *const options[] = {
"-ignorestderr", "-keepnewline", "--", NULL
};
@@ -1040,7 +1040,7 @@ Tcl_ExecObjCmd(
int
Tcl_FblockedObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1086,7 +1086,7 @@ Tcl_FblockedObjCmd(
int
Tcl_OpenObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1144,7 +1144,8 @@ Tcl_OpenObjCmd(
if (!pipeline) {
chan = Tcl_FSOpenFileChannel(interp, objv[1], modeString, prot);
} else {
int mode, seekFlag, cmdObjc, binary;
int mode, seekFlag, binary;
int cmdObjc;
const char **cmdArgv;
if (Tcl_SplitList(interp, what+1, &cmdObjc, &cmdArgv) != TCL_OK) {
@@ -1209,7 +1210,7 @@ Tcl_OpenObjCmd(
static void
TcpAcceptCallbacksDeleteProc(
ClientData clientData, /* Data which was passed when the assocdata
void *clientData, /* Data which was passed when the assocdata
* was registered. */
TCL_UNUSED(Tcl_Interp *))
{
@@ -1337,7 +1338,7 @@ UnregisterTcpServerInterpCleanupProc(
static void
AcceptCallbackProc(
ClientData callbackData, /* The data stored when the callback was
void *callbackData, /* The data stored when the callback was
* created in the call to
* Tcl_OpenTcpServer. */
Tcl_Channel chan, /* Channel for the newly accepted
@@ -1428,7 +1429,7 @@ AcceptCallbackProc(
static void
TcpServerCloseProc(
ClientData callbackData) /* The data passed in the call to
void *callbackData) /* The data passed in the call to
* Tcl_CreateCloseHandler. */
{
AcceptCallback *acceptCallbackPtr = (AcceptCallback *)callbackData;
@@ -1461,29 +1462,27 @@ TcpServerCloseProc(
int
Tcl_SocketObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
static const char *const socketOptions[] = {
"-async", "-myaddr", "-myport", "-reuseaddr", "-reuseport", "-server",
NULL
"-async", "-backlog", "-myaddr", "-myport", "-reuseaddr",
"-reuseport", "-server", NULL
};
enum socketOptionsEnum {
SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR, SKT_REUSEPORT,
SKT_SERVER
SKT_ASYNC, SKT_BACKLOG, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR,
SKT_REUSEPORT, SKT_SERVER
};
int optionIndex, a, server = 0, myport = 0, async = 0, reusep = -1,
reusea = -1;
reusea = -1, backlog = -1;
unsigned int flags = 0;
const char *host, *port, *myaddr = NULL;
Tcl_Obj *script = NULL;
Tcl_Channel chan;
if (TclpHasSockets(interp) != TCL_OK) {
return TCL_ERROR;
}
TclInitSockets();
for (a = 1; a < objc; a++) {
const char *arg = Tcl_GetString(objv[a]);
@@ -1565,6 +1564,17 @@ Tcl_SocketObjCmd(
return TCL_ERROR;
}
break;
case SKT_BACKLOG:
a++;
if (a >= objc) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"no argument given for -backlog option", -1));
return TCL_ERROR;
}
if (Tcl_GetIntFromObj(interp, objv[a], &backlog) != TCL_OK) {
return TCL_ERROR;
}
break;
default:
Tcl_Panic("Tcl_SocketObjCmd: bad option index to SocketOptions");
}
@@ -1585,18 +1595,18 @@ Tcl_SocketObjCmd(
wrongNumArgs:
iPtr = (Interp *) interp;
Tcl_WrongNumArgs(interp, 1, objv,
"?-myaddr addr? ?-myport myport? ?-async? host port");
"?-async? ?-myaddr addr? ?-myport myport? host port");
iPtr->flags |= INTERP_ALTERNATE_WRONG_ARGS;
Tcl_WrongNumArgs(interp, 1, objv,
"-server command ?-reuseaddr boolean? ?-reuseport boolean? "
"?-myaddr addr? port");
"-server command ?-backlog count? ?-myaddr addr? "
"?-reuseaddr boolean? ?-reuseport boolean? port");
return TCL_ERROR;
}
if (!server && (reusea != -1 || reusep != -1)) {
if (!server && (reusea != -1 || reusep != -1 || backlog != -1)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"options -reuseaddr and -reuseport are only valid for servers",
-1));
"options -backlog, -reuseaddr, and -reuseport are only valid "
"for servers", -1));
return TCL_ERROR;
}
@@ -1641,7 +1651,7 @@ Tcl_SocketObjCmd(
acceptCallbackPtr->script = script;
acceptCallbackPtr->interp = interp;
chan = Tcl_OpenTcpServerEx(interp, port, host, flags,
chan = Tcl_OpenTcpServerEx(interp, port, host, flags, backlog,
AcceptCallbackProc, acceptCallbackPtr);
if (chan == NULL) {
Tcl_DecrRefCount(script);
@@ -1703,7 +1713,7 @@ Tcl_SocketObjCmd(
int
Tcl_FcopyObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1798,7 +1808,7 @@ Tcl_FcopyObjCmd(
static int
ChanPendingObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1860,7 +1870,7 @@ ChanPendingObjCmd(
static int
ChanTruncateObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1933,7 +1943,7 @@ ChanTruncateObjCmd(
static int
ChanPipeObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -1984,7 +1994,7 @@ ChanPipeObjCmd(
int
TclChannelNamesCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
+2 -2
View File
@@ -318,8 +318,8 @@ Tcl_OpenTcpServer(
char portbuf[TCL_INTEGER_SPACE];
TclFormatInt(portbuf, port);
return Tcl_OpenTcpServerEx(interp, portbuf, host, TCL_TCPSERVER_REUSEADDR,
acceptProc, callbackData);
return Tcl_OpenTcpServerEx(interp, portbuf, host, -1,
TCL_TCPSERVER_REUSEADDR, acceptProc, callbackData);
}
/*
+2 -2
View File
@@ -321,7 +321,7 @@ declare 131 {
Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc,
Tcl_ResolveCompiledVarProc *compiledVarProc)
}
declare 132 {
declare 132 {deprecated {}} {
int TclpHasSockets(Tcl_Interp *interp)
}
declare 133 {deprecated {}} {
@@ -701,7 +701,7 @@ declare 258 {
# TIP 625: for unit testing - create list objects with span
declare 260 {
Tcl_Obj *TclListTestObj(int length, int leadingSpace, int endSpace)
Tcl_Obj *TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace)
}
# TIP 625: for unit testing - check list invariants
+116 -86
View File
@@ -184,7 +184,7 @@ typedef struct Tcl_ResolvedVarInfo {
} Tcl_ResolvedVarInfo;
typedef int (Tcl_ResolveCompiledVarProc)(Tcl_Interp *interp,
const char *name, int length, Tcl_Namespace *context,
const char *name, Tcl_Size length, Tcl_Namespace *context,
Tcl_ResolvedVarInfo **rPtr);
typedef int (Tcl_ResolveVarProc)(Tcl_Interp *interp, const char *name,
@@ -290,15 +290,15 @@ typedef struct Namespace {
* NULL, there are no children. */
#endif
unsigned long nsId; /* Unique id for the namespace. */
Tcl_Interp *interp; /* The interpreter containing this
Tcl_Interp *interp; /* The interpreter containing this
* namespace. */
int flags; /* OR-ed combination of the namespace status
* flags NS_DYING and NS_DEAD listed below. */
int activationCount; /* Number of "activations" or active call
Tcl_Size activationCount; /* Number of "activations" or active call
* frames for this namespace that are on the
* Tcl call stack. The namespace won't be
* freed until activationCount becomes zero. */
int refCount; /* Count of references by namespaceName
Tcl_Size refCount; /* Count of references by namespaceName
* objects. The namespace can't be freed until
* refCount becomes zero. */
Tcl_HashTable cmdTable; /* Contains all the commands currently
@@ -319,16 +319,16 @@ typedef struct Namespace {
* commands; however, no namespace qualifiers
* are allowed. NULL if no export patterns are
* registered. */
int numExportPatterns; /* Number of export patterns currently
Tcl_Size numExportPatterns; /* Number of export patterns currently
* registered using "namespace export". */
int maxExportPatterns; /* Mumber of export patterns for which space
Tcl_Size maxExportPatterns; /* Number of export patterns for which space
* is currently allocated. */
int cmdRefEpoch; /* Incremented if a newly added command
Tcl_Size cmdRefEpoch; /* Incremented if a newly added command
* shadows a command for which this namespace
* has already cached a Command* pointer; this
* causes all its cached Command* pointers to
* be invalidated. */
int resolverEpoch; /* Incremented whenever (a) the name
Tcl_Size resolverEpoch; /* Incremented whenever (a) the name
* resolution rules change for this namespace
* or (b) a newly added command shadows a
* command that is compiled to bytecodes. This
@@ -355,7 +355,7 @@ typedef struct Namespace {
* LookupCompiledLocal to resolve variable
* references within the namespace at compile
* time. */
int exportLookupEpoch; /* Incremented whenever a command is added to
Tcl_Size exportLookupEpoch; /* Incremented whenever a command is added to
* a namespace, removed from a namespace or
* the exports of a namespace are changed.
* Allows TIP#112-driven command lists to be
@@ -366,7 +366,7 @@ typedef struct Namespace {
Tcl_Obj *unknownHandlerPtr; /* A script fragment to be used when command
* resolution in this namespace fails. TIP
* 181. */
int commandPathLength; /* The length of the explicit path. */
Tcl_Size commandPathLength; /* The length of the explicit path. */
NamespacePathEntry *commandPathArray;
/* The explicit path of the namespace as an
* array. */
@@ -455,7 +455,7 @@ typedef struct EnsembleConfig {
* if the command has been deleted (or never
* existed; the global namespace never has an
* ensemble command.) */
int epoch; /* The epoch at which this ensemble's table of
Tcl_Size epoch; /* The epoch at which this ensemble's table of
* exported commands is valid. */
char **subcommandArrayPtr; /* Array of ensemble subcommand names. At all
* consistent points, this will have the same
@@ -512,7 +512,7 @@ typedef struct EnsembleConfig {
* core, presumably because the ensemble
* itself has been updated. */
Tcl_Obj *parameterList; /* List of ensemble parameter names. */
int numParameters; /* Cached number of parameters. This is either
Tcl_Size numParameters; /* Cached number of parameters. This is either
* 0 (if the parameterList field is NULL) or
* the length of the list in the parameterList
* field. */
@@ -568,7 +568,7 @@ typedef struct CommandTrace {
struct CommandTrace *nextPtr;
/* Next in list of traces associated with a
* particular command. */
int refCount; /* Used to ensure this structure is not
Tcl_Size refCount; /* Used to ensure this structure is not
* deleted too early. Keeps track of how many
* pieces of code have a pointer to this
* structure. */
@@ -641,7 +641,7 @@ typedef struct Var {
typedef struct VarInHash {
Var var;
int refCount; /* Counts number of active uses of this
Tcl_Size refCount; /* Counts number of active uses of this
* variable: 1 for the entry in the hash
* table, 1 for each additional variable whose
* linkPtr points here, 1 for each nested
@@ -946,9 +946,9 @@ typedef struct CompiledLocal {
/* Next compiler-recognized local variable for
* this procedure, or NULL if this is the last
* local. */
int nameLength; /* The number of bytes in local variable's name.
Tcl_Size nameLength; /* The number of bytes in local variable's name.
* Among others used to speed up var lookups. */
int frameIndex; /* Index in the array of compiler-assigned
Tcl_Size frameIndex; /* Index in the array of compiler-assigned
* variables in the procedure call frame. */
int flags; /* Flag bits for the local variable. Same as
* the flags for the Var structure above,
@@ -980,7 +980,7 @@ typedef struct CompiledLocal {
typedef struct Proc {
struct Interp *iPtr; /* Interpreter for which this command is
* defined. */
int refCount; /* Reference count: 1 if still present in
Tcl_Size refCount; /* Reference count: 1 if still present in
* command table plus 1 for each call to the
* procedure that is currently active. This
* structure can be freed when refCount
@@ -991,8 +991,8 @@ typedef struct Proc {
* procedure. */
Tcl_Obj *bodyPtr; /* Points to the ByteCode object for
* procedure's body command. */
int numArgs; /* Number of formal parameters. */
int numCompiledLocals; /* Count of local variables recognized by the
Tcl_Size numArgs; /* Number of formal parameters. */
Tcl_Size numCompiledLocals; /* Count of local variables recognized by the
* compiler including arguments and
* temporaries. */
CompiledLocal *firstLocalPtr;
@@ -1019,7 +1019,7 @@ typedef void (ProcErrorProc)(Tcl_Interp *interp, Tcl_Obj *procNameObj);
*/
typedef struct Trace {
int level; /* Only trace commands at nesting level less
Tcl_Size level; /* Only trace commands at nesting level less
* than or equal to this. */
Tcl_CmdObjTraceProc *proc; /* Procedure to call to trace command. */
void *clientData; /* Arbitrary value to pass to proc. */
@@ -1097,8 +1097,8 @@ typedef struct AssocData {
*/
typedef struct LocalCache {
int refCount;
int numVars;
Tcl_Size refCount;
Tcl_Size numVars;
Tcl_Obj *varName0;
} LocalCache;
@@ -1118,7 +1118,7 @@ typedef struct CallFrame {
* If FRAME_IS_PROC is set, the frame was
* pushed to execute a Tcl procedure and may
* have local vars. */
int objc; /* This and objv below describe the arguments
Tcl_Size objc; /* This and objv below describe the arguments
* for this procedure call. */
Tcl_Obj *const *objv; /* Array of argument objects. */
struct CallFrame *callerPtr;
@@ -1132,7 +1132,7 @@ typedef struct CallFrame {
* callerPtr unless an "uplevel" command or
* something equivalent was active in the
* caller). */
int level; /* Level of this procedure, for "uplevel"
Tcl_Size level; /* Level of this procedure, for "uplevel"
* purposes (i.e. corresponds to nesting of
* callerVarPtr's, not callerPtr's). 1 for
* outermost procedure, 0 for top-level. */
@@ -1146,8 +1146,8 @@ typedef struct CallFrame {
* recognized by the compiler, or created at
* execution time through, e.g., upvar.
* Initially NULL and created if needed. */
int numCompiledLocals; /* Count of local variables recognized by the
* compiler including arguments. */
Tcl_Size numCompiledLocals; /* Count of local variables recognized
* by the compiler including arguments. */
Var *compiledLocals; /* Points to the array of local variables
* recognized by the compiler. The compiler
* emits code that refers to these variables
@@ -1208,7 +1208,7 @@ typedef struct CmdFrame {
int level; /* Number of frames in stack, prevent O(n)
* scan of list. */
int *line; /* Lines the words of the command start on. */
int nline;
Tcl_Size nline;
CallFrame *framePtr; /* Procedure activation record, may be
* NULL. */
struct CmdFrame *nextPtr; /* Link to calling frame. */
@@ -1252,7 +1252,7 @@ typedef struct CmdFrame {
} data;
Tcl_Obj *cmdObj;
const char *cmd; /* The executed command, if possible... */
int len; /* ... and its length. */
Tcl_Size len; /* ... and its length. */
const struct CFWordBC *litarg;
/* Link to set of literal arguments which have
* ben pushed on the lineLABCPtr stack by
@@ -1262,16 +1262,16 @@ typedef struct CmdFrame {
typedef struct CFWord {
CmdFrame *framePtr; /* CmdFrame to access. */
int word; /* Index of the word in the command. */
int refCount; /* Number of times the word is on the
Tcl_Size word; /* Index of the word in the command. */
Tcl_Size refCount; /* Number of times the word is on the
* stack. */
} CFWord;
typedef struct CFWordBC {
CmdFrame *framePtr; /* CmdFrame to access. */
int pc; /* Instruction pointer of a command in
Tcl_Size pc; /* Instruction pointer of a command in
* ExtCmdLoc.loc[.] */
int word; /* Index of word in
Tcl_Size word; /* Index of word in
* ExtCmdLoc.loc[cmd]->line[.] */
struct CFWordBC *prevPtr; /* Previous entry in stack for same Tcl_Obj. */
struct CFWordBC *nextPtr; /* Next entry for same command call. See
@@ -1300,7 +1300,7 @@ typedef struct CFWordBC {
#define CLL_END (-1)
typedef struct ContLineLoc {
int num; /* Number of entries in loc, not counting the
Tcl_Size num; /* Number of entries in loc, not counting the
* final -1 marker entry. */
int loc[TCLFLEXARRAY];/* Table of locations, as character offsets.
* The table is allocated as part of the
@@ -1350,7 +1350,7 @@ typedef struct {
* proc field is NULL. */
} ExtraFrameInfoField;
typedef struct {
int length; /* Length of array. */
Tcl_Size length; /* Length of array. */
ExtraFrameInfoField fields[2];
/* Really as long as necessary, but this is
* long enough for nearly anything. */
@@ -1428,7 +1428,9 @@ struct CompileEnv;
* sake of old code only.
*/
#define TCL_OUT_LINE_COMPILE TCL_ERROR
#ifndef TCL_NO_DEPRECATED
# define TCL_OUT_LINE_COMPILE TCL_ERROR
#endif
typedef int (CompileProc)(Tcl_Interp *interp, Tcl_Parse *parsePtr,
struct Command *cmdPtr, struct CompileEnv *compEnvPtr);
@@ -1481,13 +1483,13 @@ typedef struct CoroutineData {
CorContext running;
Tcl_HashTable *lineLABCPtr; /* See Interp.lineLABCPtr */
void *stackLevel;
int auxNumLevels; /* While the coroutine is running the
Tcl_Size auxNumLevels; /* While the coroutine is running the
* numLevels of the create/resume command is
* stored here; for suspended coroutines it
* holds the nesting numLevels at yield. */
int nargs; /* Number of args required for resuming this
* coroutine; -2 means "0 or 1" (default), -1
* means "any" */
Tcl_Size nargs; /* Number of args required for resuming this
* coroutine; COROUTINE_ARGUMENTS_SINGLE_OPTIONAL means "0 or 1"
* (default), COROUTINE_ARGUMENTS_ARBITRARY means "any" */
Tcl_Obj *yieldPtr; /* The command to yield to. Stored here in
* order to reset splice point in
* TclNRCoroutineActivateCallback if the
@@ -1531,7 +1533,7 @@ typedef struct LiteralEntry {
* NULL if end of chain. */
Tcl_Obj *objPtr; /* Points to Tcl object that holds the
* literal's bytes and length. */
int refCount; /* If in an interpreter's global literal
Tcl_Size refCount; /* If in an interpreter's global literal
* table, the number of ByteCode structures
* that share the literal object; the literal
* entry can be freed when refCount drops to
@@ -1673,12 +1675,12 @@ typedef struct Command {
* recreated). */
Namespace *nsPtr; /* Points to the namespace containing this
* command. */
int refCount; /* 1 if in command hashtable plus 1 for each
Tcl_Size refCount; /* 1 if in command hashtable plus 1 for each
* reference from a CmdName Tcl object
* representing a command's name in a ByteCode
* instruction sequence. This structure can be
* freed when refCount becomes zero. */
int cmdEpoch; /* Incremented to invalidate any references
Tcl_Size cmdEpoch; /* Incremented to invalidate any references
* that point to this command when it is
* renamed, deleted, hidden, or exposed. */
CompileProc *compileProc; /* Procedure called to compile command. NULL
@@ -1730,7 +1732,9 @@ typedef struct Command {
*/
#define CMD_DYING 0x01
#define CMD_IS_DELETED 0x01 /* Same as CMD_DYING (Deprecated) */
#ifndef TCL_NO_DEPRECATED
# define CMD_IS_DELETED 0x01 /* Same as CMD_DYING */
#endif
#define CMD_TRACE_ACTIVE 0x02
#define CMD_HAS_EXEC_TRACES 0x04
#define CMD_COMPILES_EXPANDED 0x08
@@ -1869,18 +1873,17 @@ typedef struct Interp {
* contains one optimizer, which can be
* selectively overridden by extensions. */
} extra;
/*
* Information related to procedures and variables. See tclProc.c and
* tclVar.c for usage.
*/
int numLevels; /* Keeps track of how many nested calls to
Tcl_Size numLevels; /* Keeps track of how many nested calls to
* Tcl_Eval are in progress for this
* interpreter. It's used to delay deletion of
* the table until all Tcl_Eval invocations
* are completed. */
int maxNestingDepth; /* If numLevels exceeds this value then Tcl
Tcl_Size maxNestingDepth; /* If numLevels exceeds this value then Tcl
* assumes that infinite recursion has
* occurred and it generates an error. */
CallFrame *framePtr; /* Points to top-most in stack of all nested
@@ -1933,7 +1936,7 @@ typedef struct Interp {
* Miscellaneous information:
*/
int cmdCount; /* Total number of times a command procedure
Tcl_Size cmdCount; /* Total number of times a command procedure
* has been called for this interpreter. */
int evalFlags; /* Flags to control next call to Tcl_Eval.
* Normally zero, but may be set before
@@ -1945,7 +1948,7 @@ typedef struct Interp {
* compiled by the interpreter. Indexed by the
* string representations of literals. Used to
* avoid creating duplicate objects. */
int compileEpoch; /* Holds the current "compilation epoch" for
Tcl_Size compileEpoch; /* Holds the current "compilation epoch" for
* this interpreter. This is incremented to
* invalidate existing ByteCodes when, e.g., a
* command with a compile procedure is
@@ -1995,7 +1998,7 @@ typedef struct Interp {
/* First in list of active traces for interp,
* or NULL if no active traces. */
int tracesForbiddingInline; /* Count of traces (in the list headed by
Tcl_Size tracesForbiddingInline; /* Count of traces (in the list headed by
* tracePtr) that forbid inline bytecode
* compilation. */
@@ -2025,7 +2028,7 @@ typedef struct Interp {
* as flag values the same as the 'active'
* field. */
int cmdCount; /* Limit for how many commands to execute in
Tcl_Size cmdCount; /* Limit for how many commands to execute in
* the interpreter. */
LimitHandler *cmdHandlers;
/* Handlers to execute when the limit is
@@ -2061,9 +2064,9 @@ typedef struct Interp {
* *root* ensemble command? (Nested ensembles
* don't rewrite this.) NULL if we're not
* processing an ensemble. */
int numRemovedObjs; /* How many arguments have been stripped off
Tcl_Size numRemovedObjs; /* How many arguments have been stripped off
* because of ensemble processing. */
int numInsertedObjs; /* How many of the current arguments were
Tcl_Size numInsertedObjs; /* How many of the current arguments were
* inserted by an ensemble. */
} ensembleRewrite;
@@ -2392,7 +2395,7 @@ struct TclMaxAlignment {
*/
#define TclOOM(ptr, size) \
((size) && ((ptr)||(Tcl_Panic("unable to alloc %u bytes", (size)),1)))
((size) && ((ptr)||(Tcl_Panic("unable to alloc %" TCL_Z_MODIFIER "u bytes", (size_t)(size)),1)))
/*
* The following enum values are used to specify the runtime platform setting
@@ -2436,25 +2439,14 @@ typedef enum TclEolTranslation {
#define TCL_INVOKE_NO_UNKNOWN (1<<1)
#define TCL_INVOKE_NO_TRACEBACK (1<<2)
/*
* ListSizeT is the type for holding list element counts. It's defined
* simplify sharing source between Tcl8 and Tcl9.
*/
#if TCL_MAJOR_VERSION > 8
typedef size_t ListSizeT;
/*
* SSIZE_MAX, NOT SIZE_MAX as negative differences need to be expressed
* between values of the ListSizeT type so limit the range to signed
* between values of the Tcl_Size type so limit the range to signed
*/
#define ListSizeT_MAX ((ListSizeT)PTRDIFF_MAX)
# define ListSizeT_MAX ((Tcl_Size)PTRDIFF_MAX)
#else
typedef int ListSizeT;
#define ListSizeT_MAX INT_MAX
# define ListSizeT_MAX INT_MAX
#endif
/*
@@ -2483,9 +2475,9 @@ typedef int ListSizeT;
*
*/
typedef struct ListStore {
ListSizeT firstUsed; /* Index of first slot in use within slots[] */
ListSizeT numUsed; /* Number of slots in use (starting firstUsed) */
ListSizeT numAllocated; /* Total number of slots[] array slots. */
Tcl_Size firstUsed; /* Index of first slot in use within slots[] */
Tcl_Size numUsed; /* Number of slots in use (starting firstUsed) */
Tcl_Size numAllocated; /* Total number of slots[] array slots. */
size_t refCount; /* Number of references to this instance */
int flags; /* LISTSTORE_* flags */
Tcl_Obj *slots[TCLFLEXARRAY]; /* Variable size array. Grown as needed */
@@ -2497,7 +2489,7 @@ typedef struct ListStore {
/* Max number of elements that can be contained in a list */
#define LIST_MAX \
((ListSizeT)(((size_t)ListSizeT_MAX - offsetof(ListStore, slots)) \
((Tcl_Size)(((size_t)ListSizeT_MAX - offsetof(ListStore, slots)) \
/ sizeof(Tcl_Obj *)))
/* Memory size needed for a ListStore to hold numSlots_ elements */
#define LIST_SIZE(numSlots_) \
@@ -2508,8 +2500,8 @@ typedef struct ListStore {
* See comments above for ListStore
*/
typedef struct ListSpan {
ListSizeT spanStart; /* Starting index of the span */
ListSizeT spanLength; /* Number of elements in the span */
Tcl_Size spanStart; /* Starting index of the span */
Tcl_Size spanLength; /* Number of elements in the span */
size_t refCount; /* Count of references to this span record */
} ListSpan;
#ifndef LIST_SPAN_THRESHOLD /* May be set on build line */
@@ -2835,7 +2827,7 @@ typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, TCL_HASH_TYPE *len
*/
typedef struct ProcessGlobalValue {
int epoch; /* Epoch counter to detect changes in the
Tcl_Size epoch; /* Epoch counter to detect changes in the
* global value. */
TCL_HASH_TYPE numBytes; /* Length of the global string. */
char *value; /* The global string value. */
@@ -3009,7 +3001,7 @@ typedef struct ForIterData {
Tcl_Obj *body; /* Loop body. */
Tcl_Obj *next; /* Loop step script, NULL for 'while'. */
const char *msg; /* Error message part. */
int word; /* Index of the body script in the command */
Tcl_Size word; /* Index of the body script in the command */
} ForIterData;
/* TIP #357 - Structure doing the bookkeeping of handles for Tcl_LoadFile
@@ -3138,7 +3130,6 @@ MODULE_SCOPE char * TclDStringAppendObj(Tcl_DString *dsPtr,
Tcl_Obj *objPtr);
MODULE_SCOPE char * TclDStringAppendDString(Tcl_DString *dsPtr,
Tcl_DString *toAppendPtr);
MODULE_SCOPE Tcl_Obj * TclDStringToObj(Tcl_DString *dsPtr);
MODULE_SCOPE Tcl_Obj *const *TclFetchEnsembleRoot(Tcl_Interp *interp,
Tcl_Obj *const *objv, int objc, int *objcPtr);
MODULE_SCOPE Tcl_Obj *const *TclEnsembleGetRewriteValues(Tcl_Interp *interp);
@@ -3230,7 +3221,7 @@ MODULE_SCOPE int MakeTildeRelativePath(Tcl_Interp *interp, const char *user,
const char *subPath, Tcl_DString *dsPtr);
MODULE_SCOPE Tcl_Obj * TclGetHomeDirObj(Tcl_Interp *interp, const char *user);
MODULE_SCOPE Tcl_Obj * TclResolveTildePath(Tcl_Interp *interp,
Tcl_Obj *pathObj);
Tcl_Obj *pathObj);
MODULE_SCOPE Tcl_Obj * TclResolveTildePathList(Tcl_Obj *pathsObj);
MODULE_SCOPE int TclJoinThread(Tcl_ThreadId id, int *result);
MODULE_SCOPE void TclLimitRemoveAllHandlers(Tcl_Interp *interp);
@@ -3242,11 +3233,11 @@ MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n,
int *lines, Tcl_Obj *const *elems);
MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr);
MODULE_SCOPE Tcl_Obj * TclListObjRange(Tcl_Obj *listPtr, int fromIdx,
int toIdx);
MODULE_SCOPE int TclListObjAppendElements(Tcl_Interp *interp,
Tcl_Obj *toObj, int elemCount,
Tcl_Obj *const elemObjv[]);
MODULE_SCOPE Tcl_Obj * TclListObjRange(Tcl_Obj *listPtr, int fromIdx,
int toIdx);
MODULE_SCOPE Tcl_Obj * TclLsetList(Tcl_Interp *interp, Tcl_Obj *listPtr,
Tcl_Obj *indexPtr, Tcl_Obj *valuePtr);
MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
@@ -3255,7 +3246,6 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr,
MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name,
const EnsembleImplMap map[]);
MODULE_SCOPE int TclMakeSafe(Tcl_Interp *interp);
MODULE_SCOPE int TclMaxListLength(const char *bytes, int numBytes,
const char **endPtr);
MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc,
@@ -3305,6 +3295,11 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
MODULE_SCOPE void TclpFinalizeNotifier(void *clientData);
MODULE_SCOPE void TclpFinalizePipes(void);
MODULE_SCOPE void TclpFinalizeSockets(void);
#ifdef _WIN32
MODULE_SCOPE void TclInitSockets(void);
#else
#define TclInitSockets() /* do nothing */
#endif
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
struct addrinfo **addrlist,
const char *host, int port, int willBind,
@@ -4201,8 +4196,8 @@ MODULE_SCOPE int TclIndexEncode(Tcl_Interp *interp, Tcl_Obj *objPtr,
MODULE_SCOPE int TclIndexDecode(int encoded, int endValue);
/* Constants used in index value encoding routines. */
#define TCL_INDEX_END (-2)
#define TCL_INDEX_START (0)
#define TCL_INDEX_END ((Tcl_Size)-2)
#define TCL_INDEX_START ((Tcl_Size)0)
/*
*----------------------------------------------------------------------
@@ -4474,7 +4469,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
*
* The ANSI C "prototype" for this macro is:
*
* MODULE_SCOPE void TclInitStringRep(Tcl_Obj *objPtr, char *bytePtr, int len);
* MODULE_SCOPE void TclInitStringRep(Tcl_Obj *objPtr, char *bytePtr, size_t len);
*
*----------------------------------------------------------------
*/
@@ -4708,7 +4703,7 @@ MODULE_SCOPE const TclFileAttrProcs tclpFileAttrProcs[];
* of counting along a string of all one-byte characters. The ANSI C
* "prototype" for this macro is:
*
* MODULE_SCOPE void TclNumUtfChars(int numChars, const char *bytes,
* MODULE_SCOPE void TclNumUtfCharsM(int numChars, const char *bytes,
* int numBytes);
*----------------------------------------------------------------
*/
@@ -4858,6 +4853,26 @@ MODULE_SCOPE Tcl_LibraryInitProc Procbodytest_SafeInit;
TCL_DTRACE_OBJ_CREATE(objPtr); \
} while (0)
#define TclNewUIntObj(objPtr, uw) \
do { \
TclIncrObjsAllocated(); \
TclAllocObjStorage(objPtr); \
(objPtr)->refCount = 0; \
(objPtr)->bytes = NULL; \
Tcl_WideUInt uw_ = (uw); \
if (uw_ > WIDE_MAX) { \
mp_int bignumValue_; \
if (mp_init_u64(&bignumValue_, uw_) != MP_OKAY) { \
Tcl_Panic("%s: memory overflow", "TclNewUIntObj"); \
} \
TclSetBignumInternalRep((objPtr), &bignumValue_); \
} else { \
(objPtr)->internalRep.wideValue = (Tcl_WideInt)(uw_); \
(objPtr)->typePtr = &tclIntType; \
} \
TCL_DTRACE_OBJ_CREATE(objPtr); \
} while (0)
#define TclNewIndexObj(objPtr, w) \
TclNewIntObj(objPtr, w)
@@ -4886,6 +4901,21 @@ MODULE_SCOPE Tcl_LibraryInitProc Procbodytest_SafeInit;
#define TclNewIntObj(objPtr, w) \
(objPtr) = Tcl_NewWideIntObj(w)
#define TclNewUIntObj(objPtr, uw) \
do { \
Tcl_WideUInt uw_ = (uw); \
if (uw_ > WIDE_MAX) { \
mp_int bignumValue_; \
if (mp_init_u64(&bignumValue_, uw_) == MP_OKAY) { \
(objPtr) = Tcl_NewBignumObj(&bignumValue_); \
} else { \
(objPtr) = NULL; \
} \
} else { \
(objPtr) = Tcl_NewWideIntObj(uw_); \
} \
} while (0)
#define TclNewIndexObj(objPtr, w) \
TclNewIntObj(objPtr, w)
@@ -5186,8 +5216,8 @@ typedef struct NRE_callback {
* Other externals.
*/
MODULE_SCOPE size_t TclEnvEpoch; /* Epoch of the tcl environment
* (if changed with tcl-env). */
MODULE_SCOPE size_t TclEnvEpoch; /* Epoch of the tcl environment
* (if changed with tcl-env). */
#endif /* _TCLINT */
+6 -5
View File
@@ -354,7 +354,8 @@ EXTERN void Tcl_SetNamespaceResolvers(
Tcl_ResolveVarProc *varProc,
Tcl_ResolveCompiledVarProc *compiledVarProc);
/* 132 */
EXTERN int TclpHasSockets(Tcl_Interp *interp);
TCL_DEPRECATED("")
int TclpHasSockets(Tcl_Interp *interp);
/* 133 */
TCL_DEPRECATED("")
struct tm * TclpGetDate(const time_t *time, int useGMT);
@@ -659,8 +660,8 @@ EXTERN Tcl_Obj * TclpCreateTemporaryDirectory(Tcl_Obj *dirObj,
Tcl_Obj *basenameObj);
/* Slot 259 is reserved */
/* 260 */
EXTERN Tcl_Obj * TclListTestObj(int length, int leadingSpace,
int endSpace);
EXTERN Tcl_Obj * TclListTestObj(size_t length, size_t leadingSpace,
size_t endSpace);
/* 261 */
EXTERN void TclListObjValidate(Tcl_Interp *interp,
Tcl_Obj *listObj);
@@ -801,7 +802,7 @@ typedef struct TclIntStubs {
int (*tcl_PushCallFrame) (Tcl_Interp *interp, Tcl_CallFrame *framePtr, Tcl_Namespace *nsPtr, int isProcCallFrame); /* 129 */
int (*tcl_RemoveInterpResolvers) (Tcl_Interp *interp, const char *name); /* 130 */
void (*tcl_SetNamespaceResolvers) (Tcl_Namespace *namespacePtr, Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, Tcl_ResolveCompiledVarProc *compiledVarProc); /* 131 */
int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */
TCL_DEPRECATED_API("") int (*tclpHasSockets) (Tcl_Interp *interp); /* 132 */
TCL_DEPRECATED_API("") struct tm * (*tclpGetDate) (const time_t *time, int useGMT); /* 133 */
void (*reserved134)(void);
void (*reserved135)(void);
@@ -929,7 +930,7 @@ typedef struct TclIntStubs {
void (*tclStaticLibrary) (Tcl_Interp *interp, const char *prefix, Tcl_LibraryInitProc *initProc, Tcl_LibraryInitProc *safeInitProc); /* 257 */
Tcl_Obj * (*tclpCreateTemporaryDirectory) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj); /* 258 */
void (*reserved259)(void);
Tcl_Obj * (*tclListTestObj) (int length, int leadingSpace, int endSpace); /* 260 */
Tcl_Obj * (*tclListTestObj) (size_t length, size_t leadingSpace, size_t endSpace); /* 260 */
void (*tclListObjValidate) (Tcl_Interp *interp, Tcl_Obj *listObj); /* 261 */
} TclIntStubs;
+1 -1
View File
@@ -333,7 +333,7 @@ int
Tcl_Init(
Tcl_Interp *interp) /* Interpreter to initialize. */
{
PkgName pkgName = {NULL, "Tcl"};
PkgName pkgName = {NULL, "tcl"};
PkgName **names = (PkgName **)TclInitPkgFiles(interp);
int result = TCL_ERROR;
+13 -53
View File
@@ -526,56 +526,14 @@ GetUWide(
Tcl_Obj *objPtr,
Tcl_WideUInt *uwidePtr)
{
Tcl_WideInt *widePtr = (Tcl_WideInt *) uwidePtr;
void *clientData;
int type, intValue;
if (Tcl_GetWideUIntFromObj(NULL, objPtr, uwidePtr) != TCL_OK) {
int intValue;
if (Tcl_GetNumberFromObj(NULL, objPtr, &clientData, &type) == TCL_OK) {
if (type == TCL_NUMBER_INT) {
*widePtr = *((const Tcl_WideInt *) clientData);
return (*widePtr < 0);
} else if (type == TCL_NUMBER_BIG) {
mp_int *numPtr = (mp_int *)clientData;
Tcl_WideUInt value = 0;
union {
Tcl_WideUInt value;
unsigned char bytes[sizeof(Tcl_WideUInt)];
} scratch;
size_t numBytes;
unsigned char *bytes = scratch.bytes;
if (numPtr->sign || (MP_OKAY != mp_to_ubin(numPtr,
bytes, sizeof(Tcl_WideUInt), &numBytes))) {
/*
* If the sign bit is set (a negative value) or if the value
* can't possibly fit in the bits of an unsigned wide, there's
* no point in doing further conversion.
*/
return 1;
}
#ifdef WORDS_BIGENDIAN
while (numBytes-- > 0) {
value = (value << CHAR_BIT) | *bytes++;
}
#else /* !WORDS_BIGENDIAN */
/*
* Little-endian can read the value directly.
*/
value = scratch.value;
#endif /* WORDS_BIGENDIAN */
*uwidePtr = value;
return 0;
if (GetInvalidIntFromObj(objPtr, &intValue) != TCL_OK) {
return 1;
}
*uwidePtr = intValue;
}
/*
* Evil edge case fallback.
*/
if (GetInvalidIntFromObj(objPtr, &intValue) != TCL_OK) {
return 1;
}
*uwidePtr = intValue;
return 0;
}
@@ -1324,7 +1282,7 @@ ObjValue(
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
for (i=0; i < linkPtr->numElems; i++) {
objv[i] = Tcl_NewDoubleObj(linkPtr->lastValue.dPtr[i]);
TclNewDoubleObj(objv[i], linkPtr->lastValue.dPtr[i]);
}
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
ckfree(objv);
@@ -1443,7 +1401,7 @@ ObjValue(
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
for (i=0; i < linkPtr->numElems; i++) {
objv[i] = Tcl_NewDoubleObj(linkPtr->lastValue.fPtr[i]);
TclNewDoubleObj(objv[i], linkPtr->lastValue.fPtr[i]);
}
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
ckfree(objv);
@@ -1451,20 +1409,22 @@ ObjValue(
}
linkPtr->lastValue.f = LinkedVar(float);
return Tcl_NewDoubleObj(linkPtr->lastValue.f);
case TCL_LINK_WIDE_UINT:
case TCL_LINK_WIDE_UINT: {
if (linkPtr->flags & LINK_ALLOC_LAST) {
memcpy(linkPtr->lastValue.aryPtr, linkPtr->addr, linkPtr->bytes);
objv = (Tcl_Obj **)ckalloc(linkPtr->numElems * sizeof(Tcl_Obj *));
for (i=0; i < linkPtr->numElems; i++) {
TclNewIntObj(objv[i], (Tcl_WideInt)
linkPtr->lastValue.uwPtr[i]);
TclNewUIntObj(objv[i], linkPtr->lastValue.uwPtr[i]);
}
resultObj = Tcl_NewListObj(linkPtr->numElems, objv);
ckfree(objv);
return resultObj;
}
linkPtr->lastValue.uw = LinkedVar(Tcl_WideUInt);
return Tcl_NewWideIntObj((Tcl_WideInt) linkPtr->lastValue.uw);
Tcl_Obj *uwObj;
TclNewUIntObj(uwObj, linkPtr->lastValue.uw);
return uwObj;
}
case TCL_LINK_STRING:
p = LinkedVar(char *);
+99 -101
View File
@@ -11,6 +11,7 @@
#include <assert.h>
#include "tclInt.h"
#include "tclTomMath.h"
#include "tclArithSeries.h"
/*
@@ -48,13 +49,13 @@
*/
#define LIST_INDEX_ASSERT(idxarg_) \
do { \
ListSizeT idx_ = (idxarg_); /* To guard against ++ etc. */ \
Tcl_Size idx_ = (idxarg_); /* To guard against ++ etc. */ \
LIST_ASSERT(idx_ >= 0 && idx_ < LIST_MAX); \
} while (0)
/* Ditto for counts except upper limit is different */
#define LIST_COUNT_ASSERT(countarg_) \
do { \
ListSizeT count_ = (countarg_); /* To guard against ++ etc. */ \
Tcl_Size count_ = (countarg_); /* To guard against ++ etc. */ \
LIST_ASSERT(count_ >= 0 && count_ <= LIST_MAX); \
} while (0)
@@ -121,21 +122,21 @@
*/
static int MemoryAllocationError(Tcl_Interp *, size_t size);
static int ListLimitExceededError(Tcl_Interp *);
static ListStore *ListStoreNew(ListSizeT objc, Tcl_Obj *const objv[], int flags);
static int ListRepInit(ListSizeT objc, Tcl_Obj *const objv[], int flags, ListRep *);
static ListStore *ListStoreNew(Tcl_Size objc, Tcl_Obj *const objv[], int flags);
static int ListRepInit(Tcl_Size objc, Tcl_Obj *const objv[], int flags, ListRep *);
static int ListRepInitAttempt(Tcl_Interp *,
ListSizeT objc,
Tcl_Size objc,
Tcl_Obj *const objv[],
ListRep *);
static void ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags);
static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr);
static int TclListObjGetRep(Tcl_Interp *, Tcl_Obj *listPtr, ListRep *repPtr);
static void ListRepRange(ListRep *srcRepPtr,
ListSizeT rangeStart,
ListSizeT rangeEnd,
Tcl_Size rangeStart,
Tcl_Size rangeEnd,
int preserveSrcRep,
ListRep *rangeRepPtr);
static ListStore *ListStoreReallocate(ListStore *storePtr, ListSizeT numSlots);
static ListStore *ListStoreReallocate(ListStore *storePtr, Tcl_Size numSlots);
static void ListRepValidate(const ListRep *repPtr, const char *file,
int lineNum);
static void DupListInternalRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
@@ -237,8 +238,8 @@ const Tcl_ObjType tclListType = {
*/
static inline ListSpan *
ListSpanNew(
ListSizeT firstSlot, /* Starting slot index of the span */
ListSizeT numSlots) /* Number of slots covered by the span */
Tcl_Size firstSlot, /* Starting slot index of the span */
Tcl_Size numSlots) /* Number of slots covered by the span */
{
ListSpan *spanPtr = (ListSpan *) ckalloc(sizeof(*spanPtr));
spanPtr->refCount = 0;
@@ -295,9 +296,9 @@ ListSpanDecrRefs(ListSpan *spanPtr)
*/
static inline int
ListSpanMerited(
ListSizeT length, /* Length of the proposed span */
ListSizeT usedStorageLength, /* Number of slots currently in used */
ListSizeT allocatedStorageLength) /* Length of the currently allocation */
Tcl_Size length, /* Length of the proposed span */
Tcl_Size usedStorageLength, /* Number of slots currently in used */
Tcl_Size allocatedStorageLength) /* Length of the currently allocation */
{
/*
TODO
@@ -338,8 +339,8 @@ ListSpanMerited(
*
*------------------------------------------------------------------------
*/
static inline ListSizeT
ListStoreUpSize(ListSizeT numSlotsRequested) {
static inline Tcl_Size
ListStoreUpSize(Tcl_Size numSlotsRequested) {
/* TODO -how much extra? May be double only for smaller requests? */
return numSlotsRequested < (LIST_MAX / 2) ? 2 * numSlotsRequested
: LIST_MAX;
@@ -391,8 +392,8 @@ ListRepFreeUnreferenced(const ListRep *repPtr)
static inline void
ObjArrayIncrRefs(
Tcl_Obj * const *objv, /* Pointer to the array */
ListSizeT startIdx, /* Starting index of subarray within objv */
ListSizeT count) /* Number of elements in the subarray */
Tcl_Size startIdx, /* Starting index of subarray within objv */
Tcl_Size count) /* Number of elements in the subarray */
{
Tcl_Obj * const *end;
LIST_INDEX_ASSERT(startIdx);
@@ -423,8 +424,8 @@ ObjArrayIncrRefs(
static inline void
ObjArrayDecrRefs(
Tcl_Obj * const *objv, /* Pointer to the array */
ListSizeT startIdx, /* Starting index of subarray within objv */
ListSizeT count) /* Number of elements in the subarray */
Tcl_Size startIdx, /* Starting index of subarray within objv */
Tcl_Size count) /* Number of elements in the subarray */
{
Tcl_Obj * const *end;
LIST_INDEX_ASSERT(startIdx);
@@ -455,7 +456,7 @@ ObjArrayDecrRefs(
static inline void
ObjArrayCopy(
Tcl_Obj **to, /* Destination */
ListSizeT count, /* Number of pointers to copy */
Tcl_Size count, /* Number of pointers to copy */
Tcl_Obj *const from[]) /* Source array of Tcl_Obj* */
{
Tcl_Obj **end;
@@ -547,7 +548,7 @@ ListLimitExceededError(Tcl_Interp *interp)
*------------------------------------------------------------------------
*/
static inline void
ListRepUnsharedShiftDown(ListRep *repPtr, ListSizeT shiftCount)
ListRepUnsharedShiftDown(ListRep *repPtr, Tcl_Size shiftCount)
{
ListStore *storePtr;
@@ -602,7 +603,7 @@ ListRepUnsharedShiftDown(ListRep *repPtr, ListSizeT shiftCount)
*/
#if 0
static inline void
ListRepUnsharedShiftUp(ListRep *repPtr, ListSizeT shiftCount)
ListRepUnsharedShiftUp(ListRep *repPtr, Tcl_Size shiftCount)
{
ListStore *storePtr;
@@ -750,12 +751,12 @@ TclListObjValidate(Tcl_Interp *interp, Tcl_Obj *listObj)
*/
static ListStore *
ListStoreNew(
ListSizeT objc,
Tcl_Size objc,
Tcl_Obj *const objv[],
int flags)
{
ListStore *storePtr;
ListSizeT capacity;
Tcl_Size capacity;
/*
* First check to see if we'd overflow and try to allocate an object
@@ -793,7 +794,7 @@ ListStoreNew(
if (capacity == objc) {
storePtr->firstUsed = 0;
} else {
ListSizeT extra = capacity - objc;
Tcl_Size extra = capacity - objc;
int spaceFlags = flags & LISTREP_SPACE_FLAGS;
if (spaceFlags == LISTREP_SPACE_ONLY_BACK) {
storePtr->firstUsed = 0;
@@ -840,9 +841,9 @@ ListStoreNew(
*------------------------------------------------------------------------
*/
ListStore *
ListStoreReallocate (ListStore *storePtr, ListSizeT numSlots)
ListStoreReallocate (ListStore *storePtr, Tcl_Size numSlots)
{
ListSizeT newCapacity;
Tcl_Size newCapacity;
ListStore *newStorePtr;
newCapacity = ListStoreUpSize(numSlots);
@@ -893,7 +894,7 @@ ListStoreReallocate (ListStore *storePtr, ListSizeT numSlots)
*/
static int
ListRepInit(
ListSizeT objc,
Tcl_Size objc,
Tcl_Obj *const objv[],
int flags,
ListRep *repPtr
@@ -949,7 +950,7 @@ ListRepInit(
static int
ListRepInitAttempt(
Tcl_Interp *interp,
ListSizeT objc,
Tcl_Size objc,
Tcl_Obj *const objv[],
ListRep *repPtr)
{
@@ -990,7 +991,7 @@ static void
ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags)
{
Tcl_Obj **fromObjs;
ListSizeT numFrom;
Tcl_Size numFrom;
ListRepElements(fromRepPtr, numFrom, fromObjs);
ListRepInit(numFrom, fromObjs, flags | LISTREP_PANIC_ON_FAIL, toRepPtr);
@@ -1018,7 +1019,7 @@ ListRepClone(ListRep *fromRepPtr, ListRep *toRepPtr, int flags)
*/
static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr)
{
ListSizeT count;
Tcl_Size count;
ListStore *storePtr;
ListSpan *spanPtr;
@@ -1091,7 +1092,7 @@ static void ListRepUnsharedFreeUnreferenced(const ListRep *repPtr)
Tcl_Obj *
Tcl_NewListObj(
ListSizeT objc, /* Count of objects referenced by objv. */
Tcl_Size objc, /* Count of objects referenced by objv. */
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
{
return Tcl_DbNewListObj(objc, objv, "unknown", 0);
@@ -1101,7 +1102,7 @@ Tcl_NewListObj(
Tcl_Obj *
Tcl_NewListObj(
ListSizeT objc, /* Count of objects referenced by objv. */
Tcl_Size objc, /* Count of objects referenced by objv. */
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
{
ListRep listRep;
@@ -1153,7 +1154,7 @@ Tcl_NewListObj(
Tcl_Obj *
Tcl_DbNewListObj(
ListSizeT objc, /* Count of objects referenced by objv. */
Tcl_Size objc, /* Count of objects referenced by objv. */
Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -1179,7 +1180,7 @@ Tcl_DbNewListObj(
Tcl_Obj *
Tcl_DbNewListObj(
ListSizeT objc, /* Count of objects referenced by objv. */
Tcl_Size objc, /* Count of objects referenced by objv. */
Tcl_Obj *const objv[], /* An array of pointers to Tcl objects. */
TCL_UNUSED(const char *) /*file*/,
TCL_UNUSED(int) /*line*/)
@@ -1209,15 +1210,15 @@ Tcl_DbNewListObj(
*/
Tcl_Obj *
TclNewListObj2(
ListSizeT objc1, /* Count of objects referenced by objv1. */
Tcl_Size objc1, /* Count of objects referenced by objv1. */
Tcl_Obj *const objv1[], /* First array of pointers to Tcl objects. */
ListSizeT objc2, /* Count of objects referenced by objv2. */
Tcl_Size objc2, /* Count of objects referenced by objv2. */
Tcl_Obj *const objv2[] /* Second array of pointers to Tcl objects. */
)
{
Tcl_Obj *listObj;
ListStore *storePtr;
ListSizeT objc = objc1 + objc2;
Tcl_Size objc = objc1 + objc2;
listObj = Tcl_NewListObj(objc, NULL);
if (objc == 0) {
@@ -1313,7 +1314,7 @@ TclListObjGetRep(
void
Tcl_SetListObj(
Tcl_Obj *objPtr, /* Object whose internal rep to init. */
ListSizeT objc, /* Count of objects referenced by objv. */
Tcl_Size objc, /* Count of objects referenced by objv. */
Tcl_Obj *const objv[]) /* An array of pointers to Tcl objects. */
{
if (Tcl_IsShared(objPtr)) {
@@ -1413,17 +1414,17 @@ TclListObjCopy(
static void
ListRepRange(
ListRep *srcRepPtr, /* Contains source of the range */
ListSizeT rangeStart, /* Index of first element to include */
ListSizeT rangeEnd, /* Index of last element to include */
Tcl_Size rangeStart, /* Index of first element to include */
Tcl_Size rangeEnd, /* Index of last element to include */
int preserveSrcRep, /* If true, srcRepPtr contents must not be
modified (generally because a shared Tcl_Obj
references it) */
ListRep *rangeRepPtr) /* Output. Must NOT be == srcRepPtr */
{
Tcl_Obj **srcElems;
ListSizeT numSrcElems = ListRepLength(srcRepPtr);
ListSizeT rangeLen;
ListSizeT numAfterRangeEnd;
Tcl_Size numSrcElems = ListRepLength(srcRepPtr);
Tcl_Size rangeLen;
Tcl_Size numAfterRangeEnd;
LISTREP_CHECK(srcRepPtr);
@@ -1490,7 +1491,7 @@ ListRepRange(
srcRepPtr->storePtr->numUsed,
srcRepPtr->storePtr->numAllocated)) {
/* Option 2 - because span would be most efficient */
ListSizeT spanStart = ListRepStart(srcRepPtr) + rangeStart;
Tcl_Size spanStart = ListRepStart(srcRepPtr) + rangeStart;
if (!preserveSrcRep && srcRepPtr->spanPtr
&& srcRepPtr->spanPtr->refCount <= 1) {
/* If span is not shared reuse it */
@@ -1602,8 +1603,8 @@ ListRepRange(
Tcl_Obj *
TclListObjRange(
Tcl_Obj *listObj, /* List object to take a range from. */
ListSizeT rangeStart, /* Index of first element to include. */
ListSizeT rangeEnd) /* Index of last element to include. */
Tcl_Size rangeStart, /* Index of first element to include. */
Tcl_Size rangeEnd) /* Index of last element to include. */
{
ListRep listRep;
ListRep resultRep;
@@ -1660,7 +1661,7 @@ Tcl_ListObjGetElements(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *objPtr, /* List object for which an element array is
* to be returned. */
ListSizeT *objcPtr, /* Where to store the count of objects
Tcl_Size *objcPtr, /* Where to store the count of objects
* referenced by objv. */
Tcl_Obj ***objvPtr) /* Where to store the pointer to an array of
* pointers to the list's objects. */
@@ -1705,7 +1706,7 @@ Tcl_ListObjAppendList(
Tcl_Obj *toObj, /* List object to append elements to. */
Tcl_Obj *fromObj) /* List obj with elements to append. */
{
ListSizeT objc;
Tcl_Size objc;
Tcl_Obj **objv;
if (Tcl_IsShared(toObj)) {
@@ -1749,13 +1750,13 @@ Tcl_ListObjAppendList(
int TclListObjAppendElements (
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *toObj, /* List object to append */
ListSizeT elemCount, /* Number of elements in elemObjs[] */
Tcl_Size elemCount, /* Number of elements in elemObjs[] */
Tcl_Obj * const elemObjv[]) /* Objects to append to toObj's list. */
{
ListRep listRep;
Tcl_Obj **toObjv;
ListSizeT toLen;
ListSizeT finalLen;
Tcl_Size toLen;
Tcl_Size finalLen;
if (Tcl_IsShared(toObj)) {
Tcl_Panic("%s called with shared object", "TclListObjAppendElements");
@@ -1780,7 +1781,7 @@ Tcl_ListObjAppendList(
* reference counts on the elements which is a substantial cost
* if the list is not small.
*/
ListSizeT numTailFree;
Tcl_Size numTailFree;
ListRepFreeUnreferenced(&listRep); /* Collect garbage before checking room */
@@ -1812,7 +1813,7 @@ Tcl_ListObjAppendList(
if (numTailFree < elemCount) {
/* Not enough room at back. Move some to front */
/* T:listrep-3.5 */
ListSizeT shiftCount = elemCount - numTailFree;
Tcl_Size shiftCount = elemCount - numTailFree;
/* Divide remaining space between front and back */
shiftCount += (listRep.storePtr->numAllocated - finalLen) / 2;
LIST_ASSERT(shiftCount <= listRep.storePtr->firstUsed);
@@ -1940,11 +1941,11 @@ int
Tcl_ListObjIndex(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *listObj, /* List object to index into. */
ListSizeT index, /* Index of element to return. */
Tcl_Size index, /* Index of element to return. */
Tcl_Obj **objPtrPtr) /* The resulting Tcl_Obj* is stored here. */
{
Tcl_Obj **elemObjs;
ListSizeT numElems;
Tcl_Size numElems;
/*
* TODO
@@ -1993,7 +1994,7 @@ int
Tcl_ListObjLength(
Tcl_Interp *interp, /* Used to report errors if not NULL. */
Tcl_Obj *listObj, /* List object whose #elements to return. */
ListSizeT *lenPtr) /* The resulting int is stored here. */
Tcl_Size *lenPtr) /* The resulting length is stored here. */
{
ListRep listRep;
@@ -2057,17 +2058,17 @@ int
Tcl_ListObjReplace(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
Tcl_Obj *listObj, /* List object whose elements to replace. */
ListSizeT first, /* Index of first element to replace. */
ListSizeT numToDelete, /* Number of elements to replace. */
ListSizeT numToInsert, /* Number of objects to insert. */
Tcl_Size first, /* Index of first element to replace. */
Tcl_Size numToDelete, /* Number of elements to replace. */
Tcl_Size numToInsert, /* Number of objects to insert. */
Tcl_Obj *const insertObjs[])/* Tcl objects to insert */
{
ListRep listRep;
ListSizeT origListLen;
Tcl_Size origListLen;
int lenChange;
int leadSegmentLen;
int tailSegmentLen;
ListSizeT numFreeSlots;
Tcl_Size numFreeSlots;
int leadShift;
int tailShift;
Tcl_Obj **listObjs;
@@ -2186,7 +2187,7 @@ Tcl_ListObjReplace(
ListRepStart(&listRep) == listRep.storePtr->firstUsed && /* (ii) */
numToInsert <= listRep.storePtr->firstUsed /* (iii) */
) {
ListSizeT newLen;
Tcl_Size newLen;
LIST_ASSERT(numToInsert); /* Else would have returned above */
listRep.storePtr->firstUsed -= numToInsert;
ObjArrayCopy(&listRep.storePtr->slots[listRep.storePtr->firstUsed],
@@ -2393,7 +2394,7 @@ Tcl_ListObjReplace(
if (finalFreeSpace > 1 && (tailSpace == 0 || tailSegmentLen == 0)) {
int postShiftLeadSpace = leadSpace - lenChange;
if (postShiftLeadSpace > (finalFreeSpace/2)) {
ListSizeT extraShift = postShiftLeadSpace - (finalFreeSpace / 2);
Tcl_Size extraShift = postShiftLeadSpace - (finalFreeSpace / 2);
leadShift -= extraShift;
tailShift = -extraShift; /* Move tail to the front as well */
}
@@ -2411,7 +2412,7 @@ Tcl_ListObjReplace(
int postShiftTailSpace = tailSpace - lenChange;
if (postShiftTailSpace > (finalFreeSpace/2)) {
/* T:listrep-1.{1,3,14,18,21},3.{2,3,26,27} */
ListSizeT extraShift = postShiftTailSpace - (finalFreeSpace / 2);
Tcl_Size extraShift = postShiftTailSpace - (finalFreeSpace / 2);
tailShift += extraShift;
leadShift = extraShift; /* Move head to the back as well */
}
@@ -2456,7 +2457,7 @@ Tcl_ListObjReplace(
/* Will happen when we have to make room at bottom */
if (tailShift != 0 && tailSegmentLen != 0) {
/* T:listrep-1.{1,3,14,18},3.{2,3,26,27} */
ListSizeT tailStart = leadSegmentLen + numToDelete;
Tcl_Size tailStart = leadSegmentLen + numToDelete;
memmove(&listObjs[tailStart + tailShift],
&listObjs[tailStart],
tailSegmentLen * sizeof(Tcl_Obj *));
@@ -2476,7 +2477,7 @@ Tcl_ListObjReplace(
}
if (tailShift != 0 && tailSegmentLen != 0) {
/* T:listrep-1.{7,17},3.{8:11,13,14,21,22,35,37,39:41} */
ListSizeT tailStart = leadSegmentLen + numToDelete;
Tcl_Size tailStart = leadSegmentLen + numToDelete;
memmove(&listObjs[tailStart + tailShift],
&listObjs[tailStart],
tailSegmentLen * sizeof(Tcl_Obj *));
@@ -2546,10 +2547,10 @@ TclLindexList(
Tcl_Obj *listObj, /* List being unpacked. */
Tcl_Obj *argObj) /* Index or index list. */
{
ListSizeT index; /* Index into the list. */
Tcl_Size index; /* Index into the list. */
Tcl_Obj *indexListCopy;
Tcl_Obj **indexObjs;
ListSizeT numIndexObjs;
Tcl_Size numIndexObjs;
/*
* Determine whether argPtr designates a list or a single index. We have
@@ -2623,38 +2624,38 @@ Tcl_Obj *
TclLindexFlat(
Tcl_Interp *interp, /* Tcl interpreter. */
Tcl_Obj *listObj, /* Tcl object representing the list. */
ListSizeT indexCount, /* Count of indices. */
Tcl_Size indexCount, /* Count of indices. */
Tcl_Obj *const indexArray[])/* Array of pointers to Tcl objects that
* represent the indices in the list. */
{
ListSizeT i;
Tcl_Size i;
/* Handle ArithSeries as special case */
if (TclHasInternalRep(listObj,&tclArithSeriesType)) {
Tcl_WideInt listLen = TclArithSeriesObjLength(listObj);
ListSizeT index;
Tcl_Size listLen = TclArithSeriesObjLength(listObj);
Tcl_Size index;
Tcl_Obj *elemObj = NULL;
for (i=0 ; i<indexCount && listObj ; i++) {
if (TclGetIntForIndexM(interp, indexArray[i], /*endValue*/ listLen-1,
&index) == TCL_OK) {
}
if (i==0) {
TclArithSeriesObjIndex(listObj, index, &elemObj);
elemObj = TclArithSeriesObjIndex(NULL, listObj, index);
} else if (index > 0) {
/* ArithSeries cannot be a list of lists */
Tcl_DecrRefCount(elemObj);
TclNewObj(elemObj);
Tcl_IncrRefCount(elemObj);
break;
}
}
Tcl_IncrRefCount(elemObj);
return elemObj;
}
Tcl_IncrRefCount(listObj);
for (i=0 ; i<indexCount && listObj ; i++) {
ListSizeT index, listLen = 0;
Tcl_Size index, listLen = 0;
Tcl_Obj **elemPtrs = NULL, *sublistCopy;
/*
@@ -2736,10 +2737,10 @@ TclLsetList(
Tcl_Obj *indexArgObj, /* Index or index-list arg to 'lset'. */
Tcl_Obj *valueObj) /* Value arg to 'lset' or NULL to 'lpop'. */
{
ListSizeT indexCount = 0; /* Number of indices in the index list. */
Tcl_Size indexCount = 0; /* Number of indices in the index list. */
Tcl_Obj **indices = NULL; /* Vector of indices in the index list. */
Tcl_Obj *retValueObj; /* Pointer to the list to be returned. */
ListSizeT index; /* Current index in the list - discarded. */
Tcl_Size index; /* Current index in the list - discarded. */
Tcl_Obj *indexListCopy;
/*
@@ -2817,17 +2818,17 @@ Tcl_Obj *
TclLsetFlat(
Tcl_Interp *interp, /* Tcl interpreter. */
Tcl_Obj *listObj, /* Pointer to the list being modified. */
ListSizeT indexCount, /* Number of index args. */
Tcl_Size indexCount, /* Number of index args. */
Tcl_Obj *const indexArray[],
/* Index args. */
Tcl_Obj *valueObj) /* Value arg to 'lset' or NULL to 'lpop'. */
{
ListSizeT index, len;
Tcl_Size index, len;
int result;
Tcl_Obj *subListObj, *retValueObj;
Tcl_Obj *pendingInvalidates[10];
Tcl_Obj **pendingInvalidatesPtr = pendingInvalidates;
ListSizeT numPendingInvalidates = 0;
Tcl_Size numPendingInvalidates = 0;
/*
* If there are no indices, simply return the new value. (Without
@@ -2876,7 +2877,7 @@ TclLsetFlat(
*/
do {
ListSizeT elemCount;
Tcl_Size elemCount;
Tcl_Obj *parentList, **elemPtrs;
/*
@@ -3080,13 +3081,13 @@ TclListObjSetElement(
* if not NULL. */
Tcl_Obj *listObj, /* List object in which element should be
* stored. */
ListSizeT index, /* Index of element to store. */
Tcl_Size index, /* Index of element to store. */
Tcl_Obj *valueObj) /* Tcl object to store in the designated list
* element. */
{
ListRep listRep;
Tcl_Obj **elemPtrs; /* Pointers to elements of the list. */
ListSizeT elemCount; /* Number of elements in the list. */
Tcl_Size elemCount; /* Number of elements in the list. */
/* Ensure that the listObj parameter designates an unshared list. */
@@ -3242,7 +3243,7 @@ SetListFromAny(
Tcl_Obj *keyPtr, *valuePtr;
Tcl_DictSearch search;
int done;
ListSizeT size;
Tcl_Size size;
/*
* Create the new list representation. Note that we do not need to do
@@ -3284,7 +3285,7 @@ SetListFromAny(
* because it can be done an order of magnitude faster
* and may occur frequently.
*/
ListSizeT j, size = TclArithSeriesObjLength(objPtr);
Tcl_Size j, size = TclArithSeriesObjLength(objPtr);
/* TODO - leave space in front and/or back? */
if (ListRepInitAttempt(
@@ -3300,13 +3301,14 @@ SetListFromAny(
listRep.storePtr->numUsed = size;
elemPtrs = listRep.storePtr->slots;
for (j = 0; j < size; j++) {
if (TclArithSeriesObjIndex(objPtr, j, &elemPtrs[j]) != TCL_OK) {
elemPtrs[j] = TclArithSeriesObjIndex(interp, objPtr, j);
if (elemPtrs[j] == NULL) {
return TCL_ERROR;
}
}
} else {
ListSizeT estCount, length;
Tcl_Size estCount, length;
const char *limit, *nextElem = TclGetStringFromObj(objPtr, &length);
/*
@@ -3333,7 +3335,7 @@ SetListFromAny(
while (nextElem < limit) {
const char *elemStart;
char *check;
ListSizeT elemSize;
Tcl_Size elemSize;
int literal;
if (TCL_OK != TclFindElement(interp, nextElem, limit - nextElem,
@@ -3417,7 +3419,7 @@ UpdateStringOfList(
{
# define LOCAL_SIZE 64
char localFlags[LOCAL_SIZE], *flagPtr = NULL;
ListSizeT numElems, i, length;
Tcl_Size numElems, i, length;
TCL_HASH_TYPE bytesNeeded = 0;
const char *elem, *start;
char *dst;
@@ -3514,17 +3516,10 @@ UpdateStringOfList(
*------------------------------------------------------------------------
*/
Tcl_Obj *
TclListTestObj (int length, int leadingSpace, int endSpace)
TclListTestObj(size_t length, size_t leadingSpace, size_t endSpace)
{
if (length < 0)
length = 0;
if (leadingSpace < 0)
leadingSpace = 0;
if (endSpace < 0)
endSpace = 0;
ListRep listRep;
ListSizeT capacity;
size_t capacity;
Tcl_Obj *listObj;
TclNewObj(listObj);
@@ -3534,13 +3529,16 @@ TclListTestObj (int length, int leadingSpace, int endSpace)
if (capacity == 0) {
return listObj;
}
if (capacity > LIST_MAX) {
return NULL;
}
ListRepInit(capacity, NULL, 0, &listRep);
ListStore *storePtr = listRep.storePtr;
int i;
size_t i;
for (i = 0; i < length; ++i) {
storePtr->slots[i + leadingSpace] = Tcl_NewIntObj(i);
TclNewUIntObj(storePtr->slots[i + leadingSpace], i);
Tcl_IncrRefCount(storePtr->slots[i + leadingSpace]);
}
storePtr->firstUsed = leadingSpace;
+1 -1
View File
@@ -55,7 +55,7 @@ NewNativeObj(
#else
Tcl_ExternalToUtfDString(NULL, (char *)string, -1, &ds);
#endif
return TclDStringToObj(&ds);
return Tcl_DStringToObj(&ds);
}
/*
+1 -1
View File
@@ -1249,7 +1249,7 @@ TclOOSelfObjCmd(
}
case SELF_CALL:
result[0] = TclOORenderCallChain(interp, contextPtr->callPtr);
TclNewIntObj(result[1], contextPtr->index);
TclNewIndexObj(result[1], contextPtr->index);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, result));
return TCL_OK;
}
+2 -2
View File
@@ -116,7 +116,7 @@ static const char *tclOOSetupScript =
"\t\t\t\t}]\n"
"\t\t}\n"
"\t}\n"
"\tproc define::classmethod {name {args {}} {body {}}} {\n"
"\tproc define::classmethod {name args} {\n"
"\t\t::set argc [::llength [::info level 0]]\n"
"\t\t::if {$argc == 3} {\n"
"\t\t\t::return -code error -errorcode {TCL WRONGARGS} [::format \\\n"
@@ -125,7 +125,7 @@ static const char *tclOOSetupScript =
"\t\t}\n"
"\t\t::set cls [::uplevel 1 self]\n"
"\t\t::if {$argc == 4} {\n"
"\t\t\t::oo::define [::oo::DelegateName $cls] method $name $args $body\n"
"\t\t\t::oo::define [::oo::DelegateName $cls] method $name {*}$args\n"
"\t\t}\n"
"\t\t::tailcall forward $name myclass $name\n"
"\t}\n"
+86
View File
@@ -2217,6 +2217,8 @@ Tcl_GetBoolFromObj(
} else if (flags == (int)sizeof(short)) {
*(short *)charPtr = result;
return TCL_OK;
} else {
Tcl_Panic("Wrong bool var for %s", "Tcl_GetBoolFromObj");
}
}
*charPtr = result;
@@ -3396,6 +3398,90 @@ Tcl_GetWideIntFromObj(
return TCL_ERROR;
}
/*
*----------------------------------------------------------------------
*
* Tcl_GetWideUIntFromObj --
*
* Attempt to return a unsigned wide integer from the Tcl object "objPtr". If the
* object is not already a wide int object or a bignum object, an attempt will
* be made to convert it to one.
*
* Results:
* The return value is a standard Tcl object result. If an error occurs
* during conversion, an error message is left in the interpreter's
* result unless "interp" is NULL.
*
* Side effects:
* If the object is not already an int object, the conversion will free
* any old internal representation.
*
*----------------------------------------------------------------------
*/
int
Tcl_GetWideUIntFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
Tcl_Obj *objPtr, /* Object from which to get a wide int. */
Tcl_WideUInt *wideUIntPtr)
/* Place to store resulting long. */
{
do {
if (objPtr->typePtr == &tclIntType) {
if (objPtr->internalRep.wideValue < 0) {
wideUIntOutOfRange:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"expected unsigned integer but got \"%s\"",
TclGetString(objPtr)));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "INTEGER", NULL);
}
return TCL_ERROR;
}
*wideUIntPtr = (Tcl_WideUInt)objPtr->internalRep.wideValue;
return TCL_OK;
}
if (objPtr->typePtr == &tclDoubleType) {
goto wideUIntOutOfRange;
}
if (objPtr->typePtr == &tclBignumType) {
/*
* Must check for those bignum values that can fit in a
* Tcl_WideUInt, even when auto-narrowing is enabled.
*/
mp_int big;
Tcl_WideUInt value = 0;
size_t numBytes;
Tcl_WideUInt scratch;
unsigned char *bytes = (unsigned char *) &scratch;
TclUnpackBignum(objPtr, big);
if (big.sign == MP_NEG) {
goto wideUIntOutOfRange;
}
if (mp_to_ubin(&big, bytes, sizeof(Tcl_WideUInt), &numBytes) == MP_OKAY) {
while (numBytes-- > 0) {
value = (value << CHAR_BIT) | *bytes++;
}
*wideUIntPtr = (Tcl_WideUInt)value;
return TCL_OK;
}
if (interp != NULL) {
const char *s = "integer value too large to represent";
Tcl_Obj *msg = Tcl_NewStringObj(s, -1);
Tcl_SetObjResult(interp, msg);
Tcl_SetErrorCode(interp, "ARITH", "IOVERFLOW", s, NULL);
}
return TCL_ERROR;
}
} while (TclParseNumber(interp, objPtr, "integer", NULL, -1, NULL,
TCL_PARSE_INTEGER_ONLY)==TCL_OK);
return TCL_ERROR;
}
/*
*----------------------------------------------------------------------
*
+3 -3
View File
@@ -2295,7 +2295,7 @@ SetFsPathFromAny(
Tcl_DStringFree(&userName);
}
transPtr = TclDStringToObj(&temp);
transPtr = Tcl_DStringToObj(&temp);
if (split != len) {
/*
@@ -2657,7 +2657,7 @@ TclGetHomeDirObj(
if (MakeTildeRelativePath(interp, user, NULL, &dirString) != TCL_OK) {
return NULL;
}
return TclDStringToObj(&dirString);
return Tcl_DStringToObj(&dirString);
}
/*
@@ -2729,7 +2729,7 @@ TclResolveTildePath(
}
Tcl_DStringFree(&userName);
}
return TclDStringToObj(&resolvedPath);
return Tcl_DStringToObj(&resolvedPath);
}
/*
+2 -2
View File
@@ -40,7 +40,7 @@ typedef struct PkgAvail {
typedef struct PkgName {
struct PkgName *nextPtr; /* Next in list of package names being
* initialized. */
char name[1];
char name[TCLFLEXARRAY];
} PkgName;
typedef struct PkgFiles {
@@ -828,7 +828,7 @@ SelectPackage(
* Push "ifneeded" package name in "tclPkgFiles" assocdata.
*/
pkgName = (PkgName *)ckalloc(sizeof(PkgName) + strlen(name));
pkgName = (PkgName *)ckalloc(offsetof(PkgName, name) + 1 + strlen(name));
pkgName->nextPtr = pkgFiles->names;
strcpy(pkgName->name, name);
pkgFiles->names = pkgName;
+59 -45
View File
@@ -84,7 +84,7 @@ const Tcl_ObjType tclProcBodyType = {
} while (0)
/*
* The [upvar]/[uplevel] level reference type. Uses the longValue field
* The [upvar]/[uplevel] level reference type. Uses the wideValue field
* to remember the integer value of a parsed #<integer> format.
*
* Uses the default behaviour throughout, and never disposes of the string
@@ -151,9 +151,9 @@ static const Tcl_ObjType lambdaType = {
#undef TclObjInterpProc
int
Tcl_ProcObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Interp *iPtr = (Interp *) interp;
@@ -339,7 +339,7 @@ Tcl_ProcObjCmd(
}
if ((procArgs[0] == 'a') && (strncmp(procArgs, "args", 4) == 0)) {
int numBytes;
Tcl_Size numBytes;
procArgs +=4;
while (*procArgs != '\0') {
@@ -405,10 +405,10 @@ TclCreateProc(
Interp *iPtr = (Interp *) interp;
Proc *procPtr = NULL;
int i, result, numArgs;
Tcl_Size i, numArgs;
CompiledLocal *localPtr = NULL;
Tcl_Obj **argArray;
int precompiled = 0;
int precompiled = 0, result;
ProcGetInternalRep(bodyPtr, procPtr);
if (procPtr != NULL) {
@@ -445,7 +445,7 @@ TclCreateProc(
if (Tcl_IsShared(bodyPtr)) {
const char *bytes;
int length;
Tcl_Size length;
Tcl_Obj *sharedBodyPtr = bodyPtr;
bytes = TclGetStringFromObj(bodyPtr, &length);
@@ -508,7 +508,7 @@ TclCreateProc(
for (i = 0; i < numArgs; i++) {
const char *argname, *argnamei, *argnamelast;
int fieldCount, nameLength;
Tcl_Size fieldCount, nameLength;
Tcl_Obj **fieldValues;
/*
@@ -600,10 +600,9 @@ TclCreateProc(
*/
if (localPtr->defValuePtr != NULL) {
const char *tmpPtr = TclGetString(localPtr->defValuePtr);
size_t tmpLength = localPtr->defValuePtr->length;
const char *value = TclGetString(fieldValues[1]);
size_t valueLength = fieldValues[1]->length;
Tcl_Size tmpLength, valueLength;
const char *tmpPtr = TclGetStringFromObj(localPtr->defValuePtr, &tmpLength);
const char *value = TclGetStringFromObj(fieldValues[1], &valueLength);
if ((valueLength != tmpLength)
|| memcmp(value, tmpPtr, tmpLength) != 0
@@ -866,7 +865,7 @@ badLevel:
static int
Uplevel_Callback(
ClientData data[],
void *data[],
Tcl_Interp *interp,
int result)
{
@@ -887,7 +886,7 @@ Uplevel_Callback(
int
Tcl_UplevelObjCmd(
ClientData clientData,
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -897,7 +896,7 @@ Tcl_UplevelObjCmd(
int
TclNRUplevelObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -920,7 +919,8 @@ TclNRUplevelObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "?level? command ?arg ...?");
return TCL_ERROR;
} else if (!TclHasStringRep(objv[1]) && objc == 2) {
int status ,llength;
int status;
Tcl_Size llength;
status = TclListObjLengthM(interp, objv[1], &llength);
if (status == TCL_OK && llength > 1) {
/* the first argument can't interpreted as a level. Avoid
@@ -1141,6 +1141,7 @@ ProcWrongNumArgs(
*----------------------------------------------------------------------
*/
#ifndef TCL_NO_DEPRECATED
void
TclInitCompiledLocals(
Tcl_Interp *interp, /* Current interpreter. */
@@ -1167,6 +1168,7 @@ TclInitCompiledLocals(
InitResolvedLocals(interp, codePtr, varPtr, nsPtr);
}
#endif /* TCL_NO_DEPRECATED */
/*
*----------------------------------------------------------------------
@@ -1299,7 +1301,7 @@ TclFreeLocalCache(
Tcl_Interp *interp,
LocalCache *localCachePtr)
{
int i;
Tcl_Size i;
Tcl_Obj **namePtrPtr = &localCachePtr->varName0;
for (i = 0; i < localCachePtr->numVars; i++, namePtrPtr++) {
@@ -1319,8 +1321,8 @@ InitLocalCache(
{
Interp *iPtr = procPtr->iPtr;
ByteCode *codePtr;
int localCt = procPtr->numCompiledLocals;
int numArgs = procPtr->numArgs, i = 0;
Tcl_Size localCt = procPtr->numCompiledLocals;
Tcl_Size numArgs = procPtr->numArgs, i = 0;
Tcl_Obj **namePtr;
Var *varPtr;
@@ -1483,7 +1485,7 @@ InitArgsAndLocals(
varPtr->flags = 0;
if (defPtr && defPtr->flags & VAR_IS_ARGS) {
Tcl_Obj *listPtr = Tcl_NewListObj(argCt-i, argObjs+i);
Tcl_Obj *listPtr = Tcl_NewListObj((argCt>i)? argCt-i : 0, argObjs+i);
varPtr->value.objPtr = listPtr;
Tcl_IncrRefCount(listPtr); /* Local var is a reference. */
@@ -1553,11 +1555,11 @@ InitArgsAndLocals(
int
TclPushProcCallFrame(
ClientData clientData, /* Record describing procedure to be
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
int objc, /* Count of number of arguments to this
Tcl_Size objc, /* Count of number of arguments to this
* procedure. */
Tcl_Obj *const objv[], /* Argument value objects. */
int isLambda) /* 1 if this is a call by ApplyObjCmd: it
@@ -1648,7 +1650,7 @@ TclPushProcCallFrame(
int
TclObjInterpProc(
ClientData clientData, /* Record describing procedure to be
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
@@ -1665,7 +1667,7 @@ TclObjInterpProc(
int
TclNRInterpProc(
ClientData clientData, /* Record describing procedure to be
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
@@ -1684,7 +1686,7 @@ TclNRInterpProc(
static int
NRInterpProc2(
ClientData clientData, /* Record describing procedure to be
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
@@ -1703,7 +1705,7 @@ NRInterpProc2(
static int
ObjInterpProc2(
ClientData clientData, /* Record describing procedure to be
void *clientData, /* Record describing procedure to be
* interpreted. */
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
@@ -1742,7 +1744,7 @@ TclNRInterpProcCore(
Tcl_Interp *interp,/* Interpreter in which procedure was
* invoked. */
Tcl_Obj *procNameObj, /* Procedure name for error reporting. */
int skip, /* Number of initial arguments to be skipped,
Tcl_Size skip, /* Number of initial arguments to be skipped,
* i.e., words in the "command name". */
ProcErrorProc *errorProc) /* How to convert results from the script into
* results of the overall procedure. */
@@ -1766,7 +1768,7 @@ TclNRInterpProcCore(
#if defined(TCL_COMPILE_DEBUG)
if (tclTraceExec >= 1) {
CallFrame *framePtr = iPtr->varFramePtr;
int i;
Tcl_Size i;
if (framePtr->isProcCallFrame & FRAME_IS_LAMBDA) {
fprintf(stdout, "Calling lambda ");
@@ -1784,9 +1786,9 @@ TclNRInterpProcCore(
#ifdef USE_DTRACE
if (TCL_DTRACE_PROC_ARGS_ENABLED()) {
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
const char *a[10];
int i;
Tcl_Size i;
for (i = 0 ; i < 10 ; i++) {
a[i] = (l < iPtr->varFramePtr->objc ?
@@ -1805,7 +1807,7 @@ TclNRInterpProcCore(
TclDecrRefCount(info);
}
if (TCL_DTRACE_PROC_ENTRY_ENABLED()) {
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
TCL_DTRACE_PROC_ENTRY(l < iPtr->varFramePtr->objc ?
TclGetString(iPtr->varFramePtr->objv[l]) : NULL,
@@ -1813,7 +1815,7 @@ TclNRInterpProcCore(
(Tcl_Obj **)(iPtr->varFramePtr->objv + l + 1));
}
if (TCL_DTRACE_PROC_ENTRY_ENABLED()) {
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
TCL_DTRACE_PROC_ENTRY(l < iPtr->varFramePtr->objc ?
TclGetString(iPtr->varFramePtr->objv[l]) : NULL,
@@ -1836,7 +1838,7 @@ TclNRInterpProcCore(
static int
InterpProcNR2(
ClientData data[],
void *data[],
Tcl_Interp *interp,
int result)
{
@@ -1847,7 +1849,7 @@ InterpProcNR2(
ProcErrorProc *errorProc = (ProcErrorProc *)data[1];
if (TCL_DTRACE_PROC_RETURN_ENABLED()) {
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
TCL_DTRACE_PROC_RETURN(l < iPtr->varFramePtr->objc ?
TclGetString(iPtr->varFramePtr->objv[l]) : NULL, result);
@@ -1870,7 +1872,7 @@ InterpProcNR2(
done:
if (TCL_DTRACE_PROC_RESULT_ENABLED()) {
int l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Size l = iPtr->varFramePtr->isProcCallFrame & FRAME_IS_LAMBDA ? 1 : 0;
Tcl_Obj *r = Tcl_GetObjResult(interp);
TCL_DTRACE_PROC_RESULT(l < iPtr->varFramePtr->objc ?
@@ -2128,13 +2130,14 @@ MakeProcError(
Tcl_Obj *procNameObj) /* Name of the procedure. Used for error
* messages and trace information. */
{
int overflow, limit = 60, nameLen;
int overflow, limit = 60;
Tcl_Size nameLen;
const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (procedure \"%.*s%s\" line %d)",
(overflow ? limit : nameLen), procName,
(overflow ? limit : (int)nameLen), procName,
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
@@ -2160,7 +2163,7 @@ MakeProcError(
void
TclProcDeleteProc(
ClientData clientData) /* Procedure to be deleted. */
void *clientData) /* Procedure to be deleted. */
{
Proc *procPtr = (Proc *)clientData;
@@ -2317,7 +2320,8 @@ TclUpdateReturnInfo(
* of a function exported by a DLL exist.
*
* Results:
* Returns the internal address of the TclObjInterpProc function.
* Returns the internal address of the TclObjInterpProc/ObjInterpProc2
* functions.
*
* Side effects:
* None.
@@ -2490,7 +2494,8 @@ SetLambdaFromAny(
Interp *iPtr = (Interp *) interp;
const char *name;
Tcl_Obj *argsPtr, *bodyPtr, *nsObjPtr, **objv;
int isNew, objc, result;
int isNew, result;
Tcl_Size objc;
CmdFrame *cfPtr = NULL;
Proc *procPtr;
@@ -2503,6 +2508,14 @@ SetLambdaFromAny(
* length is not 2, then it cannot be converted to lambdaType.
*/
result = TclListObjLengthM(NULL, objPtr, &objc);
if ((result != TCL_OK) || ((objc != 2) && (objc != 3))) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"can't interpret \"%s\" as a lambda expression",
Tcl_GetString(objPtr)));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "LAMBDA", NULL);
return TCL_ERROR;
}
result = TclListObjGetElementsM(NULL, objPtr, &objc, &objv);
if ((result != TCL_OK) || ((objc != 2) && (objc != 3))) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
@@ -2697,7 +2710,7 @@ TclGetLambdaFromObj(
int
Tcl_ApplyObjCmd(
ClientData clientData,
void *clientData,
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2707,7 +2720,7 @@ Tcl_ApplyObjCmd(
int
TclNRApplyObjCmd(
TCL_UNUSED(ClientData),
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -2776,7 +2789,7 @@ TclNRApplyObjCmd(
static int
ApplyNR2(
ClientData data[],
void *data[],
Tcl_Interp *interp,
int result)
{
@@ -2811,13 +2824,14 @@ MakeLambdaError(
Tcl_Obj *procNameObj) /* Name of the procedure. Used for error
* messages and trace information. */
{
int overflow, limit = 60, nameLen;
int overflow, limit = 60;
Tcl_Size nameLen;
const char *procName = TclGetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (lambda term \"%.*s%s\" line %d)",
(overflow ? limit : nameLen), procName,
(overflow ? limit : (int)nameLen), procName,
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
+1 -1
View File
@@ -959,7 +959,7 @@ CompileRegexp(
if (TclReToGlob(NULL, string, length, &stringBuf, &exact,
NULL) == TCL_OK) {
regexpPtr->globObjPtr = TclDStringToObj(&stringBuf);
regexpPtr->globObjPtr = Tcl_DStringToObj(&stringBuf);
Tcl_IncrRefCount(regexpPtr->globObjPtr);
} else {
regexpPtr->globObjPtr = NULL;
+2 -2
View File
@@ -993,7 +993,7 @@ Tcl_ScanObjCmd(
* Scan a floating point number
*/
objPtr = Tcl_NewDoubleObj(0.0);
TclNewDoubleObj(objPtr, 0.0);
Tcl_IncrRefCount(objPtr);
if (width == 0) {
width = ~0;
@@ -1090,7 +1090,7 @@ Tcl_ScanObjCmd(
if (code == TCL_OK) {
if (underflow && (nconversions == 0)) {
if (numVars) {
TclNewIndexObj(objPtr, TCL_INDEX_NONE);
TclNewIntObj(objPtr, -1);
} else {
if (objPtr) {
Tcl_SetListObj(objPtr, 0, NULL);
+31 -30
View File
@@ -261,34 +261,35 @@ static const int log2pow5[27] = {
};
#define N_LOG2POW5 27
static const Tcl_WideUInt wuipow5[27] = {
(Tcl_WideUInt) 1, /* 5**0 */
(Tcl_WideUInt) 5,
(Tcl_WideUInt) 25,
(Tcl_WideUInt) 125,
(Tcl_WideUInt) 625,
(Tcl_WideUInt) 3125, /* 5**5 */
(Tcl_WideUInt) 3125*5,
(Tcl_WideUInt) 3125*25,
(Tcl_WideUInt) 3125*125,
(Tcl_WideUInt) 3125*625,
(Tcl_WideUInt) 3125*3125, /* 5**10 */
(Tcl_WideUInt) 3125*3125*5,
(Tcl_WideUInt) 3125*3125*25,
(Tcl_WideUInt) 3125*3125*125,
(Tcl_WideUInt) 3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125, /* 5**15 */
(Tcl_WideUInt) 3125*3125*3125*5,
(Tcl_WideUInt) 3125*3125*3125*25,
(Tcl_WideUInt) 3125*3125*3125*125,
(Tcl_WideUInt) 3125*3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125*3125, /* 5**20 */
(Tcl_WideUInt) 3125*3125*3125*3125*5,
(Tcl_WideUInt) 3125*3125*3125*3125*25,
(Tcl_WideUInt) 3125*3125*3125*3125*125,
(Tcl_WideUInt) 3125*3125*3125*3125*625,
(Tcl_WideUInt) 3125*3125*3125*3125*3125, /* 5**25 */
(Tcl_WideUInt) 3125*3125*3125*3125*3125*5 /* 5**26 */
static const Tcl_WideUInt wuipow5[] = {
(Tcl_WideUInt) 1U, /* 5**0 */
(Tcl_WideUInt) 5U,
(Tcl_WideUInt) 25U,
(Tcl_WideUInt) 125U,
(Tcl_WideUInt) 625U,
(Tcl_WideUInt) 3125U, /* 5**5 */
(Tcl_WideUInt) 3125U*5U,
(Tcl_WideUInt) 3125U*25U,
(Tcl_WideUInt) 3125U*125U,
(Tcl_WideUInt) 3125U*625U,
(Tcl_WideUInt) 3125U*3125U, /* 5**10 */
(Tcl_WideUInt) 3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U, /* 5**15 */
(Tcl_WideUInt) 3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U, /* 5**20 */
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*25U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*125U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*625U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U, /* 5**25 */
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*5U,
(Tcl_WideUInt) 3125U*3125U*3125U*3125U*3125U*25U /* 5**27 */
};
/*
@@ -4552,7 +4553,7 @@ TclDoubleDigits(
++m2plus;
}
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
/*
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
* then all our intermediate calculations can be done using exact
@@ -4609,7 +4610,7 @@ TclDoubleDigits(
s2 -= b2; b2 = 0;
}
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] <= 64) {
if (s5+1 < N_LOG2POW5 && s2+1 + log2pow5[s5+1] < 64) {
/*
* If 10*2**s2*5**s5 == 2**(s2+1)+5**(s5+1) fits in a 64-bit word,
* then all our intermediate calculations can be done using exact
+21 -10
View File
@@ -3859,9 +3859,10 @@ TclStringCmp(
Tcl_Obj *value2Ptr,
int checkEq, /* comparison is only for equality */
int nocase, /* comparison is not case sensitive */
int reqlength) /* requested length */
int reqlength) /* requested length in characters;
* TCL_INDEX_NONE to compare whole strings */
{
char *s1, *s2;
const char *s1, *s2;
int empty, length, match, s1len, s2len;
memCmpFn_t memCmpFn;
@@ -3886,10 +3887,10 @@ TclStringCmp(
} else if (TclHasInternalRep(value1Ptr, &tclUniCharStringType)
&& TclHasInternalRep(value2Ptr, &tclUniCharStringType)) {
/*
* Do a unicode-specific comparison if both of the args are of
* String type. If the char length == byte length, we can do a
* memcmp. In benchmark testing this proved the most efficient
* check between the unicode and string comparison operations.
* Do a Unicode-specific comparison if both of the args are of String
* type. If the char length == byte length, we can do a memcmp. In
* benchmark testing this proved the most efficient check between the
* Unicode and string comparison operations.
*/
if (nocase) {
@@ -3903,6 +3904,9 @@ TclStringCmp(
&& (value1Ptr->bytes != NULL)
&& (s2len == value2Ptr->length)
&& (value2Ptr->bytes != NULL)) {
/* each byte represents one character so s1l3n, s2l3n, and
* reqlength are in both bytes and characters
*/
s1 = value1Ptr->bytes;
s2 = value2Ptr->bytes;
memCmpFn = memcmp;
@@ -3919,6 +3923,9 @@ TclStringCmp(
memCmpFn = memcmp;
s1len *= sizeof(Tcl_UniChar);
s2len *= sizeof(Tcl_UniChar);
if (reqlength > 0) {
reqlength *= sizeof(Tcl_UniChar);
}
} else {
memCmpFn = (memCmpFn_t)(void *)TclUniCharNcmp;
}
@@ -3960,7 +3967,7 @@ TclStringCmp(
s1 = TclGetStringFromObj(value1Ptr, &s1len);
s2 = TclGetStringFromObj(value2Ptr, &s2len);
}
if (!nocase && checkEq) {
if (!nocase && checkEq && reqlength < 0) {
/*
* When we have equal-length we can check only for
* (in)equality. We can use memcmp in all (n)eq cases because
@@ -3988,19 +3995,23 @@ TclStringCmp(
}
}
/* At this point s1len, s2len, and reqlength should by now have been
* adjusted so that they are all in the units expected by the selected
* comparison function.
*/
length = (s1len < s2len) ? s1len : s2len;
if (reqlength > 0 && reqlength < length) {
length = reqlength;
} else if (reqlength < 0) {
/*
* The requested length is negative, so we ignore it by setting it
* to length + 1 so we correct the match var.
* The requested length is negative, so ignore it by setting it
* to length + 1 to correct the match var.
*/
reqlength = length + 1;
}
if (checkEq && (s1len != s2len)) {
if (checkEq && reqlength < 0 && (s1len != s2len)) {
match = 1; /* This will be reversed below. */
} else {
/*
+12 -7
View File
@@ -31,6 +31,10 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
#ifndef _TCLSTRINGREP
#define _TCLSTRINGREP
/*
* The following structure is the internal rep for a String object. It keeps
@@ -42,15 +46,15 @@
*/
typedef struct {
int numChars; /* The number of chars in the string. -1 means
* this value has not been calculated. >= 0
* means that there is a valid Unicode rep, or
* that the number of UTF bytes == the number
* of chars. */
int allocated; /* The amount of space actually allocated for
Tcl_Size numChars; /* The number of chars in the string.
* TCL_INDEX_NONE means this value has not been
* calculated. Any other means that there is a valid
* Unicode rep, or that the number of UTF bytes ==
* the number of chars. */
Tcl_Size allocated; /* The amount of space actually allocated for
* the UTF string (minus 1 byte for the
* termination char). */
int maxChars; /* Max number of chars that can fit in the
Tcl_Size maxChars; /* Max number of chars that can fit in the
* space allocated for the unicode array. */
int hasUnicode; /* Boolean determining whether the string has
* a Unicode representation. */
@@ -84,6 +88,7 @@ typedef struct {
((objPtr)->internalRep.twoPtrValue.ptr2 = NULL), \
((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (stringPtr))
#endif /* _TCLSTRINGREP */
/*
* Local Variables:
* mode: c
+12 -2
View File
@@ -232,6 +232,8 @@ int TclParseArgsObjv(Tcl_Interp *interp,
#define TclBN_mp_mul_2d mp_mul_2d
#define TclBN_mp_neg mp_neg
#define TclBN_mp_or mp_or
#define TclBN_mp_pack mp_pack
#define TclBN_mp_pack_count mp_pack_count
#define TclBN_mp_radix_size mp_radix_size
#define TclBN_mp_reverse mp_reverse
#define TclBN_mp_read_radix mp_read_radix
@@ -380,6 +382,7 @@ mp_err TclBN_mp_mul_d(const mp_int *a, unsigned int b, mp_int *c) {
# define TclGetLoadedPackages 0
# undef TclSetPreInitScript
# define TclSetPreInitScript 0
# define TclInitCompiledLocals 0
#else
#define TclGuessPackageName guessPackageName
@@ -794,6 +797,7 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
# undef TclBN_s_mp_sub
# define TclBN_s_mp_sub 0
# define Tcl_MakeSafe 0
# define TclpHasSockets 0
#else /* TCL_NO_DEPRECATED */
# define Tcl_SeekOld seekOld
# define Tcl_TellOld tellOld
@@ -817,6 +821,8 @@ static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){
# define TclpGmtime_unix TclpGmtime
# define Tcl_MakeSafe TclMakeSafe
int TclpHasSockets(TCL_UNUSED(Tcl_Interp *)) {return TCL_OK;}
static int
seekOld(
Tcl_Channel chan, /* The channel on which to seek. */
@@ -1321,12 +1327,12 @@ const TclTomMathStubs tclTomMathStubs = {
TclBN_mp_get_mag_u64, /* 69 */
TclBN_mp_set_i64, /* 70 */
TclBN_mp_unpack, /* 71 */
0, /* 72 */
TclBN_mp_pack, /* 72 */
TclBN_mp_tc_and, /* 73 */
TclBN_mp_tc_or, /* 74 */
TclBN_mp_tc_xor, /* 75 */
TclBN_mp_signed_rsh, /* 76 */
0, /* 77 */
TclBN_mp_pack_count, /* 77 */
TclBN_mp_to_ubin, /* 78 */
TclBN_mp_div_ld, /* 79 */
TclBN_mp_to_radix, /* 80 */
@@ -2049,6 +2055,10 @@ const TclStubs tclStubs = {
Tcl_GetNumber, /* 681 */
Tcl_RemoveChannelMode, /* 682 */
Tcl_GetEncodingNulLength, /* 683 */
Tcl_GetWideUIntFromObj, /* 684 */
Tcl_DStringToObj, /* 685 */
0, /* 686 */
TclUnusedStubEntry, /* 687 */
};
/* !END!: Do not edit above this line. */
+57 -24
View File
@@ -20,10 +20,12 @@
#ifndef USE_TCL_STUBS
# define USE_TCL_STUBS
#endif
#undef TCL_UTF_MAX
#ifdef TCL_NO_DEPRECATED
# define TCL_UTF_MAX 4
#else
# define TCL_NO_DEPRECATED
# define TCL_UTF_MAX 3
#endif
#include "tclInt.h"
#ifdef TCL_WITH_EXTERNAL_TOMMATH
@@ -298,7 +300,7 @@ static Tcl_ObjCmdProc TestprintObjCmd;
static Tcl_ObjCmdProc TestregexpObjCmd;
static Tcl_ObjCmdProc TestreturnObjCmd;
static void TestregexpXflags(const char *string,
int length, int *cflagsPtr, int *eflagsPtr);
size_t length, int *cflagsPtr, int *eflagsPtr);
#ifndef TCL_NO_DEPRECATED
static Tcl_ObjCmdProc TestsaveresultCmd;
static void TestsaveresultFree(char *blockPtr);
@@ -552,7 +554,7 @@ Tcltest_Init(
{
Tcl_CmdInfo info;
Tcl_Obj **objv, *objPtr;
size_t objc;
Tcl_Size objc;
int index;
static const char *const specialOptions[] = {
"-appinitprocerror", "-appinitprocdeleteinterp",
@@ -997,7 +999,8 @@ AsyncHandlerProc(
{
TestAsyncHandler *asyncPtr;
int id = PTR2INT(clientData);
const char *listArgv[4], *cmd;
const char *listArgv[4];
char *cmd;
char string[TCL_INTEGER_SPACE];
Tcl_MutexLock(&asyncTestMutex);
@@ -1934,6 +1937,11 @@ TestdstringCmd(
goto wrongNumArgs;
}
Tcl_DStringResult(interp, &dstring);
} else if (strcmp(argv[1], "toobj") == 0) {
if (argc != 2) {
goto wrongNumArgs;
}
Tcl_SetObjResult(interp, Tcl_DStringToObj(&dstring));
} else if (strcmp(argv[1], "trunc") == 0) {
if (argc != 3) {
goto wrongNumArgs;
@@ -1949,8 +1957,8 @@ TestdstringCmd(
Tcl_DStringStartSublist(&dstring);
} else {
Tcl_AppendResult(interp, "bad option \"", argv[1],
"\": must be append, element, end, free, get, length, "
"result, trunc, or start", NULL);
"\": must be append, element, end, free, get, gresult, length, "
"result, start, toobj, or trunc", NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -3114,12 +3122,29 @@ TestlinkCmd(
tmp = Tcl_NewWideIntObj(longVar);
Tcl_AppendElement(interp, Tcl_GetString(tmp));
Tcl_DecrRefCount(tmp);
tmp = Tcl_NewWideIntObj((long)ulongVar);
#ifdef TCL_WIDE_INT_IS_LONG
if (ulongVar > WIDE_MAX) {
mp_int bignumValue;
if (mp_init_u64(&bignumValue, ulongVar) != MP_OKAY) {
Tcl_Panic("%s: memory overflow", "Tcl_SetWideUIntObj");
}
tmp = Tcl_NewBignumObj(&bignumValue);
} else
#endif /* TCL_WIDE_INT_IS_LONG */
tmp = Tcl_NewWideIntObj((Tcl_WideInt)ulongVar);
Tcl_AppendElement(interp, Tcl_GetString(tmp));
Tcl_DecrRefCount(tmp);
Tcl_PrintDouble(NULL, (double)floatVar, buffer);
Tcl_AppendElement(interp, buffer);
tmp = Tcl_NewWideIntObj((Tcl_WideInt)uwideVar);
if (uwideVar > WIDE_MAX) {
mp_int bignumValue;
if (mp_init_u64(&bignumValue, uwideVar) != MP_OKAY) {
Tcl_Panic("%s: memory overflow", "Tcl_SetWideUIntObj");
}
tmp = Tcl_NewBignumObj(&bignumValue);
} else {
tmp = Tcl_NewWideIntObj((Tcl_WideInt)uwideVar);
}
Tcl_AppendElement(interp, Tcl_GetString(tmp));
Tcl_DecrRefCount(tmp);
} else if (strcmp(argv[1], "set") == 0) {
@@ -3525,24 +3550,28 @@ TestlistrepCmd(
Tcl_WrongNumArgs(interp, 2, objv, "length ?leadSpace endSpace?");
return TCL_ERROR;
} else {
int length;
int leadSpace = 0;
int endSpace = 0;
if (Tcl_GetIntFromObj(interp, objv[2], &length) != TCL_OK) {
Tcl_WideUInt length;
Tcl_WideUInt leadSpace = 0;
Tcl_WideUInt endSpace = 0;
if (Tcl_GetWideUIntFromObj(interp, objv[2], &length) != TCL_OK) {
return TCL_ERROR;
}
if (objc > 3) {
if (Tcl_GetIntFromObj(interp, objv[3], &leadSpace) != TCL_OK) {
if (Tcl_GetWideUIntFromObj(interp, objv[3], &leadSpace) != TCL_OK) {
return TCL_ERROR;
}
if (objc > 4) {
if (Tcl_GetIntFromObj(interp, objv[4], &endSpace)
if (Tcl_GetWideUIntFromObj(interp, objv[4], &endSpace)
!= TCL_OK) {
return TCL_ERROR;
}
}
}
resultObj = TclListTestObj(length, leadSpace, endSpace);
if (resultObj == NULL) {
Tcl_AppendResult(interp, "List capacity exceeded", NULL);
return TCL_ERROR;
}
}
break;
@@ -3559,7 +3588,7 @@ TestlistrepCmd(
return TCL_ERROR;
} else {
Tcl_Obj **objs;
ListSizeT nobjs;
Tcl_Size nobjs;
ListRep listRep;
Tcl_Obj *listRepObjs[4];
@@ -4340,11 +4369,11 @@ TestregexpObjCmd(
static void
TestregexpXflags(
const char *string, /* The string of flags. */
int length, /* The length of the string in bytes. */
size_t length, /* The length of the string in bytes. */
int *cflagsPtr, /* compile flags word */
int *eflagsPtr) /* exec flags word */
{
int i;
size_t i;
int cflags, eflags;
cflags = *cflagsPtr;
@@ -5362,12 +5391,17 @@ TestsetbytearraylengthObjCmd(
if (TCL_OK != Tcl_GetIntFromObj(interp, objv[2], &n)) {
return TCL_ERROR;
}
if (Tcl_IsShared(objv[1])) {
obj = Tcl_DuplicateObj(objv[1]);
} else {
obj = objv[1];
obj = objv[1];
if (Tcl_IsShared(obj)) {
obj = Tcl_DuplicateObj(obj);
}
if (Tcl_SetByteArrayLength(obj, n) == NULL) {
if (obj != objv[1]) {
Tcl_DecrRefCount(obj);
}
Tcl_AppendResult(interp, "expected bytes", NULL);
return TCL_ERROR;
}
Tcl_SetByteArrayLength(obj, n);
Tcl_SetObjResult(interp, obj);
return TCL_OK;
}
@@ -6651,15 +6685,14 @@ TestWrongNumArgsObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int i;
int length;
int i, length;
const char *msg;
if (objc < 3) {
goto insufArgs;
}
if (Tcl_GetIntFromObj(interp, objv[1], &i) != TCL_OK) {
if (Tcl_GetIntForIndex(interp, objv[1], TCL_INDEX_NONE, &i) != TCL_OK) {
return TCL_ERROR;
}
+7
View File
@@ -247,6 +247,10 @@ declare 71 {
mp_err MP_WUR TclBN_mp_unpack(mp_int *rop, size_t count, mp_order order, size_t size,
mp_endian endian, size_t nails, const void *op)
}
declare 72 {
mp_err MP_WUR TclBN_mp_pack(void *rop, size_t maxcount, size_t *written, mp_order order,
size_t size, mp_endian endian, size_t nails, const mp_int *op)
}
# Added in libtommath 1.1.0
declare 73 {deprecated {merged with mp_and}} {
@@ -261,6 +265,9 @@ declare 75 {deprecated {merged with mp_xor}} {
declare 76 {
mp_err MP_WUR TclBN_mp_signed_rsh(const mp_int *a, int b, mp_int *c)
}
declare 77 {
size_t MP_WUR TclBN_mp_pack_count(const mp_int *a, size_t nails, size_t size)
}
# Added in libtommath 1.2.0
declare 78 {
+1 -1
View File
@@ -4,7 +4,7 @@
#ifdef MP_NO_STDINT
# ifdef HAVE_STDINT_H
# include <stdint.h>
#else
# else
# include "../compat/stdint.h"
# endif
#endif
+16 -6
View File
@@ -125,6 +125,8 @@ MODULE_SCOPE mp_err TclBN_mp_set_int(mp_int *a, unsigned long b);
#define mp_mul_2d TclBN_mp_mul_2d
#define mp_neg TclBN_mp_neg
#define mp_or TclBN_mp_or
#define mp_pack TclBN_mp_pack
#define mp_pack_count TclBN_mp_pack_count
#define mp_radix_size TclBN_mp_radix_size
#define mp_read_radix TclBN_mp_read_radix
#define mp_rshd TclBN_mp_rshd
@@ -394,7 +396,11 @@ EXTERN mp_err TclBN_mp_unpack(mp_int *rop, size_t count,
mp_order order, size_t size,
mp_endian endian, size_t nails,
const void *op) MP_WUR;
/* Slot 72 is reserved */
/* 72 */
EXTERN mp_err TclBN_mp_pack(void *rop, size_t maxcount,
size_t *written, mp_order order, size_t size,
mp_endian endian, size_t nails,
const mp_int *op) MP_WUR;
/* 73 */
TCL_DEPRECATED("merged with mp_and")
mp_err TclBN_mp_tc_and(const mp_int *a, const mp_int *b,
@@ -410,7 +416,9 @@ mp_err TclBN_mp_tc_xor(const mp_int *a, const mp_int *b,
/* 76 */
EXTERN mp_err TclBN_mp_signed_rsh(const mp_int *a, int b,
mp_int *c) MP_WUR;
/* Slot 77 is reserved */
/* 77 */
EXTERN size_t TclBN_mp_pack_count(const mp_int *a, size_t nails,
size_t size) MP_WUR;
/* 78 */
EXTERN int TclBN_mp_to_ubin(const mp_int *a, unsigned char *buf,
size_t maxlen, size_t *written) MP_WUR;
@@ -497,12 +505,12 @@ typedef struct TclTomMathStubs {
uint64_t (*tclBN_mp_get_mag_u64) (const mp_int *a) MP_WUR; /* 69 */
void (*tclBN_mp_set_i64) (mp_int *a, int64_t i); /* 70 */
mp_err (*tclBN_mp_unpack) (mp_int *rop, size_t count, mp_order order, size_t size, mp_endian endian, size_t nails, const void *op) MP_WUR; /* 71 */
void (*reserved72)(void);
mp_err (*tclBN_mp_pack) (void *rop, size_t maxcount, size_t *written, mp_order order, size_t size, mp_endian endian, size_t nails, const mp_int *op) MP_WUR; /* 72 */
TCL_DEPRECATED_API("merged with mp_and") mp_err (*tclBN_mp_tc_and) (const mp_int *a, const mp_int *b, mp_int *c); /* 73 */
TCL_DEPRECATED_API("merged with mp_or") mp_err (*tclBN_mp_tc_or) (const mp_int *a, const mp_int *b, mp_int *c); /* 74 */
TCL_DEPRECATED_API("merged with mp_xor") mp_err (*tclBN_mp_tc_xor) (const mp_int *a, const mp_int *b, mp_int *c); /* 75 */
mp_err (*tclBN_mp_signed_rsh) (const mp_int *a, int b, mp_int *c) MP_WUR; /* 76 */
void (*reserved77)(void);
size_t (*tclBN_mp_pack_count) (const mp_int *a, size_t nails, size_t size) MP_WUR; /* 77 */
int (*tclBN_mp_to_ubin) (const mp_int *a, unsigned char *buf, size_t maxlen, size_t *written) MP_WUR; /* 78 */
mp_err (*tclBN_mp_div_ld) (const mp_int *a, uint64_t b, mp_int *q, uint64_t *r) MP_WUR; /* 79 */
int (*tclBN_mp_to_radix) (const mp_int *a, char *str, size_t maxlen, size_t *written, int radix) MP_WUR; /* 80 */
@@ -664,7 +672,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
(tclTomMathStubsPtr->tclBN_mp_set_i64) /* 70 */
#define TclBN_mp_unpack \
(tclTomMathStubsPtr->tclBN_mp_unpack) /* 71 */
/* Slot 72 is reserved */
#define TclBN_mp_pack \
(tclTomMathStubsPtr->tclBN_mp_pack) /* 72 */
#define TclBN_mp_tc_and \
(tclTomMathStubsPtr->tclBN_mp_tc_and) /* 73 */
#define TclBN_mp_tc_or \
@@ -673,7 +682,8 @@ extern const TclTomMathStubs *tclTomMathStubsPtr;
(tclTomMathStubsPtr->tclBN_mp_tc_xor) /* 75 */
#define TclBN_mp_signed_rsh \
(tclTomMathStubsPtr->tclBN_mp_signed_rsh) /* 76 */
/* Slot 77 is reserved */
#define TclBN_mp_pack_count \
(tclTomMathStubsPtr->tclBN_mp_pack_count) /* 77 */
#define TclBN_mp_to_ubin \
(tclTomMathStubsPtr->tclBN_mp_to_ubin) /* 78 */
#define TclBN_mp_div_ld \
+136 -117
View File
@@ -21,8 +21,8 @@
typedef struct {
int flags; /* Operations for which Tcl command is to be
* invoked. */
size_t length; /* Number of non-NUL chars. in command. */
char command[1]; /* Space for Tcl command to invoke. Actual
Tcl_Size length; /* Number of non-NUL chars. in command. */
char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
* size will be as large as necessary to hold
* command. This field must be the last in the
* structure, so that it can be larger than 1
@@ -41,10 +41,10 @@ typedef struct {
typedef struct {
int flags; /* Operations for which Tcl command is to be
* invoked. */
size_t length; /* Number of non-NUL chars. in command. */
Tcl_Size length; /* Number of non-NUL chars. in command. */
Tcl_Trace stepTrace; /* Used for execution traces, when tracing
* inside the given command */
int startLevel; /* Used for bookkeeping with step execution
Tcl_Size startLevel; /* Used for bookkeeping with step execution
* traces, store the level at which the step
* trace was invoked */
char *startCmd; /* Used for bookkeeping with step execution
@@ -56,7 +56,7 @@ typedef struct {
* deleted too early. Keeps track of how many
* pieces of code have a pointer to this
* structure. */
char command[1]; /* Space for Tcl command to invoke. Actual
char command[TCLFLEXARRAY]; /* Space for Tcl command to invoke. Actual
* size will be as large as necessary to hold
* command. This field must be the last in the
* structure, so that it can be larger than 1
@@ -92,8 +92,15 @@ typedef struct {
* Forward declarations for functions defined in this file:
*/
typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, int optionIndex,
int objc, Tcl_Obj *const objv[]);
/* 'OLD' options are pre-Tcl-8.4 style */
enum traceOptionsEnum {
TRACE_ADD, TRACE_INFO, TRACE_REMOVE
#ifndef TCL_REMOVE_OBSOLETE_TRACES
,TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
#endif
};
typedef int (Tcl_TraceTypeObjCmd)(Tcl_Interp *interp, enum traceOptionsEnum optionIndex,
Tcl_Size objc, Tcl_Obj *const objv[]);
static Tcl_TraceTypeObjCmd TraceVariableObjCmd;
static Tcl_TraceTypeObjCmd TraceCommandObjCmd;
@@ -120,19 +127,19 @@ static Tcl_TraceTypeObjCmd *const traceSubCmds[] = {
*/
static int CallTraceFunction(Tcl_Interp *interp, Trace *tracePtr,
Command *cmdPtr, const char *command, int numChars,
int objc, Tcl_Obj *const objv[]);
static char * TraceVarProc(ClientData clientData, Tcl_Interp *interp,
Command *cmdPtr, const char *command, Tcl_Size numChars,
Tcl_Size objc, Tcl_Obj *const objv[]);
static char * TraceVarProc(void *clientData, Tcl_Interp *interp,
const char *name1, const char *name2, int flags);
static void TraceCommandProc(ClientData clientData,
static void TraceCommandProc(void *clientData,
Tcl_Interp *interp, const char *oldName,
const char *newName, int flags);
static Tcl_CmdObjTraceProc TraceExecutionProc;
static int StringTraceProc(ClientData clientData,
Tcl_Interp *interp, int level,
static int StringTraceProc(void *clientData,
Tcl_Interp *interp, Tcl_Size level,
const char *command, Tcl_Command commandInfo,
int objc, Tcl_Obj *const objv[]);
static void StringTraceDeleteProc(ClientData clientData);
Tcl_Size objc, Tcl_Obj *const objv[]);
static void StringTraceDeleteProc(void *clientData);
static void DisposeTraceResult(int flags, char *result);
static int TraceVarEx(Tcl_Interp *interp, const char *part1,
const char *part2, VarTrace *tracePtr);
@@ -143,7 +150,7 @@ static int TraceVarEx(Tcl_Interp *interp, const char *part1,
*/
typedef struct {
ClientData clientData; /* Client data from Tcl_CreateTrace */
void *clientData; /* Client data from Tcl_CreateTrace */
Tcl_CmdTraceProc *proc; /* Trace function from Tcl_CreateTrace */
} StringTraceData;
@@ -185,10 +192,9 @@ int
Tcl_TraceObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int optionIndex;
#ifndef TCL_REMOVE_OBSOLETE_TRACES
const char *name;
const char *flagOps, *p;
@@ -201,13 +207,7 @@ Tcl_TraceObjCmd(
#endif
NULL
};
/* 'OLD' options are pre-Tcl-8.4 style */
enum traceOptionsEnum {
TRACE_ADD, TRACE_INFO, TRACE_REMOVE,
#ifndef TCL_REMOVE_OBSOLETE_TRACES
TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
#endif
};
int optionIndex;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg ...?");
@@ -237,7 +237,7 @@ Tcl_TraceObjCmd(
0, &typeIndex) != TCL_OK) {
return TCL_ERROR;
}
return traceSubCmds[typeIndex](interp, optionIndex, objc, objv);
return traceSubCmds[typeIndex](interp, (enum traceOptionsEnum)optionIndex, objc, objv);
}
case TRACE_INFO: {
/*
@@ -260,7 +260,7 @@ Tcl_TraceObjCmd(
0, &typeIndex) != TCL_OK) {
return TCL_ERROR;
}
return traceSubCmds[typeIndex](interp, optionIndex, objc, objv);
return traceSubCmds[typeIndex](interp, (enum traceOptionsEnum)optionIndex, objc, objv);
break;
}
@@ -312,7 +312,7 @@ Tcl_TraceObjCmd(
return code;
}
case TRACE_OLD_VINFO: {
ClientData clientData;
void *clientData;
char ops[5];
Tcl_Obj *resultListPtr, *pairObjPtr, *elemObjPtr;
@@ -397,16 +397,12 @@ Tcl_TraceObjCmd(
static int
TraceExecutionObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
int optionIndex, /* Add, info or remove */
int objc, /* Number of arguments. */
enum traceOptionsEnum optionIndex, /* Add, info or remove */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int commandLength, index;
const char *name, *command;
size_t length;
enum traceOptions {
TRACE_ADD, TRACE_INFO, TRACE_REMOVE
};
Tcl_Size length;
static const char *const opStrings[] = {
"enter", "leave", "enterstep", "leavestep", NULL
};
@@ -414,12 +410,13 @@ TraceExecutionObjCmd(
TRACE_EXEC_ENTER, TRACE_EXEC_LEAVE,
TRACE_EXEC_ENTER_STEP, TRACE_EXEC_LEAVE_STEP
};
int index;
switch ((enum traceOptions) optionIndex) {
switch (optionIndex) {
case TRACE_ADD:
case TRACE_REMOVE: {
int flags = 0;
int i, listLen, result;
int flags = 0, result;
Tcl_Size i, listLen;
Tcl_Obj **elemPtrs;
if (objc != 6) {
@@ -432,7 +429,7 @@ TraceExecutionObjCmd(
* pointer to its array of element pointers.
*/
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
result = TclListObjLengthM(interp, objv[4], &listLen);
if (result != TCL_OK) {
return result;
}
@@ -444,6 +441,10 @@ TraceExecutionObjCmd(
NULL);
return TCL_ERROR;
}
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
if (result != TCL_OK) {
return result;
}
for (i = 0; i < listLen; i++) {
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
"operation", TCL_EXACT, &index) != TCL_OK) {
@@ -464,9 +465,8 @@ TraceExecutionObjCmd(
break;
}
}
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
command = TclGetStringFromObj(objv[5], &length);
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
offsetof(TraceCommandInfo, command) + 1 + length);
@@ -495,7 +495,7 @@ TraceExecutionObjCmd(
* first one that matches.
*/
ClientData clientData;
void *clientData;
/*
* First ensure the name given is valid.
@@ -519,7 +519,7 @@ TraceExecutionObjCmd(
&& ((tcmdPtr->flags & (TCL_TRACE_ANY_EXEC |
TCL_TRACE_RENAME | TCL_TRACE_DELETE)) == flags)
&& (strncmp(command, tcmdPtr->command,
(size_t) length) == 0)) {
length) == 0)) {
flags |= TCL_TRACE_DELETE;
if (flags & (TCL_TRACE_ENTER_DURING_EXEC |
TCL_TRACE_LEAVE_DURING_EXEC)) {
@@ -554,7 +554,7 @@ TraceExecutionObjCmd(
break;
}
case TRACE_INFO: {
ClientData clientData;
void *clientData;
Tcl_Obj *resultListPtr;
if (objc != 4) {
@@ -574,7 +574,7 @@ TraceExecutionObjCmd(
resultListPtr = Tcl_NewListObj(0, NULL);
FOREACH_COMMAND_TRACE(interp, name, clientData) {
int numOps = 0;
Tcl_Size numOps = 0;
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
@@ -619,6 +619,10 @@ TraceExecutionObjCmd(
Tcl_SetObjResult(interp, resultListPtr);
break;
}
#ifndef TCL_REMOVE_OBSOLETE_TRACES
default:
break;
#endif
}
return TCL_OK;
}
@@ -645,22 +649,21 @@ TraceExecutionObjCmd(
static int
TraceCommandObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
int optionIndex, /* Add, info or remove */
int objc, /* Number of arguments. */
enum traceOptionsEnum optionIndex, /* Add, info or remove */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int commandLength, index;
const char *name, *command;
size_t length;
enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE };
Tcl_Size length;
static const char *const opStrings[] = { "delete", "rename", NULL };
enum operations { TRACE_CMD_DELETE, TRACE_CMD_RENAME };
int index;
switch ((enum traceOptions) optionIndex) {
switch (optionIndex) {
case TRACE_ADD:
case TRACE_REMOVE: {
int flags = 0;
int i, listLen, result;
int flags = 0, result;
Tcl_Size i, listLen;
Tcl_Obj **elemPtrs;
if (objc != 6) {
@@ -673,7 +676,7 @@ TraceCommandObjCmd(
* pointer to its array of element pointers.
*/
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
result = TclListObjLengthM(interp, objv[4], &listLen);
if (result != TCL_OK) {
return result;
}
@@ -685,7 +688,10 @@ TraceCommandObjCmd(
NULL);
return TCL_ERROR;
}
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
if (result != TCL_OK) {
return result;
}
for (i = 0; i < listLen; i++) {
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
"operation", TCL_EXACT, &index) != TCL_OK) {
@@ -701,9 +707,8 @@ TraceCommandObjCmd(
}
}
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
command = TclGetStringFromObj(objv[5], &length);
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)ckalloc(
offsetof(TraceCommandInfo, command) + 1 + length);
@@ -728,7 +733,7 @@ TraceCommandObjCmd(
* first one that matches.
*/
ClientData clientData;
void *clientData;
/*
* First ensure the name given is valid.
@@ -744,7 +749,7 @@ TraceCommandObjCmd(
if ((tcmdPtr->length == length) && (tcmdPtr->flags == flags)
&& (strncmp(command, tcmdPtr->command,
(size_t) length) == 0)) {
length) == 0)) {
Tcl_UntraceCommand(interp, name, flags | TCL_TRACE_DELETE,
TraceCommandProc, clientData);
tcmdPtr->flags |= TCL_TRACE_DESTROYED;
@@ -758,7 +763,7 @@ TraceCommandObjCmd(
break;
}
case TRACE_INFO: {
ClientData clientData;
void *clientData;
Tcl_Obj *resultListPtr;
if (objc != 4) {
@@ -777,7 +782,7 @@ TraceCommandObjCmd(
resultListPtr = Tcl_NewListObj(0, NULL);
FOREACH_COMMAND_TRACE(interp, name, clientData) {
int numOps = 0;
Tcl_Size numOps = 0;
Tcl_Obj *opObj, *eachTraceObjPtr, *elemObjPtr;
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
@@ -813,6 +818,10 @@ TraceCommandObjCmd(
Tcl_SetObjResult(interp, resultListPtr);
break;
}
#ifndef TCL_REMOVE_OBSOLETE_TRACES
default:
break;
#endif
}
return TCL_OK;
}
@@ -839,27 +848,26 @@ TraceCommandObjCmd(
static int
TraceVariableObjCmd(
Tcl_Interp *interp, /* Current interpreter. */
int optionIndex, /* Add, info or remove */
int objc, /* Number of arguments. */
enum traceOptionsEnum optionIndex, /* Add, info or remove */
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
int commandLength, index;
const char *name, *command;
size_t length;
ClientData clientData;
enum traceOptions { TRACE_ADD, TRACE_INFO, TRACE_REMOVE };
Tcl_Size length;
void *clientData;
static const char *const opStrings[] = {
"array", "read", "unset", "write", NULL
};
enum operations {
TRACE_VAR_ARRAY, TRACE_VAR_READ, TRACE_VAR_UNSET, TRACE_VAR_WRITE
};
int index;
switch ((enum traceOptions) optionIndex) {
switch ((enum traceOptionsEnum) optionIndex) {
case TRACE_ADD:
case TRACE_REMOVE: {
int flags = 0;
int i, listLen, result;
int flags = 0, result;
Tcl_Size i, listLen;
Tcl_Obj **elemPtrs;
if (objc != 6) {
@@ -872,7 +880,7 @@ TraceVariableObjCmd(
* pointer to its array of element pointers.
*/
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
result = TclListObjLengthM(interp, objv[4], &listLen);
if (result != TCL_OK) {
return result;
}
@@ -884,6 +892,10 @@ TraceVariableObjCmd(
NULL);
return TCL_ERROR;
}
result = TclListObjGetElementsM(interp, objv[4], &listLen, &elemPtrs);
if (result != TCL_OK) {
return result;
}
for (i = 0; i < listLen ; i++) {
if (Tcl_GetIndexFromObj(interp, elemPtrs[i], opStrings,
"operation", TCL_EXACT, &index) != TCL_OK) {
@@ -904,9 +916,8 @@ TraceVariableObjCmd(
break;
}
}
command = TclGetStringFromObj(objv[5], &commandLength);
length = (size_t) commandLength;
if ((enum traceOptions) optionIndex == TRACE_ADD) {
command = TclGetStringFromObj(objv[5], &length);
if ((enum traceOptionsEnum) optionIndex == TRACE_ADD) {
CombinedTraceVarInfo *ctvarPtr = (CombinedTraceVarInfo *)ckalloc(
offsetof(CombinedTraceVarInfo, traceCmdInfo.command)
+ 1 + length);
@@ -947,7 +958,7 @@ TraceVariableObjCmd(
#endif
)==flags)
&& (strncmp(command, tvarPtr->command,
(size_t) length) == 0)) {
length) == 0)) {
Tcl_UntraceVar2(interp, name, NULL,
flags | TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT,
TraceVarProc, clientData);
@@ -1005,6 +1016,10 @@ TraceVariableObjCmd(
Tcl_SetObjResult(interp, resultListPtr);
break;
}
#ifndef TCL_REMOVE_OBSOLETE_TRACES
default:
break;
#endif
}
return TCL_OK;
}
@@ -1034,13 +1049,13 @@ TraceVariableObjCmd(
*----------------------------------------------------------------------
*/
ClientData
void *
Tcl_CommandTraceInfo(
Tcl_Interp *interp, /* Interpreter containing command. */
const char *cmdName, /* Name of command. */
TCL_UNUSED(int) /*flags*/,
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
ClientData prevClientData) /* If non-NULL, gives last value returned by
void *prevClientData) /* If non-NULL, gives last value returned by
* this function, so this call will return the
* next trace after that one. If NULL, this
* call will return the first trace. */
@@ -1108,7 +1123,7 @@ Tcl_TraceCommand(
* of the TRACE_*_EXEC flags */
Tcl_CommandTraceProc *proc, /* Function to call when specified ops are
* invoked upon cmdName. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
void *clientData) /* Arbitrary argument to pass to proc. */
{
Command *cmdPtr;
CommandTrace *tracePtr;
@@ -1172,7 +1187,7 @@ Tcl_UntraceCommand(
* TCL_TRACE_RENAME, TCL_TRACE_DELETE, and any
* of the TRACE_*_EXEC flags */
Tcl_CommandTraceProc *proc, /* Function assocated with trace. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
void *clientData) /* Arbitrary argument to pass to proc. */
{
CommandTrace *tracePtr;
CommandTrace *prevPtr;
@@ -1277,7 +1292,7 @@ Tcl_UntraceCommand(
static void
TraceCommandProc(
ClientData clientData, /* Information about the command trace. */
void *clientData, /* Information about the command trace. */
Tcl_Interp *interp, /* Interpreter containing command. */
const char *oldName, /* Name of command being changed. */
const char *newName, /* New name of command. Empty string or NULL
@@ -1300,7 +1315,7 @@ TraceCommandProc(
*/
Tcl_DStringInit(&cmd);
Tcl_DStringAppend(&cmd, tcmdPtr->command, (int) tcmdPtr->length);
Tcl_DStringAppend(&cmd, tcmdPtr->command, tcmdPtr->length);
Tcl_DStringAppendElement(&cmd, oldName);
Tcl_DStringAppendElement(&cmd, (newName ? newName : ""));
if (flags & TCL_TRACE_RENAME) {
@@ -1418,17 +1433,17 @@ TclCheckExecutionTraces(
Tcl_Interp *interp, /* The current interpreter. */
const char *command, /* Pointer to beginning of the current command
* string. */
TCL_UNUSED(int) /*numChars*/,
TCL_UNUSED(Tcl_Size) /*numChars*/,
Command *cmdPtr, /* Points to command's Command struct. */
int code, /* The current result code. */
int traceFlags, /* Current tracing situation. */
int objc, /* Number of arguments for the command. */
Tcl_Size objc, /* Number of arguments for the command. */
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
{
Interp *iPtr = (Interp *) interp;
CommandTrace *tracePtr, *lastTracePtr;
ActiveCommandTrace active;
int curLevel;
Tcl_Size curLevel;
int traceCode = TCL_OK;
Tcl_InterpState state = NULL;
@@ -1523,18 +1538,18 @@ TclCheckInterpTraces(
Tcl_Interp *interp, /* The current interpreter. */
const char *command, /* Pointer to beginning of the current command
* string. */
int numChars, /* The number of characters in 'command' which
Tcl_Size numChars, /* The number of characters in 'command' which
* are part of the command string. */
Command *cmdPtr, /* Points to command's Command struct. */
int code, /* The current result code. */
int traceFlags, /* Current tracing situation. */
int objc, /* Number of arguments for the command. */
Tcl_Size objc, /* Number of arguments for the command. */
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
{
Interp *iPtr = (Interp *) interp;
Trace *tracePtr, *lastTracePtr;
ActiveInterpTrace active;
int curLevel;
Tcl_Size curLevel;
int traceCode = TCL_OK;
Tcl_InterpState state = NULL;
@@ -1670,9 +1685,9 @@ CallTraceFunction(
Command *cmdPtr, /* Points to command's Command struct. */
const char *command, /* Points to the first character of the
* command's source before substitutions. */
int numChars, /* The number of characters in the command's
Tcl_Size numChars, /* The number of characters in the command's
* source. */
int objc, /* Number of arguments for the command. */
Tcl_Size objc, /* Number of arguments for the command. */
Tcl_Obj *const objv[]) /* Pointers to Tcl_Obj of each argument. */
{
Interp *iPtr = (Interp *) interp;
@@ -1717,7 +1732,7 @@ CallTraceFunction(
static void
CommandObjTraceDeleted(
ClientData clientData)
void *clientData)
{
TraceCommandInfo *tcmdPtr = (TraceCommandInfo *)clientData;
@@ -1753,12 +1768,12 @@ CommandObjTraceDeleted(
static int
TraceExecutionProc(
ClientData clientData,
void *clientData,
Tcl_Interp *interp,
int level,
Tcl_Size level,
const char *command,
TCL_UNUSED(Tcl_Command),
int objc,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
int call = 0;
@@ -1813,10 +1828,11 @@ TraceExecutionProc(
if (call) {
Tcl_DString cmd, sub;
int i, saveInterpFlags;
Tcl_Size i;
int saveInterpFlags;
Tcl_DStringInit(&cmd);
Tcl_DStringAppend(&cmd, tcmdPtr->command, (int)tcmdPtr->length);
Tcl_DStringAppend(&cmd, tcmdPtr->command, tcmdPtr->length);
/*
* Append command with arguments.
@@ -1960,7 +1976,7 @@ TraceExecutionProc(
static char *
TraceVarProc(
ClientData clientData, /* Information about the variable trace. */
void *clientData, /* Information about the variable trace. */
Tcl_Interp *interp, /* Interpreter containing variable. */
const char *name1, /* Name of variable or array. */
const char *name2, /* Name of element within array; NULL means
@@ -1984,14 +2000,14 @@ TraceVarProc(
result = NULL;
if ((tvarPtr->flags & flags) && !Tcl_InterpDeleted(interp)
&& !Tcl_LimitExceeded(interp)) {
if (tvarPtr->length != (size_t) 0) {
if (tvarPtr->length) {
/*
* Generate a command to execute by appending list elements for
* the two variable names and the operation.
*/
Tcl_DStringInit(&cmd);
Tcl_DStringAppend(&cmd, tvarPtr->command, (int) tvarPtr->length);
Tcl_DStringAppend(&cmd, tvarPtr->command, tvarPtr->length);
Tcl_DStringAppendElement(&cmd, name1);
Tcl_DStringAppendElement(&cmd, (name2 ? name2 : ""));
#ifndef TCL_REMOVE_OBSOLETE_TRACES
@@ -2069,7 +2085,7 @@ TraceVarProc(
/*
*----------------------------------------------------------------------
*
* Tcl_CreateObjTrace --
* Tcl_CreateObjTrace/Tcl_CreateObjTrace2 --
*
* Arrange for a function to be called to trace command execution.
*
@@ -2082,7 +2098,7 @@ TraceVarProc(
* called to execute a Tcl command. Calls to proc will have the following
* form:
*
* void proc(ClientData clientData,
* void proc(void * clientData,
* Tcl_Interp * interp,
* int level,
* const char * command,
@@ -2130,13 +2146,16 @@ typedef struct {
static int traceWrapperProc(
void *clientData,
Tcl_Interp *interp,
int level,
Tcl_Size level,
const char *command,
Tcl_Command commandInfo,
int objc,
Tcl_Size objc,
Tcl_Obj *const objv[])
{
TraceWrapperInfo *info = (TraceWrapperInfo *)clientData;
if (objc < 0) {
objc = -1; /* Signal Tcl_CmdObjTraceProc that objc is out of range */
}
return info->proc(info->clientData, interp, level, command, commandInfo, objc, objv);
}
@@ -2153,7 +2172,7 @@ static void traceWrapperDelProc(void *clientData)
Tcl_Trace
Tcl_CreateObjTrace2(
Tcl_Interp *interp, /* Tcl interpreter */
int level, /* Maximum nesting level */
Tcl_Size level, /* Maximum nesting level */
int flags, /* Flags, see above */
Tcl_CmdObjTraceProc2 *proc, /* Trace callback */
void *clientData, /* Client data for the callback */
@@ -2172,10 +2191,10 @@ Tcl_CreateObjTrace2(
Tcl_Trace
Tcl_CreateObjTrace(
Tcl_Interp *interp, /* Tcl interpreter */
int level, /* Maximum nesting level */
Tcl_Size level, /* Maximum nesting level */
int flags, /* Flags, see above */
Tcl_CmdObjTraceProc *proc, /* Trace callback */
ClientData clientData, /* Client data for the callback */
void *clientData, /* Client data for the callback */
Tcl_CmdObjTraceDeleteProc *delProc)
/* Function to call when trace is deleted */
{
@@ -2235,12 +2254,12 @@ Tcl_CreateObjTrace(
* void
* proc(clientData, interp, level, command, cmdProc, cmdClientData,
* argc, argv)
* ClientData clientData;
* void *clientData;
* Tcl_Interp *interp;
* int level;
* char *command;
* int (*cmdProc)();
* ClientData cmdClientData;
* void *cmdClientData;
* int argc;
* char **argv;
* {
@@ -2261,11 +2280,11 @@ Tcl_CreateObjTrace(
Tcl_Trace
Tcl_CreateTrace(
Tcl_Interp *interp, /* Interpreter in which to create trace. */
int level, /* Only call proc for commands at nesting
Tcl_Size level, /* Only call proc for commands at nesting
* level<=argument level (1=>top level). */
Tcl_CmdTraceProc *proc, /* Function to call before executing each
* command. */
ClientData clientData) /* Arbitrary value word to pass to proc. */
void *clientData) /* Arbitrary value word to pass to proc. */
{
StringTraceData *data = (StringTraceData *)ckalloc(sizeof(StringTraceData));
@@ -2293,18 +2312,18 @@ Tcl_CreateTrace(
static int
StringTraceProc(
ClientData clientData,
void *clientData,
Tcl_Interp *interp,
int level,
Tcl_Size level,
const char *command,
Tcl_Command commandInfo,
int objc,
Tcl_Size objc,
Tcl_Obj *const *objv)
{
StringTraceData *data = (StringTraceData *)clientData;
Command *cmdPtr = (Command *) commandInfo;
const char **argv; /* Args to pass to string trace proc */
int i;
Tcl_Size i;
/*
* This is a bit messy because we have to emulate the old trace interface,
@@ -2349,7 +2368,7 @@ StringTraceProc(
static void
StringTraceDeleteProc(
ClientData clientData)
void *clientData)
{
ckfree(clientData);
}
@@ -3239,7 +3258,7 @@ Tcl_TraceVar2(
* TCL_NAMESPACE_ONLY. */
Tcl_VarTraceProc *proc, /* Function to call when specified ops are
* invoked upon varName. */
ClientData clientData) /* Arbitrary argument to pass to proc. */
void *clientData) /* Arbitrary argument to pass to proc. */
{
VarTrace *tracePtr;
int result;
+3 -3
View File
@@ -2973,7 +2973,7 @@ Tcl_DStringResult(
Tcl_DString *dsPtr) /* Dynamic string that is to become the
* result of interp. */
{
Tcl_SetObjResult(interp, TclDStringToObj(dsPtr));
Tcl_SetObjResult(interp, Tcl_DStringToObj(dsPtr));
}
/*
@@ -3087,7 +3087,7 @@ Tcl_DStringGetResult(
/*
*----------------------------------------------------------------------
*
* TclDStringToObj --
* Tcl_DStringToObj --
*
* This function moves a dynamic string's contents to a new Tcl_Obj. Be
* aware that this function does *not* check that the encoding of the
@@ -3107,7 +3107,7 @@ Tcl_DStringGetResult(
*/
Tcl_Obj *
TclDStringToObj(
Tcl_DStringToObj(
Tcl_DString *dsPtr)
{
Tcl_Obj *result;
+6 -2
View File
@@ -4161,8 +4161,7 @@ ArraySetCmd(
int elemLen;
Tcl_Obj **elemPtrs, *copyListObj;
result = TclListObjGetElementsM(interp, arrayElemObj,
&elemLen, &elemPtrs);
result = TclListObjLengthM(interp, arrayElemObj, &elemLen);
if (result != TCL_OK) {
return result;
}
@@ -4175,6 +4174,11 @@ ArraySetCmd(
if (elemLen == 0) {
goto ensureArray;
}
result = TclListObjGetElementsM(interp, arrayElemObj,
&elemLen, &elemPtrs);
if (result != TCL_OK) {
return result;
}
/*
* We needn't worry about traces invalidating arrayPtr: should that be
+5 -1
View File
@@ -3044,7 +3044,7 @@ ZipFSMkZipOrImg(
}
}
Tcl_IncrRefCount(list);
if (TclListObjGetElementsM(interp, list, &lobjc, &lobjv) != TCL_OK) {
if (TclListObjLengthM(interp, list, &lobjc) != TCL_OK) {
Tcl_DecrRefCount(list);
return TCL_ERROR;
}
@@ -3060,6 +3060,10 @@ ZipFSMkZipOrImg(
ZIPFS_ERROR_CODE(interp, "EMPTY");
return TCL_ERROR;
}
if (TclListObjGetElementsM(interp, list, &lobjc, &lobjv) != TCL_OK) {
Tcl_DecrRefCount(list);
return TCL_ERROR;
}
out = Tcl_FSOpenFileChannel(interp, targetFile, "wb", 0755);
if (out == NULL) {
Tcl_DecrRefCount(list);
+2 -2
View File
@@ -548,7 +548,7 @@ ExtractHeader(
Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->comment, -1,
&tmp);
SetValue(dictObj, "comment", TclDStringToObj(&tmp));
SetValue(dictObj, "comment", Tcl_DStringToObj(&tmp));
}
SetValue(dictObj, "crc", Tcl_NewBooleanObj(headerPtr->hcrc));
if (headerPtr->name != Z_NULL) {
@@ -565,7 +565,7 @@ ExtractHeader(
Tcl_ExternalToUtfDString(latin1enc, (char *) headerPtr->name, -1,
&tmp);
SetValue(dictObj, "filename", TclDStringToObj(&tmp));
SetValue(dictObj, "filename", Tcl_DStringToObj(&tmp));
}
if (headerPtr->os != 255) {
SetValue(dictObj, "os", Tcl_NewWideIntObj(headerPtr->os));
+1 -1
View File
@@ -1,4 +1,4 @@
# cookiejar.tcl --
# idna.tcl --
#
# Implementation of IDNA (Internationalized Domain Names for
# Applications) encoding/decoding system, built on a punycode engine
+3 -3
View File
@@ -1,12 +1,12 @@
if {[info sharedlibextension] != ".dll"} return
if {[package vsatisfies [package provide Tcl] 9.0-]} {
package ifneeded dde 1.4.4 \
package ifneeded dde 1.4.5 \
[list load [file join $dir tcl9dde14.dll] Dde]
} elseif {![package vsatisfies [package provide Tcl] 8.7]
&& [::tcl::pkgconfig get debug]} {
package ifneeded dde 1.4.4 \
package ifneeded dde 1.4.5 \
[list load [file join $dir tcldde14g.dll] Dde]
} else {
package ifneeded dde 1.4.4 \
package ifneeded dde 1.4.5 \
[list load [file join $dir tcldde14.dll] Dde]
}
+471 -41
View File
@@ -11,7 +11,7 @@
package require Tcl 8.6-
# Keep this in sync with pkgIndex.tcl and with the install directories in
# Makefiles
package provide http 2.10a4
package provide http 2.10b1
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -26,6 +26,8 @@ namespace eval http {
-proxyhost {}
-proxyport {}
-proxyfilter http::ProxyRequired
-proxynot {}
-proxyauth {}
-repost 0
-threadlevel 0
-urlencoding utf-8
@@ -75,6 +77,7 @@ namespace eval http {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
if {[info exists socketMapping]} {
# Close open sockets on re-init. Do not permit retries.
foreach {url sock} [array get socketMapping] {
@@ -99,6 +102,7 @@ namespace eval http {
array unset socketClosing
array unset socketPlayCmd
array unset socketCoEvent
array unset socketProxyId
array set socketMapping {}
array set socketRdState {}
array set socketWrState {}
@@ -108,6 +112,7 @@ namespace eval http {
array set socketClosing {}
array set socketPlayCmd {}
array set socketCoEvent {}
array set socketProxyId {}
return
}
init
@@ -217,6 +222,33 @@ namespace eval http {
511 {Network Authentication Required}
}]
variable failedProxyValues {
binary
body
charset
coding
connection
connectionRespFlag
currentsize
host
http
httpResponse
meta
method
querylength
queryoffset
reasonPhrase
requestHeaders
requestLine
responseCode
state
status
tid
totalsize
transfer
type
}
namespace export geturl config reset wait formatQuery postError quoteString
namespace export register unregister registerError
namespace export requestLine requestHeaders requestHeaderValue
@@ -378,6 +410,7 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -470,7 +503,9 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
if {[info exists state(-command)] && (!$skipCB)
&& (![info exists state(done-command-cb)])} {
set state(done-command-cb) yes
if {[catch {namespace eval :: $state(-command) $token} err] && $errormsg eq ""} {
if { [catch {namespace eval :: $state(-command) $token} err]
&& ($errormsg eq "")
} {
set state(error) [list $err $errorInfo $errorCode]
set state(status) error
}
@@ -509,6 +544,7 @@ proc http::KeepSocket {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -711,6 +747,7 @@ proc http::CloseSocket {s {token {}}} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
set tk [namespace tail $token]
@@ -773,8 +810,9 @@ proc http::CloseQueuedQueries {connId {token {}}} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
##Log CloseQueuedQueries $connId
##Log CloseQueuedQueries $connId $token
if {![info exists socketMapping($connId)]} {
# Command has already been called.
# Don't come here again - especially recursively.
@@ -834,6 +872,7 @@ proc http::Unset {connId} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
unset socketMapping($connId)
unset socketRdState($connId)
@@ -842,6 +881,7 @@ proc http::Unset {connId} {
unset -nocomplain socketWrQueue($connId)
unset -nocomplain socketClosing($connId)
unset -nocomplain socketPlayCmd($connId)
unset -nocomplain socketProxyId($connId)
return
}
@@ -867,6 +907,7 @@ proc http::reset {token {why reset}} {
set errorlist $state(error)
unset state
eval ::error $errorlist
# i.e. error msg errorInfo errorCode
}
return
}
@@ -886,20 +927,22 @@ proc http::reset {token {why reset}} {
proc http::geturl {url args} {
variable urlTypes
# The value is set in the namespace header of this file. If the file has
# not been modified the value is "::http::socket".
set socketCmd [lindex $urlTypes(http) 1]
# - If ::tls::socketCmd has its default value "::socket", change it to the
# new value $socketCmd.
# new value ::http::socketForTls.
# - If the old value is different, then it has been modified either by the
# script or by the Tcl installation, and replaced by a new command. The
# script or installation that modified ::tls::socketCmd is also
# responsible for integrating ::http::socket into its own "new" command,
# if it wishes to do so.
# responsible for integrating ::http::socketForTls into its own "new"
# command, if it wishes to do so.
# - Commands that open a socket:
# - ::socket - basic
# - ::http::socket - can use a thread to avoid blockage by slow DNS
# lookup. See http::config option -threadlevel.
# - ::http::socketForTls - as ::http::socket, but can also open a socket
# for HTTPS/TLS through a proxy.
if {[info exists ::tls::socketCmd] && ($::tls::socketCmd eq {::socket})} {
set ::tls::socketCmd $socketCmd
set ::tls::socketCmd ::http::socketForTls
}
set token [CreateToken $url {*}$args]
@@ -1023,6 +1066,7 @@ proc http::CreateToken {url args} {
requestHeaders {}
requestLine {}
transfer {}
proxyUsed none
}
set state(-keepalive) $defaultKeepalive
set state(-strict) $strict
@@ -1299,11 +1343,21 @@ proc http::CreateToken {url args} {
set state(-keepalive) 0
}
# If we are using the proxy, we must pass in the full URL that includes
# the server name.
if {$phost ne ""} {
# Handle proxy requests here for http:// but not for https://
# The proxying for https is done in the ::http::socketForTls command.
# A proxy request for http:// needs the full URL in the HTTP request line,
# including the server name.
# The *tls* test below attempts to describe protocols in addition to
# "https on port 443" that use HTTP over TLS.
if {($phost ne "") && (![string match -nocase *tls* $defcmd])} {
set srvurl $url
set targetAddr [list $phost $pport]
set state(proxyUsed) HttpProxy
# The value of state(proxyUsed) none|HttpProxy depends only on the
# all-transactions http::config settings and on the target URL.
# Even if this is a persistent socket there is no need to change the
# value of state(proxyUsed) for other transactions that use the socket:
# they have the same value already.
} else {
set targetAddr [list $host $port]
}
@@ -1316,7 +1370,7 @@ proc http::CreateToken {url args} {
}
set state(connArgs) [list $proto $phost $srvurl]
set state(openCmd) [list {*}$defcmd {*}$sockopts {*}$targetAddr]
set state(openCmd) [list {*}$defcmd {*}$sockopts -type $token {*}$targetAddr]
# See if we are supposed to use a previously opened channel.
# - In principle, ANY call to http::geturl could use a previously opened
@@ -1339,6 +1393,7 @@ proc http::CreateToken {url args} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
if {[info exists socketMapping($state(socketinfo))]} {
# - If the connection is idle, it has a "fileevent readable" binding
@@ -1361,6 +1416,7 @@ proc http::CreateToken {url args} {
# causes a call to Finish.
set reusing 1
set sock $socketMapping($state(socketinfo))
set state(proxyUsed) $socketProxyId($state(socketinfo))
Log "reusing closing socket $sock for $state(socketinfo) - token $token"
set state(alreadyQueued) 1
@@ -1395,6 +1451,7 @@ proc http::CreateToken {url args} {
# - The socket may not yet exist, and be defined with a placeholder.
set reusing 1
set sock $socketMapping($state(socketinfo))
set state(proxyUsed) $socketProxyId($state(socketinfo))
if {[SockIsPlaceHolder $sock]} {
set state(ReusingPlaceholder) 1
lappend socketPhQueue($sock) $token
@@ -1493,6 +1550,7 @@ proc http::AsyncTransaction {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
set sock $state(sock)
@@ -1569,9 +1627,15 @@ proc http::PreparePersistentConnection {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
set DoLater {-traceread 0 -tracewrite 0}
set socketMapping($state(socketinfo)) $state(sock)
set socketProxyId($state(socketinfo)) $state(proxyUsed)
# - The value of state(proxyUsed) was set in http::CreateToken to either
# "none" or "HttpProxy".
# - $token is the first transaction to use this placeholder, so there are
# no other tokens whose (proxyUsed) must be modified.
if {![info exists socketRdState($state(socketinfo))]} {
set socketRdState($state(socketinfo)) {}
@@ -1601,12 +1665,16 @@ proc http::PreparePersistentConnection {token} {
set socketWrState($state(socketinfo)) $token
}
# Value of socketPhQueue() may have already been set by ReplayCore.
if {![info exists socketPhQueue($state(sock))]} {
set socketPhQueue($state(sock)) {}
}
set socketRdQueue($state(socketinfo)) {}
set socketWrQueue($state(socketinfo)) {}
set socketPhQueue($state(socketinfo)) {}
set socketClosing($state(socketinfo)) 0
set socketPlayCmd($state(socketinfo)) {ReplayIfClose Wready {} {}}
set socketCoEvent($state(socketinfo)) {}
set socketProxyId($state(socketinfo)) {}
return $DoLater
}
@@ -1639,6 +1707,7 @@ proc http::OpenSocket {token DoLater} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
Log >K$tk Start OpenSocket coroutine
@@ -1663,12 +1732,14 @@ proc http::OpenSocket {token DoLater} {
##Log pre socket opened, - token $token
##Log $state(openCmd) - token $token
set sock [namespace eval :: $state(openCmd)]
set state(sock) $sock
# Normal return from $state(openCmd) always returns a valid socket.
# A TLS proxy connection with 407 or other failure from the
# proxy server raises an error.
# Initialisation of a new socket.
##Log post socket opened, - token $token
##Log socket opened, now fconfigure - token $token
set state(sock) $sock
set delay [expr {[clock milliseconds] - $pre}]
if {$delay > 3000} {
Log socket delay $delay - token $token
@@ -1683,8 +1754,38 @@ proc http::OpenSocket {token DoLater} {
# Code above has set state(sock) $sock
ConfigureNewSocket $token $sockOld $DoLater
##Log OpenSocket success $sock - token $token
} result errdict]} {
Finish $token $result
##Log OpenSocket failed $result - token $token
# There may be other requests in the socketPhQueue.
# Prepare socketPlayCmd so that Finish will replay them.
if { ($state(-keepalive)) && (!$state(reusing))
&& [info exists socketPhQueue($sockOld)]
&& ($socketPhQueue($sockOld) ne {})
} {
if {$socketMapping($state(socketinfo)) ne $sockOld} {
Log "WARNING: this code should not be reached.\
{$socketMapping($state(socketinfo)) ne $sockOld}"
}
set socketPlayCmd($state(socketinfo)) [list ReplayIfClose Wready {} $socketPhQueue($sockOld)]
set socketPhQueue($sockOld) {}
}
if {[string range $result 0 20] eq {proxy connect failed:}} {
# - The HTTPS proxy did not create a socket. The pre-existing value
# (a "placeholder socket") is unchanged.
# - The proxy returned a valid HTTP response to the failed CONNECT
# request, and http::SecureProxyConnect copied this to $token,
# and also set ${token}(connection) set to "close".
# - Remove the error message $result so that Finish delivers this
# HTTP response to the caller.
set result {}
}
Finish $token $result
# Because socket creation failed, the placeholder "socket" must be
# "closed" and (if persistent) removed from the persistent sockets
# table. In the {proxy connect failed:} case Finish does this because
# the value of ${token}(connection) is "close". In the other cases here,
# it does so because $result is non-empty.
}
##Log Leaving http::OpenSocket coroutine [info coroutine] - token $token
return
@@ -1715,7 +1816,8 @@ proc http::OpenSocket {token DoLater} {
#
# Arguments:
# token - connection token (name of an array)
# sockOld - handle or placeholder used for a socket before the call to OpenSocket
# sockOld - handle or placeholder used for a socket before the call to
# OpenSocket
# DoLater - dictionary of boolean values listing unfinished tasks
#
# Return Value: none
@@ -1735,10 +1837,12 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
set reusing $state(reusing)
set sock $state(sock)
##Log " ConfigureNewSocket" $token $sockOld ... -- $sock
set proxyUsed $state(proxyUsed)
##Log " ConfigureNewSocket" $token $sockOld ... -- $reusing $sock $proxyUsed
if {(!$reusing) && ($sock ne $sockOld)} {
# Replace the placeholder value sockOld with sock.
@@ -1747,6 +1851,8 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
&& ($socketMapping($state(socketinfo)) eq $sockOld)
} {
set socketMapping($state(socketinfo)) $sock
set socketProxyId($state(socketinfo)) $proxyUsed
# tokens that use the placeholder $sockOld are updated below.
##Log set socketMapping($state(socketinfo)) $sock
}
@@ -1786,6 +1892,7 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
# 1. Amend the token's (sock).
##Log set ${tok}(sock) $sock
set ${tok}(sock) $sock
set ${tok}(proxyUsed) $proxyUsed
# 2. Schedule the token's HTTP request.
# Every token in socketPhQueue(*) has reusing 1 alreadyQueued 0.
@@ -1816,7 +1923,7 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
# waiting until the read(s) in progress are finished).
# socketRdQueue($connId) List of tokens that are queued for reading later.
# socketWrQueue($connId) List of tokens that are queued for writing later.
# socketPhQueue($connId) List of tokens that are queued to use a placeholder
# socketPhQueue($sock) List of tokens that are queued to use a placeholder
# socket, when the real socket has not yet been created.
# socketClosing($connId) (boolean) true iff a server response header indicates
# that the server will close the connection at the end of
@@ -1825,6 +1932,11 @@ proc http::ConfigureNewSocket {token sockOld DoLater} {
# part-completed transactions if the socket closes early.
# socketCoEvent($connId) Identifier for the "after idle" event that will launch
# an OpenSocket coroutine to open or re-use a socket.
# socketProxyId($connId) The type of proxy that this socket uses: values are
# those of state(proxyUsed) i.e. none, HttpProxy,
# SecureProxy, and SecureProxyFailed.
# The value is not used for anything by http, its purpose
# is to set the value of state() for caller information.
# ------------------------------------------------------------------------------
@@ -1880,6 +1992,7 @@ proc http::ScheduleRequest {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
set Unfinished 0
@@ -2025,6 +2138,7 @@ proc http::Connected {token proto phost srvurl} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -2083,9 +2197,15 @@ proc http::Connected {token proto phost srvurl} {
Log ^B$tk begin sending request - token $token
if {[catch {
set state(method) $how
set state(requestHeaders) {}
set state(requestLine) "$how $srvurl HTTP/$state(-protocol)"
if {[info exists state(bypass)]} {
set state(method) [lindex [split $state(bypass) { }] 0]
set state(requestHeaders) {}
set state(requestLine) $state(bypass)
} else {
set state(method) $how
set state(requestHeaders) {}
set state(requestLine) "$how $srvurl HTTP/$state(-protocol)"
}
puts $sock $state(requestLine)
set hostValue [GetFieldValue $state(-headers) Host]
if {$hostValue ne {}} {
@@ -2119,6 +2239,11 @@ proc http::Connected {token proto phost srvurl} {
# and "state(-keepalive) 0".
set ConnVal close
}
# Proxy authorisation (cf. mod by Anders Ramdahl to autoproxy by
# Pat Thoyts).
if {($http(-proxyauth) ne {}) && ($state(proxyUsed) eq {HttpProxy})} {
SendHeader $token Proxy-Authorization $http(-proxyauth)
}
# RFC7230 A.1 - "clients are encouraged not to send the
# Proxy-Connection header field in any requests"
set accept_encoding_seen 0
@@ -2143,7 +2268,12 @@ proc http::Connected {token proto phost srvurl} {
set contDone 1
set state(querylength) $value
}
if {[string equal -nocase $key "connection"]} {
if { [string equal -nocase $key "connection"]
&& [info exists state(bypass)]
} {
# Value supplied in -headers overrides $ConnVal.
set connection_seen 1
} elseif {[string equal -nocase $key "connection"]} {
# Remove "close" or "keep-alive" and use our own value.
# In an upgrade request, the upgrade is not guaranteed.
# Value "close" or "keep-alive" tells the server what to do
@@ -2286,7 +2416,8 @@ proc http::Connected {token proto phost srvurl} {
# If any other requests are in flight or pipelined/queued, they will
# be discarded.
} elseif {$state(status) eq ""} {
# ...https handshake errors come here.
# https handshake errors come here, for
# Tcl 8.7 without http::SecureProxyConnect, and for Tcl 8.6.
set msg [registerError $sock]
registerError $sock {}
if {$msg eq {}} {
@@ -2347,6 +2478,7 @@ proc http::DoneRequest {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -2678,6 +2810,7 @@ proc http::ReplayIfDead {token doing} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -2921,6 +3054,7 @@ proc http::ReplayCore {newQueue} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
if {[llength $newQueue] == 0} {
# Nothing to do.
@@ -2940,6 +3074,7 @@ proc http::ReplayCore {newQueue} {
if {![ReInit $token]} {
Log FAILED in http::ReplayCore - NO tmp vars
Log ReplayCore reject $token
Finish $token {cannot send this request again}
return
}
@@ -2954,6 +3089,7 @@ proc http::ReplayCore {newQueue} {
set state(reusing) 0
set state(ReusingPlaceholder) 0
set state(alreadyQueued) 0
Log ReplayCore replay $token
# Give the socket a placeholder name before it is created.
set sock HTTP_PLACEHOLDER_[incr TmpSockCounter]
@@ -2966,7 +3102,9 @@ proc http::ReplayCore {newQueue} {
set ${tok}(reusing) 1
set ${tok}(sock) $sock
lappend socketPhQueue($sock) $tok
Log ReplayCore replay $tok
} else {
Log ReplayCore reject $tok
set ${tok}(reusing) 1
set ${tok}(sock) NONE
Finish $tok {cannot send this request again}
@@ -3121,6 +3259,7 @@ proc http::responseInfo {token} {
currentPost STATE queryoffset
totalSize STATE totalsize
currentSize STATE currentsize
proxyUsed STATE proxyUsed
} {
if {$origin eq {STATE}} {
if {[info exists state($name)]} {
@@ -3269,6 +3408,7 @@ proc http::Write {token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -3381,6 +3521,7 @@ proc http::Event {sock token} {
variable socketClosing
variable socketPlayCmd
variable socketCoEvent
variable socketProxyId
variable $token
upvar 0 $token state
@@ -3433,8 +3574,15 @@ proc http::Event {sock token} {
# If any other requests are in flight or pipelined/queued,
# they will be discarded.
} else {
# https handshake errors come here, for
# Tcl 8.7 with http::SecureProxyConnect.
set msg [registerError $sock]
registerError $sock {}
if {$msg eq {}} {
set msg $nsl
}
Log ^X$tk end of response (error) - token $token
Finish $token $nsl
Finish $token $msg
return
}
} elseif {$nsl >= 0} {
@@ -3604,6 +3752,45 @@ proc http::Event {sock token} {
set state(state) complete
Eot $token
return
} elseif {
($state(method) eq {CONNECT})
&& [string is integer -strict $state(responseCode)]
&& ($state(responseCode) >= 200)
&& ($state(responseCode) < 300)
} {
# A successful CONNECT response has no body.
# (An unsuccessful CONNECT has headers and body.)
# The code below is abstracted from Eot/Finish, but
# keeps the socket open.
catch {fileevent $state(sock) readable {}}
catch {fileevent $state(sock) writable {}}
set state(state) complete
set state(status) ok
if {[info commands ${token}--EventCoroutine] ne {}} {
rename ${token}--EventCoroutine {}
}
if {[info commands ${token}--SocketCoroutine] ne {}} {
rename ${token}--SocketCoroutine {}
}
if {[info exists state(socketcoro)]} {
Log $token Cancel socket after-idle event (Finish)
after cancel $state(socketcoro)
unset state(socketcoro)
}
if {[info exists state(after)]} {
after cancel $state(after)
unset state(after)
}
if { [info exists state(-command)]
&& (![info exists state(done-command-cb)])
} {
set state(done-command-cb) yes
if {[catch {namespace eval :: $state(-command) $token} err]} {
set state(error) [list $err $errorInfo $errorCode]
set state(status) error
}
}
return
} else {
}
@@ -4305,7 +4492,7 @@ proc http::CopyDone {token count {error {}}} {
# reason - "eof" means premature EOF (not EOF as the natural end of
# the response)
# - "" means completion of response, with or without EOF
# - anything else describes an error confition other than
# - anything else describes an error condition other than
# premature EOF.
#
# Side Effects
@@ -4537,17 +4724,23 @@ proc http::quoteString {string} {
proc http::ProxyRequired {host} {
variable http
if {[info exists http(-proxyhost)] && [string length $http(-proxyhost)]} {
if {
![info exists http(-proxyport)] ||
![string length $http(-proxyport)]
} {
set http(-proxyport) 8080
}
return [list $http(-proxyhost) $http(-proxyport)]
} else {
return
if {(![info exists http(-proxyhost)]) || ($http(-proxyhost) eq {})} {
return
}
if {![info exists http(-proxyport)] || ($http(-proxyport) eq {})} {
set port 8080
} else {
set port $http(-proxyport)
}
# Simple test (cf. autoproxy) for hosts that must be accessed directly,
# not through the proxy server.
foreach domain $http(-proxynot) {
if {[string match -nocase $domain $host]} {
return {}
}
}
return [list $http(-proxyhost) $port]
}
# http::CharsetToEncoding --
@@ -4730,6 +4923,243 @@ interp alias {} http::meta {} http::responseHeaders
interp alias {} http::metaValue {} http::responseHeaderValue
interp alias {} http::ncode {} http::responseCode
# ------------------------------------------------------------------------------
# Proc http::socketForTls
# ------------------------------------------------------------------------------
# Command to use in place of ::socket as the value of ::tls::socketCmd.
# This command does the same as http::socket, and also handles https connections
# through a proxy server.
#
# Notes.
# - The proxy server works differently for https and http. This implementation
# is for https. The proxy for http is implemented in http::CreateToken (in
# code that was previously part of http::geturl).
# - This code implicitly uses the tls options set for https in a call to
# http::register, and does not need to call commands tls::*. This simple
# implementation is possible because tls uses a callback to ::socket that can
# be redirected by changing the value of ::tls::socketCmd.
#
# Arguments:
# args - as for ::socket
#
# Return Value: a socket identifier
# ------------------------------------------------------------------------------
proc http::socketForTls {args} {
variable http
set host [lindex $args end-1]
set port [lindex $args end]
if { ($http(-proxyfilter) ne {})
&& (![catch {$http(-proxyfilter) $host} proxy])
} {
set phost [lindex $proxy 0]
set pport [lindex $proxy 1]
} else {
set phost {}
set pport {}
}
if {$phost eq ""} {
set sock [::http::socket {*}$args]
} else {
set sock [::http::SecureProxyConnect {*}$args $phost $pport]
}
return $sock
}
# ------------------------------------------------------------------------------
# Proc http::SecureProxyConnect
# ------------------------------------------------------------------------------
# Command to open a socket through a proxy server to a remote server for use by
# tls. The caller must perform the tls handshake.
#
# Notes
# - Based on patch supplied by Melissa Chawla in ticket 1173760, and
# Proxy-Authorization header cf. autoproxy by Pat Thoyts.
# - Rewritten as a call to http::geturl, because response headers and body are
# needed if the CONNECT request fails. CONNECT is implemented for this case
# only, by state(bypass).
# - FUTURE WORK: give http::geturl a -connect option for a general CONNECT.
# - The request header Proxy-Connection is discouraged in RFC 7230 (June 2014),
# RFC 9112 (June 2022).
#
# Arguments:
# args - as for ::socket, ending in host, port; with proxy host, proxy
# port appended.
#
# Return Value: a socket identifier
# ------------------------------------------------------------------------------
proc http::SecureProxyConnect {args} {
variable http
variable ConnectVar
variable ConnectCounter
variable failedProxyValues
set varName ::http::ConnectVar([incr ConnectCounter])
# Extract (non-proxy) target from args.
set host [lindex $args end-3]
set port [lindex $args end-2]
set args [lreplace $args end-3 end-2]
# Proxy server URL for connection.
# This determines where the socket is opened.
set phost [lindex $args end-1]
set pport [lindex $args end]
if {[string first : $phost] != -1} {
# IPv6 address, wrap it in [] so we can append :pport
set phost "\[${phost}\]"
}
set url http://${phost}:${pport}
# Elements of args other than host and port are not used when
# AsyncTransaction opens a socket. Those elements are -async and the
# -type $tokenName for the https transaction. Option -async is used by
# AsyncTransaction anyway, and -type $tokenName should not be propagated:
# the proxy request adds its own -type value.
set targ [lsearch -exact $args -type]
if {$targ != -1} {
# Record in the token that this is a proxy call.
set token [lindex $args $targ+1]
upvar 0 ${token} state
set tim $state(-timeout)
set state(proxyUsed) SecureProxyFailed
# This value is overwritten with "SecureProxy" below if the CONNECT is
# successful. If it is unsuccessful, the socket will be closed
# below, and so in this unsuccessful case there are no other transactions
# whose (proxyUsed) must be updated.
} else {
set tim 0
}
if {$tim == 0} {
# Do not use infinite timeout for the proxy.
set tim 30000
}
# Prepare and send a CONNECT request to the proxy, using
# code similar to http::geturl.
set requestHeaders [list Host $host]
lappend requestHeaders Connection keep-alive
if {$http(-proxyauth) != {}} {
lappend requestHeaders Proxy-Authorization $http(-proxyauth)
}
set token2 [CreateToken $url -keepalive 0 -timeout $tim \
-headers $requestHeaders -command [list http::AllDone $varName]]
variable $token2
upvar 0 $token2 state2
# Kludges:
# Setting this variable overrides the HTTP request line and also allows
# -headers to override the Connection: header set by -keepalive.
# The arguments "-keepalive 0" ensure that when Finish is called for an
# unsuccessful request, the socket is always closed.
set state2(bypass) "CONNECT $host:$port HTTP/1.1"
AsyncTransaction $token2
if {[info coroutine] ne {}} {
# All callers in the http package are coroutines launched by
# the event loop.
# The cwait command requires a coroutine because it yields
# to the caller; $varName is traced and the coroutine resumes
# when the variable is written.
cwait $varName
} else {
return -code error {code must run in a coroutine}
# For testing with a non-coroutine caller outside the http package.
# vwait $varName
}
unset $varName
if { ($state2(state) ne "complete")
|| ($state2(status) ne "ok")
|| (![string is integer -strict $state2(responseCode)])
} {
set msg {the HTTP request to the proxy server did not return a valid\
and complete response}
if {[info exists state2(error)]} {
append msg ": " [lindex $state2(error) 0]
}
cleanup $token2
return -code error $msg
}
set code $state2(responseCode)
if {($code >= 200) && ($code < 300)} {
# All OK. The caller in package tls will now call "tls::import $sock".
# The cleanup command does not close $sock.
# Other tidying was done in http::Event.
# If this is a persistent socket, any other transactions that are
# already marked to use the socket will have their (proxyUsed) updated
# when http::OpenSocket calls http::ConfigureNewSocket.
set state(proxyUsed) SecureProxy
set sock $state2(sock)
cleanup $token2
return $sock
}
if {$targ != -1} {
# Non-OK HTTP status code; token is known because option -type
# (cf. targ) was passed through tcltls, and so the useful
# parts of the proxy's response can be copied to state(*).
# Do not copy state2(sock).
# Return the proxy response to the caller of geturl.
foreach name $failedProxyValues {
if {[info exists state2($name)]} {
set state($name) $state2($name)
}
}
set state(connection) close
set msg "proxy connect failed: $code"
# - This error message will be detected by http::OpenSocket and will
# cause it to present the proxy's HTTP response as that of the
# original $token transaction, identified only by state(proxyUsed)
# as the response of the proxy.
# - The cases where this would mislead the caller of http::geturl are
# given a different value of msg (below) so that http::OpenSocket will
# treat them as errors, but will preserve the $token array for
# inspection by the caller.
# - Status code 305 (Proxy Required) was deprecated for security reasons
# in RFC 2616 (June 1999) and in any case should never be served by a
# proxy.
# - Other 3xx responses from the proxy are inappropriate, and should not
# occur.
# - A 401 response from the proxy is inappropriate, and should not
# occur. It would be confusing if returned to the caller.
if {($code >= 300) && ($code < 400)} {
set msg "the proxy server responded to the HTTP request with an\
inappropriate $code redirect"
set loc [responseHeaderValue $token2 location]
if {$loc ne {}} {
append msg "to " $loc
}
} elseif {($code == 401)} {
set msg "the proxy server responded to the HTTP request with an\
inappropriate 401 request for target-host credentials"
} else {
}
} else {
set msg "connection to proxy failed with status code $code"
}
# - ${token2}(sock) has already been closed because -keepalive 0.
# - Error return does not pass the socket ID to the
# $token transaction, which retains its socket placeholder.
cleanup $token2
return -code error $msg
}
proc http::AllDone {varName args} {
set $varName done
return
}
# ------------------------------------------------------------------------------
# Proc http::socket
# ------------------------------------------------------------------------------
@@ -4767,7 +5197,7 @@ proc http::socket {args} {
LoadThreadIfNeeded
set targ [lsearch -exact $args -token]
set targ [lsearch -exact $args -type]
if {$targ != -1} {
set token [lindex $args $targ+1]
set args [lreplace $args $targ $targ+1]
@@ -4831,7 +5261,7 @@ proc http::socket {args} {
}
# The commands below are dependencies of http::socket and
# are not used elsewhere.
# http::SecureProxyConnect and are not used elsewhere.
# ------------------------------------------------------------------------------
# Proc http::LoadThreadIfNeeded
+1 -1
View File
@@ -1,2 +1,2 @@
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
package ifneeded http 2.10a4 [list tclPkgSetup $dir http 2.10a4 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
package ifneeded http 2.10b1 [list tclPkgSetup $dir http 2.10b1 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+3 -3
View File
@@ -35,7 +35,7 @@ proc ::practcl::_pkgindex_directory {path} {
# Read the file, and override assumptions as needed
###
set fin [open $file r]
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
set dat [read $fin]
close $fin
# Look for a teapot style Package statement
@@ -59,7 +59,7 @@ proc ::practcl::_pkgindex_directory {path} {
foreach file [glob -nocomplain $path/*.tcl] {
if { [file tail $file] == "version_info.tcl" } continue
set fin [open $file r]
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
set dat [read $fin]
close $fin
if {![regexp "package provide" $dat]} continue
@@ -79,7 +79,7 @@ proc ::practcl::_pkgindex_directory {path} {
return $buffer
}
set fin [open $pkgidxfile r]
fconfigure $fin -encoding utf-8 -eofchar "\032 {}"
fconfigure $fin -encoding utf-8 -eofchar "\x1A {}"
set dat [read $fin]
close $fin
set trace 0
+2 -2
View File
@@ -5,12 +5,12 @@ apply {{dir} {
set ::test [info script]
set isafe [interp issafe]
foreach {safe package version file} {
0 http 2.10a4 {http http.tcl}
0 http 2.10b1 {http http.tcl}
1 msgcat 1.7.1 {msgcat msgcat.tcl}
1 opt 0.4.8 {opt optparse.tcl}
0 cookiejar 0.2.0 {cookiejar cookiejar.tcl}
0 tcl::idna 1.0.1 {cookiejar idna.tcl}
0 platform 1.0.18 {platform platform.tcl}
0 platform 1.0.19 {platform platform.tcl}
0 platform::shell 1.1.4 {platform shell.tcl}
1 tcltest 2.5.5 {tcltest tcltest.tcl}
} {
+1 -1
View File
@@ -1,3 +1,3 @@
package ifneeded platform 1.0.18 [list source [file join $dir platform.tcl]]
package ifneeded platform 1.0.19 [list source [file join $dir platform.tcl]]
package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]]
+12 -1
View File
@@ -364,6 +364,17 @@ proc ::platform::patterns {id} {
foreach {major minor} [split $v .] break
set res {}
if {$major eq 13} {
# Add 13.0 to 13.minor to patterns.
for {set j $minor} {$j >= 0} {incr j -1} {
lappend res macosx${major}.${j}-${cpu}
foreach a $alt {
lappend res macosx${major}.${j}-$a
}
}
set major 12
set minor 5
}
if {$major eq 12} {
# Add 12.0 to 12.minor to patterns.
for {set j $minor} {$j >= 0} {incr j -1} {
@@ -420,7 +431,7 @@ proc ::platform::patterns {id} {
# ### ### ### ######### ######### #########
## Ready
package provide platform 1.0.18
package provide platform 1.0.19
# ### ### ### ######### ######### #########
## Demo application
+2 -2
View File
@@ -1,9 +1,9 @@
if {![package vsatisfies [package provide Tcl] 8.5-]} return
if {[info sharedlibextension] != ".dll"} return
if {[package vsatisfies [package provide Tcl] 9.0-]} {
package ifneeded registry 1.3.6 \
package ifneeded registry 1.3.7 \
[list load [file join $dir tcl9registry13.dll] Registry]
} else {
package ifneeded registry 1.3.6 \
package ifneeded registry 1.3.7 \
[list load [file join $dir tclregistry13.dll] Registry]
}
-154
View File
@@ -65,158 +65,4 @@ set TZData(:America/Bahia_Banderas) {
{1635663600 -21600 0 CST}
{1648972800 -18000 1 CDT}
{1667113200 -21600 0 CST}
{1680422400 -18000 1 CDT}
{1698562800 -21600 0 CST}
{1712476800 -18000 1 CDT}
{1730012400 -21600 0 CST}
{1743926400 -18000 1 CDT}
{1761462000 -21600 0 CST}
{1775376000 -18000 1 CDT}
{1792911600 -21600 0 CST}
{1806825600 -18000 1 CDT}
{1824966000 -21600 0 CST}
{1838275200 -18000 1 CDT}
{1856415600 -21600 0 CST}
{1869724800 -18000 1 CDT}
{1887865200 -21600 0 CST}
{1901779200 -18000 1 CDT}
{1919314800 -21600 0 CST}
{1933228800 -18000 1 CDT}
{1950764400 -21600 0 CST}
{1964678400 -18000 1 CDT}
{1982818800 -21600 0 CST}
{1996128000 -18000 1 CDT}
{2014268400 -21600 0 CST}
{2027577600 -18000 1 CDT}
{2045718000 -21600 0 CST}
{2059027200 -18000 1 CDT}
{2077167600 -21600 0 CST}
{2091081600 -18000 1 CDT}
{2108617200 -21600 0 CST}
{2122531200 -18000 1 CDT}
{2140066800 -21600 0 CST}
{2153980800 -18000 1 CDT}
{2172121200 -21600 0 CST}
{2185430400 -18000 1 CDT}
{2203570800 -21600 0 CST}
{2216880000 -18000 1 CDT}
{2235020400 -21600 0 CST}
{2248934400 -18000 1 CDT}
{2266470000 -21600 0 CST}
{2280384000 -18000 1 CDT}
{2297919600 -21600 0 CST}
{2311833600 -18000 1 CDT}
{2329369200 -21600 0 CST}
{2343283200 -18000 1 CDT}
{2361423600 -21600 0 CST}
{2374732800 -18000 1 CDT}
{2392873200 -21600 0 CST}
{2406182400 -18000 1 CDT}
{2424322800 -21600 0 CST}
{2438236800 -18000 1 CDT}
{2455772400 -21600 0 CST}
{2469686400 -18000 1 CDT}
{2487222000 -21600 0 CST}
{2501136000 -18000 1 CDT}
{2519276400 -21600 0 CST}
{2532585600 -18000 1 CDT}
{2550726000 -21600 0 CST}
{2564035200 -18000 1 CDT}
{2582175600 -21600 0 CST}
{2596089600 -18000 1 CDT}
{2613625200 -21600 0 CST}
{2627539200 -18000 1 CDT}
{2645074800 -21600 0 CST}
{2658988800 -18000 1 CDT}
{2676524400 -21600 0 CST}
{2690438400 -18000 1 CDT}
{2708578800 -21600 0 CST}
{2721888000 -18000 1 CDT}
{2740028400 -21600 0 CST}
{2753337600 -18000 1 CDT}
{2771478000 -21600 0 CST}
{2785392000 -18000 1 CDT}
{2802927600 -21600 0 CST}
{2816841600 -18000 1 CDT}
{2834377200 -21600 0 CST}
{2848291200 -18000 1 CDT}
{2866431600 -21600 0 CST}
{2879740800 -18000 1 CDT}
{2897881200 -21600 0 CST}
{2911190400 -18000 1 CDT}
{2929330800 -21600 0 CST}
{2942640000 -18000 1 CDT}
{2960780400 -21600 0 CST}
{2974694400 -18000 1 CDT}
{2992230000 -21600 0 CST}
{3006144000 -18000 1 CDT}
{3023679600 -21600 0 CST}
{3037593600 -18000 1 CDT}
{3055734000 -21600 0 CST}
{3069043200 -18000 1 CDT}
{3087183600 -21600 0 CST}
{3100492800 -18000 1 CDT}
{3118633200 -21600 0 CST}
{3132547200 -18000 1 CDT}
{3150082800 -21600 0 CST}
{3163996800 -18000 1 CDT}
{3181532400 -21600 0 CST}
{3195446400 -18000 1 CDT}
{3212982000 -21600 0 CST}
{3226896000 -18000 1 CDT}
{3245036400 -21600 0 CST}
{3258345600 -18000 1 CDT}
{3276486000 -21600 0 CST}
{3289795200 -18000 1 CDT}
{3307935600 -21600 0 CST}
{3321849600 -18000 1 CDT}
{3339385200 -21600 0 CST}
{3353299200 -18000 1 CDT}
{3370834800 -21600 0 CST}
{3384748800 -18000 1 CDT}
{3402889200 -21600 0 CST}
{3416198400 -18000 1 CDT}
{3434338800 -21600 0 CST}
{3447648000 -18000 1 CDT}
{3465788400 -21600 0 CST}
{3479702400 -18000 1 CDT}
{3497238000 -21600 0 CST}
{3511152000 -18000 1 CDT}
{3528687600 -21600 0 CST}
{3542601600 -18000 1 CDT}
{3560137200 -21600 0 CST}
{3574051200 -18000 1 CDT}
{3592191600 -21600 0 CST}
{3605500800 -18000 1 CDT}
{3623641200 -21600 0 CST}
{3636950400 -18000 1 CDT}
{3655090800 -21600 0 CST}
{3669004800 -18000 1 CDT}
{3686540400 -21600 0 CST}
{3700454400 -18000 1 CDT}
{3717990000 -21600 0 CST}
{3731904000 -18000 1 CDT}
{3750044400 -21600 0 CST}
{3763353600 -18000 1 CDT}
{3781494000 -21600 0 CST}
{3794803200 -18000 1 CDT}
{3812943600 -21600 0 CST}
{3826252800 -18000 1 CDT}
{3844393200 -21600 0 CST}
{3858307200 -18000 1 CDT}
{3875842800 -21600 0 CST}
{3889756800 -18000 1 CDT}
{3907292400 -21600 0 CST}
{3921206400 -18000 1 CDT}
{3939346800 -21600 0 CST}
{3952656000 -18000 1 CDT}
{3970796400 -21600 0 CST}
{3984105600 -18000 1 CDT}
{4002246000 -21600 0 CST}
{4016160000 -18000 1 CDT}
{4033695600 -21600 0 CST}
{4047609600 -18000 1 CDT}
{4065145200 -21600 0 CST}
{4079059200 -18000 1 CDT}
{4096594800 -21600 0 CST}
}
+1 -1
View File
@@ -5,5 +5,5 @@ set TZData(:America/Bogota) {
{-2707671824 -17776 0 BMT}
{-1739041424 -18000 0 -05}
{704869200 -14400 1 -05}
{733896000 -18000 0 -05}
{729057600 -18000 0 -05}
}
+16 -2
View File
@@ -6,8 +6,22 @@ set TZData(:America/Cambridge_Bay) {
{-880210800 -21600 1 MWT}
{-769395600 -21600 1 MPT}
{-765388800 -25200 0 MST}
{-147891600 -18000 1 MDDT}
{-131562000 -25200 0 MST}
{73472400 -21600 1 MDT}
{89193600 -25200 0 MST}
{104922000 -21600 1 MDT}
{120643200 -25200 0 MST}
{136371600 -21600 1 MDT}
{152092800 -25200 0 MST}
{167821200 -21600 1 MDT}
{183542400 -25200 0 MST}
{199270800 -21600 1 MDT}
{215596800 -25200 0 MST}
{230720400 -21600 1 MDT}
{247046400 -25200 0 MST}
{262774800 -21600 1 MDT}
{278496000 -25200 0 MST}
{294224400 -21600 1 MDT}
{309945600 -25200 0 MST}
{325674000 -21600 1 MDT}
{341395200 -25200 0 MST}
{357123600 -21600 1 MDT}
+1 -155
View File
@@ -63,159 +63,5 @@ set TZData(:America/Chihuahua) {
{1617526800 -21600 1 MDT}
{1635667200 -25200 0 MST}
{1648976400 -21600 1 MDT}
{1667116800 -25200 0 MST}
{1680426000 -21600 1 MDT}
{1698566400 -25200 0 MST}
{1712480400 -21600 1 MDT}
{1730016000 -25200 0 MST}
{1743930000 -21600 1 MDT}
{1761465600 -25200 0 MST}
{1775379600 -21600 1 MDT}
{1792915200 -25200 0 MST}
{1806829200 -21600 1 MDT}
{1824969600 -25200 0 MST}
{1838278800 -21600 1 MDT}
{1856419200 -25200 0 MST}
{1869728400 -21600 1 MDT}
{1887868800 -25200 0 MST}
{1901782800 -21600 1 MDT}
{1919318400 -25200 0 MST}
{1933232400 -21600 1 MDT}
{1950768000 -25200 0 MST}
{1964682000 -21600 1 MDT}
{1982822400 -25200 0 MST}
{1996131600 -21600 1 MDT}
{2014272000 -25200 0 MST}
{2027581200 -21600 1 MDT}
{2045721600 -25200 0 MST}
{2059030800 -21600 1 MDT}
{2077171200 -25200 0 MST}
{2091085200 -21600 1 MDT}
{2108620800 -25200 0 MST}
{2122534800 -21600 1 MDT}
{2140070400 -25200 0 MST}
{2153984400 -21600 1 MDT}
{2172124800 -25200 0 MST}
{2185434000 -21600 1 MDT}
{2203574400 -25200 0 MST}
{2216883600 -21600 1 MDT}
{2235024000 -25200 0 MST}
{2248938000 -21600 1 MDT}
{2266473600 -25200 0 MST}
{2280387600 -21600 1 MDT}
{2297923200 -25200 0 MST}
{2311837200 -21600 1 MDT}
{2329372800 -25200 0 MST}
{2343286800 -21600 1 MDT}
{2361427200 -25200 0 MST}
{2374736400 -21600 1 MDT}
{2392876800 -25200 0 MST}
{2406186000 -21600 1 MDT}
{2424326400 -25200 0 MST}
{2438240400 -21600 1 MDT}
{2455776000 -25200 0 MST}
{2469690000 -21600 1 MDT}
{2487225600 -25200 0 MST}
{2501139600 -21600 1 MDT}
{2519280000 -25200 0 MST}
{2532589200 -21600 1 MDT}
{2550729600 -25200 0 MST}
{2564038800 -21600 1 MDT}
{2582179200 -25200 0 MST}
{2596093200 -21600 1 MDT}
{2613628800 -25200 0 MST}
{2627542800 -21600 1 MDT}
{2645078400 -25200 0 MST}
{2658992400 -21600 1 MDT}
{2676528000 -25200 0 MST}
{2690442000 -21600 1 MDT}
{2708582400 -25200 0 MST}
{2721891600 -21600 1 MDT}
{2740032000 -25200 0 MST}
{2753341200 -21600 1 MDT}
{2771481600 -25200 0 MST}
{2785395600 -21600 1 MDT}
{2802931200 -25200 0 MST}
{2816845200 -21600 1 MDT}
{2834380800 -25200 0 MST}
{2848294800 -21600 1 MDT}
{2866435200 -25200 0 MST}
{2879744400 -21600 1 MDT}
{2897884800 -25200 0 MST}
{2911194000 -21600 1 MDT}
{2929334400 -25200 0 MST}
{2942643600 -21600 1 MDT}
{2960784000 -25200 0 MST}
{2974698000 -21600 1 MDT}
{2992233600 -25200 0 MST}
{3006147600 -21600 1 MDT}
{3023683200 -25200 0 MST}
{3037597200 -21600 1 MDT}
{3055737600 -25200 0 MST}
{3069046800 -21600 1 MDT}
{3087187200 -25200 0 MST}
{3100496400 -21600 1 MDT}
{3118636800 -25200 0 MST}
{3132550800 -21600 1 MDT}
{3150086400 -25200 0 MST}
{3164000400 -21600 1 MDT}
{3181536000 -25200 0 MST}
{3195450000 -21600 1 MDT}
{3212985600 -25200 0 MST}
{3226899600 -21600 1 MDT}
{3245040000 -25200 0 MST}
{3258349200 -21600 1 MDT}
{3276489600 -25200 0 MST}
{3289798800 -21600 1 MDT}
{3307939200 -25200 0 MST}
{3321853200 -21600 1 MDT}
{3339388800 -25200 0 MST}
{3353302800 -21600 1 MDT}
{3370838400 -25200 0 MST}
{3384752400 -21600 1 MDT}
{3402892800 -25200 0 MST}
{3416202000 -21600 1 MDT}
{3434342400 -25200 0 MST}
{3447651600 -21600 1 MDT}
{3465792000 -25200 0 MST}
{3479706000 -21600 1 MDT}
{3497241600 -25200 0 MST}
{3511155600 -21600 1 MDT}
{3528691200 -25200 0 MST}
{3542605200 -21600 1 MDT}
{3560140800 -25200 0 MST}
{3574054800 -21600 1 MDT}
{3592195200 -25200 0 MST}
{3605504400 -21600 1 MDT}
{3623644800 -25200 0 MST}
{3636954000 -21600 1 MDT}
{3655094400 -25200 0 MST}
{3669008400 -21600 1 MDT}
{3686544000 -25200 0 MST}
{3700458000 -21600 1 MDT}
{3717993600 -25200 0 MST}
{3731907600 -21600 1 MDT}
{3750048000 -25200 0 MST}
{3763357200 -21600 1 MDT}
{3781497600 -25200 0 MST}
{3794806800 -21600 1 MDT}
{3812947200 -25200 0 MST}
{3826256400 -21600 1 MDT}
{3844396800 -25200 0 MST}
{3858310800 -21600 1 MDT}
{3875846400 -25200 0 MST}
{3889760400 -21600 1 MDT}
{3907296000 -25200 0 MST}
{3921210000 -21600 1 MDT}
{3939350400 -25200 0 MST}
{3952659600 -21600 1 MDT}
{3970800000 -25200 0 MST}
{3984109200 -21600 1 MDT}
{4002249600 -25200 0 MST}
{4016163600 -21600 1 MDT}
{4033699200 -25200 0 MST}
{4047613200 -21600 1 MDT}
{4065148800 -25200 0 MST}
{4079062800 -21600 1 MDT}
{4096598400 -25200 0 MST}
{1667120400 -21600 0 CST}
}
+2
View File
@@ -10,8 +10,10 @@ set TZData(:America/Dawson) {
{-880203600 -28800 1 YWT}
{-769395600 -28800 1 YPT}
{-765381600 -32400 0 YST}
{-157734000 -32400 0 YST}
{-147884400 -25200 1 YDDT}
{-131554800 -32400 0 YST}
{120646800 -28800 0 PST}
{315561600 -28800 0 PST}
{325677600 -25200 1 PDT}
{341398800 -28800 0 PST}
+16 -2
View File
@@ -3,8 +3,22 @@
set TZData(:America/Inuvik) {
{-9223372036854775808 0 0 -00}
{-536457600 -28800 0 PST}
{-147888000 -21600 1 PDDT}
{-131558400 -28800 0 PST}
{73476000 -25200 1 PDT}
{89197200 -28800 0 PST}
{104925600 -25200 1 PDT}
{120646800 -28800 0 PST}
{136375200 -25200 1 PDT}
{152096400 -28800 0 PST}
{167824800 -25200 1 PDT}
{183546000 -28800 0 PST}
{199274400 -25200 1 PDT}
{215600400 -28800 0 PST}
{230724000 -25200 1 PDT}
{247050000 -28800 0 PST}
{262778400 -25200 1 PDT}
{278499600 -28800 0 PST}
{294228000 -21600 0 MDT}
{309945600 -25200 0 MST}
{315558000 -25200 0 MST}
{325674000 -21600 1 MDT}
{341395200 -25200 0 MST}
+16 -2
View File
@@ -5,8 +5,22 @@ set TZData(:America/Iqaluit) {
{-865296000 -14400 0 EWT}
{-769395600 -14400 1 EPT}
{-765396000 -18000 0 EST}
{-147898800 -10800 1 EDDT}
{-131569200 -18000 0 EST}
{73465200 -14400 1 EDT}
{89186400 -18000 0 EST}
{104914800 -14400 1 EDT}
{120636000 -18000 0 EST}
{136364400 -14400 1 EDT}
{152085600 -18000 0 EST}
{167814000 -14400 1 EDT}
{183535200 -18000 0 EST}
{199263600 -14400 1 EDT}
{215589600 -18000 0 EST}
{230713200 -14400 1 EDT}
{247039200 -18000 0 EST}
{262767600 -14400 1 EDT}
{278488800 -18000 0 EST}
{294217200 -14400 1 EDT}
{309938400 -18000 0 EST}
{325666800 -14400 1 EDT}
{341388000 -18000 0 EST}
{357116400 -14400 1 EDT}
-154
View File
@@ -65,158 +65,4 @@ set TZData(:America/Mazatlan) {
{1635667200 -25200 0 MST}
{1648976400 -21600 1 MDT}
{1667116800 -25200 0 MST}
{1680426000 -21600 1 MDT}
{1698566400 -25200 0 MST}
{1712480400 -21600 1 MDT}
{1730016000 -25200 0 MST}
{1743930000 -21600 1 MDT}
{1761465600 -25200 0 MST}
{1775379600 -21600 1 MDT}
{1792915200 -25200 0 MST}
{1806829200 -21600 1 MDT}
{1824969600 -25200 0 MST}
{1838278800 -21600 1 MDT}
{1856419200 -25200 0 MST}
{1869728400 -21600 1 MDT}
{1887868800 -25200 0 MST}
{1901782800 -21600 1 MDT}
{1919318400 -25200 0 MST}
{1933232400 -21600 1 MDT}
{1950768000 -25200 0 MST}
{1964682000 -21600 1 MDT}
{1982822400 -25200 0 MST}
{1996131600 -21600 1 MDT}
{2014272000 -25200 0 MST}
{2027581200 -21600 1 MDT}
{2045721600 -25200 0 MST}
{2059030800 -21600 1 MDT}
{2077171200 -25200 0 MST}
{2091085200 -21600 1 MDT}
{2108620800 -25200 0 MST}
{2122534800 -21600 1 MDT}
{2140070400 -25200 0 MST}
{2153984400 -21600 1 MDT}
{2172124800 -25200 0 MST}
{2185434000 -21600 1 MDT}
{2203574400 -25200 0 MST}
{2216883600 -21600 1 MDT}
{2235024000 -25200 0 MST}
{2248938000 -21600 1 MDT}
{2266473600 -25200 0 MST}
{2280387600 -21600 1 MDT}
{2297923200 -25200 0 MST}
{2311837200 -21600 1 MDT}
{2329372800 -25200 0 MST}
{2343286800 -21600 1 MDT}
{2361427200 -25200 0 MST}
{2374736400 -21600 1 MDT}
{2392876800 -25200 0 MST}
{2406186000 -21600 1 MDT}
{2424326400 -25200 0 MST}
{2438240400 -21600 1 MDT}
{2455776000 -25200 0 MST}
{2469690000 -21600 1 MDT}
{2487225600 -25200 0 MST}
{2501139600 -21600 1 MDT}
{2519280000 -25200 0 MST}
{2532589200 -21600 1 MDT}
{2550729600 -25200 0 MST}
{2564038800 -21600 1 MDT}
{2582179200 -25200 0 MST}
{2596093200 -21600 1 MDT}
{2613628800 -25200 0 MST}
{2627542800 -21600 1 MDT}
{2645078400 -25200 0 MST}
{2658992400 -21600 1 MDT}
{2676528000 -25200 0 MST}
{2690442000 -21600 1 MDT}
{2708582400 -25200 0 MST}
{2721891600 -21600 1 MDT}
{2740032000 -25200 0 MST}
{2753341200 -21600 1 MDT}
{2771481600 -25200 0 MST}
{2785395600 -21600 1 MDT}
{2802931200 -25200 0 MST}
{2816845200 -21600 1 MDT}
{2834380800 -25200 0 MST}
{2848294800 -21600 1 MDT}
{2866435200 -25200 0 MST}
{2879744400 -21600 1 MDT}
{2897884800 -25200 0 MST}
{2911194000 -21600 1 MDT}
{2929334400 -25200 0 MST}
{2942643600 -21600 1 MDT}
{2960784000 -25200 0 MST}
{2974698000 -21600 1 MDT}
{2992233600 -25200 0 MST}
{3006147600 -21600 1 MDT}
{3023683200 -25200 0 MST}
{3037597200 -21600 1 MDT}
{3055737600 -25200 0 MST}
{3069046800 -21600 1 MDT}
{3087187200 -25200 0 MST}
{3100496400 -21600 1 MDT}
{3118636800 -25200 0 MST}
{3132550800 -21600 1 MDT}
{3150086400 -25200 0 MST}
{3164000400 -21600 1 MDT}
{3181536000 -25200 0 MST}
{3195450000 -21600 1 MDT}
{3212985600 -25200 0 MST}
{3226899600 -21600 1 MDT}
{3245040000 -25200 0 MST}
{3258349200 -21600 1 MDT}
{3276489600 -25200 0 MST}
{3289798800 -21600 1 MDT}
{3307939200 -25200 0 MST}
{3321853200 -21600 1 MDT}
{3339388800 -25200 0 MST}
{3353302800 -21600 1 MDT}
{3370838400 -25200 0 MST}
{3384752400 -21600 1 MDT}
{3402892800 -25200 0 MST}
{3416202000 -21600 1 MDT}
{3434342400 -25200 0 MST}
{3447651600 -21600 1 MDT}
{3465792000 -25200 0 MST}
{3479706000 -21600 1 MDT}
{3497241600 -25200 0 MST}
{3511155600 -21600 1 MDT}
{3528691200 -25200 0 MST}
{3542605200 -21600 1 MDT}
{3560140800 -25200 0 MST}
{3574054800 -21600 1 MDT}
{3592195200 -25200 0 MST}
{3605504400 -21600 1 MDT}
{3623644800 -25200 0 MST}
{3636954000 -21600 1 MDT}
{3655094400 -25200 0 MST}
{3669008400 -21600 1 MDT}
{3686544000 -25200 0 MST}
{3700458000 -21600 1 MDT}
{3717993600 -25200 0 MST}
{3731907600 -21600 1 MDT}
{3750048000 -25200 0 MST}
{3763357200 -21600 1 MDT}
{3781497600 -25200 0 MST}
{3794806800 -21600 1 MDT}
{3812947200 -25200 0 MST}
{3826256400 -21600 1 MDT}
{3844396800 -25200 0 MST}
{3858310800 -21600 1 MDT}
{3875846400 -25200 0 MST}
{3889760400 -21600 1 MDT}
{3907296000 -25200 0 MST}
{3921210000 -21600 1 MDT}
{3939350400 -25200 0 MST}
{3952659600 -21600 1 MDT}
{3970800000 -25200 0 MST}
{3984109200 -21600 1 MDT}
{4002249600 -25200 0 MST}
{4016163600 -21600 1 MDT}
{4033699200 -25200 0 MST}
{4047613200 -21600 1 MDT}
{4065148800 -25200 0 MST}
{4079062800 -21600 1 MDT}
{4096598400 -25200 0 MST}
}
-154
View File
@@ -59,158 +59,4 @@ set TZData(:America/Merida) {
{1635663600 -21600 0 CST}
{1648972800 -18000 1 CDT}
{1667113200 -21600 0 CST}
{1680422400 -18000 1 CDT}
{1698562800 -21600 0 CST}
{1712476800 -18000 1 CDT}
{1730012400 -21600 0 CST}
{1743926400 -18000 1 CDT}
{1761462000 -21600 0 CST}
{1775376000 -18000 1 CDT}
{1792911600 -21600 0 CST}
{1806825600 -18000 1 CDT}
{1824966000 -21600 0 CST}
{1838275200 -18000 1 CDT}
{1856415600 -21600 0 CST}
{1869724800 -18000 1 CDT}
{1887865200 -21600 0 CST}
{1901779200 -18000 1 CDT}
{1919314800 -21600 0 CST}
{1933228800 -18000 1 CDT}
{1950764400 -21600 0 CST}
{1964678400 -18000 1 CDT}
{1982818800 -21600 0 CST}
{1996128000 -18000 1 CDT}
{2014268400 -21600 0 CST}
{2027577600 -18000 1 CDT}
{2045718000 -21600 0 CST}
{2059027200 -18000 1 CDT}
{2077167600 -21600 0 CST}
{2091081600 -18000 1 CDT}
{2108617200 -21600 0 CST}
{2122531200 -18000 1 CDT}
{2140066800 -21600 0 CST}
{2153980800 -18000 1 CDT}
{2172121200 -21600 0 CST}
{2185430400 -18000 1 CDT}
{2203570800 -21600 0 CST}
{2216880000 -18000 1 CDT}
{2235020400 -21600 0 CST}
{2248934400 -18000 1 CDT}
{2266470000 -21600 0 CST}
{2280384000 -18000 1 CDT}
{2297919600 -21600 0 CST}
{2311833600 -18000 1 CDT}
{2329369200 -21600 0 CST}
{2343283200 -18000 1 CDT}
{2361423600 -21600 0 CST}
{2374732800 -18000 1 CDT}
{2392873200 -21600 0 CST}
{2406182400 -18000 1 CDT}
{2424322800 -21600 0 CST}
{2438236800 -18000 1 CDT}
{2455772400 -21600 0 CST}
{2469686400 -18000 1 CDT}
{2487222000 -21600 0 CST}
{2501136000 -18000 1 CDT}
{2519276400 -21600 0 CST}
{2532585600 -18000 1 CDT}
{2550726000 -21600 0 CST}
{2564035200 -18000 1 CDT}
{2582175600 -21600 0 CST}
{2596089600 -18000 1 CDT}
{2613625200 -21600 0 CST}
{2627539200 -18000 1 CDT}
{2645074800 -21600 0 CST}
{2658988800 -18000 1 CDT}
{2676524400 -21600 0 CST}
{2690438400 -18000 1 CDT}
{2708578800 -21600 0 CST}
{2721888000 -18000 1 CDT}
{2740028400 -21600 0 CST}
{2753337600 -18000 1 CDT}
{2771478000 -21600 0 CST}
{2785392000 -18000 1 CDT}
{2802927600 -21600 0 CST}
{2816841600 -18000 1 CDT}
{2834377200 -21600 0 CST}
{2848291200 -18000 1 CDT}
{2866431600 -21600 0 CST}
{2879740800 -18000 1 CDT}
{2897881200 -21600 0 CST}
{2911190400 -18000 1 CDT}
{2929330800 -21600 0 CST}
{2942640000 -18000 1 CDT}
{2960780400 -21600 0 CST}
{2974694400 -18000 1 CDT}
{2992230000 -21600 0 CST}
{3006144000 -18000 1 CDT}
{3023679600 -21600 0 CST}
{3037593600 -18000 1 CDT}
{3055734000 -21600 0 CST}
{3069043200 -18000 1 CDT}
{3087183600 -21600 0 CST}
{3100492800 -18000 1 CDT}
{3118633200 -21600 0 CST}
{3132547200 -18000 1 CDT}
{3150082800 -21600 0 CST}
{3163996800 -18000 1 CDT}
{3181532400 -21600 0 CST}
{3195446400 -18000 1 CDT}
{3212982000 -21600 0 CST}
{3226896000 -18000 1 CDT}
{3245036400 -21600 0 CST}
{3258345600 -18000 1 CDT}
{3276486000 -21600 0 CST}
{3289795200 -18000 1 CDT}
{3307935600 -21600 0 CST}
{3321849600 -18000 1 CDT}
{3339385200 -21600 0 CST}
{3353299200 -18000 1 CDT}
{3370834800 -21600 0 CST}
{3384748800 -18000 1 CDT}
{3402889200 -21600 0 CST}
{3416198400 -18000 1 CDT}
{3434338800 -21600 0 CST}
{3447648000 -18000 1 CDT}
{3465788400 -21600 0 CST}
{3479702400 -18000 1 CDT}
{3497238000 -21600 0 CST}
{3511152000 -18000 1 CDT}
{3528687600 -21600 0 CST}
{3542601600 -18000 1 CDT}
{3560137200 -21600 0 CST}
{3574051200 -18000 1 CDT}
{3592191600 -21600 0 CST}
{3605500800 -18000 1 CDT}
{3623641200 -21600 0 CST}
{3636950400 -18000 1 CDT}
{3655090800 -21600 0 CST}
{3669004800 -18000 1 CDT}
{3686540400 -21600 0 CST}
{3700454400 -18000 1 CDT}
{3717990000 -21600 0 CST}
{3731904000 -18000 1 CDT}
{3750044400 -21600 0 CST}
{3763353600 -18000 1 CDT}
{3781494000 -21600 0 CST}
{3794803200 -18000 1 CDT}
{3812943600 -21600 0 CST}
{3826252800 -18000 1 CDT}
{3844393200 -21600 0 CST}
{3858307200 -18000 1 CDT}
{3875842800 -21600 0 CST}
{3889756800 -18000 1 CDT}
{3907292400 -21600 0 CST}
{3921206400 -18000 1 CDT}
{3939346800 -21600 0 CST}
{3952656000 -18000 1 CDT}
{3970796400 -21600 0 CST}
{3984105600 -18000 1 CDT}
{4002246000 -21600 0 CST}
{4016160000 -18000 1 CDT}
{4033695600 -21600 0 CST}
{4047609600 -18000 1 CDT}
{4065145200 -21600 0 CST}
{4079059200 -18000 1 CDT}
{4096594800 -21600 0 CST}
}
-154
View File
@@ -71,158 +71,4 @@ set TZData(:America/Mexico_City) {
{1635663600 -21600 0 CST}
{1648972800 -18000 1 CDT}
{1667113200 -21600 0 CST}
{1680422400 -18000 1 CDT}
{1698562800 -21600 0 CST}
{1712476800 -18000 1 CDT}
{1730012400 -21600 0 CST}
{1743926400 -18000 1 CDT}
{1761462000 -21600 0 CST}
{1775376000 -18000 1 CDT}
{1792911600 -21600 0 CST}
{1806825600 -18000 1 CDT}
{1824966000 -21600 0 CST}
{1838275200 -18000 1 CDT}
{1856415600 -21600 0 CST}
{1869724800 -18000 1 CDT}
{1887865200 -21600 0 CST}
{1901779200 -18000 1 CDT}
{1919314800 -21600 0 CST}
{1933228800 -18000 1 CDT}
{1950764400 -21600 0 CST}
{1964678400 -18000 1 CDT}
{1982818800 -21600 0 CST}
{1996128000 -18000 1 CDT}
{2014268400 -21600 0 CST}
{2027577600 -18000 1 CDT}
{2045718000 -21600 0 CST}
{2059027200 -18000 1 CDT}
{2077167600 -21600 0 CST}
{2091081600 -18000 1 CDT}
{2108617200 -21600 0 CST}
{2122531200 -18000 1 CDT}
{2140066800 -21600 0 CST}
{2153980800 -18000 1 CDT}
{2172121200 -21600 0 CST}
{2185430400 -18000 1 CDT}
{2203570800 -21600 0 CST}
{2216880000 -18000 1 CDT}
{2235020400 -21600 0 CST}
{2248934400 -18000 1 CDT}
{2266470000 -21600 0 CST}
{2280384000 -18000 1 CDT}
{2297919600 -21600 0 CST}
{2311833600 -18000 1 CDT}
{2329369200 -21600 0 CST}
{2343283200 -18000 1 CDT}
{2361423600 -21600 0 CST}
{2374732800 -18000 1 CDT}
{2392873200 -21600 0 CST}
{2406182400 -18000 1 CDT}
{2424322800 -21600 0 CST}
{2438236800 -18000 1 CDT}
{2455772400 -21600 0 CST}
{2469686400 -18000 1 CDT}
{2487222000 -21600 0 CST}
{2501136000 -18000 1 CDT}
{2519276400 -21600 0 CST}
{2532585600 -18000 1 CDT}
{2550726000 -21600 0 CST}
{2564035200 -18000 1 CDT}
{2582175600 -21600 0 CST}
{2596089600 -18000 1 CDT}
{2613625200 -21600 0 CST}
{2627539200 -18000 1 CDT}
{2645074800 -21600 0 CST}
{2658988800 -18000 1 CDT}
{2676524400 -21600 0 CST}
{2690438400 -18000 1 CDT}
{2708578800 -21600 0 CST}
{2721888000 -18000 1 CDT}
{2740028400 -21600 0 CST}
{2753337600 -18000 1 CDT}
{2771478000 -21600 0 CST}
{2785392000 -18000 1 CDT}
{2802927600 -21600 0 CST}
{2816841600 -18000 1 CDT}
{2834377200 -21600 0 CST}
{2848291200 -18000 1 CDT}
{2866431600 -21600 0 CST}
{2879740800 -18000 1 CDT}
{2897881200 -21600 0 CST}
{2911190400 -18000 1 CDT}
{2929330800 -21600 0 CST}
{2942640000 -18000 1 CDT}
{2960780400 -21600 0 CST}
{2974694400 -18000 1 CDT}
{2992230000 -21600 0 CST}
{3006144000 -18000 1 CDT}
{3023679600 -21600 0 CST}
{3037593600 -18000 1 CDT}
{3055734000 -21600 0 CST}
{3069043200 -18000 1 CDT}
{3087183600 -21600 0 CST}
{3100492800 -18000 1 CDT}
{3118633200 -21600 0 CST}
{3132547200 -18000 1 CDT}
{3150082800 -21600 0 CST}
{3163996800 -18000 1 CDT}
{3181532400 -21600 0 CST}
{3195446400 -18000 1 CDT}
{3212982000 -21600 0 CST}
{3226896000 -18000 1 CDT}
{3245036400 -21600 0 CST}
{3258345600 -18000 1 CDT}
{3276486000 -21600 0 CST}
{3289795200 -18000 1 CDT}
{3307935600 -21600 0 CST}
{3321849600 -18000 1 CDT}
{3339385200 -21600 0 CST}
{3353299200 -18000 1 CDT}
{3370834800 -21600 0 CST}
{3384748800 -18000 1 CDT}
{3402889200 -21600 0 CST}
{3416198400 -18000 1 CDT}
{3434338800 -21600 0 CST}
{3447648000 -18000 1 CDT}
{3465788400 -21600 0 CST}
{3479702400 -18000 1 CDT}
{3497238000 -21600 0 CST}
{3511152000 -18000 1 CDT}
{3528687600 -21600 0 CST}
{3542601600 -18000 1 CDT}
{3560137200 -21600 0 CST}
{3574051200 -18000 1 CDT}
{3592191600 -21600 0 CST}
{3605500800 -18000 1 CDT}
{3623641200 -21600 0 CST}
{3636950400 -18000 1 CDT}
{3655090800 -21600 0 CST}
{3669004800 -18000 1 CDT}
{3686540400 -21600 0 CST}
{3700454400 -18000 1 CDT}
{3717990000 -21600 0 CST}
{3731904000 -18000 1 CDT}
{3750044400 -21600 0 CST}
{3763353600 -18000 1 CDT}
{3781494000 -21600 0 CST}
{3794803200 -18000 1 CDT}
{3812943600 -21600 0 CST}
{3826252800 -18000 1 CDT}
{3844393200 -21600 0 CST}
{3858307200 -18000 1 CDT}
{3875842800 -21600 0 CST}
{3889756800 -18000 1 CDT}
{3907292400 -21600 0 CST}
{3921206400 -18000 1 CDT}
{3939346800 -21600 0 CST}
{3952656000 -18000 1 CDT}
{3970796400 -21600 0 CST}
{3984105600 -18000 1 CDT}
{4002246000 -21600 0 CST}
{4016160000 -18000 1 CDT}
{4033695600 -21600 0 CST}
{4047609600 -18000 1 CDT}
{4065145200 -21600 0 CST}
{4079059200 -18000 1 CDT}
{4096594800 -21600 0 CST}
}
-154
View File
@@ -61,158 +61,4 @@ set TZData(:America/Monterrey) {
{1635663600 -21600 0 CST}
{1648972800 -18000 1 CDT}
{1667113200 -21600 0 CST}
{1680422400 -18000 1 CDT}
{1698562800 -21600 0 CST}
{1712476800 -18000 1 CDT}
{1730012400 -21600 0 CST}
{1743926400 -18000 1 CDT}
{1761462000 -21600 0 CST}
{1775376000 -18000 1 CDT}
{1792911600 -21600 0 CST}
{1806825600 -18000 1 CDT}
{1824966000 -21600 0 CST}
{1838275200 -18000 1 CDT}
{1856415600 -21600 0 CST}
{1869724800 -18000 1 CDT}
{1887865200 -21600 0 CST}
{1901779200 -18000 1 CDT}
{1919314800 -21600 0 CST}
{1933228800 -18000 1 CDT}
{1950764400 -21600 0 CST}
{1964678400 -18000 1 CDT}
{1982818800 -21600 0 CST}
{1996128000 -18000 1 CDT}
{2014268400 -21600 0 CST}
{2027577600 -18000 1 CDT}
{2045718000 -21600 0 CST}
{2059027200 -18000 1 CDT}
{2077167600 -21600 0 CST}
{2091081600 -18000 1 CDT}
{2108617200 -21600 0 CST}
{2122531200 -18000 1 CDT}
{2140066800 -21600 0 CST}
{2153980800 -18000 1 CDT}
{2172121200 -21600 0 CST}
{2185430400 -18000 1 CDT}
{2203570800 -21600 0 CST}
{2216880000 -18000 1 CDT}
{2235020400 -21600 0 CST}
{2248934400 -18000 1 CDT}
{2266470000 -21600 0 CST}
{2280384000 -18000 1 CDT}
{2297919600 -21600 0 CST}
{2311833600 -18000 1 CDT}
{2329369200 -21600 0 CST}
{2343283200 -18000 1 CDT}
{2361423600 -21600 0 CST}
{2374732800 -18000 1 CDT}
{2392873200 -21600 0 CST}
{2406182400 -18000 1 CDT}
{2424322800 -21600 0 CST}
{2438236800 -18000 1 CDT}
{2455772400 -21600 0 CST}
{2469686400 -18000 1 CDT}
{2487222000 -21600 0 CST}
{2501136000 -18000 1 CDT}
{2519276400 -21600 0 CST}
{2532585600 -18000 1 CDT}
{2550726000 -21600 0 CST}
{2564035200 -18000 1 CDT}
{2582175600 -21600 0 CST}
{2596089600 -18000 1 CDT}
{2613625200 -21600 0 CST}
{2627539200 -18000 1 CDT}
{2645074800 -21600 0 CST}
{2658988800 -18000 1 CDT}
{2676524400 -21600 0 CST}
{2690438400 -18000 1 CDT}
{2708578800 -21600 0 CST}
{2721888000 -18000 1 CDT}
{2740028400 -21600 0 CST}
{2753337600 -18000 1 CDT}
{2771478000 -21600 0 CST}
{2785392000 -18000 1 CDT}
{2802927600 -21600 0 CST}
{2816841600 -18000 1 CDT}
{2834377200 -21600 0 CST}
{2848291200 -18000 1 CDT}
{2866431600 -21600 0 CST}
{2879740800 -18000 1 CDT}
{2897881200 -21600 0 CST}
{2911190400 -18000 1 CDT}
{2929330800 -21600 0 CST}
{2942640000 -18000 1 CDT}
{2960780400 -21600 0 CST}
{2974694400 -18000 1 CDT}
{2992230000 -21600 0 CST}
{3006144000 -18000 1 CDT}
{3023679600 -21600 0 CST}
{3037593600 -18000 1 CDT}
{3055734000 -21600 0 CST}
{3069043200 -18000 1 CDT}
{3087183600 -21600 0 CST}
{3100492800 -18000 1 CDT}
{3118633200 -21600 0 CST}
{3132547200 -18000 1 CDT}
{3150082800 -21600 0 CST}
{3163996800 -18000 1 CDT}
{3181532400 -21600 0 CST}
{3195446400 -18000 1 CDT}
{3212982000 -21600 0 CST}
{3226896000 -18000 1 CDT}
{3245036400 -21600 0 CST}
{3258345600 -18000 1 CDT}
{3276486000 -21600 0 CST}
{3289795200 -18000 1 CDT}
{3307935600 -21600 0 CST}
{3321849600 -18000 1 CDT}
{3339385200 -21600 0 CST}
{3353299200 -18000 1 CDT}
{3370834800 -21600 0 CST}
{3384748800 -18000 1 CDT}
{3402889200 -21600 0 CST}
{3416198400 -18000 1 CDT}
{3434338800 -21600 0 CST}
{3447648000 -18000 1 CDT}
{3465788400 -21600 0 CST}
{3479702400 -18000 1 CDT}
{3497238000 -21600 0 CST}
{3511152000 -18000 1 CDT}
{3528687600 -21600 0 CST}
{3542601600 -18000 1 CDT}
{3560137200 -21600 0 CST}
{3574051200 -18000 1 CDT}
{3592191600 -21600 0 CST}
{3605500800 -18000 1 CDT}
{3623641200 -21600 0 CST}
{3636950400 -18000 1 CDT}
{3655090800 -21600 0 CST}
{3669004800 -18000 1 CDT}
{3686540400 -21600 0 CST}
{3700454400 -18000 1 CDT}
{3717990000 -21600 0 CST}
{3731904000 -18000 1 CDT}
{3750044400 -21600 0 CST}
{3763353600 -18000 1 CDT}
{3781494000 -21600 0 CST}
{3794803200 -18000 1 CDT}
{3812943600 -21600 0 CST}
{3826252800 -18000 1 CDT}
{3844393200 -21600 0 CST}
{3858307200 -18000 1 CDT}
{3875842800 -21600 0 CST}
{3889756800 -18000 1 CDT}
{3907292400 -21600 0 CST}
{3921206400 -18000 1 CDT}
{3939346800 -21600 0 CST}
{3952656000 -18000 1 CDT}
{3970796400 -21600 0 CST}
{3984105600 -18000 1 CDT}
{4002246000 -21600 0 CST}
{4016160000 -18000 1 CDT}
{4033695600 -21600 0 CST}
{4047609600 -18000 1 CDT}
{4065145200 -21600 0 CST}
{4079059200 -18000 1 CDT}
{4096594800 -21600 0 CST}
}
+3 -262
View File
@@ -1,264 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:America/Nipigon) {
{-9223372036854775808 -21184 0 LMT}
{-2366734016 -18000 0 EST}
{-1632070800 -14400 1 EDT}
{-1615140000 -18000 0 EST}
{-923252400 -14400 1 EDT}
{-880218000 -14400 0 EWT}
{-769395600 -14400 1 EPT}
{-765396000 -18000 0 EST}
{136364400 -14400 1 EDT}
{152085600 -18000 0 EST}
{167814000 -14400 1 EDT}
{183535200 -18000 0 EST}
{199263600 -14400 1 EDT}
{215589600 -18000 0 EST}
{230713200 -14400 1 EDT}
{247039200 -18000 0 EST}
{262767600 -14400 1 EDT}
{278488800 -18000 0 EST}
{294217200 -14400 1 EDT}
{309938400 -18000 0 EST}
{325666800 -14400 1 EDT}
{341388000 -18000 0 EST}
{357116400 -14400 1 EDT}
{372837600 -18000 0 EST}
{388566000 -14400 1 EDT}
{404892000 -18000 0 EST}
{420015600 -14400 1 EDT}
{436341600 -18000 0 EST}
{452070000 -14400 1 EDT}
{467791200 -18000 0 EST}
{483519600 -14400 1 EDT}
{499240800 -18000 0 EST}
{514969200 -14400 1 EDT}
{530690400 -18000 0 EST}
{544604400 -14400 1 EDT}
{562140000 -18000 0 EST}
{576054000 -14400 1 EDT}
{594194400 -18000 0 EST}
{607503600 -14400 1 EDT}
{625644000 -18000 0 EST}
{638953200 -14400 1 EDT}
{657093600 -18000 0 EST}
{671007600 -14400 1 EDT}
{688543200 -18000 0 EST}
{702457200 -14400 1 EDT}
{719992800 -18000 0 EST}
{733906800 -14400 1 EDT}
{752047200 -18000 0 EST}
{765356400 -14400 1 EDT}
{783496800 -18000 0 EST}
{796806000 -14400 1 EDT}
{814946400 -18000 0 EST}
{828860400 -14400 1 EDT}
{846396000 -18000 0 EST}
{860310000 -14400 1 EDT}
{877845600 -18000 0 EST}
{891759600 -14400 1 EDT}
{909295200 -18000 0 EST}
{923209200 -14400 1 EDT}
{941349600 -18000 0 EST}
{954658800 -14400 1 EDT}
{972799200 -18000 0 EST}
{986108400 -14400 1 EDT}
{1004248800 -18000 0 EST}
{1018162800 -14400 1 EDT}
{1035698400 -18000 0 EST}
{1049612400 -14400 1 EDT}
{1067148000 -18000 0 EST}
{1081062000 -14400 1 EDT}
{1099202400 -18000 0 EST}
{1112511600 -14400 1 EDT}
{1130652000 -18000 0 EST}
{1143961200 -14400 1 EDT}
{1162101600 -18000 0 EST}
{1173596400 -14400 1 EDT}
{1194156000 -18000 0 EST}
{1205046000 -14400 1 EDT}
{1225605600 -18000 0 EST}
{1236495600 -14400 1 EDT}
{1257055200 -18000 0 EST}
{1268550000 -14400 1 EDT}
{1289109600 -18000 0 EST}
{1299999600 -14400 1 EDT}
{1320559200 -18000 0 EST}
{1331449200 -14400 1 EDT}
{1352008800 -18000 0 EST}
{1362898800 -14400 1 EDT}
{1383458400 -18000 0 EST}
{1394348400 -14400 1 EDT}
{1414908000 -18000 0 EST}
{1425798000 -14400 1 EDT}
{1446357600 -18000 0 EST}
{1457852400 -14400 1 EDT}
{1478412000 -18000 0 EST}
{1489302000 -14400 1 EDT}
{1509861600 -18000 0 EST}
{1520751600 -14400 1 EDT}
{1541311200 -18000 0 EST}
{1552201200 -14400 1 EDT}
{1572760800 -18000 0 EST}
{1583650800 -14400 1 EDT}
{1604210400 -18000 0 EST}
{1615705200 -14400 1 EDT}
{1636264800 -18000 0 EST}
{1647154800 -14400 1 EDT}
{1667714400 -18000 0 EST}
{1678604400 -14400 1 EDT}
{1699164000 -18000 0 EST}
{1710054000 -14400 1 EDT}
{1730613600 -18000 0 EST}
{1741503600 -14400 1 EDT}
{1762063200 -18000 0 EST}
{1772953200 -14400 1 EDT}
{1793512800 -18000 0 EST}
{1805007600 -14400 1 EDT}
{1825567200 -18000 0 EST}
{1836457200 -14400 1 EDT}
{1857016800 -18000 0 EST}
{1867906800 -14400 1 EDT}
{1888466400 -18000 0 EST}
{1899356400 -14400 1 EDT}
{1919916000 -18000 0 EST}
{1930806000 -14400 1 EDT}
{1951365600 -18000 0 EST}
{1962860400 -14400 1 EDT}
{1983420000 -18000 0 EST}
{1994310000 -14400 1 EDT}
{2014869600 -18000 0 EST}
{2025759600 -14400 1 EDT}
{2046319200 -18000 0 EST}
{2057209200 -14400 1 EDT}
{2077768800 -18000 0 EST}
{2088658800 -14400 1 EDT}
{2109218400 -18000 0 EST}
{2120108400 -14400 1 EDT}
{2140668000 -18000 0 EST}
{2152162800 -14400 1 EDT}
{2172722400 -18000 0 EST}
{2183612400 -14400 1 EDT}
{2204172000 -18000 0 EST}
{2215062000 -14400 1 EDT}
{2235621600 -18000 0 EST}
{2246511600 -14400 1 EDT}
{2267071200 -18000 0 EST}
{2277961200 -14400 1 EDT}
{2298520800 -18000 0 EST}
{2309410800 -14400 1 EDT}
{2329970400 -18000 0 EST}
{2341465200 -14400 1 EDT}
{2362024800 -18000 0 EST}
{2372914800 -14400 1 EDT}
{2393474400 -18000 0 EST}
{2404364400 -14400 1 EDT}
{2424924000 -18000 0 EST}
{2435814000 -14400 1 EDT}
{2456373600 -18000 0 EST}
{2467263600 -14400 1 EDT}
{2487823200 -18000 0 EST}
{2499318000 -14400 1 EDT}
{2519877600 -18000 0 EST}
{2530767600 -14400 1 EDT}
{2551327200 -18000 0 EST}
{2562217200 -14400 1 EDT}
{2582776800 -18000 0 EST}
{2593666800 -14400 1 EDT}
{2614226400 -18000 0 EST}
{2625116400 -14400 1 EDT}
{2645676000 -18000 0 EST}
{2656566000 -14400 1 EDT}
{2677125600 -18000 0 EST}
{2688620400 -14400 1 EDT}
{2709180000 -18000 0 EST}
{2720070000 -14400 1 EDT}
{2740629600 -18000 0 EST}
{2751519600 -14400 1 EDT}
{2772079200 -18000 0 EST}
{2782969200 -14400 1 EDT}
{2803528800 -18000 0 EST}
{2814418800 -14400 1 EDT}
{2834978400 -18000 0 EST}
{2846473200 -14400 1 EDT}
{2867032800 -18000 0 EST}
{2877922800 -14400 1 EDT}
{2898482400 -18000 0 EST}
{2909372400 -14400 1 EDT}
{2929932000 -18000 0 EST}
{2940822000 -14400 1 EDT}
{2961381600 -18000 0 EST}
{2972271600 -14400 1 EDT}
{2992831200 -18000 0 EST}
{3003721200 -14400 1 EDT}
{3024280800 -18000 0 EST}
{3035775600 -14400 1 EDT}
{3056335200 -18000 0 EST}
{3067225200 -14400 1 EDT}
{3087784800 -18000 0 EST}
{3098674800 -14400 1 EDT}
{3119234400 -18000 0 EST}
{3130124400 -14400 1 EDT}
{3150684000 -18000 0 EST}
{3161574000 -14400 1 EDT}
{3182133600 -18000 0 EST}
{3193023600 -14400 1 EDT}
{3213583200 -18000 0 EST}
{3225078000 -14400 1 EDT}
{3245637600 -18000 0 EST}
{3256527600 -14400 1 EDT}
{3277087200 -18000 0 EST}
{3287977200 -14400 1 EDT}
{3308536800 -18000 0 EST}
{3319426800 -14400 1 EDT}
{3339986400 -18000 0 EST}
{3350876400 -14400 1 EDT}
{3371436000 -18000 0 EST}
{3382930800 -14400 1 EDT}
{3403490400 -18000 0 EST}
{3414380400 -14400 1 EDT}
{3434940000 -18000 0 EST}
{3445830000 -14400 1 EDT}
{3466389600 -18000 0 EST}
{3477279600 -14400 1 EDT}
{3497839200 -18000 0 EST}
{3508729200 -14400 1 EDT}
{3529288800 -18000 0 EST}
{3540178800 -14400 1 EDT}
{3560738400 -18000 0 EST}
{3572233200 -14400 1 EDT}
{3592792800 -18000 0 EST}
{3603682800 -14400 1 EDT}
{3624242400 -18000 0 EST}
{3635132400 -14400 1 EDT}
{3655692000 -18000 0 EST}
{3666582000 -14400 1 EDT}
{3687141600 -18000 0 EST}
{3698031600 -14400 1 EDT}
{3718591200 -18000 0 EST}
{3730086000 -14400 1 EDT}
{3750645600 -18000 0 EST}
{3761535600 -14400 1 EDT}
{3782095200 -18000 0 EST}
{3792985200 -14400 1 EDT}
{3813544800 -18000 0 EST}
{3824434800 -14400 1 EDT}
{3844994400 -18000 0 EST}
{3855884400 -14400 1 EDT}
{3876444000 -18000 0 EST}
{3887334000 -14400 1 EDT}
{3907893600 -18000 0 EST}
{3919388400 -14400 1 EDT}
{3939948000 -18000 0 EST}
{3950838000 -14400 1 EDT}
{3971397600 -18000 0 EST}
{3982287600 -14400 1 EDT}
{4002847200 -18000 0 EST}
{4013737200 -14400 1 EDT}
{4034296800 -18000 0 EST}
{4045186800 -14400 1 EDT}
{4065746400 -18000 0 EST}
{4076636400 -14400 1 EDT}
{4097196000 -18000 0 EST}
if {![info exists TZData(America/Toronto)]} {
LoadTimeZoneFile America/Toronto
}
set TZData(:America/Nipigon) $TZData(:America/Toronto)
+1 -154
View File
@@ -89,158 +89,5 @@ set TZData(:America/Nuuk) {
{1635642000 -10800 0 -03}
{1648342800 -7200 1 -02}
{1667091600 -10800 0 -03}
{1679792400 -7200 1 -02}
{1698541200 -10800 0 -03}
{1711846800 -7200 1 -02}
{1729990800 -10800 0 -03}
{1743296400 -7200 1 -02}
{1761440400 -10800 0 -03}
{1774746000 -7200 1 -02}
{1792890000 -10800 0 -03}
{1806195600 -7200 1 -02}
{1824944400 -10800 0 -03}
{1837645200 -7200 1 -02}
{1856394000 -10800 0 -03}
{1869094800 -7200 1 -02}
{1887843600 -10800 0 -03}
{1901149200 -7200 1 -02}
{1919293200 -10800 0 -03}
{1932598800 -7200 1 -02}
{1950742800 -10800 0 -03}
{1964048400 -7200 1 -02}
{1982797200 -10800 0 -03}
{1995498000 -7200 1 -02}
{2014246800 -10800 0 -03}
{2026947600 -7200 1 -02}
{2045696400 -10800 0 -03}
{2058397200 -7200 1 -02}
{2077146000 -10800 0 -03}
{2090451600 -7200 1 -02}
{2108595600 -10800 0 -03}
{2121901200 -7200 1 -02}
{2140045200 -10800 0 -03}
{2153350800 -7200 1 -02}
{2172099600 -10800 0 -03}
{2184800400 -7200 1 -02}
{2203549200 -10800 0 -03}
{2216250000 -7200 1 -02}
{2234998800 -10800 0 -03}
{2248304400 -7200 1 -02}
{2266448400 -10800 0 -03}
{2279754000 -7200 1 -02}
{2297898000 -10800 0 -03}
{2311203600 -7200 1 -02}
{2329347600 -10800 0 -03}
{2342653200 -7200 1 -02}
{2361402000 -10800 0 -03}
{2374102800 -7200 1 -02}
{2392851600 -10800 0 -03}
{2405552400 -7200 1 -02}
{2424301200 -10800 0 -03}
{2437606800 -7200 1 -02}
{2455750800 -10800 0 -03}
{2469056400 -7200 1 -02}
{2487200400 -10800 0 -03}
{2500506000 -7200 1 -02}
{2519254800 -10800 0 -03}
{2531955600 -7200 1 -02}
{2550704400 -10800 0 -03}
{2563405200 -7200 1 -02}
{2582154000 -10800 0 -03}
{2595459600 -7200 1 -02}
{2613603600 -10800 0 -03}
{2626909200 -7200 1 -02}
{2645053200 -10800 0 -03}
{2658358800 -7200 1 -02}
{2676502800 -10800 0 -03}
{2689808400 -7200 1 -02}
{2708557200 -10800 0 -03}
{2721258000 -7200 1 -02}
{2740006800 -10800 0 -03}
{2752707600 -7200 1 -02}
{2771456400 -10800 0 -03}
{2784762000 -7200 1 -02}
{2802906000 -10800 0 -03}
{2816211600 -7200 1 -02}
{2834355600 -10800 0 -03}
{2847661200 -7200 1 -02}
{2866410000 -10800 0 -03}
{2879110800 -7200 1 -02}
{2897859600 -10800 0 -03}
{2910560400 -7200 1 -02}
{2929309200 -10800 0 -03}
{2942010000 -7200 1 -02}
{2960758800 -10800 0 -03}
{2974064400 -7200 1 -02}
{2992208400 -10800 0 -03}
{3005514000 -7200 1 -02}
{3023658000 -10800 0 -03}
{3036963600 -7200 1 -02}
{3055712400 -10800 0 -03}
{3068413200 -7200 1 -02}
{3087162000 -10800 0 -03}
{3099862800 -7200 1 -02}
{3118611600 -10800 0 -03}
{3131917200 -7200 1 -02}
{3150061200 -10800 0 -03}
{3163366800 -7200 1 -02}
{3181510800 -10800 0 -03}
{3194816400 -7200 1 -02}
{3212960400 -10800 0 -03}
{3226266000 -7200 1 -02}
{3245014800 -10800 0 -03}
{3257715600 -7200 1 -02}
{3276464400 -10800 0 -03}
{3289165200 -7200 1 -02}
{3307914000 -10800 0 -03}
{3321219600 -7200 1 -02}
{3339363600 -10800 0 -03}
{3352669200 -7200 1 -02}
{3370813200 -10800 0 -03}
{3384118800 -7200 1 -02}
{3402867600 -10800 0 -03}
{3415568400 -7200 1 -02}
{3434317200 -10800 0 -03}
{3447018000 -7200 1 -02}
{3465766800 -10800 0 -03}
{3479072400 -7200 1 -02}
{3497216400 -10800 0 -03}
{3510522000 -7200 1 -02}
{3528666000 -10800 0 -03}
{3541971600 -7200 1 -02}
{3560115600 -10800 0 -03}
{3573421200 -7200 1 -02}
{3592170000 -10800 0 -03}
{3604870800 -7200 1 -02}
{3623619600 -10800 0 -03}
{3636320400 -7200 1 -02}
{3655069200 -10800 0 -03}
{3668374800 -7200 1 -02}
{3686518800 -10800 0 -03}
{3699824400 -7200 1 -02}
{3717968400 -10800 0 -03}
{3731274000 -7200 1 -02}
{3750022800 -10800 0 -03}
{3762723600 -7200 1 -02}
{3781472400 -10800 0 -03}
{3794173200 -7200 1 -02}
{3812922000 -10800 0 -03}
{3825622800 -7200 1 -02}
{3844371600 -10800 0 -03}
{3857677200 -7200 1 -02}
{3875821200 -10800 0 -03}
{3889126800 -7200 1 -02}
{3907270800 -10800 0 -03}
{3920576400 -7200 1 -02}
{3939325200 -10800 0 -03}
{3952026000 -7200 1 -02}
{3970774800 -10800 0 -03}
{3983475600 -7200 1 -02}
{4002224400 -10800 0 -03}
{4015530000 -7200 1 -02}
{4033674000 -10800 0 -03}
{4046979600 -7200 1 -02}
{4065123600 -10800 0 -03}
{4078429200 -7200 1 -02}
{4096573200 -10800 0 -03}
{1679792400 -7200 0 -02}
}
+156 -155
View File
@@ -64,159 +64,160 @@ set TZData(:America/Ojinaga) {
{1615712400 -21600 1 MDT}
{1636272000 -25200 0 MST}
{1647162000 -21600 1 MDT}
{1667721600 -25200 0 MST}
{1678611600 -21600 1 MDT}
{1699171200 -25200 0 MST}
{1710061200 -21600 1 MDT}
{1730620800 -25200 0 MST}
{1741510800 -21600 1 MDT}
{1762070400 -25200 0 MST}
{1772960400 -21600 1 MDT}
{1793520000 -25200 0 MST}
{1805014800 -21600 1 MDT}
{1825574400 -25200 0 MST}
{1836464400 -21600 1 MDT}
{1857024000 -25200 0 MST}
{1867914000 -21600 1 MDT}
{1888473600 -25200 0 MST}
{1899363600 -21600 1 MDT}
{1919923200 -25200 0 MST}
{1930813200 -21600 1 MDT}
{1951372800 -25200 0 MST}
{1962867600 -21600 1 MDT}
{1983427200 -25200 0 MST}
{1994317200 -21600 1 MDT}
{2014876800 -25200 0 MST}
{2025766800 -21600 1 MDT}
{2046326400 -25200 0 MST}
{2057216400 -21600 1 MDT}
{2077776000 -25200 0 MST}
{2088666000 -21600 1 MDT}
{2109225600 -25200 0 MST}
{2120115600 -21600 1 MDT}
{2140675200 -25200 0 MST}
{2152170000 -21600 1 MDT}
{2172729600 -25200 0 MST}
{2183619600 -21600 1 MDT}
{2204179200 -25200 0 MST}
{2215069200 -21600 1 MDT}
{2235628800 -25200 0 MST}
{2246518800 -21600 1 MDT}
{2267078400 -25200 0 MST}
{2277968400 -21600 1 MDT}
{2298528000 -25200 0 MST}
{2309418000 -21600 1 MDT}
{2329977600 -25200 0 MST}
{2341472400 -21600 1 MDT}
{2362032000 -25200 0 MST}
{2372922000 -21600 1 MDT}
{2393481600 -25200 0 MST}
{2404371600 -21600 1 MDT}
{2424931200 -25200 0 MST}
{2435821200 -21600 1 MDT}
{2456380800 -25200 0 MST}
{2467270800 -21600 1 MDT}
{2487830400 -25200 0 MST}
{2499325200 -21600 1 MDT}
{2519884800 -25200 0 MST}
{2530774800 -21600 1 MDT}
{2551334400 -25200 0 MST}
{2562224400 -21600 1 MDT}
{2582784000 -25200 0 MST}
{2593674000 -21600 1 MDT}
{2614233600 -25200 0 MST}
{2625123600 -21600 1 MDT}
{2645683200 -25200 0 MST}
{2656573200 -21600 1 MDT}
{2677132800 -25200 0 MST}
{2688627600 -21600 1 MDT}
{2709187200 -25200 0 MST}
{2720077200 -21600 1 MDT}
{2740636800 -25200 0 MST}
{2751526800 -21600 1 MDT}
{2772086400 -25200 0 MST}
{2782976400 -21600 1 MDT}
{2803536000 -25200 0 MST}
{2814426000 -21600 1 MDT}
{2834985600 -25200 0 MST}
{2846480400 -21600 1 MDT}
{2867040000 -25200 0 MST}
{2877930000 -21600 1 MDT}
{2898489600 -25200 0 MST}
{2909379600 -21600 1 MDT}
{2929939200 -25200 0 MST}
{2940829200 -21600 1 MDT}
{2961388800 -25200 0 MST}
{2972278800 -21600 1 MDT}
{2992838400 -25200 0 MST}
{3003728400 -21600 1 MDT}
{3024288000 -25200 0 MST}
{3035782800 -21600 1 MDT}
{3056342400 -25200 0 MST}
{3067232400 -21600 1 MDT}
{3087792000 -25200 0 MST}
{3098682000 -21600 1 MDT}
{3119241600 -25200 0 MST}
{3130131600 -21600 1 MDT}
{3150691200 -25200 0 MST}
{3161581200 -21600 1 MDT}
{3182140800 -25200 0 MST}
{3193030800 -21600 1 MDT}
{3213590400 -25200 0 MST}
{3225085200 -21600 1 MDT}
{3245644800 -25200 0 MST}
{3256534800 -21600 1 MDT}
{3277094400 -25200 0 MST}
{3287984400 -21600 1 MDT}
{3308544000 -25200 0 MST}
{3319434000 -21600 1 MDT}
{3339993600 -25200 0 MST}
{3350883600 -21600 1 MDT}
{3371443200 -25200 0 MST}
{3382938000 -21600 1 MDT}
{3403497600 -25200 0 MST}
{3414387600 -21600 1 MDT}
{3434947200 -25200 0 MST}
{3445837200 -21600 1 MDT}
{3466396800 -25200 0 MST}
{3477286800 -21600 1 MDT}
{3497846400 -25200 0 MST}
{3508736400 -21600 1 MDT}
{3529296000 -25200 0 MST}
{3540186000 -21600 1 MDT}
{3560745600 -25200 0 MST}
{3572240400 -21600 1 MDT}
{3592800000 -25200 0 MST}
{3603690000 -21600 1 MDT}
{3624249600 -25200 0 MST}
{3635139600 -21600 1 MDT}
{3655699200 -25200 0 MST}
{3666589200 -21600 1 MDT}
{3687148800 -25200 0 MST}
{3698038800 -21600 1 MDT}
{3718598400 -25200 0 MST}
{3730093200 -21600 1 MDT}
{3750652800 -25200 0 MST}
{3761542800 -21600 1 MDT}
{3782102400 -25200 0 MST}
{3792992400 -21600 1 MDT}
{3813552000 -25200 0 MST}
{3824442000 -21600 1 MDT}
{3845001600 -25200 0 MST}
{3855891600 -21600 1 MDT}
{3876451200 -25200 0 MST}
{3887341200 -21600 1 MDT}
{3907900800 -25200 0 MST}
{3919395600 -21600 1 MDT}
{3939955200 -25200 0 MST}
{3950845200 -21600 1 MDT}
{3971404800 -25200 0 MST}
{3982294800 -21600 1 MDT}
{4002854400 -25200 0 MST}
{4013744400 -21600 1 MDT}
{4034304000 -25200 0 MST}
{4045194000 -21600 1 MDT}
{4065753600 -25200 0 MST}
{4076643600 -21600 1 MDT}
{4097203200 -25200 0 MST}
{1667120400 -21600 0 CST}
{1669788000 -21600 0 CST}
{1678608000 -18000 1 CDT}
{1699167600 -21600 0 CST}
{1710057600 -18000 1 CDT}
{1730617200 -21600 0 CST}
{1741507200 -18000 1 CDT}
{1762066800 -21600 0 CST}
{1772956800 -18000 1 CDT}
{1793516400 -21600 0 CST}
{1805011200 -18000 1 CDT}
{1825570800 -21600 0 CST}
{1836460800 -18000 1 CDT}
{1857020400 -21600 0 CST}
{1867910400 -18000 1 CDT}
{1888470000 -21600 0 CST}
{1899360000 -18000 1 CDT}
{1919919600 -21600 0 CST}
{1930809600 -18000 1 CDT}
{1951369200 -21600 0 CST}
{1962864000 -18000 1 CDT}
{1983423600 -21600 0 CST}
{1994313600 -18000 1 CDT}
{2014873200 -21600 0 CST}
{2025763200 -18000 1 CDT}
{2046322800 -21600 0 CST}
{2057212800 -18000 1 CDT}
{2077772400 -21600 0 CST}
{2088662400 -18000 1 CDT}
{2109222000 -21600 0 CST}
{2120112000 -18000 1 CDT}
{2140671600 -21600 0 CST}
{2152166400 -18000 1 CDT}
{2172726000 -21600 0 CST}
{2183616000 -18000 1 CDT}
{2204175600 -21600 0 CST}
{2215065600 -18000 1 CDT}
{2235625200 -21600 0 CST}
{2246515200 -18000 1 CDT}
{2267074800 -21600 0 CST}
{2277964800 -18000 1 CDT}
{2298524400 -21600 0 CST}
{2309414400 -18000 1 CDT}
{2329974000 -21600 0 CST}
{2341468800 -18000 1 CDT}
{2362028400 -21600 0 CST}
{2372918400 -18000 1 CDT}
{2393478000 -21600 0 CST}
{2404368000 -18000 1 CDT}
{2424927600 -21600 0 CST}
{2435817600 -18000 1 CDT}
{2456377200 -21600 0 CST}
{2467267200 -18000 1 CDT}
{2487826800 -21600 0 CST}
{2499321600 -18000 1 CDT}
{2519881200 -21600 0 CST}
{2530771200 -18000 1 CDT}
{2551330800 -21600 0 CST}
{2562220800 -18000 1 CDT}
{2582780400 -21600 0 CST}
{2593670400 -18000 1 CDT}
{2614230000 -21600 0 CST}
{2625120000 -18000 1 CDT}
{2645679600 -21600 0 CST}
{2656569600 -18000 1 CDT}
{2677129200 -21600 0 CST}
{2688624000 -18000 1 CDT}
{2709183600 -21600 0 CST}
{2720073600 -18000 1 CDT}
{2740633200 -21600 0 CST}
{2751523200 -18000 1 CDT}
{2772082800 -21600 0 CST}
{2782972800 -18000 1 CDT}
{2803532400 -21600 0 CST}
{2814422400 -18000 1 CDT}
{2834982000 -21600 0 CST}
{2846476800 -18000 1 CDT}
{2867036400 -21600 0 CST}
{2877926400 -18000 1 CDT}
{2898486000 -21600 0 CST}
{2909376000 -18000 1 CDT}
{2929935600 -21600 0 CST}
{2940825600 -18000 1 CDT}
{2961385200 -21600 0 CST}
{2972275200 -18000 1 CDT}
{2992834800 -21600 0 CST}
{3003724800 -18000 1 CDT}
{3024284400 -21600 0 CST}
{3035779200 -18000 1 CDT}
{3056338800 -21600 0 CST}
{3067228800 -18000 1 CDT}
{3087788400 -21600 0 CST}
{3098678400 -18000 1 CDT}
{3119238000 -21600 0 CST}
{3130128000 -18000 1 CDT}
{3150687600 -21600 0 CST}
{3161577600 -18000 1 CDT}
{3182137200 -21600 0 CST}
{3193027200 -18000 1 CDT}
{3213586800 -21600 0 CST}
{3225081600 -18000 1 CDT}
{3245641200 -21600 0 CST}
{3256531200 -18000 1 CDT}
{3277090800 -21600 0 CST}
{3287980800 -18000 1 CDT}
{3308540400 -21600 0 CST}
{3319430400 -18000 1 CDT}
{3339990000 -21600 0 CST}
{3350880000 -18000 1 CDT}
{3371439600 -21600 0 CST}
{3382934400 -18000 1 CDT}
{3403494000 -21600 0 CST}
{3414384000 -18000 1 CDT}
{3434943600 -21600 0 CST}
{3445833600 -18000 1 CDT}
{3466393200 -21600 0 CST}
{3477283200 -18000 1 CDT}
{3497842800 -21600 0 CST}
{3508732800 -18000 1 CDT}
{3529292400 -21600 0 CST}
{3540182400 -18000 1 CDT}
{3560742000 -21600 0 CST}
{3572236800 -18000 1 CDT}
{3592796400 -21600 0 CST}
{3603686400 -18000 1 CDT}
{3624246000 -21600 0 CST}
{3635136000 -18000 1 CDT}
{3655695600 -21600 0 CST}
{3666585600 -18000 1 CDT}
{3687145200 -21600 0 CST}
{3698035200 -18000 1 CDT}
{3718594800 -21600 0 CST}
{3730089600 -18000 1 CDT}
{3750649200 -21600 0 CST}
{3761539200 -18000 1 CDT}
{3782098800 -21600 0 CST}
{3792988800 -18000 1 CDT}
{3813548400 -21600 0 CST}
{3824438400 -18000 1 CDT}
{3844998000 -21600 0 CST}
{3855888000 -18000 1 CDT}
{3876447600 -21600 0 CST}
{3887337600 -18000 1 CDT}
{3907897200 -21600 0 CST}
{3919392000 -18000 1 CDT}
{3939951600 -21600 0 CST}
{3950841600 -18000 1 CDT}
{3971401200 -21600 0 CST}
{3982291200 -18000 1 CDT}
{4002850800 -21600 0 CST}
{4013740800 -18000 1 CDT}
{4034300400 -21600 0 CST}
{4045190400 -18000 1 CDT}
{4065750000 -21600 0 CST}
{4076640000 -18000 1 CDT}
{4097199600 -21600 0 CST}
}
+3 -250
View File
@@ -1,252 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:America/Pangnirtung) {
{-9223372036854775808 0 0 -00}
{-1546300800 -14400 0 AST}
{-880221600 -10800 1 AWT}
{-769395600 -10800 1 APT}
{-765399600 -14400 0 AST}
{-147902400 -7200 1 ADDT}
{-131572800 -14400 0 AST}
{325663200 -10800 1 ADT}
{341384400 -14400 0 AST}
{357112800 -10800 1 ADT}
{372834000 -14400 0 AST}
{388562400 -10800 1 ADT}
{404888400 -14400 0 AST}
{420012000 -10800 1 ADT}
{436338000 -14400 0 AST}
{452066400 -10800 1 ADT}
{467787600 -14400 0 AST}
{483516000 -10800 1 ADT}
{499237200 -14400 0 AST}
{514965600 -10800 1 ADT}
{530686800 -14400 0 AST}
{544600800 -10800 1 ADT}
{562136400 -14400 0 AST}
{576050400 -10800 1 ADT}
{594190800 -14400 0 AST}
{607500000 -10800 1 ADT}
{625640400 -14400 0 AST}
{638949600 -10800 1 ADT}
{657090000 -14400 0 AST}
{671004000 -10800 1 ADT}
{688539600 -14400 0 AST}
{702453600 -10800 1 ADT}
{719989200 -14400 0 AST}
{733903200 -10800 1 ADT}
{752043600 -14400 0 AST}
{765352800 -10800 1 ADT}
{783493200 -14400 0 AST}
{796802400 -18000 0 EST}
{796806000 -14400 1 EDT}
{814946400 -18000 0 EST}
{828860400 -14400 1 EDT}
{846396000 -18000 0 EST}
{860310000 -14400 1 EDT}
{877845600 -18000 0 EST}
{891759600 -14400 1 EDT}
{909295200 -18000 0 EST}
{923209200 -14400 1 EDT}
{941353200 -21600 0 CST}
{954662400 -18000 1 CDT}
{972806400 -18000 0 EST}
{986108400 -14400 1 EDT}
{1004248800 -18000 0 EST}
{1018162800 -14400 1 EDT}
{1035698400 -18000 0 EST}
{1049612400 -14400 1 EDT}
{1067148000 -18000 0 EST}
{1081062000 -14400 1 EDT}
{1099202400 -18000 0 EST}
{1112511600 -14400 1 EDT}
{1130652000 -18000 0 EST}
{1143961200 -14400 1 EDT}
{1162101600 -18000 0 EST}
{1173596400 -14400 1 EDT}
{1194156000 -18000 0 EST}
{1205046000 -14400 1 EDT}
{1225605600 -18000 0 EST}
{1236495600 -14400 1 EDT}
{1257055200 -18000 0 EST}
{1268550000 -14400 1 EDT}
{1289109600 -18000 0 EST}
{1299999600 -14400 1 EDT}
{1320559200 -18000 0 EST}
{1331449200 -14400 1 EDT}
{1352008800 -18000 0 EST}
{1362898800 -14400 1 EDT}
{1383458400 -18000 0 EST}
{1394348400 -14400 1 EDT}
{1414908000 -18000 0 EST}
{1425798000 -14400 1 EDT}
{1446357600 -18000 0 EST}
{1457852400 -14400 1 EDT}
{1478412000 -18000 0 EST}
{1489302000 -14400 1 EDT}
{1509861600 -18000 0 EST}
{1520751600 -14400 1 EDT}
{1541311200 -18000 0 EST}
{1552201200 -14400 1 EDT}
{1572760800 -18000 0 EST}
{1583650800 -14400 1 EDT}
{1604210400 -18000 0 EST}
{1615705200 -14400 1 EDT}
{1636264800 -18000 0 EST}
{1647154800 -14400 1 EDT}
{1667714400 -18000 0 EST}
{1678604400 -14400 1 EDT}
{1699164000 -18000 0 EST}
{1710054000 -14400 1 EDT}
{1730613600 -18000 0 EST}
{1741503600 -14400 1 EDT}
{1762063200 -18000 0 EST}
{1772953200 -14400 1 EDT}
{1793512800 -18000 0 EST}
{1805007600 -14400 1 EDT}
{1825567200 -18000 0 EST}
{1836457200 -14400 1 EDT}
{1857016800 -18000 0 EST}
{1867906800 -14400 1 EDT}
{1888466400 -18000 0 EST}
{1899356400 -14400 1 EDT}
{1919916000 -18000 0 EST}
{1930806000 -14400 1 EDT}
{1951365600 -18000 0 EST}
{1962860400 -14400 1 EDT}
{1983420000 -18000 0 EST}
{1994310000 -14400 1 EDT}
{2014869600 -18000 0 EST}
{2025759600 -14400 1 EDT}
{2046319200 -18000 0 EST}
{2057209200 -14400 1 EDT}
{2077768800 -18000 0 EST}
{2088658800 -14400 1 EDT}
{2109218400 -18000 0 EST}
{2120108400 -14400 1 EDT}
{2140668000 -18000 0 EST}
{2152162800 -14400 1 EDT}
{2172722400 -18000 0 EST}
{2183612400 -14400 1 EDT}
{2204172000 -18000 0 EST}
{2215062000 -14400 1 EDT}
{2235621600 -18000 0 EST}
{2246511600 -14400 1 EDT}
{2267071200 -18000 0 EST}
{2277961200 -14400 1 EDT}
{2298520800 -18000 0 EST}
{2309410800 -14400 1 EDT}
{2329970400 -18000 0 EST}
{2341465200 -14400 1 EDT}
{2362024800 -18000 0 EST}
{2372914800 -14400 1 EDT}
{2393474400 -18000 0 EST}
{2404364400 -14400 1 EDT}
{2424924000 -18000 0 EST}
{2435814000 -14400 1 EDT}
{2456373600 -18000 0 EST}
{2467263600 -14400 1 EDT}
{2487823200 -18000 0 EST}
{2499318000 -14400 1 EDT}
{2519877600 -18000 0 EST}
{2530767600 -14400 1 EDT}
{2551327200 -18000 0 EST}
{2562217200 -14400 1 EDT}
{2582776800 -18000 0 EST}
{2593666800 -14400 1 EDT}
{2614226400 -18000 0 EST}
{2625116400 -14400 1 EDT}
{2645676000 -18000 0 EST}
{2656566000 -14400 1 EDT}
{2677125600 -18000 0 EST}
{2688620400 -14400 1 EDT}
{2709180000 -18000 0 EST}
{2720070000 -14400 1 EDT}
{2740629600 -18000 0 EST}
{2751519600 -14400 1 EDT}
{2772079200 -18000 0 EST}
{2782969200 -14400 1 EDT}
{2803528800 -18000 0 EST}
{2814418800 -14400 1 EDT}
{2834978400 -18000 0 EST}
{2846473200 -14400 1 EDT}
{2867032800 -18000 0 EST}
{2877922800 -14400 1 EDT}
{2898482400 -18000 0 EST}
{2909372400 -14400 1 EDT}
{2929932000 -18000 0 EST}
{2940822000 -14400 1 EDT}
{2961381600 -18000 0 EST}
{2972271600 -14400 1 EDT}
{2992831200 -18000 0 EST}
{3003721200 -14400 1 EDT}
{3024280800 -18000 0 EST}
{3035775600 -14400 1 EDT}
{3056335200 -18000 0 EST}
{3067225200 -14400 1 EDT}
{3087784800 -18000 0 EST}
{3098674800 -14400 1 EDT}
{3119234400 -18000 0 EST}
{3130124400 -14400 1 EDT}
{3150684000 -18000 0 EST}
{3161574000 -14400 1 EDT}
{3182133600 -18000 0 EST}
{3193023600 -14400 1 EDT}
{3213583200 -18000 0 EST}
{3225078000 -14400 1 EDT}
{3245637600 -18000 0 EST}
{3256527600 -14400 1 EDT}
{3277087200 -18000 0 EST}
{3287977200 -14400 1 EDT}
{3308536800 -18000 0 EST}
{3319426800 -14400 1 EDT}
{3339986400 -18000 0 EST}
{3350876400 -14400 1 EDT}
{3371436000 -18000 0 EST}
{3382930800 -14400 1 EDT}
{3403490400 -18000 0 EST}
{3414380400 -14400 1 EDT}
{3434940000 -18000 0 EST}
{3445830000 -14400 1 EDT}
{3466389600 -18000 0 EST}
{3477279600 -14400 1 EDT}
{3497839200 -18000 0 EST}
{3508729200 -14400 1 EDT}
{3529288800 -18000 0 EST}
{3540178800 -14400 1 EDT}
{3560738400 -18000 0 EST}
{3572233200 -14400 1 EDT}
{3592792800 -18000 0 EST}
{3603682800 -14400 1 EDT}
{3624242400 -18000 0 EST}
{3635132400 -14400 1 EDT}
{3655692000 -18000 0 EST}
{3666582000 -14400 1 EDT}
{3687141600 -18000 0 EST}
{3698031600 -14400 1 EDT}
{3718591200 -18000 0 EST}
{3730086000 -14400 1 EDT}
{3750645600 -18000 0 EST}
{3761535600 -14400 1 EDT}
{3782095200 -18000 0 EST}
{3792985200 -14400 1 EDT}
{3813544800 -18000 0 EST}
{3824434800 -14400 1 EDT}
{3844994400 -18000 0 EST}
{3855884400 -14400 1 EDT}
{3876444000 -18000 0 EST}
{3887334000 -14400 1 EDT}
{3907893600 -18000 0 EST}
{3919388400 -14400 1 EDT}
{3939948000 -18000 0 EST}
{3950838000 -14400 1 EDT}
{3971397600 -18000 0 EST}
{3982287600 -14400 1 EDT}
{4002847200 -18000 0 EST}
{4013737200 -14400 1 EDT}
{4034296800 -18000 0 EST}
{4045186800 -14400 1 EDT}
{4065746400 -18000 0 EST}
{4076636400 -14400 1 EDT}
{4097196000 -18000 0 EST}
if {![info exists TZData(America/Iqaluit)]} {
LoadTimeZoneFile America/Iqaluit
}
set TZData(:America/Pangnirtung) $TZData(:America/Iqaluit)
+3 -262
View File
@@ -1,264 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:America/Rainy_River) {
{-9223372036854775808 -22696 0 LMT}
{-2366732504 -21600 0 CST}
{-1632067200 -18000 1 CDT}
{-1615136400 -21600 0 CST}
{-923248800 -18000 1 CDT}
{-880214400 -18000 0 CWT}
{-769395600 -18000 1 CPT}
{-765392400 -21600 0 CST}
{136368000 -18000 1 CDT}
{152089200 -21600 0 CST}
{167817600 -18000 1 CDT}
{183538800 -21600 0 CST}
{199267200 -18000 1 CDT}
{215593200 -21600 0 CST}
{230716800 -18000 1 CDT}
{247042800 -21600 0 CST}
{262771200 -18000 1 CDT}
{278492400 -21600 0 CST}
{294220800 -18000 1 CDT}
{309942000 -21600 0 CST}
{325670400 -18000 1 CDT}
{341391600 -21600 0 CST}
{357120000 -18000 1 CDT}
{372841200 -21600 0 CST}
{388569600 -18000 1 CDT}
{404895600 -21600 0 CST}
{420019200 -18000 1 CDT}
{436345200 -21600 0 CST}
{452073600 -18000 1 CDT}
{467794800 -21600 0 CST}
{483523200 -18000 1 CDT}
{499244400 -21600 0 CST}
{514972800 -18000 1 CDT}
{530694000 -21600 0 CST}
{544608000 -18000 1 CDT}
{562143600 -21600 0 CST}
{576057600 -18000 1 CDT}
{594198000 -21600 0 CST}
{607507200 -18000 1 CDT}
{625647600 -21600 0 CST}
{638956800 -18000 1 CDT}
{657097200 -21600 0 CST}
{671011200 -18000 1 CDT}
{688546800 -21600 0 CST}
{702460800 -18000 1 CDT}
{719996400 -21600 0 CST}
{733910400 -18000 1 CDT}
{752050800 -21600 0 CST}
{765360000 -18000 1 CDT}
{783500400 -21600 0 CST}
{796809600 -18000 1 CDT}
{814950000 -21600 0 CST}
{828864000 -18000 1 CDT}
{846399600 -21600 0 CST}
{860313600 -18000 1 CDT}
{877849200 -21600 0 CST}
{891763200 -18000 1 CDT}
{909298800 -21600 0 CST}
{923212800 -18000 1 CDT}
{941353200 -21600 0 CST}
{954662400 -18000 1 CDT}
{972802800 -21600 0 CST}
{986112000 -18000 1 CDT}
{1004252400 -21600 0 CST}
{1018166400 -18000 1 CDT}
{1035702000 -21600 0 CST}
{1049616000 -18000 1 CDT}
{1067151600 -21600 0 CST}
{1081065600 -18000 1 CDT}
{1099206000 -21600 0 CST}
{1112515200 -18000 1 CDT}
{1130655600 -21600 0 CST}
{1143964800 -18000 1 CDT}
{1162105200 -21600 0 CST}
{1173600000 -18000 1 CDT}
{1194159600 -21600 0 CST}
{1205049600 -18000 1 CDT}
{1225609200 -21600 0 CST}
{1236499200 -18000 1 CDT}
{1257058800 -21600 0 CST}
{1268553600 -18000 1 CDT}
{1289113200 -21600 0 CST}
{1300003200 -18000 1 CDT}
{1320562800 -21600 0 CST}
{1331452800 -18000 1 CDT}
{1352012400 -21600 0 CST}
{1362902400 -18000 1 CDT}
{1383462000 -21600 0 CST}
{1394352000 -18000 1 CDT}
{1414911600 -21600 0 CST}
{1425801600 -18000 1 CDT}
{1446361200 -21600 0 CST}
{1457856000 -18000 1 CDT}
{1478415600 -21600 0 CST}
{1489305600 -18000 1 CDT}
{1509865200 -21600 0 CST}
{1520755200 -18000 1 CDT}
{1541314800 -21600 0 CST}
{1552204800 -18000 1 CDT}
{1572764400 -21600 0 CST}
{1583654400 -18000 1 CDT}
{1604214000 -21600 0 CST}
{1615708800 -18000 1 CDT}
{1636268400 -21600 0 CST}
{1647158400 -18000 1 CDT}
{1667718000 -21600 0 CST}
{1678608000 -18000 1 CDT}
{1699167600 -21600 0 CST}
{1710057600 -18000 1 CDT}
{1730617200 -21600 0 CST}
{1741507200 -18000 1 CDT}
{1762066800 -21600 0 CST}
{1772956800 -18000 1 CDT}
{1793516400 -21600 0 CST}
{1805011200 -18000 1 CDT}
{1825570800 -21600 0 CST}
{1836460800 -18000 1 CDT}
{1857020400 -21600 0 CST}
{1867910400 -18000 1 CDT}
{1888470000 -21600 0 CST}
{1899360000 -18000 1 CDT}
{1919919600 -21600 0 CST}
{1930809600 -18000 1 CDT}
{1951369200 -21600 0 CST}
{1962864000 -18000 1 CDT}
{1983423600 -21600 0 CST}
{1994313600 -18000 1 CDT}
{2014873200 -21600 0 CST}
{2025763200 -18000 1 CDT}
{2046322800 -21600 0 CST}
{2057212800 -18000 1 CDT}
{2077772400 -21600 0 CST}
{2088662400 -18000 1 CDT}
{2109222000 -21600 0 CST}
{2120112000 -18000 1 CDT}
{2140671600 -21600 0 CST}
{2152166400 -18000 1 CDT}
{2172726000 -21600 0 CST}
{2183616000 -18000 1 CDT}
{2204175600 -21600 0 CST}
{2215065600 -18000 1 CDT}
{2235625200 -21600 0 CST}
{2246515200 -18000 1 CDT}
{2267074800 -21600 0 CST}
{2277964800 -18000 1 CDT}
{2298524400 -21600 0 CST}
{2309414400 -18000 1 CDT}
{2329974000 -21600 0 CST}
{2341468800 -18000 1 CDT}
{2362028400 -21600 0 CST}
{2372918400 -18000 1 CDT}
{2393478000 -21600 0 CST}
{2404368000 -18000 1 CDT}
{2424927600 -21600 0 CST}
{2435817600 -18000 1 CDT}
{2456377200 -21600 0 CST}
{2467267200 -18000 1 CDT}
{2487826800 -21600 0 CST}
{2499321600 -18000 1 CDT}
{2519881200 -21600 0 CST}
{2530771200 -18000 1 CDT}
{2551330800 -21600 0 CST}
{2562220800 -18000 1 CDT}
{2582780400 -21600 0 CST}
{2593670400 -18000 1 CDT}
{2614230000 -21600 0 CST}
{2625120000 -18000 1 CDT}
{2645679600 -21600 0 CST}
{2656569600 -18000 1 CDT}
{2677129200 -21600 0 CST}
{2688624000 -18000 1 CDT}
{2709183600 -21600 0 CST}
{2720073600 -18000 1 CDT}
{2740633200 -21600 0 CST}
{2751523200 -18000 1 CDT}
{2772082800 -21600 0 CST}
{2782972800 -18000 1 CDT}
{2803532400 -21600 0 CST}
{2814422400 -18000 1 CDT}
{2834982000 -21600 0 CST}
{2846476800 -18000 1 CDT}
{2867036400 -21600 0 CST}
{2877926400 -18000 1 CDT}
{2898486000 -21600 0 CST}
{2909376000 -18000 1 CDT}
{2929935600 -21600 0 CST}
{2940825600 -18000 1 CDT}
{2961385200 -21600 0 CST}
{2972275200 -18000 1 CDT}
{2992834800 -21600 0 CST}
{3003724800 -18000 1 CDT}
{3024284400 -21600 0 CST}
{3035779200 -18000 1 CDT}
{3056338800 -21600 0 CST}
{3067228800 -18000 1 CDT}
{3087788400 -21600 0 CST}
{3098678400 -18000 1 CDT}
{3119238000 -21600 0 CST}
{3130128000 -18000 1 CDT}
{3150687600 -21600 0 CST}
{3161577600 -18000 1 CDT}
{3182137200 -21600 0 CST}
{3193027200 -18000 1 CDT}
{3213586800 -21600 0 CST}
{3225081600 -18000 1 CDT}
{3245641200 -21600 0 CST}
{3256531200 -18000 1 CDT}
{3277090800 -21600 0 CST}
{3287980800 -18000 1 CDT}
{3308540400 -21600 0 CST}
{3319430400 -18000 1 CDT}
{3339990000 -21600 0 CST}
{3350880000 -18000 1 CDT}
{3371439600 -21600 0 CST}
{3382934400 -18000 1 CDT}
{3403494000 -21600 0 CST}
{3414384000 -18000 1 CDT}
{3434943600 -21600 0 CST}
{3445833600 -18000 1 CDT}
{3466393200 -21600 0 CST}
{3477283200 -18000 1 CDT}
{3497842800 -21600 0 CST}
{3508732800 -18000 1 CDT}
{3529292400 -21600 0 CST}
{3540182400 -18000 1 CDT}
{3560742000 -21600 0 CST}
{3572236800 -18000 1 CDT}
{3592796400 -21600 0 CST}
{3603686400 -18000 1 CDT}
{3624246000 -21600 0 CST}
{3635136000 -18000 1 CDT}
{3655695600 -21600 0 CST}
{3666585600 -18000 1 CDT}
{3687145200 -21600 0 CST}
{3698035200 -18000 1 CDT}
{3718594800 -21600 0 CST}
{3730089600 -18000 1 CDT}
{3750649200 -21600 0 CST}
{3761539200 -18000 1 CDT}
{3782098800 -21600 0 CST}
{3792988800 -18000 1 CDT}
{3813548400 -21600 0 CST}
{3824438400 -18000 1 CDT}
{3844998000 -21600 0 CST}
{3855888000 -18000 1 CDT}
{3876447600 -21600 0 CST}
{3887337600 -18000 1 CDT}
{3907897200 -21600 0 CST}
{3919392000 -18000 1 CDT}
{3939951600 -21600 0 CST}
{3950841600 -18000 1 CDT}
{3971401200 -21600 0 CST}
{3982291200 -18000 1 CDT}
{4002850800 -21600 0 CST}
{4013740800 -18000 1 CDT}
{4034300400 -21600 0 CST}
{4045190400 -18000 1 CDT}
{4065750000 -21600 0 CST}
{4076640000 -18000 1 CDT}
{4097199600 -21600 0 CST}
if {![info exists TZData(America/Winnipeg)]} {
LoadTimeZoneFile America/Winnipeg
}
set TZData(:America/Rainy_River) $TZData(:America/Winnipeg)
+16 -2
View File
@@ -3,8 +3,22 @@
set TZData(:America/Rankin_Inlet) {
{-9223372036854775808 0 0 -00}
{-410227200 -21600 0 CST}
{-147895200 -14400 1 CDDT}
{-131565600 -21600 0 CST}
{73468800 -18000 1 CDT}
{89190000 -21600 0 CST}
{104918400 -18000 1 CDT}
{120639600 -21600 0 CST}
{136368000 -18000 1 CDT}
{152089200 -21600 0 CST}
{167817600 -18000 1 CDT}
{183538800 -21600 0 CST}
{199267200 -18000 1 CDT}
{215593200 -21600 0 CST}
{230716800 -18000 1 CDT}
{247042800 -21600 0 CST}
{262771200 -18000 1 CDT}
{278492400 -21600 0 CST}
{294220800 -18000 1 CDT}
{309942000 -21600 0 CST}
{325670400 -18000 1 CDT}
{341391600 -21600 0 CST}
{357120000 -18000 1 CDT}
+16 -2
View File
@@ -3,8 +3,22 @@
set TZData(:America/Resolute) {
{-9223372036854775808 0 0 -00}
{-704937600 -21600 0 CST}
{-147895200 -14400 1 CDDT}
{-131565600 -21600 0 CST}
{73468800 -18000 1 CDT}
{89190000 -21600 0 CST}
{104918400 -18000 1 CDT}
{120639600 -21600 0 CST}
{136368000 -18000 1 CDT}
{152089200 -21600 0 CST}
{167817600 -18000 1 CDT}
{183538800 -21600 0 CST}
{199267200 -18000 1 CDT}
{215593200 -21600 0 CST}
{230716800 -18000 1 CDT}
{247042800 -21600 0 CST}
{262771200 -18000 1 CDT}
{278492400 -21600 0 CST}
{294220800 -18000 1 CDT}
{309942000 -21600 0 CST}
{325670400 -18000 1 CDT}
{341391600 -21600 0 CST}
{357120000 -18000 1 CDT}
+3 -270
View File
@@ -1,272 +1,5 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:America/Thunder_Bay) {
{-9223372036854775808 -21420 0 LMT}
{-2366733780 -21600 0 CST}
{-1893434400 -18000 0 EST}
{-883594800 -18000 0 EST}
{-880218000 -14400 1 EWT}
{-769395600 -14400 1 EPT}
{-765396000 -18000 0 EST}
{18000 -18000 0 EST}
{9961200 -14400 1 EDT}
{25682400 -18000 0 EST}
{41410800 -14400 1 EDT}
{57736800 -18000 0 EST}
{73465200 -14400 1 EDT}
{89186400 -18000 0 EST}
{94712400 -18000 0 EST}
{126248400 -18000 0 EST}
{136364400 -14400 1 EDT}
{152085600 -18000 0 EST}
{167814000 -14400 1 EDT}
{183535200 -18000 0 EST}
{199263600 -14400 1 EDT}
{215589600 -18000 0 EST}
{230713200 -14400 1 EDT}
{247039200 -18000 0 EST}
{262767600 -14400 1 EDT}
{278488800 -18000 0 EST}
{294217200 -14400 1 EDT}
{309938400 -18000 0 EST}
{325666800 -14400 1 EDT}
{341388000 -18000 0 EST}
{357116400 -14400 1 EDT}
{372837600 -18000 0 EST}
{388566000 -14400 1 EDT}
{404892000 -18000 0 EST}
{420015600 -14400 1 EDT}
{436341600 -18000 0 EST}
{452070000 -14400 1 EDT}
{467791200 -18000 0 EST}
{483519600 -14400 1 EDT}
{499240800 -18000 0 EST}
{514969200 -14400 1 EDT}
{530690400 -18000 0 EST}
{544604400 -14400 1 EDT}
{562140000 -18000 0 EST}
{576054000 -14400 1 EDT}
{594194400 -18000 0 EST}
{607503600 -14400 1 EDT}
{625644000 -18000 0 EST}
{638953200 -14400 1 EDT}
{657093600 -18000 0 EST}
{671007600 -14400 1 EDT}
{688543200 -18000 0 EST}
{702457200 -14400 1 EDT}
{719992800 -18000 0 EST}
{733906800 -14400 1 EDT}
{752047200 -18000 0 EST}
{765356400 -14400 1 EDT}
{783496800 -18000 0 EST}
{796806000 -14400 1 EDT}
{814946400 -18000 0 EST}
{828860400 -14400 1 EDT}
{846396000 -18000 0 EST}
{860310000 -14400 1 EDT}
{877845600 -18000 0 EST}
{891759600 -14400 1 EDT}
{909295200 -18000 0 EST}
{923209200 -14400 1 EDT}
{941349600 -18000 0 EST}
{954658800 -14400 1 EDT}
{972799200 -18000 0 EST}
{986108400 -14400 1 EDT}
{1004248800 -18000 0 EST}
{1018162800 -14400 1 EDT}
{1035698400 -18000 0 EST}
{1049612400 -14400 1 EDT}
{1067148000 -18000 0 EST}
{1081062000 -14400 1 EDT}
{1099202400 -18000 0 EST}
{1112511600 -14400 1 EDT}
{1130652000 -18000 0 EST}
{1143961200 -14400 1 EDT}
{1162101600 -18000 0 EST}
{1173596400 -14400 1 EDT}
{1194156000 -18000 0 EST}
{1205046000 -14400 1 EDT}
{1225605600 -18000 0 EST}
{1236495600 -14400 1 EDT}
{1257055200 -18000 0 EST}
{1268550000 -14400 1 EDT}
{1289109600 -18000 0 EST}
{1299999600 -14400 1 EDT}
{1320559200 -18000 0 EST}
{1331449200 -14400 1 EDT}
{1352008800 -18000 0 EST}
{1362898800 -14400 1 EDT}
{1383458400 -18000 0 EST}
{1394348400 -14400 1 EDT}
{1414908000 -18000 0 EST}
{1425798000 -14400 1 EDT}
{1446357600 -18000 0 EST}
{1457852400 -14400 1 EDT}
{1478412000 -18000 0 EST}
{1489302000 -14400 1 EDT}
{1509861600 -18000 0 EST}
{1520751600 -14400 1 EDT}
{1541311200 -18000 0 EST}
{1552201200 -14400 1 EDT}
{1572760800 -18000 0 EST}
{1583650800 -14400 1 EDT}
{1604210400 -18000 0 EST}
{1615705200 -14400 1 EDT}
{1636264800 -18000 0 EST}
{1647154800 -14400 1 EDT}
{1667714400 -18000 0 EST}
{1678604400 -14400 1 EDT}
{1699164000 -18000 0 EST}
{1710054000 -14400 1 EDT}
{1730613600 -18000 0 EST}
{1741503600 -14400 1 EDT}
{1762063200 -18000 0 EST}
{1772953200 -14400 1 EDT}
{1793512800 -18000 0 EST}
{1805007600 -14400 1 EDT}
{1825567200 -18000 0 EST}
{1836457200 -14400 1 EDT}
{1857016800 -18000 0 EST}
{1867906800 -14400 1 EDT}
{1888466400 -18000 0 EST}
{1899356400 -14400 1 EDT}
{1919916000 -18000 0 EST}
{1930806000 -14400 1 EDT}
{1951365600 -18000 0 EST}
{1962860400 -14400 1 EDT}
{1983420000 -18000 0 EST}
{1994310000 -14400 1 EDT}
{2014869600 -18000 0 EST}
{2025759600 -14400 1 EDT}
{2046319200 -18000 0 EST}
{2057209200 -14400 1 EDT}
{2077768800 -18000 0 EST}
{2088658800 -14400 1 EDT}
{2109218400 -18000 0 EST}
{2120108400 -14400 1 EDT}
{2140668000 -18000 0 EST}
{2152162800 -14400 1 EDT}
{2172722400 -18000 0 EST}
{2183612400 -14400 1 EDT}
{2204172000 -18000 0 EST}
{2215062000 -14400 1 EDT}
{2235621600 -18000 0 EST}
{2246511600 -14400 1 EDT}
{2267071200 -18000 0 EST}
{2277961200 -14400 1 EDT}
{2298520800 -18000 0 EST}
{2309410800 -14400 1 EDT}
{2329970400 -18000 0 EST}
{2341465200 -14400 1 EDT}
{2362024800 -18000 0 EST}
{2372914800 -14400 1 EDT}
{2393474400 -18000 0 EST}
{2404364400 -14400 1 EDT}
{2424924000 -18000 0 EST}
{2435814000 -14400 1 EDT}
{2456373600 -18000 0 EST}
{2467263600 -14400 1 EDT}
{2487823200 -18000 0 EST}
{2499318000 -14400 1 EDT}
{2519877600 -18000 0 EST}
{2530767600 -14400 1 EDT}
{2551327200 -18000 0 EST}
{2562217200 -14400 1 EDT}
{2582776800 -18000 0 EST}
{2593666800 -14400 1 EDT}
{2614226400 -18000 0 EST}
{2625116400 -14400 1 EDT}
{2645676000 -18000 0 EST}
{2656566000 -14400 1 EDT}
{2677125600 -18000 0 EST}
{2688620400 -14400 1 EDT}
{2709180000 -18000 0 EST}
{2720070000 -14400 1 EDT}
{2740629600 -18000 0 EST}
{2751519600 -14400 1 EDT}
{2772079200 -18000 0 EST}
{2782969200 -14400 1 EDT}
{2803528800 -18000 0 EST}
{2814418800 -14400 1 EDT}
{2834978400 -18000 0 EST}
{2846473200 -14400 1 EDT}
{2867032800 -18000 0 EST}
{2877922800 -14400 1 EDT}
{2898482400 -18000 0 EST}
{2909372400 -14400 1 EDT}
{2929932000 -18000 0 EST}
{2940822000 -14400 1 EDT}
{2961381600 -18000 0 EST}
{2972271600 -14400 1 EDT}
{2992831200 -18000 0 EST}
{3003721200 -14400 1 EDT}
{3024280800 -18000 0 EST}
{3035775600 -14400 1 EDT}
{3056335200 -18000 0 EST}
{3067225200 -14400 1 EDT}
{3087784800 -18000 0 EST}
{3098674800 -14400 1 EDT}
{3119234400 -18000 0 EST}
{3130124400 -14400 1 EDT}
{3150684000 -18000 0 EST}
{3161574000 -14400 1 EDT}
{3182133600 -18000 0 EST}
{3193023600 -14400 1 EDT}
{3213583200 -18000 0 EST}
{3225078000 -14400 1 EDT}
{3245637600 -18000 0 EST}
{3256527600 -14400 1 EDT}
{3277087200 -18000 0 EST}
{3287977200 -14400 1 EDT}
{3308536800 -18000 0 EST}
{3319426800 -14400 1 EDT}
{3339986400 -18000 0 EST}
{3350876400 -14400 1 EDT}
{3371436000 -18000 0 EST}
{3382930800 -14400 1 EDT}
{3403490400 -18000 0 EST}
{3414380400 -14400 1 EDT}
{3434940000 -18000 0 EST}
{3445830000 -14400 1 EDT}
{3466389600 -18000 0 EST}
{3477279600 -14400 1 EDT}
{3497839200 -18000 0 EST}
{3508729200 -14400 1 EDT}
{3529288800 -18000 0 EST}
{3540178800 -14400 1 EDT}
{3560738400 -18000 0 EST}
{3572233200 -14400 1 EDT}
{3592792800 -18000 0 EST}
{3603682800 -14400 1 EDT}
{3624242400 -18000 0 EST}
{3635132400 -14400 1 EDT}
{3655692000 -18000 0 EST}
{3666582000 -14400 1 EDT}
{3687141600 -18000 0 EST}
{3698031600 -14400 1 EDT}
{3718591200 -18000 0 EST}
{3730086000 -14400 1 EDT}
{3750645600 -18000 0 EST}
{3761535600 -14400 1 EDT}
{3782095200 -18000 0 EST}
{3792985200 -14400 1 EDT}
{3813544800 -18000 0 EST}
{3824434800 -14400 1 EDT}
{3844994400 -18000 0 EST}
{3855884400 -14400 1 EDT}
{3876444000 -18000 0 EST}
{3887334000 -14400 1 EDT}
{3907893600 -18000 0 EST}
{3919388400 -14400 1 EDT}
{3939948000 -18000 0 EST}
{3950838000 -14400 1 EDT}
{3971397600 -18000 0 EST}
{3982287600 -14400 1 EDT}
{4002847200 -18000 0 EST}
{4013737200 -14400 1 EDT}
{4034296800 -18000 0 EST}
{4045186800 -14400 1 EDT}
{4065746400 -18000 0 EST}
{4076636400 -14400 1 EDT}
{4097196000 -18000 0 EST}
if {![info exists TZData(America/Toronto)]} {
LoadTimeZoneFile America/Toronto
}
set TZData(:America/Thunder_Bay) $TZData(:America/Toronto)
+2
View File
@@ -10,8 +10,10 @@ set TZData(:America/Whitehorse) {
{-880203600 -28800 1 YWT}
{-769395600 -28800 1 YPT}
{-765381600 -32400 0 YST}
{-157734000 -32400 0 YST}
{-147884400 -25200 1 YDDT}
{-131554800 -32400 0 YST}
{-121273200 -28800 0 PST}
{315561600 -28800 0 PST}
{325677600 -25200 1 PDT}
{341398800 -28800 0 PST}

Some files were not shown because too many files have changed in this diff Show More