Compare commits

...
Author SHA1 Message Date
fvogel d8cae66217 Fix typo in set-old.test 2017-10-25 17:31:09 +00:00
fvogel 40ce2eccbc 'array for' implementation (TIP #421) from Brad Lanam 2017-10-24 21:24:07 +00:00
dkf 9306fa604c Cherrypick: [fc1409fc91] Method cloning needs to be careful with body representations. 2017-10-24 14:11:16 +00:00
Kevin B Kenny 745b43f627 Historical change affecting tests: Detroit did not observe Daylight Saving Time in 1967 2017-10-24 13:30:41 +00:00
Kevin B Kenny f18d453679 Historical change affecting tests: Detroit did not observe Daylight Saving Time in 1967 2017-10-24 13:24:25 +00:00
Kevin B Kenny 2332ac45ca Update to tzdata2017c 2017-10-24 13:18:51 +00:00
José Ignacio Marín 4407704316 Update TZ info to tzcode2017c. 2017-10-23 16:59:20 +00:00
jan.nijtmans cdb25d8946 Fix [b58e6897034fc5292c9d36ba8099d9a835c98172|b58e689703]: Return value of 'Tcl_Flush' 2017-10-23 12:09:48 +00:00
dkf df974e71f9 Oops; put the code in the wrong place. Mixins have priority when deciding method visibility. 2017-10-19 09:28:16 +00:00
dkf 7393032d5e [1a56550e96] Ensure that method list introspection finds methods from mixins in all cases. 2017-10-19 09:24:12 +00:00
dkf 252f75d8c8 Ensure that method list introspection finds methods from mixins in all cases. Use better approach for preventing excessive iteration. 2017-10-19 09:22:05 +00:00
dkf 69030a86c8 [1a56550e96] Mixins aren't being searched correctly by [info class methods -all] 2017-10-18 18:23:38 +00:00
jan.nijtmans 5b74714749 In nmakehlp -v, return non-0 exit code if version is not found. (taken from vc-reform branch) 2017-10-09 14:25:24 +00:00
jan.nijtmans 15a7950c9e In nmakehlp -v, return non-0 exit code if version is not found. (taken from vc-reform branch) 2017-10-09 14:23:39 +00:00
jan.nijtmans 75ecb090c6 Add visual-studio related entries to ignore-glob. Taken over from reform-vc branch 2017-10-09 12:53:46 +00:00
jan.nijtmans b8e5e2909e Add visual-studio related entries to ignore-glob. Taken over from reform-vc branch 2017-10-09 12:52:14 +00:00
apnadkarni d45863129f RFE [566a999189] - better error message for 32/64 bit mismatch on load. 2017-09-21 18:47:45 +00:00
jan.nijtmans db3273f346 Fix [f5da3d30e096a1c3486fbc480a6ece01fcb277a6|f5da3d30e0]: clerical error in comments 2017-09-14 07:41:09 +00:00
jan.nijtmans a15279ffd1 Make pkgIndex.tcl from msgcat work for Tcl 9.0 (not really necessary, but for consistancy) 2017-09-04 13:59:04 +00:00
jan.nijtmans e08c86934d Typo's (Thanks to Gustaf Neumann), nothing functional. 2017-09-04 12:37:04 +00:00
dgp e3f7bc2783 [0e4d88b650] Allow command overwrite when deletion callback deletes namespace. 2017-09-02 22:03:03 +00:00
dgp 564b991088 [0e4d88b650] Allow command overwrite when deletion callback deletes namespace. 2017-09-02 21:48:05 +00:00
dgp 0ff317501d merge 8.5 2017-09-02 21:36:57 +00:00
dgp f42f0060be Add test 2017-09-02 21:14:55 +00:00
dgp 3ec5b35deb Similar fix to Tcl_CreateCommand(). 2017-09-02 20:40:44 +00:00
dgp 7afc6b1c17 Tidy up. 2017-09-02 20:17:26 +00:00
dgp ce58cdff9f [Bug 0e4d88b650] First draft fix. Re-resolve namespace after cmd deletion. 2017-09-02 19:35:22 +00:00
jan.nijtmans e28f1eece4 Handle Unicode surrogates correctly in Tcl_AppendFormatToObj() and BuildCharSet(). Only makes a difference for TCL_UTF_MAX=4, when surrogates are used in the format string ... highly unlikely corner-case. 2017-09-01 13:48:56 +00:00
jan.nijtmans 25b97a7df9 Adapt .fossil-settings/crlf-glob, for 5 libtommath-related files which have crlf ending 2017-08-31 13:43:17 +00:00
oehhar 11719ccf59 http state 100 continue handling broken [2a94652ee1] 2017-08-31 09:32:05 +00:00
oehhar 7c7a396fc5 http state 100 continue handling broken [2a94652ee1] 2017-08-31 06:31:05 +00:00
jan.nijtmans a95a7dd265 (cherry-pick): Fix [b50fb21410dababca95baa122964b2e312cb9d8a|b50fb214] : exec redirection to append stdout and stderr to the same file 2017-08-29 09:24:29 +00:00
jan.nijtmans 5210283d10 Fix [d2612a2fa193196787aab33bb57f69b1eef9e30c|d2612a2fa1]: Build breaks because of gcc error. Only use "#pragma GCC diagnostic" if the compiler supports this.
Also re-format tclUnixSock.c without further functional changes.
2017-08-22 12:12:11 +00:00
jan.nijtmans 29be40bf89 RFE [http://core.tcl.tk/tk/info/6c0d7aec67|6c0d7aec67]: Better surrogate handling for TCL_UTF_MAX==4. No change when TCL_UTF_MAX==3. (This commit is actually meant for androwish, in order to improve surrogate handling for TCL_UTF_MAX==4) 2017-08-18 21:39:16 +00:00
jan.nijtmans a04094e9a5 Adopt some harmless changes from the 'irontcl' branch. Left 2 changes behind which I'm not so sure about (but I could be convinced ...). Ticket with explanation would be appreciated! 2017-08-17 22:26:48 +00:00
jan.nijtmans 13d9910fd6 '#if' -> '#ifdef' in tclUnixPort.h. Suggested by Gustaf Neumann. Reduces the number of gcc warnings, when compiling Tcl with -Wundef. Harmless. 2017-08-17 21:52:42 +00:00
dgp 277f101d7f [f2336c116b] Move pragmas to make gcc happy; it is pickier than clang. 2017-08-14 15:33:03 +00:00
Joe Mistachkin a50a381b04 The 'clean' target should delete the generated 'nmhlp-out.txt' file as well. 2017-08-13 22:31:19 +00:00
Joe Mistachkin e513ec3916 Always define '_USING_V110_SDK71_', in case targeting the pre-Windows 8.x SDKs. 2017-08-13 22:15:30 +00:00
Joe Mistachkin 89fcfadbbf Support cross-compiling Tcl for 'Win32 on ARM' using Visual Studio. 2017-08-13 22:05:25 +00:00
dgp 8ccd8d10ef Backport [array names -regexp] should support backrefs 2017-08-10 17:03:53 +00:00
dgp c2982f8f62 Silence compiler warning in --disable-threads build 2017-08-10 13:28:48 +00:00
dgp 545f5e64be merge mark 2017-08-09 16:29:45 +00:00
dgp 385b618c74 merge release 2017-08-09 16:28:33 +00:00
dgp 3a07a6d26f bump release date 2017-08-09 14:41:19 +00:00
andy df9ea61fbf Cherrypick [527d354828] 2017-08-08 16:45:47 +00:00
andy 5f7ca471e4 Merge core-8-6-branch 2017-08-08 16:42:24 +00:00
andy ac8ddf5d4a Cherrypick [527d354828] 2017-08-08 16:42:05 +00:00
dgp 6da97c627b merge 8.6 2017-08-03 14:40:48 +00:00
dgp 735ca3d3a8 Improved test http-4.16. 2017-08-03 14:39:59 +00:00
dkf 72396a1929 Fix weird hangs in macOS Sierra on some networks. Name resolution timeouts not what we want to test in the http package. 2017-08-02 23:38:20 +00:00
dgp 816674cdb7 update changes 2017-08-01 16:05:13 +00:00
dgp 6bcfd54d3a merge 8.6 2017-07-18 12:58:27 +00:00
jan.nijtmans b095f046e6 Fix [fb2208172c671f29d60e9ac928d9ded45d01d8b8|fb2208172c]: tclIndex varies across builds from auto_mkindex 2017-07-17 08:04:15 +00:00
jan.nijtmans cee94b0658 Fix [fb2208172c671f29d60e9ac928d9ded45d01d8b8|fb2208172c]: tclIndex varies across builds from auto_mkindex 2017-07-17 08:01:11 +00:00
jan.nijtmans f94f5914a8 merge core-8-6-branch 2017-07-14 14:48:17 +00:00
jan.nijtmans 440dbbf620 Fix [293344d4f3]: Regression in SQLite test-suite. Long-standing bug in implementation of TclUtfToUniChar() macro. 2017-07-13 15:06:07 +00:00
jan.nijtmans b1243f2603 Fix [293344d4f3]: Regression in SQLite test-suite. Long-standing bug in implementation of TclUtfToUniChar() macro. 2017-07-13 15:03:27 +00:00
dgp f553fe3b01 merge 8.6 2017-07-06 16:47:21 +00:00
dgp 578eeb06bc [adb198c256] Switch to an alternative fix for file join memleaks. 2017-07-06 16:34:56 +00:00
dgp 515f0f32c0 Pull out of the loop a block of code that can only run in first iteration. 2017-07-06 16:00:46 +00:00
dgp bcb9c34521 Alternative fix for memleaks in fs path join machinery. 2017-07-06 15:46:58 +00:00
jan.nijtmans ac0fdb5bf8 merge core-8-6-branch 2017-07-03 12:32:38 +00:00
sebres 2ee7180448 resolve 8.6-fork 2017-07-03 09:23:17 +00:00
sebres 5541cc57f7 tclPathObj: fixed TclJoinPath - usage of released object and object leakage.
closes [adb198c256df8c4192838cc3c1112fb2821314e9]
2017-07-03 09:19:41 +00:00
sebres 692ea37c40 tclPathObj: fixed TclJoinPath (backported from 8.6) - usage of released object and object leakage.
closes [adb198c256df8c4192838cc3c1112fb2821314e9]
2017-07-03 09:15:23 +00:00
jan.nijtmans d0996f3402 'inline static' -> 'static inline' and 'INLINE' -> 'inline', for consistancy. 2017-07-03 08:27:42 +00:00
dgp 39356c4079 merge 8.6 2017-06-29 11:19:39 +00:00
jan.nijtmans 89f6884455 Eliminate use of (expensive) Tcl_UtfToUpper() from "format": Just generate the expected uppercase characters right away from the start. No change in functionality, just code optimization. 2017-06-28 13:32:16 +00:00
dgp 5314bbe0ef update changes 2017-06-26 19:56:37 +00:00
dgp 5b2c81a0f3 merge 8.6 2017-06-26 19:51:48 +00:00
dgp f242dd36bd Bump to TclOO 1.1.0 2017-06-26 19:37:34 +00:00
dgp fb2aa596ab merge 8.6 2017-06-26 19:22:29 +00:00
dgp 5621809b18 [46f801ea5a] Make autoloader less fragile when it cannot manufacture a
known consistent stack trace. Value inconsistency over failure.
2017-06-26 19:18:42 +00:00
dgp 7a8a4b15c4 Try to make good stack trace. Fallback to making not-so-good stack trace.
Stop failing altogether. Test in test suite, not program fragility.
2017-06-26 19:17:12 +00:00
dgp f4615ea166 Test demonstrating autoloader fragility. 2017-06-26 17:30:15 +00:00
dkf 0fbade1cf8 Implement TIP #473: Allow a Defined Target Namespace in oo::copy 2017-06-22 22:02:14 +00:00
dkf dd54301fb6 Documentation correction; issue pointed out by DGP. 2017-06-22 22:00:39 +00:00
dkf 6352a07912 Rebase for final implementation work 2017-06-22 21:55:45 +00:00
jan.nijtmans 64c9b509b0 Upgrade all internal character tables to Unicode 10 2017-06-22 08:59:14 +00:00
jan.nijtmans d39c33303f Upgrade all internal character tables to Unicode 10 2017-06-22 08:58:14 +00:00
jan.nijtmans 45175dd264 Add test-cases, testing the legacy behavior of "format %#d" 2017-06-22 08:15:13 +00:00
dgp 9983a05a80 merge 8.6 2017-06-19 17:31:17 +00:00
dkf c488b70a47 Factor out chunk of non-obvious code in the guts of [oo::define] into one place. 2017-06-18 14:01:00 +00:00
dgp 952acc3754 Merge 8.6; update changes. 2017-06-16 20:17:33 +00:00
jan.nijtmans 94754be1d7 merge core-8-6-branch 2017-06-16 14:31:47 +00:00
jan.nijtmans 0f0ca3d932 Make panic in TclParseNumber() work when IEEE_FLOATING_POINT is not defined. 2017-06-15 09:13:51 +00:00
dkf 107760e1da [9c058c5803e30d02] Correction to cross linking in dict(n)'s SEE ALSO section. 2017-06-14 21:49:08 +00:00
jan.nijtmans 6168d91b0e merge core-8-6-branch 2017-06-13 12:18:16 +00:00
dkf bbcbd64e3b Make read and write operations on Tcl_Var handles available in tclInt API.
(This will be useful for tclquadcode, and it addresses a basic omission in Tcl's API that made working with Tcl_Vars rather more specialized than it was ever really intended to be. However, this also closes off the part of the API that was not reasonably usable by ordinary external code; LVT indices require too deep an entanglement into Tcl's implementation.)
2017-06-08 20:49:04 +00:00
jan.nijtmans 23ab25afdc Revert part of [95d096e0378b460c6c5168bb55bb2ca8b2fd799e|95d096e037]: Missed the fact that tolower() was optimized for the ASCII case as well, so this was a mistake! 2017-06-08 12:50:00 +00:00
jan.nijtmans 9ce3a23afe Fix [2738427]: Tcl_NumUtfChars(...) no overflow check. 2017-06-08 12:37:23 +00:00
jan.nijtmans c2e241f3cd Fix [2738427]: Tcl_NumUtfChars(...) no overflow check. 2017-06-08 12:34:08 +00:00
jan.nijtmans 9562ecd7fa tclUtil.c: Use TclUtfToUniChar() in stead of handling ASCII characters separately: This macro already does that.
Add new test-case for Tcl_NumUtfChars(), for a knownBug still to be fixed.
2017-06-08 11:48:13 +00:00
jan.nijtmans 16f3f234e8 Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3 2017-06-08 08:26:58 +00:00
jan.nijtmans 73a3dfdeea Tcl_GetWideIntFromObj() -> TclGetWideIntFromObj(), and minor other simplifications/optimizations. No functional change. 2017-06-07 15:18:38 +00:00
dkf 4cf238f3c3 Expose some of the core variable access APIs.
(Cherrypick from [b4dfc30083])
2017-06-06 17:51:12 +00:00
jan.nijtmans 0aa0da515c Add more test-cases for UTF-8 parser, including test-cases for TCL_UTF_MAX=4 or TCL_UTF_MAX=6 2017-06-06 14:33:16 +00:00
dgp f8bc248cc3 merge 8.6 2017-06-06 13:03:31 +00:00
jan.nijtmans fab7d970af Follow-up to [67aa9a2070]: Use uppercase consistantly, slight optimization in character tests, comment fixes. No change in functionality. 2017-06-06 09:23:23 +00:00
jan.nijtmans 617e92d7b4 [67aa9a2070] Tcl_UtfToUniChar returns single byte for invalid UTF-8 input as documented. 2017-06-06 09:02:28 +00:00
dgp f165025992 Merge 8.6; update changes. 2017-06-05 17:22:31 +00:00
dgp 3cdd3064b5 [67aa9a2070] Tcl_UtfToUniChar returns single byte for invalid UTF-8 input
as documented.
2017-06-05 16:56:08 +00:00
jan.nijtmans 708ca98ace merge core-8-6-branch 2017-06-02 11:10:28 +00:00
jan.nijtmans 901f58f13b Change refCount field in DictObj from int to size_t. Cherry-picked from "sebres-8-6-clock-speedup-cr1" branch. 2017-06-02 10:34:45 +00:00
jan.nijtmans c688e0737c Fix [67aa9a207037ae67f9014b544c3db34fa732f2dc|67aa9a2070]: Security: Invalid UTF-8 can inject unexpected characters 2017-06-02 08:17:26 +00:00
sebres 9220ca224b fixed [a3fb3356b76ec4a853d1b86aadc08675f8bef359]: segfault by sorting of the large lists (firstly mistakenly introduced in [af40c6fb6940bab7]), additionally simplify done-points in Tcl_LsortObjCmd. 2017-05-29 19:36:31 +00:00
jan.nijtmans e5726b4339 Tcl_UtfToUniChar() -> TclUtfToUniChar() in various places: No change in functionality, just faster if ASCII only strings are involved. 2017-05-29 13:10:30 +00:00
dgp 8a90be9a10 merge 8.6 2017-05-23 13:25:07 +00:00
jan.nijtmans c571887777 autoconf 2017-05-22 09:04:22 +00:00
jan.nijtmans f100bae746 If SHLIB_VERSION is specified as empty, don't let the SHLIB filename end with a dot (taken over from TEA)
Cherry-pick [http://core.tcl.tk/tclconfig/info/c8eddeddb9bbabc4|c8eddeddb9] from TEA: Added /usr/pkg/lib to the paths searched on the journey to find tclConfig.sh
2017-05-22 08:53:04 +00:00
jan.nijtmans 4db003c2bf Cherrypick Fix build on OpenBSD. [82701b94c4] missed a couple of bits.
Tcl/Tk's tcl.m4 isn't identical to TEA's tcl.m4 - be careful!
2017-05-21 17:42:16 +00:00
aspect 82ddcc716b fix build failure with TCL_MEM_DEBUG introduced by [8b717dc06a3e3d49] 2017-05-19 14:21:46 +00:00
dgp 2f9e40fef1 merge 8.6 2017-05-19 12:53:52 +00:00
jan.nijtmans 8b5d3394c2 Fix test-case numbering 2017-05-18 13:25:17 +00:00
dgp 246869993a autoconf-2.59 2017-05-18 12:09:00 +00:00
jan.nijtmans 8bdc794177 Cherry-pick [http://core.tcl.tk/tclconfig/info/18e79736d236d15d|All the world was a VAX] for OpenBSD. Also fix [http://core.tcl.tk/tk/tktview?name=84a27b1c67|84a27b1c67]: Tcl and Tk's tcl.m4 not synced?
(configure script not re-generated yet, I'm sure Don will do that in the rc branch)
2017-05-18 09:16:39 +00:00
dgp 0d218fca03 Merge 8.6; update changes. 2017-05-09 12:12:26 +00:00
jan.nijtmans f32ecd5894 Fix [6ca52aec14e0b33543d3cd9895f060b852ac4dbc|6ca52aec14]: HTTP package: Memory leak if client requests "Connection: close" but server responses with "Connection: keep-alive"
http: 2.8.10 -> 2.8.11
2017-05-09 11:30:09 +00:00
jan.nijtmans 46f75926ff Let local variables declared from within macro's always start with underscore, this fixes some gcc warnings with -Wshadow. 2017-05-09 09:28:06 +00:00
dgp f9d42ebf8c Merge 8.6; update changes. 2017-05-08 16:07:58 +00:00
dgp 69865e4f83 [6015221f59] Segfault after overflow of [binary] field specifier numeric count. 2017-05-05 19:10:52 +00:00
dgp 71a9a4406a [6015221f59] Segfault after overflow of [binary] field specifier numeric count. 2017-05-05 17:12:52 +00:00
dgp 0177abb172 merge 8.6 2017-05-04 20:40:15 +00:00
jan.nijtmans b96146d014 Use GetModuleHandle() in stead of LoadLibrary() for ntdll, which is already loaded by Cygwin. 2017-05-04 12:26:49 +00:00
jan.nijtmans 6f18f8d375 Cherry-pick/backport [65cc894ac5c24495|65cc894ac5]: fix off-by-one possible buffer overrun when looking for encodings; found by coverity
Use GetModuleHandle() in stead of LoadLibrary() for ntdll, which is already loaded by Cygwin.
2017-05-04 12:01:23 +00:00
jan.nijtmans fd7ea3420f Fix gcc warning: unused variable wakeEvent 2017-05-04 09:35:14 +00:00
jan.nijtmans 2c5a00c966 Use GetModuleHandle() in stead of LoadLibrary() when the handle is needed for an already loaded dll.
Fix filesystem-1.52 (only works correctly on UNIX)
2017-05-03 15:27:06 +00:00
jan.nijtmans 3d65f9905d Use GetModuleHandle() in stead of LoadLibrary() when the handle is needed for an already loaded dll.
Fix filesystem-1.52 (only works correctly on UNIX)
2017-05-03 15:05:41 +00:00
dgp 262df0197b [f9fe90d0fa] [file join] normalization. See filesystem-1.52* 2017-05-01 20:25:03 +00:00
dgp ed853e1ffb [f9fe90d0fa] [file join] normalization. See filesystem-1.52* 2017-05-01 20:23:28 +00:00
jan.nijtmans 5d0864fb41 Fix [8bd13f07bde6fb0631f27927e36461fdefe8ca95|8bd13f07bd]: Closing tcl pipes prevents windows threads from starting up. Patch by sebres (Dipl. Ing. Sergey G. Brester)
(also fix duplicate test-case number in link.test)
2017-05-01 08:20:54 +00:00
dgp 77822d9462 merge 8.6; update changes 2017-04-28 18:09:46 +00:00
dgp 237c46512c [f34cf83dd0] An optimization was being taken in a case where it produced the wrong result, failing to collapse multiple /// into /. Testing on Windows where path expectations may vary would be a good idea, but since this is just an optimization avoidance, I suspect we're ok. 2017-04-28 17:52:26 +00:00
dgp 64f999ee89 [f34cf83dd0] An optimization was being taken in a case where it produced
the wrong result, failing to collapse multiple /// into /.
Testing on Windows where path expectations may vary would be a good idea,
but since this is just an optimization avoidance, I suspect we're ok.
2017-04-28 17:49:43 +00:00
dgp ab5586a7a3 Test for [f34cf83dd0]. 2017-04-28 17:44:31 +00:00
dgp 79426acd55 Test for [f34cf83dd0]. 2017-04-28 17:43:49 +00:00
dgp 14f579844d merge mark 2017-04-28 14:25:02 +00:00
dgp dc9c72819c silence uninit variable warnings 2017-04-28 14:15:18 +00:00
jan.nijtmans 1200929a72 (cherry-pick): fix typo-bug (using wrong thread handle by set priority) 2017-04-28 13:41:13 +00:00
jan.nijtmans fecff1bcf0 (cherry-pick from "fix-1997007" branch): fix typo- resp. copy-paste-bug (using wrong threadInfo pointer in ConsoleOutputProc, should be writer, not reader) 2017-04-28 13:17:20 +00:00
jan.nijtmans 513d77788d (cherry-pick from "fix-1997007" branch): fix typo-bug (using wrong thread handle by set priority) 2017-04-28 13:13:10 +00:00
jan.nijtmans 2f5a766c71 merge core-8-6-branch 2017-04-28 08:00:51 +00:00
dgp 2bf6ae09b3 [04e26c02c0] Remove useless condition that raises warnings. 2017-04-27 17:19:31 +00:00
dgp 879750b278 [04e26c02c0] Remove useless condition that raises warnings. 2017-04-27 17:02:19 +00:00
dgp 78a7a5b561 merge 8.6 2017-04-27 12:06:47 +00:00
dkf 757450b24f [50750c735a] Fix broken test and stop reading uninit-but-allocated memory in zlib channel transform. 2017-04-27 10:43:32 +00:00
dkf 85dbf412fd [50750c735a] Fix for uninit memory handling issue in zlib transforms. 2017-04-25 19:32:46 +00:00
dkf 1f25f80d5b Deal with a couple of obscure causes of warnings on some versions of OSX. 2017-04-25 13:08:52 +00:00
dkf 99143db529 A better way of getting source file location information when disassembling. 2017-04-22 14:57:17 +00:00
dgp 7fde7fcf7b merge 8.6 2017-04-21 12:19:07 +00:00
jan.nijtmans 251dc3a322 Add flag TCL_CC_SEARCH_FLAGS to tclConfig.sh on Windows, just as it exists on unix, even though it should just be empty: TEA extensions might depend on it. 2017-04-20 14:07:30 +00:00
dgp cdccb19d1c merge 8.6 2017-04-19 15:22:22 +00:00
jan.nijtmans 6f7ac0e29c Fix [bc432269b74e9b246bf01f354714fed47cb227ed|bc432269]: http fails in a safe interpreter 2017-04-18 19:01:51 +00:00
dgp a3fdca376e merge 8.6 2017-04-17 12:10:42 +00:00
dgp 56739b8036 Repair revised tests that failed. 2017-04-17 11:59:35 +00:00
jan.nijtmans 490e5ace3a Don't use "0%o" format in test-cases, as it suggest's it's the normal way to format octal numbers: it isn't. Better use "%#o".
Add tests for "format" and "scan" corner-cases which weren't documented (except in TIP's) neither had tests before.
2017-04-14 09:05:01 +00:00
dgp d2595ccfea Bump TclOO 1.0.6; finish changes. 2017-04-13 16:39:15 +00:00
dgp 5b059dfd6b Bump msgcat and tcl tests and continue updates to changes. 2017-04-12 20:23:56 +00:00
dgp 1a3c0d9be9 merge 8.6 2017-04-12 19:19:05 +00:00
sebres ea1a2f3fbf [win] fixes "wrong" checking of the flag TCL_CLOSE_READ in close2proc (using mask) 2017-04-12 14:52:10 +00:00
dgp 244e69a10a Revert recent commit [80252e0aed]. TIP 237 is clear that %llu is invalid. 2017-04-12 13:14:38 +00:00
jan.nijtmans 9faad3da69 Another attempt to fix the two executable flags. 2017-04-12 12:11:12 +00:00
jan.nijtmans 47a749742a Fix executable flag for 2 files 2017-04-12 12:04:31 +00:00
sebres 9d252ff7d2 merge fix-42202ba1e5ff566e 2017-04-12 11:49:39 +00:00
jan.nijtmans 0cc7fd3498 Fix sporadically errors in zlib-8.x and socket tests, cherry-picked from "fix-1997007" branch. Credit to "sebres"! 2017-04-12 09:23:23 +00:00
dgp 1e22d92c69 More changes work 2017-04-11 19:11:27 +00:00
sebres 1638a98f0e fixes sporadically errors in several not event-driven test cases zlib-8.x (wrong non-blocking pipe usage, without fileevent resp. vwait) 2017-04-11 18:13:56 +00:00
sebres 85cc06f56c improves robustness of the socket tests against busy random ports (fixed sporadic errors "already in use") 2017-04-11 18:10:09 +00:00
sebres 76054b4646 code review, robustness increase, avoid infinite wait by exit, thread exit and by pipes of closed processes);
use pipe-helpers (TI-structure handling) for all pipe-workers (tclWinConsole, tclWinSerial);
2017-04-11 18:09:52 +00:00
sebres 9b95c00218 added wake-up event to prevent possible dead-locks by some waiting thread (e. g. for writable events) 2017-04-11 18:09:38 +00:00
sebres b8186ff707 prepared to use pipe-helpers (TI-structure handling) for all pipe-workers (tclWinConsole, tclWinSerial) 2017-04-11 18:09:06 +00:00
sebres f5538049ef code review and fix small memory leak using ckalloc, without finalization of tcl subsystem in the worker (if it owns TI structure and calls ckfree) 2017-04-11 18:08:43 +00:00
sebres 119d9ad3aa shared structures of pipe-workers rewritten using atomic state of the thread;
asynchronous start/stop of pipe-workers (if possible), try the soft way to end workers using cancelSynchronousIo before it would be terminated;
2017-04-11 18:08:12 +00:00
sebres 8b0910d31f fix typo- resp. copy-paste-bug (using wrong threadInfo pointer in ConsoleOutputProc, should be writer, not reader) 2017-04-11 18:07:30 +00:00
sebres ceb75ca9ff the same handling to initialize thread without suspend/resume helpers (otherwise may be dangerous by very huge resp. too busy system); 2017-04-05 19:52:23 +00:00
sebres 2ae10f0b33 fix typo-bug (using wrong thread handle by set priority) 2017-04-05 10:41:05 +00:00
sebres b9cc513f2f small review: rewritten using already available event handles, additionally prevents infinite waits (using timeout 5000ms); 2017-04-05 10:40:51 +00:00
sebres 14192d21dd Contributed by "stanko" as patch within 8bd13f07bde6fb0631f27927e36461fdefe8ca95
Resolves blocking of pipes-thread (reader/writer) under huge last:
  Terminating threads during their initialization resp. teardown phase may result LoaderLock in the ntdll.dll's (to remain locked indefinitely).
  This causes ntdll.dll's LdrpInitializeThread() to deadlock trying to acquire LoaderLock.
Possible fix for 9d75181ee70af318830e99ede6ebb5df72a9b079
2017-04-05 10:40:29 +00:00
jan.nijtmans ea8cb9b7bb Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu doesn't work. Also added new test-cases showing the expected behavior. 2017-04-05 08:41:48 +00:00
sebres 72ac20b7d7 bug fix for [42202ba1e5ff566e0f9abb9f890e460fbc6c1c5c]: segfault by coro inject
rewritten callback for ::tcl::unsupported::inject, without leave the interpreter in unusable state (inaccurate environment exchange by adding eval callback), test covered now.
2017-04-04 11:13:36 +00:00
sebres 7b4e946f74 Create new branch named "fix-42202ba1e5ff566e" 2017-04-04 09:38:50 +00:00
dgp f3a4ae987d merge 8.6 2017-04-03 16:53:26 +00:00
jan.nijtmans d10ba45b4b Code optimization/reduction: If TCL_WIDE_INT_IS_LONG is defined, the variable useWide is always 0, so related code can be eliminated without loss of functionality. 2017-04-03 11:53:34 +00:00
dgp 5e45fd7662 merge 8.6 2017-03-31 12:30:27 +00:00
dkf c552943f9e [900cb0284bc] Ensure that masking pseudo-methods used for export management are not introspectable directly. [cherrypick] 2017-03-29 19:16:32 +00:00
jan.nijtmans 24f5b98e8c In comments and documentation, distinguish between __int64 (a Microsoft 64-bit integer type) and int64_t (C99 equivalent) 2017-03-29 12:16:28 +00:00
jan.nijtmans 0d54bf3711 Improve comment on TCL_WIDE_INT_IS_LONG, making it less misleading.
In tclThreadTest.c, allow mainThreadId to be >32 bits.
2017-03-27 13:01:34 +00:00
jan.nijtmans 802974ec84 (cherry-pick from core-8-6-branch): Update TZ info to tzcode2017b. 2017-03-23 13:35:43 +00:00
José Ignacio Marín 4703c1399d Update TZ info to tzcode2017b. 2017-03-23 08:25:57 +00:00
dgp d7802b428a New(ish) test interp-14.11 was missing its -cleanup. 2017-03-22 19:45:41 +00:00
dgp 5894e1b085 New(ish) test interp-14.11 was missing its -cleanup. 2017-03-22 19:42:57 +00:00
dgp b8d35358ad merge 8.6 2017-03-17 12:51:53 +00:00
jan.nijtmans d287c6c8b0 redundant end-of-line spacing 2017-03-15 15:13:43 +00:00
Kevin B Kenny 43d597b30f Compile [clock clicks], [clock microseconds], [clock milliseconds] and [clock seconds]. 2017-03-15 02:39:04 +00:00
Kevin B Kenny 607667f89d Make 'clock' and 'encoding' into compilable ensembles that play with safe interps 2017-03-14 22:13:15 +00:00
Kevin B Kenny 6212b342f6 Make 'clock' and 'encoding' into compilable ensembles that play with safe interps 2017-03-14 22:06:43 +00:00
Kevin B Kenny 5ddb691286 Make 'clock' and 'encoding' into proper compilable ensembles 2017-03-14 21:09:27 +00:00
dgp daac4e5d34 Different solution to silencing the non-useful valgrind alerts. 2017-03-13 17:03:50 +00:00
dgp 57ceb807ca merge 8.6 2017-03-10 17:22:26 +00:00
José Ignacio Marín d4b614d655 Update TZ data with tzdata2017a from IANA 2017-03-10 16:59:02 +00:00
dgp 91d32c4556 Silence valgrind complaints from [representation]. 2017-03-10 16:41:32 +00:00
dgp e9e0f57d92 Dup test name 2017-03-10 15:28:46 +00:00
dgp f090fee89b Start RC branch for Tcl 8.6.7 2017-03-10 15:22:08 +00:00
sebres 2c343f8ac1 expand test constraints of the load-8.x test cases (wrap setup prerequirements as new constraint "teststaticpkg_8.x") 2017-03-07 18:19:55 +00:00
jan.nijtmans 07050778e3 Fix [e14d152114efee10394a7e0b4b1c0478efff52c5|e14d152114]: bundled zlib documentation is under a potentially non-free license 2017-03-07 11:05:26 +00:00
jan.nijtmans d183e03dc3 Remove "makefile.bc". Not updated for many-many years, most likely it doesn't work any more and it doesn't seem to care anyone. Let's see if someone complains ;-) 2017-03-07 09:36:34 +00:00
sebres 2a1688c8f5 chanio.test: [win] fix test case (setup set translation to "lf", because of default translation on windows "crlf") 2017-03-06 20:07:08 +00:00
sebres 6ba062e067 nre.test: add constraint for nre-0.1 (testnreunwind may be not available) 2017-03-06 20:05:13 +00:00
sebres 089381e2b1 zlib.test: fix sporadic errors:
- zlib-9.2 hangs because of too short update, if processed another event;
 - zlib-8.8 wrong non-blocking pipe usage - [string length $compressed] may return sporadically values smaller as expected (< 222)
2017-03-06 20:02:55 +00:00
dgp 94253c0df4 ParseTokens failed to fully respect its numBytes argument. 2017-02-27 14:52:13 +00:00
dgp 30c48b68df ParseTokens failed to fully respect its numBytes argument. 2017-02-27 14:51:15 +00:00
dkf 13ccdabc07 [25842c161f] Ensure that finalization of a zlib stream works. 2017-02-26 15:32:11 +00:00
dkf 203bbab7c9 Might as well number tests more conventionally. 2017-02-26 15:28:29 +00:00
dkf 93d3ea1393 Make tests produce more meaningful information when they fail. 2017-02-26 13:19:08 +00:00
aspect c8646e5c72 fix chan leak with http keepalive vs close (bug [6ca52aec14]) 2017-02-12 12:57:29 +00:00
aspect a638162ed4 better tests for finalization 2017-02-11 07:18:08 +00:00
aspect c77bd091df zlib stream finalize calls deflate with no input - this case (and this case
only) must be allowed.

Fixes 2nd issue in [25842c161f], introduced by [c1aff52ef3]
2017-02-11 05:06:43 +00:00
jan.nijtmans fca34fb8d0 Code cleanup (based on feedback from René Zaumseil): Only call GetInvalidIntFromObj() when Tcl_GetIntFromObj() fails. 2017-02-07 12:11:29 +00:00
bch d5c18c780a s/then/than/ in Eval.3 manpage 2017-02-06 21:54:30 +00:00
295 changed files with 11663 additions and 12867 deletions
+17
View File
@@ -0,0 +1,17 @@
compat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs
compat/zlib/contrib/vstudio/readme.txt
compat/zlib/contrib/vstudio/*/zlib.rc
compat/zlib/win32/*.txt
compat/zlib/win64/*.txt
libtommath/*.dsp
libtommath/*.sln
libtommath/*.vcproj
tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
win/makefile.vc
win/rules.vc
win/tcl.dsp
win/tcl.dsw
win/tcl.hpj.in
+3 -1
View File
@@ -3,11 +3,13 @@ compat/zlib/contrib/vstudio/readme.txt
compat/zlib/contrib/vstudio/*/zlib.rc
compat/zlib/win32/*.txt
compat/zlib/win64/*.txt
libtommath/*.dsp
libtommath/*.sln
libtommath/*.vcproj
tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
win/makefile.bc
win/makefile.vc
win/rules.vc
win/tcl.dsp
-1
View File
@@ -2,7 +2,6 @@ tools/tcl.hpj.in
tools/tcl.wse.in
win/buildall.vc.bat
win/coffbase.txt
win/makefile.bc
win/makefile.vc
win/rules.vc
win/tcl.dsp
+5 -3
View File
@@ -18,6 +18,7 @@
*/tclsh*
*/tcltest*
*/versions.vc
*/version.vc
html
libtommath/bn.ilg
libtommath/bn.ind
@@ -40,7 +41,8 @@ unix/dltest.marker
unix/tcl.pc
unix/tclIndex
unix/pkgs/*
win/Debug_VC*
win/Release_VC*
win/Debug*
win/Release*
win/pkgs/*
win/tcl.hpj
win/tcl.hpj
win/nmhlp-out.txt
+1 -1
View File
@@ -1,5 +1,5 @@
README: Tcl
This is the Tcl 8.6.6 source distribution.
This is the Tcl 8.6.7 source distribution.
http://sourceforge.net/projects/tcl/files/Tcl/
You can get any source release of Tcl from the URL above.
+100
View File
@@ -8698,3 +8698,103 @@ improvements to regexp engine from Postgres (lane,porter,fellows,seltenreich)
2016-07-20 tzdata updated to Olson's tzdata2016f (venkat)
--- Released 8.6.6, July 27, 2016 --- http://core.tcl.tk/tcl/ for details
2016-09-07 (bug)[c09edf] Bad caching with custom resolver (neumann,nijtmans)
2016-09-07 (bug)[4dbdd9] Memleak in test var-8.3 (mr_calvin,porter)
2016-10-03 (bug)[2bf561] Allow empty command as alias target (yorick,nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2016-10-04 (bug)[4d5ae7] Crash in async connects host no address (gahr,fellows)
2016-10-08 (bug)[838e99] treat application/xml as text (gahr,fellows)
=> http 2.8.10
2016-10-11 (bug)[3cc1d9] Thread finalization crash in zippy (neumann)
2016-10-12 (bug)[be003d] Fix [scan 0x1 %b], [scan 0x1 %o] (porter)
2016-10-14 (bug)[eb6b68] Fix stringComp-14.5 (porter)
2016-10-30 (bug)[b26e38] Fix zlib-7.8 (fellows)
2016-10-30 (bug)[1ae129] Fix memleak in [history] destruction (fellows)
2016-11-04 (feature) Provisional Tcl 9 support in msgcat and tcltest (nijtmans)
=> msgcat 1.6.1
=> tcltest 2.4.1
2016-11-04 (bug)[824752] Crash in Tcl_ListObjReplace() (gahr,porter)
2016-11-11 (bug)[79614f] invalidate VFS mounts on sytem encoding change (yorick)
2016-11-14 OSX: End panic() as legacy support macro; system conflicts (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2016-11-15 (bug) TclOO fix stops crash mixing Itcl and snit (fellows)
2016-11-17 (update) Reconcile libtommath updates; purge unused files (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2017-01-09 (bug)[b87ad7] Repair drifts in timer clock (sebres)
2017-01-17 (update) => zlib 1.2.11 (nijtmans)
2017-01-31 (bug)[39f630] Revise Tcl_LinkVar to tolerate some prefixes (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2017-02-01 (bug)[d0f7ba] Improper NAN optimization. expr-22.1[01] (aspect)
2017-02-26 (bug)[25842c] zlib stream finalization (aspect)
2017-03-07 (deprecate) Remove unmaintained makefile.bc file (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2017-03-14 (enhancement) [clock] and [encoding] are now ensembles (kenny)
2017-03-15 (enhancement) several [clock] subcommands bytecoded (kenny)
2017-03-23 tzdata updated to Olson's tzdata2017b (jima)
2017-03-29 (bug)[900cb0] Fix OO unexport introspection (napier)
2017-04-12 (bug)[42202b] Nesting imbalance in coro injection (nadkarni,sebres)
2017-04-18 (bug)[bc4322] http package support for safe interps (nash,nijtmans)
2017-04-28 (bug)[f34cf8] [file join a //b] => /b (neumann,porter)
2017-05-01 (bug)[8bd13f] Windows threads and pipes (sebres,nijtmans)
2017-05-01 (bug)[f9fe90] [file join //a b] EIAS violation (aspect,porter)
2017-05-04 (bug) Make test filesystem-1.52 pass on Windows (nijtmans)
2017-05-05 (bug)[601522] [binary] field spec overflow -> segfault (porter)
2017-05-08 (bug)[6ca52a] http memleak handling keep-alive (aspect,nijtmans)
=> http 2.8.11
2017-05-29 (bug)[a3fb33] crash in [lsort] on long lists (sebres)
2017-06-05 (bug)[67aa9a] Tcl_UtfToUniChar() revised handling invalid UTF-8 (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2017-06-08 (bug)[2738427] Tcl_NumUtfChars() corner case utf-4.9 (nijtmans)
2017-06-22 (update) Update Unicode data to 10.0 (nijtmans)
*** POTENTIAL INCOMPATIBILITY ***
2017-06-22 (TIP 473) Let [oo::copy] specify target namespace (fellows)
2017-06-26 (bug)[46f801] Repair autoloader fragility (porter)
2017-07-06 (bug)[adb198] Plug memleak in TclJoinPath (sebres,porter)
2017-07-17 (bug)[fb2208] Repeatable tclIndex generation (wiedemann,nijtmans)
--- Released 8.6.7, August 9, 2017 --- http://core.tcl.tk/tcl/ for details
2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann)
=> http 2.8.12
-209
View File
@@ -1,209 +0,0 @@
1. Compression algorithm (deflate)
The deflation algorithm used by gzip (also zip and zlib) is a variation of
LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
the input data. The second occurrence of a string is replaced by a
pointer to the previous string, in the form of a pair (distance,
length). Distances are limited to 32K bytes, and lengths are limited
to 258 bytes. When a string does not occur anywhere in the previous
32K bytes, it is emitted as a sequence of literal bytes. (In this
description, `string' must be taken as an arbitrary sequence of bytes,
and is not restricted to printable characters.)
Literals or match lengths are compressed with one Huffman tree, and
match distances are compressed with another tree. The trees are stored
in a compact form at the start of each block. The blocks can have any
size (except that the compressed data for one block must fit in
available memory). A block is terminated when deflate() determines that
it would be useful to start another block with fresh trees. (This is
somewhat similar to the behavior of LZW-based _compress_.)
Duplicated strings are found using a hash table. All input strings of
length 3 are inserted in the hash table. A hash index is computed for
the next 3 bytes. If the hash chain for this index is not empty, all
strings in the chain are compared with the current input string, and
the longest match is selected.
The hash chains are searched starting with the most recent strings, to
favor small distances and thus take advantage of the Huffman encoding.
The hash chains are singly linked. There are no deletions from the
hash chains, the algorithm simply discards matches that are too old.
To avoid a worst-case situation, very long hash chains are arbitrarily
truncated at a certain length, determined by a runtime option (level
parameter of deflateInit). So deflate() does not always find the longest
possible match but generally finds a match which is long enough.
deflate() also defers the selection of matches with a lazy evaluation
mechanism. After a match of length N has been found, deflate() searches for
a longer match at the next input byte. If a longer match is found, the
previous match is truncated to a length of one (thus producing a single
literal byte) and the process of lazy evaluation begins again. Otherwise,
the original match is kept, and the next match search is attempted only N
steps later.
The lazy match evaluation is also subject to a runtime parameter. If
the current match is long enough, deflate() reduces the search for a longer
match, thus speeding up the whole process. If compression ratio is more
important than speed, deflate() attempts a complete second search even if
the first match is already long enough.
The lazy match evaluation is not performed for the fastest compression
modes (level parameter 1 to 3). For these fast modes, new strings
are inserted in the hash table only when no match was found, or
when the match is not too long. This degrades the compression ratio
but saves time since there are both fewer insertions and fewer searches.
2. Decompression algorithm (inflate)
2.1 Introduction
The key question is how to represent a Huffman code (or any prefix code) so
that you can decode fast. The most important characteristic is that shorter
codes are much more common than longer codes, so pay attention to decoding the
short codes fast, and let the long codes take longer to decode.
inflate() sets up a first level table that covers some number of bits of
input less than the length of longest code. It gets that many bits from the
stream, and looks it up in the table. The table will tell if the next
code is that many bits or less and how many, and if it is, it will tell
the value, else it will point to the next level table for which inflate()
grabs more bits and tries to decode a longer code.
How many bits to make the first lookup is a tradeoff between the time it
takes to decode and the time it takes to build the table. If building the
table took no time (and if you had infinite memory), then there would only
be a first level table to cover all the way to the longest code. However,
building the table ends up taking a lot longer for more bits since short
codes are replicated many times in such a table. What inflate() does is
simply to make the number of bits in the first table a variable, and then
to set that variable for the maximum speed.
For inflate, which has 286 possible codes for the literal/length tree, the size
of the first table is nine bits. Also the distance trees have 30 possible
values, and the size of the first table is six bits. Note that for each of
those cases, the table ended up one bit longer than the ``average'' code
length, i.e. the code length of an approximately flat code which would be a
little more than eight bits for 286 symbols and a little less than five bits
for 30 symbols.
2.2 More details on the inflate table lookup
Ok, you want to know what this cleverly obfuscated inflate tree actually
looks like. You are correct that it's not a Huffman tree. It is simply a
lookup table for the first, let's say, nine bits of a Huffman symbol. The
symbol could be as short as one bit or as long as 15 bits. If a particular
symbol is shorter than nine bits, then that symbol's translation is duplicated
in all those entries that start with that symbol's bits. For example, if the
symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a
symbol is nine bits long, it appears in the table once.
If the symbol is longer than nine bits, then that entry in the table points
to another similar table for the remaining bits. Again, there are duplicated
entries as needed. The idea is that most of the time the symbol will be short
and there will only be one table look up. (That's whole idea behind data
compression in the first place.) For the less frequent long symbols, there
will be two lookups. If you had a compression method with really long
symbols, you could have as many levels of lookups as is efficient. For
inflate, two is enough.
So a table entry either points to another table (in which case nine bits in
the above example are gobbled), or it contains the translation for the symbol
and the number of bits to gobble. Then you start again with the next
ungobbled bit.
You may wonder: why not just have one lookup table for how ever many bits the
longest symbol is? The reason is that if you do that, you end up spending
more time filling in duplicate symbol entries than you do actually decoding.
At least for deflate's output that generates new trees every several 10's of
kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code
would take too long if you're only decoding several thousand symbols. At the
other extreme, you could make a new table for every bit in the code. In fact,
that's essentially a Huffman tree. But then you spend too much time
traversing the tree while decoding, even for short symbols.
So the number of bits for the first lookup table is a trade of the time to
fill out the table vs. the time spent looking at the second level and above of
the table.
Here is an example, scaled down:
The code being decoded, with 10 symbols, from 1 to 6 bits long:
A: 0
B: 10
C: 1100
D: 11010
E: 11011
F: 11100
G: 11101
H: 11110
I: 111110
J: 111111
Let's make the first table three bits long (eight entries):
000: A,1
001: A,1
010: A,1
011: A,1
100: B,2
101: B,2
110: -> table X (gobble 3 bits)
111: -> table Y (gobble 3 bits)
Each entry is what the bits decode as and how many bits that is, i.e. how
many bits to gobble. Or the entry points to another table, with the number of
bits to gobble implicit in the size of the table.
Table X is two bits long since the longest code starting with 110 is five bits
long:
00: C,1
01: C,1
10: D,2
11: E,2
Table Y is three bits long since the longest code starting with 111 is six
bits long:
000: F,2
001: F,2
010: G,2
011: G,2
100: H,2
101: H,2
110: I,3
111: J,3
So what we have here are three tables with a total of 20 entries that had to
be constructed. That's compared to 64 entries for a single table. Or
compared to 16 entries for a Huffman tree (six two entry tables and one four
entry table). Assuming that the code ideally represents the probability of
the symbols, it takes on the average 1.25 lookups per symbol. That's compared
to one lookup for the single table, or 1.66 lookups per symbol for the
Huffman tree.
There, I think that gives you a picture of what's going on. For inflate, the
meaning of a particular symbol is often more than just a letter. It can be a
byte (a "literal"), or it can be either a length or a distance which
indicates a base value and a number of bits to fetch after the code that is
added to the base value. Or it might be the special end-of-block code. The
data structures created in inftrees.c try to encode all that information
compactly in the tables.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
References:
[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
pp. 337-343.
``DEFLATE Compressed Data Format Specification'' available in
http://tools.ietf.org/html/rfc1951
-619
View File
@@ -1,619 +0,0 @@
Network Working Group P. Deutsch
Request for Comments: 1950 Aladdin Enterprises
Category: Informational J-L. Gailly
Info-ZIP
May 1996
ZLIB Compressed Data Format Specification version 3.3
Status of This Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
IESG Note:
The IESG takes no position on the validity of any Intellectual
Property Rights statements contained in this document.
Notices
Copyright (c) 1996 L. Peter Deutsch and Jean-Loup Gailly
Permission is granted to copy and distribute this document for any
purpose and without charge, including translations into other
languages and incorporation into compilations, provided that the
copyright notice and this notice are preserved, and that any
substantive changes or deletions from the original are clearly
marked.
A pointer to the latest version of this and related documentation in
HTML format can be found at the URL
<ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
Abstract
This specification defines a lossless compressed data format. The
data can be produced or consumed, even for an arbitrarily long
sequentially presented input data stream, using only an a priori
bounded amount of intermediate storage. The format presently uses
the DEFLATE compression method but can be easily extended to use
other compression methods. It can be implemented readily in a manner
not covered by patents. This specification also defines the ADLER-32
checksum (an extension and improvement of the Fletcher checksum),
used for detection of data corruption, and provides an algorithm for
computing it.
Deutsch & Gailly Informational [Page 1]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
Table of Contents
1. Introduction ................................................... 2
1.1. Purpose ................................................... 2
1.2. Intended audience ......................................... 3
1.3. Scope ..................................................... 3
1.4. Compliance ................................................ 3
1.5. Definitions of terms and conventions used ................ 3
1.6. Changes from previous versions ............................ 3
2. Detailed specification ......................................... 3
2.1. Overall conventions ....................................... 3
2.2. Data format ............................................... 4
2.3. Compliance ................................................ 7
3. References ..................................................... 7
4. Source code .................................................... 8
5. Security Considerations ........................................ 8
6. Acknowledgements ............................................... 8
7. Authors' Addresses ............................................. 8
8. Appendix: Rationale ............................................ 9
9. Appendix: Sample code ..........................................10
1. Introduction
1.1. Purpose
The purpose of this specification is to define a lossless
compressed data format that:
* Is independent of CPU type, operating system, file system,
and character set, and hence can be used for interchange;
* Can be produced or consumed, even for an arbitrarily long
sequentially presented input data stream, using only an a
priori bounded amount of intermediate storage, and hence can
be used in data communications or similar structures such as
Unix filters;
* Can use a number of different compression methods;
* Can be implemented readily in a manner not covered by
patents, and hence can be practiced freely.
The data format defined by this specification does not attempt to
allow random access to compressed data.
Deutsch & Gailly Informational [Page 2]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
1.2. Intended audience
This specification is intended for use by implementors of software
to compress data into zlib format and/or decompress data from zlib
format.
The text of the specification assumes a basic background in
programming at the level of bits and other primitive data
representations.
1.3. Scope
The specification specifies a compressed data format that can be
used for in-memory compression of a sequence of arbitrary bytes.
1.4. Compliance
Unless otherwise indicated below, a compliant decompressor must be
able to accept and decompress any data set that conforms to all
the specifications presented here; a compliant compressor must
produce data sets that conform to all the specifications presented
here.
1.5. Definitions of terms and conventions used
byte: 8 bits stored or transmitted as a unit (same as an octet).
(For this specification, a byte is exactly 8 bits, even on
machines which store a character on a number of bits different
from 8.) See below, for the numbering of bits within a byte.
1.6. Changes from previous versions
Version 3.1 was the first public release of this specification.
In version 3.2, some terminology was changed and the Adler-32
sample code was rewritten for clarity. In version 3.3, the
support for a preset dictionary was introduced, and the
specification was converted to RFC style.
2. Detailed specification
2.1. Overall conventions
In the diagrams below, a box like this:
+---+
| | <-- the vertical bars might be missing
+---+
Deutsch & Gailly Informational [Page 3]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
represents one byte; a box like this:
+==============+
| |
+==============+
represents a variable number of bytes.
Bytes stored within a computer do not have a "bit order", since
they are always treated as a unit. However, a byte considered as
an integer between 0 and 255 does have a most- and least-
significant bit, and since we write numbers with the most-
significant digit on the left, we also write bytes with the most-
significant bit on the left. In the diagrams below, we number the
bits of a byte so that bit 0 is the least-significant bit, i.e.,
the bits are numbered:
+--------+
|76543210|
+--------+
Within a computer, a number may occupy multiple bytes. All
multi-byte numbers in the format described here are stored with
the MOST-significant byte first (at the lower memory address).
For example, the decimal number 520 is stored as:
0 1
+--------+--------+
|00000010|00001000|
+--------+--------+
^ ^
| |
| + less significant byte = 8
+ more significant byte = 2 x 256
2.2. Data format
A zlib stream has the following structure:
0 1
+---+---+
|CMF|FLG| (more-->)
+---+---+
Deutsch & Gailly Informational [Page 4]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
(if FLG.FDICT set)
0 1 2 3
+---+---+---+---+
| DICTID | (more-->)
+---+---+---+---+
+=====================+---+---+---+---+
|...compressed data...| ADLER32 |
+=====================+---+---+---+---+
Any data which may appear after ADLER32 are not part of the zlib
stream.
CMF (Compression Method and flags)
This byte is divided into a 4-bit compression method and a 4-
bit information field depending on the compression method.
bits 0 to 3 CM Compression method
bits 4 to 7 CINFO Compression info
CM (Compression method)
This identifies the compression method used in the file. CM = 8
denotes the "deflate" compression method with a window size up
to 32K. This is the method used by gzip and PNG (see
references [1] and [2] in Chapter 3, below, for the reference
documents). CM = 15 is reserved. It might be used in a future
version of this specification to indicate the presence of an
extra field before the compressed data.
CINFO (Compression info)
For CM = 8, CINFO is the base-2 logarithm of the LZ77 window
size, minus eight (CINFO=7 indicates a 32K window size). Values
of CINFO above 7 are not allowed in this version of the
specification. CINFO is not defined in this specification for
CM not equal to 8.
FLG (FLaGs)
This flag byte is divided as follows:
bits 0 to 4 FCHECK (check bits for CMF and FLG)
bit 5 FDICT (preset dictionary)
bits 6 to 7 FLEVEL (compression level)
The FCHECK value must be such that CMF and FLG, when viewed as
a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG),
is a multiple of 31.
Deutsch & Gailly Informational [Page 5]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
FDICT (Preset dictionary)
If FDICT is set, a DICT dictionary identifier is present
immediately after the FLG byte. The dictionary is a sequence of
bytes which are initially fed to the compressor without
producing any compressed output. DICT is the Adler-32 checksum
of this sequence of bytes (see the definition of ADLER32
below). The decompressor can use this identifier to determine
which dictionary has been used by the compressor.
FLEVEL (Compression level)
These flags are available for use by specific compression
methods. The "deflate" method (CM = 8) sets these flags as
follows:
0 - compressor used fastest algorithm
1 - compressor used fast algorithm
2 - compressor used default algorithm
3 - compressor used maximum compression, slowest algorithm
The information in FLEVEL is not needed for decompression; it
is there to indicate if recompression might be worthwhile.
compressed data
For compression method 8, the compressed data is stored in the
deflate compressed data format as described in the document
"DEFLATE Compressed Data Format Specification" by L. Peter
Deutsch. (See reference [3] in Chapter 3, below)
Other compressed data formats are not specified in this version
of the zlib specification.
ADLER32 (Adler-32 checksum)
This contains a checksum value of the uncompressed data
(excluding any dictionary data) computed according to Adler-32
algorithm. This algorithm is a 32-bit extension and improvement
of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
standard. See references [4] and [5] in Chapter 3, below)
Adler-32 is composed of two sums accumulated per byte: s1 is
the sum of all bytes, s2 is the sum of all s1 values. Both sums
are done modulo 65521. s1 is initialized to 1, s2 to zero. The
Adler-32 checksum is stored as s2*65536 + s1 in most-
significant-byte first (network) order.
Deutsch & Gailly Informational [Page 6]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
2.3. Compliance
A compliant compressor must produce streams with correct CMF, FLG
and ADLER32, but need not support preset dictionaries. When the
zlib data format is used as part of another standard data format,
the compressor may use only preset dictionaries that are specified
by this other data format. If this other format does not use the
preset dictionary feature, the compressor must not set the FDICT
flag.
A compliant decompressor must check CMF, FLG, and ADLER32, and
provide an error indication if any of these have incorrect values.
A compliant decompressor must give an error indication if CM is
not one of the values defined in this specification (only the
value 8 is permitted in this version), since another value could
indicate the presence of new features that would cause subsequent
data to be interpreted incorrectly. A compliant decompressor must
give an error indication if FDICT is set and DICTID is not the
identifier of a known preset dictionary. A decompressor may
ignore FLEVEL and still be compliant. When the zlib data format
is being used as a part of another standard format, a compliant
decompressor must support all the preset dictionaries specified by
the other format. When the other format does not use the preset
dictionary feature, a compliant decompressor must reject any
stream in which the FDICT flag is set.
3. References
[1] Deutsch, L.P.,"GZIP Compressed Data Format Specification",
available in ftp://ftp.uu.net/pub/archiving/zip/doc/
[2] Thomas Boutell, "PNG (Portable Network Graphics) specification",
available in ftp://ftp.uu.net/graphics/png/documents/
[3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
available in ftp://ftp.uu.net/pub/archiving/zip/doc/
[4] Fletcher, J. G., "An Arithmetic Checksum for Serial
Transmissions," IEEE Transactions on Communications, Vol. COM-30,
No. 1, January 1982, pp. 247-252.
[5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms,"
November, 1993, pp. 144, 145. (Available from
gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073.
Deutsch & Gailly Informational [Page 7]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
4. Source code
Source code for a C language implementation of a "zlib" compliant
library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/.
5. Security Considerations
A decoder that fails to check the ADLER32 checksum value may be
subject to undetected data corruption.
6. Acknowledgements
Trademarks cited in this document are the property of their
respective owners.
Jean-Loup Gailly and Mark Adler designed the zlib format and wrote
the related software described in this specification. Glenn
Randers-Pehrson converted this document to RFC and HTML format.
7. Authors' Addresses
L. Peter Deutsch
Aladdin Enterprises
203 Santa Margarita Ave.
Menlo Park, CA 94025
Phone: (415) 322-0103 (AM only)
FAX: (415) 322-1734
EMail: <ghost@aladdin.com>
Jean-Loup Gailly
EMail: <gzip@prep.ai.mit.edu>
Questions about the technical content of this specification can be
sent by email to
Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
Mark Adler <madler@alumni.caltech.edu>
Editorial comments on this specification can be sent by email to
L. Peter Deutsch <ghost@aladdin.com> and
Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
Deutsch & Gailly Informational [Page 8]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
8. Appendix: Rationale
8.1. Preset dictionaries
A preset dictionary is specially useful to compress short input
sequences. The compressor can take advantage of the dictionary
context to encode the input in a more compact manner. The
decompressor can be initialized with the appropriate context by
virtually decompressing a compressed version of the dictionary
without producing any output. However for certain compression
algorithms such as the deflate algorithm this operation can be
achieved without actually performing any decompression.
The compressor and the decompressor must use exactly the same
dictionary. The dictionary may be fixed or may be chosen among a
certain number of predefined dictionaries, according to the kind
of input data. The decompressor can determine which dictionary has
been chosen by the compressor by checking the dictionary
identifier. This document does not specify the contents of
predefined dictionaries, since the optimal dictionaries are
application specific. Standard data formats using this feature of
the zlib specification must precisely define the allowed
dictionaries.
8.2. The Adler-32 algorithm
The Adler-32 algorithm is much faster than the CRC32 algorithm yet
still provides an extremely low probability of undetected errors.
The modulo on unsigned long accumulators can be delayed for 5552
bytes, so the modulo operation time is negligible. If the bytes
are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
and order sensitive, unlike the first sum, which is just a
checksum. That 65521 is prime is important to avoid a possible
large class of two-byte errors that leave the check unchanged.
(The Fletcher checksum uses 255, which is not prime and which also
makes the Fletcher check insensitive to single byte changes 0 <->
255.)
The sum s1 is initialized to 1 instead of zero to make the length
of the sequence part of s2, so that the length does not have to be
checked separately. (Any sequence of zeroes has a Fletcher
checksum of zero.)
Deutsch & Gailly Informational [Page 9]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
9. Appendix: Sample code
The following C code computes the Adler-32 checksum of a data buffer.
It is written for clarity, not for speed. The sample code is in the
ANSI C programming language. Non C users may find it easier to read
with these hints:
& Bitwise AND operator.
>> Bitwise right shift operator. When applied to an
unsigned quantity, as here, right shift inserts zero bit(s)
at the left.
<< Bitwise left shift operator. Left shift inserts zero
bit(s) at the right.
++ "n++" increments the variable n.
% modulo operator: a % b is the remainder of a divided by b.
#define BASE 65521 /* largest prime smaller than 65536 */
/*
Update a running Adler-32 checksum with the bytes buf[0..len-1]
and return the updated checksum. The Adler-32 checksum should be
initialized to 1.
Usage example:
unsigned long adler = 1L;
while (read_buffer(buffer, length) != EOF) {
adler = update_adler32(adler, buffer, length);
}
if (adler != original_adler) error();
*/
unsigned long update_adler32(unsigned long adler,
unsigned char *buf, int len)
{
unsigned long s1 = adler & 0xffff;
unsigned long s2 = (adler >> 16) & 0xffff;
int n;
for (n = 0; n < len; n++) {
s1 = (s1 + buf[n]) % BASE;
s2 = (s2 + s1) % BASE;
}
return (s2 << 16) + s1;
}
/* Return the adler32 of the bytes buf[0..len-1] */
Deutsch & Gailly Informational [Page 10]
RFC 1950 ZLIB Compressed Data Format Specification May 1996
unsigned long adler32(unsigned char *buf, int len)
{
return update_adler32(1L, buf, len);
}
Deutsch & Gailly Informational [Page 11]
-955
View File
@@ -1,955 +0,0 @@
Network Working Group P. Deutsch
Request for Comments: 1951 Aladdin Enterprises
Category: Informational May 1996
DEFLATE Compressed Data Format Specification version 1.3
Status of This Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
IESG Note:
The IESG takes no position on the validity of any Intellectual
Property Rights statements contained in this document.
Notices
Copyright (c) 1996 L. Peter Deutsch
Permission is granted to copy and distribute this document for any
purpose and without charge, including translations into other
languages and incorporation into compilations, provided that the
copyright notice and this notice are preserved, and that any
substantive changes or deletions from the original are clearly
marked.
A pointer to the latest version of this and related documentation in
HTML format can be found at the URL
<ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
Abstract
This specification defines a lossless compressed data format that
compresses data using a combination of the LZ77 algorithm and Huffman
coding, with efficiency comparable to the best currently available
general-purpose compression methods. The data can be produced or
consumed, even for an arbitrarily long sequentially presented input
data stream, using only an a priori bounded amount of intermediate
storage. The format can be implemented readily in a manner not
covered by patents.
Deutsch Informational [Page 1]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
Table of Contents
1. Introduction ................................................... 2
1.1. Purpose ................................................... 2
1.2. Intended audience ......................................... 3
1.3. Scope ..................................................... 3
1.4. Compliance ................................................ 3
1.5. Definitions of terms and conventions used ................ 3
1.6. Changes from previous versions ............................ 4
2. Compressed representation overview ............................. 4
3. Detailed specification ......................................... 5
3.1. Overall conventions ....................................... 5
3.1.1. Packing into bytes .................................. 5
3.2. Compressed block format ................................... 6
3.2.1. Synopsis of prefix and Huffman coding ............... 6
3.2.2. Use of Huffman coding in the "deflate" format ....... 7
3.2.3. Details of block format ............................. 9
3.2.4. Non-compressed blocks (BTYPE=00) ................... 11
3.2.5. Compressed blocks (length and distance codes) ...... 11
3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12
3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13
3.3. Compliance ............................................... 14
4. Compression algorithm details ................................. 14
5. References .................................................... 16
6. Security Considerations ....................................... 16
7. Source code ................................................... 16
8. Acknowledgements .............................................. 16
9. Author's Address .............................................. 17
1. Introduction
1.1. Purpose
The purpose of this specification is to define a lossless
compressed data format that:
* Is independent of CPU type, operating system, file system,
and character set, and hence can be used for interchange;
* Can be produced or consumed, even for an arbitrarily long
sequentially presented input data stream, using only an a
priori bounded amount of intermediate storage, and hence
can be used in data communications or similar structures
such as Unix filters;
* Compresses data with efficiency comparable to the best
currently available general-purpose compression methods,
and in particular considerably better than the "compress"
program;
* Can be implemented readily in a manner not covered by
patents, and hence can be practiced freely;
Deutsch Informational [Page 2]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
* Is compatible with the file format produced by the current
widely used gzip utility, in that conforming decompressors
will be able to read data produced by the existing gzip
compressor.
The data format defined by this specification does not attempt to:
* Allow random access to compressed data;
* Compress specialized data (e.g., raster graphics) as well
as the best currently available specialized algorithms.
A simple counting argument shows that no lossless compression
algorithm can compress every possible input data set. For the
format defined here, the worst case expansion is 5 bytes per 32K-
byte block, i.e., a size increase of 0.015% for large data sets.
English text usually compresses by a factor of 2.5 to 3;
executable files usually compress somewhat less; graphical data
such as raster images may compress much more.
1.2. Intended audience
This specification is intended for use by implementors of software
to compress data into "deflate" format and/or decompress data from
"deflate" format.
The text of the specification assumes a basic background in
programming at the level of bits and other primitive data
representations. Familiarity with the technique of Huffman coding
is helpful but not required.
1.3. Scope
The specification specifies a method for representing a sequence
of bytes as a (usually shorter) sequence of bits, and a method for
packing the latter bit sequence into bytes.
1.4. Compliance
Unless otherwise indicated below, a compliant decompressor must be
able to accept and decompress any data set that conforms to all
the specifications presented here; a compliant compressor must
produce data sets that conform to all the specifications presented
here.
1.5. Definitions of terms and conventions used
Byte: 8 bits stored or transmitted as a unit (same as an octet).
For this specification, a byte is exactly 8 bits, even on machines
Deutsch Informational [Page 3]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
which store a character on a number of bits different from eight.
See below, for the numbering of bits within a byte.
String: a sequence of arbitrary bytes.
1.6. Changes from previous versions
There have been no technical changes to the deflate format since
version 1.1 of this specification. In version 1.2, some
terminology was changed. Version 1.3 is a conversion of the
specification to RFC style.
2. Compressed representation overview
A compressed data set consists of a series of blocks, corresponding
to successive blocks of input data. The block sizes are arbitrary,
except that non-compressible blocks are limited to 65,535 bytes.
Each block is compressed using a combination of the LZ77 algorithm
and Huffman coding. The Huffman trees for each block are independent
of those for previous or subsequent blocks; the LZ77 algorithm may
use a reference to a duplicated string occurring in a previous block,
up to 32K input bytes before.
Each block consists of two parts: a pair of Huffman code trees that
describe the representation of the compressed data part, and a
compressed data part. (The Huffman trees themselves are compressed
using Huffman encoding.) The compressed data consists of a series of
elements of two types: literal bytes (of strings that have not been
detected as duplicated within the previous 32K input bytes), and
pointers to duplicated strings, where a pointer is represented as a
pair <length, backward distance>. The representation used in the
"deflate" format limits distances to 32K bytes and lengths to 258
bytes, but does not limit the size of a block, except for
uncompressible blocks, which are limited as noted above.
Each type of value (literals, distances, and lengths) in the
compressed data is represented using a Huffman code, using one code
tree for literals and lengths and a separate code tree for distances.
The code trees for each block appear in a compact form just before
the compressed data for that block.
Deutsch Informational [Page 4]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
3. Detailed specification
3.1. Overall conventions In the diagrams below, a box like this:
+---+
| | <-- the vertical bars might be missing
+---+
represents one byte; a box like this:
+==============+
| |
+==============+
represents a variable number of bytes.
Bytes stored within a computer do not have a "bit order", since
they are always treated as a unit. However, a byte considered as
an integer between 0 and 255 does have a most- and least-
significant bit, and since we write numbers with the most-
significant digit on the left, we also write bytes with the most-
significant bit on the left. In the diagrams below, we number the
bits of a byte so that bit 0 is the least-significant bit, i.e.,
the bits are numbered:
+--------+
|76543210|
+--------+
Within a computer, a number may occupy multiple bytes. All
multi-byte numbers in the format described here are stored with
the least-significant byte first (at the lower memory address).
For example, the decimal number 520 is stored as:
0 1
+--------+--------+
|00001000|00000010|
+--------+--------+
^ ^
| |
| + more significant byte = 2 x 256
+ less significant byte = 8
3.1.1. Packing into bytes
This document does not address the issue of the order in which
bits of a byte are transmitted on a bit-sequential medium,
since the final data format described here is byte- rather than
Deutsch Informational [Page 5]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
bit-oriented. However, we describe the compressed block format
in below, as a sequence of data elements of various bit
lengths, not a sequence of bytes. We must therefore specify
how to pack these data elements into bytes to form the final
compressed byte sequence:
* Data elements are packed into bytes in order of
increasing bit number within the byte, i.e., starting
with the least-significant bit of the byte.
* Data elements other than Huffman codes are packed
starting with the least-significant bit of the data
element.
* Huffman codes are packed starting with the most-
significant bit of the code.
In other words, if one were to print out the compressed data as
a sequence of bytes, starting with the first byte at the
*right* margin and proceeding to the *left*, with the most-
significant bit of each byte on the left as usual, one would be
able to parse the result from right to left, with fixed-width
elements in the correct MSB-to-LSB order and Huffman codes in
bit-reversed order (i.e., with the first bit of the code in the
relative LSB position).
3.2. Compressed block format
3.2.1. Synopsis of prefix and Huffman coding
Prefix coding represents symbols from an a priori known
alphabet by bit sequences (codes), one code for each symbol, in
a manner such that different symbols may be represented by bit
sequences of different lengths, but a parser can always parse
an encoded string unambiguously symbol-by-symbol.
We define a prefix code in terms of a binary tree in which the
two edges descending from each non-leaf node are labeled 0 and
1 and in which the leaf nodes correspond one-for-one with (are
labeled with) the symbols of the alphabet; then the code for a
symbol is the sequence of 0's and 1's on the edges leading from
the root to the leaf labeled with that symbol. For example:
Deutsch Informational [Page 6]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
/\ Symbol Code
0 1 ------ ----
/ \ A 00
/\ B B 1
0 1 C 011
/ \ D 010
A /\
0 1
/ \
D C
A parser can decode the next symbol from an encoded input
stream by walking down the tree from the root, at each step
choosing the edge corresponding to the next input bit.
Given an alphabet with known symbol frequencies, the Huffman
algorithm allows the construction of an optimal prefix code
(one which represents strings with those symbol frequencies
using the fewest bits of any possible prefix codes for that
alphabet). Such a code is called a Huffman code. (See
reference [1] in Chapter 5, references for additional
information on Huffman codes.)
Note that in the "deflate" format, the Huffman codes for the
various alphabets must not exceed certain maximum code lengths.
This constraint complicates the algorithm for computing code
lengths from symbol frequencies. Again, see Chapter 5,
references for details.
3.2.2. Use of Huffman coding in the "deflate" format
The Huffman codes used for each alphabet in the "deflate"
format have two additional rules:
* All codes of a given bit length have lexicographically
consecutive values, in the same order as the symbols
they represent;
* Shorter codes lexicographically precede longer codes.
Deutsch Informational [Page 7]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
We could recode the example above to follow this rule as
follows, assuming that the order of the alphabet is ABCD:
Symbol Code
------ ----
A 10
B 0
C 110
D 111
I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are
lexicographically consecutive.
Given this rule, we can define the Huffman code for an alphabet
just by giving the bit lengths of the codes for each symbol of
the alphabet in order; this is sufficient to determine the
actual codes. In our example, the code is completely defined
by the sequence of bit lengths (2, 1, 3, 3). The following
algorithm generates the codes as integers, intended to be read
from most- to least-significant bit. The code lengths are
initially in tree[I].Len; the codes are produced in
tree[I].Code.
1) Count the number of codes for each code length. Let
bl_count[N] be the number of codes of length N, N >= 1.
2) Find the numerical value of the smallest code for each
code length:
code = 0;
bl_count[0] = 0;
for (bits = 1; bits <= MAX_BITS; bits++) {
code = (code + bl_count[bits-1]) << 1;
next_code[bits] = code;
}
3) Assign numerical values to all codes, using consecutive
values for all codes of the same length with the base
values determined at step 2. Codes that are never used
(which have a bit length of zero) must not be assigned a
value.
for (n = 0; n <= max_code; n++) {
len = tree[n].Len;
if (len != 0) {
tree[n].Code = next_code[len];
next_code[len]++;
}
Deutsch Informational [Page 8]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
}
Example:
Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3,
3, 2, 4, 4). After step 1, we have:
N bl_count[N]
- -----------
2 1
3 5
4 2
Step 2 computes the following next_code values:
N next_code[N]
- ------------
1 0
2 0
3 2
4 14
Step 3 produces the following code values:
Symbol Length Code
------ ------ ----
A 3 010
B 3 011
C 3 100
D 3 101
E 3 110
F 2 00
G 4 1110
H 4 1111
3.2.3. Details of block format
Each block of compressed data begins with 3 header bits
containing the following data:
first bit BFINAL
next 2 bits BTYPE
Note that the header bits do not necessarily begin on a byte
boundary, since a block does not necessarily occupy an integral
number of bytes.
Deutsch Informational [Page 9]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
BFINAL is set if and only if this is the last block of the data
set.
BTYPE specifies how the data are compressed, as follows:
00 - no compression
01 - compressed with fixed Huffman codes
10 - compressed with dynamic Huffman codes
11 - reserved (error)
The only difference between the two compressed cases is how the
Huffman codes for the literal/length and distance alphabets are
defined.
In all cases, the decoding algorithm for the actual data is as
follows:
do
read block header from input stream.
if stored with no compression
skip any remaining bits in current partially
processed byte
read LEN and NLEN (see next section)
copy LEN bytes of data to output
otherwise
if compressed with dynamic Huffman codes
read representation of code trees (see
subsection below)
loop (until end of block code recognized)
decode literal/length value from input stream
if value < 256
copy value (literal byte) to output stream
otherwise
if value = end of block (256)
break from loop
otherwise (value = 257..285)
decode distance from input stream
move backwards distance bytes in the output
stream, and copy length bytes from this
position to the output stream.
end loop
while not last block
Note that a duplicated string reference may refer to a string
in a previous block; i.e., the backward distance may cross one
or more block boundaries. However a distance cannot refer past
the beginning of the output stream. (An application using a
Deutsch Informational [Page 10]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
preset dictionary might discard part of the output stream; a
distance can refer to that part of the output stream anyway)
Note also that the referenced string may overlap the current
position; for example, if the last 2 bytes decoded have values
X and Y, a string reference with <length = 5, distance = 2>
adds X,Y,X,Y,X to the output stream.
We now specify each compression method in turn.
3.2.4. Non-compressed blocks (BTYPE=00)
Any bits of input up to the next byte boundary are ignored.
The rest of the block consists of the following information:
0 1 2 3 4...
+---+---+---+---+================================+
| LEN | NLEN |... LEN bytes of literal data...|
+---+---+---+---+================================+
LEN is the number of data bytes in the block. NLEN is the
one's complement of LEN.
3.2.5. Compressed blocks (length and distance codes)
As noted above, encoded data blocks in the "deflate" format
consist of sequences of symbols drawn from three conceptually
distinct alphabets: either literal bytes, from the alphabet of
byte values (0..255), or <length, backward distance> pairs,
where the length is drawn from (3..258) and the distance is
drawn from (1..32,768). In fact, the literal and length
alphabets are merged into a single alphabet (0..285), where
values 0..255 represent literal bytes, the value 256 indicates
end-of-block, and values 257..285 represent length codes
(possibly in conjunction with extra bits following the symbol
code) as follows:
Deutsch Informational [Page 11]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
Extra Extra Extra
Code Bits Length(s) Code Bits Lengths Code Bits Length(s)
---- ---- ------ ---- ---- ------- ---- ---- -------
257 0 3 267 1 15,16 277 4 67-82
258 0 4 268 1 17,18 278 4 83-98
259 0 5 269 2 19-22 279 4 99-114
260 0 6 270 2 23-26 280 4 115-130
261 0 7 271 2 27-30 281 5 131-162
262 0 8 272 2 31-34 282 5 163-194
263 0 9 273 3 35-42 283 5 195-226
264 0 10 274 3 43-50 284 5 227-257
265 1 11,12 275 3 51-58 285 0 258
266 1 13,14 276 3 59-66
The extra bits should be interpreted as a machine integer
stored with the most-significant bit first, e.g., bits 1110
represent the value 14.
Extra Extra Extra
Code Bits Dist Code Bits Dist Code Bits Distance
---- ---- ---- ---- ---- ------ ---- ---- --------
0 0 1 10 4 33-48 20 9 1025-1536
1 0 2 11 4 49-64 21 9 1537-2048
2 0 3 12 5 65-96 22 10 2049-3072
3 0 4 13 5 97-128 23 10 3073-4096
4 1 5,6 14 6 129-192 24 11 4097-6144
5 1 7,8 15 6 193-256 25 11 6145-8192
6 2 9-12 16 7 257-384 26 12 8193-12288
7 2 13-16 17 7 385-512 27 12 12289-16384
8 3 17-24 18 8 513-768 28 13 16385-24576
9 3 25-32 19 8 769-1024 29 13 24577-32768
3.2.6. Compression with fixed Huffman codes (BTYPE=01)
The Huffman codes for the two alphabets are fixed, and are not
represented explicitly in the data. The Huffman code lengths
for the literal/length alphabet are:
Lit Value Bits Codes
--------- ---- -----
0 - 143 8 00110000 through
10111111
144 - 255 9 110010000 through
111111111
256 - 279 7 0000000 through
0010111
280 - 287 8 11000000 through
11000111
Deutsch Informational [Page 12]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
The code lengths are sufficient to generate the actual codes,
as described above; we show the codes in the table for added
clarity. Literal/length values 286-287 will never actually
occur in the compressed data, but participate in the code
construction.
Distance codes 0-31 are represented by (fixed-length) 5-bit
codes, with possible additional bits as shown in the table
shown in Paragraph 3.2.5, above. Note that distance codes 30-
31 will never actually occur in the compressed data.
3.2.7. Compression with dynamic Huffman codes (BTYPE=10)
The Huffman codes for the two alphabets appear in the block
immediately after the header bits and before the actual
compressed data, first the literal/length code and then the
distance code. Each code is defined by a sequence of code
lengths, as discussed in Paragraph 3.2.2, above. For even
greater compactness, the code length sequences themselves are
compressed using a Huffman code. The alphabet for code lengths
is as follows:
0 - 15: Represent code lengths of 0 - 15
16: Copy the previous code length 3 - 6 times.
The next 2 bits indicate repeat length
(0 = 3, ... , 3 = 6)
Example: Codes 8, 16 (+2 bits 11),
16 (+2 bits 10) will expand to
12 code lengths of 8 (1 + 6 + 5)
17: Repeat a code length of 0 for 3 - 10 times.
(3 bits of length)
18: Repeat a code length of 0 for 11 - 138 times
(7 bits of length)
A code length of 0 indicates that the corresponding symbol in
the literal/length or distance alphabet will not occur in the
block, and should not participate in the Huffman code
construction algorithm given earlier. If only one distance
code is used, it is encoded using one bit, not zero bits; in
this case there is a single code length of one, with one unused
code. One distance code of zero bits means that there are no
distance codes used at all (the data is all literals).
We can now define the format of the block:
5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286)
5 Bits: HDIST, # of Distance codes - 1 (1 - 32)
4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19)
Deutsch Informational [Page 13]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
(HCLEN + 4) x 3 bits: code lengths for the code length
alphabet given just above, in the order: 16, 17, 18,
0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
These code lengths are interpreted as 3-bit integers
(0-7); as above, a code length of 0 means the
corresponding symbol (literal/length or distance code
length) is not used.
HLIT + 257 code lengths for the literal/length alphabet,
encoded using the code length Huffman code
HDIST + 1 code lengths for the distance alphabet,
encoded using the code length Huffman code
The actual compressed data of the block,
encoded using the literal/length and distance Huffman
codes
The literal/length symbol 256 (end of data),
encoded using the literal/length Huffman code
The code length repeat codes can cross from HLIT + 257 to the
HDIST + 1 code lengths. In other words, all code lengths form
a single sequence of HLIT + HDIST + 258 values.
3.3. Compliance
A compressor may limit further the ranges of values specified in
the previous section and still be compliant; for example, it may
limit the range of backward pointers to some value smaller than
32K. Similarly, a compressor may limit the size of blocks so that
a compressible block fits in memory.
A compliant decompressor must accept the full range of possible
values defined in the previous section, and must accept blocks of
arbitrary size.
4. Compression algorithm details
While it is the intent of this document to define the "deflate"
compressed data format without reference to any particular
compression algorithm, the format is related to the compressed
formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below);
since many variations of LZ77 are patented, it is strongly
recommended that the implementor of a compressor follow the general
algorithm presented here, which is known not to be patented per se.
The material in this section is not part of the definition of the
Deutsch Informational [Page 14]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
specification per se, and a compressor need not follow it in order to
be compliant.
The compressor terminates a block when it determines that starting a
new block with fresh trees would be useful, or when the block size
fills up the compressor's block buffer.
The compressor uses a chained hash table to find duplicated strings,
using a hash function that operates on 3-byte sequences. At any
given point during compression, let XYZ be the next 3 input bytes to
be examined (not necessarily all different, of course). First, the
compressor examines the hash chain for XYZ. If the chain is empty,
the compressor simply writes out X as a literal byte and advances one
byte in the input. If the hash chain is not empty, indicating that
the sequence XYZ (or, if we are unlucky, some other 3 bytes with the
same hash function value) has occurred recently, the compressor
compares all strings on the XYZ hash chain with the actual input data
sequence starting at the current point, and selects the longest
match.
The compressor searches the hash chains starting with the most recent
strings, to favor small distances and thus take advantage of the
Huffman encoding. The hash chains are singly linked. There are no
deletions from the hash chains; the algorithm simply discards matches
that are too old. To avoid a worst-case situation, very long hash
chains are arbitrarily truncated at a certain length, determined by a
run-time parameter.
To improve overall compression, the compressor optionally defers the
selection of matches ("lazy matching"): after a match of length N has
been found, the compressor searches for a longer match starting at
the next input byte. If it finds a longer match, it truncates the
previous match to a length of one (thus producing a single literal
byte) and then emits the longer match. Otherwise, it emits the
original match, and, as described above, advances N bytes before
continuing.
Run-time parameters also control this "lazy match" procedure. If
compression ratio is most important, the compressor attempts a
complete second search regardless of the length of the first match.
In the normal case, if the current match is "long enough", the
compressor reduces the search for a longer match, thus speeding up
the process. If speed is most important, the compressor inserts new
strings in the hash table only when no match was found, or when the
match is not "too long". This degrades the compression ratio but
saves time since there are both fewer insertions and fewer searches.
Deutsch Informational [Page 15]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
5. References
[1] Huffman, D. A., "A Method for the Construction of Minimum
Redundancy Codes", Proceedings of the Institute of Radio
Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101.
[2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data
Compression", IEEE Transactions on Information Theory, Vol. 23,
No. 3, pp. 337-343.
[3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources,
available in ftp://ftp.uu.net/pub/archiving/zip/doc/
[4] Gailly, J.-L., and Adler, M., GZIP documentation and sources,
available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/
[5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix
encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169.
[6] Hirschberg and Lelewer, "Efficient decoding of prefix codes,"
Comm. ACM, 33,4, April 1990, pp. 449-459.
6. Security Considerations
Any data compression method involves the reduction of redundancy in
the data. Consequently, any corruption of the data is likely to have
severe effects and be difficult to correct. Uncompressed text, on
the other hand, will probably still be readable despite the presence
of some corrupted bytes.
It is recommended that systems using this data format provide some
means of validating the integrity of the compressed data. See
reference [3], for example.
7. Source code
Source code for a C language implementation of a "deflate" compliant
compressor and decompressor is available within the zlib package at
ftp://ftp.uu.net/pub/archiving/zip/zlib/.
8. Acknowledgements
Trademarks cited in this document are the property of their
respective owners.
Phil Katz designed the deflate format. Jean-Loup Gailly and Mark
Adler wrote the related software described in this specification.
Glenn Randers-Pehrson converted this document to RFC and HTML format.
Deutsch Informational [Page 16]
RFC 1951 DEFLATE Compressed Data Format Specification May 1996
9. Author's Address
L. Peter Deutsch
Aladdin Enterprises
203 Santa Margarita Ave.
Menlo Park, CA 94025
Phone: (415) 322-0103 (AM only)
FAX: (415) 322-1734
EMail: <ghost@aladdin.com>
Questions about the technical content of this specification can be
sent by email to:
Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
Mark Adler <madler@alumni.caltech.edu>
Editorial comments on this specification can be sent by email to:
L. Peter Deutsch <ghost@aladdin.com> and
Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
Deutsch Informational [Page 17]
-675
View File
@@ -1,675 +0,0 @@
Network Working Group P. Deutsch
Request for Comments: 1952 Aladdin Enterprises
Category: Informational May 1996
GZIP file format specification version 4.3
Status of This Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
IESG Note:
The IESG takes no position on the validity of any Intellectual
Property Rights statements contained in this document.
Notices
Copyright (c) 1996 L. Peter Deutsch
Permission is granted to copy and distribute this document for any
purpose and without charge, including translations into other
languages and incorporation into compilations, provided that the
copyright notice and this notice are preserved, and that any
substantive changes or deletions from the original are clearly
marked.
A pointer to the latest version of this and related documentation in
HTML format can be found at the URL
<ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
Abstract
This specification defines a lossless compressed data format that is
compatible with the widely used GZIP utility. The format includes a
cyclic redundancy check value for detecting data corruption. The
format presently uses the DEFLATE method of compression but can be
easily extended to use other compression methods. The format can be
implemented readily in a manner not covered by patents.
Deutsch Informational [Page 1]
RFC 1952 GZIP File Format Specification May 1996
Table of Contents
1. Introduction ................................................... 2
1.1. Purpose ................................................... 2
1.2. Intended audience ......................................... 3
1.3. Scope ..................................................... 3
1.4. Compliance ................................................ 3
1.5. Definitions of terms and conventions used ................. 3
1.6. Changes from previous versions ............................ 3
2. Detailed specification ......................................... 4
2.1. Overall conventions ....................................... 4
2.2. File format ............................................... 5
2.3. Member format ............................................. 5
2.3.1. Member header and trailer ........................... 6
2.3.1.1. Extra field ................................... 8
2.3.1.2. Compliance .................................... 9
3. References .................................................. 9
4. Security Considerations .................................... 10
5. Acknowledgements ........................................... 10
6. Author's Address ........................................... 10
7. Appendix: Jean-Loup Gailly's gzip utility .................. 11
8. Appendix: Sample CRC Code .................................. 11
1. Introduction
1.1. Purpose
The purpose of this specification is to define a lossless
compressed data format that:
* Is independent of CPU type, operating system, file system,
and character set, and hence can be used for interchange;
* Can compress or decompress a data stream (as opposed to a
randomly accessible file) to produce another data stream,
using only an a priori bounded amount of intermediate
storage, and hence can be used in data communications or
similar structures such as Unix filters;
* Compresses data with efficiency comparable to the best
currently available general-purpose compression methods,
and in particular considerably better than the "compress"
program;
* Can be implemented readily in a manner not covered by
patents, and hence can be practiced freely;
* Is compatible with the file format produced by the current
widely used gzip utility, in that conforming decompressors
will be able to read data produced by the existing gzip
compressor.
Deutsch Informational [Page 2]
RFC 1952 GZIP File Format Specification May 1996
The data format defined by this specification does not attempt to:
* Provide random access to compressed data;
* Compress specialized data (e.g., raster graphics) as well as
the best currently available specialized algorithms.
1.2. Intended audience
This specification is intended for use by implementors of software
to compress data into gzip format and/or decompress data from gzip
format.
The text of the specification assumes a basic background in
programming at the level of bits and other primitive data
representations.
1.3. Scope
The specification specifies a compression method and a file format
(the latter assuming only that a file can store a sequence of
arbitrary bytes). It does not specify any particular interface to
a file system or anything about character sets or encodings
(except for file names and comments, which are optional).
1.4. Compliance
Unless otherwise indicated below, a compliant decompressor must be
able to accept and decompress any file that conforms to all the
specifications presented here; a compliant compressor must produce
files that conform to all the specifications presented here. The
material in the appendices is not part of the specification per se
and is not relevant to compliance.
1.5. Definitions of terms and conventions used
byte: 8 bits stored or transmitted as a unit (same as an octet).
(For this specification, a byte is exactly 8 bits, even on
machines which store a character on a number of bits different
from 8.) See below for the numbering of bits within a byte.
1.6. Changes from previous versions
There have been no technical changes to the gzip format since
version 4.1 of this specification. In version 4.2, some
terminology was changed, and the sample CRC code was rewritten for
clarity and to eliminate the requirement for the caller to do pre-
and post-conditioning. Version 4.3 is a conversion of the
specification to RFC style.
Deutsch Informational [Page 3]
RFC 1952 GZIP File Format Specification May 1996
2. Detailed specification
2.1. Overall conventions
In the diagrams below, a box like this:
+---+
| | <-- the vertical bars might be missing
+---+
represents one byte; a box like this:
+==============+
| |
+==============+
represents a variable number of bytes.
Bytes stored within a computer do not have a "bit order", since
they are always treated as a unit. However, a byte considered as
an integer between 0 and 255 does have a most- and least-
significant bit, and since we write numbers with the most-
significant digit on the left, we also write bytes with the most-
significant bit on the left. In the diagrams below, we number the
bits of a byte so that bit 0 is the least-significant bit, i.e.,
the bits are numbered:
+--------+
|76543210|
+--------+
This document does not address the issue of the order in which
bits of a byte are transmitted on a bit-sequential medium, since
the data format described here is byte- rather than bit-oriented.
Within a computer, a number may occupy multiple bytes. All
multi-byte numbers in the format described here are stored with
the least-significant byte first (at the lower memory address).
For example, the decimal number 520 is stored as:
0 1
+--------+--------+
|00001000|00000010|
+--------+--------+
^ ^
| |
| + more significant byte = 2 x 256
+ less significant byte = 8
Deutsch Informational [Page 4]
RFC 1952 GZIP File Format Specification May 1996
2.2. File format
A gzip file consists of a series of "members" (compressed data
sets). The format of each member is specified in the following
section. The members simply appear one after another in the file,
with no additional information before, between, or after them.
2.3. Member format
Each member has the following structure:
+---+---+---+---+---+---+---+---+---+---+
|ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->)
+---+---+---+---+---+---+---+---+---+---+
(if FLG.FEXTRA set)
+---+---+=================================+
| XLEN |...XLEN bytes of "extra field"...| (more-->)
+---+---+=================================+
(if FLG.FNAME set)
+=========================================+
|...original file name, zero-terminated...| (more-->)
+=========================================+
(if FLG.FCOMMENT set)
+===================================+
|...file comment, zero-terminated...| (more-->)
+===================================+
(if FLG.FHCRC set)
+---+---+
| CRC16 |
+---+---+
+=======================+
|...compressed blocks...| (more-->)
+=======================+
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| CRC32 | ISIZE |
+---+---+---+---+---+---+---+---+
Deutsch Informational [Page 5]
RFC 1952 GZIP File Format Specification May 1996
2.3.1. Member header and trailer
ID1 (IDentification 1)
ID2 (IDentification 2)
These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139
(0x8b, \213), to identify the file as being in gzip format.
CM (Compression Method)
This identifies the compression method used in the file. CM
= 0-7 are reserved. CM = 8 denotes the "deflate"
compression method, which is the one customarily used by
gzip and which is documented elsewhere.
FLG (FLaGs)
This flag byte is divided into individual bits as follows:
bit 0 FTEXT
bit 1 FHCRC
bit 2 FEXTRA
bit 3 FNAME
bit 4 FCOMMENT
bit 5 reserved
bit 6 reserved
bit 7 reserved
If FTEXT is set, the file is probably ASCII text. This is
an optional indication, which the compressor may set by
checking a small amount of the input data to see whether any
non-ASCII characters are present. In case of doubt, FTEXT
is cleared, indicating binary data. For systems which have
different file formats for ascii text and binary data, the
decompressor can use FTEXT to choose the appropriate format.
We deliberately do not specify the algorithm used to set
this bit, since a compressor always has the option of
leaving it cleared and a decompressor always has the option
of ignoring it and letting some other program handle issues
of data conversion.
If FHCRC is set, a CRC16 for the gzip header is present,
immediately before the compressed data. The CRC16 consists
of the two least significant bytes of the CRC32 for all
bytes of the gzip header up to and not including the CRC16.
[The FHCRC bit was never set by versions of gzip up to
1.2.4, even though it was documented with a different
meaning in gzip 1.2.4.]
If FEXTRA is set, optional extra fields are present, as
described in a following section.
Deutsch Informational [Page 6]
RFC 1952 GZIP File Format Specification May 1996
If FNAME is set, an original file name is present,
terminated by a zero byte. The name must consist of ISO
8859-1 (LATIN-1) characters; on operating systems using
EBCDIC or any other character set for file names, the name
must be translated to the ISO LATIN-1 character set. This
is the original name of the file being compressed, with any
directory components removed, and, if the file being
compressed is on a file system with case insensitive names,
forced to lower case. There is no original file name if the
data was compressed from a source other than a named file;
for example, if the source was stdin on a Unix system, there
is no file name.
If FCOMMENT is set, a zero-terminated file comment is
present. This comment is not interpreted; it is only
intended for human consumption. The comment must consist of
ISO 8859-1 (LATIN-1) characters. Line breaks should be
denoted by a single line feed character (10 decimal).
Reserved FLG bits must be zero.
MTIME (Modification TIME)
This gives the most recent modification time of the original
file being compressed. The time is in Unix format, i.e.,
seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this
may cause problems for MS-DOS and other systems that use
local rather than Universal time.) If the compressed data
did not come from a file, MTIME is set to the time at which
compression started. MTIME = 0 means no time stamp is
available.
XFL (eXtra FLags)
These flags are available for use by specific compression
methods. The "deflate" method (CM = 8) sets these flags as
follows:
XFL = 2 - compressor used maximum compression,
slowest algorithm
XFL = 4 - compressor used fastest algorithm
OS (Operating System)
This identifies the type of file system on which compression
took place. This may be useful in determining end-of-line
convention for text files. The currently defined values are
as follows:
Deutsch Informational [Page 7]
RFC 1952 GZIP File Format Specification May 1996
0 - FAT filesystem (MS-DOS, OS/2, NT/Win32)
1 - Amiga
2 - VMS (or OpenVMS)
3 - Unix
4 - VM/CMS
5 - Atari TOS
6 - HPFS filesystem (OS/2, NT)
7 - Macintosh
8 - Z-System
9 - CP/M
10 - TOPS-20
11 - NTFS filesystem (NT)
12 - QDOS
13 - Acorn RISCOS
255 - unknown
XLEN (eXtra LENgth)
If FLG.FEXTRA is set, this gives the length of the optional
extra field. See below for details.
CRC32 (CRC-32)
This contains a Cyclic Redundancy Check value of the
uncompressed data computed according to CRC-32 algorithm
used in the ISO 3309 standard and in section 8.1.1.6.2 of
ITU-T recommendation V.42. (See http://www.iso.ch for
ordering ISO documents. See gopher://info.itu.ch for an
online version of ITU-T V.42.)
ISIZE (Input SIZE)
This contains the size of the original (uncompressed) input
data modulo 2^32.
2.3.1.1. Extra field
If the FLG.FEXTRA bit is set, an "extra field" is present in
the header, with total length XLEN bytes. It consists of a
series of subfields, each of the form:
+---+---+---+---+==================================+
|SI1|SI2| LEN |... LEN bytes of subfield data ...|
+---+---+---+---+==================================+
SI1 and SI2 provide a subfield ID, typically two ASCII letters
with some mnemonic value. Jean-Loup Gailly
<gzip@prep.ai.mit.edu> is maintaining a registry of subfield
IDs; please send him any subfield ID you wish to use. Subfield
IDs with SI2 = 0 are reserved for future use. The following
IDs are currently defined:
Deutsch Informational [Page 8]
RFC 1952 GZIP File Format Specification May 1996
SI1 SI2 Data
---------- ---------- ----
0x41 ('A') 0x70 ('P') Apollo file type information
LEN gives the length of the subfield data, excluding the 4
initial bytes.
2.3.1.2. Compliance
A compliant compressor must produce files with correct ID1,
ID2, CM, CRC32, and ISIZE, but may set all the other fields in
the fixed-length part of the header to default values (255 for
OS, 0 for all others). The compressor must set all reserved
bits to zero.
A compliant decompressor must check ID1, ID2, and CM, and
provide an error indication if any of these have incorrect
values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC
at least so it can skip over the optional fields if they are
present. It need not examine any other part of the header or
trailer; in particular, a decompressor may ignore FTEXT and OS
and always produce binary output, and still be compliant. A
compliant decompressor must give an error indication if any
reserved bit is non-zero, since such a bit could indicate the
presence of a new field that would cause subsequent data to be
interpreted incorrectly.
3. References
[1] "Information Processing - 8-bit single-byte coded graphic
character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987).
The ISO 8859-1 (Latin-1) character set is a superset of 7-bit
ASCII. Files defining this character set are available as
iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/
[2] ISO 3309
[3] ITU-T recommendation V.42
[4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
available in ftp://ftp.uu.net/pub/archiving/zip/doc/
[5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in
ftp://prep.ai.mit.edu/pub/gnu/
[6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table
Look-Up", Communications of the ACM, 31(8), pp.1008-1013.
Deutsch Informational [Page 9]
RFC 1952 GZIP File Format Specification May 1996
[7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal,
pp.118-133.
[8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt,
describing the CRC concept.
4. Security Considerations
Any data compression method involves the reduction of redundancy in
the data. Consequently, any corruption of the data is likely to have
severe effects and be difficult to correct. Uncompressed text, on
the other hand, will probably still be readable despite the presence
of some corrupted bytes.
It is recommended that systems using this data format provide some
means of validating the integrity of the compressed data, such as by
setting and checking the CRC-32 check value.
5. Acknowledgements
Trademarks cited in this document are the property of their
respective owners.
Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler,
the related software described in this specification. Glenn
Randers-Pehrson converted this document to RFC and HTML format.
6. Author's Address
L. Peter Deutsch
Aladdin Enterprises
203 Santa Margarita Ave.
Menlo Park, CA 94025
Phone: (415) 322-0103 (AM only)
FAX: (415) 322-1734
EMail: <ghost@aladdin.com>
Questions about the technical content of this specification can be
sent by email to:
Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
Mark Adler <madler@alumni.caltech.edu>
Editorial comments on this specification can be sent by email to:
L. Peter Deutsch <ghost@aladdin.com> and
Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
Deutsch Informational [Page 10]
RFC 1952 GZIP File Format Specification May 1996
7. Appendix: Jean-Loup Gailly's gzip utility
The most widely used implementation of gzip compression, and the
original documentation on which this specification is based, were
created by Jean-Loup Gailly <gzip@prep.ai.mit.edu>. Since this
implementation is a de facto standard, we mention some more of its
features here. Again, the material in this section is not part of
the specification per se, and implementations need not follow it to
be compliant.
When compressing or decompressing a file, gzip preserves the
protection, ownership, and modification time attributes on the local
file system, since there is no provision for representing protection
attributes in the gzip file format itself. Since the file format
includes a modification time, the gzip decompressor provides a
command line switch that assigns the modification time from the file,
rather than the local modification time of the compressed input, to
the decompressed output.
8. Appendix: Sample CRC Code
The following sample code represents a practical implementation of
the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42
for a formal specification.)
The sample code is in the ANSI C programming language. Non C users
may find it easier to read with these hints:
& Bitwise AND operator.
^ Bitwise exclusive-OR operator.
>> Bitwise right shift operator. When applied to an
unsigned quantity, as here, right shift inserts zero
bit(s) at the left.
! Logical NOT operator.
++ "n++" increments the variable n.
0xNNN 0x introduces a hexadecimal (base 16) constant.
Suffix L indicates a long value (at least 32 bits).
/* Table of CRCs of all 8-bit messages. */
unsigned long crc_table[256];
/* Flag: has the table been computed? Initially false. */
int crc_table_computed = 0;
/* Make the table for a fast CRC. */
void make_crc_table(void)
{
unsigned long c;
Deutsch Informational [Page 11]
RFC 1952 GZIP File Format Specification May 1996
int n, k;
for (n = 0; n < 256; n++) {
c = (unsigned long) n;
for (k = 0; k < 8; k++) {
if (c & 1) {
c = 0xedb88320L ^ (c >> 1);
} else {
c = c >> 1;
}
}
crc_table[n] = c;
}
crc_table_computed = 1;
}
/*
Update a running crc with the bytes buf[0..len-1] and return
the updated crc. The crc should be initialized to zero. Pre- and
post-conditioning (one's complement) is performed within this
function so it shouldn't be done by the caller. Usage example:
unsigned long crc = 0L;
while (read_buffer(buffer, length) != EOF) {
crc = update_crc(crc, buffer, length);
}
if (crc != original_crc) error();
*/
unsigned long update_crc(unsigned long crc,
unsigned char *buf, int len)
{
unsigned long c = crc ^ 0xffffffffL;
int n;
if (!crc_table_computed)
make_crc_table();
for (n = 0; n < len; n++) {
c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
}
return c ^ 0xffffffffL;
}
/* Return the CRC of the bytes buf[0..len-1]. */
unsigned long crc(unsigned char *buf, int len)
{
return update_crc(0L, buf, len);
}
Deutsch Informational [Page 12]
-107
View File
@@ -1,107 +0,0 @@
A Fast Method for Identifying Plain Text Files
==============================================
Introduction
------------
Given a file coming from an unknown source, it is sometimes desirable
to find out whether the format of that file is plain text. Although
this may appear like a simple task, a fully accurate detection of the
file type requires heavy-duty semantic analysis on the file contents.
It is, however, possible to obtain satisfactory results by employing
various heuristics.
Previous versions of PKZip and other zip-compatible compression tools
were using a crude detection scheme: if more than 80% (4/5) of the bytes
found in a certain buffer are within the range [7..127], the file is
labeled as plain text, otherwise it is labeled as binary. A prominent
limitation of this scheme is the restriction to Latin-based alphabets.
Other alphabets, like Greek, Cyrillic or Asian, make extensive use of
the bytes within the range [128..255], and texts using these alphabets
are most often misidentified by this scheme; in other words, the rate
of false negatives is sometimes too high, which means that the recall
is low. Another weakness of this scheme is a reduced precision, due to
the false positives that may occur when binary files containing large
amounts of textual characters are misidentified as plain text.
In this article we propose a new, simple detection scheme that features
a much increased precision and a near-100% recall. This scheme is
designed to work on ASCII, Unicode and other ASCII-derived alphabets,
and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.)
and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings
(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however.
The Algorithm
-------------
The algorithm works by dividing the set of bytecodes [0..255] into three
categories:
- The white list of textual bytecodes:
9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255.
- The gray list of tolerated bytecodes:
7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC).
- The black list of undesired, non-textual bytecodes:
0 (NUL) to 6, 14 to 31.
If a file contains at least one byte that belongs to the white list and
no byte that belongs to the black list, then the file is categorized as
plain text; otherwise, it is categorized as binary. (The boundary case,
when the file is empty, automatically falls into the latter category.)
Rationale
---------
The idea behind this algorithm relies on two observations.
The first observation is that, although the full range of 7-bit codes
[0..127] is properly specified by the ASCII standard, most control
characters in the range [0..31] are not used in practice. The only
widely-used, almost universally-portable control codes are 9 (TAB),
10 (LF) and 13 (CR). There are a few more control codes that are
recognized on a reduced range of platforms and text viewers/editors:
7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these
codes are rarely (if ever) used alone, without being accompanied by
some printable text. Even the newer, portable text formats such as
XML avoid using control characters outside the list mentioned here.
The second observation is that most of the binary files tend to contain
control characters, especially 0 (NUL). Even though the older text
detection schemes observe the presence of non-ASCII codes from the range
[128..255], the precision rarely has to suffer if this upper range is
labeled as textual, because the files that are genuinely binary tend to
contain both control characters and codes from the upper range. On the
other hand, the upper range needs to be labeled as textual, because it
is used by virtually all ASCII extensions. In particular, this range is
used for encoding non-Latin scripts.
Since there is no counting involved, other than simply observing the
presence or the absence of some byte values, the algorithm produces
consistent results, regardless what alphabet encoding is being used.
(If counting were involved, it could be possible to obtain different
results on a text encoded, say, using ISO-8859-16 versus UTF-8.)
There is an extra category of plain text files that are "polluted" with
one or more black-listed codes, either by mistake or by peculiar design
considerations. In such cases, a scheme that tolerates a small fraction
of black-listed codes would provide an increased recall (i.e. more true
positives). This, however, incurs a reduced precision overall, since
false positives are more likely to appear in binary files that contain
large chunks of textual data. Furthermore, "polluted" plain text should
be regarded as binary by general-purpose text detection schemes, because
general-purpose text processing algorithms might not be applicable.
Under this premise, it is safe to say that our detection method provides
a near-100% recall.
Experiments have been run on many files coming from various platforms
and applications. We tried plain text files, system logs, source code,
formatted office documents, compiled object code, etc. The results
confirm the optimistic assumptions about the capabilities of this
algorithm.
--
Cosmin Truta
Last updated: 2006-May-28
+1 -1
View File
@@ -205,7 +205,7 @@ and sets \fIinterp\fR's result to an error message indicating that
the \fBreturn\fR, \fBbreak\fR, or \fBcontinue\fR command was
invoked in an inappropriate place.
This means that top-level applications should never see a return code
from \fBTcl_EvalObjEx\fR other then \fBTCL_OK\fR or \fBTCL_ERROR\fR.
from \fBTcl_EvalObjEx\fR other than \fBTCL_OK\fR or \fBTCL_ERROR\fR.
.SH KEYWORDS
execute, file, global, result, script, value
+1 -1
View File
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures"
.so man.macros
.BS
+1 -1
View File
@@ -97,7 +97,7 @@ are provided by the C language standard. The \fBTcl_WideInt\fR type is a
typedef defined to be whatever signed integral type covers at least the
64-bit integer range (-9223372036854775808 to 9223372036854775807). Depending
on the platform and the C compiler, the actual type might be
\fBlong int\fR, \fBlong long int\fR, \fBint64\fR, or something else.
\fBlong int\fR, \fBlong long int\fR, \fB__int64\fR, or something else.
The \fBmp_int\fR type is a multiple-precision integer type defined
by the LibTomMath multiple-precision integer library.
.PP
+1 -1
View File
@@ -4,7 +4,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
'\"
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
.so man.macros
.BS
+7
View File
@@ -47,6 +47,13 @@ been the return value from a previous invocation of
Returns 1 if \fIarrayName\fR is an array variable, 0 if there
is no variable by that name or if it is a scalar variable.
.TP
\fBarray for {\fIkeyVariable ?valueVariable?\fB} \fIarrayName body\fR
The first argument is a one or two element list of variable names for the
key and value of each entry in the array. The second argument is the
array name to iterate over. The third argument is the body to execute
for each key and value returned.
The ordering of the returned keys is undefined.
.TP
\fBarray get \fIarrayName\fR ?\fIpattern\fR?
Returns a list containing pairs of elements. The first
element in each pair is the name of an element in \fIarrayName\fR
+16 -6
View File
@@ -14,7 +14,7 @@ oo::copy \- create copies of objects and classes
.nf
package require TclOO
\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR?
\fBoo::copy\fI sourceObject \fR?\fItargetObject\fR? ?\fItargetNamespace\fR?
.fi
.BE
.SH DESCRIPTION
@@ -22,11 +22,21 @@ package require TclOO
The \fBoo::copy\fR command creates a copy of an object or class. It takes the
name of the object or class to be copied, \fIsourceObject\fR, and optionally
the name of the object or class to create, \fItargetObject\fR, which will be
resolved relative to the current namespace if not an absolute qualified name.
If \fItargetObject\fR is omitted, a new name is chosen. The copied object will
be of the same class as the source object, and will have all its per-object
methods copied. If it is a class, it will also have all the class methods in
the class copied, but it will not have any of its instances copied.
resolved relative to the current namespace if not an absolute qualified name
and
.VS TIP473
\fItargetNamespace\fR which is the name of the namespace that will hold the
internal state of the object (\fBmy\fR command, etc.); it \fImust not\fR
refer to an existing namespace.
If either \fItargetObject\fR or \fItargetNamespace\fR is omitted or is given
as the empty string, a new name is chosen. Names, unless specified, are
chosen with the same algorithm used by the \fBnew\fR method of
\fBoo::class\fR.
.VE TIP473
The copied object will be of the same class as the source object, and will have
all its per-object methods copied. If it is a class, it will also have all the
class methods in the class copied, but it will not have any of its instances
copied.
.PP
.VS
After the \fItargetObject\fR has been created and all definitions of its
+1 -1
View File
@@ -437,7 +437,7 @@ puts $foo
# prints: \fIa b foo {a b} bar 2 baz 3\fR
.CE
.SH "SEE ALSO"
append(n), array(n), foreach(n), mapeach(n), incr(n), list(n), lappend(n), set(n)
append(n), array(n), foreach(n), incr(n), list(n), lappend(n), lmap(n), set(n)
.SH KEYWORDS
dictionary, create, update, lookup, iterate, filter, map
'\" Local Variables:
+209 -202
View File
@@ -140,73 +140,73 @@ static const crange alphaRangeTable[] = {
{0x3f7, 0x481}, {0x48a, 0x52f}, {0x531, 0x556}, {0x561, 0x587},
{0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x620, 0x64a}, {0x671, 0x6d3},
{0x6fa, 0x6fc}, {0x712, 0x72f}, {0x74d, 0x7a5}, {0x7ca, 0x7ea},
{0x800, 0x815}, {0x840, 0x858}, {0x8a0, 0x8b4}, {0x8b6, 0x8bd},
{0x904, 0x939}, {0x958, 0x961}, {0x971, 0x980}, {0x985, 0x98c},
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b6, 0x9b9}, {0x9df, 0x9e1},
{0xa05, 0xa0a}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa59, 0xa5c},
{0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
{0xaaa, 0xab0}, {0xab5, 0xab9}, {0xb05, 0xb0c}, {0xb13, 0xb28},
{0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa}, {0xbae, 0xbb9},
{0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39},
{0xc58, 0xc5a}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8},
{0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
{0xd12, 0xd3a}, {0xd54, 0xd56}, {0xd5f, 0xd61}, {0xd7a, 0xd7f},
{0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdc0, 0xdc6},
{0xe01, 0xe30}, {0xe40, 0xe46}, {0xe94, 0xe97}, {0xe99, 0xe9f},
{0xea1, 0xea3}, {0xead, 0xeb0}, {0xec0, 0xec4}, {0xedc, 0xedf},
{0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c}, {0x1000, 0x102a},
{0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070}, {0x1075, 0x1081},
{0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248}, {0x124a, 0x124d},
{0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d},
{0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5},
{0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a},
{0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1401, 0x166c},
{0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea}, {0x16f1, 0x16f8},
{0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731}, {0x1740, 0x1751},
{0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3}, {0x1820, 0x1877},
{0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5}, {0x1900, 0x191e},
{0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9},
{0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33}, {0x1b45, 0x1b4b},
{0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23}, {0x1c4d, 0x1c4f},
{0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1ce9, 0x1cec}, {0x1cee, 0x1cf1},
{0x1d00, 0x1dbf}, {0x1e00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
{0x1fb6, 0x1fbc}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
{0x2090, 0x209c}, {0x210a, 0x2113}, {0x2119, 0x211d}, {0x212a, 0x212d},
{0x212f, 0x2139}, {0x213c, 0x213f}, {0x2145, 0x2149}, {0x2c00, 0x2c2e},
{0x2c30, 0x2c5e}, {0x2c60, 0x2ce4}, {0x2ceb, 0x2cee}, {0x2d00, 0x2d25},
{0x2d30, 0x2d67}, {0x2d80, 0x2d96}, {0x2da0, 0x2da6}, {0x2da8, 0x2dae},
{0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6}, {0x2dc8, 0x2dce},
{0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x3031, 0x3035}, {0x3041, 0x3096},
{0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff}, {0x3105, 0x312d},
{0x3131, 0x318e}, {0x31a0, 0x31ba}, {0x31f0, 0x31ff}, {0x3400, 0x4db5},
{0x4e00, 0x9fd5}, {0xa000, 0xa48c}, {0xa4d0, 0xa4fd}, {0xa500, 0xa60c},
{0xa610, 0xa61f}, {0xa640, 0xa66e}, {0xa67f, 0xa69d}, {0xa6a0, 0xa6e5},
{0xa717, 0xa71f}, {0xa722, 0xa788}, {0xa78b, 0xa7ae}, {0xa7b0, 0xa7b7},
{0xa7f7, 0xa801}, {0xa803, 0xa805}, {0xa807, 0xa80a}, {0xa80c, 0xa822},
{0xa840, 0xa873}, {0xa882, 0xa8b3}, {0xa8f2, 0xa8f7}, {0xa90a, 0xa925},
{0xa930, 0xa946}, {0xa960, 0xa97c}, {0xa984, 0xa9b2}, {0xa9e0, 0xa9e4},
{0xa9e6, 0xa9ef}, {0xa9fa, 0xa9fe}, {0xaa00, 0xaa28}, {0xaa40, 0xaa42},
{0xaa44, 0xaa4b}, {0xaa60, 0xaa76}, {0xaa7e, 0xaaaf}, {0xaab9, 0xaabd},
{0xaadb, 0xaadd}, {0xaae0, 0xaaea}, {0xaaf2, 0xaaf4}, {0xab01, 0xab06},
{0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26}, {0xab28, 0xab2e},
{0xab30, 0xab5a}, {0xab5c, 0xab65}, {0xab70, 0xabe2}, {0xac00, 0xd7a3},
{0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xdc00, 0xdc3e}, {0xdc40, 0xdc7e},
{0xdc80, 0xdcbe}, {0xdcc0, 0xdcfe}, {0xdd00, 0xdd3e}, {0xdd40, 0xdd7e},
{0xdd80, 0xddbe}, {0xddc0, 0xddfe}, {0xde00, 0xde3e}, {0xde40, 0xde7e},
{0xde80, 0xdebe}, {0xdec0, 0xdefe}, {0xdf00, 0xdf3e}, {0xdf40, 0xdf7e},
{0xdf80, 0xdfbe}, {0xdfc0, 0xdffe}, {0xf900, 0xfa6d}, {0xfa70, 0xfad9},
{0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1f, 0xfb28}, {0xfb2a, 0xfb36},
{0xfb38, 0xfb3c}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d}, {0xfd50, 0xfd8f},
{0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74}, {0xfe76, 0xfefc},
{0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe}, {0xffc2, 0xffc7},
{0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc}
{0x800, 0x815}, {0x840, 0x858}, {0x860, 0x86a}, {0x8a0, 0x8b4},
{0x8b6, 0x8bd}, {0x904, 0x939}, {0x958, 0x961}, {0x971, 0x980},
{0x985, 0x98c}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b6, 0x9b9},
{0x9df, 0x9e1}, {0xa05, 0xa0a}, {0xa13, 0xa28}, {0xa2a, 0xa30},
{0xa59, 0xa5c}, {0xa72, 0xa74}, {0xa85, 0xa8d}, {0xa8f, 0xa91},
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab5, 0xab9}, {0xb05, 0xb0c},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb5f, 0xb61},
{0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa},
{0xbae, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
{0xc2a, 0xc39}, {0xc58, 0xc5a}, {0xc85, 0xc8c}, {0xc8e, 0xc90},
{0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xd05, 0xd0c},
{0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd54, 0xd56}, {0xd5f, 0xd61},
{0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb},
{0xdc0, 0xdc6}, {0xe01, 0xe30}, {0xe40, 0xe46}, {0xe94, 0xe97},
{0xe99, 0xe9f}, {0xea1, 0xea3}, {0xead, 0xeb0}, {0xec0, 0xec4},
{0xedc, 0xedf}, {0xf40, 0xf47}, {0xf49, 0xf6c}, {0xf88, 0xf8c},
{0x1000, 0x102a}, {0x1050, 0x1055}, {0x105a, 0x105d}, {0x106e, 0x1070},
{0x1075, 0x1081}, {0x10a0, 0x10c5}, {0x10d0, 0x10fa}, {0x10fc, 0x1248},
{0x124a, 0x124d}, {0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288},
{0x128a, 0x128d}, {0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be},
{0x12c2, 0x12c5}, {0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315},
{0x1318, 0x135a}, {0x1380, 0x138f}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd},
{0x1401, 0x166c}, {0x166f, 0x167f}, {0x1681, 0x169a}, {0x16a0, 0x16ea},
{0x16f1, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1711}, {0x1720, 0x1731},
{0x1740, 0x1751}, {0x1760, 0x176c}, {0x176e, 0x1770}, {0x1780, 0x17b3},
{0x1820, 0x1877}, {0x1880, 0x1884}, {0x1887, 0x18a8}, {0x18b0, 0x18f5},
{0x1900, 0x191e}, {0x1950, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab},
{0x19b0, 0x19c9}, {0x1a00, 0x1a16}, {0x1a20, 0x1a54}, {0x1b05, 0x1b33},
{0x1b45, 0x1b4b}, {0x1b83, 0x1ba0}, {0x1bba, 0x1be5}, {0x1c00, 0x1c23},
{0x1c4d, 0x1c4f}, {0x1c5a, 0x1c7d}, {0x1c80, 0x1c88}, {0x1ce9, 0x1cec},
{0x1cee, 0x1cf1}, {0x1d00, 0x1dbf}, {0x1e00, 0x1f15}, {0x1f18, 0x1f1d},
{0x1f20, 0x1f45}, {0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d},
{0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc},
{0x1fd0, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4},
{0x1ff6, 0x1ffc}, {0x2090, 0x209c}, {0x210a, 0x2113}, {0x2119, 0x211d},
{0x212a, 0x212d}, {0x212f, 0x2139}, {0x213c, 0x213f}, {0x2145, 0x2149},
{0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2ce4}, {0x2ceb, 0x2cee},
{0x2d00, 0x2d25}, {0x2d30, 0x2d67}, {0x2d80, 0x2d96}, {0x2da0, 0x2da6},
{0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6},
{0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x3031, 0x3035},
{0x3041, 0x3096}, {0x309d, 0x309f}, {0x30a1, 0x30fa}, {0x30fc, 0x30ff},
{0x3105, 0x312e}, {0x3131, 0x318e}, {0x31a0, 0x31ba}, {0x31f0, 0x31ff},
{0x3400, 0x4db5}, {0x4e00, 0x9fea}, {0xa000, 0xa48c}, {0xa4d0, 0xa4fd},
{0xa500, 0xa60c}, {0xa610, 0xa61f}, {0xa640, 0xa66e}, {0xa67f, 0xa69d},
{0xa6a0, 0xa6e5}, {0xa717, 0xa71f}, {0xa722, 0xa788}, {0xa78b, 0xa7ae},
{0xa7b0, 0xa7b7}, {0xa7f7, 0xa801}, {0xa803, 0xa805}, {0xa807, 0xa80a},
{0xa80c, 0xa822}, {0xa840, 0xa873}, {0xa882, 0xa8b3}, {0xa8f2, 0xa8f7},
{0xa90a, 0xa925}, {0xa930, 0xa946}, {0xa960, 0xa97c}, {0xa984, 0xa9b2},
{0xa9e0, 0xa9e4}, {0xa9e6, 0xa9ef}, {0xa9fa, 0xa9fe}, {0xaa00, 0xaa28},
{0xaa40, 0xaa42}, {0xaa44, 0xaa4b}, {0xaa60, 0xaa76}, {0xaa7e, 0xaaaf},
{0xaab9, 0xaabd}, {0xaadb, 0xaadd}, {0xaae0, 0xaaea}, {0xaaf2, 0xaaf4},
{0xab01, 0xab06}, {0xab09, 0xab0e}, {0xab11, 0xab16}, {0xab20, 0xab26},
{0xab28, 0xab2e}, {0xab30, 0xab5a}, {0xab5c, 0xab65}, {0xab70, 0xabe2},
{0xac00, 0xd7a3}, {0xd7b0, 0xd7c6}, {0xd7cb, 0xd7fb}, {0xdc00, 0xdc3e},
{0xdc40, 0xdc7e}, {0xdc80, 0xdcbe}, {0xdcc0, 0xdcfe}, {0xdd00, 0xdd3e},
{0xdd40, 0xdd7e}, {0xdd80, 0xddbe}, {0xddc0, 0xddfe}, {0xde00, 0xde3e},
{0xde40, 0xde7e}, {0xde80, 0xdebe}, {0xdec0, 0xdefe}, {0xdf00, 0xdf3e},
{0xdf40, 0xdf7e}, {0xdf80, 0xdfbe}, {0xdfc0, 0xdffe}, {0xf900, 0xfa6d},
{0xfa70, 0xfad9}, {0xfb00, 0xfb06}, {0xfb13, 0xfb17}, {0xfb1f, 0xfb28},
{0xfb2a, 0xfb36}, {0xfb38, 0xfb3c}, {0xfb46, 0xfbb1}, {0xfbd3, 0xfd3d},
{0xfd50, 0xfd8f}, {0xfd92, 0xfdc7}, {0xfdf0, 0xfdfb}, {0xfe70, 0xfe74},
{0xfe76, 0xfefc}, {0xff21, 0xff3a}, {0xff41, 0xff5a}, {0xff66, 0xffbe},
{0xffc2, 0xffc7}, {0xffca, 0xffcf}, {0xffd2, 0xffd7}, {0xffda, 0xffdc}
#if TCL_UTF_MAX > 4
,{0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003f, 0x1004d},
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10280, 0x1029c}, {0x102a0, 0x102d0},
{0x10300, 0x1031f}, {0x10330, 0x10340}, {0x10342, 0x10349}, {0x10350, 0x10375},
{0x10300, 0x1031f}, {0x1032d, 0x10340}, {0x10342, 0x10349}, {0x10350, 0x10375},
{0x10380, 0x1039d}, {0x103a0, 0x103c3}, {0x103c8, 0x103cf}, {0x10400, 0x1049d},
{0x104b0, 0x104d3}, {0x104d8, 0x104fb}, {0x10500, 0x10527}, {0x10530, 0x10563},
{0x10600, 0x10736}, {0x10740, 0x10755}, {0x10760, 0x10767}, {0x10800, 0x10805},
@@ -222,24 +222,26 @@ static const crange alphaRangeTable[] = {
{0x11305, 0x1130c}, {0x11313, 0x11328}, {0x1132a, 0x11330}, {0x11335, 0x11339},
{0x1135d, 0x11361}, {0x11400, 0x11434}, {0x11447, 0x1144a}, {0x11480, 0x114af},
{0x11580, 0x115ae}, {0x115d8, 0x115db}, {0x11600, 0x1162f}, {0x11680, 0x116aa},
{0x11700, 0x11719}, {0x118a0, 0x118df}, {0x11ac0, 0x11af8}, {0x11c00, 0x11c08},
{0x11c0a, 0x11c2e}, {0x11c72, 0x11c8f}, {0x12000, 0x12399}, {0x12480, 0x12543},
{0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
{0x16ad0, 0x16aed}, {0x16b00, 0x16b2f}, {0x16b40, 0x16b43}, {0x16b63, 0x16b77},
{0x16b7d, 0x16b8f}, {0x16f00, 0x16f44}, {0x16f93, 0x16f9f}, {0x17000, 0x187ec},
{0x18800, 0x18af2}, {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88},
{0x1bc90, 0x1bc99}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac},
{0x1d4ae, 0x1d4b9}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a},
{0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
{0x1d540, 0x1d544}, {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0},
{0x1d6c2, 0x1d6da}, {0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734},
{0x1d736, 0x1d74e}, {0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8},
{0x1d7aa, 0x1d7c2}, {0x1d7c4, 0x1d7cb}, {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943},
{0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37},
{0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77},
{0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3},
{0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734},
{0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2f800, 0x2fa1d}
{0x11700, 0x11719}, {0x118a0, 0x118df}, {0x11a0b, 0x11a32}, {0x11a5c, 0x11a83},
{0x11a86, 0x11a89}, {0x11ac0, 0x11af8}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c2e},
{0x11c72, 0x11c8f}, {0x11d00, 0x11d06}, {0x11d0b, 0x11d30}, {0x12000, 0x12399},
{0x12480, 0x12543}, {0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38},
{0x16a40, 0x16a5e}, {0x16ad0, 0x16aed}, {0x16b00, 0x16b2f}, {0x16b40, 0x16b43},
{0x16b63, 0x16b77}, {0x16b7d, 0x16b8f}, {0x16f00, 0x16f44}, {0x16f93, 0x16f9f},
{0x17000, 0x187ec}, {0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb},
{0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99},
{0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9},
{0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514},
{0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544},
{0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d6c0}, {0x1d6c2, 0x1d6da},
{0x1d6dc, 0x1d6fa}, {0x1d6fc, 0x1d714}, {0x1d716, 0x1d734}, {0x1d736, 0x1d74e},
{0x1d750, 0x1d76e}, {0x1d770, 0x1d788}, {0x1d78a, 0x1d7a8}, {0x1d7aa, 0x1d7c2},
{0x1d7c4, 0x1d7cb}, {0x1e800, 0x1e8c4}, {0x1e900, 0x1e943}, {0x1ee00, 0x1ee03},
{0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f},
{0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c},
{0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9},
{0x1eeab, 0x1eebb}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d},
{0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}
#endif
};
@@ -250,28 +252,29 @@ static const chr alphaCharTable[] = {
0x38c, 0x559, 0x66e, 0x66f, 0x6d5, 0x6e5, 0x6e6, 0x6ee, 0x6ef,
0x6ff, 0x710, 0x7b1, 0x7f4, 0x7f5, 0x7fa, 0x81a, 0x824, 0x828,
0x93d, 0x950, 0x98f, 0x990, 0x9b2, 0x9bd, 0x9ce, 0x9dc, 0x9dd,
0x9f0, 0x9f1, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36, 0xa38,
0xa39, 0xa5e, 0xab2, 0xab3, 0xabd, 0xad0, 0xae0, 0xae1, 0xaf9,
0xb0f, 0xb10, 0xb32, 0xb33, 0xb3d, 0xb5c, 0xb5d, 0xb71, 0xb83,
0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4, 0xbd0, 0xc3d,
0xc60, 0xc61, 0xc80, 0xcbd, 0xcde, 0xce0, 0xce1, 0xcf1, 0xcf2,
0xd3d, 0xd4e, 0xdbd, 0xe32, 0xe33, 0xe81, 0xe82, 0xe84, 0xe87,
0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xeb2, 0xeb3,
0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065, 0x1066, 0x108e, 0x10c7,
0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1bae, 0x1baf,
0x1cf5, 0x1cf6, 0x1f59, 0x1f5b, 0x1f5d, 0x1fbe, 0x2071, 0x207f, 0x2102,
0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e, 0x2183, 0x2184, 0x2cf2,
0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f, 0x3005, 0x3006, 0x303b, 0x303c,
0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa9cf, 0xaa7a, 0xaab1, 0xaab5, 0xaab6,
0xaac0, 0xaac2, 0xfb1d, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44
0x9f0, 0x9f1, 0x9fc, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36,
0xa38, 0xa39, 0xa5e, 0xab2, 0xab3, 0xabd, 0xad0, 0xae0, 0xae1,
0xaf9, 0xb0f, 0xb10, 0xb32, 0xb33, 0xb3d, 0xb5c, 0xb5d, 0xb71,
0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f, 0xba3, 0xba4, 0xbd0,
0xc3d, 0xc60, 0xc61, 0xc80, 0xcbd, 0xcde, 0xce0, 0xce1, 0xcf1,
0xcf2, 0xd3d, 0xd4e, 0xdbd, 0xe32, 0xe33, 0xe81, 0xe82, 0xe84,
0xe87, 0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab, 0xeb2,
0xeb3, 0xebd, 0xec6, 0xf00, 0x103f, 0x1061, 0x1065, 0x1066, 0x108e,
0x10c7, 0x10cd, 0x1258, 0x12c0, 0x17d7, 0x17dc, 0x18aa, 0x1aa7, 0x1bae,
0x1baf, 0x1cf5, 0x1cf6, 0x1f59, 0x1f5b, 0x1f5d, 0x1fbe, 0x2071, 0x207f,
0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214e, 0x2183, 0x2184,
0x2cf2, 0x2cf3, 0x2d27, 0x2d2d, 0x2d6f, 0x2e2f, 0x3005, 0x3006, 0x303b,
0x303c, 0xa62a, 0xa62b, 0xa8fb, 0xa8fd, 0xa9cf, 0xaa7a, 0xaab1, 0xaab5,
0xaab6, 0xaac0, 0xaac2, 0xfb1d, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44
#if TCL_UTF_MAX > 4
,0x1003c, 0x1003d, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4, 0x108f5, 0x109be,
0x109bf, 0x10a00, 0x11176, 0x111da, 0x111dc, 0x11288, 0x1130f, 0x11310, 0x11332,
0x11333, 0x1133d, 0x11350, 0x114c4, 0x114c5, 0x114c7, 0x11644, 0x118ff, 0x11c40,
0x16f50, 0x16fe0, 0x1b000, 0x1b001, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6,
0x1d4bb, 0x1d546, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39, 0x1ee3b, 0x1ee42,
0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57, 0x1ee59, 0x1ee5b,
0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e
0x11333, 0x1133d, 0x11350, 0x114c4, 0x114c5, 0x114c7, 0x11644, 0x118ff, 0x11a00,
0x11a3a, 0x11a50, 0x11c40, 0x11d08, 0x11d09, 0x11d46, 0x16f50, 0x16fe0, 0x16fe1,
0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1ee21, 0x1ee22,
0x1ee24, 0x1ee27, 0x1ee39, 0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51,
0x1ee52, 0x1ee54, 0x1ee57, 0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62,
0x1ee64, 0x1ee7e
#endif
};
@@ -321,8 +324,8 @@ static const crange digitRangeTable[] = {
,{0x104a0, 0x104a9}, {0x11066, 0x1106f}, {0x110f0, 0x110f9}, {0x11136, 0x1113f},
{0x111d0, 0x111d9}, {0x112f0, 0x112f9}, {0x11450, 0x11459}, {0x114d0, 0x114d9},
{0x11650, 0x11659}, {0x116c0, 0x116c9}, {0x11730, 0x11739}, {0x118e0, 0x118e9},
{0x11c50, 0x11c59}, {0x16a60, 0x16a69}, {0x16b50, 0x16b59}, {0x1d7ce, 0x1d7ff},
{0x1e950, 0x1e959}
{0x11c50, 0x11c59}, {0x11d50, 0x11d59}, {0x16a60, 0x16a69}, {0x16b50, 0x16b59},
{0x1d7ce, 0x1d7ff}, {0x1e950, 0x1e959}
#endif
};
@@ -345,7 +348,7 @@ static const crange punctRangeTable[] = {
{0x1b5a, 0x1b60}, {0x1bfc, 0x1bff}, {0x1c3b, 0x1c3f}, {0x1cc0, 0x1cc7},
{0x2010, 0x2027}, {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x205e},
{0x2308, 0x230b}, {0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998},
{0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e44},
{0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e49},
{0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0xa60d, 0xa60f},
{0xa6f2, 0xa6f7}, {0xa874, 0xa877}, {0xa8f8, 0xa8fa}, {0xa9c1, 0xa9cd},
{0xaa5c, 0xaa5f}, {0xfe10, 0xfe19}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61},
@@ -356,7 +359,8 @@ static const crange punctRangeTable[] = {
{0x10b99, 0x10b9c}, {0x11047, 0x1104d}, {0x110be, 0x110c1}, {0x11140, 0x11143},
{0x111c5, 0x111c9}, {0x111dd, 0x111df}, {0x11238, 0x1123d}, {0x1144b, 0x1144f},
{0x115c1, 0x115d7}, {0x11641, 0x11643}, {0x11660, 0x1166c}, {0x1173c, 0x1173e},
{0x11c41, 0x11c45}, {0x12470, 0x12474}, {0x16b37, 0x16b3b}, {0x1da87, 0x1da8b}
{0x11a3f, 0x11a46}, {0x11a9a, 0x11a9c}, {0x11a9e, 0x11aa2}, {0x11c41, 0x11c45},
{0x12470, 0x12474}, {0x16b37, 0x16b3b}, {0x1da87, 0x1da8b}
#endif
};
@@ -367,14 +371,14 @@ static const chr punctCharTable[] = {
0xab, 0xb6, 0xb7, 0xbb, 0xbf, 0x37e, 0x387, 0x589, 0x58a,
0x5be, 0x5c0, 0x5c3, 0x5c6, 0x5f3, 0x5f4, 0x609, 0x60a, 0x60c,
0x60d, 0x61b, 0x61e, 0x61f, 0x6d4, 0x85e, 0x964, 0x965, 0x970,
0xaf0, 0xdf4, 0xe4f, 0xe5a, 0xe5b, 0xf14, 0xf85, 0xfd9, 0xfda,
0x10fb, 0x1400, 0x166d, 0x166e, 0x169b, 0x169c, 0x1735, 0x1736, 0x1944,
0x1945, 0x1a1e, 0x1a1f, 0x1c7e, 0x1c7f, 0x1cd3, 0x207d, 0x207e, 0x208d,
0x208e, 0x2329, 0x232a, 0x27c5, 0x27c6, 0x29fc, 0x29fd, 0x2cfe, 0x2cff,
0x2d70, 0x3030, 0x303d, 0x30a0, 0x30fb, 0xa4fe, 0xa4ff, 0xa673, 0xa67e,
0xa8ce, 0xa8cf, 0xa8fc, 0xa92e, 0xa92f, 0xa95f, 0xa9de, 0xa9df, 0xaade,
0xaadf, 0xaaf0, 0xaaf1, 0xabeb, 0xfd3e, 0xfd3f, 0xfe63, 0xfe68, 0xfe6a,
0xfe6b, 0xff1a, 0xff1b, 0xff1f, 0xff20, 0xff3f, 0xff5b, 0xff5d
0x9fd, 0xaf0, 0xdf4, 0xe4f, 0xe5a, 0xe5b, 0xf14, 0xf85, 0xfd9,
0xfda, 0x10fb, 0x1400, 0x166d, 0x166e, 0x169b, 0x169c, 0x1735, 0x1736,
0x1944, 0x1945, 0x1a1e, 0x1a1f, 0x1c7e, 0x1c7f, 0x1cd3, 0x207d, 0x207e,
0x208d, 0x208e, 0x2329, 0x232a, 0x27c5, 0x27c6, 0x29fc, 0x29fd, 0x2cfe,
0x2cff, 0x2d70, 0x3030, 0x303d, 0x30a0, 0x30fb, 0xa4fe, 0xa4ff, 0xa673,
0xa67e, 0xa8ce, 0xa8cf, 0xa8fc, 0xa92e, 0xa92f, 0xa95f, 0xa9de, 0xa9df,
0xaade, 0xaadf, 0xaaf0, 0xaaf1, 0xabeb, 0xfd3e, 0xfd3f, 0xfe63, 0xfe68,
0xfe6a, 0xfe6b, 0xff1a, 0xff1b, 0xff1f, 0xff20, 0xff3f, 0xff5b, 0xff5d
#if TCL_UTF_MAX > 4
,0x1039f, 0x103d0, 0x1056f, 0x10857, 0x1091f, 0x1093f, 0x10a7f, 0x110bb, 0x110bc,
0x11174, 0x11175, 0x111cd, 0x111db, 0x112a9, 0x1145b, 0x1145d, 0x114c6, 0x11c70,
@@ -615,63 +619,63 @@ static const crange graphRangeTable[] = {
{0x559, 0x55f}, {0x561, 0x587}, {0x58d, 0x58f}, {0x591, 0x5c7},
{0x5d0, 0x5ea}, {0x5f0, 0x5f4}, {0x606, 0x61b}, {0x61e, 0x6dc},
{0x6de, 0x70d}, {0x710, 0x74a}, {0x74d, 0x7b1}, {0x7c0, 0x7fa},
{0x800, 0x82d}, {0x830, 0x83e}, {0x840, 0x85b}, {0x8a0, 0x8b4},
{0x8b6, 0x8bd}, {0x8d4, 0x8e1}, {0x8e3, 0x983}, {0x985, 0x98c},
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b6, 0x9b9}, {0x9bc, 0x9c4},
{0x9cb, 0x9ce}, {0x9df, 0x9e3}, {0x9e6, 0x9fb}, {0xa01, 0xa03},
{0xa05, 0xa0a}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa3e, 0xa42},
{0xa4b, 0xa4d}, {0xa59, 0xa5c}, {0xa66, 0xa75}, {0xa81, 0xa83},
{0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8}, {0xaaa, 0xab0},
{0xab5, 0xab9}, {0xabc, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd},
{0xae0, 0xae3}, {0xae6, 0xaf1}, {0xb01, 0xb03}, {0xb05, 0xb0c},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb3c, 0xb44},
{0xb4b, 0xb4d}, {0xb5f, 0xb63}, {0xb66, 0xb77}, {0xb85, 0xb8a},
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa}, {0xbae, 0xbb9},
{0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd}, {0xbe6, 0xbfa},
{0xc00, 0xc03}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
{0xc2a, 0xc39}, {0xc3d, 0xc44}, {0xc46, 0xc48}, {0xc4a, 0xc4d},
{0xc58, 0xc5a}, {0xc60, 0xc63}, {0xc66, 0xc6f}, {0xc78, 0xc83},
{0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3},
{0xcb5, 0xcb9}, {0xcbc, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd},
{0xce0, 0xce3}, {0xce6, 0xcef}, {0xd01, 0xd03}, {0xd05, 0xd0c},
{0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd3d, 0xd44}, {0xd46, 0xd48},
{0xd4a, 0xd4f}, {0xd54, 0xd63}, {0xd66, 0xd7f}, {0xd85, 0xd96},
{0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdc0, 0xdc6}, {0xdcf, 0xdd4},
{0xdd8, 0xddf}, {0xde6, 0xdef}, {0xdf2, 0xdf4}, {0xe01, 0xe3a},
{0xe3f, 0xe5b}, {0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3},
{0xead, 0xeb9}, {0xebb, 0xebd}, {0xec0, 0xec4}, {0xec8, 0xecd},
{0xed0, 0xed9}, {0xedc, 0xedf}, {0xf00, 0xf47}, {0xf49, 0xf6c},
{0xf71, 0xf97}, {0xf99, 0xfbc}, {0xfbe, 0xfcc}, {0xfce, 0xfda},
{0x1000, 0x10c5}, {0x10d0, 0x1248}, {0x124a, 0x124d}, {0x1250, 0x1256},
{0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d}, {0x1290, 0x12b0},
{0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5}, {0x12c8, 0x12d6},
{0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a}, {0x135d, 0x137c},
{0x1380, 0x1399}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd}, {0x1400, 0x167f},
{0x1681, 0x169c}, {0x16a0, 0x16f8}, {0x1700, 0x170c}, {0x170e, 0x1714},
{0x1720, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176c}, {0x176e, 0x1770},
{0x1780, 0x17dd}, {0x17e0, 0x17e9}, {0x17f0, 0x17f9}, {0x1800, 0x180d},
{0x1810, 0x1819}, {0x1820, 0x1877}, {0x1880, 0x18aa}, {0x18b0, 0x18f5},
{0x1900, 0x191e}, {0x1920, 0x192b}, {0x1930, 0x193b}, {0x1944, 0x196d},
{0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9}, {0x19d0, 0x19da},
{0x19de, 0x1a1b}, {0x1a1e, 0x1a5e}, {0x1a60, 0x1a7c}, {0x1a7f, 0x1a89},
{0x1a90, 0x1a99}, {0x1aa0, 0x1aad}, {0x1ab0, 0x1abe}, {0x1b00, 0x1b4b},
{0x1b50, 0x1b7c}, {0x1b80, 0x1bf3}, {0x1bfc, 0x1c37}, {0x1c3b, 0x1c49},
{0x1c4d, 0x1c88}, {0x1cc0, 0x1cc7}, {0x1cd0, 0x1cf6}, {0x1d00, 0x1df5},
{0x1dfb, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45}, {0x1f48, 0x1f4d},
{0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fc4},
{0x1fc6, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef}, {0x1ff2, 0x1ff4},
{0x1ff6, 0x1ffe}, {0x2010, 0x2027}, {0x2030, 0x205e}, {0x2074, 0x208e},
{0x2090, 0x209c}, {0x20a0, 0x20be}, {0x20d0, 0x20f0}, {0x2100, 0x218b},
{0x2190, 0x23fe}, {0x2400, 0x2426}, {0x2440, 0x244a}, {0x2460, 0x2b73},
{0x2b76, 0x2b95}, {0x2b98, 0x2bb9}, {0x2bbd, 0x2bc8}, {0x2bca, 0x2bd1},
{0x800, 0x82d}, {0x830, 0x83e}, {0x840, 0x85b}, {0x860, 0x86a},
{0x8a0, 0x8b4}, {0x8b6, 0x8bd}, {0x8d4, 0x8e1}, {0x8e3, 0x983},
{0x985, 0x98c}, {0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b6, 0x9b9},
{0x9bc, 0x9c4}, {0x9cb, 0x9ce}, {0x9df, 0x9e3}, {0x9e6, 0x9fd},
{0xa01, 0xa03}, {0xa05, 0xa0a}, {0xa13, 0xa28}, {0xa2a, 0xa30},
{0xa3e, 0xa42}, {0xa4b, 0xa4d}, {0xa59, 0xa5c}, {0xa66, 0xa75},
{0xa81, 0xa83}, {0xa85, 0xa8d}, {0xa8f, 0xa91}, {0xa93, 0xaa8},
{0xaaa, 0xab0}, {0xab5, 0xab9}, {0xabc, 0xac5}, {0xac7, 0xac9},
{0xacb, 0xacd}, {0xae0, 0xae3}, {0xae6, 0xaf1}, {0xaf9, 0xaff},
{0xb01, 0xb03}, {0xb05, 0xb0c}, {0xb13, 0xb28}, {0xb2a, 0xb30},
{0xb35, 0xb39}, {0xb3c, 0xb44}, {0xb4b, 0xb4d}, {0xb5f, 0xb63},
{0xb66, 0xb77}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95},
{0xba8, 0xbaa}, {0xbae, 0xbb9}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
{0xbca, 0xbcd}, {0xbe6, 0xbfa}, {0xc00, 0xc03}, {0xc05, 0xc0c},
{0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39}, {0xc3d, 0xc44},
{0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc58, 0xc5a}, {0xc60, 0xc63},
{0xc66, 0xc6f}, {0xc78, 0xc83}, {0xc85, 0xc8c}, {0xc8e, 0xc90},
{0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xcbc, 0xcc4},
{0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xce0, 0xce3}, {0xce6, 0xcef},
{0xd00, 0xd03}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd44},
{0xd46, 0xd48}, {0xd4a, 0xd4f}, {0xd54, 0xd63}, {0xd66, 0xd7f},
{0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, {0xdc0, 0xdc6},
{0xdcf, 0xdd4}, {0xdd8, 0xddf}, {0xde6, 0xdef}, {0xdf2, 0xdf4},
{0xe01, 0xe3a}, {0xe3f, 0xe5b}, {0xe94, 0xe97}, {0xe99, 0xe9f},
{0xea1, 0xea3}, {0xead, 0xeb9}, {0xebb, 0xebd}, {0xec0, 0xec4},
{0xec8, 0xecd}, {0xed0, 0xed9}, {0xedc, 0xedf}, {0xf00, 0xf47},
{0xf49, 0xf6c}, {0xf71, 0xf97}, {0xf99, 0xfbc}, {0xfbe, 0xfcc},
{0xfce, 0xfda}, {0x1000, 0x10c5}, {0x10d0, 0x1248}, {0x124a, 0x124d},
{0x1250, 0x1256}, {0x125a, 0x125d}, {0x1260, 0x1288}, {0x128a, 0x128d},
{0x1290, 0x12b0}, {0x12b2, 0x12b5}, {0x12b8, 0x12be}, {0x12c2, 0x12c5},
{0x12c8, 0x12d6}, {0x12d8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135a},
{0x135d, 0x137c}, {0x1380, 0x1399}, {0x13a0, 0x13f5}, {0x13f8, 0x13fd},
{0x1400, 0x167f}, {0x1681, 0x169c}, {0x16a0, 0x16f8}, {0x1700, 0x170c},
{0x170e, 0x1714}, {0x1720, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176c},
{0x176e, 0x1770}, {0x1780, 0x17dd}, {0x17e0, 0x17e9}, {0x17f0, 0x17f9},
{0x1800, 0x180d}, {0x1810, 0x1819}, {0x1820, 0x1877}, {0x1880, 0x18aa},
{0x18b0, 0x18f5}, {0x1900, 0x191e}, {0x1920, 0x192b}, {0x1930, 0x193b},
{0x1944, 0x196d}, {0x1970, 0x1974}, {0x1980, 0x19ab}, {0x19b0, 0x19c9},
{0x19d0, 0x19da}, {0x19de, 0x1a1b}, {0x1a1e, 0x1a5e}, {0x1a60, 0x1a7c},
{0x1a7f, 0x1a89}, {0x1a90, 0x1a99}, {0x1aa0, 0x1aad}, {0x1ab0, 0x1abe},
{0x1b00, 0x1b4b}, {0x1b50, 0x1b7c}, {0x1b80, 0x1bf3}, {0x1bfc, 0x1c37},
{0x1c3b, 0x1c49}, {0x1c4d, 0x1c88}, {0x1cc0, 0x1cc7}, {0x1cd0, 0x1cf9},
{0x1d00, 0x1df9}, {0x1dfb, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4},
{0x1fb6, 0x1fc4}, {0x1fc6, 0x1fd3}, {0x1fd6, 0x1fdb}, {0x1fdd, 0x1fef},
{0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffe}, {0x2010, 0x2027}, {0x2030, 0x205e},
{0x2074, 0x208e}, {0x2090, 0x209c}, {0x20a0, 0x20bf}, {0x20d0, 0x20f0},
{0x2100, 0x218b}, {0x2190, 0x2426}, {0x2440, 0x244a}, {0x2460, 0x2b73},
{0x2b76, 0x2b95}, {0x2b98, 0x2bb9}, {0x2bbd, 0x2bc8}, {0x2bca, 0x2bd2},
{0x2bec, 0x2bef}, {0x2c00, 0x2c2e}, {0x2c30, 0x2c5e}, {0x2c60, 0x2cf3},
{0x2cf9, 0x2d25}, {0x2d30, 0x2d67}, {0x2d7f, 0x2d96}, {0x2da0, 0x2da6},
{0x2da8, 0x2dae}, {0x2db0, 0x2db6}, {0x2db8, 0x2dbe}, {0x2dc0, 0x2dc6},
{0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e44},
{0x2dc8, 0x2dce}, {0x2dd0, 0x2dd6}, {0x2dd8, 0x2dde}, {0x2de0, 0x2e49},
{0x2e80, 0x2e99}, {0x2e9b, 0x2ef3}, {0x2f00, 0x2fd5}, {0x2ff0, 0x2ffb},
{0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312d},
{0x3001, 0x303f}, {0x3041, 0x3096}, {0x3099, 0x30ff}, {0x3105, 0x312e},
{0x3131, 0x318e}, {0x3190, 0x31ba}, {0x31c0, 0x31e3}, {0x31f0, 0x321e},
{0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fd5}, {0xa000, 0xa48c},
{0x3220, 0x32fe}, {0x3300, 0x4db5}, {0x4dc0, 0x9fea}, {0xa000, 0xa48c},
{0xa490, 0xa4c6}, {0xa4d0, 0xa62b}, {0xa640, 0xa6f7}, {0xa700, 0xa7ae},
{0xa7b0, 0xa7b7}, {0xa7f7, 0xa82b}, {0xa830, 0xa839}, {0xa840, 0xa877},
{0xa880, 0xa8c5}, {0xa8ce, 0xa8d9}, {0xa8e0, 0xa8fd}, {0xa900, 0xa953},
@@ -694,7 +698,7 @@ static const crange graphRangeTable[] = {
,{0x10000, 0x1000b}, {0x1000d, 0x10026}, {0x10028, 0x1003a}, {0x1003f, 0x1004d},
{0x10050, 0x1005d}, {0x10080, 0x100fa}, {0x10100, 0x10102}, {0x10107, 0x10133},
{0x10137, 0x1018e}, {0x10190, 0x1019b}, {0x101d0, 0x101fd}, {0x10280, 0x1029c},
{0x102a0, 0x102d0}, {0x102e0, 0x102fb}, {0x10300, 0x10323}, {0x10330, 0x1034a},
{0x102a0, 0x102d0}, {0x102e0, 0x102fb}, {0x10300, 0x10323}, {0x1032d, 0x1034a},
{0x10350, 0x1037a}, {0x10380, 0x1039d}, {0x1039f, 0x103c3}, {0x103c8, 0x103d5},
{0x10400, 0x1049d}, {0x104a0, 0x104a9}, {0x104b0, 0x104d3}, {0x104d8, 0x104fb},
{0x10500, 0x10527}, {0x10530, 0x10563}, {0x10600, 0x10736}, {0x10740, 0x10755},
@@ -717,35 +721,38 @@ static const crange graphRangeTable[] = {
{0x114d0, 0x114d9}, {0x11580, 0x115b5}, {0x115b8, 0x115dd}, {0x11600, 0x11644},
{0x11650, 0x11659}, {0x11660, 0x1166c}, {0x11680, 0x116b7}, {0x116c0, 0x116c9},
{0x11700, 0x11719}, {0x1171d, 0x1172b}, {0x11730, 0x1173f}, {0x118a0, 0x118f2},
{0x11a00, 0x11a47}, {0x11a50, 0x11a83}, {0x11a86, 0x11a9c}, {0x11a9e, 0x11aa2},
{0x11ac0, 0x11af8}, {0x11c00, 0x11c08}, {0x11c0a, 0x11c36}, {0x11c38, 0x11c45},
{0x11c50, 0x11c6c}, {0x11c70, 0x11c8f}, {0x11c92, 0x11ca7}, {0x11ca9, 0x11cb6},
{0x11d00, 0x11d06}, {0x11d0b, 0x11d36}, {0x11d3f, 0x11d47}, {0x11d50, 0x11d59},
{0x12000, 0x12399}, {0x12400, 0x1246e}, {0x12470, 0x12474}, {0x12480, 0x12543},
{0x13000, 0x1342e}, {0x14400, 0x14646}, {0x16800, 0x16a38}, {0x16a40, 0x16a5e},
{0x16a60, 0x16a69}, {0x16ad0, 0x16aed}, {0x16af0, 0x16af5}, {0x16b00, 0x16b45},
{0x16b50, 0x16b59}, {0x16b5b, 0x16b61}, {0x16b63, 0x16b77}, {0x16b7d, 0x16b8f},
{0x16f00, 0x16f44}, {0x16f50, 0x16f7e}, {0x16f8f, 0x16f9f}, {0x17000, 0x187ec},
{0x18800, 0x18af2}, {0x1bc00, 0x1bc6a}, {0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88},
{0x1bc90, 0x1bc99}, {0x1bc9c, 0x1bc9f}, {0x1d000, 0x1d0f5}, {0x1d100, 0x1d126},
{0x1d129, 0x1d172}, {0x1d17b, 0x1d1e8}, {0x1d200, 0x1d245}, {0x1d300, 0x1d356},
{0x1d360, 0x1d371}, {0x1d400, 0x1d454}, {0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac},
{0x1d4ae, 0x1d4b9}, {0x1d4bd, 0x1d4c3}, {0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a},
{0x1d50d, 0x1d514}, {0x1d516, 0x1d51c}, {0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e},
{0x1d540, 0x1d544}, {0x1d54a, 0x1d550}, {0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d7cb},
{0x1d7ce, 0x1da8b}, {0x1da9b, 0x1da9f}, {0x1daa1, 0x1daaf}, {0x1e000, 0x1e006},
{0x1e008, 0x1e018}, {0x1e01b, 0x1e021}, {0x1e026, 0x1e02a}, {0x1e800, 0x1e8c4},
{0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94a}, {0x1e950, 0x1e959}, {0x1ee00, 0x1ee03},
{0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32}, {0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f},
{0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72}, {0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c},
{0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b}, {0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9},
{0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b}, {0x1f030, 0x1f093}, {0x1f0a0, 0x1f0ae},
{0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf}, {0x1f0d1, 0x1f0f5}, {0x1f100, 0x1f10c},
{0x1f110, 0x1f12e}, {0x1f130, 0x1f16b}, {0x1f170, 0x1f1ac}, {0x1f1e6, 0x1f202},
{0x1f210, 0x1f23b}, {0x1f240, 0x1f248}, {0x1f300, 0x1f6d2}, {0x1f6e0, 0x1f6ec},
{0x1f6f0, 0x1f6f6}, {0x1f700, 0x1f773}, {0x1f780, 0x1f7d4}, {0x1f800, 0x1f80b},
{0x1f810, 0x1f847}, {0x1f850, 0x1f859}, {0x1f860, 0x1f887}, {0x1f890, 0x1f8ad},
{0x1f910, 0x1f91e}, {0x1f920, 0x1f927}, {0x1f933, 0x1f93e}, {0x1f940, 0x1f94b},
{0x1f950, 0x1f95e}, {0x1f980, 0x1f991}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734},
{0x2b740, 0x2b81d}, {0x2b820, 0x2cea1}, {0x2f800, 0x2fa1d}, {0xe0100, 0xe01ef}
{0x18800, 0x18af2}, {0x1b000, 0x1b11e}, {0x1b170, 0x1b2fb}, {0x1bc00, 0x1bc6a},
{0x1bc70, 0x1bc7c}, {0x1bc80, 0x1bc88}, {0x1bc90, 0x1bc99}, {0x1bc9c, 0x1bc9f},
{0x1d000, 0x1d0f5}, {0x1d100, 0x1d126}, {0x1d129, 0x1d172}, {0x1d17b, 0x1d1e8},
{0x1d200, 0x1d245}, {0x1d300, 0x1d356}, {0x1d360, 0x1d371}, {0x1d400, 0x1d454},
{0x1d456, 0x1d49c}, {0x1d4a9, 0x1d4ac}, {0x1d4ae, 0x1d4b9}, {0x1d4bd, 0x1d4c3},
{0x1d4c5, 0x1d505}, {0x1d507, 0x1d50a}, {0x1d50d, 0x1d514}, {0x1d516, 0x1d51c},
{0x1d51e, 0x1d539}, {0x1d53b, 0x1d53e}, {0x1d540, 0x1d544}, {0x1d54a, 0x1d550},
{0x1d552, 0x1d6a5}, {0x1d6a8, 0x1d7cb}, {0x1d7ce, 0x1da8b}, {0x1da9b, 0x1da9f},
{0x1daa1, 0x1daaf}, {0x1e000, 0x1e006}, {0x1e008, 0x1e018}, {0x1e01b, 0x1e021},
{0x1e026, 0x1e02a}, {0x1e800, 0x1e8c4}, {0x1e8c7, 0x1e8d6}, {0x1e900, 0x1e94a},
{0x1e950, 0x1e959}, {0x1ee00, 0x1ee03}, {0x1ee05, 0x1ee1f}, {0x1ee29, 0x1ee32},
{0x1ee34, 0x1ee37}, {0x1ee4d, 0x1ee4f}, {0x1ee67, 0x1ee6a}, {0x1ee6c, 0x1ee72},
{0x1ee74, 0x1ee77}, {0x1ee79, 0x1ee7c}, {0x1ee80, 0x1ee89}, {0x1ee8b, 0x1ee9b},
{0x1eea1, 0x1eea3}, {0x1eea5, 0x1eea9}, {0x1eeab, 0x1eebb}, {0x1f000, 0x1f02b},
{0x1f030, 0x1f093}, {0x1f0a0, 0x1f0ae}, {0x1f0b1, 0x1f0bf}, {0x1f0c1, 0x1f0cf},
{0x1f0d1, 0x1f0f5}, {0x1f100, 0x1f10c}, {0x1f110, 0x1f12e}, {0x1f130, 0x1f16b},
{0x1f170, 0x1f1ac}, {0x1f1e6, 0x1f202}, {0x1f210, 0x1f23b}, {0x1f240, 0x1f248},
{0x1f260, 0x1f265}, {0x1f300, 0x1f6d4}, {0x1f6e0, 0x1f6ec}, {0x1f6f0, 0x1f6f8},
{0x1f700, 0x1f773}, {0x1f780, 0x1f7d4}, {0x1f800, 0x1f80b}, {0x1f810, 0x1f847},
{0x1f850, 0x1f859}, {0x1f860, 0x1f887}, {0x1f890, 0x1f8ad}, {0x1f900, 0x1f90b},
{0x1f910, 0x1f93e}, {0x1f940, 0x1f94c}, {0x1f950, 0x1f96b}, {0x1f980, 0x1f997},
{0x1f9d0, 0x1f9e6}, {0x20000, 0x2a6d6}, {0x2a700, 0x2b734}, {0x2b740, 0x2b81d},
{0x2b820, 0x2cea1}, {0x2ceb0, 0x2ebe0}, {0x2f800, 0x2fa1d}, {0xe0100, 0xe01ef}
#endif
};
@@ -755,23 +762,23 @@ static const chr graphCharTable[] = {
0x38c, 0x589, 0x58a, 0x85e, 0x98f, 0x990, 0x9b2, 0x9c7, 0x9c8,
0x9d7, 0x9dc, 0x9dd, 0xa0f, 0xa10, 0xa32, 0xa33, 0xa35, 0xa36,
0xa38, 0xa39, 0xa3c, 0xa47, 0xa48, 0xa51, 0xa5e, 0xab2, 0xab3,
0xad0, 0xaf9, 0xb0f, 0xb10, 0xb32, 0xb33, 0xb47, 0xb48, 0xb56,
0xb57, 0xb5c, 0xb5d, 0xb82, 0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e,
0xb9f, 0xba3, 0xba4, 0xbd0, 0xbd7, 0xc55, 0xc56, 0xcd5, 0xcd6,
0xcde, 0xcf1, 0xcf2, 0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81,
0xe82, 0xe84, 0xe87, 0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa,
0xeab, 0xec6, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940,
0x1cf8, 0x1cf9, 0x1f59, 0x1f5b, 0x1f5d, 0x2070, 0x2071, 0x2d27, 0x2d2d,
0x2d6f, 0x2d70, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfffc, 0xfffd
0xad0, 0xb0f, 0xb10, 0xb32, 0xb33, 0xb47, 0xb48, 0xb56, 0xb57,
0xb5c, 0xb5d, 0xb82, 0xb83, 0xb99, 0xb9a, 0xb9c, 0xb9e, 0xb9f,
0xba3, 0xba4, 0xbd0, 0xbd7, 0xc55, 0xc56, 0xcd5, 0xcd6, 0xcde,
0xcf1, 0xcf2, 0xd82, 0xd83, 0xdbd, 0xdca, 0xdd6, 0xe81, 0xe82,
0xe84, 0xe87, 0xe88, 0xe8a, 0xe8d, 0xea5, 0xea7, 0xeaa, 0xeab,
0xec6, 0x10c7, 0x10cd, 0x1258, 0x12c0, 0x1772, 0x1773, 0x1940, 0x1f59,
0x1f5b, 0x1f5d, 0x2070, 0x2071, 0x2d27, 0x2d2d, 0x2d6f, 0x2d70, 0xfb3e,
0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfffc, 0xfffd
#if TCL_UTF_MAX > 4
,0x1003c, 0x1003d, 0x101a0, 0x1056f, 0x10808, 0x10837, 0x10838, 0x1083c, 0x108f4,
0x108f5, 0x1093f, 0x10a05, 0x10a06, 0x11288, 0x1130f, 0x11310, 0x11332, 0x11333,
0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x1145d, 0x118ff, 0x16a6e, 0x16a6f,
0x16fe0, 0x1b000, 0x1b001, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb,
0x1d546, 0x1e023, 0x1e024, 0x1e95e, 0x1e95f, 0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27,
0x1ee39, 0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49, 0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54,
0x1ee57, 0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f, 0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e,
0x1eef0, 0x1eef1, 0x1f250, 0x1f251, 0x1f930, 0x1f9c0
0x11347, 0x11348, 0x11350, 0x11357, 0x1145b, 0x1145d, 0x118ff, 0x11d08, 0x11d09,
0x11d3a, 0x11d3c, 0x11d3d, 0x16a6e, 0x16a6f, 0x16fe0, 0x16fe1, 0x1d49e, 0x1d49f,
0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4bb, 0x1d546, 0x1e023, 0x1e024, 0x1e95e, 0x1e95f,
0x1ee21, 0x1ee22, 0x1ee24, 0x1ee27, 0x1ee39, 0x1ee3b, 0x1ee42, 0x1ee47, 0x1ee49,
0x1ee4b, 0x1ee51, 0x1ee52, 0x1ee54, 0x1ee57, 0x1ee59, 0x1ee5b, 0x1ee5d, 0x1ee5f,
0x1ee61, 0x1ee62, 0x1ee64, 0x1ee7e, 0x1eef0, 0x1eef1, 0x1f250, 0x1f251, 0x1f9c0
#endif
};
+4 -5
View File
@@ -41,7 +41,6 @@ extern "C" {
* unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
* win/configure.in (as above)
* win/tcl.m4 (not patchlevel)
* win/makefile.bc (not patchlevel) 2 LOC
* README (sections 0 and 2, with and without separator)
* macosx/Tcl.pbproj/project.pbxproj (not patchlevel) 1 LOC
* macosx/Tcl.pbproj/default.pbxuser (not patchlevel) 1 LOC
@@ -56,10 +55,10 @@ extern "C" {
#define TCL_MAJOR_VERSION 8
#define TCL_MINOR_VERSION 6
#define TCL_RELEASE_LEVEL TCL_FINAL_RELEASE
#define TCL_RELEASE_SERIAL 6
#define TCL_RELEASE_SERIAL 7
#define TCL_VERSION "8.6"
#define TCL_PATCH_LEVEL "8.6.6"
#define TCL_PATCH_LEVEL "8.6.7"
/*
*----------------------------------------------------------------------------
@@ -373,8 +372,8 @@ typedef long LONG;
* we have one, we can have the other.)
*
* Also defines the following macros:
* TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a real
* 64-bit system.)
* TCL_WIDE_INT_IS_LONG - if wide ints are really longs (i.e. we're on a
* LP64 system such as modern Solaris or Linux ... not including Win64)
* Tcl_WideAsLong - forgetful converter from wideInt to long.
* Tcl_LongAsWide - sign-extending converter from long to wideInt.
* Tcl_WideAsDouble - converter from wideInt to double.
+20
View File
@@ -137,6 +137,8 @@ typedef enum TalInstType {
* ranges */
ASSEM_BOOL, /* One Boolean operand */
ASSEM_BOOL_LVT4, /* One Boolean, one 4-byte LVT ref. */
ASSEM_CLOCK_READ, /* 1-byte unsigned-integer case number, in the
* range 0-3 */
ASSEM_CONCAT1, /* 1-byte unsigned-integer operand count, must
* be strictly positive, consumes N, produces
* 1 */
@@ -350,6 +352,7 @@ static const TalInstDesc TalInstructionTable[] = {
{"bitnot", ASSEM_1BYTE, INST_BITNOT, 1, 1},
{"bitor", ASSEM_1BYTE, INST_BITOR, 2, 1},
{"bitxor", ASSEM_1BYTE, INST_BITXOR, 2, 1},
{"clockRead", ASSEM_CLOCK_READ, INST_CLOCK_READ, 0, 1},
{"concat", ASSEM_CONCAT1, INST_STR_CONCAT1, INT_MIN,1},
{"concatStk", ASSEM_LIST, INST_CONCAT_STK, INT_MIN,1},
{"coroName", ASSEM_1BYTE, INST_COROUTINE_NAME, 0, 1},
@@ -1363,6 +1366,23 @@ AssembleOneLine(
TclEmitInt4(localVar, envPtr);
break;
case ASSEM_CLOCK_READ:
if (parsePtr->numWords != 2) {
Tcl_WrongNumArgs(interp, 1, &instNameObj, "imm8");
goto cleanup;
}
if (GetIntegerOperand(assemEnvPtr, &tokenPtr, &opnd) != TCL_OK) {
goto cleanup;
}
if (opnd < 0 || opnd > 3) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("operand must be [0..3]", -1));
Tcl_SetErrorCode(interp, "TCL", "ASSEM", "OPERAND<0,>3", NULL);
goto cleanup;
}
BBEmitInstInt1(assemEnvPtr, tblIdx, opnd, opnd);
break;
case ASSEM_CONCAT1:
if (parsePtr->numWords != 2) {
Tcl_WrongNumArgs(interp, 1, &instNameObj, "imm8");
+146 -73
View File
@@ -265,7 +265,6 @@ static const CmdInfo builtInCmds[] = {
{"cd", Tcl_CdObjCmd, NULL, NULL, 0},
{"close", Tcl_CloseObjCmd, NULL, NULL, CMD_IS_SAFE},
{"eof", Tcl_EofObjCmd, NULL, NULL, CMD_IS_SAFE},
{"encoding", Tcl_EncodingObjCmd, NULL, NULL, 0},
{"exec", Tcl_ExecObjCmd, NULL, NULL, 0},
{"exit", Tcl_ExitObjCmd, NULL, NULL, 0},
{"fblocked", Tcl_FblockedObjCmd, NULL, NULL, CMD_IS_SAFE},
@@ -789,16 +788,17 @@ Tcl_CreateInterp(void)
}
/*
* Create the "array", "binary", "chan", "dict", "file", "info",
* "namespace" and "string" ensembles. Note that all these commands (and
* their subcommands that are not present in the global namespace) are
* wholly safe *except* for "file".
* Create the "array", "binary", "chan", "clock", "dict", "encoding",
* "file", "info", "namespace" and "string" ensembles. Note that all these
* commands (and their subcommands that are not present in the global
* namespace) are wholly safe *except* for "clock", "encoding" and "file".
*/
TclInitArrayCmd(interp);
TclInitBinaryCmd(interp);
TclInitChanCmd(interp);
TclInitDictCmd(interp);
TclInitEncodingCmd(interp);
TclInitFileCmd(interp);
TclInitInfoCmd(interp);
TclInitNamespaceCmd(interp);
@@ -1026,6 +1026,7 @@ TclHideUnsafeCommands(
Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name);
}
}
TclMakeEncodingCommandSafe(interp); /* Ugh! */
TclMakeFileCommandSafe(interp); /* Ugh! */
return TCL_OK;
}
@@ -2041,11 +2042,11 @@ Tcl_CreateCommand(
{
Interp *iPtr = (Interp *) interp;
ImportRef *oldRefPtr = NULL;
Namespace *nsPtr, *dummy1, *dummy2;
Command *cmdPtr, *refCmdPtr;
Namespace *nsPtr;
Command *cmdPtr;
Tcl_HashEntry *hPtr;
const char *tail;
int isNew;
int isNew = 0, deleted = 0;
ImportedCmdData *dataPtr;
if (iPtr->flags & DELETED) {
@@ -2058,32 +2059,52 @@ Tcl_CreateCommand(
}
/*
* Determine where the command should reside. If its name contains
* namespace qualifiers, we put it in the specified namespace; otherwise,
* we always put it in the global namespace.
* If the command name we seek to create already exists, we need to
* delete that first. That can be tricky in the presence of traces.
* Loop until we no longer find an existing command in the way, or
* until we've deleted one command and that didn't finish the job.
*/
if (strstr(cmdName, "::") != NULL) {
TclGetNamespaceForQualName(interp, cmdName, NULL,
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
if ((nsPtr == NULL) || (tail == NULL)) {
return (Tcl_Command) NULL;
}
} else {
nsPtr = iPtr->globalNsPtr;
tail = cmdName;
}
while (1) {
/*
* Determine where the command should reside. If its name contains
* namespace qualifiers, we put it in the specified namespace;
* otherwise, we always put it in the global namespace.
*/
if (strstr(cmdName, "::") != NULL) {
Namespace *dummy1, *dummy2;
TclGetNamespaceForQualName(interp, cmdName, NULL,
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
if ((nsPtr == NULL) || (tail == NULL)) {
return (Tcl_Command) NULL;
}
} else {
nsPtr = iPtr->globalNsPtr;
tail = cmdName;
}
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
if (isNew || deleted) {
/*
* isNew - No conflict with existing command.
* deleted - We've already deleted a conflicting command
*/
break;
}
/* An existing command conflicts. Try to delete it.. */
cmdPtr = Tcl_GetHashValue(hPtr);
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
if (!isNew) {
/*
* Command already exists. Delete the old one. Be careful to preserve
* Be careful to preserve
* any existing import links so we can restore them down below. That
* way, you can redefine a command and its import status will remain
* intact.
*/
cmdPtr = Tcl_GetHashValue(hPtr);
cmdPtr->refCount++;
if (cmdPtr->importRefPtr) {
cmdPtr->flags |= CMD_REDEF_IN_PROGRESS;
@@ -2096,18 +2117,21 @@ Tcl_CreateCommand(
cmdPtr->importRefPtr = NULL;
}
TclCleanupCommandMacro(cmdPtr);
deleted = 1;
}
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
if (!isNew) {
/*
* If the deletion callback recreated the command, just throw away
* the new command (if we try to delete it again, we could get
* stuck in an infinite loop).
*/
if (!isNew) {
/*
* If the deletion callback recreated the command, just throw away
* the new command (if we try to delete it again, we could get
* stuck in an infinite loop).
*/
ckfree(Tcl_GetHashValue(hPtr));
}
if (!deleted) {
ckfree(Tcl_GetHashValue(hPtr));
}
} else {
/*
* Command resolvers (per-interp, per-namespace) might have resolved
* to a command for the given namespace scope with this command not
@@ -2155,7 +2179,7 @@ Tcl_CreateCommand(
if (oldRefPtr != NULL) {
cmdPtr->importRefPtr = oldRefPtr;
while (oldRefPtr != NULL) {
refCmdPtr = oldRefPtr->importedCmdPtr;
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
dataPtr = refCmdPtr->objClientData;
dataPtr->realCmdPtr = cmdPtr;
oldRefPtr = oldRefPtr->nextPtr;
@@ -2216,11 +2240,11 @@ Tcl_CreateObjCommand(
{
Interp *iPtr = (Interp *) interp;
ImportRef *oldRefPtr = NULL;
Namespace *nsPtr, *dummy1, *dummy2;
Command *cmdPtr, *refCmdPtr;
Namespace *nsPtr;
Command *cmdPtr;
Tcl_HashEntry *hPtr;
const char *tail;
int isNew;
int isNew = 0, deleted = 0;
ImportedCmdData *dataPtr;
if (iPtr->flags & DELETED) {
@@ -2233,29 +2257,45 @@ Tcl_CreateObjCommand(
}
/*
* Determine where the command should reside. If its name contains
* namespace qualifiers, we put it in the specified namespace; otherwise,
* we always put it in the global namespace.
* If the command name we seek to create already exists, we need to
* delete that first. That can be tricky in the presence of traces.
* Loop until we no longer find an existing command in the way, or
* until we've deleted one command and that didn't finish the job.
*/
if (strstr(cmdName, "::") != NULL) {
TclGetNamespaceForQualName(interp, cmdName, NULL,
while (1) {
/*
* Determine where the command should reside. If its name contains
* namespace qualifiers, we put it in the specified namespace;
* otherwise, we always put it in the global namespace.
*/
if (strstr(cmdName, "::") != NULL) {
Namespace *dummy1, *dummy2;
TclGetNamespaceForQualName(interp, cmdName, NULL,
TCL_CREATE_NS_IF_UNKNOWN, &nsPtr, &dummy1, &dummy2, &tail);
if ((nsPtr == NULL) || (tail == NULL)) {
return (Tcl_Command) NULL;
}
} else {
nsPtr = iPtr->globalNsPtr;
tail = cmdName;
}
if ((nsPtr == NULL) || (tail == NULL)) {
return (Tcl_Command) NULL;
}
} else {
nsPtr = iPtr->globalNsPtr;
tail = cmdName;
}
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
TclInvalidateNsPath(nsPtr);
if (!isNew) {
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
if (isNew || deleted) {
/*
* isNew - No conflict with existing command.
* deleted - We've already deleted a conflicting command
*/
break;
}
/* An existing command conflicts. Try to delete it.. */
cmdPtr = Tcl_GetHashValue(hPtr);
/* Command already exists. */
/*
* [***] This is wrong. See Tcl Bug a16752c252.
* However, this buggy behavior is kept under particular
@@ -2292,18 +2332,20 @@ Tcl_CreateObjCommand(
cmdPtr->importRefPtr = NULL;
}
TclCleanupCommandMacro(cmdPtr);
deleted = 1;
}
hPtr = Tcl_CreateHashEntry(&nsPtr->cmdTable, tail, &isNew);
if (!isNew) {
/*
* If the deletion callback recreated the command, just throw away
* the new command (if we try to delete it again, we could get
* stuck in an infinite loop).
*/
if (!isNew) {
/*
* If the deletion callback recreated the command, just throw away
* the new command (if we try to delete it again, we could get
* stuck in an infinite loop).
*/
ckfree(Tcl_GetHashValue(hPtr));
}
} else {
ckfree(Tcl_GetHashValue(hPtr));
}
if (!deleted) {
/*
* Command resolvers (per-interp, per-namespace) might have resolved
* to a command for the given namespace scope with this command not
@@ -2323,6 +2365,7 @@ Tcl_CreateObjCommand(
*/
TclInvalidateNsCmdLookup(nsPtr);
TclInvalidateNsPath(nsPtr);
}
cmdPtr = ckalloc(sizeof(Command));
Tcl_SetHashValue(hPtr, cmdPtr);
@@ -2350,7 +2393,7 @@ Tcl_CreateObjCommand(
if (oldRefPtr != NULL) {
cmdPtr->importRefPtr = oldRefPtr;
while (oldRefPtr != NULL) {
refCmdPtr = oldRefPtr->importedCmdPtr;
Command *refCmdPtr = oldRefPtr->importedCmdPtr;
dataPtr = refCmdPtr->objClientData;
dataPtr->realCmdPtr = cmdPtr;
oldRefPtr = oldRefPtr->nextPtr;
@@ -3542,7 +3585,7 @@ OldMathFuncProc(
args[k].type = TCL_INT;
break;
}
if (Tcl_GetWideIntFromObj(interp, valuePtr, &args[k].wideValue)
if (TclGetWideIntFromObj(interp, valuePtr, &args[k].wideValue)
== TCL_OK) {
args[k].type = TCL_WIDE_INT;
break;
@@ -3568,7 +3611,7 @@ OldMathFuncProc(
return TCL_ERROR;
}
valuePtr = Tcl_GetObjResult(interp);
Tcl_GetWideIntFromObj(NULL, valuePtr, &args[k].wideValue);
TclGetWideIntFromObj(NULL, valuePtr, &args[k].wideValue);
Tcl_ResetResult(interp);
break;
}
@@ -7173,7 +7216,7 @@ ExprIsqrtFunc(
}
break;
default:
if (Tcl_GetWideIntFromObj(interp, objv[1], &w) != TCL_OK) {
if (TclGetWideIntFromObj(interp, objv[1], &w) != TCL_OK) {
return TCL_ERROR;
}
if (w < 0) {
@@ -7616,7 +7659,7 @@ ExprWideFunc(
return TCL_ERROR;
}
objPtr = Tcl_GetObjResult(interp);
if (Tcl_GetWideIntFromObj(NULL, objPtr, &wResult) != TCL_OK) {
if (TclGetWideIntFromObj(NULL, objPtr, &wResult) != TCL_OK) {
/*
* Truncate the bignum; keep only bits in wide int range.
*/
@@ -7627,7 +7670,7 @@ ExprWideFunc(
mp_mod_2d(&big, (int) CHAR_BIT * sizeof(Tcl_WideInt), &big);
objPtr = Tcl_NewBignumObj(&big);
Tcl_IncrRefCount(objPtr);
Tcl_GetWideIntFromObj(NULL, objPtr, &wResult);
TclGetWideIntFromObj(NULL, objPtr, &wResult);
Tcl_DecrRefCount(objPtr);
}
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(wResult));
@@ -8744,6 +8787,35 @@ TclNRCoroutineActivateCallback(
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* TclNREvalList --
*
* Callback to invoke command as list, used in order to delayed
* processing of canonical list command in sane environment.
*
*----------------------------------------------------------------------
*/
static int
TclNREvalList(
ClientData data[],
Tcl_Interp *interp,
int result)
{
int objc;
Tcl_Obj **objv;
Tcl_Obj *listPtr = data[0];
Tcl_IncrRefCount(listPtr);
TclMarkTailcall(interp);
TclNRAddCallback(interp, TclNRReleaseValues, listPtr, NULL, NULL,NULL);
TclListObjGetElements(NULL, listPtr, &objc, &objv);
return TclNREvalObjv(interp, objc, objv, 0, NULL);
}
/*
*----------------------------------------------------------------------
*
@@ -8798,7 +8870,8 @@ NRCoroInjectObjCmd(
*/
iPtr->execEnvPtr = corPtr->eePtr;
TclNREvalObjEx(interp, Tcl_NewListObj(objc-2, objv+2), 0, NULL, INT_MIN);
TclNRAddCallback(interp, TclNREvalList, Tcl_NewListObj(objc-2, objv+2),
NULL, NULL, NULL);
iPtr->execEnvPtr = savedEEPtr;
return TCL_OK;
+15 -7
View File
@@ -454,7 +454,7 @@ SetByteArrayFromAny(
const char *src, *srcEnd;
unsigned char *dst;
ByteArray *byteArrayPtr;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
if (objPtr->typePtr != &tclByteArrayType) {
src = TclGetStringFromObj(objPtr, &length);
@@ -462,7 +462,7 @@ SetByteArrayFromAny(
byteArrayPtr = ckalloc(BYTEARRAY_SIZE(length));
for (dst = byteArrayPtr->bytes; src < srcEnd; ) {
src += Tcl_UtfToUniChar(src, &ch);
src += TclUtfToUniChar(src, &ch);
*dst++ = UCHAR(ch);
}
@@ -1210,10 +1210,10 @@ BinaryFormatCmd(
badField:
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
char buf[TCL_UTF_MAX + 1];
Tcl_UtfToUniChar(errorString, &ch);
TclUtfToUniChar(errorString, &ch);
buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad field specifier \"%s\"", buf));
@@ -1580,10 +1580,10 @@ BinaryScanCmd(
badField:
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
char buf[TCL_UTF_MAX + 1];
Tcl_UtfToUniChar(errorString, &ch);
TclUtfToUniChar(errorString, &ch);
buf[Tcl_UniCharToUtf(ch, buf)] = '\0';
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"bad field specifier \"%s\"", buf));
@@ -1653,7 +1653,15 @@ GetFormatSpec(
(*formatPtr)++;
*countPtr = BINARY_ALL;
} else if (isdigit(UCHAR(**formatPtr))) { /* INTL: digit */
*countPtr = strtoul(*formatPtr, (char **) formatPtr, 10);
unsigned long int count;
errno = 0;
count = strtoul(*formatPtr, (char **) formatPtr, 10);
if (errno || (count > (unsigned long) INT_MAX)) {
*countPtr = INT_MAX;
} else {
*countPtr = (int) count;
}
} else {
*countPtr = BINARY_NOCOUNT;
}
+31 -20
View File
@@ -91,8 +91,8 @@ static const char *const literals[] = {
* Structure containing the client data for [clock]
*/
typedef struct ClockClientData {
int refCount; /* Number of live references. */
typedef struct {
size_t refCount; /* Number of live references. */
Tcl_Obj **literals; /* Pool of object literals. */
} ClockClientData;
@@ -208,11 +208,7 @@ struct ClockCommand {
};
static const struct ClockCommand clockCommands[] = {
{ "clicks", ClockClicksObjCmd },
{ "getenv", ClockGetenvObjCmd },
{ "microseconds", ClockMicrosecondsObjCmd },
{ "milliseconds", ClockMillisecondsObjCmd },
{ "seconds", ClockSecondsObjCmd },
{ "Oldscan", TclClockOldscanObjCmd },
{ "ConvertLocalToUTC", ClockConvertlocaltoutcObjCmd },
{ "GetDateFields", ClockGetdatefieldsObjCmd },
@@ -253,6 +249,19 @@ TclClockInit(
ClockClientData *data;
int i;
/* Structure of the 'clock' ensemble */
static const EnsembleImplMap clockImplMap[] = {
{"add", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
{"clicks", ClockClicksObjCmd, TclCompileClockClicksCmd, NULL, NULL, 0},
{"format", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL, 0},
{"microseconds", ClockMicrosecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(1), 0},
{"milliseconds", ClockMillisecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(2), 0},
{"scan", NULL, TclCompileBasicMin1ArgCmd, NULL, NULL , 0},
{"seconds", ClockSecondsObjCmd, TclCompileClockReadingCmd, NULL, INT2PTR(3), 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
/*
* Safe interps get [::clock] as alias to a master, so do not need their
* own copies of the support routines.
@@ -276,6 +285,7 @@ TclClockInit(
/*
* Install the commands.
* TODO - Let Tcl_MakeEnsemble do this?
*/
#define TCL_CLOCK_PREFIX_LEN 14 /* == strlen("::tcl::clock::") */
@@ -286,6 +296,10 @@ TclClockInit(
Tcl_CreateObjCommand(interp, cmdName, clockCmdPtr->objCmdProc, data,
ClockDeleteCmdProc);
}
/* Make the clock ensemble */
TclMakeEnsemble(interp, "clock", clockImplMap);
}
/*
@@ -349,7 +363,7 @@ ClockConvertlocaltoutcObjCmd(
"found in dictionary", -1));
return TCL_ERROR;
}
if ((Tcl_GetWideIntFromObj(interp, secondsObj,
if ((TclGetWideIntFromObj(interp, secondsObj,
&fields.localSeconds) != TCL_OK)
|| (TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK)
|| ConvertLocalToUTC(interp, &fields, objv[2], changeover)) {
@@ -428,7 +442,7 @@ ClockGetdatefieldsObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "seconds tzdata changeover");
return TCL_ERROR;
}
if (Tcl_GetWideIntFromObj(interp, objv[1], &fields.seconds) != TCL_OK
if (TclGetWideIntFromObj(interp, objv[1], &fields.seconds) != TCL_OK
|| TclGetIntFromObj(interp, objv[3], &changeover) != TCL_OK) {
return TCL_ERROR;
}
@@ -1134,7 +1148,7 @@ LookupLastTransition(
*/
if (Tcl_ListObjIndex(interp, rowv[0], 0, &compObj) != TCL_OK
|| Tcl_GetWideIntFromObj(interp, compObj, &compVal) != TCL_OK) {
|| TclGetWideIntFromObj(interp, compObj, &compVal) != TCL_OK) {
return NULL;
}
@@ -1157,7 +1171,7 @@ LookupLastTransition(
int m = (l + u + 1) / 2;
if (Tcl_ListObjIndex(interp, rowv[m], 0, &compObj) != TCL_OK ||
Tcl_GetWideIntFromObj(interp, compObj, &compVal) != TCL_OK) {
TclGetWideIntFromObj(interp, compObj, &compVal) != TCL_OK) {
return NULL;
}
if (tick >= compVal) {
@@ -1507,9 +1521,9 @@ GetJulianDayFromEraYearMonthDay(
* See above bug for details. The casts are necessary.
*/
if (ym1 >= 0)
ym1o4 = ym1 / 4;
ym1o4 = ym1 / 4;
else {
ym1o4 = - (int) (((unsigned int) -ym1) / 4);
ym1o4 = - (int) (((unsigned int) -ym1) / 4);
}
#endif
if (ym1 % 4 < 0) {
@@ -1564,12 +1578,10 @@ static int
IsGregorianLeapYear(
TclDateFields *fields) /* Date to test */
{
int year;
int year = fields->year;
if (fields->era == BCE) {
year = 1 - fields->year;
} else {
year = fields->year;
year = 1 - year;
}
if (year%4 != 0) {
return 0;
@@ -1680,7 +1692,7 @@ ThreadSafeLocalTime(
* Get a thread-local buffer to hold the returned time.
*/
struct tm *tmPtr = Tcl_GetThreadData(&tmKey, (int) sizeof(struct tm));
struct tm *tmPtr = Tcl_GetThreadData(&tmKey, sizeof(struct tm));
#ifdef HAVE_LOCALTIME_R
localtime_r(timePtr, tmPtr);
#else
@@ -1936,7 +1948,7 @@ ClockParseformatargsObjCmd(
* Check options.
*/
if (Tcl_GetWideIntFromObj(interp, objv[1], &clockVal) != TCL_OK) {
if (TclGetWideIntFromObj(interp, objv[1], &clockVal) != TCL_OK) {
return TCL_ERROR;
}
if ((saw & (1 << CLOCK_FORMAT_GMT))
@@ -2060,8 +2072,7 @@ ClockDeleteCmdProc(
ClockClientData *data = clientData;
int i;
data->refCount--;
if (data->refCount == 0) {
if (data->refCount-- <= 1) {
for (i = 0; i < LIT__END; ++i) {
Tcl_DecrRefCount(data->literals[i]);
}
+349 -71
View File
@@ -46,9 +46,24 @@ struct ForeachState {
static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr,
int mode);
static int BadEncodingSubcommand(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static int EncodingConvertfromObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static int EncodingConverttoObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static int EncodingDirsObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static int EncodingNamesObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static int EncodingSystemObjCmd(ClientData dummy,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
static inline int ForeachAssignments(Tcl_Interp *interp,
struct ForeachState *statePtr);
static inline void ForeachCleanup(Tcl_Interp *interp,
@@ -541,81 +556,282 @@ Tcl_EncodingObjCmd(
switch ((enum options) index) {
case ENC_CONVERTTO:
case ENC_CONVERTFROM: {
Tcl_Obj *data;
Tcl_DString ds;
Tcl_Encoding encoding;
int length;
const char *stringPtr;
if (objc == 3) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[2];
} else if (objc == 4) {
if (Tcl_GetEncodingFromObj(interp, objv[2], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[3];
} else {
Tcl_WrongNumArgs(interp, 2, objv, "?encoding? data");
return TCL_ERROR;
}
if ((enum options) index == ENC_CONVERTFROM) {
/*
* Treat the string as binary data.
*/
stringPtr = (char *) Tcl_GetByteArrayFromObj(data, &length);
Tcl_ExternalToUtfDString(encoding, stringPtr, length, &ds);
/*
* Note that we cannot use Tcl_DStringResult here because it will
* truncate the string at the first null byte.
*/
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
} else {
/*
* Store the result as binary data.
*/
stringPtr = TclGetStringFromObj(data, &length);
Tcl_UtfToExternalDString(encoding, stringPtr, length, &ds);
Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(
(unsigned char *) Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds)));
Tcl_DStringFree(&ds);
}
Tcl_FreeEncoding(encoding);
break;
}
return EncodingConverttoObjCmd(dummy, interp, objc, objv);
case ENC_CONVERTFROM:
return EncodingConvertfromObjCmd(dummy, interp, objc, objv);
case ENC_DIRS:
return EncodingDirsObjCmd(dummy, interp, objc, objv);
case ENC_NAMES:
if (objc > 2) {
Tcl_WrongNumArgs(interp, 2, objv, NULL);
return TCL_ERROR;
}
Tcl_GetEncodingNames(interp);
break;
return EncodingNamesObjCmd(dummy, interp, objc, objv);
case ENC_SYSTEM:
if (objc > 3) {
Tcl_WrongNumArgs(interp, 2, objv, "?encoding?");
return TCL_ERROR;
}
if (objc == 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
Tcl_GetEncodingName(NULL), -1));
} else {
return Tcl_SetSystemEncoding(interp, TclGetString(objv[2]));
}
break;
return EncodingSystemObjCmd(dummy, interp, objc, objv);
}
return TCL_OK;
}
/*
*-----------------------------------------------------------------------------
*
* TclInitEncodingCmd --
*
* This function creates the 'encoding' ensemble.
*
* Results:
* Returns the Tcl_Command so created.
*
* Side effects:
* The ensemble is initialized.
*
* This command is hidden in a safe interpreter.
*/
Tcl_Command
TclInitEncodingCmd(
Tcl_Interp* interp) /* Tcl interpreter */
{
static const EnsembleImplMap encodingImplMap[] = {
{"convertfrom", EncodingConvertfromObjCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0},
{"convertto", EncodingConverttoObjCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0},
{"dirs", EncodingDirsObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 0},
{"names", EncodingNamesObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 0},
{"system", EncodingSystemObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 0},
{NULL, NULL, NULL, NULL, NULL, 0}
};
return TclMakeEnsemble(interp, "encoding", encodingImplMap);
}
/*
*-----------------------------------------------------------------------------
*
* TclMakeEncodingCommandSafe --
*
* This function hides the unsafe 'dirs' and 'system' subcommands of
* the "encoding" Tcl command ensemble. It must be called only from
* TclHideUnsafeCommands.
*
* Results:
* A standard Tcl result
*
* Side effects:
* Adds commands to the table of hidden commands.
*
*-----------------------------------------------------------------------------
*/
int
TclMakeEncodingCommandSafe(
Tcl_Interp* interp) /* Tcl interpreter */
{
static const struct {
const char *cmdName;
int unsafe;
} unsafeInfo[] = {
{"convertfrom", 0},
{"convertto", 0},
{"dirs", 1},
{"names", 0},
{"system", 0},
{NULL, 0}
};
int i;
Tcl_DString oldBuf, newBuf;
Tcl_DStringInit(&oldBuf);
TclDStringAppendLiteral(&oldBuf, "::tcl::encoding::");
Tcl_DStringInit(&newBuf);
TclDStringAppendLiteral(&newBuf, "tcl:encoding:");
for (i=0 ; unsafeInfo[i].cmdName != NULL ; i++) {
if (unsafeInfo[i].unsafe) {
const char *oldName, *newName;
Tcl_DStringSetLength(&oldBuf, 17);
oldName = Tcl_DStringAppend(&oldBuf, unsafeInfo[i].cmdName, -1);
Tcl_DStringSetLength(&newBuf, 13);
newName = Tcl_DStringAppend(&newBuf, unsafeInfo[i].cmdName, -1);
if (TclRenameCommand(interp, oldName, "___tmp") != TCL_OK
|| Tcl_HideCommand(interp, "___tmp", newName) != TCL_OK) {
Tcl_Panic("problem making 'encoding %s' safe: %s",
unsafeInfo[i].cmdName,
Tcl_GetString(Tcl_GetObjResult(interp)));
}
Tcl_CreateObjCommand(interp, oldName, BadEncodingSubcommand,
(ClientData) unsafeInfo[i].cmdName, NULL);
}
}
Tcl_DStringFree(&oldBuf);
Tcl_DStringFree(&newBuf);
/*
* Ugh. The [encoding] command is now actually safe, but it is assumed by
* scripts that it is not, which messes up security policies.
*/
if (Tcl_HideCommand(interp, "encoding", "encoding") != TCL_OK) {
Tcl_Panic("problem making 'encoding' safe: %s",
Tcl_GetString(Tcl_GetObjResult(interp)));
}
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* BadEncodingSubcommand --
*
* Command used to act as a backstop implementation when subcommands of
* "encoding" are unsafe (the real implementations of the subcommands are
* hidden). The clientData is always the full official subcommand name.
*
* Results:
* A standard Tcl result (always a TCL_ERROR).
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
static int
BadEncodingSubcommand(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
const char *subcommandName = (const char *) clientData;
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"not allowed to invoke subcommand %s of encoding", subcommandName));
Tcl_SetErrorCode(interp, "TCL", "SAFE", "SUBCOMMAND", NULL);
return TCL_ERROR;
}
/*
*----------------------------------------------------------------------
*
* EncodingConvertfromObjCmd --
*
* This command converts a byte array in an external encoding into a
* Tcl string
*
* Results:
* A standard Tcl result.
*
*----------------------------------------------------------------------
*/
int
EncodingConvertfromObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* Byte array to convert */
Tcl_DString ds; /* Buffer to hold the string */
Tcl_Encoding encoding; /* Encoding to use */
int length; /* Length of the byte array being converted */
const char *bytesPtr; /* Pointer to the first byte of the array */
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else {
Tcl_WrongNumArgs(interp, 1, objv, "?encoding? data");
return TCL_ERROR;
}
/*
* Convert the string into a byte array in 'ds'
*/
bytesPtr = (char *) Tcl_GetByteArrayFromObj(data, &length);
Tcl_ExternalToUtfDString(encoding, bytesPtr, length, &ds);
/*
* Note that we cannot use Tcl_DStringResult here because it will
* truncate the string at the first null byte.
*/
Tcl_SetObjResult(interp, TclDStringToObj(&ds));
/*
* We're done with the encoding
*/
Tcl_FreeEncoding(encoding);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* EncodingConverttoObjCmd --
*
* This command converts a Tcl string into a byte array that
* encodes the string according to some encoding.
*
* Results:
* A standard Tcl result.
*
*----------------------------------------------------------------------
*/
int
EncodingConverttoObjCmd(
ClientData dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_Obj *data; /* String to convert */
Tcl_DString ds; /* Buffer to hold the byte array */
Tcl_Encoding encoding; /* Encoding to use */
int length; /* Length of the string being converted */
const char *stringPtr; /* Pointer to the first byte of the string */
/* TODO - ADJUST OBJ INDICES WHEN ENSEMBLIFYING THIS */
if (objc == 2) {
encoding = Tcl_GetEncoding(interp, NULL);
data = objv[1];
} else if (objc == 3) {
if (Tcl_GetEncodingFromObj(interp, objv[1], &encoding) != TCL_OK) {
return TCL_ERROR;
}
data = objv[2];
} else {
Tcl_WrongNumArgs(interp, 1, objv, "?encoding? data");
return TCL_ERROR;
}
/*
* Convert the string to a byte array in 'ds'
*/
stringPtr = TclGetStringFromObj(data, &length);
Tcl_UtfToExternalDString(encoding, stringPtr, length, &ds);
Tcl_SetObjResult(interp,
Tcl_NewByteArrayObj((unsigned char*) Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds)));
Tcl_DStringFree(&ds);
/*
* We're done with the encoding
*/
Tcl_FreeEncoding(encoding);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
@@ -641,16 +857,16 @@ EncodingDirsObjCmd(
{
Tcl_Obj *dirListObj;
if (objc > 3) {
Tcl_WrongNumArgs(interp, 2, objv, "?dirList?");
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?dirList?");
return TCL_ERROR;
}
if (objc == 2) {
if (objc == 1) {
Tcl_SetObjResult(interp, Tcl_GetEncodingSearchPath());
return TCL_OK;
}
dirListObj = objv[2];
dirListObj = objv[1];
if (Tcl_SetEncodingSearchPath(dirListObj) == TCL_ERROR) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"expected directory list but got \"%s\"",
@@ -663,6 +879,68 @@ EncodingDirsObjCmd(
return TCL_OK;
}
/*
*-----------------------------------------------------------------------------
*
* EncodingNamesObjCmd --
*
* This command returns a list of the available encoding names
*
* Results:
* Returns a standard Tcl result
*
*-----------------------------------------------------------------------------
*/
int
EncodingNamesObjCmd(ClientData dummy, /* Unused */
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 1) {
Tcl_WrongNumArgs(interp, 1, objv, NULL);
return TCL_ERROR;
}
Tcl_GetEncodingNames(interp);
return TCL_OK;
}
/*
*-----------------------------------------------------------------------------
*
* EncodingSystemObjCmd --
*
* This command retrieves or changes the system encoding
*
* Results:
* Returns a standard Tcl result
*
* Side effects:
* May change the system encoding.
*
*-----------------------------------------------------------------------------
*/
int
EncodingSystemObjCmd(ClientData dummy, /* Unused */
Tcl_Interp* interp, /* Tcl interpreter */
int objc, /* Number of command line args */
Tcl_Obj* const objv[]) /* Vector of command line args */
{
if (objc > 2) {
Tcl_WrongNumArgs(interp, 1, objv, "?encoding?");
return TCL_ERROR;
}
if (objc == 1) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj(Tcl_GetEncodingName(NULL), -1));
} else {
return Tcl_SetSystemEncoding(interp, TclGetString(objv[1]));
}
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
+21 -22
View File
@@ -3657,7 +3657,7 @@ Tcl_LsortObjCmd(
int sortMode = SORTMODE_ASCII;
int group, groupSize, groupOffset, idx, allocatedIndexVector = 0;
Tcl_Obj *resultPtr, *cmdPtr, **listObjPtrs, *listObj, *indexPtr;
SortElement *elementArray, *elementPtr;
SortElement *elementArray = NULL, *elementPtr;
SortInfo sortInfo; /* Information about this sort that needs to
* be passed to the comparison function. */
# define NUM_LISTS 30
@@ -3703,7 +3703,7 @@ Tcl_LsortObjCmd(
if (Tcl_GetIndexFromObj(interp, objv[i], switches, "option", 0,
&index) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
switch ((enum Lsort_Switches) index) {
case LSORT_ASCII:
@@ -3716,7 +3716,7 @@ Tcl_LsortObjCmd(
"by comparison command", -1));
Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL);
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
sortInfo.sortMode = SORTMODE_COMMAND;
cmdPtr = objv[i+1];
@@ -3741,12 +3741,12 @@ Tcl_LsortObjCmd(
-1));
Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL);
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
if (TclListObjGetElements(interp, objv[i+1], &indexc,
&indexv) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
/*
@@ -3763,7 +3763,7 @@ Tcl_LsortObjCmd(
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (-index option item number %d)", j));
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
}
indexPtr = objv[i+1];
@@ -3792,11 +3792,11 @@ Tcl_LsortObjCmd(
"followed by stride length", -1));
Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL);
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
if (Tcl_GetIntFromObj(interp, objv[i+1], &groupSize) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
if (groupSize < 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -3804,7 +3804,7 @@ Tcl_LsortObjCmd(
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT",
"BADSTRIDE", NULL);
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
group = 1;
i++;
@@ -3859,7 +3859,7 @@ Tcl_LsortObjCmd(
listObj = TclListObjCopy(interp, listObj);
if (listObj == NULL) {
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
/*
@@ -3877,7 +3877,7 @@ Tcl_LsortObjCmd(
Tcl_IncrRefCount(newObjPtr);
TclDecrRefCount(newObjPtr);
sortInfo.resultCode = TCL_ERROR;
goto done2;
goto done;
}
Tcl_ListObjAppendElement(interp, newCommandPtr, Tcl_NewObj());
sortInfo.compareCmdPtr = newCommandPtr;
@@ -3970,7 +3970,7 @@ Tcl_LsortObjCmd(
* begins sorting it into the sublists as it appears.
*/
elementArray = TclStackAlloc(interp, length * sizeof(SortElement));
elementArray = ckalloc(length * sizeof(SortElement));
for (i=0; i < length; i++){
idx = groupSize * i + groupOffset;
@@ -3980,7 +3980,7 @@ Tcl_LsortObjCmd(
*/
indexPtr = SelectObjFromSublist(listObjPtrs[idx], &sortInfo);
if (sortInfo.resultCode != TCL_OK) {
goto done1;
goto done;
}
} else {
indexPtr = listObjPtrs[idx];
@@ -3997,7 +3997,7 @@ Tcl_LsortObjCmd(
if (TclGetWideIntFromObj(sortInfo.interp, indexPtr, &a) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done1;
goto done;
}
elementArray[i].collationKey.wideValue = a;
} else if (sortMode == SORTMODE_REAL) {
@@ -4006,7 +4006,7 @@ Tcl_LsortObjCmd(
if (Tcl_GetDoubleFromObj(sortInfo.interp, indexPtr,
&a) != TCL_OK) {
sortInfo.resultCode = TCL_ERROR;
goto done1;
goto done;
}
elementArray[i].collationKey.doubleValue = a;
} else {
@@ -4093,19 +4093,18 @@ Tcl_LsortObjCmd(
Tcl_SetObjResult(interp, resultPtr);
}
done1:
TclStackFree(interp, elementArray);
done:
if (sortMode == SORTMODE_COMMAND) {
TclDecrRefCount(sortInfo.compareCmdPtr);
TclDecrRefCount(listObj);
sortInfo.compareCmdPtr = NULL;
}
done2:
if (allocatedIndexVector) {
TclStackFree(interp, sortInfo.indexv);
}
if (elementArray) {
ckfree(elementArray);
}
return sortInfo.resultCode;
}
@@ -4346,7 +4345,7 @@ static int
DictionaryCompare(
const char *left, const char *right) /* The strings to compare. */
{
Tcl_UniChar uniLeft, uniRight, uniLeftLower, uniRightLower;
Tcl_UniChar uniLeft = 0, uniRight = 0, uniLeftLower, uniRightLower;
int diff, zeros;
int secondaryDiff = 0;
@@ -4415,8 +4414,8 @@ DictionaryCompare(
*/
if ((*left != '\0') && (*right != '\0')) {
left += Tcl_UtfToUniChar(left, &uniLeft);
right += Tcl_UtfToUniChar(right, &uniRight);
left += TclUtfToUniChar(left, &uniLeft);
right += TclUtfToUniChar(right, &uniRight);
/*
* Convert both chars to lower for the comparison, because
+6 -6
View File
@@ -1037,7 +1037,7 @@ Tcl_SplitObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int len;
const char *splitChars;
const char *stringPtr;
@@ -1122,7 +1122,7 @@ Tcl_SplitObjCmd(
} else {
const char *element, *p, *splitEnd;
int splitLen;
Tcl_UniChar splitChar;
Tcl_UniChar splitChar = 0;
/*
* Normal case: split on any of a given set of characters. Discard
@@ -1451,7 +1451,7 @@ StringIsCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
const char *string1, *end, *stop;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int (*chcomp)(int) = NULL; /* The UniChar comparison function. */
int i, failat = 0, result = 1, strict = 0, index, length1, length2;
Tcl_Obj *objPtr, *failVarObj = NULL;
@@ -1646,7 +1646,7 @@ StringIsCmd(
}
break;
case STR_IS_WIDE:
if (TCL_OK == Tcl_GetWideIntFromObj(NULL, objPtr, &w)) {
if (TCL_OK == TclGetWideIntFromObj(NULL, objPtr, &w)) {
break;
}
@@ -2436,7 +2436,7 @@ StringStartCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
const char *p, *string;
int cur, index, length, numChars;
@@ -2497,7 +2497,7 @@ StringEndCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
const char *p, *end, *string;
int cur, index, length, numChars;
+99
View File
@@ -734,6 +734,105 @@ TclCompileCatchCmd(
return TCL_OK;
}
/*----------------------------------------------------------------------
*
* TclCompileClockClicksCmd --
*
* Procedure called to compile the "tcl::clock::clicks" command.
*
* Results:
* Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
* evaluation to run time.
*
* Side effects:
* Instructions are added to envPtr to execute the "clock clicks"
* command at runtime.
*
*----------------------------------------------------------------------
*/
int
TclCompileClockClicksCmd(
Tcl_Interp* interp, /* Tcl interpreter */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
Tcl_Token* tokenPtr;
switch (parsePtr->numWords) {
case 1:
/*
* No args
*/
TclEmitInstInt1(INST_CLOCK_READ, 0, envPtr);
break;
case 2:
/*
* -milliseconds or -microseconds
*/
tokenPtr = TokenAfter(parsePtr->tokenPtr);
if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD
|| tokenPtr[1].size < 4
|| tokenPtr[1].size > 13) {
return TCL_ERROR;
} else if (!strncmp(tokenPtr[1].start, "-microseconds",
tokenPtr[1].size)) {
TclEmitInstInt1(INST_CLOCK_READ, 1, envPtr);
break;
} else if (!strncmp(tokenPtr[1].start, "-milliseconds",
tokenPtr[1].size)) {
TclEmitInstInt1(INST_CLOCK_READ, 2, envPtr);
break;
} else {
return TCL_ERROR;
}
default:
return TCL_ERROR;
}
return TCL_OK;
}
/*----------------------------------------------------------------------
*
* TclCompileClockReadingCmd --
*
* Procedure called to compile the "tcl::clock::microseconds",
* "tcl::clock::milliseconds" and "tcl::clock::seconds" commands.
*
* Results:
* Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
* evaluation to run time.
*
* Side effects:
* Instructions are added to envPtr to execute the "clock clicks"
* command at runtime.
*
* Client data is 1 for microseconds, 2 for milliseconds, 3 for seconds.
*----------------------------------------------------------------------
*/
int
TclCompileClockReadingCmd(
Tcl_Interp* interp, /* Tcl interpreter */
Tcl_Parse *parsePtr, /* Points to a parse structure for the command
* created by Tcl_ParseCommand. */
Command *cmdPtr, /* Points to defintion of command being
* compiled. */
CompileEnv *envPtr) /* Holds resulting instructions. */
{
if (parsePtr->numWords != 1) {
return TCL_ERROR;
}
TclEmitInstInt1(INST_CLOCK_READ, PTR2INT(cmdPtr->objClientData), envPtr);
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
+3 -3
View File
@@ -1885,7 +1885,7 @@ ParseLexeme(
{
const char *end;
int scanned;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
Tcl_Obj *literal = NULL;
unsigned char byte;
@@ -2064,13 +2064,13 @@ ParseLexeme(
if (!TclIsBareword(*start) || *start == '_') {
if (Tcl_UtfCharComplete(start, numBytes)) {
scanned = Tcl_UtfToUniChar(start, &ch);
scanned = TclUtfToUniChar(start, &ch);
} else {
char utfBytes[TCL_UTF_MAX];
memcpy(utfBytes, start, (size_t) numBytes);
utfBytes[numBytes] = '\0';
scanned = Tcl_UtfToUniChar(utfBytes, &ch);
scanned = TclUtfToUniChar(utfBytes, &ch);
}
*lexemePtr = INVALID;
Tcl_DecrRefCount(literal);
+5
View File
@@ -654,6 +654,11 @@ InstructionDesc const tclInstructionTable[] = {
/* Lappend list to general variable.
* Stack: ... varName list => ... listVarContents */
{"clockRead", 2, +1, 1, {OPERAND_UINT1}},
/* Read clock out to the stack. Operand is which clock to read
* 0=clicks, 1=microseconds, 2=milliseconds, 3=seconds.
* Stack: ... => ... time */
{NULL, 0, 0, 0, {OPERAND_NONE}}
};
+15 -13
View File
@@ -821,8 +821,10 @@ typedef struct ByteCode {
#define INST_LAPPEND_LIST_ARRAY_STK 187
#define INST_LAPPEND_LIST_STK 188
#define INST_CLOCK_READ 189
/* The last opcode */
#define LAST_INST_OPCODE 188
#define LAST_INST_OPCODE 189
/*
* Table describing the Tcl bytecode instructions: their name (for displaying
@@ -1259,10 +1261,10 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define TclCheckStackDepth(depth, envPtr) \
do { \
int dd = (depth); \
if (dd != (envPtr)->currStackDepth) { \
int _dd = (depth); \
if (_dd != (envPtr)->currStackDepth) { \
Tcl_Panic("bad stack depth computations: is %i, should be %i", \
(envPtr)->currStackDepth, dd); \
(envPtr)->currStackDepth, _dd); \
} \
} while (0)
@@ -1278,12 +1280,12 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define TclUpdateStackReqs(op, i, envPtr) \
do { \
int delta = tclInstructionTable[(op)].stackEffect; \
if (delta) { \
if (delta == INT_MIN) { \
delta = 1 - (i); \
int _delta = tclInstructionTable[(op)].stackEffect; \
if (_delta) { \
if (_delta == INT_MIN) { \
_delta = 1 - (i); \
} \
TclAdjustStackDepth(delta, envPtr); \
TclAdjustStackDepth(_delta, envPtr); \
} \
} while (0)
@@ -1397,11 +1399,11 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#define TclEmitPush(objIndex, envPtr) \
do { \
register int objIndexCopy = (objIndex); \
if (objIndexCopy <= 255) { \
TclEmitInstInt1(INST_PUSH1, objIndexCopy, (envPtr)); \
register int _objIndexCopy = (objIndex); \
if (_objIndexCopy <= 255) { \
TclEmitInstInt1(INST_PUSH1, _objIndexCopy, (envPtr)); \
} else { \
TclEmitInstInt4(INST_PUSH4, objIndexCopy, (envPtr)); \
TclEmitInstInt4(INST_PUSH4, _objIndexCopy, (envPtr)); \
} \
} while (0)
+11 -13
View File
@@ -142,7 +142,7 @@ typedef struct Dict {
* the entries in the order that they are
* created. */
int epoch; /* Epoch counter */
int refcount; /* Reference counter (see above) */
size_t refCount; /* Reference counter (see above) */
Tcl_Obj *chain; /* Linked list used for invalidating the
* string representations of updated nested
* dictionaries. */
@@ -392,7 +392,7 @@ DupDictInternalRep(
newDict->epoch = 0;
newDict->chain = NULL;
newDict->refcount = 1;
newDict->refCount = 1;
/*
* Store in the object.
@@ -427,8 +427,7 @@ FreeDictInternalRep(
{
Dict *dict = DICT(dictPtr);
dict->refcount--;
if (dict->refcount <= 0) {
if (dict->refCount-- <= 1) {
DeleteDict(dict);
}
dictPtr->typePtr = NULL;
@@ -713,7 +712,7 @@ SetDictFromAny(
TclFreeIntRep(objPtr);
dict->epoch = 0;
dict->chain = NULL;
dict->refcount = 1;
dict->refCount = 1;
DICT(objPtr) = dict;
objPtr->internalRep.twoPtrValue.ptr2 = NULL;
objPtr->typePtr = &tclDictType;
@@ -1117,7 +1116,7 @@ Tcl_DictObjFirst(
searchPtr->dictionaryPtr = (Tcl_Dict) dict;
searchPtr->epoch = dict->epoch;
searchPtr->next = cPtr->nextPtr;
dict->refcount++;
dict->refCount++;
if (keyPtrPtr != NULL) {
*keyPtrPtr = Tcl_GetHashKey(&dict->table, &cPtr->entry);
}
@@ -1231,8 +1230,7 @@ Tcl_DictObjDone(
if (searchPtr->epoch != -1) {
searchPtr->epoch = -1;
dict = (Dict *) searchPtr->dictionaryPtr;
dict->refcount--;
if (dict->refcount <= 0) {
if (dict->refCount-- <= 1) {
DeleteDict(dict);
}
}
@@ -1384,7 +1382,7 @@ Tcl_NewDictObj(void)
InitChainTable(dict);
dict->epoch = 0;
dict->chain = NULL;
dict->refcount = 1;
dict->refCount = 1;
DICT(dictPtr) = dict;
dictPtr->internalRep.twoPtrValue.ptr2 = NULL;
dictPtr->typePtr = &tclDictType;
@@ -1434,7 +1432,7 @@ Tcl_DbNewDictObj(
InitChainTable(dict);
dict->epoch = 0;
dict->chain = NULL;
dict->refcount = 1;
dict->refCount = 1;
DICT(dictPtr) = dict;
dictPtr->internalRep.twoPtrValue.ptr2 = NULL;
dictPtr->typePtr = &tclDictType;
@@ -3537,7 +3535,7 @@ TclDictWithFinish(
* If the dictionary variable doesn't exist, drop everything silently.
*/
dictPtr = TclPtrGetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
dictPtr = TclPtrGetVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
TCL_LEAVE_ERR_MSG, index);
if (dictPtr == NULL) {
return TCL_OK;
@@ -3620,8 +3618,8 @@ TclDictWithFinish(
* Write back the outermost dictionary to the variable.
*/
if (TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr, dictPtr,
TCL_LEAVE_ERR_MSG, index) == NULL) {
if (TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
dictPtr, TCL_LEAVE_ERR_MSG, index) == NULL) {
if (allocdict) {
TclDecrRefCount(dictPtr);
}
+16 -18
View File
@@ -27,9 +27,8 @@ static Tcl_Obj * DisassembleByteCodeObj(Tcl_Interp *interp,
Tcl_Obj *objPtr);
static int FormatInstruction(ByteCode *codePtr,
const unsigned char *pc, Tcl_Obj *bufferObj);
static void GetLocationInformation(Tcl_Interp *interp,
Proc *procPtr, Tcl_Obj **fileObjPtr,
int *linePtr);
static void GetLocationInformation(Proc *procPtr,
Tcl_Obj **fileObjPtr, int *linePtr);
static void PrintSourceToObj(Tcl_Obj *appendObj,
const char *stringPtr, int maxChars);
static void UpdateStringOfInstName(Tcl_Obj *objPtr);
@@ -73,8 +72,6 @@ static const Tcl_ObjType tclInstNameType = {
static void
GetLocationInformation(
Tcl_Interp *interp, /* Where to look up the location
* information. */
Proc *procPtr, /* What to look up the information for. */
Tcl_Obj **fileObjPtr, /* Where to write the information about what
* file the code came from. Will be written
@@ -88,20 +85,21 @@ GetLocationInformation(
* either with the line number or with -1 if
* the information is not available. */
{
Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hePtr;
CmdFrame *cfPtr;
CmdFrame *cfPtr = TclGetCmdFrameForProcedure(procPtr);
*fileObjPtr = NULL;
*linePtr = -1;
if (iPtr != NULL && procPtr != NULL) {
hePtr = Tcl_FindHashEntry(iPtr->linePBodyPtr, procPtr);
if (hePtr != NULL && (cfPtr = Tcl_GetHashValue(hePtr)) != NULL) {
*linePtr = cfPtr->line[0];
if (cfPtr->type == TCL_LOCATION_SOURCE) {
*fileObjPtr = cfPtr->data.eval.path;
}
}
if (cfPtr == NULL) {
return;
}
/*
* Get the source location data out of the CmdFrame.
*/
*linePtr = cfPtr->line[0];
if (cfPtr->type == TCL_LOCATION_SOURCE) {
*fileObjPtr = cfPtr->data.eval.path;
}
}
@@ -278,7 +276,7 @@ DisassembleByteCodeObj(
Tcl_AppendToObj(bufferObj, " Source ", -1);
PrintSourceToObj(bufferObj, codePtr->source,
TclMin(codePtr->numSrcBytes, 55));
GetLocationInformation(interp, codePtr->procPtr, &fileObj, &line);
GetLocationInformation(codePtr->procPtr, &fileObj, &line);
if (line > -1 && fileObj != NULL) {
Tcl_AppendPrintfToObj(bufferObj, "\n File \"%s\" Line %d",
Tcl_GetString(fileObj), line);
@@ -1221,7 +1219,7 @@ DisassembleByteCodeAsDicts(
* system if it is available.
*/
GetLocationInformation(interp, codePtr->procPtr, &file, &line);
GetLocationInformation(codePtr->procPtr, &file, &line);
/*
* Build the overall result.
+14 -14
View File
@@ -2296,7 +2296,7 @@ UtfToUtfProc(
const char *srcStart, *srcEnd, *srcClose;
const char *dstStart, *dstEnd;
int result, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
result = TCL_OK;
@@ -2329,7 +2329,7 @@ UtfToUtfProc(
}
if (UCHAR(*src) < 0x80 && !(UCHAR(*src) == 0 && pureNullMode == 0)) {
/*
* Copy 7bit chatacters, but skip null-bytes when we are in input
* Copy 7bit characters, but skip null-bytes when we are in input
* mode, so that they get converted to 0xc080.
*/
@@ -2344,16 +2344,16 @@ UtfToUtfProc(
src += 2;
} else if (!Tcl_UtfCharComplete(src, srcEnd - src)) {
/*
* Always check before using Tcl_UtfToUniChar. Not doing can so
* cause it run beyond the endof the buffer! If we happen such an
* incomplete char its byts are made to represent themselves.
* Always check before using TclUtfToUniChar. Not doing can so
* cause it run beyond the end of the buffer! If we happen such an
* incomplete char its bytes are made to represent themselves.
*/
ch = (unsigned char) *src;
src += 1;
dst += Tcl_UniCharToUtf(ch, dst);
} else {
src += Tcl_UtfToUniChar(src, &ch);
src += TclUtfToUniChar(src, &ch);
dst += Tcl_UniCharToUtf(ch, dst);
}
}
@@ -2410,7 +2410,7 @@ UnicodeToUtfProc(
const char *srcStart, *srcEnd;
const char *dstEnd, *dstStart;
int result, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
if (flags & TCL_ENCODING_CHAR_LIMIT) {
charLimit = *dstCharsPtr;
@@ -2500,7 +2500,7 @@ UtfToUnicodeProc(
{
const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
int result, numChars;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
srcStart = src;
srcEnd = src + srcLen;
@@ -2610,7 +2610,7 @@ TableToUtfProc(
const char *srcStart, *srcEnd;
const char *dstEnd, *dstStart, *prefixBytes;
int result, byte, numChars, charLimit = INT_MAX;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
const unsigned short *const *toUnicode;
const unsigned short *pageZero;
TableEncodingData *dataPtr = clientData;
@@ -2722,7 +2722,7 @@ TableFromUtfProc(
{
const char *srcStart, *srcEnd, *srcClose;
const char *dstStart, *dstEnd, *prefixBytes;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int result, len, word, numChars;
TableEncodingData *dataPtr = clientData;
const unsigned short *const *fromUnicode;
@@ -2856,7 +2856,7 @@ Iso88591ToUtfProc(
result = TCL_OK;
for (numChars = 0; src < srcEnd && numChars <= charLimit; numChars++) {
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
if (dst > dstEnd) {
result = TCL_CONVERT_NOSPACE;
@@ -2942,7 +2942,7 @@ Iso88591FromUtfProc(
dstEnd = dst + dstLen - 1;
for (numChars = 0; src < srcEnd; numChars++) {
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int len;
if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
@@ -3329,7 +3329,7 @@ EscapeFromUtfProc(
for (numChars = 0; src < srcEnd; numChars++) {
unsigned len;
int word;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
if ((src > srcClose) && (!Tcl_UtfCharComplete(src, srcEnd - src))) {
/*
@@ -3374,7 +3374,7 @@ EscapeFromUtfProc(
/*
* The state variable has the value of oldState when word is 0.
* In this case, the escape sequense should not be copied to dst
* In this case, the escape sequence should not be copied to dst
* because the current character set is not changed.
*/
+60 -26
View File
@@ -510,8 +510,7 @@ VarHashCreateVar(
: (*(tPtr) = TCL_NUMBER_DOUBLE)), \
*(ptrPtr) = (ClientData) \
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) \
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
#else /* !TCL_WIDE_INT_IS_LONG */
@@ -530,8 +529,7 @@ VarHashCreateVar(
: (*(tPtr) = TCL_NUMBER_DOUBLE)), \
*(ptrPtr) = (ClientData) \
(&((objPtr)->internalRep.doubleValue)), TCL_OK) : \
((((objPtr)->typePtr == NULL) && ((objPtr)->bytes == NULL)) || \
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0))) \
(((objPtr)->bytes != NULL) && ((objPtr)->length == 0)) \
? (*(tPtr) = TCL_NUMBER_LONG),TCL_ERROR : \
TclGetNumberFromObj((interp), (objPtr), (ptrPtr), (tPtr)))
#endif /* TCL_WIDE_INT_IS_LONG */
@@ -3323,7 +3321,7 @@ TEBCresume(
*/
DECACHE_STACK_INFO();
objResultPtr = TclPtrGetVar(interp, varPtr, arrayPtr,
objResultPtr = TclPtrGetVarIdx(interp, varPtr, arrayPtr,
part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
if (!objResultPtr) {
@@ -3570,7 +3568,7 @@ TEBCresume(
doCallPtrSetVar:
DECACHE_STACK_INFO();
objResultPtr = TclPtrSetVar(interp, varPtr, arrayPtr,
objResultPtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr,
part1Ptr, part2Ptr, valuePtr, storeFlags, opnd);
CACHE_STACK_INFO();
if (!objResultPtr) {
@@ -3706,7 +3704,7 @@ TEBCresume(
VarHashRefCount(arrayPtr)++;
}
DECACHE_STACK_INFO();
objResultPtr = TclPtrGetVar(interp, varPtr, arrayPtr,
objResultPtr = TclPtrGetVarIdx(interp, varPtr, arrayPtr,
part1Ptr, part2Ptr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
if (TclIsVarInHash(varPtr)) {
@@ -3735,7 +3733,7 @@ TEBCresume(
}
}
DECACHE_STACK_INFO();
objResultPtr = TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr,
objResultPtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr,
part2Ptr, objResultPtr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
if (!objResultPtr) {
@@ -3999,7 +3997,7 @@ TEBCresume(
Tcl_DecrRefCount(incrPtr);
} else {
DECACHE_STACK_INFO();
objResultPtr = TclPtrIncrObjVar(interp, varPtr, arrayPtr,
objResultPtr = TclPtrIncrObjVarIdx(interp, varPtr, arrayPtr,
part1Ptr, part2Ptr, incrPtr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
Tcl_DecrRefCount(incrPtr);
@@ -4154,7 +4152,7 @@ TEBCresume(
slowUnsetScalar:
DECACHE_STACK_INFO();
if (TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, flags,
if (TclPtrUnsetVarIdx(interp, varPtr, NULL, NULL, NULL, flags,
opnd) != TCL_OK && flags) {
goto errorInUnset;
}
@@ -4206,7 +4204,7 @@ TEBCresume(
if (flags & TCL_LEAVE_ERR_MSG) {
goto errorInUnset;
}
} else if (TclPtrUnsetVar(interp, varPtr, arrayPtr, NULL, part2Ptr,
} else if (TclPtrUnsetVarIdx(interp, varPtr, arrayPtr, NULL, part2Ptr,
flags, opnd) != TCL_OK && (flags & TCL_LEAVE_ERR_MSG)) {
goto errorInUnset;
}
@@ -4263,7 +4261,7 @@ TEBCresume(
varPtr->value.objPtr = NULL;
} else {
DECACHE_STACK_INFO();
TclPtrUnsetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd);
TclPtrUnsetVarIdx(interp, varPtr, NULL, NULL, NULL, 0, opnd);
CACHE_STACK_INFO();
}
NEXT_INST_F(5, 0, 0);
@@ -4479,7 +4477,7 @@ TEBCresume(
if (TclIsVarInHash(otherPtr)) {
VarHashRefCount(otherPtr)++;
}
} else if (TclPtrObjMakeUpvar(interp, otherPtr, NULL, 0,
} else if (TclPtrObjMakeUpvarIdx(interp, otherPtr, NULL, 0,
opnd) != TCL_OK) {
TRACE_ERROR(interp);
goto gotError;
@@ -6940,7 +6938,7 @@ TEBCresume(
}
} else {
DECACHE_STACK_INFO();
if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
if (TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
valuePtr, TCL_LEAVE_ERR_MSG, varIndex)==NULL){
CACHE_STACK_INFO();
TRACE_APPEND((
@@ -7111,7 +7109,7 @@ TEBCresume(
}
} else {
DECACHE_STACK_INFO();
if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
if (TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
valuePtr, TCL_LEAVE_ERR_MSG, varIndex)==NULL){
CACHE_STACK_INFO();
TRACE_APPEND(("ERROR init. index temp %d: %.30s",
@@ -7334,7 +7332,8 @@ TEBCresume(
dictPtr = varPtr->value.objPtr;
} else {
DECACHE_STACK_INFO();
dictPtr = TclPtrGetVar(interp, varPtr, NULL,NULL,NULL, 0, opnd2);
dictPtr = TclPtrGetVarIdx(interp, varPtr, NULL, NULL, NULL, 0,
opnd2);
CACHE_STACK_INFO();
}
if (dictPtr == NULL) {
@@ -7408,7 +7407,7 @@ TEBCresume(
} else {
Tcl_IncrRefCount(dictPtr);
DECACHE_STACK_INFO();
objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
objResultPtr = TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
dictPtr, TCL_LEAVE_ERR_MSG, opnd2);
CACHE_STACK_INFO();
TclDecrRefCount(dictPtr);
@@ -7437,7 +7436,8 @@ TEBCresume(
dictPtr = varPtr->value.objPtr;
} else {
DECACHE_STACK_INFO();
dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd);
dictPtr = TclPtrGetVarIdx(interp, varPtr, NULL, NULL, NULL, 0,
opnd);
CACHE_STACK_INFO();
}
if (dictPtr == NULL) {
@@ -7546,7 +7546,7 @@ TEBCresume(
} else {
Tcl_IncrRefCount(dictPtr);
DECACHE_STACK_INFO();
objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
objResultPtr = TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
dictPtr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
TclDecrRefCount(dictPtr);
@@ -7640,7 +7640,7 @@ TEBCresume(
dictPtr = varPtr->value.objPtr;
} else {
DECACHE_STACK_INFO();
dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL,
dictPtr = TclPtrGetVarIdx(interp, varPtr, NULL, NULL, NULL,
TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
if (dictPtr == NULL) {
@@ -7673,7 +7673,7 @@ TEBCresume(
TclObjUnsetVar2(interp,
localName(iPtr->varFramePtr, duiPtr->varIndices[i]),
NULL, 0);
} else if (TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
} else if (TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
valuePtr, TCL_LEAVE_ERR_MSG,
duiPtr->varIndices[i]) == NULL) {
CACHE_STACK_INFO();
@@ -7700,7 +7700,8 @@ TEBCresume(
dictPtr = varPtr->value.objPtr;
} else {
DECACHE_STACK_INFO();
dictPtr = TclPtrGetVar(interp, varPtr, NULL, NULL, NULL, 0, opnd);
dictPtr = TclPtrGetVarIdx(interp, varPtr, NULL, NULL, NULL, 0,
opnd);
CACHE_STACK_INFO();
}
if (dictPtr == NULL) {
@@ -7730,8 +7731,8 @@ TEBCresume(
valuePtr = var2Ptr->value.objPtr;
} else {
DECACHE_STACK_INFO();
valuePtr = TclPtrGetVar(interp, var2Ptr, NULL, NULL, NULL, 0,
duiPtr->varIndices[i]);
valuePtr = TclPtrGetVarIdx(interp, var2Ptr, NULL, NULL, NULL,
0, duiPtr->varIndices[i]);
CACHE_STACK_INFO();
}
if (valuePtr == NULL) {
@@ -7749,7 +7750,7 @@ TEBCresume(
varPtr->value.objPtr = dictPtr;
} else {
DECACHE_STACK_INFO();
objResultPtr = TclPtrSetVar(interp, varPtr, NULL, NULL, NULL,
objResultPtr = TclPtrSetVarIdx(interp, varPtr, NULL, NULL, NULL,
dictPtr, TCL_LEAVE_ERR_MSG, opnd);
CACHE_STACK_INFO();
if (objResultPtr == NULL) {
@@ -7840,6 +7841,39 @@ TEBCresume(
* -----------------------------------------------------------------
*/
case INST_CLOCK_READ:
{ /* Read the wall clock */
Tcl_WideInt wval;
Tcl_Time now;
switch(TclGetUInt1AtPtr(pc+1)) {
case 0: /* clicks */
#ifdef TCL_WIDE_CLICKS
wval = TclpGetWideClicks();
#else
wval = (Tcl_WideInt) TclpGetClicks();
#endif
break;
case 1: /* microseconds */
Tcl_GetTime(&now);
wval = (Tcl_WideInt) now.sec * 1000000 + now.usec;
break;
case 2: /* milliseconds */
Tcl_GetTime(&now);
wval = (Tcl_WideInt) now.sec * 1000 + now.usec / 1000;
break;
case 3: /* seconds */
Tcl_GetTime(&now);
wval = (Tcl_WideInt) now.sec;
break;
default:
Tcl_Panic("clockRead instruction with unknown clock#");
}
/* TclNewWideObj(objResultPtr, wval); doesn't exist */
objResultPtr = Tcl_NewWideIntObj(wval);
TRACE_WITH_OBJ(("=> "), objResultPtr);
NEXT_INST_F(2, 0, 1);
}
default:
Tcl_Panic("TclNRExecuteByteCode: unrecognized opCode %u", *pc);
} /* end of switch on opCode */
@@ -9377,7 +9411,7 @@ TclCompareTwoNumbers(
Tcl_Obj *valuePtr,
Tcl_Obj *value2Ptr)
{
int type1, type2, compare;
int type1 = TCL_NUMBER_NAN, type2 = TCL_NUMBER_NAN, compare;
ClientData ptr1, ptr2;
mp_int big1, big2;
double d1, d2, tmp;
+2 -2
View File
@@ -6660,7 +6660,7 @@ Tcl_Flush(
chanPtr = statePtr->topChanPtr;
if (CheckChannelErrors(statePtr, TCL_WRITABLE) != 0) {
return -1;
return TCL_ERROR;
}
result = FlushChannel(NULL, chanPtr, 0);
@@ -9317,7 +9317,7 @@ MBWrite(
* then the calculations involving extra must be made wide too.
*
* Noted with Win32/MSVC debug build treating the warning (possible of
* data in int64 to int conversion) as error.
* data in __int64 to int conversion) as error.
*/
bufPtr = AllocChannelBuffer(extra);
+4
View File
@@ -41,6 +41,8 @@ static void ReflectWatch(ClientData clientData, int mask);
static int ReflectBlock(ClientData clientData, int mode);
#ifdef TCL_THREADS
static void ReflectThread(ClientData clientData, int action);
static int ReflectEventRun(Tcl_Event *ev, int flags);
static int ReflectEventDelete(Tcl_Event *ev, ClientData cd);
#endif
static Tcl_WideInt ReflectSeekWide(ClientData clientData,
Tcl_WideInt offset, int mode, int *errorCodePtr);
@@ -748,6 +750,7 @@ TclChanCreateObjCmd(
*----------------------------------------------------------------------
*/
#ifdef TCL_THREADS
typedef struct ReflectEvent {
Tcl_Event header;
ReflectedChannel *rcPtr;
@@ -791,6 +794,7 @@ ReflectEventDelete(
}
return 1;
}
#endif
int
TclChanPostEventObjCmd(
+2 -2
View File
@@ -1762,7 +1762,7 @@ Tcl_FSEvalFileEx(
* this cross-platform to allow for scripted documents. [Bug: 2040]
*/
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");
/*
* If the encoding is specified, set it for the channel. Else don't touch
@@ -1896,7 +1896,7 @@ TclNREvalFile(
* this cross-platform to allow for scripted documents. [Bug: 2040]
*/
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32");
Tcl_SetChannelOption(interp, chan, "-eofchar", "\32 {}");
/*
* If the encoding is specified, set it for the channel. Else don't touch
+26
View File
@@ -1011,6 +1011,32 @@ declare 251 {
int TclRegisterLiteral(void *envPtr,
char *bytes, int length, int flags)
}
# Exporting of the internal API to variables.
declare 252 {
Tcl_Obj *TclPtrGetVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
const int flags)
}
declare 253 {
Tcl_Obj *TclPtrSetVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
Tcl_Obj *newValuePtr, const int flags)
}
declare 254 {
Tcl_Obj *TclPtrIncrObjVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr,
Tcl_Obj *incrPtr, const int flags)
}
declare 255 {
int TclPtrObjMakeUpvar(Tcl_Interp *interp, Tcl_Var otherPtr,
Tcl_Obj *myNamePtr, int myFlags)
}
declare 256 {
int TclPtrUnsetVar(Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr,
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const int flags)
}
##############################################################################
+51 -45
View File
@@ -2940,7 +2940,8 @@ MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp);
MODULE_SCOPE int TclGetChannelFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Channel *chanPtr,
int *modePtr, int flags);
MODULE_SCOPE int TclGetCompletionCodeFromObj(Tcl_Interp *interp,
MODULE_SCOPE CmdFrame * TclGetCmdFrameForProcedure(Proc *procPtr);
MODULE_SCOPE int TclGetCompletionCodeFromObj(Tcl_Interp *interp,
Tcl_Obj *value, int *code);
MODULE_SCOPE int TclGetNumberFromObj(Tcl_Interp *interp,
Tcl_Obj *objPtr, ClientData *clientDataPtr,
@@ -3239,10 +3240,8 @@ MODULE_SCOPE int Tcl_AssembleObjCmd(ClientData clientData,
MODULE_SCOPE int TclNRAssembleObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int Tcl_EncodingObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE Tcl_Command TclInitEncodingCmd(Tcl_Interp *interp);
MODULE_SCOPE int TclMakeEncodingCommandSafe(Tcl_Interp *interp);
MODULE_SCOPE int Tcl_EofObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
@@ -3480,6 +3479,12 @@ MODULE_SCOPE int TclCompileBreakCmd(Tcl_Interp *interp,
MODULE_SCOPE int TclCompileCatchCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
MODULE_SCOPE int TclCompileClockClicksCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
MODULE_SCOPE int TclCompileClockReadingCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
MODULE_SCOPE int TclCompileConcatCmd(Tcl_Interp *interp,
Tcl_Parse *parsePtr, Command *cmdPtr,
struct CompileEnv *envPtr);
@@ -3916,7 +3921,7 @@ MODULE_SCOPE int TclCompileAssembleCmd(Tcl_Interp *interp,
struct CompileEnv *envPtr);
/*
* Functions defined in generic/tclVar.c and currenttly exported only for use
* Functions defined in generic/tclVar.c and currently exported only for use
* by the bytecode compiler and engine. Some of these could later be placed in
* the public interface.
*/
@@ -3930,20 +3935,21 @@ MODULE_SCOPE Var * TclLookupArrayElement(Tcl_Interp *interp,
const int flags, const char *msg,
const int createPart1, const int createPart2,
Var *arrayPtr, int index);
MODULE_SCOPE Tcl_Obj * TclPtrGetVar(Tcl_Interp *interp,
MODULE_SCOPE Tcl_Obj * TclPtrGetVarIdx(Tcl_Interp *interp,
Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, const int flags, int index);
MODULE_SCOPE Tcl_Obj * TclPtrSetVar(Tcl_Interp *interp,
MODULE_SCOPE Tcl_Obj * TclPtrSetVarIdx(Tcl_Interp *interp,
Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
const int flags, int index);
MODULE_SCOPE Tcl_Obj * TclPtrIncrObjVar(Tcl_Interp *interp,
MODULE_SCOPE Tcl_Obj * TclPtrIncrObjVarIdx(Tcl_Interp *interp,
Var *varPtr, Var *arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr,
const int flags, int index);
MODULE_SCOPE int TclPtrObjMakeUpvar(Tcl_Interp *interp, Var *otherPtr,
Tcl_Obj *myNamePtr, int myFlags, int index);
MODULE_SCOPE int TclPtrUnsetVar(Tcl_Interp *interp, Var *varPtr,
MODULE_SCOPE int TclPtrObjMakeUpvarIdx(Tcl_Interp *interp,
Var *otherPtr, Tcl_Obj *myNamePtr, int myFlags,
int index);
MODULE_SCOPE int TclPtrUnsetVarIdx(Tcl_Interp *interp, Var *varPtr,
Var *arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, const int flags,
int index);
@@ -4300,13 +4306,13 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TCL_MAX_TOKENS (int)(UINT_MAX / sizeof(Tcl_Token))
#define TclGrowTokenArray(tokenPtr, used, available, append, staticPtr) \
do { \
int needed = (used) + (append); \
if (needed > TCL_MAX_TOKENS) { \
int _needed = (used) + (append); \
if (_needed > TCL_MAX_TOKENS) { \
Tcl_Panic("max # of tokens for a Tcl parse (%d) exceeded", \
TCL_MAX_TOKENS); \
} \
if (needed > (available)) { \
int allocated = 2 * needed; \
if (_needed > (available)) { \
int allocated = 2 * _needed; \
Tcl_Token *oldPtr = (tokenPtr); \
Tcl_Token *newPtr; \
if (oldPtr == (staticPtr)) { \
@@ -4318,7 +4324,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
newPtr = (Tcl_Token *) attemptckrealloc((char *) oldPtr, \
(unsigned int) (allocated * sizeof(Tcl_Token))); \
if (newPtr == NULL) { \
allocated = needed + (append) + TCL_MIN_TOKEN_GROWTH; \
allocated = _needed + (append) + TCL_MIN_TOKEN_GROWTH; \
if (allocated > TCL_MAX_TOKENS) { \
allocated = TCL_MAX_TOKENS; \
} \
@@ -4353,7 +4359,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TclUtfToUniChar(str, chPtr) \
((((unsigned char) *(str)) < 0xC0) ? \
((*(chPtr) = (Tcl_UniChar) *(str)), 1) \
((*(chPtr) = (unsigned char) *(str)), 1) \
: Tcl_UtfToUniChar(str, chPtr))
/*
@@ -4370,14 +4376,14 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
#define TclNumUtfChars(numChars, bytes, numBytes) \
do { \
int count, i = (numBytes); \
unsigned char *str = (unsigned char *) (bytes); \
while (i && (*str < 0xC0)) { i--; str++; } \
count = (numBytes) - i; \
if (i) { \
count += Tcl_NumUtfChars((bytes) + count, i); \
int _count, _i = (numBytes); \
unsigned char *_str = (unsigned char *) (bytes); \
while (_i && (*_str < 0xC0)) { _i--; _str++; } \
_count = (numBytes) - _i; \
if (_i) { \
_count += Tcl_NumUtfChars((bytes) + _count, _i); \
} \
(numChars) = count; \
(numChars) = _count; \
} while (0);
/*
@@ -4736,11 +4742,11 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
#ifndef TCL_MEM_DEBUG
#define TclSmallAllocEx(interp, nbytes, memPtr) \
do { \
Tcl_Obj *objPtr; \
Tcl_Obj *_objPtr; \
TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \
TclIncrObjsAllocated(); \
TclAllocObjStorageEx((interp), (objPtr)); \
memPtr = (ClientData) (objPtr); \
TclAllocObjStorageEx((interp), (_objPtr)); \
memPtr = (ClientData) (_objPtr); \
} while (0)
#define TclSmallFreeEx(interp, memPtr) \
@@ -4752,19 +4758,19 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit;
#else /* TCL_MEM_DEBUG */
#define TclSmallAllocEx(interp, nbytes, memPtr) \
do { \
Tcl_Obj *objPtr; \
Tcl_Obj *_objPtr; \
TCL_CT_ASSERT((nbytes)<=sizeof(Tcl_Obj)); \
TclNewObj(objPtr); \
memPtr = (ClientData) objPtr; \
TclNewObj(_objPtr); \
memPtr = (ClientData) _objPtr; \
} while (0)
#define TclSmallFreeEx(interp, memPtr) \
do { \
Tcl_Obj *objPtr = (Tcl_Obj *) memPtr; \
objPtr->bytes = NULL; \
objPtr->typePtr = NULL; \
objPtr->refCount = 1; \
TclDecrRefCount(objPtr); \
Tcl_Obj *_objPtr = (Tcl_Obj *) memPtr; \
_objPtr->bytes = NULL; \
_objPtr->typePtr = NULL; \
_objPtr->refCount = 1; \
TclDecrRefCount(_objPtr); \
} while (0)
#endif /* TCL_MEM_DEBUG */
@@ -4816,15 +4822,15 @@ typedef struct NRE_callback {
#define TclNRAddCallback(interp,postProcPtr,data0,data1,data2,data3) \
do { \
NRE_callback *callbackPtr; \
TCLNR_ALLOC((interp), (callbackPtr)); \
callbackPtr->procPtr = (postProcPtr); \
callbackPtr->data[0] = (ClientData)(data0); \
callbackPtr->data[1] = (ClientData)(data1); \
callbackPtr->data[2] = (ClientData)(data2); \
callbackPtr->data[3] = (ClientData)(data3); \
callbackPtr->nextPtr = TOP_CB(interp); \
TOP_CB(interp) = callbackPtr; \
NRE_callback *_callbackPtr; \
TCLNR_ALLOC((interp), (_callbackPtr)); \
_callbackPtr->procPtr = (postProcPtr); \
_callbackPtr->data[0] = (ClientData)(data0); \
_callbackPtr->data[1] = (ClientData)(data1); \
_callbackPtr->data[2] = (ClientData)(data2); \
_callbackPtr->data[3] = (ClientData)(data3); \
_callbackPtr->nextPtr = TOP_CB(interp); \
TOP_CB(interp) = _callbackPtr; \
} while (0)
#if NRE_USE_SMALL_ALLOC
+37
View File
@@ -617,6 +617,28 @@ EXTERN void TclSetSlaveCancelFlags(Tcl_Interp *interp, int flags,
/* 251 */
EXTERN int TclRegisterLiteral(void *envPtr, char *bytes,
int length, int flags);
/* 252 */
EXTERN Tcl_Obj * TclPtrGetVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, const int flags);
/* 253 */
EXTERN Tcl_Obj * TclPtrSetVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr,
const int flags);
/* 254 */
EXTERN Tcl_Obj * TclPtrIncrObjVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr,
const int flags);
/* 255 */
EXTERN int TclPtrObjMakeUpvar(Tcl_Interp *interp,
Tcl_Var otherPtr, Tcl_Obj *myNamePtr,
int myFlags);
/* 256 */
EXTERN int TclPtrUnsetVar(Tcl_Interp *interp, Tcl_Var varPtr,
Tcl_Var arrayPtr, Tcl_Obj *part1Ptr,
Tcl_Obj *part2Ptr, const int flags);
typedef struct TclIntStubs {
int magic;
@@ -874,6 +896,11 @@ typedef struct TclIntStubs {
char * (*tclDoubleDigits) (double dv, int ndigits, int flags, int *decpt, int *signum, char **endPtr); /* 249 */
void (*tclSetSlaveCancelFlags) (Tcl_Interp *interp, int flags, int force); /* 250 */
int (*tclRegisterLiteral) (void *envPtr, char *bytes, int length, int flags); /* 251 */
Tcl_Obj * (*tclPtrGetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const int flags); /* 252 */
Tcl_Obj * (*tclPtrSetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, const int flags); /* 253 */
Tcl_Obj * (*tclPtrIncrObjVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *incrPtr, const int flags); /* 254 */
int (*tclPtrObjMakeUpvar) (Tcl_Interp *interp, Tcl_Var otherPtr, Tcl_Obj *myNamePtr, int myFlags); /* 255 */
int (*tclPtrUnsetVar) (Tcl_Interp *interp, Tcl_Var varPtr, Tcl_Var arrayPtr, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const int flags); /* 256 */
} TclIntStubs;
extern const TclIntStubs *tclIntStubsPtr;
@@ -1305,6 +1332,16 @@ extern const TclIntStubs *tclIntStubsPtr;
(tclIntStubsPtr->tclSetSlaveCancelFlags) /* 250 */
#define TclRegisterLiteral \
(tclIntStubsPtr->tclRegisterLiteral) /* 251 */
#define TclPtrGetVar \
(tclIntStubsPtr->tclPtrGetVar) /* 252 */
#define TclPtrSetVar \
(tclIntStubsPtr->tclPtrSetVar) /* 253 */
#define TclPtrIncrObjVar \
(tclIntStubsPtr->tclPtrIncrObjVar) /* 254 */
#define TclPtrObjMakeUpvar \
(tclIntStubsPtr->tclPtrObjMakeUpvar) /* 255 */
#define TclPtrUnsetVar \
(tclIntStubsPtr->tclPtrUnsetVar) /* 256 */
#endif /* defined(USE_TCL_STUBS) */
+85 -118
View File
@@ -67,10 +67,9 @@ typedef struct Link {
static char * LinkTraceProc(ClientData clientData,Tcl_Interp *interp,
const char *name1, const char *name2, int flags);
static Tcl_Obj * ObjValue(Link *linkPtr);
static int GetInvalidIntFromObj(Tcl_Obj *objPtr,
int *intPtr);
static int GetInvalidDoubleFromObj(Tcl_Obj *objPtr,
double *doublePtr);
static int GetInvalidIntFromObj(Tcl_Obj *objPtr, int *intPtr);
static int GetInvalidWideFromObj(Tcl_Obj *objPtr, Tcl_WideInt *widePtr);
static int GetInvalidDoubleFromObj(Tcl_Obj *objPtr, double *doublePtr);
/*
* Convenience macro for accessing the value of the C variable pointed to by a
@@ -263,7 +262,8 @@ LinkTraceProc(
int flags) /* Miscellaneous additional information. */
{
Link *linkPtr = clientData;
int changed, valueLength;
int changed;
size_t valueLength;
const char *value;
char **pp;
Tcl_Obj *valueObj;
@@ -382,40 +382,31 @@ LinkTraceProc(
switch (linkPtr->type) {
case TCL_LINK_INT:
if (Tcl_GetIntFromObj(NULL, valueObj, &linkPtr->lastValue.i)
!= TCL_OK) {
if (GetInvalidIntFromObj(valueObj, &linkPtr->lastValue.i)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
if (Tcl_GetIntFromObj(NULL, valueObj, &linkPtr->lastValue.i) != TCL_OK
&& GetInvalidIntFromObj(valueObj, &linkPtr->lastValue.i) != TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have integer value";
}
return (char *) "variable must have integer value";
}
LinkedVar(int) = linkPtr->lastValue.i;
break;
case TCL_LINK_WIDE_INT:
if (Tcl_GetWideIntFromObj(NULL, valueObj, &linkPtr->lastValue.w)
!= TCL_OK) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
if (Tcl_GetWideIntFromObj(NULL, valueObj, &linkPtr->lastValue.w) != TCL_OK
&& GetInvalidWideFromObj(valueObj, &linkPtr->lastValue.w) != TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have integer value";
}
linkPtr->lastValue.w = (Tcl_WideInt) valueInt;
return (char *) "variable must have integer value";
}
LinkedVar(Tcl_WideInt) = linkPtr->lastValue.w;
break;
case TCL_LINK_DOUBLE:
if (Tcl_GetDoubleFromObj(NULL, valueObj, &linkPtr->lastValue.d)
!= TCL_OK) {
if (Tcl_GetDoubleFromObj(NULL, valueObj, &linkPtr->lastValue.d) != TCL_OK) {
#ifdef ACCEPT_NAN
if (valueObj->typePtr != &tclDoubleType) {
#endif
if (GetInvalidDoubleFromObj(valueObj, &linkPtr->lastValue.d)
!= TCL_OK) {
if (GetInvalidDoubleFromObj(valueObj, &linkPtr->lastValue.d) != TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have real value";
@@ -429,8 +420,7 @@ LinkTraceProc(
break;
case TCL_LINK_BOOLEAN:
if (Tcl_GetBooleanFromObj(NULL, valueObj, &linkPtr->lastValue.i)
!= TCL_OK) {
if (Tcl_GetBooleanFromObj(NULL, valueObj, &linkPtr->lastValue.i) != TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have boolean value";
@@ -439,148 +429,113 @@ LinkTraceProc(
break;
case TCL_LINK_CHAR:
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
if ((Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
&& GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK)
|| valueInt < SCHAR_MIN || valueInt > SCHAR_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have char value";
}
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have char value";
}
linkPtr->lastValue.c = (char)valueInt;
LinkedVar(char) = linkPtr->lastValue.c;
LinkedVar(char) = linkPtr->lastValue.c = (char)valueInt;
break;
case TCL_LINK_UCHAR:
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
if ((Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
&& GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK)
|| valueInt < 0 || valueInt > UCHAR_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned char value";
}
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned char value";
}
linkPtr->lastValue.uc = (unsigned char) valueInt;
LinkedVar(unsigned char) = linkPtr->lastValue.uc;
LinkedVar(unsigned char) = linkPtr->lastValue.uc = (unsigned char) valueInt;
break;
case TCL_LINK_SHORT:
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
if ((Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
&& GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK)
|| valueInt < SHRT_MIN || valueInt > SHRT_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have short value";
}
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have short value";
}
linkPtr->lastValue.s = (short)valueInt;
LinkedVar(short) = linkPtr->lastValue.s;
LinkedVar(short) = linkPtr->lastValue.s = (short)valueInt;
break;
case TCL_LINK_USHORT:
if (Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
if ((Tcl_GetIntFromObj(NULL, valueObj, &valueInt) != TCL_OK
&& GetInvalidIntFromObj(valueObj, &valueInt) != TCL_OK)
|| valueInt < 0 || valueInt > USHRT_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned short value";
}
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned short value";
}
linkPtr->lastValue.us = (unsigned short)valueInt;
LinkedVar(unsigned short) = linkPtr->lastValue.us;
LinkedVar(unsigned short) = linkPtr->lastValue.us = (unsigned short)valueInt;
break;
case TCL_LINK_UINT:
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
if ((Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
&& GetInvalidWideFromObj(valueObj, &valueWide) != TCL_OK)
|| valueWide < 0 || valueWide > UINT_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned int value";
}
linkPtr->lastValue.ui = (unsigned int)valueInt;
} else {
linkPtr->lastValue.ui = (unsigned int)valueWide;
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned int value";
}
LinkedVar(unsigned int) = linkPtr->lastValue.ui;
LinkedVar(unsigned int) = linkPtr->lastValue.ui = (unsigned int)valueWide;
break;
case TCL_LINK_LONG:
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
if ((Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
&& GetInvalidWideFromObj(valueObj, &valueWide) != TCL_OK)
|| valueWide < LONG_MIN || valueWide > LONG_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have long value";
}
linkPtr->lastValue.l = (long)valueInt;
} else {
linkPtr->lastValue.l = (long)valueWide;
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have long value";
}
LinkedVar(long) = linkPtr->lastValue.l;
LinkedVar(long) = linkPtr->lastValue.l = (long)valueWide;
break;
case TCL_LINK_ULONG:
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
if ((Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
&& GetInvalidWideFromObj(valueObj, &valueWide) != TCL_OK)
|| valueWide < 0 || (Tcl_WideUInt) valueWide > ULONG_MAX) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned long value";
}
linkPtr->lastValue.ul = (unsigned long)valueInt;
} else {
linkPtr->lastValue.ul = (unsigned long)valueWide;
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned long value";
}
LinkedVar(unsigned long) = linkPtr->lastValue.ul;
LinkedVar(unsigned long) = linkPtr->lastValue.ul = (unsigned long)valueWide;
break;
case TCL_LINK_WIDE_UINT:
/*
* FIXME: represent as a bignum.
*/
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK) {
if (GetInvalidIntFromObj(valueObj, &valueInt)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned wide int value";
}
linkPtr->lastValue.uw = (Tcl_WideUInt)valueInt;
} else {
linkPtr->lastValue.uw = (Tcl_WideUInt)valueWide;
if (Tcl_GetWideIntFromObj(NULL, valueObj, &valueWide) != TCL_OK
&& GetInvalidWideFromObj(valueObj, &valueWide) != TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have unsigned wide int value";
}
LinkedVar(Tcl_WideUInt) = linkPtr->lastValue.uw;
LinkedVar(Tcl_WideUInt) = linkPtr->lastValue.uw = (Tcl_WideUInt)valueWide;
break;
case TCL_LINK_FLOAT:
if (Tcl_GetDoubleFromObj(NULL, valueObj, &valueDouble) != TCL_OK
if ((Tcl_GetDoubleFromObj(NULL, valueObj, &valueDouble) != TCL_OK
&& GetInvalidDoubleFromObj(valueObj, &valueDouble) != TCL_OK)
|| valueDouble < -FLT_MAX || valueDouble > FLT_MAX) {
if (GetInvalidDoubleFromObj(valueObj, &valueDouble)
!= TCL_OK) {
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have float value";
}
Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, ObjValue(linkPtr),
TCL_GLOBAL_ONLY);
return (char *) "variable must have float value";
}
linkPtr->lastValue.f = (float)valueDouble;
LinkedVar(float) = linkPtr->lastValue.f;
LinkedVar(float) = linkPtr->lastValue.f = (float)valueDouble;
break;
case TCL_LINK_STRING:
value = TclGetStringFromObj(valueObj, &valueLength);
valueLength++;
value = TclGetString(valueObj);
valueLength = valueObj->length + 1;
pp = (char **) linkPtr->addr;
*pp = ckrealloc(*pp, valueLength);
memcpy(*pp, value, (unsigned) valueLength);
memcpy(*pp, value, valueLength);
break;
default:
@@ -742,6 +697,18 @@ GetInvalidIntFromObj(Tcl_Obj *objPtr,
return TCL_ERROR;
}
int
GetInvalidWideFromObj(Tcl_Obj *objPtr, Tcl_WideInt *widePtr)
{
int intValue;
if (GetInvalidIntFromObj(objPtr, &intValue) != TCL_OK) {
return TCL_ERROR;
}
*widePtr = intValue;
return TCL_OK;
}
/*
* This function checks for double representations, which are valid
* when linking with C variables, but which are invalid in other
+2 -2
View File
@@ -130,7 +130,7 @@ Tcl_LoadObjCmd(
Tcl_PackageInitProc *initProc;
const char *p, *fullFileName, *packageName;
Tcl_LoadHandle loadHandle;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
unsigned len;
int index, flags = 0;
Tcl_Obj *const *savedobjv = objv;
@@ -336,7 +336,7 @@ Tcl_LoadObjCmd(
}
#endif /* __CYGWIN__ */
for (p = pkgGuess; *p != 0; p += offset) {
offset = Tcl_UtfToUniChar(p, &ch);
offset = TclUtfToUniChar(p, &ch);
if ((ch > 0x100)
|| !(isalpha(UCHAR(ch)) /* INTL: ISO only */
|| (UCHAR(ch) == '_'))) {
+1 -1
View File
@@ -24,7 +24,7 @@
* win/tclooConfig.sh
*/
#define TCLOO_VERSION "1.0.5"
#define TCLOO_VERSION "1.1.0"
#define TCLOO_PATCHLEVEL TCLOO_VERSION
#include "tcl.h"
+27 -5
View File
@@ -1183,8 +1183,9 @@ TclOOCopyObjectCmd(
{
Tcl_Object oPtr, o2Ptr;
if (objc < 2 || objc > 3) {
Tcl_WrongNumArgs(interp, 1, objv, "sourceName ?targetName?");
if (objc < 2 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv,
"sourceName ?targetName? ?targetNamespace?");
return TCL_ERROR;
}
@@ -1204,12 +1205,14 @@ TclOOCopyObjectCmd(
if (objc == 2) {
o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, NULL, NULL);
} else {
const char *name;
const char *name, *namespaceName;
Tcl_DString buffer;
name = TclGetString(objv[2]);
Tcl_DStringInit(&buffer);
if (name[0]!=':' || name[1]!=':') {
if (name[0] == '\0') {
name = NULL;
} else if (name[0]!=':' || name[1]!=':') {
Interp *iPtr = (Interp *) interp;
if (iPtr->varFramePtr != NULL) {
@@ -1220,7 +1223,26 @@ TclOOCopyObjectCmd(
Tcl_DStringAppend(&buffer, name, -1);
name = Tcl_DStringValue(&buffer);
}
o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, name, NULL);
/*
* Choose a unique namespace name if the user didn't supply one.
*/
namespaceName = NULL;
if (objc == 4) {
namespaceName = TclGetString(objv[3]);
if (namespaceName[0] == '\0') {
namespaceName = NULL;
} else if (Tcl_FindNamespace(interp, namespaceName, NULL,
0) != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s refers to an existing namespace", namespaceName));
return TCL_ERROR;
}
}
o2Ptr = Tcl_CopyObjectInstance(interp, oPtr, name, namespaceName);
Tcl_DStringFree(&buffer);
}
+57 -19
View File
@@ -53,7 +53,8 @@ static void AddClassFiltersToCallContext(Object *const oPtr,
Class *clsPtr, struct ChainBuilder *const cbPtr,
Tcl_HashTable *const doneFilters, int flags);
static void AddClassMethodNames(Class *clsPtr, const int flags,
Tcl_HashTable *const namesPtr);
Tcl_HashTable *const namesPtr,
Tcl_HashTable *const examinedClassesPtr);
static inline void AddMethodToCallChain(Method *const mPtr,
struct ChainBuilder *const cbPtr,
Tcl_HashTable *const doneFilters,
@@ -367,6 +368,10 @@ TclOOGetSortedMethodList(
{
Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list"
* mapping. */
Tcl_HashTable examinedClasses;
/* Used to track what classes have been looked
* at. Is set-like in nature and keyed by
* pointer to class. */
FOREACH_HASH_DECLS;
int i;
Class *mixinPtr;
@@ -376,6 +381,7 @@ TclOOGetSortedMethodList(
void *isWanted;
Tcl_InitObjHashTable(&names);
Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS);
/*
* Name the bits used in the names table values.
@@ -436,11 +442,14 @@ TclOOGetSortedMethodList(
* hierarchy.
*/
AddClassMethodNames(oPtr->selfCls, flags, &names);
AddClassMethodNames(oPtr->selfCls, flags, &names, &examinedClasses);
FOREACH(mixinPtr, oPtr->mixins) {
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names);
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, &names,
&examinedClasses);
}
Tcl_DeleteHashTable(&examinedClasses);
/*
* See how many (visible) method names there are. If none, we do not (and
* should not) try to sort the list of them.
@@ -495,18 +504,24 @@ TclOOGetSortedClassMethodList(
{
Tcl_HashTable names; /* Tcl_Obj* method name to "wanted in list"
* mapping. */
Tcl_HashTable examinedClasses;
/* Used to track what classes have been looked
* at. Is set-like in nature and keyed by
* pointer to class. */
FOREACH_HASH_DECLS;
int i;
Tcl_Obj *namePtr;
void *isWanted;
Tcl_InitObjHashTable(&names);
Tcl_InitHashTable(&examinedClasses, TCL_ONE_WORD_KEYS);
/*
* Process method names from the class hierarchy and the mixin hierarchy.
*/
AddClassMethodNames(clsPtr, flags, &names);
AddClassMethodNames(clsPtr, flags, &names, &examinedClasses);
Tcl_DeleteHashTable(&examinedClasses);
/*
* See how many (visible) method names there are. If none, we do not (and
@@ -581,14 +596,28 @@ AddClassMethodNames(
Class *clsPtr, /* Class to get method names from. */
const int flags, /* Whether we are interested in just the
* public method names. */
Tcl_HashTable *const namesPtr)
Tcl_HashTable *const namesPtr,
/* Reference to the hash table to put the
* information in. The hash table maps the
* Tcl_Obj * method name to an integral value
* describing whether the method is wanted.
* This ensures that public/private override
* semantics are handled correctly.*/
* semantics are handled correctly. */
Tcl_HashTable *const examinedClassesPtr)
/* Hash table that tracks what classes have
* already been looked at. The keys are the
* pointers to the classes, and the values are
* immaterial. */
{
/*
* If we've already started looking at this class, stop working on it now
* to prevent repeated work.
*/
if (Tcl_FindHashEntry(examinedClassesPtr, (char *) clsPtr)) {
return;
}
/*
* Scope all declarations so that the compiler can stand a good chance of
* making the recursive step highly efficient. We also hand-implement the
@@ -596,29 +625,37 @@ AddClassMethodNames(
* tail-recursion optimization usefully.
*/
if (clsPtr->mixins.num != 0) {
Class *mixinPtr;
int i;
/* TODO: Beware of infinite loops! */
FOREACH(mixinPtr, clsPtr->mixins) {
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN, namesPtr);
}
}
while (1) {
FOREACH_HASH_DECLS;
Tcl_Obj *namePtr;
Method *mPtr;
int isNew;
(void) Tcl_CreateHashEntry(examinedClassesPtr, (char *) clsPtr,
&isNew);
if (!isNew) {
break;
}
if (clsPtr->mixins.num != 0) {
Class *mixinPtr;
int i;
FOREACH(mixinPtr, clsPtr->mixins) {
if (mixinPtr != clsPtr) {
AddClassMethodNames(mixinPtr, flags|TRAVERSED_MIXIN,
namesPtr, examinedClassesPtr);
}
}
}
FOREACH_HASH(namePtr, mPtr, &clsPtr->classMethods) {
int isNew;
hPtr = Tcl_CreateHashEntry(namesPtr, (char *) namePtr, &isNew);
if (isNew) {
int isWanted = (!(flags & PUBLIC_METHOD)
|| (mPtr->flags & PUBLIC_METHOD)) ? IN_LIST : 0;
isWanted |= (mPtr->typePtr == NULL ? NO_IMPLEMENTATION : 0);
Tcl_SetHashValue(hPtr, INT2PTR(isWanted));
} else if ((PTR2INT(Tcl_GetHashValue(hPtr)) & NO_IMPLEMENTATION)
&& mPtr->typePtr != NULL) {
@@ -639,7 +676,8 @@ AddClassMethodNames(
int i;
FOREACH(superPtr, clsPtr->superclasses) {
AddClassMethodNames(superPtr, flags, namesPtr);
AddClassMethodNames(superPtr, flags, namesPtr,
examinedClassesPtr);
}
}
}
+74 -126
View File
@@ -47,8 +47,11 @@ struct DeclaredSlot {
static inline void BumpGlobalEpoch(Tcl_Interp *interp, Class *classPtr);
static Tcl_Command FindCommand(Tcl_Interp *interp, Tcl_Obj *stringObj,
Tcl_Namespace *const namespacePtr);
static void GenerateErrorInfo(Tcl_Interp *interp, Object *oPtr,
static inline void GenerateErrorInfo(Tcl_Interp *interp, Object *oPtr,
Tcl_Obj *savedNameObj, const char *typeOfSubject);
static inline int MagicDefinitionInvoke(Tcl_Interp *interp,
Tcl_Namespace *nsPtr, int cmdIndex,
int objc, Tcl_Obj *const *objv);
static inline Class * GetClassInOuterContext(Tcl_Interp *interp,
Tcl_Obj *className, const char *errMsg);
static inline int InitDefineContext(Tcl_Interp *interp,
@@ -755,7 +758,7 @@ GetClassInOuterContext(
* ----------------------------------------------------------------------
*/
static void
static inline void
GenerateErrorInfo(
Tcl_Interp *interp, /* Where to store the error info trace. */
Object *oPtr, /* What object (or class) was being configured
@@ -784,6 +787,69 @@ GenerateErrorInfo(
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
/*
* ----------------------------------------------------------------------
*
* MagicDefinitionInvoke --
* Part of the implementation of the "oo::define" and "oo::objdefine"
* commands that is used to implement the more-than-one-argument case,
* applying ensemble-like tricks with dispatch so that error messages are
* clearer. Doesn't handle the management of the stack frame.
*
* ----------------------------------------------------------------------
*/
static inline int
MagicDefinitionInvoke(
Tcl_Interp *interp,
Tcl_Namespace *nsPtr,
int cmdIndex,
int objc,
Tcl_Obj *const *objv)
{
Tcl_Obj *objPtr, *obj2Ptr, **objs;
Tcl_Command cmd;
int isRoot, dummy, result, offset = cmdIndex + 1;
/*
* More than one argument: fire them through the ensemble processing
* engine so that everything appears to be good and proper in error
* messages. Note that we cannot just concatenate and send through
* Tcl_EvalObjEx, as that doesn't do ensemble processing, and we cannot go
* through Tcl_EvalObjv without the extra work to pre-find the command, as
* that finds command names in the wrong namespace at the moment. Ugly!
*/
isRoot = TclInitRewriteEnsemble(interp, offset, 1, objv);
/*
* Build the list of arguments using a Tcl_Obj as a workspace. See
* comments above for why these contortions are necessary.
*/
objPtr = Tcl_NewObj();
obj2Ptr = Tcl_NewObj();
cmd = FindCommand(interp, objv[cmdIndex], nsPtr);
if (cmd == NULL) {
/* punt this case! */
Tcl_AppendObjToObj(obj2Ptr, objv[cmdIndex]);
} else {
Tcl_GetCommandFullName(interp, cmd, obj2Ptr);
}
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
/* TODO: overflow? */
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-offset, objv+offset);
Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
result = Tcl_EvalObjv(interp, objc-cmdIndex, objs, TCL_EVAL_INVOKE);
if (isRoot) {
TclResetRewriteEnsemble(interp, 1);
}
Tcl_DecrRefCount(objPtr);
return result;
}
/*
* ----------------------------------------------------------------------
*
@@ -805,8 +871,8 @@ TclOODefineObjCmd(
Tcl_Obj *const *objv)
{
Foundation *fPtr = TclOOGetFoundation(interp);
int result;
Object *oPtr;
int result;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "className arg ?arg ...?");
@@ -846,46 +912,7 @@ TclOODefineObjCmd(
}
TclDecrRefCount(objNameObj);
} else {
Tcl_Obj *objPtr, *obj2Ptr, **objs;
Tcl_Command cmd;
int isRoot, dummy;
/*
* More than one argument: fire them through the ensemble processing
* engine so that everything appears to be good and proper in error
* messages. Note that we cannot just concatenate and send through
* Tcl_EvalObjEx, as that doesn't do ensemble processing, and we
* cannot go through Tcl_EvalObjv without the extra work to pre-find
* the command, as that finds command names in the wrong namespace at
* the moment. Ugly!
*/
isRoot = TclInitRewriteEnsemble(interp, 3, 1, objv);
/*
* Build the list of arguments using a Tcl_Obj as a workspace. See
* comments above for why these contortions are necessary.
*/
objPtr = Tcl_NewObj();
obj2Ptr = Tcl_NewObj();
cmd = FindCommand(interp, objv[2], fPtr->defineNs);
if (cmd == NULL) {
/* punt this case! */
Tcl_AppendObjToObj(obj2Ptr, objv[2]);
} else {
Tcl_GetCommandFullName(interp, cmd, obj2Ptr);
}
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
/* TODO: overflow? */
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-3, objv+3);
Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE);
if (isRoot) {
TclResetRewriteEnsemble(interp, 1);
}
Tcl_DecrRefCount(objPtr);
result = MagicDefinitionInvoke(interp, fPtr->defineNs, 2, objc, objv);
}
DelRef(oPtr);
@@ -918,8 +945,8 @@ TclOOObjDefObjCmd(
Tcl_Obj *const *objv)
{
Foundation *fPtr = TclOOGetFoundation(interp);
int isRoot, result;
Object *oPtr;
int result;
if (objc < 3) {
Tcl_WrongNumArgs(interp, 1, objv, "objectName arg ?arg ...?");
@@ -952,47 +979,7 @@ TclOOObjDefObjCmd(
}
TclDecrRefCount(objNameObj);
} else {
Tcl_Obj *objPtr, *obj2Ptr, **objs;
Tcl_Command cmd;
int dummy;
/*
* More than one argument: fire them through the ensemble processing
* engine so that everything appears to be good and proper in error
* messages. Note that we cannot just concatenate and send through
* Tcl_EvalObjEx, as that doesn't do ensemble processing, and we
* cannot go through Tcl_EvalObjv without the extra work to pre-find
* the command, as that finds command names in the wrong namespace at
* the moment. Ugly!
*/
isRoot = TclInitRewriteEnsemble(interp, 3, 1, objv);
/*
* Build the list of arguments using a Tcl_Obj as a workspace. See
* comments above for why these contortions are necessary.
*/
objPtr = Tcl_NewObj();
obj2Ptr = Tcl_NewObj();
cmd = FindCommand(interp, objv[2], fPtr->objdefNs);
if (cmd == NULL) {
/* punt this case! */
Tcl_AppendObjToObj(obj2Ptr, objv[2]);
} else {
Tcl_GetCommandFullName(interp, cmd, obj2Ptr);
}
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
/* TODO: overflow? */
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-3, objv+3);
Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
result = Tcl_EvalObjv(interp, objc-2, objs, TCL_EVAL_INVOKE);
if (isRoot) {
TclResetRewriteEnsemble(interp, 1);
}
Tcl_DecrRefCount(objPtr);
result = MagicDefinitionInvoke(interp, fPtr->objdefNs, 2, objc, objv);
}
DelRef(oPtr);
@@ -1025,8 +1012,8 @@ TclOODefineSelfObjCmd(
Tcl_Obj *const *objv)
{
Foundation *fPtr = TclOOGetFoundation(interp);
int result;
Object *oPtr;
int result;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "arg ?arg ...?");
@@ -1059,46 +1046,7 @@ TclOODefineSelfObjCmd(
}
TclDecrRefCount(objNameObj);
} else {
Tcl_Obj *objPtr, *obj2Ptr, **objs;
Tcl_Command cmd;
int isRoot, dummy;
/*
* More than one argument: fire them through the ensemble processing
* engine so that everything appears to be good and proper in error
* messages. Note that we cannot just concatenate and send through
* Tcl_EvalObjEx, as that doesn't do ensemble processing, and we
* cannot go through Tcl_EvalObjv without the extra work to pre-find
* the command, as that finds command names in the wrong namespace at
* the moment. Ugly!
*/
isRoot = TclInitRewriteEnsemble(interp, 2, 1, objv);
/*
* Build the list of arguments using a Tcl_Obj as a workspace. See
* comments above for why these contortions are necessary.
*/
objPtr = Tcl_NewObj();
obj2Ptr = Tcl_NewObj();
cmd = FindCommand(interp, objv[1], fPtr->objdefNs);
if (cmd == NULL) {
/* punt this case! */
Tcl_AppendObjToObj(obj2Ptr, objv[1]);
} else {
Tcl_GetCommandFullName(interp, cmd, obj2Ptr);
}
Tcl_ListObjAppendElement(NULL, objPtr, obj2Ptr);
/* TODO: overflow? */
Tcl_ListObjReplace(NULL, objPtr, 1, 0, objc-2, objv+2);
Tcl_ListObjGetElements(NULL, objPtr, &dummy, &objs);
result = Tcl_EvalObjv(interp, objc-1, objs, TCL_EVAL_INVOKE);
if (isRoot) {
TclResetRewriteEnsemble(interp, 1);
}
Tcl_DecrRefCount(objPtr);
result = MagicDefinitionInvoke(interp, fPtr->objdefNs, 1, objc, objv);
}
DelRef(oPtr);
+1
View File
@@ -1314,6 +1314,7 @@ CloneProcedureMethod(
*/
bodyObj = Tcl_DuplicateObj(pmPtr->procPtr->bodyPtr);
Tcl_GetString(bodyObj);
TclFreeIntRep(bodyObj);
/*
+18
View File
@@ -4488,6 +4488,24 @@ Tcl_RepresentationCmd(
objv[1]->typePtr ? objv[1]->typePtr->name : "pure string",
objv[1]->refCount, ptrBuffer);
/*
* This is a workaround to silence reports from `make valgrind`
* on 64-bit systems. The problem is that the test suite
* includes calling the [represenation] command on values of
* &tclDoubleType. When these values are created, the "doubleValue"
* is set, but when the "twoPtrValue" is examined, its "ptr2"
* field has never been initialized. Since [representation]
* presents the value of the ptr2 value in its output, valgrind
* alerts about the read of uninitialized memory.
*
* The general problem with [representation], that it can read
* and report uninitialized fields, is still present. This is
* just the minimal workaround to silence one particular test.
*/
if ((sizeof(void *) > 4) && objv[1]->typePtr == &tclDoubleType) {
objv[1]->internalRep.twoPtrValue.ptr2 = NULL;
}
if (objv[1]->typePtr) {
sprintf(ptrBuffer, "%p:%p",
(void *) objv[1]->internalRep.twoPtrValue.ptr1,
+1 -1
View File
@@ -111,7 +111,7 @@ Tcl_PanicVA(
__builtin_trap();
# elif defined(_WIN64)
__debugbreak();
# elif defined(_MSC_VER)
# elif defined(_MSC_VER) && defined (_M_IX86)
_asm {int 3}
# else
DebugBreak();
+7 -4
View File
@@ -841,7 +841,7 @@ TclParseBackslash(
* written there. */
{
register const char *p = src+1;
Tcl_UniChar unichar;
Tcl_UniChar unichar = 0;
int result;
int count;
char buf[TCL_UTF_MAX];
@@ -975,13 +975,13 @@ TclParseBackslash(
*/
if (Tcl_UtfCharComplete(p, numBytes - 1)) {
count = Tcl_UtfToUniChar(p, &unichar) + 1; /* +1 for '\' */
count = TclUtfToUniChar(p, &unichar) + 1; /* +1 for '\' */
} else {
char utfBytes[TCL_UTF_MAX];
memcpy(utfBytes, p, (size_t) (numBytes - 1));
utfBytes[numBytes - 1] = '\0';
count = Tcl_UtfToUniChar(utfBytes, &unichar) + 1;
count = TclUtfToUniChar(utfBytes, &unichar) + 1;
}
result = unichar;
break;
@@ -1193,6 +1193,8 @@ ParseTokens(
numBytes--;
nestedPtr = TclStackAlloc(parsePtr->interp, sizeof(Tcl_Parse));
while (1) {
const char *curEnd;
if (Tcl_ParseCommand(parsePtr->interp, src, numBytes, 1,
nestedPtr) != TCL_OK) {
parsePtr->errorType = nestedPtr->errorType;
@@ -1201,8 +1203,9 @@ ParseTokens(
TclStackFree(parsePtr->interp, nestedPtr);
return TCL_ERROR;
}
curEnd = src + numBytes;
src = nestedPtr->commandStart + nestedPtr->commandSize;
numBytes = parsePtr->end - src;
numBytes = curEnd - src;
Tcl_FreeParse(nestedPtr);
/*
+47 -30
View File
@@ -13,6 +13,7 @@
#include "tclInt.h"
#include "tclFileSystem.h"
#include <assert.h>
/*
* Prototypes for functions defined later in this file.
@@ -849,18 +850,20 @@ TclJoinPath(
int elements,
Tcl_Obj * const objv[])
{
Tcl_Obj *res;
Tcl_Obj *res = NULL;
int i;
const Tcl_Filesystem *fsPtr = NULL;
res = NULL;
assert ( elements >= 0 );
for (i = 0; i < elements; i++) {
int driveNameLength, strEltLen, length;
Tcl_PathType type;
char *strElt, *ptr;
Tcl_Obj *driveName = NULL;
Tcl_Obj *elt = objv[i];
if (elements == 0) {
return Tcl_NewObj();
}
assert ( elements > 0 );
if (elements == 2) {
Tcl_Obj *elt = objv[0];
/*
* This is a special case where we can be much more efficient, where
@@ -869,18 +872,17 @@ TclJoinPath(
* object which can be normalized more efficiently. Currently we only
* use the special case when we have exactly two elements, but we
* could expand that in the future.
*
* Bugfix [a47641a0]. TclNewFSPathObj requires first argument
* to be an absolute path. Added a check for that elt is absolute.
*
* Bugfix [a47641a0]. TclNewFSPathObj requires first argument
* to be an absolute path. Added a check for that elt is absolute.
*/
if ((i == (elements-2)) && (i == 0)
&& (elt->typePtr == &tclFsPathType)
if ((elt->typePtr == &tclFsPathType)
&& !((elt->bytes != NULL) && (elt->bytes[0] == '\0'))
&& TclGetPathType(elt, NULL, NULL, NULL) == TCL_PATH_ABSOLUTE) {
Tcl_Obj *tailObj = objv[i+1];
Tcl_Obj *tailObj = objv[1];
Tcl_PathType type = TclGetPathType(tailObj, NULL, NULL, NULL);
type = TclGetPathType(tailObj, NULL, NULL, NULL);
if (type == TCL_PATH_RELATIVE) {
const char *str;
int len;
@@ -893,9 +895,6 @@ TclJoinPath(
* the base itself is just fine!
*/
if (res != NULL) {
TclDecrRefCount(res);
}
return elt;
}
@@ -918,10 +917,17 @@ TclJoinPath(
if ((tclPlatform != TCL_PLATFORM_WINDOWS)
|| (strchr(Tcl_GetString(elt), '\\') == NULL)) {
if (res != NULL) {
TclDecrRefCount(res);
if (PATHFLAGS(elt)) {
return TclNewFSPathObj(elt, str, len);
}
if (TCL_PATH_ABSOLUTE != Tcl_FSGetPathType(elt)) {
return TclNewFSPathObj(elt, str, len);
}
(void) Tcl_FSGetNormalizedPath(NULL, elt);
if (elt == PATHOBJ(elt)->normPathPtr) {
return TclNewFSPathObj(elt, str, len);
}
return TclNewFSPathObj(elt, str, len);
}
}
@@ -930,24 +936,30 @@ TclJoinPath(
* more general code below handle things.
*/
} else if (tclPlatform == TCL_PLATFORM_UNIX) {
if (res != NULL) {
TclDecrRefCount(res);
}
return tailObj;
} else {
const char *str = TclGetString(tailObj);
if (tclPlatform == TCL_PLATFORM_WINDOWS) {
if (strchr(str, '\\') == NULL) {
if (res != NULL) {
TclDecrRefCount(res);
}
return tailObj;
}
}
}
}
}
assert ( res == NULL );
for (i = 0; i < elements; i++) {
int driveNameLength, strEltLen, length;
Tcl_PathType type;
char *strElt, *ptr;
Tcl_Obj *driveName = NULL;
Tcl_Obj *elt = objv[i];
strElt = Tcl_GetStringFromObj(elt, &strEltLen);
driveNameLength = 0;
type = TclGetPathType(elt, &fsPtr, &driveNameLength, &driveName);
if (type != TCL_PATH_RELATIVE) {
/*
@@ -1003,6 +1015,12 @@ TclJoinPath(
}
}
ptr = strElt;
/* [Bug f34cf83dd0] */
if (driveNameLength > 0) {
if (ptr[0] == '/' && ptr[-1] == '/') {
goto noQuickReturn;
}
}
while (*ptr != '\0') {
if (*ptr == '/' && (ptr[1] == '/' || ptr[1] == '\0')) {
/*
@@ -1070,6 +1088,7 @@ TclJoinPath(
if (sep != NULL) {
separator = TclGetString(sep)[0];
Tcl_DecrRefCount(sep);
}
/* Safety check in case the VFS driver caused sharing */
if (Tcl_IsShared(res)) {
@@ -1105,9 +1124,7 @@ TclJoinPath(
Tcl_SetObjLength(res, length);
}
}
if (res == NULL) {
res = Tcl_NewObj();
}
assert ( res != NULL );
return res;
}
+7 -1
View File
@@ -668,7 +668,13 @@ TclCreatePipeline(
if (*p == '>') {
p++;
atOK = 0;
flags = O_WRONLY | O_CREAT;
/*
* Note that the O_APPEND flag only has an effect on POSIX
* platforms. On Windows, we just have to carry on regardless.
*/
flags = O_WRONLY | O_CREAT | O_APPEND;
}
if (errorClose != 0) {
errorClose = 0;
+35
View File
@@ -2773,6 +2773,41 @@ MakeLambdaError(
(overflow ? "..." : ""), Tcl_GetErrorLine(interp)));
}
/*
*----------------------------------------------------------------------
*
* TclGetCmdFrameForProcedure --
*
* How to get the CmdFrame information for a procedure.
*
* Results:
* A pointer to the CmdFrame (only guaranteed to be valid until the next
* Tcl command is processed or the interpreter's state is otherwise
* modified) or a NULL if the information is not available.
*
* Side effects:
* none.
*
*----------------------------------------------------------------------
*/
CmdFrame *
TclGetCmdFrameForProcedure(
Proc *procPtr) /* The procedure whose cmd-frame is to be
* looked up. */
{
Tcl_HashEntry *hePtr;
if (procPtr == NULL || procPtr->iPtr == NULL) {
return NULL;
}
hePtr = Tcl_FindHashEntry(procPtr->iPtr->linePBodyPtr, procPtr);
if (hePtr == NULL) {
return NULL;
}
return (CmdFrame *) Tcl_GetHashValue(hePtr);
}
/*
* Local Variables:
* mode: c
+11 -4
View File
@@ -502,10 +502,17 @@ Tcl_RegExpMatchObj(
{
Tcl_RegExp re;
re = Tcl_GetRegExpFromObj(interp, patternObj,
TCL_REG_ADVANCED | TCL_REG_NOSUB);
if (re == NULL) {
return -1;
/*
* For performance reasons, first try compiling the RE without support for
* subexpressions. On failure, try again without TCL_REG_NOSUB in case the
* RE has backreferences in it. Closely related to [Bug 1366683]. If this
* still fails, an error message will be left in the interpreter.
*/
if (!(re = Tcl_GetRegExpFromObj(interp, patternObj,
TCL_REG_ADVANCED | TCL_REG_NOSUB))
&& !(re = Tcl_GetRegExpFromObj(interp, patternObj, TCL_REG_ADVANCED))) {
return -1;
}
return Tcl_RegExpExecObj(interp, re, textObj, 0 /* offset */,
0 /* nmatches */, 0 /* flags */);
+36 -36
View File
@@ -72,17 +72,17 @@ BuildCharSet(
CharSet *cset,
const char *format) /* Points to first char of set. */
{
Tcl_UniChar ch, start;
Tcl_UniChar ch = 0, start;
int offset, nranges;
const char *end;
memset(cset, 0, sizeof(CharSet));
offset = Tcl_UtfToUniChar(format, &ch);
offset = TclUtfToUniChar(format, &ch);
if (ch == '^') {
cset->exclude = 1;
format += offset;
offset = Tcl_UtfToUniChar(format, &ch);
offset = TclUtfToUniChar(format, &ch);
}
end = format + offset;
@@ -91,14 +91,14 @@ BuildCharSet(
*/
if (ch == ']') {
end += Tcl_UtfToUniChar(end, &ch);
end += TclUtfToUniChar(end, &ch);
}
nranges = 0;
while (ch != ']') {
if (ch == '-') {
nranges++;
}
end += Tcl_UtfToUniChar(end, &ch);
end += TclUtfToUniChar(end, &ch);
}
cset->chars = ckalloc(sizeof(Tcl_UniChar) * (end - format - 1));
@@ -113,11 +113,11 @@ BuildCharSet(
*/
cset->nchars = cset->nranges = 0;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
start = ch;
if (ch == ']' || ch == '-') {
cset->chars[cset->nchars++] = ch;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
while (ch != ']') {
if (*format == '-') {
@@ -138,7 +138,7 @@ BuildCharSet(
cset->chars[cset->nchars++] = start;
cset->chars[cset->nchars++] = ch;
} else {
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
/*
* Check to see if the range is in reverse order.
@@ -156,7 +156,7 @@ BuildCharSet(
} else {
cset->chars[cset->nchars++] = ch;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
return format;
}
@@ -257,7 +257,7 @@ ValidateFormat(
{
int gotXpg, gotSequential, value, i, flags;
char *end;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int objIndex, xpgSize, nspace = numVars;
int *nassign = TclStackAlloc(interp, nspace * sizeof(int));
char buf[TCL_UTF_MAX+1];
@@ -279,20 +279,20 @@ ValidateFormat(
xpgSize = objIndex = gotXpg = gotSequential = 0;
while (*format != '\0') {
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
flags = 0;
if (ch != '%') {
continue;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
if (ch == '%') {
continue;
}
if (ch == '*') {
flags |= SCAN_SUPPRESS;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
goto xpgCheckDone;
}
@@ -308,7 +308,7 @@ ValidateFormat(
goto notXpg;
}
format = end+1;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
gotXpg = 1;
if (gotSequential) {
goto mixedXPG;
@@ -347,7 +347,7 @@ ValidateFormat(
if ((ch < 0x80) && isdigit(UCHAR(ch))) { /* INTL: "C" locale. */
value = strtoul(format-1, (char **) &format, 10); /* INTL: "C" locale. */
flags |= SCAN_WIDTH;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
/*
@@ -359,13 +359,13 @@ ValidateFormat(
if (*format == 'l') {
flags |= SCAN_BIG;
format += 1;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
break;
}
case 'L':
flags |= SCAN_LONGER;
case 'h':
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
if (!(flags & SCAN_SUPPRESS) && numVars && (objIndex >= numVars)) {
@@ -434,24 +434,24 @@ ValidateFormat(
if (*format == '\0') {
goto badSet;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
if (ch == '^') {
if (*format == '\0') {
goto badSet;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
if (ch == ']') {
if (*format == '\0') {
goto badSet;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
while (ch != ']') {
if (*format == '\0') {
goto badSet;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
break;
badSet:
@@ -582,7 +582,7 @@ Tcl_ScanObjCmd(
char op = 0;
int width, underflow = 0;
Tcl_WideInt wideValue;
Tcl_UniChar ch, sch;
Tcl_UniChar ch = 0, sch = 0;
Tcl_Obj **objs = NULL, *objPtr = NULL;
int flags;
char buf[513]; /* Temporary buffer to hold scanned number
@@ -630,7 +630,7 @@ Tcl_ScanObjCmd(
nconversions = 0;
while (*format != '\0') {
int parseFlag = TCL_PARSE_NO_WHITESPACE;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
flags = 0;
@@ -639,13 +639,13 @@ Tcl_ScanObjCmd(
*/
if (Tcl_UniCharIsSpace(ch)) {
offset = Tcl_UtfToUniChar(string, &sch);
offset = TclUtfToUniChar(string, &sch);
while (Tcl_UniCharIsSpace(sch)) {
if (*string == '\0') {
goto done;
}
string += offset;
offset = Tcl_UtfToUniChar(string, &sch);
offset = TclUtfToUniChar(string, &sch);
}
continue;
}
@@ -656,14 +656,14 @@ Tcl_ScanObjCmd(
underflow = 1;
goto done;
}
string += Tcl_UtfToUniChar(string, &sch);
string += TclUtfToUniChar(string, &sch);
if (ch != sch) {
goto done;
}
continue;
}
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
if (ch == '%') {
goto literal;
}
@@ -675,13 +675,13 @@ Tcl_ScanObjCmd(
if (ch == '*') {
flags |= SCAN_SUPPRESS;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
} else if ((ch < 0x80) && isdigit(UCHAR(ch))) { /* INTL: "C" locale. */
char *formatEnd;
value = strtoul(format-1, &formatEnd, 10);/* INTL: "C" locale. */
if (*formatEnd == '$') {
format = formatEnd+1;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
objIndex = (int) value - 1;
}
}
@@ -692,7 +692,7 @@ Tcl_ScanObjCmd(
if ((ch < 0x80) && isdigit(UCHAR(ch))) { /* INTL: "C" locale. */
width = (int) strtoul(format-1, (char **) &format, 10);/* INTL: "C" locale. */
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
} else {
width = 0;
}
@@ -706,7 +706,7 @@ Tcl_ScanObjCmd(
if (*format == 'l') {
flags |= SCAN_BIG;
format += 1;
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
break;
}
case 'L':
@@ -715,7 +715,7 @@ Tcl_ScanObjCmd(
* Fall through so we skip to the next character.
*/
case 'h':
format += Tcl_UtfToUniChar(format, &ch);
format += TclUtfToUniChar(format, &ch);
}
/*
@@ -799,7 +799,7 @@ Tcl_ScanObjCmd(
if (!(flags & SCAN_NOSKIP)) {
while (*string != '\0') {
offset = Tcl_UtfToUniChar(string, &sch);
offset = TclUtfToUniChar(string, &sch);
if (!Tcl_UniCharIsSpace(sch)) {
break;
}
@@ -826,7 +826,7 @@ Tcl_ScanObjCmd(
}
end = string;
while (*end != '\0') {
offset = Tcl_UtfToUniChar(end, &sch);
offset = TclUtfToUniChar(end, &sch);
if (Tcl_UniCharIsSpace(sch)) {
break;
}
@@ -854,7 +854,7 @@ Tcl_ScanObjCmd(
format = BuildCharSet(&cset, format);
while (*end != '\0') {
offset = Tcl_UtfToUniChar(end, &sch);
offset = TclUtfToUniChar(end, &sch);
if (!CharInSet(&cset, (int)sch)) {
break;
}
@@ -885,7 +885,7 @@ Tcl_ScanObjCmd(
* Scan a single Unicode character.
*/
string += Tcl_UtfToUniChar(string, &sch);
string += TclUtfToUniChar(string, &sch);
if (!(flags & SCAN_SUPPRESS)) {
objPtr = Tcl_NewIntObj((int)sch);
Tcl_IncrRefCount(objPtr);
+29 -29
View File
@@ -1183,9 +1183,9 @@ TclParseNumber(
case sNA:
case sNANPAREN:
case sNANHEX:
#endif
Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'",
acceptState, bytes);
#endif
case BINARY:
shift = numTrailZeros;
if (!significandOverflow && significandWide != 0 &&
@@ -1973,7 +1973,7 @@ RefineApproximation(
*----------------------------------------------------------------------
*/
inline static void
static inline void
MulPow5(
mp_int *base, /* Number to multiply. */
unsigned n, /* Power of 5 to multiply by. */
@@ -2018,7 +2018,7 @@ MulPow5(
*----------------------------------------------------------------------
*/
inline static int
static inline int
NormalizeRightward(
Tcl_WideUInt *wPtr) /* INOUT: Number to shift. */
{
@@ -2109,7 +2109,7 @@ RequiredPrecision(
*----------------------------------------------------------------------
*/
inline static void
static inline void
DoubleToExpAndSig(
double dv, /* Number to convert. */
Tcl_WideUInt *significand, /* OUTPUT: Significand of the number. */
@@ -2157,7 +2157,7 @@ DoubleToExpAndSig(
*----------------------------------------------------------------------
*/
inline static void
static inline void
TakeAbsoluteValue(
Double *d, /* Number to replace with absolute value. */
int *sign) /* Place to put the signum. */
@@ -2188,7 +2188,7 @@ TakeAbsoluteValue(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
FormatInfAndNaN(
Double *d, /* Exceptional number to format. */
int *decpt, /* Decimal point to set to a bogus value. */
@@ -2230,7 +2230,7 @@ FormatInfAndNaN(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
FormatZero(
int *decpt, /* Location of the decimal point. */
char **endPtr) /* Pointer to the end of the formatted data */
@@ -2260,7 +2260,7 @@ FormatZero(
*----------------------------------------------------------------------
*/
inline static int
static inline int
ApproximateLog10(
Tcl_WideUInt bw, /* Integer significand of the number. */
int be, /* Power of two to scale bw. */
@@ -2308,7 +2308,7 @@ ApproximateLog10(
*----------------------------------------------------------------------
*/
inline static int
static inline int
BetterLog10(
double d, /* Original number to format. */
int k, /* Characteristic(Log base 10) of the
@@ -2351,7 +2351,7 @@ BetterLog10(
*----------------------------------------------------------------------
*/
inline static void
static inline void
ComputeScale(
int be, /* Exponent part of number: d = bw * 2**be. */
int k, /* Characteristic of log10(number). */
@@ -2414,7 +2414,7 @@ ComputeScale(
*----------------------------------------------------------------------
*/
inline static void
static inline void
SetPrecisionLimits(
int convType, /* Type of conversion: TCL_DD_SHORTEST,
* TCL_DD_STEELE0, TCL_DD_E_FMT,
@@ -2475,7 +2475,7 @@ SetPrecisionLimits(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
BumpUp(
char *s, /* Cursor pointing one past the end of the
* string. */
@@ -2509,7 +2509,7 @@ BumpUp(
*----------------------------------------------------------------------
*/
inline static int
static inline int
AdjustRange(
double *dPtr, /* INOUT: Number to adjust. */
int k) /* IN: floor(log10(d)) */
@@ -2582,7 +2582,7 @@ AdjustRange(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
ShorteningQuickFormat(
double d, /* Number to convert. */
int k, /* floor(log10(d)) */
@@ -2657,7 +2657,7 @@ ShorteningQuickFormat(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
StrictQuickFormat(
double d, /* Number to convert. */
int k, /* floor(log10(d)) */
@@ -2731,7 +2731,7 @@ StrictQuickFormat(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
QuickConversion(
double e, /* Number to format. */
int k, /* floor(log10(d)), approximately. */
@@ -2836,7 +2836,7 @@ QuickConversion(
*----------------------------------------------------------------------
*/
inline static void
static inline void
CastOutPowersOf2(
int *b2, /* Power of 2 to multiply the significand. */
int *m2, /* Power of 2 to multiply 1/2 ulp. */
@@ -2880,7 +2880,7 @@ CastOutPowersOf2(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
ShorteningInt64Conversion(
Double *dPtr, /* Original number to convert. */
int convType, /* Type of conversion (shortest, Steele,
@@ -3049,7 +3049,7 @@ ShorteningInt64Conversion(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
StrictInt64Conversion(
Double *dPtr, /* Original number to convert. */
int convType, /* Type of conversion (shortest, Steele,
@@ -3155,7 +3155,7 @@ StrictInt64Conversion(
*----------------------------------------------------------------------
*/
inline static int
static inline int
ShouldBankerRoundUpPowD(
mp_int *b, /* Numerator of the fraction. */
int sd, /* Denominator is 2**(sd*DIGIT_BIT). */
@@ -3193,7 +3193,7 @@ ShouldBankerRoundUpPowD(
*----------------------------------------------------------------------
*/
inline static int
static inline int
ShouldBankerRoundUpToNextPowD(
mp_int *b, /* Numerator of the fraction. */
mp_int *m, /* Numerator of the rounding tolerance. */
@@ -3256,7 +3256,7 @@ ShouldBankerRoundUpToNextPowD(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
ShorteningBignumConversionPowD(
Double *dPtr, /* Original number to convert. */
int convType, /* Type of conversion (shortest, Steele,
@@ -3449,7 +3449,7 @@ ShorteningBignumConversionPowD(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
StrictBignumConversionPowD(
Double *dPtr, /* Original number to convert. */
int convType, /* Type of conversion (shortest, Steele,
@@ -3565,7 +3565,7 @@ StrictBignumConversionPowD(
*----------------------------------------------------------------------
*/
inline static int
static inline int
ShouldBankerRoundUp(
mp_int *twor, /* 2x the remainder from thd division that
* produced the last digit. */
@@ -3600,7 +3600,7 @@ ShouldBankerRoundUp(
*----------------------------------------------------------------------
*/
inline static int
static inline int
ShouldBankerRoundUpToNext(
mp_int *b, /* Remainder from the division that produced
* the last digit. */
@@ -3654,7 +3654,7 @@ ShouldBankerRoundUpToNext(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
ShorteningBignumConversion(
Double *dPtr, /* Original number being converted. */
int convType, /* Conversion type. */
@@ -3798,7 +3798,7 @@ ShorteningBignumConversion(
--s5;
/*
* IDEA: It might possibly be a win to fall back to int64
* IDEA: It might possibly be a win to fall back to int64_t
* arithmetic here if S < 2**64/10. But it's a win only for
* a fairly narrow range of magnitudes so perhaps not worth
* bothering. We already know that we shorten the
@@ -3870,7 +3870,7 @@ ShorteningBignumConversion(
*----------------------------------------------------------------------
*/
inline static char *
static inline char *
StrictBignumConversion(
Double *dPtr, /* Original number being converted. */
int convType, /* Conversion type. */
@@ -3963,7 +3963,7 @@ StrictBignumConversion(
* As with the shortening bignum conversion, it's possible at this
* point that we will have reduced the denominator to less than
* 2**64/10, at which point it would be possible to fall back to
* to int64 arithmetic. But the potential payoff is tremendously
* to int64_t arithmetic. But the potential payoff is tremendously
* less - unless we're working in F format - because we know that
* three groups of digits will always suffice for %#.17e, the
* longest format that doesn't introduce empty precision.
+36 -30
View File
@@ -1682,6 +1682,7 @@ Tcl_AppendFormatToObj(
const char *span = format, *msg, *errCode;
int numBytes = 0, objIndex = 0, gotXpg = 0, gotSequential = 0;
int originalLength, limit;
Tcl_UniChar ch = 0;
static const char *mixedXPG =
"cannot mix \"%\" and \"%n$\" conversion specifiers";
static const char *const badIndex[2] = {
@@ -1702,12 +1703,14 @@ Tcl_AppendFormatToObj(
while (*format != '\0') {
char *end;
int gotMinus, gotHash, gotZero, gotSpace, gotPlus, sawFlag;
int width, gotPrecision, precision, useShort, useWide, useBig;
int gotMinus = 0, gotHash = 0, gotZero = 0, gotSpace = 0, gotPlus = 0;
int width, gotPrecision, precision, sawFlag, useShort = 0, useBig = 0;
#ifndef TCL_WIDE_INT_IS_LONG
int useWide = 0;
#endif
int newXpg, numChars, allocSegment = 0, segmentLimit, segmentNumBytes;
Tcl_Obj *segment;
Tcl_UniChar ch;
int step = Tcl_UtfToUniChar(format, &ch);
int step = TclUtfToUniChar(format, &ch);
format += step;
if (ch != '%') {
@@ -1731,7 +1734,7 @@ Tcl_AppendFormatToObj(
* Step 0. Handle special case of escaped format marker (i.e., %%).
*/
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
if (ch == '%') {
span = format;
numBytes = step;
@@ -1751,7 +1754,7 @@ Tcl_AppendFormatToObj(
newXpg = 1;
objIndex = position - 1;
format = end + 1;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
}
}
if (newXpg) {
@@ -1779,7 +1782,6 @@ Tcl_AppendFormatToObj(
* Step 2. Set of flags.
*/
gotMinus = gotHash = gotZero = gotSpace = gotPlus = 0;
sawFlag = 1;
do {
switch (ch) {
@@ -1803,7 +1805,7 @@ Tcl_AppendFormatToObj(
}
if (sawFlag) {
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
}
} while (sawFlag);
@@ -1815,7 +1817,7 @@ Tcl_AppendFormatToObj(
if (isdigit(UCHAR(ch))) {
width = strtoul(format, &end, 10);
format = end;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
} else if (ch == '*') {
if (objIndex >= objc - 1) {
msg = badIndex[gotXpg];
@@ -1831,7 +1833,7 @@ Tcl_AppendFormatToObj(
}
objIndex++;
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
}
if (width > limit) {
msg = overflow;
@@ -1847,12 +1849,12 @@ Tcl_AppendFormatToObj(
if (ch == '.') {
gotPrecision = 1;
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
}
if (isdigit(UCHAR(ch))) {
precision = strtoul(format, &end, 10);
format = end;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
} else if (ch == '*') {
if (objIndex >= objc - 1) {
msg = badIndex[gotXpg];
@@ -1873,25 +1875,24 @@ Tcl_AppendFormatToObj(
}
objIndex++;
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
}
/*
* Step 5. Length modifier.
*/
useShort = useWide = useBig = 0;
if (ch == 'h') {
useShort = 1;
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
} else if (ch == 'l') {
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
if (ch == 'l') {
useBig = 1;
format += step;
step = Tcl_UtfToUniChar(format, &ch);
step = TclUtfToUniChar(format, &ch);
#ifndef TCL_WIDE_INT_IS_LONG
} else {
useWide = 1;
@@ -1964,6 +1965,7 @@ Tcl_AppendFormatToObj(
goto error;
}
isNegative = (mp_cmp_d(&big, 0) == MP_LT);
#ifndef TCL_WIDE_INT_IS_LONG
} else if (useWide) {
if (Tcl_GetWideIntFromObj(NULL, segment, &w) != TCL_OK) {
Tcl_Obj *objPtr;
@@ -1978,6 +1980,7 @@ Tcl_AppendFormatToObj(
Tcl_DecrRefCount(objPtr);
}
isNegative = (w < (Tcl_WideInt) 0);
#endif
} else if (TclGetLongFromObj(NULL, segment, &l) != TCL_OK) {
if (Tcl_GetWideIntFromObj(NULL, segment, &w) != TCL_OK) {
Tcl_Obj *objPtr;
@@ -2024,8 +2027,11 @@ Tcl_AppendFormatToObj(
segmentLimit -= 1;
precision--;
break;
case 'x':
case 'X':
Tcl_AppendToObj(segment, "0X", 2);
segmentLimit -= 2;
break;
case 'x':
Tcl_AppendToObj(segment, "0x", 2);
segmentLimit -= 2;
break;
@@ -2044,8 +2050,10 @@ Tcl_AppendFormatToObj(
if (useShort) {
pure = Tcl_NewIntObj((int) s);
#ifndef TCL_WIDE_INT_IS_LONG
} else if (useWide) {
pure = Tcl_NewWideIntObj(w);
#endif
} else if (useBig) {
pure = Tcl_NewBignumObj(&big);
} else {
@@ -2128,6 +2136,7 @@ Tcl_AppendFormatToObj(
numDigits++;
us /= base;
}
#ifndef TCL_WIDE_INT_IS_LONG
} else if (useWide) {
Tcl_WideUInt uw = (Tcl_WideUInt) w;
@@ -2136,6 +2145,7 @@ Tcl_AppendFormatToObj(
numDigits++;
uw /= base;
}
#endif
} else if (useBig && big.used) {
int leftover = (big.used * DIGIT_BIT) % numBits;
mp_digit mask = (~(mp_digit)0) << (DIGIT_BIT-leftover);
@@ -2185,7 +2195,11 @@ Tcl_AppendFormatToObj(
}
digitOffset = (int) (bits % base);
if (digitOffset > 9) {
bytes[numDigits] = 'a' + digitOffset - 10;
if (ch == 'X') {
bytes[numDigits] = 'A' + digitOffset - 10;
} else {
bytes[numDigits] = 'a' + digitOffset - 10;
}
} else {
bytes[numDigits] = '0' + digitOffset;
}
@@ -2307,14 +2321,6 @@ Tcl_AppendFormatToObj(
goto error;
}
switch (ch) {
case 'E':
case 'G':
case 'X': {
Tcl_SetObjLength(segment, Tcl_UtfToUpper(TclGetString(segment)));
}
}
if (width>0 && numChars<0) {
numChars = Tcl_GetCharLength(segment);
}
@@ -2328,7 +2334,7 @@ Tcl_AppendFormatToObj(
}
}
Tcl_GetStringFromObj(segment, &segmentNumBytes);
TclGetStringFromObj(segment, &segmentNumBytes);
if (segmentNumBytes > limit) {
if (allocSegment) {
Tcl_DecrRefCount(segment);
@@ -2686,7 +2692,7 @@ TclStringObjReverse(
Tcl_Obj *objPtr)
{
String *stringPtr;
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
if (TclIsPureByteArray(objPtr)) {
int numBytes;
@@ -2760,7 +2766,7 @@ TclStringObjReverse(
* It's part of the contract for objPtr->bytes values.
* Thus, we can skip calling Tcl_UtfCharComplete() here.
*/
int bytesInChar = Tcl_UtfToUniChar(from, &ch);
int bytesInChar = TclUtfToUniChar(from, &ch);
ReverseBytes((unsigned char *)to, (unsigned char *)from,
bytesInChar);
+5
View File
@@ -560,6 +560,11 @@ static const TclIntStubs tclIntStubs = {
TclDoubleDigits, /* 249 */
TclSetSlaveCancelFlags, /* 250 */
TclRegisterLiteral, /* 251 */
TclPtrGetVar, /* 252 */
TclPtrSetVar, /* 253 */
TclPtrIncrObjVar, /* 254 */
TclPtrObjMakeUpvar, /* 255 */
TclPtrUnsetVar, /* 256 */
};
static const TclIntPlatStubs tclIntPlatStubs = {
+1 -1
View File
@@ -6672,7 +6672,7 @@ TestNumUtfCharsCmd(
int len = -1;
if (objc > 2) {
(void) Tcl_GetStringFromObj(objv[1], &len);
(void) Tcl_GetIntFromObj(interp, objv[2], &len);
}
len = Tcl_NumUtfChars(Tcl_GetString(objv[1]), len);
Tcl_SetObjResult(interp, Tcl_NewIntObj(len));
+1 -1
View File
@@ -341,7 +341,7 @@ ThreadObjCmd(
} else if (objc == 3
&& strcmp("-main", Tcl_GetString(objv[2])) == 0) {
Tcl_MutexLock(&threadMutex);
idObj = Tcl_NewLongObj((long)(size_t)mainThreadId);
idObj = Tcl_NewWideIntObj((Tcl_WideInt)(size_t)mainThreadId);
Tcl_MutexUnlock(&threadMutex);
} else {
Tcl_WrongNumArgs(interp, 2, objv, NULL);
+6 -6
View File
@@ -87,7 +87,7 @@ extern "C" {
# define DIGIT_BIT 60
#else
/* this is the default case, 28-bit digits */
/* this is to make porting into LibTomCrypt easier :-) */
#ifndef CRYPT
# if defined(_MSC_VER) || defined(__BORLANDC__)
@@ -105,14 +105,14 @@ extern "C" {
#endif
typedef ulong64 mp_word;
#ifdef MP_31BIT
#ifdef MP_31BIT
/* this is an extension that uses 31-bit digits */
# define DIGIT_BIT 31
#else
/* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */
# define DIGIT_BIT 28
# define MP_28BIT
#endif
#endif
#endif
/* define heap macros */
@@ -646,7 +646,7 @@ int mp_prime_miller_rabin(mp_int *a, mp_int *b, int *result);
*/
/* This gives [for a given bit size] the number of trials required
* such that Miller-Rabin gives a prob of failure lower than 2^-96
* such that Miller-Rabin gives a prob of failure lower than 2^-96
*/
/*
int mp_prime_rabin_miller_trials(int size);
@@ -673,7 +673,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style);
*/
/* makes a truly random prime of a given size (bytes),
* call with bbs = 1 if you want it to be congruent to 3 mod 4
* call with bbs = 1 if you want it to be congruent to 3 mod 4
*
* You have to supply a callback which fills in a buffer with random bytes. "dat" is a parameter you can
* have passed to the callback (e.g. a state or something). This function doesn't use "dat" itself
@@ -686,7 +686,7 @@ int mp_prime_next_prime(mp_int *a, int t, int bbs_style);
/* makes a truly random prime of a given size (bits),
*
* Flags are as follows:
*
*
* LTM_PRIME_BBS - make prime congruent to 3 mod 4
* LTM_PRIME_SAFE - make sure (p-1)/2 is prime as well (implies LTM_PRIME_BBS)
* LTM_PRIME_2MSB_OFF - make the 2nd highest bit zero
+644 -626
View File
File diff suppressed because it is too large Load Diff
+91 -56
View File
@@ -98,7 +98,7 @@ static int UtfCount(int ch);
*---------------------------------------------------------------------------
*/
INLINE static int
static inline int
UtfCount(
int ch) /* The Tcl_UniChar whose size is returned. */
{
@@ -109,7 +109,7 @@ UtfCount(
return 2;
}
#if TCL_UTF_MAX > 3
if (((unsigned)(ch - 0x10000) <= 0xfffff)) {
if (((unsigned)(ch - 0x10000) <= 0xFFFFF)) {
return 4;
}
#endif
@@ -134,7 +134,7 @@ UtfCount(
*---------------------------------------------------------------------------
*/
INLINE int
int
Tcl_UniCharToUtf(
int ch, /* The Tcl_UniChar to be stored in the
* buffer. */
@@ -259,6 +259,15 @@ Tcl_UniCharToUtfDString(
* Tcl_UtfCharComplete() before calling this routine to ensure that
* enough bytes remain in the string.
*
* If TCL_UTF_MAX == 4, special handling of Surrogate pairs is done:
* For any UTF-8 string containing a character outside of the BMP, the
* first call to this function will fill *chPtr with the high surrogate
* and generate a return value of 0. Calling Tcl_UtfToUniChar again
* will produce the low surrogate and a return value of 4. Because *chPtr
* is used to remember whether the high surrogate is already produced, it
* is recommended to initialize the variable it points to as 0 before
* the first call to Tcl_UtfToUniChar is done.
*
* Results:
* *chPtr is filled with the Tcl_UniChar, and the return value is the
* number of bytes from the UTF-8 string that were consumed.
@@ -278,7 +287,7 @@ Tcl_UtfToUniChar(
register int byte;
/*
* Unroll 1 to 3 byte UTF-8 sequences, use loop to handle longer ones.
* Unroll 1 to 3 (or 4) byte UTF-8 sequences.
*/
byte = *((unsigned char *) src);
@@ -298,7 +307,9 @@ Tcl_UtfToUniChar(
*/
*chPtr = (Tcl_UniChar) (((byte & 0x1F) << 6) | (src[1] & 0x3F));
return 2;
if ((unsigned)(*chPtr - 1) >= (UNICODE_SELF - 1)) {
return 2;
}
}
/*
@@ -313,7 +324,9 @@ Tcl_UtfToUniChar(
*chPtr = (Tcl_UniChar) (((byte & 0x0F) << 12)
| ((src[1] & 0x3F) << 6) | (src[2] & 0x3F));
return 3;
if (*chPtr > 0x7FF) {
return 3;
}
}
/*
@@ -327,14 +340,34 @@ Tcl_UtfToUniChar(
/*
* Four-byte-character lead byte followed by three trail bytes.
*/
#if TCL_UTF_MAX == 4
Tcl_UniChar surrogate;
*chPtr = (Tcl_UniChar) (((byte & 0x0E) << 18) | ((src[1] & 0x3F) << 12)
byte = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F)) - 0x10000;
surrogate = (Tcl_UniChar) (0xD800 + (byte >> 10));
if (byte & 0x100000) {
/* out of range, < 0x10000 or > 0x10ffff */
} else if (*chPtr != surrogate) {
/* produce high surrogate, but don't advance source pointer */
*chPtr = surrogate;
return 0;
} else {
/* produce low surrogate, and advance source pointer */
*chPtr = (Tcl_UniChar) (0xDC00 | (byte & 0x3FF));
return 4;
}
#else
*chPtr = (Tcl_UniChar) (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
return 4;
if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
return 4;
}
#endif
}
/*
* A three-byte-character lead-byte not followed by two trail-bytes
* A four-byte-character lead-byte not followed by two trail-bytes
* represents itself.
*/
}
@@ -371,7 +404,7 @@ Tcl_UtfToUniCharDString(
* appended to this previously initialized
* DString. */
{
Tcl_UniChar *w, *wString;
Tcl_UniChar ch, *w, *wString;
const char *p, *end;
int oldLength;
@@ -393,8 +426,8 @@ Tcl_UtfToUniCharDString(
w = wString;
end = src + length;
for (p = src; p < end; ) {
p += TclUtfToUniChar(p, w);
w++;
p += TclUtfToUniChar(p, &ch);
*w++ = ch;
}
*w = '\0';
Tcl_DStringSetLength(dsPtr,
@@ -428,10 +461,7 @@ Tcl_UtfCharComplete(
* a complete UTF-8 character. */
int length) /* Length of above string in bytes. */
{
int ch;
ch = *((unsigned char *) src);
return length >= totalBytes[ch];
return length >= totalBytes[(unsigned char)*src];
}
/*
@@ -458,9 +488,8 @@ Tcl_NumUtfChars(
int length) /* The length of the string in bytes, or -1
* for strlen(string). */
{
Tcl_UniChar ch;
register Tcl_UniChar *chPtr = &ch;
register int i;
Tcl_UniChar ch = 0;
register int i = 0;
/*
* The separate implementations are faster.
@@ -469,26 +498,27 @@ Tcl_NumUtfChars(
* single-byte char case specially.
*/
i = 0;
if (length < 0) {
while (*src != '\0') {
src += TclUtfToUniChar(src, chPtr);
src += TclUtfToUniChar(src, &ch);
i++;
}
if (i < 0) i = INT_MAX; /* Bug [2738427] */
} else {
register int n;
register const char *endPtr = src + length - TCL_UTF_MAX;
while (length > 0) {
if (UCHAR(*src) < 0xC0) {
length--;
src++;
} else {
n = Tcl_UtfToUniChar(src, chPtr);
length -= n;
src += n;
}
while (src < endPtr) {
src += TclUtfToUniChar(src, &ch);
i++;
}
endPtr += TCL_UTF_MAX;
while ((src < endPtr) && Tcl_UtfCharComplete(src, endPtr - src)) {
src += TclUtfToUniChar(src, &ch);
i++;
}
if (src < endPtr) {
i += endPtr - src;
}
}
return i;
}
@@ -518,7 +548,7 @@ Tcl_UtfFindFirst(
int ch) /* The Tcl_UniChar to search for. */
{
int len;
Tcl_UniChar find;
Tcl_UniChar find = 0;
while (1) {
len = TclUtfToUniChar(src, &find);
@@ -557,7 +587,7 @@ Tcl_UtfFindLast(
int ch) /* The Tcl_UniChar to search for. */
{
int len;
Tcl_UniChar find;
Tcl_UniChar find = 0;
const char *last;
last = NULL;
@@ -597,9 +627,15 @@ const char *
Tcl_UtfNext(
const char *src) /* The current location in the string. */
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
int len = TclUtfToUniChar(src, &ch);
return src + TclUtfToUniChar(src, &ch);
#if TCL_UTF_MAX == 4
if (len == 0) {
len = TclUtfToUniChar(src, &ch);
}
#endif
return src + len;
}
/*
@@ -632,8 +668,7 @@ Tcl_UtfPrev(
const char *look;
int i, byte;
src--;
look = src;
look = --src;
for (i = 0; i < TCL_UTF_MAX; i++) {
if (look < start) {
if (src < start) {
@@ -706,7 +741,7 @@ Tcl_UtfAtIndex(
register const char *src, /* The UTF-8 string. */
register int index) /* The position of the desired character. */
{
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
while (index > 0) {
index--;
@@ -790,7 +825,7 @@ int
Tcl_UtfToUpper(
char *str) /* String to convert in place. */
{
Tcl_UniChar ch, upChar;
Tcl_UniChar ch = 0, upChar;
char *src, *dst;
int bytes;
@@ -843,7 +878,7 @@ int
Tcl_UtfToLower(
char *str) /* String to convert in place. */
{
Tcl_UniChar ch, lowChar;
Tcl_UniChar ch = 0, lowChar;
char *src, *dst;
int bytes;
@@ -897,7 +932,7 @@ int
Tcl_UtfToTitle(
char *str) /* String to convert in place. */
{
Tcl_UniChar ch, titleChar, lowChar;
Tcl_UniChar ch = 0, titleChar, lowChar;
char *src, *dst;
int bytes;
@@ -1006,11 +1041,11 @@ Tcl_UtfNcmp(
const char *ct, /* UTF string cs is compared to. */
unsigned long numChars) /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
Tcl_UniChar ch1 = 0, ch2 = 0;
/*
* Cannot use 'memcmp(cs, ct, n);' as byte representation of \u0000 (the
* pair of bytes 0xc0,0x80) is larger than byte representation of \u0001
* pair of bytes 0xC0,0x80) is larger than byte representation of \u0001
* (the byte 0x01.)
*/
@@ -1054,7 +1089,7 @@ Tcl_UtfNcasecmp(
const char *ct, /* UTF string cs is compared to. */
unsigned long numChars) /* Number of UTF chars to compare. */
{
Tcl_UniChar ch1, ch2;
Tcl_UniChar ch1 = 0, ch2 = 0;
while (numChars-- > 0) {
/*
* n must be interpreted as chars, not bytes.
@@ -1394,11 +1429,11 @@ Tcl_UniCharIsControl(
{
#if TCL_UTF_MAX > 3
if (UNICODE_OUT_OF_RANGE(ch)) {
ch &= 0x1fffff;
if ((ch == 0xe0001) || ((ch >= 0xe0020) && (ch <= 0xe007f))) {
ch &= 0x1FFFFF;
if ((ch == 0xE0001) || ((ch >= 0xE0020) && (ch <= 0xE007f))) {
return 1;
}
if ((ch >= 0xf0000) && ((ch & 0xffff) <= 0xfffd)) {
if ((ch >= 0xF0000) && ((ch & 0xFFFF) <= 0xFFFD)) {
return 1;
}
return 0;
@@ -1457,8 +1492,8 @@ Tcl_UniCharIsGraph(
{
#if TCL_UTF_MAX > 3
if (UNICODE_OUT_OF_RANGE(ch)) {
ch &= 0x1fffff;
return (ch >= 0xe0100) && (ch <= 0xe01ef);
ch &= 0x1FFFFF;
return (ch >= 0xE0100) && (ch <= 0xE01EF);
}
#endif
return ((GRAPH_BITS >> GetCategory(ch)) & 1);
@@ -1514,8 +1549,8 @@ Tcl_UniCharIsPrint(
{
#if TCL_UTF_MAX > 3
if (UNICODE_OUT_OF_RANGE(ch)) {
ch &= 0x1fffff;
return (ch >= 0xe0100) && (ch <= 0xe01ef);
ch &= 0x1FFFFF;
return (ch >= 0xE0100) && (ch <= 0xE01EF);
}
#endif
return (((GRAPH_BITS|SPACE_BITS) >> GetCategory(ch)) & 1);
@@ -1571,10 +1606,10 @@ Tcl_UniCharIsSpace(
{
#if TCL_UTF_MAX > 3
/* Ignore upper 11 bits. */
ch &= 0x1fffff;
ch &= 0x1FFFFF;
#else
/* Ignore upper 16 bits. */
ch &= 0xffff;
ch &= 0xFFFF;
#endif
/*
@@ -1588,8 +1623,8 @@ Tcl_UniCharIsSpace(
} else if (UNICODE_OUT_OF_RANGE(ch)) {
return 0;
#endif
} else if (ch == 0x0085 || ch == 0x180e || ch == 0x200b
|| ch == 0x202f || ch == 0x2060 || ch == 0xfeff) {
} else if (ch == 0x0085 || ch == 0x180E || ch == 0x200B
|| ch == 0x202F || ch == 0x2060 || ch == 0xFEFF) {
return 1;
} else {
return ((SPACE_BITS >> GetCategory(ch)) & 1);
@@ -1683,7 +1718,7 @@ Tcl_UniCharCaseMatch(
* characters. */
int nocase) /* 0 for case sensitive, 1 for insensitive */
{
Tcl_UniChar ch1, p;
Tcl_UniChar ch1 = 0, p;
while (1) {
p = *uniPattern;
+1 -1
View File
@@ -1646,7 +1646,7 @@ Tcl_Backslash(
* src, unless NULL. */
{
char buf[TCL_UTF_MAX];
Tcl_UniChar ch;
Tcl_UniChar ch = 0;
Tcl_UtfBackslash(src, readPtr, buf);
TclUtfToUniChar(buf, &ch);
+612 -51
View File
@@ -165,6 +165,7 @@ typedef struct ArraySearch {
struct ArraySearch *nextPtr;/* Next in list of all active searches for
* this variable, or NULL if this is the last
* one. */
Tcl_Obj *arrayNameObj; /* name of the array object */
} ArraySearch;
/*
@@ -173,6 +174,8 @@ typedef struct ArraySearch {
static void AppendLocals(Tcl_Interp *interp, Tcl_Obj *listPtr,
Tcl_Obj *patternPtr, int includeLinks);
static void ArrayDoneSearch (Interp *iPtr, Var *varPtr, ArraySearch *searchPtr);
static Tcl_NRPostProc ArrayForLoopCallback;
static void DeleteSearches(Interp *iPtr, Var *arrayVarPtr);
static void DeleteArray(Interp *iPtr, Tcl_Obj *arrayNamePtr,
Var *varPtr, int flags, int index);
@@ -1309,7 +1312,7 @@ Tcl_ObjGetVar2(
return NULL;
}
return TclPtrGetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
return TclPtrGetVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
flags, -1);
}
@@ -1337,6 +1340,52 @@ Tcl_ObjGetVar2(
Tcl_Obj *
TclPtrGetVar(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
Tcl_Var varPtr, /* The variable to be read.*/
Tcl_Var arrayPtr, /* NULL for scalar variables, pointer to the
* containing array otherwise. */
Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
const int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
if (varPtr == NULL) {
Tcl_Panic("varPtr must not be NULL");
}
if (part1Ptr == NULL) {
Tcl_Panic("part1Ptr must not be NULL");
}
return TclPtrGetVarIdx(interp, (Var *) varPtr, (Var *) arrayPtr,
part1Ptr, part2Ptr, flags, -1);
}
/*
*----------------------------------------------------------------------
*
* TclPtrGetVarIdx --
*
* Return the value of a Tcl variable as a Tcl object, given the pointers
* to the variable's (and possibly containing array's) VAR structure.
*
* Results:
* The return value points to the current object value of the variable
* given by varPtr. If the specified variable doesn't exist, or if there
* is a clash in array usage, then NULL is returned and a message will be
* left in the interpreter's result if the TCL_LEAVE_ERR_MSG flag is set.
*
* Side effects:
* The ref count for the returned object is _not_ incremented to reflect
* the returned reference; if you want to keep a reference to the object
* you must increment its ref count yourself.
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclPtrGetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
register Var *varPtr, /* The variable to be read.*/
@@ -1678,7 +1727,7 @@ Tcl_ObjSetVar2(
return NULL;
}
return TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
return TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
newValuePtr, flags, -1);
}
@@ -1709,6 +1758,60 @@ Tcl_ObjSetVar2(
Tcl_Obj *
TclPtrSetVar(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
Tcl_Var varPtr, /* Reference to the variable to set. */
Tcl_Var arrayPtr, /* Reference to the array containing the
* variable, or NULL if the variable is a
* scalar. */
Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
Tcl_Obj *newValuePtr, /* New value for variable. */
const int flags) /* OR-ed combination of TCL_GLOBAL_ONLY, and
* TCL_LEAVE_ERR_MSG bits. */
{
if (varPtr == NULL) {
Tcl_Panic("varPtr must not be NULL");
}
if (part1Ptr == NULL) {
Tcl_Panic("part1Ptr must not be NULL");
}
if (newValuePtr == NULL) {
Tcl_Panic("newValuePtr must not be NULL");
}
return TclPtrSetVarIdx(interp, (Var *) varPtr, (Var *) arrayPtr,
part1Ptr, part2Ptr, newValuePtr, flags, -1);
}
/*
*----------------------------------------------------------------------
*
* TclPtrSetVarIdx --
*
* This function is the same as Tcl_SetVar2Ex above, except that it
* requires pointers to the variable's Var structs in addition to the
* variable names.
*
* Results:
* Returns a pointer to the Tcl_Obj holding the new value of the
* variable. If the write operation was disallowed because an array was
* expected but not found (or vice versa), then NULL is returned; if the
* TCL_LEAVE_ERR_MSG flag is set, then an explanatory message will be
* left in the interpreter's result. Note that the returned object may
* not be the same one referenced by newValuePtr; this is because
* variable traces may modify the variable's value.
*
* Side effects:
* The value of the given variable is set. If either the array or the
* entry didn't exist then a new variable is created.
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclPtrSetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be looked up. */
register Var *varPtr, /* Reference to the variable to set. */
@@ -1953,7 +2056,7 @@ TclIncrObjVar2(
"\n (reading value of variable to increment)");
return NULL;
}
return TclPtrIncrObjVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
return TclPtrIncrObjVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
incrPtr, flags, -1);
}
@@ -1984,6 +2087,62 @@ TclIncrObjVar2(
Tcl_Obj *
TclPtrIncrObjVar(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be found. */
Tcl_Var varPtr, /* Reference to the variable to set. */
Tcl_Var arrayPtr, /* Reference to the array containing the
* variable, or NULL if the variable is a
* scalar. */
Tcl_Obj *part1Ptr, /* Points to an object holding the name of an
* array (if part2 is non-NULL) or the name of
* a variable. */
Tcl_Obj *part2Ptr, /* If non-null, points to an object holding
* the name of an element in the array
* part1Ptr. */
Tcl_Obj *incrPtr, /* Increment value. */
/* TODO: Which of these flag values really make sense? */
const int flags) /* Various flags that tell how to incr value:
* any of TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_APPEND_VALUE, TCL_LIST_ELEMENT,
* TCL_LEAVE_ERR_MSG. */
{
if (varPtr == NULL) {
Tcl_Panic("varPtr must not be NULL");
}
if (part1Ptr == NULL) {
Tcl_Panic("part1Ptr must not be NULL");
}
return TclPtrIncrObjVarIdx(interp, (Var *) varPtr, (Var *) arrayPtr,
part1Ptr, part2Ptr, incrPtr, flags, -1);
}
/*
*----------------------------------------------------------------------
*
* TclPtrIncrObjVarIdx --
*
* Given the pointers to a variable and possible containing array,
* increment the Tcl object value of the variable by a Tcl_Obj increment.
*
* Results:
* Returns a pointer to the Tcl_Obj holding the new value of the
* variable. If the specified variable doesn't exist, or there is a clash
* in array usage, or an error occurs while executing variable traces,
* then NULL is returned and a message will be left in the interpreter's
* result.
*
* Side effects:
* The value of the given variable is incremented by the specified
* amount. If either the array or the entry didn't exist then a new
* variable is created. The ref count for the returned object is _not_
* incremented to reflect the returned reference; if you want to keep a
* reference to the object you must increment its ref count yourself.
*
*----------------------------------------------------------------------
*/
Tcl_Obj *
TclPtrIncrObjVarIdx(
Tcl_Interp *interp, /* Command interpreter in which variable is to
* be found. */
Var *varPtr, /* Reference to the variable to set. */
@@ -2011,8 +2170,8 @@ TclPtrIncrObjVar(
if (TclIsVarInHash(varPtr)) {
VarHashRefCount(varPtr)++;
}
varValuePtr = TclPtrGetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
flags, index);
varValuePtr = TclPtrGetVarIdx(interp, varPtr, arrayPtr, part1Ptr,
part2Ptr, flags, index);
if (TclIsVarInHash(varPtr)) {
VarHashRefCount(varPtr)--;
}
@@ -2024,8 +2183,8 @@ TclPtrIncrObjVar(
varValuePtr = Tcl_DuplicateObj(varValuePtr);
if (TCL_OK == TclIncrObj(interp, varValuePtr, incrPtr)) {
return TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
varValuePtr, flags, index);
return TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr,
part2Ptr, varValuePtr, flags, index);
} else {
Tcl_DecrRefCount(varValuePtr);
return NULL;
@@ -2041,8 +2200,8 @@ TclPtrIncrObjVar(
* is the way to make that happen.
*/
return TclPtrSetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
varValuePtr, flags, index);
return TclPtrSetVarIdx(interp, varPtr, arrayPtr, part1Ptr,
part2Ptr, varValuePtr, flags, index);
} else {
return NULL;
}
@@ -2189,8 +2348,8 @@ TclObjUnsetVar2(
return TCL_ERROR;
}
return TclPtrUnsetVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr, flags,
-1);
return TclPtrUnsetVarIdx(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,
flags, -1);
}
/*
@@ -2217,6 +2376,53 @@ TclObjUnsetVar2(
int
TclPtrUnsetVar(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
Tcl_Var varPtr, /* The variable to be unset. */
Tcl_Var arrayPtr, /* NULL for scalar variables, pointer to the
* containing array otherwise. */
Tcl_Obj *part1Ptr, /* Name of an array (if part2 is non-NULL) or
* the name of a variable. */
Tcl_Obj *part2Ptr, /* If non-NULL, gives the name of an element
* in the array part1. */
const int flags) /* OR-ed combination of any of
* TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
* TCL_LEAVE_ERR_MSG. */
{
if (varPtr == NULL) {
Tcl_Panic("varPtr must not be NULL");
}
if (part1Ptr == NULL) {
Tcl_Panic("part1Ptr must not be NULL");
}
return TclPtrUnsetVarIdx(interp, (Var *) varPtr, (Var *) arrayPtr,
part1Ptr, part2Ptr, flags, -1);
}
/*
*----------------------------------------------------------------------
*
* TclPtrUnsetVarIdx --
*
* Delete a variable, given the pointers to the variable's (and possibly
* containing array's) VAR structure.
*
* Results:
* Returns TCL_OK if the variable was successfully deleted, TCL_ERROR if
* the variable can't be unset. In the event of an error, if the
* TCL_LEAVE_ERR_MSG flag is set then an error message is left in the
* interp's result.
*
* Side effects:
* If varPtr and arrayPtr indicate a local or global variable in interp,
* it is deleted. If varPtr is an array reference and part2Ptr is NULL,
* then the whole array is deleted.
*
*----------------------------------------------------------------------
*/
int
TclPtrUnsetVarIdx(
Tcl_Interp *interp, /* Command interpreter in which varName is to
* be looked up. */
register Var *varPtr, /* The variable to be unset. */
@@ -2566,11 +2772,11 @@ Tcl_AppendObjCmd(
/*
* Note that we do not need to increase the refCount of the Var
* pointers: should a trace delete the variable, the return value
* of TclPtrSetVar will be NULL or emptyObjPtr, and we will not
* of TclPtrSetVarIdx will be NULL or emptyObjPtr, and we will not
* access the variable again.
*/
varValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, objv[1],
varValuePtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr, objv[1],
NULL, objv[i], TCL_APPEND_VALUE|TCL_LEAVE_ERR_MSG, -1);
if ((varValuePtr == NULL) ||
(varValuePtr == ((Interp *) interp)->emptyObjPtr)) {
@@ -2650,7 +2856,7 @@ Tcl_LappendObjCmd(
createdNewObj = 0;
/*
* Protect the variable pointers around the TclPtrGetVar call
* Protect the variable pointers around the TclPtrGetVarIdx call
* to insure that they remain valid even if the variable was undefined
* and unused.
*/
@@ -2666,7 +2872,7 @@ Tcl_LappendObjCmd(
if (arrayPtr && TclIsVarInHash(arrayPtr)) {
VarHashRefCount(arrayPtr)++;
}
varValuePtr = TclPtrGetVar(interp, varPtr, arrayPtr, objv[1], NULL,
varValuePtr = TclPtrGetVarIdx(interp, varPtr, arrayPtr, objv[1], NULL,
TCL_LEAVE_ERR_MSG, -1);
if (TclIsVarInHash(varPtr)) {
VarHashRefCount(varPtr)--;
@@ -2707,7 +2913,7 @@ Tcl_LappendObjCmd(
* and we didn't create the variable.
*/
newValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, objv[1], NULL,
newValuePtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr, objv[1], NULL,
varValuePtr, TCL_LEAVE_ERR_MSG, -1);
if (newValuePtr == NULL) {
return TCL_ERROR;
@@ -2808,7 +3014,7 @@ TclArraySet(
keyPtr, TCL_LEAVE_ERR_MSG, "set", 1, 1, varPtr, -1);
if ((elemVarPtr == NULL) ||
(TclPtrSetVar(interp, elemVarPtr, varPtr, arrayNameObj,
(TclPtrSetVarIdx(interp, elemVarPtr, varPtr, arrayNameObj,
keyPtr, valuePtr, TCL_LEAVE_ERR_MSG, -1) == NULL)) {
Tcl_DictObjDone(&search);
return TCL_ERROR;
@@ -2841,8 +3047,8 @@ TclArraySet(
/*
* We needn't worry about traces invalidating arrayPtr: should that be
* the case, TclPtrSetVar will return NULL so that we break out of the
* loop and return an error.
* the case, TclPtrSetVarIdx will return NULL so that we break out of
* the loop and return an error.
*/
copyListObj = TclListObjCopy(NULL, arrayElemObj);
@@ -2851,7 +3057,7 @@ TclArraySet(
elemPtrs[i], TCL_LEAVE_ERR_MSG, "set", 1, 1, varPtr, -1);
if ((elemVarPtr == NULL) ||
(TclPtrSetVar(interp, elemVarPtr, varPtr, arrayNameObj,
(TclPtrSetVarIdx(interp, elemVarPtr, varPtr, arrayNameObj,
elemPtrs[i],elemPtrs[i+1],TCL_LEAVE_ERR_MSG,-1) == NULL)){
result = TCL_ERROR;
break;
@@ -2892,6 +3098,321 @@ TclArraySet(
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* ArrayForNRCmd
* ArrayForLoopCallback
* ArrayObjFirst
* ArrayObjNext
*
* These functions implement the "array for" Tcl command.
* array for {k v} a {}
* The array for command iterates over the array, setting the
* the specified loop variables, and executing the body each iteration.
*
* ArrayForNRCmd() sets up the ArraySearch structure, sets arrayNamePtr
* inside the structure and calls VarHashFirstEntry to start the hash
* iteration.
*
* ArrayForNRCmd() does not execute the body or set the loop variables,
* it only initializes the iterator.
*
* ArrayForLoopCallback() iterates over the entire array, executing
* the body each time.
*
* ArrayObjFirst() Does not execute the body or set the key/value variables.
*
*----------------------------------------------------------------------
*/
void
ArrayObjFirst(
Tcl_Interp *interp,
Tcl_Obj *arrayNameObj,
Var *varPtr,
ArraySearch *searchPtr)
{
Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hPtr;
int isNew;
searchPtr->varPtr = varPtr;
searchPtr->arrayNameObj = arrayNameObj;
/* add the search to the search table */
hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, varPtr, &isNew);
if (isNew) {
searchPtr->id = 1;
varPtr->flags |= VAR_SEARCH_ACTIVE;
searchPtr->nextPtr = NULL;
} else {
searchPtr->id = ((ArraySearch *) Tcl_GetHashValue(hPtr))->id + 1;
searchPtr->nextPtr = Tcl_GetHashValue(hPtr);
}
searchPtr->nextEntry = VarHashFirstEntry(varPtr->value.tablePtr,
&searchPtr->search);
Tcl_SetHashValue(hPtr, searchPtr);
}
int
ArrayObjNext(
Tcl_Interp *interp,
Var *varPtr, /* array */
ArraySearch *searchPtr,
Tcl_Obj **keyPtrPtr, /* Pointer to a variable to have the key
* written into, or NULL. */
Tcl_Obj **valuePtrPtr /* Pointer to a variable to have the
* value written into, or NULL.*/
)
{
Tcl_Obj *keyObj;
Tcl_Obj *valueObj = NULL;
int gotValue;
int donerc;
donerc = TCL_BREAK;
if ((varPtr->flags & VAR_SEARCH_ACTIVE) != VAR_SEARCH_ACTIVE) {
donerc = TCL_ERROR;
return donerc;
}
gotValue = 0;
while (1) {
Tcl_HashEntry *hPtr = searchPtr->nextEntry;
if (hPtr != NULL) {
searchPtr->nextEntry = NULL;
} else {
hPtr = Tcl_NextHashEntry(&searchPtr->search);
if (hPtr == NULL) {
gotValue = 0;
break;
}
}
varPtr = VarHashGetValue(hPtr);
if (!TclIsVarUndefined(varPtr)) {
gotValue = 1;
break;
}
}
if (! gotValue) {
return donerc;
}
donerc = TCL_CONTINUE;
keyObj = VarHashGetKey(varPtr);
*keyPtrPtr = keyObj;
valueObj = Tcl_ObjGetVar2(interp, searchPtr->arrayNameObj,
keyObj, TCL_LEAVE_ERR_MSG);
*valuePtrPtr = valueObj;
return donerc;
}
static int
ArrayForNRCmd(
ClientData dummy,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const *objv)
{
Interp *iPtr = (Interp *) interp;
Tcl_Obj *scriptObj, *keyVarObj, *valueVarObj;
Tcl_Obj **varv;
Tcl_Obj *arrayNameObj;
ArraySearch *searchPtr = NULL;
Var *varPtr;
Var *arrayPtr;
int varc;
/*
* array for {k v} a body
*/
if (objc != 4) {
Tcl_WrongNumArgs(interp, 1, objv,
"{key value} arrayName script");
return TCL_ERROR;
}
/*
* Parse arguments.
*/
if (TclListObjGetElements(interp, objv[1], &varc, &varv) != TCL_OK) {
return TCL_ERROR;
}
if (varc != 2) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"must have two variable names", -1));
Tcl_SetErrorCode(interp, "TCL", "SYNTAX", "array", "for", NULL);
return TCL_ERROR;
}
arrayNameObj = objv[2];
keyVarObj = varv[0];
valueVarObj = varv[1];
scriptObj = objv[3];
/*
* Locate the array variable.
*/
varPtr = TclObjLookupVarEx(interp, arrayNameObj, NULL, /*flags*/ 0,
/*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr);
/*
* Special array trace used to keep the env array in sync for array names,
* array get, etc.
*/
if (varPtr && (varPtr->flags & VAR_TRACED_ARRAY)
&& (TclIsVarArray(varPtr) || TclIsVarUndefined(varPtr))) {
if (TclObjCallVarTraces(iPtr, arrayPtr, varPtr, arrayNameObj, NULL,
(TCL_LEAVE_ERR_MSG|TCL_NAMESPACE_ONLY|TCL_GLOBAL_ONLY|
TCL_TRACE_ARRAY), /* leaveErrMsg */ 1, -1) == TCL_ERROR) {
return TCL_ERROR;
}
}
/*
* Verify that it is indeed an array variable. This test comes after the
* traces; the variable may actually become an array as an effect of said
* traces.
*/
if ((varPtr == NULL) || !TclIsVarArray(varPtr)
|| TclIsVarUndefined(varPtr)) {
const char *varName = Tcl_GetString(arrayNameObj);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" isn't an array", varName));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ARRAY", varName, NULL);
return TCL_ERROR;
}
/*
* Make a new array search, put it on the stack.
*/
searchPtr = ckalloc(sizeof(ArraySearch));
searchPtr->arrayNameObj = NULL;
ArrayObjFirst(interp, arrayNameObj, varPtr, searchPtr);
/*
* Make sure that these objects (which we need throughout the body of the
* loop) don't vanish.
*/
Tcl_IncrRefCount(keyVarObj);
Tcl_IncrRefCount(valueVarObj);
Tcl_IncrRefCount(scriptObj);
/*
* Run the script.
*/
TclNRAddCallback(interp, ArrayForLoopCallback, searchPtr, keyVarObj,
valueVarObj, scriptObj);
return TCL_OK;
}
static int
ArrayForLoopCallback(
ClientData data[],
Tcl_Interp *interp,
int result)
{
Interp *iPtr = (Interp *) interp;
ArraySearch *searchPtr = data[0];
Tcl_Obj *keyVarObj = data[1];
Tcl_Obj *valueVarObj = data[2];
Tcl_Obj *scriptObj = data[3];
Tcl_Obj *keyObj, *valueObj;
Var *varPtr;
Var *arrayPtr;
int done;
/*
* Process the result from the previous execution of the script body.
*/
done = TCL_ERROR;
varPtr = TclObjLookupVarEx(interp, searchPtr->arrayNameObj, NULL, /*flags*/ 0,
/*msg*/ 0, /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr);
if (result == TCL_CONTINUE) {
result = TCL_OK;
} else if (result != TCL_OK) {
if (result == TCL_BREAK) {
Tcl_ResetResult(interp);
result = TCL_OK;
} else if (result == TCL_ERROR) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (\"array for\" body line %d)",
Tcl_GetErrorLine(interp)));
}
goto arrayfordone;
}
/*
* Get the next mapping from the array.
*/
keyObj = NULL;
valueObj = NULL;
done = ArrayObjNext (interp, varPtr, searchPtr, &keyObj, &valueObj);
result = TCL_OK;
if (done != TCL_CONTINUE) {
Tcl_ResetResult(interp);
if (done == TCL_ERROR) {
varPtr->flags |= TCL_LEAVE_ERR_MSG;
Tcl_AddErrorInfo(interp, "array changed during iteration");
result = done;
}
goto arrayfordone;
}
if (Tcl_ObjSetVar2(interp, keyVarObj, NULL, keyObj, TCL_LEAVE_ERR_MSG) == NULL) {
result = TCL_ERROR;
goto arrayfordone;
}
if (valueObj != NULL) {
if (Tcl_ObjSetVar2(interp, valueVarObj, NULL, valueObj, TCL_LEAVE_ERR_MSG) == NULL) {
result = TCL_ERROR;
goto arrayfordone;
}
}
/*
* Run the script.
*/
TclNRAddCallback(interp, ArrayForLoopCallback, searchPtr, keyVarObj,
valueVarObj, scriptObj);
return TclNREvalObjEx(interp, scriptObj, 0, iPtr->cmdFramePtr, 3);
/*
* For unwinding everything once the iterating is done.
*/
arrayfordone:
/* if the search was terminated by an array change, the
* VAR_SEARCH_ACTIVE flag will no longer be set
*/
if (done != TCL_ERROR) {
ArrayDoneSearch (iPtr, varPtr, searchPtr);
ckfree(searchPtr);
}
TclDecrRefCount(keyVarObj);
TclDecrRefCount(valueVarObj);
TclDecrRefCount(scriptObj);
return result;
}
/*
*----------------------------------------------------------------------
*
@@ -2991,6 +3512,50 @@ ArrayStartSearchCmd(
return TCL_OK;
}
/*
*----------------------------------------------------------------------
*
* ArrayDoneSearch --
*
* Removes the search from the hash of active searches.
*
*----------------------------------------------------------------------
*/
static void
ArrayDoneSearch (
Interp *iPtr,
Var *varPtr,
ArraySearch *searchPtr)
{
Tcl_HashEntry *hPtr;
ArraySearch *prevPtr;
/*
* Unhook the search from the list of searches associated with the
* variable.
*/
hPtr = Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
if (hPtr == NULL) {
return;
}
if (searchPtr == Tcl_GetHashValue(hPtr)) {
if (searchPtr->nextPtr) {
Tcl_SetHashValue(hPtr, searchPtr->nextPtr);
} else {
varPtr->flags &= ~VAR_SEARCH_ACTIVE;
Tcl_DeleteHashEntry(hPtr);
}
} else {
for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) {
if (prevPtr->nextPtr == searchPtr) {
prevPtr->nextPtr = searchPtr->nextPtr;
break;
}
}
}
}
/*
*----------------------------------------------------------------------
*
@@ -3234,9 +3799,8 @@ ArrayDoneSearchCmd(
{
Interp *iPtr = (Interp *) interp;
Var *varPtr, *arrayPtr;
Tcl_HashEntry *hPtr;
Tcl_Obj *varNameObj, *searchObj;
ArraySearch *searchPtr, *prevPtr;
ArraySearch *searchPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "arrayName searchId");
@@ -3290,27 +3854,7 @@ ArrayDoneSearchCmd(
return TCL_ERROR;
}
/*
* Unhook the search from the list of searches associated with the
* variable.
*/
hPtr = Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
if (searchPtr == Tcl_GetHashValue(hPtr)) {
if (searchPtr->nextPtr) {
Tcl_SetHashValue(hPtr, searchPtr->nextPtr);
} else {
varPtr->flags &= ~VAR_SEARCH_ACTIVE;
Tcl_DeleteHashEntry(hPtr);
}
} else {
for (prevPtr=Tcl_GetHashValue(hPtr) ;; prevPtr=prevPtr->nextPtr) {
if (prevPtr->nextPtr == searchPtr) {
prevPtr->nextPtr = searchPtr->nextPtr;
break;
}
}
}
ArrayDoneSearch (iPtr, varPtr, searchPtr);
ckfree(searchPtr);
return TCL_OK;
}
@@ -4078,8 +4622,8 @@ ArrayUnsetCmd(
if (!varPtr2 || TclIsVarUndefined(varPtr2)) {
return TCL_OK;
}
return TclPtrUnsetVar(interp, varPtr2, varPtr, varNameObj, patternObj,
unsetFlags, -1);
return TclPtrUnsetVarIdx(interp, varPtr2, varPtr, varNameObj,
patternObj, unsetFlags, -1);
}
/*
@@ -4127,7 +4671,7 @@ ArrayUnsetCmd(
nameObj = VarHashGetKey(varPtr2);
if (Tcl_StringMatch(TclGetString(nameObj), pattern)
&& TclPtrUnsetVar(interp, varPtr2, varPtr, varNameObj,
&& TclPtrUnsetVarIdx(interp, varPtr2, varPtr, varNameObj,
nameObj, unsetFlags, -1) != TCL_OK) {
/*
* If we incremented a refcount, we must decrement it here as we
@@ -4169,6 +4713,7 @@ TclInitArrayCmd(
{"anymore", ArrayAnyMoreCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"donesearch", ArrayDoneSearchCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
{"exists", ArrayExistsCmd, TclCompileArrayExistsCmd, NULL, NULL, 0},
{"for", NULL, TclCompileBasic3ArgCmd, ArrayForNRCmd, NULL, 0},
{"get", ArrayGetCmd, TclCompileBasic1Or2ArgCmd, NULL, NULL, 0},
{"names", ArrayNamesCmd, TclCompileBasic1To3ArgCmd, NULL, NULL, 0},
{"nextelement", ArrayNextElementCmd, TclCompileBasic2ArgCmd, NULL, NULL, 0},
@@ -4274,7 +4819,7 @@ ObjMakeUpvar(
}
}
return TclPtrObjMakeUpvar(interp, otherPtr, myNamePtr, myFlags, index);
return TclPtrObjMakeUpvarIdx(interp, otherPtr, myNamePtr, myFlags, index);
}
/*
@@ -4316,17 +4861,32 @@ TclPtrMakeUpvar(
myNamePtr = Tcl_NewStringObj(myName, -1);
Tcl_IncrRefCount(myNamePtr);
}
result = TclPtrObjMakeUpvar(interp, otherPtr, myNamePtr, myFlags, index);
result = TclPtrObjMakeUpvarIdx(interp, otherPtr, myNamePtr, myFlags,
index);
if (myNamePtr) {
Tcl_DecrRefCount(myNamePtr);
}
return result;
}
int
TclPtrObjMakeUpvar(
Tcl_Interp *interp, /* Interpreter containing variables. Used for
* error messages, too. */
Tcl_Var otherPtr, /* Pointer to the variable being linked-to. */
Tcl_Obj *myNamePtr, /* Name of variable which will refer to
* otherP1/otherP2. Must be a scalar. */
int myFlags) /* 0, TCL_GLOBAL_ONLY or TCL_NAMESPACE_ONLY:
* indicates scope of myName. */
{
return TclPtrObjMakeUpvarIdx(interp, (Var *) otherPtr, myNamePtr, myFlags,
-1);
}
/* Callers must Incr myNamePtr if they plan to Decr it. */
int
TclPtrObjMakeUpvar(
TclPtrObjMakeUpvarIdx(
Tcl_Interp *interp, /* Interpreter containing variables. Used for
* error messages, too. */
Var *otherPtr, /* Pointer to the variable being linked-to. */
@@ -4793,8 +5353,9 @@ Tcl_VariableObjCmd(
*/
if (i+1 < objc) { /* A value was specified. */
varValuePtr = TclPtrSetVar(interp, varPtr, arrayPtr, varNamePtr,
NULL, objv[i+1], TCL_NAMESPACE_ONLY|TCL_LEAVE_ERR_MSG,-1);
varValuePtr = TclPtrSetVarIdx(interp, varPtr, arrayPtr,
varNamePtr, NULL, objv[i+1],
(TCL_NAMESPACE_ONLY | TCL_LEAVE_ERR_MSG), -1);
if (varValuePtr == NULL) {
return TCL_ERROR;
}
+19 -21
View File
@@ -1204,10 +1204,10 @@ Tcl_ZlibStreamPut(
zshPtr->stream.avail_in = size;
/*
* Must not do a zero-length compress. [Bug 25842c161]
* Must not do a zero-length compress unless finalizing. [Bug 25842c161]
*/
if (size == 0) {
if (size == 0 && flush != Z_FINISH) {
return TCL_OK;
}
@@ -3113,30 +3113,28 @@ ZlibTransformOutput(
errorCodePtr);
}
/*
* No zero-length writes. Flushes must be explicit.
*/
if (toWrite == 0) {
return 0;
}
cd->outStream.next_in = (Bytef *) buf;
cd->outStream.avail_in = toWrite;
do {
while (cd->outStream.avail_in > 0) {
e = Deflate(&cd->outStream, cd->outBuffer, cd->outAllocated,
Z_NO_FLUSH, &produced);
if ((e == Z_OK && produced > 0) || e == Z_BUF_ERROR) {
/*
* deflate() indicates that it is out of space by returning
* Z_BUF_ERROR *or* by simply returning Z_OK with no remaining
* space; in either case, we must write the whole buffer out and
* retry to compress what is left.
*/
if (e == Z_BUF_ERROR) {
produced = cd->outAllocated;
e = Z_OK;
}
if (Tcl_WriteRaw(cd->parent, cd->outBuffer, produced) < 0) {
*errorCodePtr = Tcl_GetErrno();
return -1;
}
if (e != Z_OK || produced == 0) {
break;
}
} while (e == Z_OK && produced > 0 && cd->outStream.avail_in > 0);
if (Tcl_WriteRaw(cd->parent, cd->outBuffer, produced) < 0) {
*errorCodePtr = Tcl_GetErrno();
return -1;
}
}
if (e == Z_OK) {
return toWrite - cd->outStream.avail_in;
+2 -2
View File
@@ -203,7 +203,7 @@ proc auto_mkindex {dir args} {
}
auto_mkindex_parser::init
foreach file [glob -- {*}$args] {
foreach file [lsort [glob -- {*}$args]] {
try {
append index [auto_mkindex_parser::mkindex $file]
} on error {msg opts} {
@@ -236,7 +236,7 @@ proc auto_mkindex_old {dir args} {
if {![llength $args]} {
set args *.tcl
}
foreach file [glob -- {*}$args] {
foreach file [lsort [glob -- {*}$args]] {
set f ""
set error [catch {
set f [open $file]
Executable → Regular
View File
+19 -8
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.8.10
package provide http 2.8.12
namespace eval http {
# Allow resourcing to not clobber existing data
@@ -28,10 +28,19 @@ namespace eval http {
# We need a useragent string of this style or various servers will refuse to
# send us compressed content even when we ask for it. This follows the
# de-facto layout of user-agent strings in current browsers.
set http(-useragent) "Mozilla/5.0\
([string totitle $::tcl_platform(platform)]; U;\
$::tcl_platform(os) $::tcl_platform(osVersion))\
http/[package provide http] Tcl/[package provide Tcl]"
# Safe interpreters do not have ::tcl_platform(os) or
# ::tcl_platform(osVersion).
if {[interp issafe]} {
set http(-useragent) "Mozilla/5.0\
(Windows; U;\
Windows NT 10.0)\
http/[package provide http] Tcl/[package provide Tcl]"
} else {
set http(-useragent) "Mozilla/5.0\
([string totitle $::tcl_platform(platform)]; U;\
$::tcl_platform(os) $::tcl_platform(osVersion))\
http/[package provide http] Tcl/[package provide Tcl]"
}
}
proc init {} {
@@ -197,9 +206,10 @@ proc http::Finish {token {errormsg ""} {skipCB 0}} {
set state(error) [list $errormsg $errorInfo $errorCode]
set state(status) "error"
}
if {
($state(status) eq "timeout") || ($state(status) eq "error") ||
([info exists state(connection)] && ($state(connection) eq "close"))
if { ($state(status) eq "timeout")
|| ($state(status) eq "error")
|| ([info exists state(-keepalive)] && !$state(-keepalive))
|| ([info exists state(connection)] && ($state(connection) eq "close"))
} {
CloseSocket $state(sock) $token
}
@@ -1017,6 +1027,7 @@ proc http::Event {sock token} {
# We have now read all headers
# We ignore HTTP/1.1 100 Continue returns. RFC2616 sec 8.2.3
if {$state(http) == "" || ([regexp {^\S+\s(\d+)} $state(http) {} x] && $x == 100)} {
set state(state) "connecting"
return
}
+1 -1
View File
@@ -1,2 +1,2 @@
if {![package vsatisfies [package provide Tcl] 8.6-]} {return}
package ifneeded http 2.8.10 [list tclPkgSetup $dir http 2.8.10 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
package ifneeded http 2.8.12 [list tclPkgSetup $dir http 2.8.12 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
+33 -32
View File
@@ -16,7 +16,7 @@
if {[info commands package] == ""} {
error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
package require -exact Tcl 8.6.6
package require -exact Tcl 8.6.7
# Compute the auto path to use in this interpreter.
# The values on the path come from several locations:
@@ -169,13 +169,7 @@ if {[interp issafe]} {
namespace eval ::tcl::clock [list variable TclLibDir $::tcl_library]
proc clock args {
namespace eval ::tcl::clock [list namespace ensemble create -command \
[uplevel 1 [list namespace origin [lindex [info level 0] 0]]] \
-subcommands {
add clicks format microseconds milliseconds scan seconds
}]
proc ::tcl::initClock {} {
# Auto-loading stubs for 'clock.tcl'
foreach cmd {add format scan} {
@@ -186,8 +180,9 @@ if {[interp issafe]} {
}
}
return [uplevel 1 [info level 0]]
rename ::tcl::initClock {}
}
::tcl::initClock
}
# Conditionalize for presence of exec.
@@ -289,14 +284,9 @@ proc unknown args {
}
append cinfo ...
}
append cinfo "\"\n (\"uplevel\" body line 1)"
append cinfo "\n invoked from within"
append cinfo "\n\"uplevel 1 \$args\""
#
# Try each possible form of the stack trace
# and trim the extra contribution from the matching case
#
set expect "$msg\n while executing\n\"$cinfo"
set tail "\n (\"uplevel\" body line 1)\n invoked\
from within\n\"uplevel 1 \$args\""
set expect "$msg\n while executing\n\"$cinfo\"$tail"
if {$errInfo eq $expect} {
#
# The stack has only the eval from the expanded command
@@ -310,21 +300,32 @@ proc unknown args {
# Stack trace is nested, trim off just the contribution
# from the extra "eval" of $args due to the "catch" above.
#
set expect "\n invoked from within\n\"$cinfo"
set exlen [string length $expect]
set eilen [string length $errInfo]
set i [expr {$eilen - $exlen - 1}]
set einfo [string range $errInfo 0 $i]
#
# For now verify that $errInfo consists of what we are about
# to return plus what we expected to trim off.
#
if {$errInfo ne "$einfo$expect"} {
error "Tcl bug: unexpected stack trace in \"unknown\"" {} \
[list CORE UNKNOWN BADTRACE $einfo $expect $errInfo]
set last [string last $tail $errInfo]
if {$last + [string length $tail] != [string length $errInfo]} {
# Very likely cannot happen
return -options $opts $msg
}
return -code error -errorcode $errCode \
-errorinfo $einfo $msg
set errInfo [string range $errInfo 0 $last-1]
set tail "\"$cinfo\""
set last [string last $tail $errInfo]
if {$last + [string length $tail] != [string length $errInfo]} {
return -code error -errorcode $errCode \
-errorinfo $errInfo $msg
}
set errInfo [string range $errInfo 0 $last-1]
set tail "\n invoked from within\n"
set last [string last $tail $errInfo]
if {$last + [string length $tail] == [string length $errInfo]} {
return -code error -errorcode $errCode \
-errorinfo [string range $errInfo 0 $last-1] $msg
}
set tail "\n while executing\n"
set last [string last $tail $errInfo]
if {$last + [string length $tail] == [string length $errInfo]} {
return -code error -errorcode $errCode \
-errorinfo [string range $errInfo 0 $last-1] $msg
}
return -options $opts $msg
} else {
dict incr opts -level
return -options $opts $msg
@@ -623,7 +624,7 @@ proc auto_import {pattern} {
if {$tcl_platform(platform) eq "windows"} {
# Windows version.
#
# Note that info executable doesn't work under Windows, so we have to
# Note that file executable doesn't work under Windows, so we have to
# look for files with .exe, .com, or .bat extensions. Also, the path
# may be in the Path or PATH environment variables, and path
# components are separated with semicolons, not colons as under Unix.
+1 -1
View File
@@ -14,7 +14,7 @@
package require Tcl 8.5-
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the installation directory in the Makefiles.
package provide msgcat 1.6.0
package provide msgcat 1.6.1
namespace eval msgcat {
namespace export mc mcexists mcload mclocale mcmax mcmset mcpreferences mcset\
+2 -2
View File
@@ -1,2 +1,2 @@
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded msgcat 1.6.0 [list source [file join $dir msgcat.tcl]]
if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
package ifneeded msgcat 1.6.1 [list source [file join $dir msgcat.tcl]]
+1 -1
View File
@@ -9,4 +9,4 @@
# full path name of this file's directory.
if {![package vsatisfies [package provide Tcl] 8.5]} {return}
package ifneeded tcltest 2.4.0 [list source [file join $dir tcltest.tcl]]
package ifneeded tcltest 2.4.1 [list source [file join $dir tcltest.tcl]]
+1 -1
View File
@@ -22,7 +22,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
variable Version 2.4.0
variable Version 2.4.1
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
+47 -47
View File
@@ -2,51 +2,51 @@
set TZData(:Africa/Accra) {
{-9223372036854775808 -52 0 LMT}
{-1640995148 0 0 GMT}
{-1556841600 1200 1 GHST}
{-1546388400 0 0 GMT}
{-1525305600 1200 1 GHST}
{-1514852400 0 0 GMT}
{-1493769600 1200 1 GHST}
{-1483316400 0 0 GMT}
{-1462233600 1200 1 GHST}
{-1451780400 0 0 GMT}
{-1430611200 1200 1 GHST}
{-1420158000 0 0 GMT}
{-1399075200 1200 1 GHST}
{-1388622000 0 0 GMT}
{-1367539200 1200 1 GHST}
{-1357086000 0 0 GMT}
{-1336003200 1200 1 GHST}
{-1325550000 0 0 GMT}
{-1304380800 1200 1 GHST}
{-1293927600 0 0 GMT}
{-1272844800 1200 1 GHST}
{-1262391600 0 0 GMT}
{-1241308800 1200 1 GHST}
{-1230855600 0 0 GMT}
{-1209772800 1200 1 GHST}
{-1199319600 0 0 GMT}
{-1178150400 1200 1 GHST}
{-1167697200 0 0 GMT}
{-1146614400 1200 1 GHST}
{-1136161200 0 0 GMT}
{-1115078400 1200 1 GHST}
{-1104625200 0 0 GMT}
{-1083542400 1200 1 GHST}
{-1073089200 0 0 GMT}
{-1051920000 1200 1 GHST}
{-1041466800 0 0 GMT}
{-1020384000 1200 1 GHST}
{-1009930800 0 0 GMT}
{-988848000 1200 1 GHST}
{-978394800 0 0 GMT}
{-957312000 1200 1 GHST}
{-946858800 0 0 GMT}
{-925689600 1200 1 GHST}
{-915236400 0 0 GMT}
{-894153600 1200 1 GHST}
{-883700400 0 0 GMT}
{-862617600 1200 1 GHST}
{-852164400 0 0 GMT}
{-1640995148 0 0 +0020}
{-1556841600 1200 1 +0020}
{-1546388400 0 0 +0020}
{-1525305600 1200 1 +0020}
{-1514852400 0 0 +0020}
{-1493769600 1200 1 +0020}
{-1483316400 0 0 +0020}
{-1462233600 1200 1 +0020}
{-1451780400 0 0 +0020}
{-1430611200 1200 1 +0020}
{-1420158000 0 0 +0020}
{-1399075200 1200 1 +0020}
{-1388622000 0 0 +0020}
{-1367539200 1200 1 +0020}
{-1357086000 0 0 +0020}
{-1336003200 1200 1 +0020}
{-1325550000 0 0 +0020}
{-1304380800 1200 1 +0020}
{-1293927600 0 0 +0020}
{-1272844800 1200 1 +0020}
{-1262391600 0 0 +0020}
{-1241308800 1200 1 +0020}
{-1230855600 0 0 +0020}
{-1209772800 1200 1 +0020}
{-1199319600 0 0 +0020}
{-1178150400 1200 1 +0020}
{-1167697200 0 0 +0020}
{-1146614400 1200 1 +0020}
{-1136161200 0 0 +0020}
{-1115078400 1200 1 +0020}
{-1104625200 0 0 +0020}
{-1083542400 1200 1 +0020}
{-1073089200 0 0 +0020}
{-1051920000 1200 1 +0020}
{-1041466800 0 0 +0020}
{-1020384000 1200 1 +0020}
{-1009930800 0 0 +0020}
{-988848000 1200 1 +0020}
{-978394800 0 0 +0020}
{-957312000 1200 1 +0020}
{-946858800 0 0 +0020}
{-925689600 1200 1 +0020}
{-915236400 0 0 +0020}
{-894153600 1200 1 +0020}
{-883700400 0 0 +0020}
{-862617600 1200 1 +0020}
{-852164400 0 0 +0020}
}
+1 -1
View File
@@ -2,6 +2,6 @@
set TZData(:Africa/Bissau) {
{-9223372036854775808 -3740 0 LMT}
{-1830380260 -3600 0 WAT}
{-1830380260 -3600 0 -01}
{157770000 0 0 GMT}
}
+6 -6
View File
@@ -2,18 +2,18 @@
set TZData(:Africa/Ceuta) {
{-9223372036854775808 -1276 0 LMT}
{-2177451524 0 0 WET}
{-2177452800 0 0 WET}
{-1630112400 3600 1 WEST}
{-1616810400 0 0 WET}
{-1451692800 0 0 WET}
{-1442451600 3600 1 WEST}
{-1427677200 0 0 WET}
{-1427673600 0 0 WET}
{-1379293200 3600 1 WEST}
{-1364778000 0 0 WET}
{-1364774400 0 0 WET}
{-1348448400 3600 1 WEST}
{-1333328400 0 0 WET}
{-1316394000 3600 1 WEST}
{-1301274000 0 0 WET}
{-1333324800 0 0 WET}
{-1316390400 3600 1 WEST}
{-1301270400 0 0 WET}
{-1293840000 0 0 WET}
{-81432000 3600 1 WEST}
{-71110800 0 0 WET}
+1 -1
View File
@@ -2,7 +2,7 @@
set TZData(:Africa/El_Aaiun) {
{-9223372036854775808 -3168 0 LMT}
{-1136070432 -3600 0 WAT}
{-1136070432 -3600 0 -01}
{198291600 0 0 WET}
{199756800 3600 1 WEST}
{207702000 0 0 WET}
+37 -3
View File
@@ -1,5 +1,39 @@
# created by tools/tclZIC.tcl - do not edit
if {![info exists TZData(Africa/Khartoum)]} {
LoadTimeZoneFile Africa/Khartoum
set TZData(:Africa/Juba) {
{-9223372036854775808 7588 0 LMT}
{-1230775588 7200 0 CAT}
{10360800 10800 1 CAST}
{24786000 7200 0 CAT}
{41810400 10800 1 CAST}
{56322000 7200 0 CAT}
{73432800 10800 1 CAST}
{87944400 7200 0 CAT}
{104882400 10800 1 CAST}
{119480400 7200 0 CAT}
{136332000 10800 1 CAST}
{151016400 7200 0 CAT}
{167781600 10800 1 CAST}
{182552400 7200 0 CAT}
{199231200 10800 1 CAST}
{214174800 7200 0 CAT}
{230680800 10800 1 CAST}
{245710800 7200 0 CAT}
{262735200 10800 1 CAST}
{277246800 7200 0 CAT}
{294184800 10800 1 CAST}
{308782800 7200 0 CAT}
{325634400 10800 1 CAST}
{340405200 7200 0 CAT}
{357084000 10800 1 CAST}
{371941200 7200 0 CAT}
{388533600 10800 1 CAST}
{403477200 7200 0 CAT}
{419983200 10800 1 CAST}
{435013200 7200 0 CAT}
{452037600 10800 1 CAST}
{466635600 7200 0 CAT}
{483487200 10800 1 CAST}
{498171600 7200 0 CAT}
{947930400 10800 0 EAT}
}
set TZData(:Africa/Juba) $TZData(:Africa/Khartoum)
+1
View File
@@ -36,4 +36,5 @@ set TZData(:Africa/Khartoum) {
{483487200 10800 1 CAST}
{498171600 7200 0 CAT}
{947930400 10800 0 EAT}
{1509483600 7200 0 CAT}
}
+2 -2
View File
@@ -3,6 +3,6 @@
set TZData(:Africa/Monrovia) {
{-9223372036854775808 -2588 0 LMT}
{-2776979812 -2588 0 MMT}
{-1604359012 -2670 0 LRT}
{73529070 0 0 GMT}
{-1604359012 -2670 0 MMT}
{63593070 0 0 GMT}
}
+2 -2
View File
@@ -3,7 +3,7 @@
set TZData(:Africa/Nairobi) {
{-9223372036854775808 8836 0 LMT}
{-1309746436 10800 0 EAT}
{-1262314800 9000 0 BEAT}
{-946780200 9900 0 BEAUT}
{-1262314800 9000 0 +0230}
{-946780200 9900 0 +0245}
{-315629100 10800 0 EAT}
}
+4 -167
View File
@@ -2,12 +2,13 @@
set TZData(:Africa/Windhoek) {
{-9223372036854775808 4104 0 LMT}
{-2458170504 5400 0 SWAT}
{-2458170504 5400 0 +0130}
{-2109288600 7200 0 SAST}
{-860976000 10800 1 SAST}
{-845254800 7200 0 SAST}
{637970400 7200 0 CAT}
{765324000 3600 0 WAT}
{764200800 3600 0 WAT}
{764204400 3600 0 WAT}
{778640400 7200 1 WAST}
{796780800 3600 0 WAT}
{810090000 7200 1 WAST}
@@ -54,169 +55,5 @@ set TZData(:Africa/Windhoek) {
{1459641600 3600 0 WAT}
{1472950800 7200 1 WAST}
{1491091200 3600 0 WAT}
{1504400400 7200 1 WAST}
{1522540800 3600 0 WAT}
{1535850000 7200 1 WAST}
{1554595200 3600 0 WAT}
{1567299600 7200 1 WAST}
{1586044800 3600 0 WAT}
{1599354000 7200 1 WAST}
{1617494400 3600 0 WAT}
{1630803600 7200 1 WAST}
{1648944000 3600 0 WAT}
{1662253200 7200 1 WAST}
{1680393600 3600 0 WAT}
{1693702800 7200 1 WAST}
{1712448000 3600 0 WAT}
{1725152400 7200 1 WAST}
{1743897600 3600 0 WAT}
{1757206800 7200 1 WAST}
{1775347200 3600 0 WAT}
{1788656400 7200 1 WAST}
{1806796800 3600 0 WAT}
{1820106000 7200 1 WAST}
{1838246400 3600 0 WAT}
{1851555600 7200 1 WAST}
{1869696000 3600 0 WAT}
{1883005200 7200 1 WAST}
{1901750400 3600 0 WAT}
{1914454800 7200 1 WAST}
{1933200000 3600 0 WAT}
{1946509200 7200 1 WAST}
{1964649600 3600 0 WAT}
{1977958800 7200 1 WAST}
{1996099200 3600 0 WAT}
{2009408400 7200 1 WAST}
{2027548800 3600 0 WAT}
{2040858000 7200 1 WAST}
{2058998400 3600 0 WAT}
{2072307600 7200 1 WAST}
{2091052800 3600 0 WAT}
{2104362000 7200 1 WAST}
{2122502400 3600 0 WAT}
{2135811600 7200 1 WAST}
{2153952000 3600 0 WAT}
{2167261200 7200 1 WAST}
{2185401600 3600 0 WAT}
{2198710800 7200 1 WAST}
{2216851200 3600 0 WAT}
{2230160400 7200 1 WAST}
{2248905600 3600 0 WAT}
{2261610000 7200 1 WAST}
{2280355200 3600 0 WAT}
{2293664400 7200 1 WAST}
{2311804800 3600 0 WAT}
{2325114000 7200 1 WAST}
{2343254400 3600 0 WAT}
{2356563600 7200 1 WAST}
{2374704000 3600 0 WAT}
{2388013200 7200 1 WAST}
{2406153600 3600 0 WAT}
{2419462800 7200 1 WAST}
{2438208000 3600 0 WAT}
{2450912400 7200 1 WAST}
{2469657600 3600 0 WAT}
{2482966800 7200 1 WAST}
{2501107200 3600 0 WAT}
{2514416400 7200 1 WAST}
{2532556800 3600 0 WAT}
{2545866000 7200 1 WAST}
{2564006400 3600 0 WAT}
{2577315600 7200 1 WAST}
{2596060800 3600 0 WAT}
{2608765200 7200 1 WAST}
{2627510400 3600 0 WAT}
{2640819600 7200 1 WAST}
{2658960000 3600 0 WAT}
{2672269200 7200 1 WAST}
{2690409600 3600 0 WAT}
{2703718800 7200 1 WAST}
{2721859200 3600 0 WAT}
{2735168400 7200 1 WAST}
{2753308800 3600 0 WAT}
{2766618000 7200 1 WAST}
{2785363200 3600 0 WAT}
{2798067600 7200 1 WAST}
{2816812800 3600 0 WAT}
{2830122000 7200 1 WAST}
{2848262400 3600 0 WAT}
{2861571600 7200 1 WAST}
{2879712000 3600 0 WAT}
{2893021200 7200 1 WAST}
{2911161600 3600 0 WAT}
{2924470800 7200 1 WAST}
{2942611200 3600 0 WAT}
{2955920400 7200 1 WAST}
{2974665600 3600 0 WAT}
{2987974800 7200 1 WAST}
{3006115200 3600 0 WAT}
{3019424400 7200 1 WAST}
{3037564800 3600 0 WAT}
{3050874000 7200 1 WAST}
{3069014400 3600 0 WAT}
{3082323600 7200 1 WAST}
{3100464000 3600 0 WAT}
{3113773200 7200 1 WAST}
{3132518400 3600 0 WAT}
{3145222800 7200 1 WAST}
{3163968000 3600 0 WAT}
{3177277200 7200 1 WAST}
{3195417600 3600 0 WAT}
{3208726800 7200 1 WAST}
{3226867200 3600 0 WAT}
{3240176400 7200 1 WAST}
{3258316800 3600 0 WAT}
{3271626000 7200 1 WAST}
{3289766400 3600 0 WAT}
{3303075600 7200 1 WAST}
{3321820800 3600 0 WAT}
{3334525200 7200 1 WAST}
{3353270400 3600 0 WAT}
{3366579600 7200 1 WAST}
{3384720000 3600 0 WAT}
{3398029200 7200 1 WAST}
{3416169600 3600 0 WAT}
{3429478800 7200 1 WAST}
{3447619200 3600 0 WAT}
{3460928400 7200 1 WAST}
{3479673600 3600 0 WAT}
{3492378000 7200 1 WAST}
{3511123200 3600 0 WAT}
{3524432400 7200 1 WAST}
{3542572800 3600 0 WAT}
{3555882000 7200 1 WAST}
{3574022400 3600 0 WAT}
{3587331600 7200 1 WAST}
{3605472000 3600 0 WAT}
{3618781200 7200 1 WAST}
{3636921600 3600 0 WAT}
{3650230800 7200 1 WAST}
{3668976000 3600 0 WAT}
{3681680400 7200 1 WAST}
{3700425600 3600 0 WAT}
{3713734800 7200 1 WAST}
{3731875200 3600 0 WAT}
{3745184400 7200 1 WAST}
{3763324800 3600 0 WAT}
{3776634000 7200 1 WAST}
{3794774400 3600 0 WAT}
{3808083600 7200 1 WAST}
{3826224000 3600 0 WAT}
{3839533200 7200 1 WAST}
{3858278400 3600 0 WAT}
{3871587600 7200 1 WAST}
{3889728000 3600 0 WAT}
{3903037200 7200 1 WAST}
{3921177600 3600 0 WAT}
{3934486800 7200 1 WAST}
{3952627200 3600 0 WAT}
{3965936400 7200 1 WAST}
{3984076800 3600 0 WAT}
{3997386000 7200 1 WAST}
{4016131200 3600 0 WAT}
{4028835600 7200 1 WAST}
{4047580800 3600 0 WAT}
{4060890000 7200 1 WAST}
{4079030400 3600 0 WAT}
{4092339600 7200 1 WAST}
{1504400400 7200 0 CAT}
}
+2 -2
View File
@@ -1,8 +1,8 @@
# created by tools/tclZIC.tcl - do not edit
set TZData(:America/Adak) {
{-9223372036854775808 44001 0 LMT}
{-3225356001 -42398 0 LMT}
{-9223372036854775808 44002 0 LMT}
{-3225223727 -42398 0 LMT}
{-2188944802 -39600 0 NST}
{-883573200 -39600 0 NST}
{-880196400 -36000 1 NWT}
+6 -7
View File
@@ -2,13 +2,12 @@
set TZData(:America/Anchorage) {
{-9223372036854775808 50424 0 LMT}
{-3225362424 -35976 0 LMT}
{-2188951224 -36000 0 CAT}
{-883576800 -36000 0 CAWT}
{-880200000 -32400 1 CAWT}
{-769395600 -32400 0 CAPT}
{-765378000 -36000 0 CAPT}
{-757346400 -36000 0 CAT}
{-3225223727 -35976 0 LMT}
{-2188951224 -36000 0 AST}
{-883576800 -36000 0 AST}
{-880200000 -32400 1 AWT}
{-769395600 -32400 1 APT}
{-765378000 -36000 0 AST}
{-86882400 -36000 0 AHST}
{-31500000 -36000 0 AHST}
{-21470400 -32400 1 AHDT}
+55 -55
View File
@@ -2,59 +2,59 @@
set TZData(:America/Araguaina) {
{-9223372036854775808 -11568 0 LMT}
{-1767214032 -10800 0 BRT}
{-1206957600 -7200 1 BRST}
{-1191362400 -10800 0 BRT}
{-1175374800 -7200 1 BRST}
{-1159826400 -10800 0 BRT}
{-633819600 -7200 1 BRST}
{-622069200 -10800 0 BRT}
{-602283600 -7200 1 BRST}
{-591832800 -10800 0 BRT}
{-570747600 -7200 1 BRST}
{-560210400 -10800 0 BRT}
{-539125200 -7200 1 BRST}
{-531352800 -10800 0 BRT}
{-191365200 -7200 1 BRST}
{-184197600 -10800 0 BRT}
{-155163600 -7200 1 BRST}
{-150069600 -10800 0 BRT}
{-128898000 -7200 1 BRST}
{-121125600 -10800 0 BRT}
{-99954000 -7200 1 BRST}
{-89589600 -10800 0 BRT}
{-68418000 -7200 1 BRST}
{-57967200 -10800 0 BRT}
{499748400 -7200 1 BRST}
{511236000 -10800 0 BRT}
{530593200 -7200 1 BRST}
{540266400 -10800 0 BRT}
{562129200 -7200 1 BRST}
{571197600 -10800 0 BRT}
{592974000 -7200 1 BRST}
{602042400 -10800 0 BRT}
{624423600 -7200 1 BRST}
{634701600 -10800 0 BRT}
{653536800 -10800 0 BRT}
{811047600 -10800 0 BRT}
{813726000 -7200 1 BRST}
{824004000 -10800 0 BRT}
{844570800 -7200 1 BRST}
{856058400 -10800 0 BRT}
{876106800 -7200 1 BRST}
{888717600 -10800 0 BRT}
{908074800 -7200 1 BRST}
{919562400 -10800 0 BRT}
{938919600 -7200 1 BRST}
{951616800 -10800 0 BRT}
{970974000 -7200 1 BRST}
{982461600 -10800 0 BRT}
{1003028400 -7200 1 BRST}
{1013911200 -10800 0 BRT}
{1036292400 -7200 1 BRST}
{1045360800 -10800 0 BRT}
{1064368800 -10800 0 BRT}
{1350788400 -7200 0 BRST}
{1361066400 -10800 0 BRT}
{1378000800 -10800 0 BRT}
{-1767214032 -10800 0 -03}
{-1206957600 -7200 1 -02}
{-1191362400 -10800 0 -03}
{-1175374800 -7200 1 -02}
{-1159826400 -10800 0 -03}
{-633819600 -7200 1 -02}
{-622069200 -10800 0 -03}
{-602283600 -7200 1 -02}
{-591832800 -10800 0 -03}
{-570747600 -7200 1 -02}
{-560210400 -10800 0 -03}
{-539125200 -7200 1 -02}
{-531352800 -10800 0 -03}
{-191365200 -7200 1 -02}
{-184197600 -10800 0 -03}
{-155163600 -7200 1 -02}
{-150069600 -10800 0 -03}
{-128898000 -7200 1 -02}
{-121125600 -10800 0 -03}
{-99954000 -7200 1 -02}
{-89589600 -10800 0 -03}
{-68418000 -7200 1 -02}
{-57967200 -10800 0 -03}
{499748400 -7200 1 -02}
{511236000 -10800 0 -03}
{530593200 -7200 1 -02}
{540266400 -10800 0 -03}
{562129200 -7200 1 -02}
{571197600 -10800 0 -03}
{592974000 -7200 1 -02}
{602042400 -10800 0 -03}
{624423600 -7200 1 -02}
{634701600 -10800 0 -03}
{653536800 -10800 0 -03}
{811047600 -10800 0 -03}
{813726000 -7200 1 -02}
{824004000 -10800 0 -03}
{844570800 -7200 1 -02}
{856058400 -10800 0 -03}
{876106800 -7200 1 -02}
{888717600 -10800 0 -03}
{908074800 -7200 1 -02}
{919562400 -10800 0 -03}
{938919600 -7200 1 -02}
{951616800 -10800 0 -03}
{970974000 -7200 1 -02}
{982461600 -10800 0 -03}
{1003028400 -7200 1 -02}
{1013911200 -10800 0 -03}
{1036292400 -7200 1 -02}
{1045360800 -10800 0 -03}
{1064368800 -10800 0 -03}
{1350788400 -7200 0 -02}
{1361066400 -10800 0 -03}
{1378000800 -10800 0 -03}
}
+61 -61
View File
@@ -3,65 +3,65 @@
set TZData(:America/Argentina/Buenos_Aires) {
{-9223372036854775808 -14028 0 LMT}
{-2372097972 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -10800 0 ART}
{687927600 -7200 1 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224385200 -7200 1 ARST}
{1237082400 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -10800 0 -03}
{687927600 -7200 1 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224385200 -7200 1 -02}
{1237082400 -10800 0 -03}
}
+62 -62
View File
@@ -3,66 +3,66 @@
set TZData(:America/Argentina/Catamarca) {
{-9223372036854775808 -15788 0 LMT}
{-2372096212 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -14400 0 WART}
{687931200 -7200 0 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1086058800 -14400 0 WART}
{1087704000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -14400 0 -04}
{687931200 -7200 0 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1086058800 -14400 0 -04}
{1087704000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+61 -61
View File
@@ -3,65 +3,65 @@
set TZData(:America/Argentina/Cordoba) {
{-9223372036854775808 -15408 0 LMT}
{-2372096592 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -14400 0 WART}
{687931200 -7200 0 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224385200 -7200 1 ARST}
{1237082400 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -14400 0 -04}
{687931200 -7200 0 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224385200 -7200 1 -02}
{1237082400 -10800 0 -03}
}
+61 -61
View File
@@ -3,65 +3,65 @@
set TZData(:America/Argentina/Jujuy) {
{-9223372036854775808 -15672 0 LMT}
{-2372096328 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -14400 0 WART}
{657086400 -10800 1 WARST}
{669178800 -14400 0 WART}
{686721600 -7200 1 ARST}
{694231200 -7200 0 ART}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -14400 0 -04}
{657086400 -10800 1 -03}
{669178800 -14400 0 -04}
{686721600 -7200 1 -02}
{694231200 -7200 0 -03}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+63 -63
View File
@@ -3,67 +3,67 @@
set TZData(:America/Argentina/La_Rioja) {
{-9223372036854775808 -16044 0 LMT}
{-2372095956 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667792800 -14400 0 WART}
{673588800 -10800 0 ART}
{687927600 -7200 1 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1086058800 -14400 0 WART}
{1087704000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667792800 -14400 0 -04}
{673588800 -10800 0 -03}
{687927600 -7200 1 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1086058800 -14400 0 -04}
{1087704000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+62 -62
View File
@@ -3,66 +3,66 @@
set TZData(:America/Argentina/Mendoza) {
{-9223372036854775808 -16516 0 LMT}
{-2372095484 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -14400 0 WART}
{655963200 -10800 1 WARST}
{667796400 -14400 0 WART}
{687499200 -10800 1 WARST}
{699418800 -14400 0 WART}
{719380800 -7200 0 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1085281200 -14400 0 WART}
{1096171200 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -14400 0 -04}
{655963200 -10800 1 -03}
{667796400 -14400 0 -04}
{687499200 -10800 1 -03}
{699418800 -14400 0 -04}
{719380800 -7200 0 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1085281200 -14400 0 -04}
{1096171200 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+62 -62
View File
@@ -3,66 +3,66 @@
set TZData(:America/Argentina/Rio_Gallegos) {
{-9223372036854775808 -16612 0 LMT}
{-2372095388 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -10800 0 ART}
{687927600 -7200 1 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1086058800 -14400 0 WART}
{1087704000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -10800 0 -03}
{687927600 -7200 1 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1086058800 -14400 0 -04}
{1087704000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+60 -60
View File
@@ -3,64 +3,64 @@
set TZData(:America/Argentina/Salta) {
{-9223372036854775808 -15700 0 LMT}
{-2372096300 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -14400 0 WART}
{687931200 -7200 0 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -14400 0 -04}
{687931200 -7200 0 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+63 -63
View File
@@ -3,67 +3,67 @@
set TZData(:America/Argentina/San_Juan) {
{-9223372036854775808 -16444 0 LMT}
{-2372095556 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667792800 -14400 0 WART}
{673588800 -10800 0 ART}
{687927600 -7200 1 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1085972400 -14400 0 WART}
{1090728000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667792800 -14400 0 -04}
{673588800 -10800 0 -03}
{687927600 -7200 1 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1085972400 -14400 0 -04}
{1090728000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}
+62 -62
View File
@@ -3,66 +3,66 @@
set TZData(:America/Argentina/San_Luis) {
{-9223372036854775808 -15924 0 LMT}
{-2372096076 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{631159200 -7200 1 ARST}
{637380000 -14400 0 WART}
{655963200 -10800 1 WARST}
{667796400 -14400 0 WART}
{675748800 -10800 0 ART}
{938919600 -10800 1 WARST}
{952052400 -10800 0 ART}
{1085972400 -14400 0 WART}
{1090728000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1200880800 -10800 0 WART}
{1205031600 -14400 0 WART}
{1223784000 -10800 1 WARST}
{1236481200 -14400 0 WART}
{1255233600 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{631159200 -7200 1 -02}
{637380000 -14400 0 -04}
{655963200 -10800 1 -03}
{667796400 -14400 0 -04}
{675748800 -10800 0 -03}
{938919600 -10800 1 -03}
{952052400 -10800 0 -03}
{1085972400 -14400 0 -04}
{1090728000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1200880800 -10800 0 -04}
{1205031600 -14400 0 -04}
{1223784000 -10800 1 -03}
{1236481200 -14400 0 -04}
{1255233600 -10800 0 -03}
}
+63 -63
View File
@@ -3,67 +3,67 @@
set TZData(:America/Argentina/Tucuman) {
{-9223372036854775808 -15652 0 LMT}
{-2372096348 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -14400 0 WART}
{687931200 -7200 0 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1086058800 -14400 0 WART}
{1087099200 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224385200 -7200 1 ARST}
{1237082400 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -14400 0 -04}
{687931200 -7200 0 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1086058800 -14400 0 -04}
{1087099200 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224385200 -7200 1 -02}
{1237082400 -10800 0 -03}
}
+62 -62
View File
@@ -3,66 +3,66 @@
set TZData(:America/Argentina/Ushuaia) {
{-9223372036854775808 -16392 0 LMT}
{-2372095608 -15408 0 CMT}
{-1567453392 -14400 0 ART}
{-1233432000 -10800 0 ARST}
{-1222981200 -14400 0 ART}
{-1205956800 -10800 1 ARST}
{-1194037200 -14400 0 ART}
{-1172865600 -10800 1 ARST}
{-1162501200 -14400 0 ART}
{-1141329600 -10800 1 ARST}
{-1130965200 -14400 0 ART}
{-1109793600 -10800 1 ARST}
{-1099429200 -14400 0 ART}
{-1078257600 -10800 1 ARST}
{-1067806800 -14400 0 ART}
{-1046635200 -10800 1 ARST}
{-1036270800 -14400 0 ART}
{-1015099200 -10800 1 ARST}
{-1004734800 -14400 0 ART}
{-983563200 -10800 1 ARST}
{-973198800 -14400 0 ART}
{-952027200 -10800 1 ARST}
{-941576400 -14400 0 ART}
{-931032000 -10800 1 ARST}
{-900882000 -14400 0 ART}
{-890337600 -10800 1 ARST}
{-833749200 -14400 0 ART}
{-827265600 -10800 1 ARST}
{-752274000 -14400 0 ART}
{-733780800 -10800 1 ARST}
{-197326800 -14400 0 ART}
{-190843200 -10800 1 ARST}
{-184194000 -14400 0 ART}
{-164491200 -10800 1 ARST}
{-152658000 -14400 0 ART}
{-132955200 -10800 1 ARST}
{-121122000 -14400 0 ART}
{-101419200 -10800 1 ARST}
{-86821200 -14400 0 ART}
{-71092800 -10800 1 ARST}
{-54766800 -14400 0 ART}
{-39038400 -10800 1 ARST}
{-23317200 -14400 0 ART}
{-7588800 -10800 0 ART}
{128142000 -7200 1 ARST}
{136605600 -10800 0 ART}
{596948400 -7200 1 ARST}
{605066400 -10800 0 ART}
{624423600 -7200 1 ARST}
{636516000 -10800 0 ART}
{656478000 -7200 1 ARST}
{667965600 -10800 0 ART}
{687927600 -7200 1 ARST}
{699415200 -10800 0 ART}
{719377200 -7200 1 ARST}
{731469600 -10800 0 ART}
{938916000 -10800 0 ART}
{938919600 -10800 1 ARST}
{952056000 -10800 0 ART}
{1085886000 -14400 0 WART}
{1087704000 -10800 0 ART}
{1198983600 -7200 1 ARST}
{1205632800 -10800 0 ART}
{1224295200 -10800 0 ART}
{-1567453392 -14400 0 -04}
{-1233432000 -10800 0 -03}
{-1222981200 -14400 0 -04}
{-1205956800 -10800 1 -03}
{-1194037200 -14400 0 -04}
{-1172865600 -10800 1 -03}
{-1162501200 -14400 0 -04}
{-1141329600 -10800 1 -03}
{-1130965200 -14400 0 -04}
{-1109793600 -10800 1 -03}
{-1099429200 -14400 0 -04}
{-1078257600 -10800 1 -03}
{-1067806800 -14400 0 -04}
{-1046635200 -10800 1 -03}
{-1036270800 -14400 0 -04}
{-1015099200 -10800 1 -03}
{-1004734800 -14400 0 -04}
{-983563200 -10800 1 -03}
{-973198800 -14400 0 -04}
{-952027200 -10800 1 -03}
{-941576400 -14400 0 -04}
{-931032000 -10800 1 -03}
{-900882000 -14400 0 -04}
{-890337600 -10800 1 -03}
{-833749200 -14400 0 -04}
{-827265600 -10800 1 -03}
{-752274000 -14400 0 -04}
{-733780800 -10800 1 -03}
{-197326800 -14400 0 -04}
{-190843200 -10800 1 -03}
{-184194000 -14400 0 -04}
{-164491200 -10800 1 -03}
{-152658000 -14400 0 -04}
{-132955200 -10800 1 -03}
{-121122000 -14400 0 -04}
{-101419200 -10800 1 -03}
{-86821200 -14400 0 -04}
{-71092800 -10800 1 -03}
{-54766800 -14400 0 -04}
{-39038400 -10800 1 -03}
{-23317200 -14400 0 -04}
{-7588800 -10800 0 -03}
{128142000 -7200 1 -02}
{136605600 -10800 0 -03}
{596948400 -7200 1 -02}
{605066400 -10800 0 -03}
{624423600 -7200 1 -02}
{636516000 -10800 0 -03}
{656478000 -7200 1 -02}
{667965600 -10800 0 -03}
{687927600 -7200 1 -02}
{699415200 -10800 0 -03}
{719377200 -7200 1 -02}
{731469600 -10800 0 -03}
{938916000 -10800 0 -04}
{938919600 -10800 1 -03}
{952056000 -10800 0 -03}
{1085886000 -14400 0 -04}
{1087704000 -10800 0 -03}
{1198983600 -7200 1 -02}
{1205632800 -10800 0 -03}
{1224295200 -10800 0 -03}
}

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