Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge trunk |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | memory-API |
Files: | files | file ages | folders |
SHA3-256: |
ee95a2c1bec6d4dfbe9c2863335022a9 |
User & Date: | jan.nijtmans 2018-04-15 22:01:00.000 |
Context
2018-04-16
| ||
23:01 | Merge trunk. Update (internal) Trim* functions to use size_t check-in: 5064787134 user: jan.nijtmans tags: memory-API | |
2018-04-15
| ||
22:01 | Merge trunk check-in: ee95a2c1be user: jan.nijtmans tags: memory-API | |
2018-04-05
| ||
17:59 | merge 8.7 check-in: 8c34e3aa19 user: dgp tags: trunk | |
2018-02-27
| ||
21:55 | Merge trunk check-in: bbb2d60708 user: jan.nijtmans tags: memory-API | |
Changes
Changes to changes.
︙ | ︙ | |||
8875 8876 8877 8878 8879 8880 8881 | 2017-06-23 (TIP 472) Support 0d as prefix of decimal numbers (iyer,griffin) 2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann) 2017-09-02 (bug)[0e4d88] replace command, delete trace kills namespace (porter) --- Released 8.7a1, September 8, 2017 --- http://core.tcl.tk/tcl/ for details | > > > > > | 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 | 2017-06-23 (TIP 472) Support 0d as prefix of decimal numbers (iyer,griffin) 2017-08-31 (bug)[2a9465] http state 100 continue handling broken (oehlmann) 2017-09-02 (bug)[0e4d88] replace command, delete trace kills namespace (porter) --- Released 8.7a1, September 8, 2017 --- http://core.tcl.tk/tcl/ for details 2018-03-12 (TIP 490) add oo support for msgcat => msgcat 1.7.0 (oehlmann) 2018-03-12 (TIP 499) custom locale preference list (oehlmann) => msgcat 1.7.0 |
Changes to doc/lsearch.n.
︙ | ︙ | |||
143 144 145 146 147 148 149 150 151 152 153 154 155 156 | This option implies \fB\-sorted\fR and cannot be used with either \fB\-all\fR or \fB\-not\fR. .VE 8.6 .SS "NESTED LIST OPTIONS" .PP These options are used to search lists of lists. They may be used with any other options. .TP \fB\-index\fR\0\fIindexList\fR . This option is designed for use when searching within nested lists. The \fIindexList\fR argument gives a path of indices (much as might be used with the \fBlindex\fR or \fBlset\fR commands) within each element to allow the location of the term being matched against. | > > > > > > > > > > > > > | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | This option implies \fB\-sorted\fR and cannot be used with either \fB\-all\fR or \fB\-not\fR. .VE 8.6 .SS "NESTED LIST OPTIONS" .PP These options are used to search lists of lists. They may be used with any other options. .TP \fB\-stride\0\fIstrideLength\fR . If this option is specified, the list is treated as consisting of groups of \fIstrideLength\fR elements and the groups are searched by either their first element or, if the \fB\-index\fR option is used, by the element within each group given by the first index passed to \fB\-index\fR (which is then ignored by \fB\-index\fR). The resulting index always points to the first element in a group. .PP The list length must be an integer multiple of \fIstrideLength\fR, which in turn must be at least 1. A \fIstrideLength\fR of 1 is the default and indicates no grouping. .TP \fB\-index\fR\0\fIindexList\fR . This option is designed for use when searching within nested lists. The \fIindexList\fR argument gives a path of indices (much as might be used with the \fBlindex\fR or \fBlset\fR commands) within each element to allow the location of the term being matched against. |
︙ | ︙ | |||
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | .PP It is also possible to search inside elements: .PP .CS \fBlsearch\fR -index 1 -all -inline {{a abc} {b bcd} {c cde}} *bc* \fI\(-> {a abc} {b bcd}\fR .CE .SH "SEE ALSO" foreach(n), list(n), lappend(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n) .SH KEYWORDS binary search, linear search, list, match, pattern, regular expression, search, string '\" Local Variables: '\" mode: nroff '\" End: | > > > > > > > | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | .PP It is also possible to search inside elements: .PP .CS \fBlsearch\fR -index 1 -all -inline {{a abc} {b bcd} {c cde}} *bc* \fI\(-> {a abc} {b bcd}\fR .CE .PP The same thing for a flattened list: .PP .CS \fBlsearch\fR -stride 2 -index 1 -all -inline {a abc b bcd c cde} *bc* \fI\(-> {a abc b bcd}\fR .CE .SH "SEE ALSO" foreach(n), list(n), lappend(n), lindex(n), linsert(n), llength(n), lset(n), lsort(n), lrange(n), lreplace(n), string(n) .SH KEYWORDS binary search, linear search, list, match, pattern, regular expression, search, string '\" Local Variables: '\" mode: nroff '\" End: |
Changes to doc/msgcat.n.
1 2 3 4 5 6 7 8 9 10 11 12 13 | '\" '\" Copyright (c) 1998 Mark Harrison. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH "msgcat" n 1.5 msgcat "Tcl Bundled Packages" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME msgcat \- Tcl message catalog .SH SYNOPSIS | | | > > > > > | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | '\" '\" Copyright (c) 1998 Mark Harrison. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH "msgcat" n 1.5 msgcat "Tcl Bundled Packages" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME msgcat \- Tcl message catalog .SH SYNOPSIS \fBpackage require Tcl 8.7\fR .sp \fBpackage require msgcat 1.7\fR .sp \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? .sp \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? .sp .VS "TIP 412" \fB::msgcat::mcexists\fR ?\fB-exactnamespace\fR? ?\fB-exactlocale\fR? \fIsrc-string\fR .VE "TIP 412" .sp .VS "TIP 490" \fB::msgcat::mcpackagenamespaceget\fR .VE "TIP 490" .sp \fB::msgcat::mclocale \fR?\fInewLocale\fR? .sp .VS "TIP 499" \fB::msgcat::mcpreferences\fR ?\fIlocale preference\fR? ... .VE "TIP 499" .sp .VS "TIP 412" \fB::msgcat::mcloadedlocales subcommand\fR ?\fIlocale\fR? .VE "TIP 412" .sp \fB::msgcat::mcload \fIdirname\fR .sp |
︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | .VS "TIP 412" \fB::msgcat::mcpackagelocale subcommand\fR ?\fIlocale\fR? .sp \fB::msgcat::mcpackageconfig subcommand\fR \fIoption\fR ?\fIvalue\fR? .sp \fB::msgcat::mcforgetpackage\fR .VE "TIP 412" .BE .SH DESCRIPTION .PP The \fBmsgcat\fR package provides a set of functions that can be used to manage multi-lingual user interfaces. Text strings are defined in a .QW "message catalog" | > > > > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | .VS "TIP 412" \fB::msgcat::mcpackagelocale subcommand\fR ?\fIlocale\fR? .sp \fB::msgcat::mcpackageconfig subcommand\fR \fIoption\fR ?\fIvalue\fR? .sp \fB::msgcat::mcforgetpackage\fR .VE "TIP 412" .sp .VS "TIP 499" \fB::msgcat::mcutil subcommand\fR ?\fIlocale\fR? .VS "TIP 499" .BE .SH DESCRIPTION .PP The \fBmsgcat\fR package provides a set of functions that can be used to manage multi-lingual user interfaces. Text strings are defined in a .QW "message catalog" |
︙ | ︙ | |||
67 68 69 70 71 72 73 74 75 76 77 78 79 80 | Each package has its own message catalog and configuration settings in \fBmsgcat\fR. .PP A \fIlocale\fR is a specification string describing a user language like \fBde_ch\fR for Swiss German. In \fBmsgcat\fR, there is a global locale initialized by the system locale of the current system. Each package may decide to use the global locale or to use a package specific locale. .PP The global locale may be changed on demand, for example by a user initiated language change or within a multi user application like a web server. .SH COMMANDS .TP \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? . Returns a translation of \fIsrc-string\fR according to the current locale. If additional arguments past \fIsrc-string\fR are given, the \fBformat\fR command is used to substitute the | > > > > > | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | Each package has its own message catalog and configuration settings in \fBmsgcat\fR. .PP A \fIlocale\fR is a specification string describing a user language like \fBde_ch\fR for Swiss German. In \fBmsgcat\fR, there is a global locale initialized by the system locale of the current system. Each package may decide to use the global locale or to use a package specific locale. .PP The global locale may be changed on demand, for example by a user initiated language change or within a multi user application like a web server. .PP .VS tip490 Object oriented programming is supported by the use of a package namespace. .VE tip490 .PP .SH COMMANDS .TP \fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR? . Returns a translation of \fIsrc-string\fR according to the current locale. If additional arguments past \fIsrc-string\fR are given, the \fBformat\fR command is used to substitute the |
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | \fB::msgcat::mc\fR is the main function used to localize an application. Instead of using an English string directly, an application can pass the English string through \fB::msgcat::mc\fR and use the result. If an application is written for a single language in this fashion, then it is easy to add support for additional languages later simply by defining new message catalog entries. .RE .TP \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? . Given several source strings, \fB::msgcat::mcmax\fR returns the length of the longest translated string. This is useful when designing localized GUIs, which may require that all buttons, for example, be a fixed width (which will be the width of the widest button). .TP | > > > > > > > > > > > > | < > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > < | | > > > > > > > > > > < | | | | > > > | > > | > | > | < > > > > | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | \fB::msgcat::mc\fR is the main function used to localize an application. Instead of using an English string directly, an application can pass the English string through \fB::msgcat::mc\fR and use the result. If an application is written for a single language in this fashion, then it is easy to add support for additional languages later simply by defining new message catalog entries. .RE .VS "TIP 490" .TP \fB::msgcat::mcn \fInamespace\fR \fIsrc-string\fR ?\fIarg arg ...\fR? . Like \fB::msgcat::mc\fR, but with the message namespace specified as first argument. .PP .RS \fBmcn\fR may be used for cases where the package namespace is not the namespace of the caller. An example is shown within the description of the command \fB::msgcat::mcpackagenamespaceget\fR below. .RE .PP .TP \fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR? . Given several source strings, \fB::msgcat::mcmax\fR returns the length of the longest translated string. This is useful when designing localized GUIs, which may require that all buttons, for example, be a fixed width (which will be the width of the widest button). .TP .VS "TIP 412" \fB::msgcat::mcexists\fR ?\fB-exactnamespace\fR? ?\fB-exactlocale\fR? ?\fB-namespace\fR \fInamespace\fR? \fIsrc-string\fR . Return true, if there is a translation for the given \fIsrc-string\fR. .PP .RS The search may be limited by the option \fB\-exactnamespace\fR to only check the current namespace and not any parent namespaces. .PP It may also be limited by the option \fB\-exactlocale\fR to only check the first prefered locale (e.g. first element returned by \fB::msgcat::mcpreferences\fR if global locale is used). .PP .VE "TIP 412" .VS "TIP 490" An explicit package namespace may be specified by the option \fB-namespace\fR. The namespace of the caller is used if not explicitly specified. .RE .PP .VE "TIP 490" .VS "TIP 490" .TP \fB::msgcat::mcpackagenamespaceget\fR . Return the package namespace of the caller. This command handles all cases described in section \fBOBJECT ORIENTED PROGRAMMING\fR. .PP .RS Example usage is a tooltip package, which saves the caller package namespace to update the translation each time the tooltip is shown: .CS proc ::tooltip::tooltip {widget message} { ... set messagenamespace [uplevel 1 {::msgcat::mcpackagenamespaceget}] ... bind $widget [list ::tooltip::show $widget $messagenamespace $message] } proc ::tooltip::show {widget messagenamespace message} { ... set message [::msgcat::mcn $messagenamespace $message] ... } .CE .RE .PP .VE "TIP 490" .TP \fB::msgcat::mclocale \fR?\fInewLocale\fR? . If \fInewLocale\fR is omitted, the current locale is returned, otherwise the current locale is set to \fInewLocale\fR. .PP .RS If the new locale is set to \fInewLocale\fR, the corresponding preferences are calculated and set. For example, if the current locale is en_US_funky, then \fB::msgcat::mcpreferences\fR returns \fB{en_us_funky en_us en {}}\fR. .PP The same result may be acheved by \fB::msgcat::mcpreferences\fR {*}[\fB::msgcat::mcutil getpreferences\fR \fInewLocale\fR]. .PP The current locale is always the first element of the list returned by \fBmcpreferences\fR. .PP msgcat stores and compares the locale in a case-insensitive manner, and returns locales in lowercase. The initial locale is determined by the locale specified in the user's environment. See \fBLOCALE SPECIFICATION\fR below for a description of the locale string format. .PP .VS "TIP 412" If the locale is set, the preference list of locales is evaluated. Locales in this list are loaded now, if not jet loaded. .VE "TIP 412" .RE .TP \fB::msgcat::mcpreferences\fR ?\fIlocale preference\fR? ... . Without arguments, returns an ordered list of the locales preferred by the user. The list is ordered from most specific to least preference. .PP .VS "TIP 499" .RS A set of locale preferences may be given to set the list of locale preferences. The current locale is also set, which is the first element of the locale preferences list. .PP Locale preferences are loaded now, if not jet loaded. .PP As an example, the user may prefer French or English text. This may be configured by: .CS ::msgcat::mcpreferences fr en {} .CE .RE .PP .VS "TIP 499" .TP \fB::msgcat:mcloadedlocales subcommand\fR ?\fIlocale\fR? . This group of commands manage the list of loaded locales for packages not setting a package locale. .PP .RS The subcommand \fBget\fR returns the list of currently loaded locales. |
︙ | ︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 | Note that this routine is only called if the concerned package did not set a package locale unknown command name. .RE .TP \fB::msgcat::mcforgetpackage\fR . The calling package clears all its state within the \fBmsgcat\fR package including all settings and translations. .VE "TIP 412" .PP .SH "LOCALE SPECIFICATION" .PP The locale is specified to \fBmsgcat\fR by a locale string passed to \fB::msgcat::mclocale\fR. The locale string consists of a language code, an optional country code, and an optional | > > > > > > > > > > > > > > > > | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | Note that this routine is only called if the concerned package did not set a package locale unknown command name. .RE .TP \fB::msgcat::mcforgetpackage\fR . The calling package clears all its state within the \fBmsgcat\fR package including all settings and translations. .VE "TIP 412" .PP .VS "TIP 499" .TP \fB::msgcat::mcutil getpreferences\fR \fIlocale\fR . Return the preferences list of the given locale as described in section \fBLOCALE SPECIFICATION\fR. An example is the composition of a preference list for the bilingual region "Biel/Bienne" as a concatenation of swiss german and swiss french: .CS % concat [lrange [msgcat::mcutil getpreferences fr_CH] 0 end-1] [msgcat::mcutil getpreferences de_CH] fr_ch fr de_ch de {} .CE .TP \fB::msgcat::mcutil getsystemlocale\fR . The system locale is returned as described by the section \fBLOCALE SPECIFICATION\fR. .VE "TIP 499" .PP .SH "LOCALE SPECIFICATION" .PP The locale is specified to \fBmsgcat\fR by a locale string passed to \fB::msgcat::mclocale\fR. The locale string consists of a language code, an optional country code, and an optional |
︙ | ︙ | |||
433 434 435 436 437 438 439 | .PP .CS \fBmsgcat::mc\fR {Produced %1$d at %2$s} $num $city # ... where that key is mapped to one of the # human-oriented versions by \fBmsgcat::mcset\fR .CE .VS "TIP 412" | | | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | .PP .CS \fBmsgcat::mc\fR {Produced %1$d at %2$s} $num $city # ... where that key is mapped to one of the # human-oriented versions by \fBmsgcat::mcset\fR .CE .VS "TIP 412" .SH "PACKAGE PRIVATE LOCALE" .PP A package using \fBmsgcat\fR may choose to use its own package private locale and its own set of loaded locales, independent to the global locale set by \fB::msgcat::mclocale\fR. .PP This allows a package to change its locale without causing any locales load or removal in other packages and not to invoke the global locale change callback (see below). .PP |
︙ | ︙ | |||
457 458 459 460 461 462 463 | This command may cause the load of locales. .RE .TP \fB::msgcat::mcpackagelocale get\fR . Return the package private locale or the global locale, if no package private locale is set. .TP | | | > > > > > > > > > > > > | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | This command may cause the load of locales. .RE .TP \fB::msgcat::mcpackagelocale get\fR . Return the package private locale or the global locale, if no package private locale is set. .TP \fB::msgcat::mcpackagelocale preferences\fR ?\fIlocale preference\fR? ... . With no parameters, return the package private preferences or the global preferences, if no package private locale is set. The package locale state (set or not) is not changed (in contrast to the command \fB::msgcat::mcpackagelocale set\fR). .PP .RS .VS "TIP 499" If a set of locale preferences is given, it is set as package locale preference list. The package locale is set to the first element of the preference list. A package locale is activated, if it was not set so far. .PP Locale preferences are loaded now for the package, if not jet loaded. .VE "TIP 499" .RE .PP .TP \fB::msgcat::mcpackagelocale loaded\fR . Return the list of locales loaded for this package. .TP \fB::msgcat::mcpackagelocale isset\fR . |
︙ | ︙ | |||
484 485 486 487 488 489 490 | . Returns true, if the given locale is loaded for the package. .TP \fB::msgcat::mcpackagelocale clear\fR . Clear any loaded locales of the package not present in the package preferences. .PP | | | 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | . Returns true, if the given locale is loaded for the package. .TP \fB::msgcat::mcpackagelocale clear\fR . Clear any loaded locales of the package not present in the package preferences. .PP .SH "CHANGING PACKAGE OPTIONS" .PP Each package using msgcat has a set of options within \fBmsgcat\fR. The package options are described in the next sectionPackage options. Each package option may be set or unset individually using the following ensemble: .TP \fB::msgcat::mcpackageconfig get\fR \fIoption\fR . |
︙ | ︙ | |||
559 560 561 562 563 564 565 | The called procedure must return the formatted message which will finally be returned by msgcat::mc. .PP A generic unknown handler is used if set to the empty string. This consists in returning the key if no arguments are given. With given arguments, format is used to process the arguments. .PP See section \fBcallback invocation\fR below. The appended arguments are identical to \fB::msgcat::mcunknown\fR. .RE | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | The called procedure must return the formatted message which will finally be returned by msgcat::mc. .PP A generic unknown handler is used if set to the empty string. This consists in returning the key if no arguments are given. With given arguments, format is used to process the arguments. .PP See section \fBcallback invocation\fR below. The appended arguments are identical to \fB::msgcat::mcunknown\fR. .RE .SH "Callback invocation" A package may decide to register one or multiple callbacks, as described above. .PP Callbacks are invoked, if: .PP 1. the callback command is set, .PP 2. the command is not the empty string, .PP 3. the registering namespace exists. .PP If a called routine fails with an error, the \fBbgerror\fR routine for the interpreter is invoked after command completion. Only exception is the callback \fBunknowncmd\fR, where an error causes the invoking \fBmc\fR-command to fail with that error. .PP .VS tip490 .SH "OBJECT ORIENTED PROGRAMMING" \fBmsgcat\fR supports packages implemented by object oriented programming. Objects and classes should be defined within a package namespace. .PP There are 3 supported cases where package namespace sensitive commands of msgcat (\fBmc\fR, \fBmcexists\fR, \fBmcpackagelocale\fR, \fBmcforgetpackage\fR, \fBmcpackagenamespaceget\fR, \fBmcpackageconfig\fR, \fBmcset\fR and \fBmcmset\fR) may be called: .PP .TP \fB1) In class definition script\fR . \fBmsgcat\fR command is called within a class definition script. .CS namespace eval ::N2 { mcload $dir/msgs oo::class create C1 {puts [mc Hi!]} } .CE .PP .TP \fB2) method defined in a class\fR . \fBmsgcat\fR command is called from a method in an object and the method is defined in a class. .CS namespace eval ::N3Class { mcload $dir/msgs oo::class create C1 oo::define C1 method m1 { puts [mc Hi!] } } .CE .PP .TP \fB3) method defined in a classless object\fR . \fBmsgcat\fR command is called from a method of a classless object. .CS namespace eval ::N4 { mcload $dir/msgs oo::object create O1 oo::objdefine O1 method m1 {} { puts [mc Hi!] } } .CE .PP .VE tip490 .SH EXAMPLES Packages which display a GUI may update their widgets when the global locale changes. To register to a callback, use: .CS namespace eval gui { msgcat::mcpackageconfig changecmd updateGUI proc updateGui args { |
︙ | ︙ | |||
639 640 641 642 643 644 645 | } .CE .VE "TIP 412" .SH CREDITS .PP The message catalog code was developed by Mark Harrison. .SH "SEE ALSO" | | | | 790 791 792 793 794 795 796 797 798 799 800 801 802 | } .CE .VE "TIP 412" .SH CREDITS .PP The message catalog code was developed by Mark Harrison. .SH "SEE ALSO" format(n), scan(n), namespace(n), package(n), oo::class(n), oo::object .SH KEYWORDS internationalization, i18n, localization, l10n, message, text, translation, class, object .\" Local Variables: .\" mode: nroff .\" End: |
Changes to generic/tclAssembly.c.
︙ | ︙ | |||
402 403 404 405 406 407 408 | {"jump4", ASSEM_JUMP4, INST_JUMP4, 0, 0}, {"jumpFalse", ASSEM_JUMP, INST_JUMP_FALSE1, 1, 0}, {"jumpFalse4", ASSEM_JUMP4, INST_JUMP_FALSE4, 1, 0}, {"jumpTable", ASSEM_JUMPTABLE,INST_JUMP_TABLE, 1, 0}, {"jumpTrue", ASSEM_JUMP, INST_JUMP_TRUE1, 1, 0}, {"jumpTrue4", ASSEM_JUMP4, INST_JUMP_TRUE4, 1, 0}, {"label", ASSEM_LABEL, 0, 0, 0}, | < | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | {"jump4", ASSEM_JUMP4, INST_JUMP4, 0, 0}, {"jumpFalse", ASSEM_JUMP, INST_JUMP_FALSE1, 1, 0}, {"jumpFalse4", ASSEM_JUMP4, INST_JUMP_FALSE4, 1, 0}, {"jumpTable", ASSEM_JUMPTABLE,INST_JUMP_TABLE, 1, 0}, {"jumpTrue", ASSEM_JUMP, INST_JUMP_TRUE1, 1, 0}, {"jumpTrue4", ASSEM_JUMP4, INST_JUMP_TRUE4, 1, 0}, {"label", ASSEM_LABEL, 0, 0, 0}, {"lappend", ASSEM_LVT, (INST_LAPPEND_SCALAR1<<8 | INST_LAPPEND_SCALAR4), 1, 1}, {"lappendArray", ASSEM_LVT, (INST_LAPPEND_ARRAY1<<8 | INST_LAPPEND_ARRAY4),2, 1}, {"lappendArrayStk", ASSEM_1BYTE, INST_LAPPEND_ARRAY_STK, 3, 1}, {"lappendList", ASSEM_LVT4, INST_LAPPEND_LIST, 1, 1}, |
︙ | ︙ | |||
430 431 432 433 434 435 436 | {"listNotIn", ASSEM_1BYTE, INST_LIST_NOT_IN, 2, 1}, {"load", ASSEM_LVT, (INST_LOAD_SCALAR1 << 8 | INST_LOAD_SCALAR4), 0, 1}, {"loadArray", ASSEM_LVT, (INST_LOAD_ARRAY1<<8 | INST_LOAD_ARRAY4), 1, 1}, {"loadArrayStk", ASSEM_1BYTE, INST_LOAD_ARRAY_STK, 2, 1}, {"loadStk", ASSEM_1BYTE, INST_LOAD_STK, 1, 1}, | < | 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | {"listNotIn", ASSEM_1BYTE, INST_LIST_NOT_IN, 2, 1}, {"load", ASSEM_LVT, (INST_LOAD_SCALAR1 << 8 | INST_LOAD_SCALAR4), 0, 1}, {"loadArray", ASSEM_LVT, (INST_LOAD_ARRAY1<<8 | INST_LOAD_ARRAY4), 1, 1}, {"loadArrayStk", ASSEM_1BYTE, INST_LOAD_ARRAY_STK, 2, 1}, {"loadStk", ASSEM_1BYTE, INST_LOAD_STK, 1, 1}, {"lsetFlat", ASSEM_LSET_FLAT,INST_LSET_FLAT, INT_MIN,1}, {"lsetList", ASSEM_1BYTE, INST_LSET_LIST, 3, 1}, {"lshift", ASSEM_1BYTE, INST_LSHIFT, 2, 1}, {"lt", ASSEM_1BYTE, INST_LT, 2, 1}, {"mod", ASSEM_1BYTE, INST_MOD, 2, 1}, {"mult", ASSEM_1BYTE, INST_MULT, 2, 1}, {"neq", ASSEM_1BYTE, INST_NEQ, 2, 1}, |
︙ | ︙ | |||
2242 2243 2244 2245 2246 2247 2248 | CompileEnv* envPtr = assemEnvPtr->envPtr; /* Compilation environment */ Tcl_Interp* interp = (Tcl_Interp*) envPtr->iPtr; /* Tcl interpreter */ Tcl_Token* tokenPtr = *tokenPtrPtr; /* INOUT: Pointer to the next token in the * source code */ | | | < < < | | | > > > | > > < | | 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 | CompileEnv* envPtr = assemEnvPtr->envPtr; /* Compilation environment */ Tcl_Interp* interp = (Tcl_Interp*) envPtr->iPtr; /* Tcl interpreter */ Tcl_Token* tokenPtr = *tokenPtrPtr; /* INOUT: Pointer to the next token in the * source code */ Tcl_Obj *value; int status; /* General operand validity check */ if (GetNextOperand(assemEnvPtr, tokenPtrPtr, &value) != TCL_OK) { return TCL_ERROR; } /* Convert to an integer, advance to the next token and return. */ /* * NOTE: Indexing a list with an index before it yields the * same result as indexing after it, and might be more easily portable * when list size limits grow. */ status = TclIndexEncode(interp, value, TCL_INDEX_BEFORE,TCL_INDEX_BEFORE, result); Tcl_DecrRefCount(value); *tokenPtrPtr = TokenAfter(tokenPtr); return status; } /* *----------------------------------------------------------------------------- * |
︙ | ︙ |
Changes to generic/tclBasic.c.
︙ | ︙ | |||
779 780 781 782 783 784 785 786 787 788 789 790 791 792 | TclInitDictCmd(interp); TclInitEncodingCmd(interp); TclInitFileCmd(interp); TclInitInfoCmd(interp); TclInitNamespaceCmd(interp); TclInitStringCmd(interp); TclInitPrefixCmd(interp); /* * Register "clock" subcommands. These *do* go through * Tcl_CreateObjCommand, since they aren't in the global namespace and * involve ensembles. */ | > | 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 | TclInitDictCmd(interp); TclInitEncodingCmd(interp); TclInitFileCmd(interp); TclInitInfoCmd(interp); TclInitNamespaceCmd(interp); TclInitStringCmd(interp); TclInitPrefixCmd(interp); TclInitProcessCmd(interp); /* * Register "clock" subcommands. These *do* go through * Tcl_CreateObjCommand, since they aren't in the global namespace and * involve ensembles. */ |
︙ | ︙ | |||
6328 6329 6330 6331 6332 6333 6334 | /* * If we are just starting to log an error, errorInfo is initialized from * the error message in the interpreter's result. */ iPtr->flags |= ERR_LEGACY_COPY; if (iPtr->errorInfo == NULL) { | | | 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 | /* * If we are just starting to log an error, errorInfo is initialized from * the error message in the interpreter's result. */ iPtr->flags |= ERR_LEGACY_COPY; if (iPtr->errorInfo == NULL) { iPtr->errorInfo = iPtr->objResultPtr; Tcl_IncrRefCount(iPtr->errorInfo); if (!iPtr->errorCode) { Tcl_SetErrorCode(interp, "NONE", NULL); } } /* |
︙ | ︙ |
Changes to generic/tclCmdIL.c.
︙ | ︙ | |||
60 61 62 63 64 65 66 | int isIncreasing; /* Nonzero means sort in increasing order. */ int sortMode; /* The sort mode. One of SORTMODE_* values * defined below. */ Tcl_Obj *compareCmdPtr; /* The Tcl comparison command when sortMode is * SORTMODE_COMMAND. Pre-initialized to hold * base of command. */ int *indexv; /* If the -index option was specified, this | | | > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | int isIncreasing; /* Nonzero means sort in increasing order. */ int sortMode; /* The sort mode. One of SORTMODE_* values * defined below. */ Tcl_Obj *compareCmdPtr; /* The Tcl comparison command when sortMode is * SORTMODE_COMMAND. Pre-initialized to hold * base of command. */ int *indexv; /* If the -index option was specified, this * holds an encoding of the indexes contained * in the list supplied as an argument to * that option. * NULL if no indexes supplied, and points to * singleIndex field when only one * supplied. */ int indexc; /* Number of indexes in indexv array. */ int singleIndex; /* Static space for common index case. */ int unique; int numElements; |
︙ | ︙ | |||
88 89 90 91 92 93 94 | #define SORTMODE_ASCII 0 #define SORTMODE_INTEGER 1 #define SORTMODE_REAL 2 #define SORTMODE_COMMAND 3 #define SORTMODE_DICTIONARY 4 #define SORTMODE_ASCII_NC 8 | < < < < < < < < | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #define SORTMODE_ASCII 0 #define SORTMODE_INTEGER 1 #define SORTMODE_REAL 2 #define SORTMODE_COMMAND 3 #define SORTMODE_DICTIONARY 4 #define SORTMODE_ASCII_NC 8 /* * Forward declarations for procedures defined in this file: */ static int DictionaryCompare(const char *left, const char *right); static Tcl_NRPostProc IfConditionCallback; static int InfoArgsCmd(ClientData dummy, Tcl_Interp *interp, |
︙ | ︙ | |||
2539 2540 2541 2542 2543 2544 2545 | Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ register Tcl_Obj *const objv[]) /* Argument objects. */ { | < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 | Tcl_LrangeObjCmd( ClientData notUsed, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ register Tcl_Obj *const objv[]) /* Argument objects. */ { int listLen, first, last, result; if (objc != 4) { Tcl_WrongNumArgs(interp, 1, objv, "list first last"); return TCL_ERROR; } result = TclListObjLength(interp, objv[1], &listLen); if (result != TCL_OK) { return result; } result = TclGetIntForIndexM(interp, objv[2], /*endValue*/ listLen - 1, &first); if (result != TCL_OK) { return result; } result = TclGetIntForIndexM(interp, objv[3], /*endValue*/ listLen - 1, &last); if (result != TCL_OK) { return result; } Tcl_SetObjResult(interp, TclListObjRange(objv[1], first, last)); return TCL_OK; } /* *---------------------------------------------------------------------- * * Tcl_LrepeatObjCmd -- |
︙ | ︙ | |||
2783 2784 2785 2786 2787 2788 2789 | /* * Complain if the user asked for a start element that is greater than the * list length. This won't ever trigger for the "end-*" case as that will * be properly constrained by TclGetIntForIndex because we use listLen-1 * (to allow for replacing the last elem). */ | | | 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 | /* * Complain if the user asked for a start element that is greater than the * list length. This won't ever trigger for the "end-*" case as that will * be properly constrained by TclGetIntForIndex because we use listLen-1 * (to allow for replacing the last elem). */ if ((first >= listLen) && (listLen > 0)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "list doesn't contain element %s", TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LREPLACE", "BADIDX", NULL); return TCL_ERROR; } if (last >= listLen) { |
︙ | ︙ | |||
2934 2935 2936 2937 2938 2939 2940 | Tcl_LsearchObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { const char *bytes, *patternBytes; | | > | | | > | > < < < | 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 | Tcl_LsearchObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { const char *bytes, *patternBytes; int i, match, index, result=TCL_OK, listc, length, elemLen, bisect; int allocatedIndexVector = 0; int dataType, isIncreasing, lower, upper, start, groupSize, groupOffset; Tcl_WideInt patWide, objWide; int allMatches, inlineReturn, negatedMatch, returnSubindices, noCase; double patDouble, objDouble; SortInfo sortInfo; Tcl_Obj *patObj, **listv, *listPtr, *startPtr, *itemPtr; SortStrCmpFn_t strCmpFn = TclUtfCmp; Tcl_RegExp regexp = NULL; static const char *const options[] = { "-all", "-ascii", "-bisect", "-decreasing", "-dictionary", "-exact", "-glob", "-increasing", "-index", "-inline", "-integer", "-nocase", "-not", "-real", "-regexp", "-sorted", "-start", "-stride", "-subindices", NULL }; enum options { LSEARCH_ALL, LSEARCH_ASCII, LSEARCH_BISECT, LSEARCH_DECREASING, LSEARCH_DICTIONARY, LSEARCH_EXACT, LSEARCH_GLOB, LSEARCH_INCREASING, LSEARCH_INDEX, LSEARCH_INLINE, LSEARCH_INTEGER, LSEARCH_NOCASE, LSEARCH_NOT, LSEARCH_REAL, LSEARCH_REGEXP, LSEARCH_SORTED, LSEARCH_START, LSEARCH_STRIDE, LSEARCH_SUBINDICES }; enum datatypes { ASCII, DICTIONARY, INTEGER, REAL }; enum modes { EXACT, GLOB, REGEXP, SORTED }; enum modes mode; mode = GLOB; dataType = ASCII; isIncreasing = 1; allMatches = 0; inlineReturn = 0; returnSubindices = 0; negatedMatch = 0; bisect = 0; listPtr = NULL; startPtr = NULL; groupSize = 1; groupOffset = 0; start = 0; noCase = 0; sortInfo.compareCmdPtr = NULL; sortInfo.isIncreasing = 1; sortInfo.sortMode = 0; sortInfo.interp = interp; sortInfo.resultCode = TCL_OK; sortInfo.indexv = NULL; sortInfo.indexc = 0; if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? list pattern"); return TCL_ERROR; } for (i = 1; i < objc-2; i++) { if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &index) != TCL_OK) { result = TCL_ERROR; goto done; } switch ((enum options) index) { case LSEARCH_ALL: /* -all */ allMatches = 1; break; |
︙ | ︙ | |||
3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 | /* * If there was a previous -start option, release its saved index * because it will either be replaced or there will be an error. */ if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing starting index", -1)); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); result = TCL_ERROR; goto done; } i++; if (objv[i] == objv[objc - 2]) { /* * Take copy to prevent shimmering problems. Note that it does * not matter if the index obj is also a component of the list * being searched. We only need to copy where the list and the * index are one-and-the-same. */ startPtr = Tcl_DuplicateObj(objv[i]); } else { startPtr = objv[i]; | > > | > > > > > > > > > > > > > > > > > > > > > > | > < < < | > < < < | > > > > | | > > > > > > > > > > > > < > < < < | > | > | 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 | /* * If there was a previous -start option, release its saved index * because it will either be replaced or there will be an error. */ if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); startPtr = NULL; } if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "missing starting index", -1)); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); result = TCL_ERROR; goto done; } i++; if (objv[i] == objv[objc - 2]) { /* * Take copy to prevent shimmering problems. Note that it does * not matter if the index obj is also a component of the list * being searched. We only need to copy where the list and the * index are one-and-the-same. */ startPtr = Tcl_DuplicateObj(objv[i]); } else { startPtr = objv[i]; } Tcl_IncrRefCount(startPtr); break; case LSEARCH_STRIDE: /* -stride */ if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-stride\" option must be " "followed by stride length", -1)); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); result = TCL_ERROR; goto done; } if (Tcl_GetIntFromObj(interp, objv[i+1], &groupSize) != TCL_OK) { result = TCL_ERROR; goto done; } if (groupSize < 1) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "stride length must be at least 1", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT", "BADSTRIDE", NULL); result = TCL_ERROR; goto done; } i++; break; case LSEARCH_INDEX: { /* -index */ Tcl_Obj **indices; int j; if (allocatedIndexVector) { TclStackFree(interp, sortInfo.indexv); allocatedIndexVector = 0; } if (i > objc-4) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-index\" option must be followed by list index", -1)); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); result = TCL_ERROR; goto done; } /* * Store the extracted indices for processing by sublist * extraction. Note that we don't do this using objects because * that has shimmering problems. */ i++; if (TclListObjGetElements(interp, objv[i], &sortInfo.indexc, &indices) != TCL_OK) { result = TCL_ERROR; goto done; } switch (sortInfo.indexc) { case 0: sortInfo.indexv = NULL; break; case 1: sortInfo.indexv = &sortInfo.singleIndex; break; default: sortInfo.indexv = TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); allocatedIndexVector = 1; /* Cannot use indexc field, as it * might be decreased by 1 later. */ } /* * Fill the array by parsing each index. We don't know whether * their scale is sensible yet, but we at least perform the * syntactic check here. */ for (j=0 ; j<sortInfo.indexc ; j++) { int encoded = 0; if (TclIndexEncode(interp, indices[j], TCL_INDEX_BEFORE, TCL_INDEX_AFTER, &encoded) != TCL_OK) { result = TCL_ERROR; } if ((encoded == TCL_INDEX_BEFORE) || (encoded == TCL_INDEX_AFTER)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%s\" cannot select an element " "from any list", Tcl_GetString(indices[j]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX" "OUTOFRANGE", NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (-index option item number %d)", j)); goto done; } sortInfo.indexv[j] = encoded; } break; } } } /* * Subindices only make sense if asked for with -index option set. */ if (returnSubindices && sortInfo.indexc==0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "-subindices cannot be used without -index option", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", "BAD_OPTION_MIX", NULL); result = TCL_ERROR; goto done; } if (bisect && (allMatches || negatedMatch)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "-bisect is not compatible with -all or -not", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", "BAD_OPTION_MIX", NULL); result = TCL_ERROR; goto done; } if (mode == REGEXP) { /* * We can shimmer regexp/list if listv[i] == pattern, so get the * regexp rep before the list rep. First time round, omit the interp * and hope that the compilation will succeed. If it fails, we'll |
︙ | ︙ | |||
3193 3194 3195 3196 3197 3198 3199 | */ regexp = Tcl_GetRegExpFromObj(interp, objv[objc - 1], TCL_REG_ADVANCED | (noCase ? TCL_REG_NOCASE : 0)); } if (regexp == NULL) { | < < < > > | > > > > | > > > > > > > > > > > > > > > > > > > > > > > | | > > > > > > > > > > > > | < | | | < < < > > | > > > > > > | 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 | */ regexp = Tcl_GetRegExpFromObj(interp, objv[objc - 1], TCL_REG_ADVANCED | (noCase ? TCL_REG_NOCASE : 0)); } if (regexp == NULL) { result = TCL_ERROR; goto done; } } /* * Make sure the list argument is a list object and get its length and a * pointer to its array of element pointers. */ result = TclListObjGetElements(interp, objv[objc - 2], &listc, &listv); if (result != TCL_OK) { goto done; } /* * Check for sanity when grouping elements of the overall list together * because of the -stride option. [TIP #351] */ if (groupSize > 1) { if (listc % groupSize) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "list size must be a multiple of the stride length", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", "BADSTRIDE", NULL); result = TCL_ERROR; goto done; } if (sortInfo.indexc > 0) { /* * Use the first value in the list supplied to -index as the * offset of the element within each group by which to sort. */ groupOffset = TclIndexDecode(sortInfo.indexv[0], groupSize - 1); if (groupOffset < 0 || groupOffset >= groupSize) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "when used with \"-stride\", the leading \"-index\"" " value must be within the group", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSEARCH", "BADINDEX", NULL); result = TCL_ERROR; goto done; } if (sortInfo.indexc == 1) { sortInfo.indexc = 0; sortInfo.indexv = NULL; } else { sortInfo.indexc--; for (i = 0; i < sortInfo.indexc; i++) { sortInfo.indexv[i] = sortInfo.indexv[i+1]; } } } } /* * Get the user-specified start offset. */ if (startPtr) { result = TclGetIntForIndexM(interp, startPtr, listc-1, &start); if (result != TCL_OK) { goto done; } if (start < 0) { start = 0; } /* * If the search started past the end of the list, we just return a * "did not match anything at all" result straight away. [Bug 1374778] */ if (start > listc-1) { if (allMatches || inlineReturn) { Tcl_ResetResult(interp); } else { Tcl_SetObjResult(interp, Tcl_NewIntObj(-1)); } goto done; } /* * If start points within a group, it points to the start of the group. */ if (groupSize > 1) { start -= (start % groupSize); } } patObj = objv[objc - 1]; patternBytes = NULL; if (mode == EXACT || mode == SORTED) { switch ((enum datatypes) dataType) { |
︙ | ︙ | |||
3301 3302 3303 3304 3305 3306 3307 | /* * If the data is sorted, we can do a more intelligent search. Note * that there is no point in being smart when -all was specified; in * that case, we have to look at all items anyway, and there is no * sense in doing this when the match sense is inverted. */ | > > > > | | > | | | 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 | /* * If the data is sorted, we can do a more intelligent search. Note * that there is no point in being smart when -all was specified; in * that case, we have to look at all items anyway, and there is no * sense in doing this when the match sense is inverted. */ /* * With -stride, lower, upper and i are kept as multiples of groupSize. */ lower = start - groupSize; upper = listc; while (lower + groupSize != upper && sortInfo.resultCode == TCL_OK) { i = (lower + upper)/2; i -= i % groupSize; if (sortInfo.indexc != 0) { itemPtr = SelectObjFromSublist(listv[i+groupOffset], &sortInfo); if (sortInfo.resultCode != TCL_OK) { result = sortInfo.resultCode; goto done; } } else { itemPtr = listv[i+groupOffset]; } switch ((enum datatypes) dataType) { case ASCII: bytes = TclGetString(itemPtr); match = strCmpFn(patternBytes, bytes); break; case DICTIONARY: |
︙ | ︙ | |||
3401 3402 3403 3404 3405 3406 3407 | * - our matching sense is negated * - we're building a list of all matched items */ if (allMatches) { listPtr = Tcl_NewListObj(0, NULL); } | | | | | 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 | * - our matching sense is negated * - we're building a list of all matched items */ if (allMatches) { listPtr = Tcl_NewListObj(0, NULL); } for (i = start; i < listc; i += groupSize) { match = 0; if (sortInfo.indexc != 0) { itemPtr = SelectObjFromSublist(listv[i+groupOffset], &sortInfo); if (sortInfo.resultCode != TCL_OK) { if (listPtr != NULL) { Tcl_DecrRefCount(listPtr); } result = sortInfo.resultCode; goto done; } } else { itemPtr = listv[i+groupOffset]; } switch (mode) { case SORTED: case EXACT: switch ((enum datatypes) dataType) { case ASCII: |
︙ | ︙ | |||
3503 3504 3505 3506 3507 3508 3509 | break; } else if (inlineReturn) { /* * Note that these appends are not expected to fail. */ if (returnSubindices && (sortInfo.indexc != 0)) { | | > > > > > < | > | | | | | | > > > > > > | > | > > > | 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 | break; } else if (inlineReturn) { /* * Note that these appends are not expected to fail. */ if (returnSubindices && (sortInfo.indexc != 0)) { itemPtr = SelectObjFromSublist(listv[i+groupOffset], &sortInfo); Tcl_ListObjAppendElement(interp, listPtr, itemPtr); } else if (groupSize > 1) { Tcl_ListObjReplace(interp, listPtr, LIST_MAX, 0, groupSize, &listv[i]); } else { itemPtr = listv[i]; Tcl_ListObjAppendElement(interp, listPtr, itemPtr); } } else if (returnSubindices) { int j; itemPtr = Tcl_NewIntObj(i+groupOffset); for (j=0 ; j<sortInfo.indexc ; j++) { Tcl_ListObjAppendElement(interp, itemPtr, Tcl_NewIntObj( TclIndexDecode(sortInfo.indexv[j], listc))); } Tcl_ListObjAppendElement(interp, listPtr, itemPtr); } else { Tcl_ListObjAppendElement(interp, listPtr, Tcl_NewIntObj(i)); } } } /* * Return everything or a single value. */ if (allMatches) { Tcl_SetObjResult(interp, listPtr); } else if (!inlineReturn) { if (returnSubindices) { int j; itemPtr = Tcl_NewIntObj(index+groupOffset); for (j=0 ; j<sortInfo.indexc ; j++) { Tcl_ListObjAppendElement(interp, itemPtr, Tcl_NewIntObj( TclIndexDecode(sortInfo.indexv[j], listc))); } Tcl_SetObjResult(interp, itemPtr); } else { Tcl_SetObjResult(interp, Tcl_NewIntObj(index)); } } else if (index < 0) { /* * Is this superfluous? The result should be a blank object by * default... */ Tcl_SetObjResult(interp, Tcl_NewObj()); } else { if (returnSubindices) { Tcl_SetObjResult(interp, SelectObjFromSublist(listv[i+groupOffset], &sortInfo)); } else if (groupSize > 1) { Tcl_SetObjResult(interp, Tcl_NewListObj(groupSize, &listv[index])); } else { Tcl_SetObjResult(interp, listv[index]); } } result = TCL_OK; /* * Cleanup the index list array. */ done: if (startPtr != NULL) { Tcl_DecrRefCount(startPtr); } if (allocatedIndexVector) { TclStackFree(interp, sortInfo.indexv); } return result; } /* *---------------------------------------------------------------------- |
︙ | ︙ | |||
3753 3754 3755 3756 3757 3758 3759 | case LSORT_DICTIONARY: sortInfo.sortMode = SORTMODE_DICTIONARY; break; case LSORT_INCREASING: sortInfo.isIncreasing = 1; break; case LSORT_INDEX: { | | | 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 | case LSORT_DICTIONARY: sortInfo.sortMode = SORTMODE_DICTIONARY; break; case LSORT_INCREASING: sortInfo.isIncreasing = 1; break; case LSORT_INDEX: { int indexc; Tcl_Obj **indexv; if (i == objc-2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "\"-index\" option must be followed by list index", -1)); Tcl_SetErrorCode(interp, "TCL", "ARGUMENT", "MISSING", NULL); |
︙ | ︙ | |||
3779 3780 3781 3782 3783 3784 3785 | * we do not store the converted values here because we do not * know if this is the only -index option yet and so we can't * allocate any space; that happens after the scan through all the * options is done. */ for (j=0 ; j<indexc ; j++) { | > | > | > > > > > > > > > > | 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 | * we do not store the converted values here because we do not * know if this is the only -index option yet and so we can't * allocate any space; that happens after the scan through all the * options is done. */ for (j=0 ; j<indexc ; j++) { int encoded = 0; int result = TclIndexEncode(interp, indexv[j], TCL_INDEX_BEFORE, TCL_INDEX_AFTER, &encoded); if ((result == TCL_OK) && ((encoded == TCL_INDEX_BEFORE) || (encoded == TCL_INDEX_AFTER))) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "index \"%s\" cannot select an element " "from any list", Tcl_GetString(indexv[j]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX" "OUTOFRANGE", NULL); result = TCL_ERROR; } if (result == TCL_ERROR) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (-index option item number %d)", j)); sortInfo.resultCode = TCL_ERROR; goto done; } } indexPtr = objv[i+1]; |
︙ | ︙ | |||
3860 3861 3862 3863 3864 3865 3866 | default: sortInfo.indexv = TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); allocatedIndexVector = 1; /* Cannot use indexc field, as it * might be decreased by 1 later. */ } for (j=0 ; j<sortInfo.indexc ; j++) { | | | | 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 | default: sortInfo.indexv = TclStackAlloc(interp, sizeof(int) * sortInfo.indexc); allocatedIndexVector = 1; /* Cannot use indexc field, as it * might be decreased by 1 later. */ } for (j=0 ; j<sortInfo.indexc ; j++) { /* Prescreened values, no errors or out of range possible */ TclIndexEncode(NULL, indexv[j], 0, 0, &sortInfo.indexv[j]); } } listObj = objv[objc-1]; if (sortInfo.sortMode == SORTMODE_COMMAND) { Tcl_Obj *newCommandPtr, *newObjPtr; |
︙ | ︙ | |||
3932 3933 3934 3935 3936 3937 3938 | length = length / groupSize; if (sortInfo.indexc > 0) { /* * Use the first value in the list supplied to -index as the * offset of the element within each group by which to sort. */ | | < < < > > > | 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 | length = length / groupSize; if (sortInfo.indexc > 0) { /* * Use the first value in the list supplied to -index as the * offset of the element within each group by which to sort. */ groupOffset = TclIndexDecode(sortInfo.indexv[0], groupSize - 1); if (groupOffset < 0 || groupOffset >= groupSize) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "when used with \"-stride\", the leading \"-index\"" " value must be within the group", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LSORT", "BADINDEX", NULL); sortInfo.resultCode = TCL_ERROR; goto done; } if (sortInfo.indexc == 1) { sortInfo.indexc = 0; sortInfo.indexv = NULL; } else { sortInfo.indexc--; /* * Do not shrink the actual memory block used; that doesn't * work with TclStackAlloc-allocated memory. [Bug 2918962] * * TODO: Consider a pointer increment to replace this * array shift. */ for (i = 0; i < sortInfo.indexc; i++) { sortInfo.indexv[i] = sortInfo.indexv[i+1]; } } } |
︙ | ︙ | |||
4522 4523 4524 4525 4526 4527 4528 | int listLen, index; Tcl_Obj *currentObj; if (TclListObjLength(infoPtr->interp, objPtr, &listLen) != TCL_OK) { infoPtr->resultCode = TCL_ERROR; return NULL; } | < < < < | < < < | 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 | int listLen, index; Tcl_Obj *currentObj; if (TclListObjLength(infoPtr->interp, objPtr, &listLen) != TCL_OK) { infoPtr->resultCode = TCL_ERROR; return NULL; } index = TclIndexDecode(infoPtr->indexv[i], listLen - 1); if (Tcl_ListObjIndex(infoPtr->interp, objPtr, index, ¤tObj) != TCL_OK) { infoPtr->resultCode = TCL_ERROR; return NULL; } if (currentObj == NULL) { |
︙ | ︙ |
Changes to generic/tclCmdMZ.c.
︙ | ︙ | |||
2300 2301 2302 2303 2304 2305 2306 | static int StringRplcCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { | < | | | | | > > > > > > > > | > > > > > < < < > > | < < < | < | | > | | 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 | static int StringRplcCmd( ClientData dummy, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { int first, last, length, end; if (objc < 4 || objc > 5) { Tcl_WrongNumArgs(interp, 1, objv, "string first last ?string?"); return TCL_ERROR; } length = Tcl_GetCharLength(objv[1]); end = length - 1; if (TclGetIntForIndexM(interp, objv[2], end, &first) != TCL_OK || TclGetIntForIndexM(interp, objv[3], end, &last) != TCL_OK){ return TCL_ERROR; } /* * The following test screens out most empty substrings as * candidates for replacement. When they are detected, no * replacement is done, and the result is the original string, */ if ((last < 0) || /* Range ends before start of string */ (first > end) || /* Range begins after end of string */ (last < first)) { /* Range begins after it starts */ /* * BUT!!! when (end < 0) -- an empty original string -- we can * have (first <= end < 0 <= last) and an empty string is permitted * to be replaced. */ Tcl_SetObjResult(interp, objv[1]); } else { Tcl_Obj *resultPtr; if (first < 0) { first = 0; } if (last > end) { last = end; } resultPtr = TclStringReplace(interp, objv[1], first, last + 1 - first, (objc == 5) ? objv[4] : NULL, TCL_STRING_IN_PLACE); Tcl_SetObjResult(interp, resultPtr); } return TCL_OK; } /* *---------------------------------------------------------------------- |
︙ | ︙ | |||
3206 3207 3208 3209 3210 3211 3212 | length2 = strlen(tclDefaultTrimSet); } else { Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?"); return TCL_ERROR; } string1 = TclGetStringFromObj(objv[1], &length1); | | < | 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 | length2 = strlen(tclDefaultTrimSet); } else { Tcl_WrongNumArgs(interp, 1, objv, "string ?chars?"); return TCL_ERROR; } string1 = TclGetStringFromObj(objv[1], &length1); triml = TclTrim(string1, length1, string2, length2, &trimr); Tcl_SetObjResult(interp, Tcl_NewStringObj(string1 + triml, length1 - triml - trimr)); return TCL_OK; } /* |
︙ | ︙ |
Changes to generic/tclCompCmdsGR.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | static void CompileReturnInternal(CompileEnv *envPtr, unsigned char op, int code, int level, Tcl_Obj *returnOpts); static int IndexTailVarIfKnown(Tcl_Interp *interp, Tcl_Token *varTokenPtr, CompileEnv *envPtr); | < | | | < > | | | > > | | | < < < < < < < | | < < < < < < < < < < < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | static void CompileReturnInternal(CompileEnv *envPtr, unsigned char op, int code, int level, Tcl_Obj *returnOpts); static int IndexTailVarIfKnown(Tcl_Interp *interp, Tcl_Token *varTokenPtr, CompileEnv *envPtr); /* *---------------------------------------------------------------------- * * TclGetIndexFromToken -- * * Parse a token to determine if an index value is known at * compile time. * * Returns: * TCL_OK if parsing succeeded, and TCL_ERROR if it failed. * * Side effects: * When TCL_OK is returned, the encoded index value is written * to *index. * *---------------------------------------------------------------------- */ int TclGetIndexFromToken( Tcl_Token *tokenPtr, int before, int after, int *indexPtr) { Tcl_Obj *tmpObj = Tcl_NewObj(); int result = TCL_ERROR; if (TclWordKnownAtCompileTime(tokenPtr, tmpObj)) { result = TclIndexEncode(NULL, tmpObj, before, after, indexPtr); } Tcl_DecrRefCount(tmpObj); return result; } /* *---------------------------------------------------------------------- * * TclCompileGlobalCmd -- |
︙ | ︙ | |||
140 141 142 143 144 145 146 | for (i=1; i<numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); if (localIndex < 0) { return TCL_ERROR; } | | | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | for (i=1; i<numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) { localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); if (localIndex < 0) { return TCL_ERROR; } /* TODO: Consider what value can pass through the * IndexTailVarIfKnown() screen. Full CompileWord() * likely does not apply here. Push known value instead. */ CompileWord(envPtr, varTokenPtr, interp, i); TclEmitInstInt4( INST_NSUPVAR, localIndex, envPtr); } /* |
︙ | ︙ | |||
1050 1051 1052 1053 1054 1055 1056 | } /* * Generate code to leave the rest of the list on the stack. */ TclEmitInstInt4( INST_LIST_RANGE_IMM, idx, envPtr); | | | 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 | } /* * Generate code to leave the rest of the list on the stack. */ TclEmitInstInt4( INST_LIST_RANGE_IMM, idx, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); return TCL_OK; } /* *---------------------------------------------------------------------- * |
︙ | ︙ | |||
1101 1102 1103 1104 1105 1106 1107 | valTokenPtr = TokenAfter(parsePtr->tokenPtr); if (numWords != 3) { goto emitComplexLindex; } idxTokenPtr = TokenAfter(valTokenPtr); | > | < | | > | < | | 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 | valTokenPtr = TokenAfter(parsePtr->tokenPtr); if (numWords != 3) { goto emitComplexLindex; } idxTokenPtr = TokenAfter(valTokenPtr); if (TclGetIndexFromToken(idxTokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_BEFORE, &idx) == TCL_OK) { /* * The idxTokenPtr parsed as a valid index value and was * encoded as expected by INST_LIST_INDEX_IMM. * * NOTE: that we rely on indexing before a list producing the * same result as indexing after a list. */ CompileWord(envPtr, valTokenPtr, interp, 1); TclEmitInstInt4( INST_LIST_INDEX_IMM, idx, envPtr); return TCL_OK; } |
︙ | ︙ | |||
1255 1256 1257 1258 1259 1260 1261 | * at this point. We use an [lrange ... 0 end] for this (instead of * [llength], as with literals) as we must drop any string representation * that might be hanging around. */ if (concat && numWords == 2) { TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); | | | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 | * at this point. We use an [lrange ... 0 end] for this (instead of * [llength], as with literals) as we must drop any string representation * that might be hanging around. */ if (concat && numWords == 2) { TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); } return TCL_OK; } /* *---------------------------------------------------------------------- * |
︙ | ︙ | |||
1329 1330 1331 1332 1333 1334 1335 | int idx1, idx2; if (parsePtr->numWords != 4) { return TCL_ERROR; } listTokenPtr = TokenAfter(parsePtr->tokenPtr); | < < < < < < > | > > > > > | > > > > | 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 | int idx1, idx2; if (parsePtr->numWords != 4) { return TCL_ERROR; } listTokenPtr = TokenAfter(parsePtr->tokenPtr); tokenPtr = TokenAfter(listTokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_AFTER, &idx1) != TCL_OK) { return TCL_ERROR; } /* * Token was an index value, and we treat all "first" indices * before the list same as the start of the list. */ tokenPtr = TokenAfter(tokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_END, &idx2) != TCL_OK) { return TCL_ERROR; } /* * Token was an index value, and we treat all "last" indices * after the list same as the end of the list. */ /* * Issue instructions. It's not safe to skip doing the LIST_RANGE, as * we've not proved that the 'list' argument is really a list. Not that it * is worth trying to do that given current knowledge. */ |
︙ | ︙ | |||
1393 1394 1395 1396 1397 1398 1399 | /* * Parse the index. Will only compile if it is constant and not an * _integer_ less than zero (since we reserve negative indices here for * end-relative indexing) or an end-based index greater than 'end' itself. */ tokenPtr = TokenAfter(listTokenPtr); | > > > > > > > > > | | | | | > > > > > > > > > > > > | | | 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | /* * Parse the index. Will only compile if it is constant and not an * _integer_ less than zero (since we reserve negative indices here for * end-relative indexing) or an end-based index greater than 'end' itself. */ tokenPtr = TokenAfter(listTokenPtr); /* * NOTE: This command treats all inserts at indices before the list * the same as inserts at the start of the list, and all inserts * after the list the same as inserts at the end of the list. We * make that transformation here so we can use the optimized bytecode * as much as possible. */ if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_END, &idx) != TCL_OK) { return TCL_ERROR; } /* * There are four main cases. If there are no values to insert, this is * just a confirm-listiness check. If the index is '0', this is a prepend. * If the index is 'end' (== TCL_INDEX_END), this is an append. Otherwise, * this is a splice (== split, insert values as list, concat-3). */ CompileWord(envPtr, listTokenPtr, interp, 1); if (parsePtr->numWords == 3) { TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); return TCL_OK; } for (i=3 ; i<parsePtr->numWords ; i++) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, i); } TclEmitInstInt4( INST_LIST, i-3, envPtr); if (idx == TCL_INDEX_START) { TclEmitInstInt4( INST_REVERSE, 2, envPtr); TclEmitOpcode( INST_LIST_CONCAT, envPtr); } else if (idx == TCL_INDEX_END) { TclEmitOpcode( INST_LIST_CONCAT, envPtr); } else { /* * Here we handle two ranges for idx. First when idx > 0, we * want the first half of the split to end at index idx-1 and * the second half to start at index idx. * Second when idx < TCL_INDEX_END, indicating "end-N" indexing, * we want the first half of the split to end at index end-N and * the second half to start at index end-N+1. We accomplish this * with a pre-adjustment of the end-N value. * The root of this is that the commands [lrange] and [linsert] * differ in their interpretation of the "end" index. */ if (idx < TCL_INDEX_END) { idx++; } TclEmitInstInt4( INST_OVER, 1, envPtr); TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); TclEmitInt4( idx-1, envPtr); TclEmitInstInt4( INST_REVERSE, 3, envPtr); TclEmitInstInt4( INST_LIST_RANGE_IMM, idx, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); TclEmitOpcode( INST_LIST_CONCAT, envPtr); TclEmitOpcode( INST_LIST_CONCAT, envPtr); } return TCL_OK; } |
︙ | ︙ | |||
1461 1462 1463 1464 1465 1466 1467 | * command. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds the resulting instructions. */ { Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ | < > < < < < < < > | > | | < < | < < > > > > | < < < > > > | < < < < < < | > > > > > > > < < < < | < < | < < | | > > | < | < < > | < < < | < > > | < | > > > > > | | | | | < < < < < | < < < < < < < | < < > | | < < | < | < < > | < > > > > > > > | < | | < < | < | < < < < < < < | < < | > | | < < < | < < < < > < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < | > > > > > | | > > > | > > > > | > | > | < | < | < < < < < < < < < < | | | > > | < > | < > > > | | < > | < < < | < < < | < < < | | 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 | * command. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds the resulting instructions. */ { Tcl_Token *tokenPtr, *listTokenPtr; DefineLineInformation; /* TIP #280 */ int idx1, idx2, i, offset, offset2; int emptyPrefix=1, suffixStart = 0; if (parsePtr->numWords < 4) { return TCL_ERROR; } listTokenPtr = TokenAfter(parsePtr->tokenPtr); tokenPtr = TokenAfter(listTokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_START, TCL_INDEX_AFTER, &idx1) != TCL_OK) { return TCL_ERROR; } tokenPtr = TokenAfter(tokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_END, &idx2) != TCL_OK) { return TCL_ERROR; } /* * idx1, idx2 are the conventional encoded forms of the tokens parsed * as all forms of index values. Values of idx1 that come before the * list are treated the same as if they were the start of the list. * Values of idx2 that come after the list are treated the same as if * they were the end of the list. */ if (idx1 == TCL_INDEX_AFTER) { /* * [lreplace] treats idx1 value end+1 differently from end+2, etc. * The operand encoding cannot distinguish them, so we must bail * out to direct evaluation. */ return TCL_ERROR; } /* * General structure of the [lreplace] result is * prefix replacement suffix * In a few cases we can predict various parts will be empty and * take advantage. * * The proper suffix begins with the greater of indices idx1 or * idx2 + 1. If we cannot tell at compile time which is greater, * we must defer to direct evaluation. */ if (idx2 == TCL_INDEX_BEFORE) { suffixStart = idx1; } else if (idx2 == TCL_INDEX_END) { suffixStart = TCL_INDEX_AFTER; } else if (((idx2 < TCL_INDEX_END) && (idx1 <= TCL_INDEX_END)) || ((idx2 >= TCL_INDEX_START) && (idx1 >= TCL_INDEX_START))) { suffixStart = (idx1 > idx2 + 1) ? idx1 : idx2 + 1; } else { return TCL_ERROR; } /* All paths start with computing/pushing the original value. */ CompileWord(envPtr, listTokenPtr, interp, 1); /* * Push all the replacement values next so any errors raised in * creating them get raised first. */ if (parsePtr->numWords > 4) { /* Push the replacement arguments */ tokenPtr = TokenAfter(tokenPtr); for (i=4 ; i<parsePtr->numWords ; i++) { CompileWord(envPtr, tokenPtr, interp, i); tokenPtr = TokenAfter(tokenPtr); } /* Make a list of them... */ TclEmitInstInt4( INST_LIST, i - 4, envPtr); emptyPrefix = 0; } /* * [lreplace] raises an error when idx1 points after the list, but * only when the list is not empty. This is maximum stupidity. * * TODO: TIP this nonsense away! */ if (idx1 >= TCL_INDEX_START) { if (emptyPrefix) { TclEmitOpcode( INST_DUP, envPtr); } else { TclEmitInstInt4( INST_OVER, 1, envPtr); } TclEmitOpcode( INST_LIST_LENGTH, envPtr); TclEmitOpcode( INST_DUP, envPtr); offset = CurrentOffset(envPtr); TclEmitInstInt1( INST_JUMP_FALSE1, 0, envPtr); /* List is not empty */ TclEmitPush(TclAddLiteralObj(envPtr, Tcl_NewIntObj(idx1), NULL), envPtr); TclEmitOpcode( INST_GT, envPtr); offset2 = CurrentOffset(envPtr); TclEmitInstInt1( INST_JUMP_TRUE1, 0, envPtr); /* Idx1 >= list length ===> raise an error */ TclEmitPush(TclAddLiteralObj(envPtr, Tcl_ObjPrintf( "list doesn't contain element %d", idx1), NULL), envPtr); CompileReturnInternal(envPtr, INST_RETURN_IMM, TCL_ERROR, 0, Tcl_ObjPrintf("-errorcode {TCL OPERATION LREPLACE BADIDX}")); TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset, envPtr->codeStart + offset + 1); TclEmitOpcode( INST_POP, envPtr); TclStoreInt1AtPtr(CurrentOffset(envPtr) - offset2, envPtr->codeStart + offset2 + 1); } if ((idx1 == suffixStart) && (parsePtr->numWords == 4)) { /* * This is a "no-op". Example: [lreplace {a b c} 2 0] * We still do a list operation to get list-verification * and canonicalization side effects. */ TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); return TCL_OK; } if (idx1 != TCL_INDEX_START) { /* Prefix may not be empty; generate bytecode to push it */ if (emptyPrefix) { TclEmitOpcode( INST_DUP, envPtr); } else { TclEmitInstInt4( INST_OVER, 1, envPtr); } TclEmitInstInt4( INST_LIST_RANGE_IMM, 0, envPtr); TclEmitInt4( idx1 - 1, envPtr); if (!emptyPrefix) { TclEmitInstInt4( INST_REVERSE, 2, envPtr); TclEmitOpcode( INST_LIST_CONCAT, envPtr); } emptyPrefix = 0; } if (!emptyPrefix) { TclEmitInstInt4( INST_REVERSE, 2, envPtr); } if (suffixStart == TCL_INDEX_AFTER) { TclEmitOpcode( INST_POP, envPtr); if (emptyPrefix) { PushStringLiteral(envPtr, ""); } } else { /* Suffix may not be empty; generate bytecode to push it */ TclEmitInstInt4( INST_LIST_RANGE_IMM, suffixStart, envPtr); TclEmitInt4( TCL_INDEX_END, envPtr); if (!emptyPrefix) { TclEmitOpcode( INST_LIST_CONCAT, envPtr); } } return TCL_OK; } /* *---------------------------------------------------------------------- * * TclCompileLsetCmd -- |
︙ | ︙ | |||
2931 2932 2933 2934 2935 2936 2937 | localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); if (localIndex < 0) { return TCL_ERROR; } | | | 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 | localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr); if (localIndex < 0) { return TCL_ERROR; } /* TODO: Consider what value can pass through the * IndexTailVarIfKnown() screen. Full CompileWord() * likely does not apply here. Push known value instead. */ CompileWord(envPtr, varTokenPtr, interp, i); TclEmitInstInt4( INST_VARIABLE, localIndex, envPtr); if (i+1 < numWords) { /* |
︙ | ︙ |
Changes to generic/tclCompCmdsSZ.c.
︙ | ︙ | |||
103 104 105 106 107 108 109 | #define LOAD(idx) \ if ((idx)<256) {OP1(LOAD_SCALAR1,(idx));} else {OP4(LOAD_SCALAR4,(idx));} #define STORE(idx) \ if ((idx)<256) {OP1(STORE_SCALAR1,(idx));} else {OP4(STORE_SCALAR4,(idx));} #define INVOKE(name) \ TclEmitInvoke(envPtr,INST_##name) | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | #define LOAD(idx) \ if ((idx)<256) {OP1(LOAD_SCALAR1,(idx));} else {OP4(LOAD_SCALAR4,(idx));} #define STORE(idx) \ if ((idx)<256) {OP1(STORE_SCALAR1,(idx));} else {OP4(STORE_SCALAR4,(idx));} #define INVOKE(name) \ TclEmitInvoke(envPtr,INST_##name) /* *---------------------------------------------------------------------- * * TclCompileSetCmd -- * * Procedure called to compile the "set" command. |
︙ | ︙ | |||
979 980 981 982 983 984 985 986 987 988 989 | if (parsePtr->numWords != 4) { return TCL_ERROR; } stringTokenPtr = TokenAfter(parsePtr->tokenPtr); fromTokenPtr = TokenAfter(stringTokenPtr); toTokenPtr = TokenAfter(fromTokenPtr); /* * Parse the two indices. */ | > > > | > > > > > > > > > > > > > > | > > > > > > > > > > < < | | > > > | > > > | | > | | < < < > > > > | < < < | > > > > > | < < > | > > > > > | > > | < < < < > > > | > | > | | > > | > > > > > > > > > > > > > > | < | < < | | | > > | < < < > | < < < > | | | | | | > > | > > | > > > > > | | > > > > > > | > | > > > > | > > > | > | | > | > > | | | < < < < < < < < < < > | | > < | > > > | < < | < > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > | | < | 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 | if (parsePtr->numWords != 4) { return TCL_ERROR; } stringTokenPtr = TokenAfter(parsePtr->tokenPtr); fromTokenPtr = TokenAfter(stringTokenPtr); toTokenPtr = TokenAfter(fromTokenPtr); /* Every path must push the string argument */ CompileWord(envPtr, stringTokenPtr, interp, 1); /* * Parse the two indices. */ if (TclGetIndexFromToken(fromTokenPtr, TCL_INDEX_START, TCL_INDEX_AFTER, &idx1) != TCL_OK) { goto nonConstantIndices; } /* * Token parsed as an index expression. We treat all indices before * the string the same as the start of the string. */ if (idx1 == TCL_INDEX_AFTER) { /* [string range $s end+1 $last] must be empty string */ OP( POP); PUSH( ""); return TCL_OK; } if (TclGetIndexFromToken(toTokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_END, &idx2) != TCL_OK) { goto nonConstantIndices; } /* * Token parsed as an index expression. We treat all indices after * the string the same as the end of the string. */ if (idx2 == TCL_INDEX_BEFORE) { /* [string range $s $first -1] must be empty string */ OP( POP); PUSH( ""); return TCL_OK; } /* * Push the operand onto the stack and then the substring operation. */ OP44( STR_RANGE_IMM, idx1, idx2); return TCL_OK; /* * Push the operands onto the stack and then the substring operation. */ nonConstantIndices: CompileWord(envPtr, fromTokenPtr, interp, 2); CompileWord(envPtr, toTokenPtr, interp, 3); OP( STR_RANGE); return TCL_OK; } int TclCompileStringReplaceCmd( Tcl_Interp *interp, /* Tcl interpreter for context. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the * command. */ Command *cmdPtr, /* Points to defintion of command being * compiled. */ CompileEnv *envPtr) /* Holds the resulting instructions. */ { Tcl_Token *tokenPtr, *valueTokenPtr; DefineLineInformation; /* TIP #280 */ int first, last; if (parsePtr->numWords < 4 || parsePtr->numWords > 5) { return TCL_ERROR; } /* Bytecode to compute/push string argument being replaced */ valueTokenPtr = TokenAfter(parsePtr->tokenPtr); CompileWord(envPtr, valueTokenPtr, interp, 1); /* * Check for first index known and useful at compile time. */ tokenPtr = TokenAfter(valueTokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, &first) != TCL_OK) { goto genericReplace; } /* * Check for last index known and useful at compile time. */ tokenPtr = TokenAfter(tokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, &last) != TCL_OK) { goto genericReplace; } /* * [string replace] is an odd bird. For many arguments it is * a conventional substring replacer. However it also goes out * of its way to become a no-op for many cases where it would be * replacing an empty substring. Precisely, it is a no-op when * * (last < first) OR * (last < 0) OR * (end < first) * * For some compile-time values we can detect these cases, and * compile direct to bytecode implementing the no-op. */ if ((last == TCL_INDEX_BEFORE) /* Know (last < 0) */ || (first == TCL_INDEX_AFTER) /* Know (first > end) */ /* * Tricky to determine when runtime (last < first) can be * certainly known based on the encoded values. Consider the * cases... * * (first <= TCL_INDEX_END) && * (last == TCL_INDEX_AFTER) => cannot tell REJECT * (last <= TCL_INDEX END) && (last < first) => ACCEPT * else => cannot tell REJECT */ || ((first <= TCL_INDEX_END) && (last <= TCL_INDEX_END) && (last < first)) /* Know (last < first) */ /* * (first == TCL_INDEX_BEFORE) && * (last == TCL_INDEX_AFTER) => (first < last) REJECT * (last <= TCL_INDEX_END) => cannot tell REJECT * else => (first < last) REJECT * * else [[first >= TCL_INDEX_START]] && * (last == TCL_INDEX_AFTER) => cannot tell REJECT * (last <= TCL_INDEX_END) => cannot tell REJECT * else [[last >= TCL_INDEX START]] && (last < first) => ACCEPT */ || ((first >= TCL_INDEX_START) && (last >= TCL_INDEX_START) && (last < first))) { /* Know (last < first) */ if (parsePtr->numWords == 5) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 4); OP( POP); /* Pop newString */ } /* Original string argument now on TOS as result */ return TCL_OK; } if (parsePtr->numWords == 5) { /* * When we have a string replacement, we have to take care about * not replacing empty substrings that [string replace] promises * not to replace * * The remaining index values might be suitable for conventional * string replacement, but only if they cannot possibly meet the * conditions described above at runtime. If there's a chance they * might, we would have to emit bytecode to check and at that point * we're paying more in bytecode execution time than would make * things worthwhile. Trouble is we are very limited in * how much we can detect that at compile time. After decoding, * we need, first: * * (first <= end) * * The encoded indices (first <= TCL_INDEX END) and * (first == TCL_INDEX_BEFORE) always meets this condition, but * any other encoded first index has some list for which it fails. * * We also need, second: * * (last >= 0) * * The encoded indices (last >= TCL_INDEX_START) and * (last == TCL_INDEX_AFTER) always meet this condition but any * other encoded last index has some list for which it fails. * * Finally we need, third: * * (first <= last) * * Considered in combination with the constraints we already have, * we see that we can proceed when (first == TCL_INDEX_BEFORE) * or (last == TCL_INDEX_AFTER). These also permit simplification * of the prefix|replace|suffix construction. The other constraints, * though, interfere with getting a guarantee that first <= last. */ if ((first == TCL_INDEX_BEFORE) && (last >= TCL_INDEX_START)) { /* empty prefix */ tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 4); OP4( REVERSE, 2); if (last == TCL_INDEX_AFTER) { OP( POP); /* Pop original */ } else { OP44( STR_RANGE_IMM, last + 1, TCL_INDEX_END); OP1( STR_CONCAT1, 2); } return TCL_OK; } if ((last == TCL_INDEX_AFTER) && (first <= TCL_INDEX_END)) { OP44( STR_RANGE_IMM, 0, first-1); tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 4); OP1( STR_CONCAT1, 2); return TCL_OK; } /* FLOW THROUGH TO genericReplace */ } else { /* * When we have no replacement string to worry about, we may * have more luck, because the forbidden empty string replacements * are harmless when they are replaced by another empty string. */ if ((first == TCL_INDEX_BEFORE) || (first == TCL_INDEX_START)) { /* empty prefix - build suffix only */ if ((last == TCL_INDEX_END) || (last == TCL_INDEX_AFTER)) { /* empty suffix too => empty result */ OP( POP); /* Pop original */ PUSH ( ""); return TCL_OK; } OP44( STR_RANGE_IMM, last + 1, TCL_INDEX_END); return TCL_OK; } else { if ((last == TCL_INDEX_END) || (last == TCL_INDEX_AFTER)) { /* empty suffix - build prefix only */ OP44( STR_RANGE_IMM, 0, first-1); return TCL_OK; } OP( DUP); OP44( STR_RANGE_IMM, 0, first-1); OP4( REVERSE, 2); OP44( STR_RANGE_IMM, last + 1, TCL_INDEX_END); OP1( STR_CONCAT1, 2); return TCL_OK; } } genericReplace: tokenPtr = TokenAfter(valueTokenPtr); CompileWord(envPtr, tokenPtr, interp, 2); tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 3); if (parsePtr->numWords == 5) { tokenPtr = TokenAfter(tokenPtr); CompileWord(envPtr, tokenPtr, interp, 4); } else { PUSH( ""); } OP( STR_REPLACE); return TCL_OK; } int TclCompileStringTrimLCmd( Tcl_Interp *interp, /* Used for error reporting. */ Tcl_Parse *parsePtr, /* Points to a parse structure for the command * created by Tcl_ParseCommand. */ |
︙ | ︙ |
Changes to generic/tclCompExpr.c.
︙ | ︙ | |||
732 733 734 735 736 737 738 | Tcl_ListObjAppendElement(NULL, funcList, literal); } else if (Tcl_GetBooleanFromObj(NULL,literal,&b) == TCL_OK) { lexeme = BOOLEAN; } else { Tcl_DecrRefCount(literal); msg = Tcl_ObjPrintf("invalid bareword \"%.*s%s\"", | | | | | | 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | Tcl_ListObjAppendElement(NULL, funcList, literal); } else if (Tcl_GetBooleanFromObj(NULL,literal,&b) == TCL_OK) { lexeme = BOOLEAN; } else { Tcl_DecrRefCount(literal); msg = Tcl_ObjPrintf("invalid bareword \"%.*s%s\"", (scanned < limit) ? (int)scanned : (int)limit - 3, start, (scanned < limit) ? "" : "..."); post = Tcl_ObjPrintf( "should be \"$%.*s%s\" or \"{%.*s%s}\"", (scanned < limit) ? (int)scanned : (int)limit - 3, start, (scanned < limit) ? "" : "...", (scanned < limit) ? (int)scanned : (int)limit - 3, start, (scanned < limit) ? "" : "..."); Tcl_AppendPrintfToObj(post, " or \"%.*s%s(...)\" or ...", (scanned < limit) ? (int)scanned : (int)limit - 3, start, (scanned < limit) ? "" : "..."); errCode = "BAREWORD"; if (start[0] == '0') { const char *stop; TclParseNumber(NULL, NULL, NULL, start, scanned, &stop, TCL_PARSE_NO_WHITESPACE); |
︙ | ︙ | |||
1405 1406 1407 1408 1409 1410 1411 | Tcl_AppendPrintfToObj(msg, "\nin expression \"%s%.*s%.*s%s%s%.*s%s\"", ((start - limit) < parsePtr->string) ? "" : "...", ((start - limit) < parsePtr->string) ? (int) (start - parsePtr->string) : (int)limit - 3, ((start - limit) < parsePtr->string) ? parsePtr->string : start - limit + 3, | | | | 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 | Tcl_AppendPrintfToObj(msg, "\nin expression \"%s%.*s%.*s%s%s%.*s%s\"", ((start - limit) < parsePtr->string) ? "" : "...", ((start - limit) < parsePtr->string) ? (int) (start - parsePtr->string) : (int)limit - 3, ((start - limit) < parsePtr->string) ? parsePtr->string : start - limit + 3, (scanned < limit) ? (int)scanned : (int)limit - 3, start, (scanned < limit) ? "" : "...", insertMark ? mark : "", (start + scanned + limit > parsePtr->end) ? (int) (parsePtr->end - start) - (int)scanned : (int)limit-3, start + scanned, (start + scanned + limit > parsePtr->end) ? "" : "..."); /* * Next, append any postscript message. */ |
︙ | ︙ |
Changes to generic/tclCompile.c.
︙ | ︙ | |||
125 126 127 128 129 130 131 | {"jumpTrue4", 5, -1, 1, {OPERAND_OFFSET4}}, /* Jump relative to (pc + op4) if stktop expr object is true */ {"jumpFalse1", 2, -1, 1, {OPERAND_OFFSET1}}, /* Jump relative to (pc + op1) if stktop expr object is false */ {"jumpFalse4", 5, -1, 1, {OPERAND_OFFSET4}}, /* Jump relative to (pc + op4) if stktop expr object is false */ | < < < < | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | {"jumpTrue4", 5, -1, 1, {OPERAND_OFFSET4}}, /* Jump relative to (pc + op4) if stktop expr object is true */ {"jumpFalse1", 2, -1, 1, {OPERAND_OFFSET1}}, /* Jump relative to (pc + op1) if stktop expr object is false */ {"jumpFalse4", 5, -1, 1, {OPERAND_OFFSET4}}, /* Jump relative to (pc + op4) if stktop expr object is false */ {"bitor", 1, -1, 0, {OPERAND_NONE}}, /* Bitwise or: push (stknext | stktop) */ {"bitxor", 1, -1, 0, {OPERAND_NONE}}, /* Bitwise xor push (stknext ^ stktop) */ {"bitand", 1, -1, 0, {OPERAND_NONE}}, /* Bitwise and: push (stknext & stktop) */ {"eq", 1, -1, 0, {OPERAND_NONE}}, |
︙ | ︙ | |||
169 170 171 172 173 174 175 | /* Unary plus: push +stktop */ {"uminus", 1, 0, 0, {OPERAND_NONE}}, /* Unary minus: push -stktop */ {"bitnot", 1, 0, 0, {OPERAND_NONE}}, /* Bitwise not: push ~stktop */ {"not", 1, 0, 0, {OPERAND_NONE}}, /* Logical not: push !stktop */ | < < < < < < < < < < < | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | /* Unary plus: push +stktop */ {"uminus", 1, 0, 0, {OPERAND_NONE}}, /* Unary minus: push -stktop */ {"bitnot", 1, 0, 0, {OPERAND_NONE}}, /* Bitwise not: push ~stktop */ {"not", 1, 0, 0, {OPERAND_NONE}}, /* Logical not: push !stktop */ {"tryCvtToNumeric", 1, 0, 0, {OPERAND_NONE}}, /* Try converting stktop to first int then double if possible. */ {"break", 1, 0, 0, {OPERAND_NONE}}, /* Abort closest enclosing loop; if none, return TCL_BREAK code. */ {"continue", 1, 0, 0, {OPERAND_NONE}}, /* Skip to next iteration of closest enclosing loop; if none, return * TCL_CONTINUE code. */ {"beginCatch4", 5, 0, 1, {OPERAND_UINT4}}, /* Record start of catch with the operand's exception index. Push the * current stack depth onto a special catch stack. */ {"endCatch", 1, 0, 0, {OPERAND_NONE}}, /* End of last catch. Pop the bytecode interpreter's catch stack. */ {"pushResult", 1, +1, 0, {OPERAND_NONE}}, /* Push the interpreter's object result onto the stack. */ |
︙ | ︙ | |||
336 337 338 339 340 341 342 | * indicated by op4 to hold the iterator state. The local scalar * should not refer to a named variable as the value is not wholly * managed correctly. * Stack: ... dict => ... value key doneBool */ {"dictNext", 5, +3, 1, {OPERAND_LVT4}}, /* Get the next iteration from the iterator in op4's local scalar. * Stack: ... => ... value key doneBool */ | < < < | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | * indicated by op4 to hold the iterator state. The local scalar * should not refer to a named variable as the value is not wholly * managed correctly. * Stack: ... dict => ... value key doneBool */ {"dictNext", 5, +3, 1, {OPERAND_LVT4}}, /* Get the next iteration from the iterator in op4's local scalar. * Stack: ... => ... value key doneBool */ {"dictUpdateStart", 9, 0, 2, {OPERAND_LVT4, OPERAND_AUX4}}, /* Create the variables (described in the aux data referred to by the * second immediate argument) to mirror the state of the dictionary in * the variable referred to by the first immediate argument. The list * of keys (top of the stack, not popped) must be the same length as * the list of variables. * Stack: ... keyList => ... keyList */ |
︙ | ︙ | |||
1424 1425 1426 1427 1428 1429 1430 | int numBytes, /* Number of bytes in source string. */ const CmdFrame *invoker, /* Location context invoking the bcc */ int word) /* Index of the word in that context getting * compiled */ { Interp *iPtr = (Interp *) interp; | | | 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 | int numBytes, /* Number of bytes in source string. */ const CmdFrame *invoker, /* Location context invoking the bcc */ int word) /* Index of the word in that context getting * compiled */ { Interp *iPtr = (Interp *) interp; assert(tclInstructionTable[LAST_INST_OPCODE].name == NULL); envPtr->iPtr = iPtr; envPtr->source = stringPtr; envPtr->numSrcBytes = numBytes; envPtr->procPtr = iPtr->compiledProcPtr; iPtr->compiledProcPtr = NULL; envPtr->numCommands = 0; |
︙ | ︙ |
Changes to generic/tclCompile.h.
︙ | ︙ | |||
515 516 517 518 519 520 521 | #endif /* TCL_COMPILE_STATS */ } ByteCode; /* * Opcodes for the Tcl bytecode instructions. These must correspond to the * entries in the table of instruction descriptions, tclInstructionTable, in * tclCompile.c. Also, the order and number of the expression opcodes (e.g., | | > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < < | | | | | | | | | | | | | | | | | | | | | | | | < < < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | | < | | | | < | | < | | < | | | | | | | < | | < | < | | < | | | | | < | | | | | | | | < | | | | | | < | | | | | < | | | | < | | < | | < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | #endif /* TCL_COMPILE_STATS */ } ByteCode; /* * Opcodes for the Tcl bytecode instructions. These must correspond to the * entries in the table of instruction descriptions, tclInstructionTable, in * tclCompile.c. Also, the order and number of the expression opcodes (e.g., * INST_BITOR) must match the entries in the array operatorStrings in * tclExecute.c. */ enum TclInstruction { /* Opcodes 0 to 9 */ INST_DONE = 0, INST_PUSH1, INST_PUSH4, INST_POP, INST_DUP, INST_STR_CONCAT1, INST_INVOKE_STK1, INST_INVOKE_STK4, INST_EVAL_STK, INST_EXPR_STK, /* Opcodes 10 to 23 */ INST_LOAD_SCALAR1, INST_LOAD_SCALAR4, INST_LOAD_SCALAR_STK, INST_LOAD_ARRAY1, INST_LOAD_ARRAY4, INST_LOAD_ARRAY_STK, INST_LOAD_STK, INST_STORE_SCALAR1, INST_STORE_SCALAR4, INST_STORE_SCALAR_STK, INST_STORE_ARRAY1, INST_STORE_ARRAY4, INST_STORE_ARRAY_STK, INST_STORE_STK, /* Opcodes 24 to 33 */ INST_INCR_SCALAR1, INST_INCR_SCALAR_STK, INST_INCR_ARRAY1, INST_INCR_ARRAY_STK, INST_INCR_STK, INST_INCR_SCALAR1_IMM, INST_INCR_SCALAR_STK_IMM, INST_INCR_ARRAY1_IMM, INST_INCR_ARRAY_STK_IMM, INST_INCR_STK_IMM, /* Opcodes 34 to 39 */ INST_JUMP1, INST_JUMP4, INST_JUMP_TRUE1, INST_JUMP_TRUE4, INST_JUMP_FALSE1, INST_JUMP_FALSE4, /* Opcodes 42 to 64 */ INST_BITOR, INST_BITXOR, INST_BITAND, INST_EQ, INST_NEQ, INST_LT, INST_GT, INST_LE, INST_GE, INST_LSHIFT, INST_RSHIFT, INST_ADD, INST_SUB, INST_MULT, INST_DIV, INST_MOD, INST_UPLUS, INST_UMINUS, INST_BITNOT, INST_LNOT, INST_TRY_CVT_TO_NUMERIC, /* Opcodes 65 to 66 */ INST_BREAK, INST_CONTINUE, /* Opcodes 69 to 72 */ INST_BEGIN_CATCH4, INST_END_CATCH, INST_PUSH_RESULT, INST_PUSH_RETURN_CODE, /* Opcodes 73 to 78 */ INST_STR_EQ, INST_STR_NEQ, INST_STR_CMP, INST_STR_LEN, INST_STR_INDEX, INST_STR_MATCH, /* Opcodes 79 to 81 */ INST_LIST, INST_LIST_INDEX, INST_LIST_LENGTH, /* Opcodes 82 to 87 */ INST_APPEND_SCALAR1, INST_APPEND_SCALAR4, INST_APPEND_ARRAY1, INST_APPEND_ARRAY4, INST_APPEND_ARRAY_STK, INST_APPEND_STK, /* Opcodes 88 to 93 */ INST_LAPPEND_SCALAR1, INST_LAPPEND_SCALAR4, INST_LAPPEND_ARRAY1, INST_LAPPEND_ARRAY4, INST_LAPPEND_ARRAY_STK, INST_LAPPEND_STK, /* TIP #22 - LINDEX operator with flat arg list */ INST_LIST_INDEX_MULTI, /* * TIP #33 - 'lset' command. Code gen also required a Forth-like * OVER operation. */ INST_OVER, INST_LSET_LIST, INST_LSET_FLAT, /* TIP#90 - 'return' command. */ INST_RETURN_IMM, /* TIP#123 - exponentiation operator. */ INST_EXPON, /* TIP #157 - {*}... (word expansion) language syntax support. */ INST_EXPAND_START, INST_EXPAND_STKTOP, INST_INVOKE_EXPANDED, /* * TIP #57 - 'lassign' command. Code generation requires immediate * LINDEX and LRANGE operators. */ INST_LIST_INDEX_IMM, INST_LIST_RANGE_IMM, INST_START_CMD, INST_LIST_IN, INST_LIST_NOT_IN, INST_PUSH_RETURN_OPTIONS, INST_RETURN_STK, /* * Dictionary (TIP#111) related commands. */ INST_DICT_GET, INST_DICT_SET, INST_DICT_UNSET, INST_DICT_INCR_IMM, INST_DICT_APPEND, INST_DICT_LAPPEND, INST_DICT_FIRST, INST_DICT_NEXT, INST_DICT_UPDATE_START, INST_DICT_UPDATE_END, /* * Instruction to support jumps defined by tables (instead of the classic * [switch] technique of chained comparisons). */ INST_JUMP_TABLE, /* * Instructions to support compilation of global, variable, upvar and * [namespace upvar]. */ INST_UPVAR, INST_NSUPVAR, INST_VARIABLE, /* Instruction to support compiling syntax error to bytecode */ INST_SYNTAX, /* Instruction to reverse N items on top of stack */ INST_REVERSE, /* regexp instruction */ INST_REGEXP, /* For [info exists] compilation */ INST_EXIST_SCALAR, INST_EXIST_ARRAY, INST_EXIST_ARRAY_STK, INST_EXIST_STK, /* For [subst] compilation */ INST_NOP, INST_RETURN_CODE_BRANCH, /* For [unset] compilation */ INST_UNSET_SCALAR, INST_UNSET_ARRAY, INST_UNSET_ARRAY_STK, INST_UNSET_STK, /* For [dict with], [dict exists], [dict create] and [dict merge] */ INST_DICT_EXPAND, INST_DICT_RECOMBINE_STK, INST_DICT_RECOMBINE_IMM, INST_DICT_EXISTS, INST_DICT_VERIFY, /* For [string map] and [regsub] compilation */ INST_STR_MAP, INST_STR_FIND, INST_STR_FIND_LAST, INST_STR_RANGE_IMM, INST_STR_RANGE, /* For operations to do with coroutines and other NRE-manipulators */ INST_YIELD, INST_COROUTINE_NAME, INST_TAILCALL, /* For compilation of basic information operations */ INST_NS_CURRENT, INST_INFO_LEVEL_NUM, INST_INFO_LEVEL_ARGS, INST_RESOLVE_COMMAND, /* For compilation relating to TclOO */ INST_TCLOO_SELF, INST_TCLOO_CLASS, INST_TCLOO_NS, INST_TCLOO_IS_OBJECT, /* For compilation of [array] subcommands */ INST_ARRAY_EXISTS_STK, INST_ARRAY_EXISTS_IMM, INST_ARRAY_MAKE_STK, INST_ARRAY_MAKE_IMM, INST_INVOKE_REPLACE, INST_LIST_CONCAT, INST_EXPAND_DROP, /* New foreach implementation */ INST_FOREACH_START, INST_FOREACH_STEP, INST_FOREACH_END, INST_LMAP_COLLECT, /* For compilation of [string trim] and related */ INST_STR_TRIM, INST_STR_TRIM_LEFT, INST_STR_TRIM_RIGHT, INST_CONCAT_STK, INST_STR_UPPER, INST_STR_LOWER, INST_STR_TITLE, INST_STR_REPLACE, INST_ORIGIN_COMMAND, INST_TCLOO_NEXT, INST_TCLOO_NEXT_CLASS, INST_YIELD_TO_INVOKE, INST_NUM_TYPE, INST_TRY_CVT_TO_BOOLEAN, INST_STR_CLASS, INST_LAPPEND_LIST, INST_LAPPEND_LIST_ARRAY, INST_LAPPEND_LIST_ARRAY_STK, INST_LAPPEND_LIST_STK, INST_CLOCK_READ, /* The last opcode */ LAST_INST_OPCODE }; /* * Table describing the Tcl bytecode instructions: their name (for displaying * code), total number of code bytes required (including operand bytes), and a * description of the type of each operand. These operand types include signed * and unsigned integers of length one and four bytes. The unsigned integers * are used for indexes or for, e.g., the count of objects to push in a "push" |
︙ | ︙ | |||
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | MODULE_SCOPE int TclFindCompiledLocal(const char *name, int nameChars, int create, CompileEnv *envPtr); MODULE_SCOPE int TclFixupForwardJump(CompileEnv *envPtr, JumpFixup *jumpFixupPtr, int jumpDist, int distThreshold); MODULE_SCOPE void TclFreeCompileEnv(CompileEnv *envPtr); MODULE_SCOPE void TclFreeJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE ByteCode * TclInitByteCode(CompileEnv *envPtr); MODULE_SCOPE ByteCode * TclInitByteCodeObj(Tcl_Obj *objPtr, const Tcl_ObjType *typePtr, CompileEnv *envPtr); MODULE_SCOPE void TclInitCompileEnv(Tcl_Interp *interp, CompileEnv *envPtr, const char *string, int numBytes, const CmdFrame *invoker, int word); MODULE_SCOPE void TclInitJumpFixupArray(JumpFixupArray *fixupArrayPtr); | > > | 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 | MODULE_SCOPE int TclFindCompiledLocal(const char *name, int nameChars, int create, CompileEnv *envPtr); MODULE_SCOPE int TclFixupForwardJump(CompileEnv *envPtr, JumpFixup *jumpFixupPtr, int jumpDist, int distThreshold); MODULE_SCOPE void TclFreeCompileEnv(CompileEnv *envPtr); MODULE_SCOPE void TclFreeJumpFixupArray(JumpFixupArray *fixupArrayPtr); MODULE_SCOPE int TclGetIndexFromToken(Tcl_Token *tokenPtr, int before, int after, int *indexPtr); MODULE_SCOPE ByteCode * TclInitByteCode(CompileEnv *envPtr); MODULE_SCOPE ByteCode * TclInitByteCodeObj(Tcl_Obj *objPtr, const Tcl_ObjType *typePtr, CompileEnv *envPtr); MODULE_SCOPE void TclInitCompileEnv(Tcl_Interp *interp, CompileEnv *envPtr, const char *string, int numBytes, const CmdFrame *invoker, int word); MODULE_SCOPE void TclInitJumpFixupArray(JumpFixupArray *fixupArrayPtr); |
︙ | ︙ |
Changes to generic/tclDisassemble.c.
︙ | ︙ | |||
816 817 818 819 820 821 822 | static void UpdateStringOfInstName( Tcl_Obj *objPtr) { size_t len, inst = (size_t)objPtr->internalRep.wideValue; char *s, buf[TCL_INTEGER_SPACE + 5]; | | | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 | static void UpdateStringOfInstName( Tcl_Obj *objPtr) { size_t len, inst = (size_t)objPtr->internalRep.wideValue; char *s, buf[TCL_INTEGER_SPACE + 5]; if (inst >= LAST_INST_OPCODE) { sprintf(buf, "inst_%" TCL_Z_MODIFIER "d", inst); s = buf; } else { s = (char *) tclInstructionTable[inst].name; } len = strlen(s); /* assert (len < UINT_MAX) */ |
︙ | ︙ |
Changes to generic/tclExecute.c.
︙ | ︙ | |||
73 74 75 76 77 78 79 | * expression opcodes (e.g., INST_LOR) in tclCompile.h. * * Does not include the string for INST_EXPON (and beyond), as that is * disjoint for backward-compatibility reasons. */ static const char *const operatorStrings[] = { | | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | * expression opcodes (e.g., INST_LOR) in tclCompile.h. * * Does not include the string for INST_EXPON (and beyond), as that is * disjoint for backward-compatibility reasons. */ static const char *const operatorStrings[] = { "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", "+", "-", "*", "/", "%", "+", "-", "~", "!" }; /* * Mapping from Tcl result codes to strings; used for error and debugging * messages. */ |
︙ | ︙ | |||
3816 3817 3818 3819 3820 3821 3822 | TRACE_APPEND(("OK\n")); NEXT_INST_V(2, cleanup, 0); errorInUnset: CACHE_STACK_INFO(); TRACE_ERROR(interp); goto gotError; | < < < < < < < < < < < < < < < < < < < < < < < | 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 | TRACE_APPEND(("OK\n")); NEXT_INST_V(2, cleanup, 0); errorInUnset: CACHE_STACK_INFO(); TRACE_ERROR(interp); goto gotError; } /* * End of INST_UNSET instructions. * ----------------------------------------------------------------- * Start of INST_ARRAY instructions. */ |
︙ | ︙ | |||
4164 4165 4166 4167 4168 4169 4170 | NEXT_INST_F(jumpOffset, 1, 0); } else { TRACE_APPEND(("not found in table\n")); NEXT_INST_F(5, 1, 0); } } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 | NEXT_INST_F(jumpOffset, 1, 0); } else { TRACE_APPEND(("not found in table\n")); NEXT_INST_F(5, 1, 0); } } /* * ----------------------------------------------------------------- * Start of general introspector instructions. */ case INST_NS_CURRENT: { Namespace *currNsPtr = (Namespace *) TclGetCurrentNamespace(interp); |
︙ | ︙ | |||
4663 4664 4665 4666 4667 4668 4669 | */ if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK) { TRACE_ERROR(interp); goto gotError; } | < < | < < < < | < | 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 | */ if (TclListObjGetElements(interp, valuePtr, &objc, &objv) != TCL_OK) { TRACE_ERROR(interp); goto gotError; } /* Decode end-offset index values. */ index = TclIndexDecode(opnd, objc - 1); pcAdjustment = 5; lindexFastPath: if (index >= 0 && index < objc) { objResultPtr = objv[index]; } else { TclNewObj(objResultPtr); |
︙ | ︙ | |||
4800 4801 4802 4803 4804 4805 4806 | valuePtr = OBJ_AT_TOS; fromIdx = TclGetInt4AtPtr(pc+1); toIdx = TclGetInt4AtPtr(pc+5); TRACE(("\"%.30s\" %d %d => ", O2S(valuePtr), TclGetInt4AtPtr(pc+1), TclGetInt4AtPtr(pc+5))); /* | | | < < < | | < < < > > | < < | < < < < > | < > | < | < < < > | < < | | < < | | | < > | | | > | > | > > | > > > > > > > > > > > > | 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 | valuePtr = OBJ_AT_TOS; fromIdx = TclGetInt4AtPtr(pc+1); toIdx = TclGetInt4AtPtr(pc+5); TRACE(("\"%.30s\" %d %d => ", O2S(valuePtr), TclGetInt4AtPtr(pc+1), TclGetInt4AtPtr(pc+5))); /* * Get the length of the list, making sure that it really is a list * in the process. */ if (TclListObjLength(interp, valuePtr, &objc) != TCL_OK) { TRACE_ERROR(interp); goto gotError; } /* * Skip a lot of work if we're about to throw the result away (common * with uses of [lassign]). */ #ifndef TCL_COMPILE_DEBUG if (*(pc+9) == INST_POP) { NEXT_INST_F(10, 1, 0); } #endif /* Every range of an empty list is an empty list */ if (objc == 0) { TRACE_APPEND(("\n")); NEXT_INST_F(9, 0, 0); } /* Decode index value operands. */ /* assert ( toIdx != TCL_INDEX_AFTER); * * Extra safety for legacy bytecodes: */ if (toIdx == TCL_INDEX_AFTER) { toIdx = TCL_INDEX_END; } if ((toIdx == TCL_INDEX_BEFORE) || (fromIdx == TCL_INDEX_AFTER)) { emptyList: objResultPtr = Tcl_NewObj(); TRACE_APPEND(("\"%.30s\"", O2S(objResultPtr))); NEXT_INST_F(9, 1, 1); } toIdx = TclIndexDecode(toIdx, objc - 1); if (toIdx < 0) { goto emptyList; } else if (toIdx >= objc) { toIdx = objc - 1; } assert ( toIdx >= 0 && toIdx < objc); /* assert ( fromIdx != TCL_INDEX_BEFORE ); * * Extra safety for legacy bytecodes: */ if (fromIdx == TCL_INDEX_BEFORE) { fromIdx = TCL_INDEX_START; } fromIdx = TclIndexDecode(fromIdx, objc - 1); objResultPtr = TclListObjRange(valuePtr, fromIdx, toIdx); TRACE_APPEND(("\"%.30s\"", O2S(objResultPtr))); NEXT_INST_F(9, 1, 1); case INST_LIST_IN: case INST_LIST_NOT_IN: /* Basic list containment operators. */ value2Ptr = OBJ_AT_TOS; |
︙ | ︙ | |||
5208 5209 5210 5211 5212 5213 5214 5215 | case INST_STR_RANGE_IMM: valuePtr = OBJ_AT_TOS; fromIdx = TclGetInt4AtPtr(pc+1); toIdx = TclGetInt4AtPtr(pc+5); length = Tcl_GetCharLength(valuePtr); TRACE(("\"%.20s\" %d %d => ", O2S(valuePtr), fromIdx, toIdx)); /* | > > > > > > > > < > > > > > > | | < < | | < < | > | | > > > > > | > > > > > > > > > > > > | | | | < < | | | > > > > > | | | < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 | case INST_STR_RANGE_IMM: valuePtr = OBJ_AT_TOS; fromIdx = TclGetInt4AtPtr(pc+1); toIdx = TclGetInt4AtPtr(pc+5); length = Tcl_GetCharLength(valuePtr); TRACE(("\"%.20s\" %d %d => ", O2S(valuePtr), fromIdx, toIdx)); /* Every range of an empty value is an empty value */ if (length == 0) { TRACE_APPEND(("\n")); NEXT_INST_F(9, 0, 0); } /* Decode index operands. */ /* assert ( toIdx != TCL_INDEX_BEFORE ); assert ( toIdx != TCL_INDEX_AFTER); * * Extra safety for legacy bytecodes: */ if (toIdx == TCL_INDEX_BEFORE) { goto emptyRange; } if (toIdx == TCL_INDEX_AFTER) { toIdx = TCL_INDEX_END; } toIdx = TclIndexDecode(toIdx, length - 1); if (toIdx < 0) { goto emptyRange; } else if (toIdx >= length) { toIdx = length - 1; } assert ( toIdx >= 0 && toIdx < length ); /* assert ( fromIdx != TCL_INDEX_BEFORE ); assert ( fromIdx != TCL_INDEX_AFTER); * * Extra safety for legacy bytecodes: */ if (fromIdx == TCL_INDEX_BEFORE) { fromIdx = TCL_INDEX_START; } if (fromIdx == TCL_INDEX_AFTER) { goto emptyRange; } fromIdx = TclIndexDecode(fromIdx, length - 1); if (fromIdx < 0) { fromIdx = 0; } if (fromIdx <= toIdx) { objResultPtr = Tcl_GetRange(valuePtr, fromIdx, toIdx); } else { emptyRange: TclNewObj(objResultPtr); } TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(9, 1, 1); { Tcl_UniChar *ustring1, *ustring2, *ustring3, *end, *p; int length3, endIdx; Tcl_Obj *value3Ptr; case INST_STR_REPLACE: value3Ptr = POP_OBJECT(); valuePtr = OBJ_AT_DEPTH(2); endIdx = Tcl_GetCharLength(valuePtr) - 1; TRACE(("\"%.20s\" %s %s \"%.20s\" => ", O2S(valuePtr), O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), O2S(value3Ptr))); if (TclGetIntForIndexM(interp, OBJ_UNDER_TOS, endIdx, &fromIdx) != TCL_OK || TclGetIntForIndexM(interp, OBJ_AT_TOS, endIdx, &toIdx) != TCL_OK) { TclDecrRefCount(value3Ptr); TRACE_ERROR(interp); goto gotError; } TclDecrRefCount(OBJ_AT_TOS); (void) POP_OBJECT(); TclDecrRefCount(OBJ_AT_TOS); (void) POP_OBJECT(); if ((toIdx < 0) || (fromIdx > endIdx) || (toIdx < fromIdx)) { TRACE_APPEND(("\"%.30s\"\n", O2S(valuePtr))); TclDecrRefCount(value3Ptr); NEXT_INST_F(1, 0, 0); } if (fromIdx < 0) { fromIdx = 0; } if (toIdx > endIdx) { toIdx = endIdx; } if (fromIdx == 0 && toIdx == endIdx) { TclDecrRefCount(OBJ_AT_TOS); OBJ_AT_TOS = value3Ptr; TRACE_APPEND(("\"%.30s\"\n", O2S(value3Ptr))); NEXT_INST_F(1, 0, 0); } objResultPtr = TclStringReplace(interp, valuePtr, fromIdx, toIdx - fromIdx + 1, value3Ptr, TCL_STRING_IN_PLACE); if (objResultPtr == value3Ptr) { /* See [Bug 82e7f67325] */ TclDecrRefCount(OBJ_AT_TOS); OBJ_AT_TOS = value3Ptr; TRACE_APPEND(("\"%.30s\"\n", O2S(value3Ptr))); NEXT_INST_F(1, 0, 0); } |
︙ | ︙ | |||
5532 5533 5534 5535 5536 5537 5538 | trim1 = 0; goto createTrimmedString; case INST_STR_TRIM: valuePtr = OBJ_UNDER_TOS; /* String */ value2Ptr = OBJ_AT_TOS; /* TrimSet */ string2 = TclGetStringFromObj(value2Ptr, &length2); string1 = TclGetStringFromObj(valuePtr, &length); | | < < < < < | 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 | trim1 = 0; goto createTrimmedString; case INST_STR_TRIM: valuePtr = OBJ_UNDER_TOS; /* String */ value2Ptr = OBJ_AT_TOS; /* TrimSet */ string2 = TclGetStringFromObj(value2Ptr, &length2); string1 = TclGetStringFromObj(valuePtr, &length); trim1 = TclTrim(string1, length, string2, length2, &trim2); createTrimmedString: /* * Careful here; trim set often contains non-ASCII characters so we * take care when printing. [Bug 971cb4f1db] */ #ifdef TCL_COMPILE_DEBUG |
︙ | ︙ | |||
5621 5622 5623 5624 5625 5626 5627 | int type1, type2; Tcl_WideInt w1, w2, wResult; case INST_NUM_TYPE: if (GetNumberFromObj(NULL, OBJ_AT_TOS, &ptr1, &type1) != TCL_OK) { type1 = 0; } else if (type1 == TCL_NUMBER_WIDE) { | | | | | | 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 | int type1, type2; Tcl_WideInt w1, w2, wResult; case INST_NUM_TYPE: if (GetNumberFromObj(NULL, OBJ_AT_TOS, &ptr1, &type1) != TCL_OK) { type1 = 0; } else if (type1 == TCL_NUMBER_WIDE) { /* value is between LLONG_MIN and LLONG_MAX */ /* [string is integer] is -UINT_MAX to UINT_MAX range */ /* [string is wideinteger] is -ULLONG_MAX to ULLONG_MAX range */ int i; if (Tcl_GetIntFromObj(NULL, OBJ_AT_TOS, &i) == TCL_OK) { type1 = TCL_NUMBER_LONG; } } else if (type1 == TCL_NUMBER_BIG) { /* value is an integer outside the LLONG_MIN to LLONG_MAX range */ /* [string is wideinteger] is -ULLONG_MAX to ULLONG_MAX range */ Tcl_WideInt w; if (Tcl_GetWideIntFromObj(NULL, OBJ_AT_TOS, &w) == TCL_OK) { type1 = TCL_NUMBER_WIDE; } } TclNewIntObj(objResultPtr, type1); |
︙ | ︙ | |||
5862 5863 5864 5865 5866 5867 5868 | #endif /* ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR */ goto gotError; } else if (w1 == 0) { TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); | | | 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 | #endif /* ERROR_CODE_FOR_EARLY_DETECTED_ARITH_ERROR */ goto gotError; } else if (w1 == 0) { TRACE(("%s %s => ", O2S(valuePtr), O2S(value2Ptr))); objResultPtr = TCONST(0); TRACE(("%s\n", O2S(objResultPtr))); NEXT_INST_F(1, 2, 1); } else if (w2 > INT_MAX) { /* * Technically, we could hold the value (1 << (INT_MAX+1)) * in an mp_int, but since we're using mp_mul_2d() to do * the work, and it takes only an int argument, that's a * good place to draw the line. */ |
︙ | ︙ | |||
6041 6042 6043 6044 6045 6046 6047 | case INST_DIV: if (w2 == 0) { TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), O2S(value2Ptr))); goto divideByZero; } else if ((w1 == LLONG_MIN) && (w2 == -1)) { /* | | | | | 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 | case INST_DIV: if (w2 == 0) { TRACE(("%s %s => DIVIDE BY ZERO\n", O2S(valuePtr), O2S(value2Ptr))); goto divideByZero; } else if ((w1 == LLONG_MIN) && (w2 == -1)) { /* * Can't represent (-LLONG_MIN) as a Tcl_WideInt. */ goto overflow; } wResult = w1 / w2; /* * Force Tcl's integer division rules. * TODO: examine for logic simplification */ if (((wResult < 0) || ((wResult == 0) && ((w1 < 0 && w2 > 0) || (w1 > 0 && w2 < 0)))) && ((wResult * w2) != w1)) { wResult -= 1; } goto wideResultOfArithmetic; case INST_MULT: if (((sizeof(Tcl_WideInt) >= 2*sizeof(int)) && (w1 <= INT_MAX) && (w1 >= INT_MIN) && (w2 <= INT_MAX) && (w2 >= INT_MIN)) || ((sizeof(Tcl_WideInt) >= 2*sizeof(short)) && (w1 <= SHRT_MAX) && (w1 >= SHRT_MIN) && (w2 <= SHRT_MAX) && (w2 >= SHRT_MIN))) { wResult = w1 * w2; goto wideResultOfArithmetic; } } |
︙ | ︙ | |||
6319 6320 6321 6322 6323 6324 6325 | CACHE_STACK_INFO(); */ result = TCL_CONTINUE; cleanup = 0; TRACE(("=> CONTINUE!\n")); goto processExceptionReturn; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 | CACHE_STACK_INFO(); */ result = TCL_CONTINUE; cleanup = 0; TRACE(("=> CONTINUE!\n")); goto processExceptionReturn; { ForeachInfo *infoPtr; Tcl_Obj *listPtr, **elements, *tmpPtr; ForeachVarList *varListPtr; int numLists, listLen, numVars; int listTmpDepth; size_t iterNum, iterMax, iterTmp; |
︙ | ︙ | |||
7978 7979 7980 7981 7982 7983 7984 | * * BEWARE! Can't use Tcl_GetIntFromObj() here because that * converts values in the (unsigned) range to their signed int * counterparts, leading to incorrect results. */ if ((type2 != TCL_NUMBER_WIDE) | | | 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 | * * BEWARE! Can't use Tcl_GetIntFromObj() here because that * converts values in the (unsigned) range to their signed int * counterparts, leading to incorrect results. */ if ((type2 != TCL_NUMBER_WIDE) || (*((const Tcl_WideInt *)ptr2) > INT_MAX)) { /* * Technically, we could hold the value (1 << (INT_MAX+1)) in * an mp_int, but since we're using mp_mul_2d() to do the * work, and it takes only an int argument, that's a good * place to draw the line. */ |
︙ | ︙ | |||
8840 8841 8842 8843 8844 8845 8846 | * expr 20000000000000003 < 20000000000000004.0 * right. Converting the first argument to double will yield two * double values that are equivalent within double precision. * Converting the double to an integer gets done exactly, then * integer comparison can tell the difference. */ | | | | 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 | * expr 20000000000000003 < 20000000000000004.0 * right. Converting the first argument to double will yield two * double values that are equivalent within double precision. * Converting the double to an integer gets done exactly, then * integer comparison can tell the difference. */ if (d2 < (double)LLONG_MIN) { return MP_GT; } if (d2 > (double)LLONG_MAX) { return MP_LT; } w2 = (Tcl_WideInt) d2; goto wideCompare; case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); if (mp_isneg(&big2)) { |
︙ | ︙ | |||
8886 8887 8888 8889 8890 8891 8892 | w1 = (Tcl_WideInt) d1; goto wideCompare; case TCL_NUMBER_BIG: if (TclIsInfinite(d1)) { return (d1 > 0.0) ? MP_GT : MP_LT; } Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); | | | 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 | w1 = (Tcl_WideInt) d1; goto wideCompare; case TCL_NUMBER_BIG: if (TclIsInfinite(d1)) { return (d1 > 0.0) ? MP_GT : MP_LT; } Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); if ((d1 < (double)LLONG_MAX) && (d1 > (double)LLONG_MIN)) { if (mp_isneg(&big2)) { compare = MP_GT; } else { compare = MP_LT; } mp_clear(&big2); return compare; |
︙ | ︙ | |||
8919 8920 8921 8922 8923 8924 8925 | case TCL_NUMBER_DOUBLE: d2 = *((const double *)ptr2); if (TclIsInfinite(d2)) { compare = (d2 > 0.0) ? MP_LT : MP_GT; mp_clear(&big1); return compare; } | | | 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 | case TCL_NUMBER_DOUBLE: d2 = *((const double *)ptr2); if (TclIsInfinite(d2)) { compare = (d2 > 0.0) ? MP_LT : MP_GT; mp_clear(&big1); return compare; } if ((d2 < (double)LLONG_MAX) && (d2 > (double)LLONG_MIN)) { compare = mp_cmp_d(&big1, 0); mp_clear(&big1); return compare; } if (DBL_MANT_DIG > CHAR_BIT*sizeof(long) && modf(d2, &tmp) != 0.0) { d1 = TclBignumToDouble(&big1); |
︙ | ︙ | |||
9001 9002 9003 9004 9005 9006 9007 | (unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)), (unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)), (unsigned long) (codePtr->numAuxDataItems * sizeof(AuxData)), codePtr->numCmdLocBytes); #endif /* TCL_COMPILE_STATS */ if (procPtr != NULL) { fprintf(stdout, | | | 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 | (unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)), (unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)), (unsigned long) (codePtr->numAuxDataItems * sizeof(AuxData)), codePtr->numCmdLocBytes); #endif /* TCL_COMPILE_STATS */ if (procPtr != NULL) { fprintf(stdout, " Proc 0x%p, refCt %zd, args %d, compiled locals %d\n", procPtr, procPtr->refCount, procPtr->numArgs, procPtr->numCompiledLocals); } } #endif /* TCL_COMPILE_DEBUG */ /* |
︙ | ︙ | |||
9053 9054 9055 9056 9057 9058 9059 | unsigned char opCode = *pc; if (((unsigned long) pc < codeStart) || ((unsigned long) pc > codeEnd)) { fprintf(stderr, "\nBad instruction pc 0x%p in TclNRExecuteByteCode\n", pc); Tcl_Panic("TclNRExecuteByteCode execution failure: bad pc"); } | | | 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 | unsigned char opCode = *pc; if (((unsigned long) pc < codeStart) || ((unsigned long) pc > codeEnd)) { fprintf(stderr, "\nBad instruction pc 0x%p in TclNRExecuteByteCode\n", pc); Tcl_Panic("TclNRExecuteByteCode execution failure: bad pc"); } if ((unsigned) opCode >= LAST_INST_OPCODE) { fprintf(stderr, "\nBad opcode %d at pc %u in TclNRExecuteByteCode\n", (unsigned) opCode, relativePc); Tcl_Panic("TclNRExecuteByteCode execution failure: bad opcode"); } if (checkStack && ((stackTop < 0) || (stackTop > stackUpperBound))) { int numChars; |
︙ | ︙ | |||
9116 9117 9118 9119 9120 9121 9122 | int type; const unsigned char opcode = *pc; const char *description, *operator = "unknown"; if (opcode == INST_EXPON) { operator = "**"; } else if (opcode <= INST_LNOT) { | | | 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 | int type; const unsigned char opcode = *pc; const char *description, *operator = "unknown"; if (opcode == INST_EXPON) { operator = "**"; } else if (opcode <= INST_LNOT) { operator = operatorStrings[opcode - INST_BITOR]; } if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) { description = "non-numeric string"; } else if (type == TCL_NUMBER_NAN) { description = "non-numeric floating-point value"; } else if (type == TCL_NUMBER_DOUBLE) { |
︙ | ︙ | |||
9943 9944 9945 9946 9947 9948 9949 | } /* * Instruction counts. */ Tcl_AppendPrintfToObj(objPtr, "\nInstruction counts:\n"); | | | 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 | } /* * Instruction counts. */ Tcl_AppendPrintfToObj(objPtr, "\nInstruction counts:\n"); for (i = 0; i < LAST_INST_OPCODE; i++) { Tcl_AppendPrintfToObj(objPtr, "%20s %8ld ", tclInstructionTable[i].name, statsPtr->instructionCount[i]); if (statsPtr->instructionCount[i]) { Tcl_AppendPrintfToObj(objPtr, "%6.1f%%\n", Percent(statsPtr->instructionCount[i], numInstructions)); } else { Tcl_AppendPrintfToObj(objPtr, "0\n"); |
︙ | ︙ |
Changes to generic/tclIO.c.
︙ | ︙ | |||
717 718 719 720 721 722 723 724 725 | void Tcl_SetStdChannel( Tcl_Channel channel, int type) /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); switch (type) { case TCL_STDIN: | > | | | | 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | void Tcl_SetStdChannel( Tcl_Channel channel, int type) /* One of TCL_STDIN, TCL_STDOUT, TCL_STDERR. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); int init = channel ? 1 : -1; switch (type) { case TCL_STDIN: tsdPtr->stdinInitialized = init; tsdPtr->stdinChannel = channel; break; case TCL_STDOUT: tsdPtr->stdoutInitialized = init; tsdPtr->stdoutChannel = channel; break; case TCL_STDERR: tsdPtr->stderrInitialized = init; tsdPtr->stderrChannel = channel; break; } } /* *---------------------------------------------------------------------- |
︙ | ︙ | |||
764 765 766 767 768 769 770 771 | * If the channels were not created yet, create them now and store them in * the static variables. */ switch (type) { case TCL_STDIN: if (!tsdPtr->stdinInitialized) { tsdPtr->stdinChannel = TclpGetDefaultStdChannel(TCL_STDIN); | > < > > < > > < > | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | * If the channels were not created yet, create them now and store them in * the static variables. */ switch (type) { case TCL_STDIN: if (!tsdPtr->stdinInitialized) { tsdPtr->stdinInitialized = -1; tsdPtr->stdinChannel = TclpGetDefaultStdChannel(TCL_STDIN); /* * Artificially bump the refcount to ensure that the channel is * only closed on exit. * * NOTE: Must only do this if stdinChannel is not NULL. It can be * NULL in situations where Tcl is unable to connect to the * standard input. */ if (tsdPtr->stdinChannel != NULL) { tsdPtr->stdinInitialized = 1; Tcl_RegisterChannel(NULL, tsdPtr->stdinChannel); } } channel = tsdPtr->stdinChannel; break; case TCL_STDOUT: if (!tsdPtr->stdoutInitialized) { tsdPtr->stdoutInitialized = -1; tsdPtr->stdoutChannel = TclpGetDefaultStdChannel(TCL_STDOUT); if (tsdPtr->stdoutChannel != NULL) { tsdPtr->stdoutInitialized = 1; Tcl_RegisterChannel(NULL, tsdPtr->stdoutChannel); } } channel = tsdPtr->stdoutChannel; break; case TCL_STDERR: if (!tsdPtr->stderrInitialized) { tsdPtr->stderrInitialized = -1; tsdPtr->stderrChannel = TclpGetDefaultStdChannel(TCL_STDERR); if (tsdPtr->stderrChannel != NULL) { tsdPtr->stderrInitialized = 1; Tcl_RegisterChannel(NULL, tsdPtr->stderrChannel); } } channel = tsdPtr->stderrChannel; break; } return channel; |
︙ | ︙ | |||
1064 1065 1066 1067 1068 1069 1070 | static void CheckForStdChannelsBeingClosed( Tcl_Channel chan) { ChannelState *statePtr = ((Channel *) chan)->state; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); | | | | | 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | static void CheckForStdChannelsBeingClosed( Tcl_Channel chan) { ChannelState *statePtr = ((Channel *) chan)->state; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (tsdPtr->stdinInitialized == 1 && tsdPtr->stdinChannel != NULL && statePtr == ((Channel *)tsdPtr->stdinChannel)->state) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stdinChannel = NULL; return; } } else if (tsdPtr->stdoutInitialized == 1 && tsdPtr->stdoutChannel != NULL && statePtr == ((Channel *)tsdPtr->stdoutChannel)->state) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stdoutChannel = NULL; return; } } else if (tsdPtr->stderrInitialized == 1 && tsdPtr->stderrChannel != NULL && statePtr == ((Channel *)tsdPtr->stderrChannel)->state) { if (statePtr->refCount < 2) { statePtr->refCount = 0; tsdPtr->stderrChannel = NULL; return; } |
︙ | ︙ |
Changes to generic/tclInt.h.
︙ | ︙ | |||
2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 | Tcl_Obj *listPtr, Tcl_Obj *argPtr); MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[]); /* TIP #280 */ MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n, int *lines, Tcl_Obj *const *elems); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); MODULE_SCOPE Tcl_Obj * TclLsetList(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *indexPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[], Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); | > > | 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 | Tcl_Obj *listPtr, Tcl_Obj *argPtr); MODULE_SCOPE Tcl_Obj * TclLindexFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[]); /* TIP #280 */ MODULE_SCOPE void TclListLines(Tcl_Obj *listObj, int line, int n, int *lines, Tcl_Obj *const *elems); MODULE_SCOPE Tcl_Obj * TclListObjCopy(Tcl_Interp *interp, Tcl_Obj *listPtr); MODULE_SCOPE Tcl_Obj * TclListObjRange(Tcl_Obj *listPtr, int fromIdx, int toIdx); MODULE_SCOPE Tcl_Obj * TclLsetList(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *indexPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, int indexCount, Tcl_Obj *const indexArray[], Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); |
︙ | ︙ | |||
3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 | Tcl_Obj *const opts[], int *flagPtr); MODULE_SCOPE void TclSubstParse(Tcl_Interp *interp, const char *bytes, int numBytes, int flags, Tcl_Parse *parsePtr, Tcl_InterpState *statePtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line, int *clNextOuter, const char *outerScript); MODULE_SCOPE int TclTrimLeft(const char *bytes, int numBytes, const char *trim, int numTrim); MODULE_SCOPE int TclTrimRight(const char *bytes, int numBytes, const char *trim, int numTrim); MODULE_SCOPE int TclUtfCmp(const char *cs, const char *ct); MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct); MODULE_SCOPE int TclUtfCount(int ch); | > > | 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 | Tcl_Obj *const opts[], int *flagPtr); MODULE_SCOPE void TclSubstParse(Tcl_Interp *interp, const char *bytes, int numBytes, int flags, Tcl_Parse *parsePtr, Tcl_InterpState *statePtr); MODULE_SCOPE int TclSubstTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr, int count, int *tokensLeftPtr, int line, int *clNextOuter, const char *outerScript); MODULE_SCOPE int TclTrim(const char *bytes, int numBytes, const char *trim, int numTrim, int *trimRight); MODULE_SCOPE int TclTrimLeft(const char *bytes, int numBytes, const char *trim, int numTrim); MODULE_SCOPE int TclTrimRight(const char *bytes, int numBytes, const char *trim, int numTrim); MODULE_SCOPE int TclUtfCmp(const char *cs, const char *ct); MODULE_SCOPE int TclUtfCasecmp(const char *cs, const char *ct); MODULE_SCOPE int TclUtfCount(int ch); |
︙ | ︙ | |||
3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 | Tcl_Obj *const objv[], int flags); MODULE_SCOPE int TclStringFirst(Tcl_Obj *needle, Tcl_Obj *haystack, int start); MODULE_SCOPE int TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack, int last); MODULE_SCOPE Tcl_Obj * TclStringRepeat(Tcl_Interp *interp, Tcl_Obj *objPtr, int count, int flags); MODULE_SCOPE Tcl_Obj * TclStringReverse(Tcl_Obj *objPtr, int flags); /* Flag values for the [string] ensemble functions. */ #define TCL_STRING_MATCH_NOCASE TCL_MATCH_NOCASE /* (1<<0) in tcl.h */ #define TCL_STRING_IN_PLACE (1<<1) | > > > | 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 | Tcl_Obj *const objv[], int flags); MODULE_SCOPE int TclStringFirst(Tcl_Obj *needle, Tcl_Obj *haystack, int start); MODULE_SCOPE int TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack, int last); MODULE_SCOPE Tcl_Obj * TclStringRepeat(Tcl_Interp *interp, Tcl_Obj *objPtr, int count, int flags); MODULE_SCOPE Tcl_Obj * TclStringReplace(Tcl_Interp *interp, Tcl_Obj *objPtr, int first, int count, Tcl_Obj *insertPtr, int flags); MODULE_SCOPE Tcl_Obj * TclStringReverse(Tcl_Obj *objPtr, int flags); /* Flag values for the [string] ensemble functions. */ #define TCL_STRING_MATCH_NOCASE TCL_MATCH_NOCASE /* (1<<0) in tcl.h */ #define TCL_STRING_IN_PLACE (1<<1) |
︙ | ︙ | |||
3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 | MODULE_SCOPE int TclCompareObjKeys(CONST90 void *keyPtr, Tcl_HashEntry *hPtr); MODULE_SCOPE void TclFreeObjEntry(Tcl_HashEntry *hPtr); MODULE_SCOPE TCL_HASH_TYPE TclHashObjKey(Tcl_HashTable *tablePtr, CONST90 void *keyPtr); MODULE_SCOPE int TclFullFinalizationRequested(void); /* *---------------------------------------------------------------- * Macros used by the Tcl core to create and release Tcl objects. * TclNewObj(objPtr) creates a new object denoting an empty string. * TclDecrRefCount(objPtr) decrements the object's reference count, and frees * the object if its reference count is zero. These macros are inline versions * of Tcl_NewObj() and Tcl_DecrRefCount(). Notice that the names differ in not | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 | MODULE_SCOPE int TclCompareObjKeys(CONST90 void *keyPtr, Tcl_HashEntry *hPtr); MODULE_SCOPE void TclFreeObjEntry(Tcl_HashEntry *hPtr); MODULE_SCOPE TCL_HASH_TYPE TclHashObjKey(Tcl_HashTable *tablePtr, CONST90 void *keyPtr); MODULE_SCOPE int TclFullFinalizationRequested(void); /* * TIP #462. */ /* * The following enum values give the status of a spawned process. */ typedef enum TclProcessWaitStatus { TCL_PROCESS_ERROR = -1, /* Error waiting for process to exit */ TCL_PROCESS_UNCHANGED = 0, /* No change since the last call. */ TCL_PROCESS_EXITED = 1, /* Process has exited. */ TCL_PROCESS_SIGNALED = 2, /* Child killed because of a signal. */ TCL_PROCESS_STOPPED = 3, /* Child suspended because of a signal. */ TCL_PROCESS_UNKNOWN_STATUS = 4 /* Child wait status didn't make sense. */ } TclProcessWaitStatus; MODULE_SCOPE Tcl_Command TclInitProcessCmd(Tcl_Interp *interp); MODULE_SCOPE void TclProcessCreated(Tcl_Pid pid); MODULE_SCOPE TclProcessWaitStatus TclProcessWait(Tcl_Pid pid, int options, int *codePtr, Tcl_Obj **msgObjPtr, Tcl_Obj **errorObjPtr); /* * Utility routines for encoding index values as integers. Used by both * some of the command compilers and by [lsort] and [lsearch]. */ MODULE_SCOPE int TclIndexEncode(Tcl_Interp *interp, Tcl_Obj *objPtr, int before, int after, int *indexPtr); MODULE_SCOPE int TclIndexDecode(int encoded, int endValue); /* Constants used in index value encoding routines. */ #define TCL_INDEX_END (-2) #define TCL_INDEX_BEFORE (-1) #define TCL_INDEX_START (0) #define TCL_INDEX_AFTER (INT_MAX) /* *---------------------------------------------------------------- * Macros used by the Tcl core to create and release Tcl objects. * TclNewObj(objPtr) creates a new object denoting an empty string. * TclDecrRefCount(objPtr) decrements the object's reference count, and frees * the object if its reference count is zero. These macros are inline versions * of Tcl_NewObj() and Tcl_DecrRefCount(). Notice that the names differ in not |
︙ | ︙ |
Changes to generic/tclListObj.c.
︙ | ︙ | |||
383 384 385 386 387 388 389 390 391 392 393 394 395 396 | DupListInternalRep(listPtr, copyPtr); return copyPtr; } /* *---------------------------------------------------------------------- * * Tcl_ListObjGetElements -- * * Retreive the elements in a list 'Tcl_Obj'. * * Value * * TCL_OK | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | DupListInternalRep(listPtr, copyPtr); return copyPtr; } /* *---------------------------------------------------------------------- * * TclListObjRange -- * * Makes a slice of a list value. * *listPtr must be known to be a valid list. * * Results: * Returns a pointer to the sliced list. * This may be a new object or the same object if not shared. * * Side effects: * The possible conversion of the object referenced by listPtr * to a list object. * *---------------------------------------------------------------------- */ Tcl_Obj * TclListObjRange( Tcl_Obj *listPtr, /* List object to take a range from. */ int fromIdx, /* Index of first element to include. */ int toIdx) /* Index of last element to include. */ { Tcl_Obj **elemPtrs; int listLen, i, newLen; List *listRepPtr; TclListObjGetElements(NULL, listPtr, &listLen, &elemPtrs); if (fromIdx < 0) { fromIdx = 0; } if (toIdx >= listLen) { toIdx = listLen-1; } if (fromIdx > toIdx) { return Tcl_NewObj(); } newLen = toIdx - fromIdx + 1; if (Tcl_IsShared(listPtr) || ((ListRepPtr(listPtr)->refCount > 1))) { return Tcl_NewListObj(newLen, &elemPtrs[fromIdx]); } /* * In-place is possible. */ /* * Even if nothing below cause any changes, we still want the * string-canonizing effect of [lrange 0 end]. */ TclInvalidateStringRep(listPtr); /* * Delete elements that should not be included. */ for (i = 0; i < fromIdx; i++) { TclDecrRefCount(elemPtrs[i]); } for (i = toIdx + 1; i < listLen; i++) { TclDecrRefCount(elemPtrs[i]); } if (fromIdx > 0) { memmove(elemPtrs, &elemPtrs[fromIdx], (size_t) newLen * sizeof(Tcl_Obj*)); } listRepPtr = ListRepPtr(listPtr); listRepPtr->elemCount = newLen; return listPtr; } /* *---------------------------------------------------------------------- * * Tcl_ListObjGetElements -- * * Retreive the elements in a list 'Tcl_Obj'. * * Value * * TCL_OK |
︙ | ︙ | |||
1137 1138 1139 1140 1141 1142 1143 | * argPtr designates something that is neither an index nor a * well-formed list. Report the error via TclLindexFlat. */ return TclLindexFlat(interp, listPtr, 1, &argPtr); } | < < | < < < | | < | | 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 | * argPtr designates something that is neither an index nor a * well-formed list. Report the error via TclLindexFlat. */ return TclLindexFlat(interp, listPtr, 1, &argPtr); } { int indexCount = -1; /* Size of the array of list indices. */ Tcl_Obj **indices = NULL; /* Array of list indices. */ TclListObjGetElements(NULL, indexListCopy, &indexCount, &indices); listPtr = TclLindexFlat(interp, listPtr, indexCount, indices); } Tcl_DecrRefCount(indexListCopy); return listPtr; } /* |
︙ | ︙ |
Changes to generic/tclLoad.c.
︙ | ︙ | |||
467 468 469 470 471 472 473 | /* * Test for whether the initialization failed. If so, transfer the error * from the target interpreter to the originating one. */ if (code != TCL_OK) { Interp *iPtr = (Interp *) target; | | | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | /* * Test for whether the initialization failed. If so, transfer the error * from the target interpreter to the originating one. */ if (code != TCL_OK) { Interp *iPtr = (Interp *) target; if (iPtr->legacyResult && *(iPtr->legacyResult) && !iPtr->legacyFreeProc) { /* * A call to Tcl_InitStubs() determined the caller extension and * this interp are incompatible in their stubs mechanisms, and * recorded the error in the oldest legacy place we have to do so. */ Tcl_SetObjResult(target, Tcl_NewStringObj(iPtr->legacyResult, -1)); iPtr->legacyResult = NULL; |
︙ | ︙ |
Changes to generic/tclOO.c.
︙ | ︙ | |||
507 508 509 510 511 512 513 | InitClassSystemRoots( Tcl_Interp *interp, Foundation *fPtr) { Class fakeCls; Object fakeObject; | < | < < < < | < < < < | < | < > | < | | | < | < | < < > > > > > < > > > | | > | > | | > > > < | < < < < | 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | InitClassSystemRoots( Tcl_Interp *interp, Foundation *fPtr) { Class fakeCls; Object fakeObject; /* Stand up a phony class for bootstrapping. */ fPtr->objectCls = &fakeCls; /* referenced in AllocClass to increment the refCount. */ fakeCls.thisPtr = &fakeObject; fPtr->objectCls = AllocClass(interp, AllocObject(interp, "object", (Namespace *)fPtr->ooNs, NULL)); /* Corresponding TclOODecrRefCount in KillFoudation */ AddRef(fPtr->objectCls->thisPtr); /* This is why it is unnecessary in this routine to replace the * incremented reference count of fPtr->objectCls that was swallowed by * fakeObject. */ fPtr->objectCls->superclasses.num = 0; ckfree(fPtr->objectCls->superclasses.list); fPtr->objectCls->superclasses.list = NULL; /* special initialization for the primordial objects */ fPtr->objectCls->thisPtr->flags |= ROOT_OBJECT; fPtr->objectCls->flags |= ROOT_OBJECT; fPtr->classCls = AllocClass(interp, AllocObject(interp, "class", (Namespace *)fPtr->ooNs, NULL)); /* Corresponding TclOODecrRefCount in KillFoudation */ AddRef(fPtr->classCls->thisPtr); /* * Increment reference counts for each reference because these * relationships can be dynamically changed. * * Corresponding TclOODecrRefCount for all incremented refcounts is in * KillFoundation. */ /* Rewire bootstrapped objects. */ fPtr->objectCls->thisPtr->selfCls = fPtr->classCls; AddRef(fPtr->classCls->thisPtr); TclOOAddToInstances(fPtr->objectCls->thisPtr, fPtr->classCls); fPtr->classCls->thisPtr->selfCls = fPtr->classCls; AddRef(fPtr->classCls->thisPtr); TclOOAddToInstances(fPtr->classCls->thisPtr, fPtr->classCls); fPtr->classCls->thisPtr->flags |= ROOT_CLASS; fPtr->classCls->flags |= ROOT_CLASS; /* Standard initialization for new Objects */ TclOOAddToSubclasses(fPtr->classCls, fPtr->objectCls); /* * THIS IS THE ONLY FUNCTION THAT DOES NON-STANDARD CLASS SPLICING. * Everything else is careful to prohibit looping. */ } |
︙ | ︙ | |||
633 634 635 636 637 638 639 640 641 642 643 644 645 646 | Foundation *fPtr = GetFoundation(interp); TclDecrRefCount(fPtr->unknownMethodNameObj); TclDecrRefCount(fPtr->constructorName); TclDecrRefCount(fPtr->destructorName); TclDecrRefCount(fPtr->clonedName); TclDecrRefCount(fPtr->defineName); ckfree(fPtr); } /* * ---------------------------------------------------------------------- * * AllocObject -- | > > > | 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 | Foundation *fPtr = GetFoundation(interp); TclDecrRefCount(fPtr->unknownMethodNameObj); TclDecrRefCount(fPtr->constructorName); TclDecrRefCount(fPtr->destructorName); TclDecrRefCount(fPtr->clonedName); TclDecrRefCount(fPtr->defineName); TclOODecrRefCount(fPtr->objectCls->thisPtr); TclOODecrRefCount(fPtr->classCls->thisPtr); ckfree(fPtr); } /* * ---------------------------------------------------------------------- * * AllocObject -- |
︙ | ︙ | |||
716 717 718 719 720 721 722 723 724 725 726 727 | * have to get rid of the error message from Tcl_CreateNamespace, * since that's something that should not be exposed to the user. */ Tcl_ResetResult(interp); } /* * Make the namespace know about the helper commands. This grants access * to the [self] and [next] commands. */ | > > > > > < | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 | * have to get rid of the error message from Tcl_CreateNamespace, * since that's something that should not be exposed to the user. */ Tcl_ResetResult(interp); } configNamespace: ((Namespace *)oPtr->namespacePtr)->refCount++; /* * Make the namespace know about the helper commands. This grants access * to the [self] and [next] commands. */ if (fPtr->helpersNs != NULL) { TclSetNsPath((Namespace *) oPtr->namespacePtr, 1, &fPtr->helpersNs); } TclOOSetupVariableResolver(oPtr->namespacePtr); /* * Suppress use of compiled versions of the commands in this object's |
︙ | ︙ | |||
888 889 890 891 892 893 894 | TclOODecrRefCount(oPtr); return; } /* * ---------------------------------------------------------------------- * | | | < < | < > > | | | < | | | | | > > > > | | > > | | | | > > > > > | | | > | > > > > | > > > > > > > > > > > > | 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 | TclOODecrRefCount(oPtr); return; } /* * ---------------------------------------------------------------------- * * DeleteDescendants -- * * Delete all descendants of a particular class. * * ---------------------------------------------------------------------- */ static void DeleteDescendants( Tcl_Interp *interp, /* The interpreter containing the class. */ Object *oPtr) /* The object representing the class. */ { Class *clsPtr = oPtr->classPtr, *subclassPtr, *mixinSubclassPtr; Object *instancePtr; /* * Squelch classes that this class has been mixed into. */ if (clsPtr->mixinSubs.num > 0) { while (clsPtr->mixinSubs.num > 0) { mixinSubclassPtr = clsPtr->mixinSubs.list[clsPtr->mixinSubs.num-1]; /* This condition also covers the case where mixinSubclassPtr == * clsPtr */ if (!Deleted(mixinSubclassPtr->thisPtr)) { Tcl_DeleteCommandFromToken(interp, mixinSubclassPtr->thisPtr->command); } TclOORemoveFromMixinSubs(mixinSubclassPtr, clsPtr); } } if (clsPtr->mixinSubs.size > 0) { ckfree(clsPtr->mixinSubs.list); clsPtr->mixinSubs.size = 0; } /* * Squelch subclasses of this class. */ if (clsPtr->subclasses.num > 0) { while (clsPtr->subclasses.num > 0) { subclassPtr = clsPtr->subclasses.list[clsPtr->subclasses.num-1]; if (!Deleted(subclassPtr->thisPtr) && !IsRoot(subclassPtr)) { Tcl_DeleteCommandFromToken(interp, subclassPtr->thisPtr->command); } TclOORemoveFromSubclasses(subclassPtr, clsPtr); } } if (clsPtr->subclasses.size > 0) { ckfree(clsPtr->subclasses.list); clsPtr->subclasses.list = NULL; clsPtr->subclasses.size = 0; } /* * Squelch instances of this class (includes objects we're mixed into). */ if (clsPtr->instances.num > 0) { while (clsPtr->instances.num > 0) { instancePtr = clsPtr->instances.list[clsPtr->instances.num-1]; /* * This condition also covers the case where instancePtr == oPtr */ if (!Deleted(instancePtr) && !IsRoot(instancePtr)) { Tcl_DeleteCommandFromToken(interp, instancePtr->command); } TclOORemoveFromInstances(instancePtr, clsPtr); } } if (clsPtr->instances.size > 0) { ckfree(clsPtr->instances.list); clsPtr->instances.list = NULL; clsPtr->instances.size = 0; } } /* * ---------------------------------------------------------------------- * * ReleaseClassContents -- * * Tear down the special class data structure, including deleting all * dependent classes and objects. * * ---------------------------------------------------------------------- */ static void ReleaseClassContents( Tcl_Interp *interp, /* The interpreter containing the class. */ Object *oPtr) /* The object representing the class. */ { FOREACH_HASH_DECLS; |
︙ | ︙ | |||
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 | if (clsPtr->filters.num) { Tcl_Obj *filterObj; FOREACH(filterObj, clsPtr->filters) { TclDecrRefCount(filterObj); } ckfree(clsPtr->filters.list); clsPtr->filters.num = 0; } /* * Squelch our metadata. */ if (clsPtr->metadataPtr != NULL) { Tcl_ObjectMetadataType *metadataTypePtr; ClientData value; FOREACH_HASH(metadataTypePtr, value, clsPtr->metadataPtr) { metadataTypePtr->deleteProc(value); } Tcl_DeleteHashTable(clsPtr->metadataPtr); ckfree(clsPtr->metadataPtr); clsPtr->metadataPtr = NULL; } | > > | | > | > > > > > > | | > > > > > | 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | if (clsPtr->filters.num) { Tcl_Obj *filterObj; FOREACH(filterObj, clsPtr->filters) { TclDecrRefCount(filterObj); } ckfree(clsPtr->filters.list); clsPtr->filters.list = NULL; clsPtr->filters.num = 0; } /* * Squelch our metadata. */ if (clsPtr->metadataPtr != NULL) { Tcl_ObjectMetadataType *metadataTypePtr; ClientData value; FOREACH_HASH(metadataTypePtr, value, clsPtr->metadataPtr) { metadataTypePtr->deleteProc(value); } Tcl_DeleteHashTable(clsPtr->metadataPtr); ckfree(clsPtr->metadataPtr); clsPtr->metadataPtr = NULL; } if (clsPtr->mixins.num) { FOREACH(tmpClsPtr, clsPtr->mixins) { TclOORemoveFromMixinSubs(clsPtr, tmpClsPtr); TclOODecrRefCount(tmpClsPtr->thisPtr); } ckfree(clsPtr->mixins.list); clsPtr->mixins.list = NULL; clsPtr->mixins.num = 0; } if (clsPtr->superclasses.num > 0) { FOREACH(tmpClsPtr, clsPtr->superclasses) { TclOORemoveFromSubclasses(clsPtr, tmpClsPtr); TclOODecrRefCount(tmpClsPtr->thisPtr); } ckfree(clsPtr->superclasses.list); clsPtr->superclasses.num = 0; clsPtr->superclasses.list = NULL; } FOREACH_HASH_VALUE(mPtr, &clsPtr->classMethods) { TclOODelMethodRef(mPtr); } Tcl_DeleteHashTable(&clsPtr->classMethods); TclOODelMethodRef(clsPtr->constructorPtr); |
︙ | ︙ | |||
1175 1176 1177 1178 1179 1180 1181 | /* * TODO: Should this be protected with a * !IsRoot() condition? */ TclOORemoveFromInstances(oPtr, oPtr->selfCls); | > | | > | < | 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 | /* * TODO: Should this be protected with a * !IsRoot() condition? */ TclOORemoveFromInstances(oPtr, oPtr->selfCls); if (oPtr->mixins.num > 0) { FOREACH(mixinPtr, oPtr->mixins) { TclOORemoveFromInstances(oPtr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } ckfree(oPtr->mixins.list); } FOREACH(filterObj, oPtr->filters) { TclDecrRefCount(filterObj); } if (i) { |
︙ | ︙ | |||
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 | ReleaseClassContents(interp, oPtr); } /* * Delete the object structure itself. */ oPtr->namespacePtr = NULL; oPtr->selfCls = NULL; TclOODecrRefCount(oPtr); return; } /* * ---------------------------------------------------------------------- | > > | 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | ReleaseClassContents(interp, oPtr); } /* * Delete the object structure itself. */ TclNsDecrRefCount((Namespace *)oPtr->namespacePtr); oPtr->namespacePtr = NULL; TclOODecrRefCount(oPtr->selfCls->thisPtr); oPtr->selfCls = NULL; TclOODecrRefCount(oPtr); return; } /* * ---------------------------------------------------------------------- |
︙ | ︙ | |||
1270 1271 1272 1273 1274 1275 1276 | */ int TclOODecrRefCount( Object *oPtr) { if (oPtr->refCount-- <= 1) { | < < < < < < | 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | */ int TclOODecrRefCount( Object *oPtr) { if (oPtr->refCount-- <= 1) { if (oPtr->classPtr != NULL) { ckfree(oPtr->classPtr); } ckfree(oPtr); return 1; } return 0; } |
︙ | ︙ | |||
1306 1307 1308 1309 1310 1311 1312 | Object *oPtr, /* The instance to remove. */ Class *clsPtr) /* The class (possibly) containing the * reference to the instance. */ { int i, res = 0; Object *instPtr; | < < < < | 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 | Object *oPtr, /* The instance to remove. */ Class *clsPtr) /* The class (possibly) containing the * reference to the instance. */ { int i, res = 0; Object *instPtr; FOREACH(instPtr, clsPtr->instances) { if (oPtr == instPtr) { RemoveItem(Object, clsPtr->instances, i); TclOODecrRefCount(oPtr); res++; break; } |
︙ | ︙ | |||
1372 1373 1374 1375 1376 1377 1378 | Class *subPtr, /* The subclass to remove. */ Class *superPtr) /* The superclass to possibly remove the * subclass reference from. */ { int i, res = 0; Class *subclsPtr; | < < < < | 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 | Class *subPtr, /* The subclass to remove. */ Class *superPtr) /* The superclass to possibly remove the * subclass reference from. */ { int i, res = 0; Class *subclsPtr; FOREACH(subclsPtr, superPtr->subclasses) { if (subPtr == subclsPtr) { RemoveItem(Class, superPtr->subclasses, i); TclOODecrRefCount(subPtr->thisPtr); res++; } } |
︙ | ︙ | |||
1440 1441 1442 1443 1444 1445 1446 | Class *subPtr, /* The subclass to remove. */ Class *superPtr) /* The superclass to possibly remove the * subclass reference from. */ { int i, res = 0; Class *subclsPtr; | < < < < | 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 | Class *subPtr, /* The subclass to remove. */ Class *superPtr) /* The superclass to possibly remove the * subclass reference from. */ { int i, res = 0; Class *subclsPtr; FOREACH(subclsPtr, superPtr->mixinSubs) { if (subPtr == subclsPtr) { RemoveItem(Class, superPtr->mixinSubs, i); TclOODecrRefCount(subPtr->thisPtr); res++; break; } |
︙ | ︙ | |||
1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 | /* * Create the object. */ oPtr = AllocObject(interp, simpleName, nsPtr, nsNameStr); oPtr->selfCls = classPtr; TclOOAddToInstances(oPtr, classPtr); /* * Check to see if we're really creating a class. If so, allocate the * class structure as well. */ | > | 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 | /* * Create the object. */ oPtr = AllocObject(interp, simpleName, nsPtr, nsNameStr); oPtr->selfCls = classPtr; AddRef(classPtr->thisPtr); TclOOAddToInstances(oPtr, classPtr); /* * Check to see if we're really creating a class. If so, allocate the * class structure as well. */ |
︙ | ︙ | |||
1896 1897 1898 1899 1900 1901 1902 | } } /* * Copy the object's mixin references to the new object. */ | > | | | | > > > > > | 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 | } } /* * Copy the object's mixin references to the new object. */ if (o2Ptr->mixins.num != 0) { FOREACH(mixinPtr, o2Ptr->mixins) { if (mixinPtr && mixinPtr != o2Ptr->selfCls) { TclOORemoveFromInstances(o2Ptr, mixinPtr); } TclOODecrRefCount(mixinPtr->thisPtr); } ckfree(o2Ptr->mixins.list); } DUPLICATE(o2Ptr->mixins, oPtr->mixins, Class *); FOREACH(mixinPtr, o2Ptr->mixins) { if (mixinPtr && mixinPtr != o2Ptr->selfCls) { TclOOAddToInstances(o2Ptr, mixinPtr); } /* For the reference just created in DUPLICATE */ AddRef(mixinPtr->thisPtr); } /* * Copy the object's filter list to the new object. */ DUPLICATE(o2Ptr->filters, oPtr->filters, Tcl_Obj *); |
︙ | ︙ | |||
1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 | /* * Ensure that the new class's superclass structure is the same as the * old class's. */ FOREACH(superPtr, cls2Ptr->superclasses) { TclOORemoveFromSubclasses(cls2Ptr, superPtr); } if (cls2Ptr->superclasses.num) { cls2Ptr->superclasses.list = ckrealloc(cls2Ptr->superclasses.list, sizeof(Class *) * clsPtr->superclasses.num); } else { cls2Ptr->superclasses.list = ckalloc(sizeof(Class *) * clsPtr->superclasses.num); } memcpy(cls2Ptr->superclasses.list, clsPtr->superclasses.list, sizeof(Class *) * clsPtr->superclasses.num); cls2Ptr->superclasses.num = clsPtr->superclasses.num; FOREACH(superPtr, cls2Ptr->superclasses) { TclOOAddToSubclasses(cls2Ptr, superPtr); } /* * Duplicate the source class's filters. */ DUPLICATE(cls2Ptr->filters, clsPtr->filters, Tcl_Obj *); | > > > > > > | 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 | /* * Ensure that the new class's superclass structure is the same as the * old class's. */ FOREACH(superPtr, cls2Ptr->superclasses) { TclOORemoveFromSubclasses(cls2Ptr, superPtr); TclOODecrRefCount(superPtr->thisPtr); } if (cls2Ptr->superclasses.num) { cls2Ptr->superclasses.list = ckrealloc(cls2Ptr->superclasses.list, sizeof(Class *) * clsPtr->superclasses.num); } else { cls2Ptr->superclasses.list = ckalloc(sizeof(Class *) * clsPtr->superclasses.num); } memcpy(cls2Ptr->superclasses.list, clsPtr->superclasses.list, sizeof(Class *) * clsPtr->superclasses.num); cls2Ptr->superclasses.num = clsPtr->superclasses.num; FOREACH(superPtr, cls2Ptr->superclasses) { TclOOAddToSubclasses(cls2Ptr, superPtr); /* For the new item in cls2Ptr->superclasses that memcpy just * created */ AddRef(superPtr->thisPtr); } /* * Duplicate the source class's filters. */ DUPLICATE(cls2Ptr->filters, clsPtr->filters, Tcl_Obj *); |
︙ | ︙ | |||
2021 2022 2023 2024 2025 2026 2027 | } /* * Duplicate the source class's mixins (which cannot be circular * references to the duplicate). */ | > | | > | < > > | 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 | } /* * Duplicate the source class's mixins (which cannot be circular * references to the duplicate). */ if (cls2Ptr->mixins.num != 0) { FOREACH(mixinPtr, cls2Ptr->mixins) { TclOORemoveFromMixinSubs(cls2Ptr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } ckfree(clsPtr->mixins.list); } DUPLICATE(cls2Ptr->mixins, clsPtr->mixins, Class *); FOREACH(mixinPtr, cls2Ptr->mixins) { TclOOAddToMixinSubs(cls2Ptr, mixinPtr); /* For the copy just created in DUPLICATE */ AddRef(mixinPtr->thisPtr); } /* * Duplicate the source class's methods, constructor and destructor. */ FOREACH_HASH(keyPtr, mPtr, &clsPtr->classMethods) { |
︙ | ︙ |
Changes to generic/tclOODefineCmds.c.
︙ | ︙ | |||
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | Class *mixinPtr; int i; if (numMixins == 0) { if (oPtr->mixins.num != 0) { FOREACH(mixinPtr, oPtr->mixins) { TclOORemoveFromInstances(oPtr, mixinPtr); } ckfree(oPtr->mixins.list); oPtr->mixins.num = 0; } RecomputeClassCacheFlag(oPtr); } else { if (oPtr->mixins.num != 0) { FOREACH(mixinPtr, oPtr->mixins) { if (mixinPtr && mixinPtr != oPtr->selfCls) { TclOORemoveFromInstances(oPtr, mixinPtr); } } oPtr->mixins.list = ckrealloc(oPtr->mixins.list, sizeof(Class *) * numMixins); } else { oPtr->mixins.list = ckalloc(sizeof(Class *) * numMixins); oPtr->flags &= ~USE_CLASS_CACHE; } oPtr->mixins.num = numMixins; memcpy(oPtr->mixins.list, mixins, sizeof(Class *) * numMixins); FOREACH(mixinPtr, oPtr->mixins) { if (mixinPtr != oPtr->selfCls) { TclOOAddToInstances(oPtr, mixinPtr); | > > | < < < < < | | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | Class *mixinPtr; int i; if (numMixins == 0) { if (oPtr->mixins.num != 0) { FOREACH(mixinPtr, oPtr->mixins) { TclOORemoveFromInstances(oPtr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } ckfree(oPtr->mixins.list); oPtr->mixins.num = 0; } RecomputeClassCacheFlag(oPtr); } else { if (oPtr->mixins.num != 0) { FOREACH(mixinPtr, oPtr->mixins) { if (mixinPtr && mixinPtr != oPtr->selfCls) { TclOORemoveFromInstances(oPtr, mixinPtr); } TclOODecrRefCount(mixinPtr->thisPtr); } oPtr->mixins.list = ckrealloc(oPtr->mixins.list, sizeof(Class *) * numMixins); } else { oPtr->mixins.list = ckalloc(sizeof(Class *) * numMixins); oPtr->flags &= ~USE_CLASS_CACHE; } oPtr->mixins.num = numMixins; memcpy(oPtr->mixins.list, mixins, sizeof(Class *) * numMixins); FOREACH(mixinPtr, oPtr->mixins) { if (mixinPtr != oPtr->selfCls) { TclOOAddToInstances(oPtr, mixinPtr); /* For the new copy created by memcpy */ AddRef(mixinPtr->thisPtr); } } } oPtr->epoch++; } /* |
︙ | ︙ | |||
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | Class *mixinPtr; int i; if (numMixins == 0) { if (classPtr->mixins.num != 0) { FOREACH(mixinPtr, classPtr->mixins) { TclOORemoveFromMixinSubs(classPtr, mixinPtr); } ckfree(classPtr->mixins.list); classPtr->mixins.num = 0; } } else { if (classPtr->mixins.num != 0) { FOREACH(mixinPtr, classPtr->mixins) { TclOORemoveFromMixinSubs(classPtr, mixinPtr); } classPtr->mixins.list = ckrealloc(classPtr->mixins.list, sizeof(Class *) * numMixins); } else { classPtr->mixins.list = ckalloc(sizeof(Class *) * numMixins); } classPtr->mixins.num = numMixins; memcpy(classPtr->mixins.list, mixins, sizeof(Class *) * numMixins); FOREACH(mixinPtr, classPtr->mixins) { TclOOAddToMixinSubs(classPtr, mixinPtr); | > > | < < < < < | | 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | Class *mixinPtr; int i; if (numMixins == 0) { if (classPtr->mixins.num != 0) { FOREACH(mixinPtr, classPtr->mixins) { TclOORemoveFromMixinSubs(classPtr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } ckfree(classPtr->mixins.list); classPtr->mixins.num = 0; } } else { if (classPtr->mixins.num != 0) { FOREACH(mixinPtr, classPtr->mixins) { TclOORemoveFromMixinSubs(classPtr, mixinPtr); TclOODecrRefCount(mixinPtr->thisPtr); } classPtr->mixins.list = ckrealloc(classPtr->mixins.list, sizeof(Class *) * numMixins); } else { classPtr->mixins.list = ckalloc(sizeof(Class *) * numMixins); } classPtr->mixins.num = numMixins; memcpy(classPtr->mixins.list, mixins, sizeof(Class *) * numMixins); FOREACH(mixinPtr, classPtr->mixins) { TclOOAddToMixinSubs(classPtr, mixinPtr); /* For the new copy created by memcpy */ AddRef(mixinPtr->thisPtr); } } BumpGlobalEpoch(interp, classPtr); } /* * ---------------------------------------------------------------------- |
︙ | ︙ | |||
1182 1183 1184 1185 1186 1187 1188 | /* * Set the object's class. */ if (oPtr->selfCls != clsPtr) { TclOORemoveFromInstances(oPtr, oPtr->selfCls); | | < < < < | > | 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | /* * Set the object's class. */ if (oPtr->selfCls != clsPtr) { TclOORemoveFromInstances(oPtr, oPtr->selfCls); TclOODecrRefCount(oPtr->selfCls->thisPtr); oPtr->selfCls = clsPtr; AddRef(oPtr->selfCls->thisPtr); TclOOAddToInstances(oPtr, oPtr->selfCls); if (oPtr->classPtr != NULL) { BumpGlobalEpoch(interp, oPtr->classPtr); } else { oPtr->epoch++; } } return TCL_OK; |
︙ | ︙ | |||
1652 1653 1654 1655 1656 1657 1658 | if (!isInstanceMixin && TclOOIsReachable(oPtr->classPtr, clsPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not mix a class into itself", -1)); Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL); goto freeAndError; } mixins[i-1] = clsPtr; | < < < < < < < < < < | 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 | if (!isInstanceMixin && TclOOIsReachable(oPtr->classPtr, clsPtr)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not mix a class into itself", -1)); Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL); goto freeAndError; } mixins[i-1] = clsPtr; } if (isInstanceMixin) { TclOOObjectSetMixins(oPtr, objc-1, mixins); } else { TclOOClassSetMixins(interp, oPtr->classPtr, objc-1, mixins); } TclStackFree(interp, mixins); return TCL_OK; freeAndError: TclStackFree(interp, mixins); return TCL_ERROR; } /* * ---------------------------------------------------------------------- * |
︙ | ︙ | |||
2104 2105 2106 2107 2108 2109 2110 | } if (TclOOIsReachable(oPtr->classPtr, mixins[i])) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not mix a class into itself", -1)); Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL); goto freeAndError; } | < < < < < < < < < < | 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 | } if (TclOOIsReachable(oPtr->classPtr, mixins[i])) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "may not mix a class into itself", -1)); Tcl_SetErrorCode(interp, "TCL", "OO", "SELF_MIXIN", NULL); goto freeAndError; } } TclOOClassSetMixins(interp, oPtr->classPtr, mixinc, mixins); TclStackFree(interp, mixins); return TCL_OK; freeAndError: TclStackFree(interp, mixins); return TCL_ERROR; } /* * ---------------------------------------------------------------------- * |
︙ | ︙ | |||
2230 2231 2232 2233 2234 2235 2236 | superclasses = ckrealloc(superclasses, sizeof(Class *)); if (TclOOIsReachable(oPtr->fPtr->classCls, oPtr->classPtr)) { superclasses[0] = oPtr->fPtr->classCls; } else { superclasses[0] = oPtr->fPtr->objectCls; } superc = 1; | < < < < < | 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 | superclasses = ckrealloc(superclasses, sizeof(Class *)); if (TclOOIsReachable(oPtr->fPtr->classCls, oPtr->classPtr)) { superclasses[0] = oPtr->fPtr->classCls; } else { superclasses[0] = oPtr->fPtr->objectCls; } superc = 1; AddRef(superclasses[0]->thisPtr); } else { for (i=0 ; i<superc ; i++) { superclasses[i] = GetClassInOuterContext(interp, superv[i], "only a class can be a superclass"); if (superclasses[i] == NULL) { i--; |
︙ | ︙ | |||
2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 | * it used to be a member of and splicing it into the new superclasses' * subclass list. */ if (oPtr->classPtr->superclasses.num != 0) { FOREACH(superPtr, oPtr->classPtr->superclasses) { TclOORemoveFromSubclasses(oPtr->classPtr, superPtr); } ckfree(oPtr->classPtr->superclasses.list); } oPtr->classPtr->superclasses.list = superclasses; oPtr->classPtr->superclasses.num = superc; FOREACH(superPtr, oPtr->classPtr->superclasses) { TclOOAddToSubclasses(oPtr->classPtr, superPtr); | > < < < < < < | 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 | * it used to be a member of and splicing it into the new superclasses' * subclass list. */ if (oPtr->classPtr->superclasses.num != 0) { FOREACH(superPtr, oPtr->classPtr->superclasses) { TclOORemoveFromSubclasses(oPtr->classPtr, superPtr); TclOODecrRefCount(superPtr->thisPtr); } ckfree(oPtr->classPtr->superclasses.list); } oPtr->classPtr->superclasses.list = superclasses; oPtr->classPtr->superclasses.num = superc; FOREACH(superPtr, oPtr->classPtr->superclasses) { TclOOAddToSubclasses(oPtr->classPtr, superPtr); } BumpGlobalEpoch(interp, oPtr->classPtr); return TCL_OK; } /* |
︙ | ︙ | |||
2590 2591 2592 2593 2594 2595 2596 | mixins = TclStackAlloc(interp, sizeof(Class *) * mixinc); for (i=0 ; i<mixinc ; i++) { mixins[i] = GetClassInOuterContext(interp, mixinv[i], "may only mix in classes"); if (mixins[i] == NULL) { | < < < < < < < < < < | 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 | mixins = TclStackAlloc(interp, sizeof(Class *) * mixinc); for (i=0 ; i<mixinc ; i++) { mixins[i] = GetClassInOuterContext(interp, mixinv[i], "may only mix in classes"); if (mixins[i] == NULL) { TclStackFree(interp, mixins); return TCL_ERROR; } } TclOOObjectSetMixins(oPtr, mixinc, mixins); TclStackFree(interp, mixins); return TCL_OK; } |
︙ | ︙ |
Changes to generic/tclOptimize.c.
︙ | ︙ | |||
283 284 285 286 287 288 289 | case INST_JUMP_FALSE1: case INST_JUMP_FALSE4: case INST_INCR_SCALAR1: case INST_INCR_ARRAY1: case INST_INCR_ARRAY_STK: case INST_INCR_SCALAR_STK: case INST_INCR_STK: | < < | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 | case INST_JUMP_FALSE1: case INST_JUMP_FALSE4: case INST_INCR_SCALAR1: case INST_INCR_ARRAY1: case INST_INCR_ARRAY_STK: case INST_INCR_SCALAR_STK: case INST_INCR_STK: case INST_EQ: case INST_NEQ: case INST_LT: case INST_LE: case INST_GT: case INST_GE: case INST_MOD: |
︙ | ︙ |
Changes to generic/tclPipe.c.
︙ | ︙ | |||
217 218 219 220 221 222 223 | */ void Tcl_ReapDetachedProcs(void) { register Detached *detPtr; Detached *nextPtr, *prevPtr; | | < | > | | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | */ void Tcl_ReapDetachedProcs(void) { register Detached *detPtr; Detached *nextPtr, *prevPtr; int status, code; Tcl_MutexLock(&pipeMutex); for (detPtr = detList, prevPtr = NULL; detPtr != NULL; ) { status = TclProcessWait(detPtr->pid, WNOHANG, &code, NULL, NULL); if (status == TCL_PROCESS_UNCHANGED || (status == TCL_PROCESS_ERROR && code != ECHILD)) { prevPtr = detPtr; detPtr = detPtr->nextPtr; continue; } nextPtr = detPtr->nextPtr; if (prevPtr == NULL) { detList = detPtr->nextPtr; |
︙ | ︙ | |||
273 274 275 276 277 278 279 | Tcl_Pid *pidPtr, /* Array of process ids of children. */ Tcl_Channel errorChan) /* Channel for file containing stderr output * from pipeline. NULL means there isn't any * stderr output. */ { int result = TCL_OK; int i, abnormalExit, anyErrorInfo; | < | > | < < < < < < | < | < < < < < < < < | < < < | < > > < < | < | < | < < < < < < < < < < | < | < < < < < < | < > > | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | Tcl_Pid *pidPtr, /* Array of process ids of children. */ Tcl_Channel errorChan) /* Channel for file containing stderr output * from pipeline. NULL means there isn't any * stderr output. */ { int result = TCL_OK; int i, abnormalExit, anyErrorInfo; TclProcessWaitStatus waitStatus; int code; Tcl_Obj *msg, *error; abnormalExit = 0; for (i = 0; i < numPids; i++) { waitStatus = TclProcessWait(pidPtr[i], 0, &code, &msg, &error); if (waitStatus == TCL_PROCESS_ERROR) { result = TCL_ERROR; if (interp != NULL) { Tcl_SetObjErrorCode(interp, error); Tcl_SetObjResult(interp, msg); } Tcl_DecrRefCount(error); Tcl_DecrRefCount(msg); continue; } /* * Create error messages for unusual process exits. An extra newline * gets appended to each error message, but it gets removed below (in * the same fashion that an extra newline in the command's output is * removed). */ if (waitStatus != TCL_PROCESS_EXITED || code != 0) { result = TCL_ERROR; if (waitStatus == TCL_PROCESS_EXITED) { if (interp != NULL) { Tcl_SetObjErrorCode(interp, error); } abnormalExit = 1; } else if (interp != NULL) { Tcl_SetObjErrorCode(interp, error); Tcl_SetObjResult(interp, msg); } Tcl_DecrRefCount(error); Tcl_DecrRefCount(msg); } } /* * Read the standard error file. If there's anything there, then return an * error and add the file's contents to the result string. */ |
︙ | ︙ | |||
932 933 934 935 936 937 938 939 940 941 942 943 944 945 | if (result != TCL_OK) { goto error; } Tcl_DStringFree(&execBuffer); pidPtr[numPids] = pid; numPids++; /* * Close off our copies of file descriptors that were set up for this * child, then set up the input for the next child. */ if ((curInFile != NULL) && (curInFile != inputFile)) { | > | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | if (result != TCL_OK) { goto error; } Tcl_DStringFree(&execBuffer); pidPtr[numPids] = pid; numPids++; TclProcessCreated(pid); /* * Close off our copies of file descriptors that were set up for this * child, then set up the input for the next child. */ if ((curInFile != NULL) && (curInFile != inputFile)) { |
︙ | ︙ |
Changes to generic/tclPkg.c.
︙ | ︙ | |||
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | * We found an ifneeded script for the package. Be careful while * executing it: this could cause reentrancy, so (a) protect the * script itself from deletion and (b) don't assume that bestPtr * will still exist when the script completes. */ char *versionToProvide = bestPtr->version; Tcl_Preserve(versionToProvide); pkgPtr->clientData = versionToProvide; if (bestPtr->pkgIndex) { TclPkgFileSeen(interp, bestPtr->pkgIndex); } reqPtr->versionToProvide = versionToProvide; Tcl_NRAddCallback(interp, SelectPackageFinal, reqPtr, INT2PTR(reqc), (void *)reqv, data[3]); Tcl_NREvalObj(interp, Tcl_NewStringObj(bestPtr->script, -1), TCL_EVAL_GLOBAL); } return TCL_OK; } static int SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) { Require *reqPtr = data[0]; int reqc = PTR2INT(data[1]); Tcl_Obj **const reqv = data[2]; const char *name = reqPtr->name; char *versionToProvide = reqPtr->versionToProvide; | > > > > > > > > > > > | | < < < < < < < < < | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | * We found an ifneeded script for the package. Be careful while * executing it: this could cause reentrancy, so (a) protect the * script itself from deletion and (b) don't assume that bestPtr * will still exist when the script completes. */ char *versionToProvide = bestPtr->version; PkgFiles *pkgFiles; PkgName *pkgName; Tcl_Preserve(versionToProvide); pkgPtr->clientData = versionToProvide; pkgFiles = TclInitPkgFiles(interp); /* Push "ifneeded" package name in "tclPkgFiles" assocdata. */ pkgName = ckalloc(sizeof(PkgName) + strlen(name)); pkgName->nextPtr = pkgFiles->names; strcpy(pkgName->name, name); pkgFiles->names = pkgName; if (bestPtr->pkgIndex) { TclPkgFileSeen(interp, bestPtr->pkgIndex); } reqPtr->versionToProvide = versionToProvide; Tcl_NRAddCallback(interp, SelectPackageFinal, reqPtr, INT2PTR(reqc), (void *)reqv, data[3]); Tcl_NREvalObj(interp, Tcl_NewStringObj(bestPtr->script, -1), TCL_EVAL_GLOBAL); } return TCL_OK; } static int SelectPackageFinal(ClientData data[], Tcl_Interp *interp, int result) { Require *reqPtr = data[0]; int reqc = PTR2INT(data[1]); Tcl_Obj **const reqv = data[2]; const char *name = reqPtr->name; char *versionToProvide = reqPtr->versionToProvide; /* Pop the "ifneeded" package name from "tclPkgFiles" assocdata*/ PkgFiles *pkgFiles = Tcl_GetAssocData(interp, "tclPkgFiles", NULL); PkgName *pkgName = pkgFiles->names; pkgFiles->names = pkgName->nextPtr; ckfree(pkgName); reqPtr->pkgPtr = FindPackage(interp, name); if (result == TCL_OK) { Tcl_ResetResult(interp); if (reqPtr->pkgPtr->version == NULL) { |
︙ | ︙ | |||
1242 1243 1244 1245 1246 1247 1248 | } /* * Create a new-style requirement for the exact version. */ ov = Tcl_NewStringObj(version, -1); | < | 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 | } /* * Create a new-style requirement for the exact version. */ ov = Tcl_NewStringObj(version, -1); Tcl_AppendStringsToObj(ov, "-", version, NULL); version = NULL; argv3 = TclGetString(objv[3]); Tcl_IncrRefCount(objv[3]); objvListPtr = Tcl_NewListObj(0, NULL); Tcl_IncrRefCount(objvListPtr); |
︙ | ︙ |
Added generic/tclProcess.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 | /* * tclProcess.c -- * * This file implements the "tcl::process" ensemble for subprocess * management as defined by TIP #462. * * Copyright (c) 2017 Frederic Bonnet. * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tclInt.h" /* * Autopurge flag. Process-global because of the way Tcl manages child * processes (see tclPipe.c). */ static int autopurge = 1; /* Autopurge flag. */ /* * Hash tables that keeps track of all child process statuses. Keys are the * child process ids and resolved pids, values are (ProcessInfo *). */ typedef struct ProcessInfo { Tcl_Pid pid; /* Process id. */ int resolvedPid; /* Resolved process id. */ int purge; /* Purge eventualy. */ TclProcessWaitStatus status;/* Process status. */ int code; /* Error code, exit status or signal number. */ Tcl_Obj *msg; /* Error message. */ Tcl_Obj *error; /* Error code. */ } ProcessInfo; static Tcl_HashTable infoTablePerPid; static Tcl_HashTable infoTablePerResolvedPid; static int infoTablesInitialized = 0; /* 0 means not yet initialized. */ TCL_DECLARE_MUTEX(infoTablesMutex) /* * Prototypes for functions defined later in this file: */ static void InitProcessInfo(ProcessInfo *info, Tcl_Pid pid, int resolvedPid); static void FreeProcessInfo(ProcessInfo *info); static int RefreshProcessInfo(ProcessInfo *info, int options); static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, int resolvedPid, int options, int *codePtr, Tcl_Obj **msgPtr, Tcl_Obj **errorObjPtr); static Tcl_Obj * BuildProcessStatusObj(ProcessInfo *info); static int ProcessListObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcessStatusObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcessPurgeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcessAutopurgeObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); /* *---------------------------------------------------------------------- * * InitProcessInfo -- * * Initializes the ProcessInfo structure. * * Results: * None. * * Side effects: * Memory written. * *---------------------------------------------------------------------- */ void InitProcessInfo( ProcessInfo *info, /* Structure to initialize. */ Tcl_Pid pid, /* Process id. */ int resolvedPid) /* Resolved process id. */ { info->pid = pid; info->resolvedPid = resolvedPid; info->purge = 0; info->status = TCL_PROCESS_UNCHANGED; info->code = 0; info->msg = NULL; info->error = NULL; } /* *---------------------------------------------------------------------- * * FreeProcessInfo -- * * Free the ProcessInfo structure. * * Results: * None. * * Side effects: * Memory deallocated, Tcl_Obj refcount decreased. * *---------------------------------------------------------------------- */ void FreeProcessInfo( ProcessInfo *info) /* Structure to free. */ { /* * Free stored Tcl_Objs. */ if (info->msg) { Tcl_DecrRefCount(info->msg); } if (info->error) { Tcl_DecrRefCount(info->error); } /* * Free allocated structure. */ ckfree(info); } /* *---------------------------------------------------------------------- * * RefreshProcessInfo -- * * Refresh process info. * * Results: * Nonzero if state changed, else zero. * * Side effects: * May call WaitProcessStatus, which can block if WNOHANG option is set. * *---------------------------------------------------------------------- */ int RefreshProcessInfo( ProcessInfo *info, /* Structure to refresh. */ int options /* Options passed to WaitProcessStatus. */ ) { if (info->status == TCL_PROCESS_UNCHANGED) { /* * Refresh & store status. */ info->status = WaitProcessStatus(info->pid, info->resolvedPid, options, &info->code, &info->msg, &info->error); if (info->msg) Tcl_IncrRefCount(info->msg); if (info->error) Tcl_IncrRefCount(info->error); return (info->status != TCL_PROCESS_UNCHANGED); } else { /* * No change. */ return 0; } } /* *---------------------------------------------------------------------- * * WaitProcessStatus -- * * Wait for process status to change. * * Results: * TclProcessWaitStatus enum value. * * Side effects: * May call WaitProcessStatus, which can block if WNOHANG option is set. * *---------------------------------------------------------------------- */ TclProcessWaitStatus WaitProcessStatus( Tcl_Pid pid, /* Process id. */ int resolvedPid, /* Resolved process id. */ int options, /* Options passed to Tcl_WaitPid. */ int *codePtr, /* If non-NULL, will receive either: * - 0 for normal exit. * - errno in case of error. * - non-zero exit code for abormal exit. * - signal number if killed or suspended. * - Tcl_WaitPid status in all other cases. */ Tcl_Obj **msgObjPtr, /* If non-NULL, will receive error message. */ Tcl_Obj **errorObjPtr) /* If non-NULL, will receive error code. */ { int waitStatus; Tcl_Obj *errorStrings[5]; const char *msg; pid = Tcl_WaitPid(pid, &waitStatus, options); if (pid == 0) { /* * No change. */ return TCL_PROCESS_UNCHANGED; } /* * Get process status. */ if (pid == (Tcl_Pid) -1) { /* * POSIX errName msg */ msg = Tcl_ErrnoMsg(errno); if (errno == ECHILD) { /* * This changeup in message suggested by Mark Diekhans to * remind people that ECHILD errors can occur on some * systems if SIGCHLD isn't in its default state. */ msg = "child process lost (is SIGCHLD ignored or trapped?)"; } if (codePtr) *codePtr = errno; if (msgObjPtr) *msgObjPtr = Tcl_ObjPrintf( "error waiting for process to exit: %s", msg); if (errorObjPtr) { errorStrings[0] = Tcl_NewStringObj("POSIX", -1); errorStrings[1] = Tcl_NewStringObj(Tcl_ErrnoId(), -1); errorStrings[2] = Tcl_NewStringObj(msg, -1); *errorObjPtr = Tcl_NewListObj(3, errorStrings); } return TCL_PROCESS_ERROR; } else if (WIFEXITED(waitStatus)) { if (codePtr) *codePtr = WEXITSTATUS(waitStatus); if (!WEXITSTATUS(waitStatus)) { /* * Normal exit. */ if (msgObjPtr) *msgObjPtr = NULL; if (errorObjPtr) *errorObjPtr = NULL; } else { /* * CHILDSTATUS pid code * * Child exited with a non-zero exit status. */ if (msgObjPtr) *msgObjPtr = Tcl_NewStringObj( "child process exited abnormally", -1); if (errorObjPtr) { errorStrings[0] = Tcl_NewStringObj("CHILDSTATUS", -1); errorStrings[1] = Tcl_NewIntObj(resolvedPid); errorStrings[2] = Tcl_NewIntObj(WEXITSTATUS(waitStatus)); *errorObjPtr = Tcl_NewListObj(3, errorStrings); } } return TCL_PROCESS_EXITED; } else if (WIFSIGNALED(waitStatus)) { /* * CHILDKILLED pid sigName msg * * Child killed because of a signal. */ msg = Tcl_SignalMsg(WTERMSIG(waitStatus)); if (codePtr) *codePtr = WTERMSIG(waitStatus); if (msgObjPtr) *msgObjPtr = Tcl_ObjPrintf( "child killed: %s", msg); if (errorObjPtr) { errorStrings[0] = Tcl_NewStringObj("CHILDKILLED", -1); errorStrings[1] = Tcl_NewIntObj(resolvedPid); errorStrings[2] = Tcl_NewStringObj(Tcl_SignalId(WTERMSIG(waitStatus)), -1); errorStrings[3] = Tcl_NewStringObj(msg, -1); *errorObjPtr = Tcl_NewListObj(4, errorStrings); } return TCL_PROCESS_SIGNALED; } else if (WIFSTOPPED(waitStatus)) { /* * CHILDSUSP pid sigName msg * * Child suspended because of a signal. */ msg = Tcl_SignalMsg(WSTOPSIG(waitStatus)); if (codePtr) *codePtr = WSTOPSIG(waitStatus); if (msgObjPtr) *msgObjPtr = Tcl_ObjPrintf( "child suspended: %s", msg); if (errorObjPtr) { errorStrings[0] = Tcl_NewStringObj("CHILDSUSP", -1); errorStrings[1] = Tcl_NewIntObj(resolvedPid); errorStrings[2] = Tcl_NewStringObj(Tcl_SignalId(WSTOPSIG(waitStatus)), -1); errorStrings[3] = Tcl_NewStringObj(msg, -1); *errorObjPtr = Tcl_NewListObj(4, errorStrings); } return TCL_PROCESS_STOPPED; } else { /* * TCL OPERATION EXEC ODDWAITRESULT * * Child wait status didn't make sense. */ if (codePtr) *codePtr = waitStatus; if (msgObjPtr) *msgObjPtr = Tcl_NewStringObj( "child wait status didn't make sense\n", -1); if (errorObjPtr) { errorStrings[0] = Tcl_NewStringObj("TCL", -1); errorStrings[1] = Tcl_NewStringObj("OPERATION", -1); errorStrings[2] = Tcl_NewStringObj("EXEC", -1); errorStrings[3] = Tcl_NewStringObj("ODDWAITRESULT", -1); errorStrings[4] = Tcl_NewIntObj(resolvedPid); *errorObjPtr = Tcl_NewListObj(5, errorStrings); } return TCL_PROCESS_UNKNOWN_STATUS; } } /* *---------------------------------------------------------------------- * * BuildProcessStatusObj -- * * Build a list object with process status. The first element is always * a standard Tcl return value, which can be either TCL_OK or TCL_ERROR. * In the latter case, the second element is the error message and the * third element is a Tcl error code (see tclvars). * * Results: * A list object. * * Side effects: * Tcl_Objs are created. * *---------------------------------------------------------------------- */ Tcl_Obj * BuildProcessStatusObj( ProcessInfo *info) { Tcl_Obj *resultObjs[3]; if (info->status == TCL_PROCESS_UNCHANGED) { /* * Process still running, return empty obj. */ return Tcl_NewObj(); } if (info->status == TCL_PROCESS_EXITED && info->code == 0) { /* * Normal exit, return TCL_OK. */ return Tcl_NewIntObj(TCL_OK); } /* * Abnormal exit, return {TCL_ERROR msg error} */ resultObjs[0] = Tcl_NewIntObj(TCL_ERROR); resultObjs[1] = info->msg; resultObjs[2] = info->error; return Tcl_NewListObj(3, resultObjs); } /*---------------------------------------------------------------------- * * ProcessListObjCmd -- * * This function implements the 'tcl::process list' Tcl command. * Refer to the user documentation for details on what it does. * * Results: * Returns a standard Tcl result. * * Side effects: * Access to the internal structures is protected by infoTablesMutex. * *---------------------------------------------------------------------- */ static int ProcessListObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *list; Tcl_HashEntry *entry; Tcl_HashSearch search; ProcessInfo *info; if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; } /* * Return the list of all chid process ids. */ list = Tcl_NewListObj(0, NULL); Tcl_MutexLock(&infoTablesMutex); for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); Tcl_ListObjAppendElement(interp, list, Tcl_NewIntObj(info->resolvedPid)); } Tcl_MutexUnlock(&infoTablesMutex); Tcl_SetObjResult(interp, list); return TCL_OK; } /*---------------------------------------------------------------------- * * ProcessStatusObjCmd -- * * This function implements the 'tcl::process status' Tcl command. * Refer to the user documentation for details on what it does. * * Results: * Returns a standard Tcl result. * * Side effects: * Access to the internal structures is protected by infoTablesMutex. * Calls RefreshProcessInfo, which can block if -wait switch is given. * *---------------------------------------------------------------------- */ static int ProcessStatusObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_Obj *dict; int index, options = WNOHANG; Tcl_HashEntry *entry; Tcl_HashSearch search; ProcessInfo *info; int numPids; Tcl_Obj **pidObjs; int result; int i; int pid; Tcl_Obj *const *savedobjv = objv; static const char *const switches[] = { "-wait", "--", NULL }; enum switches { STATUS_WAIT, STATUS_LAST }; while (objc > 1) { if (TclGetString(objv[1])[0] != '-') { break; } if (Tcl_GetIndexFromObj(interp, objv[1], switches, "switches", 0, &index) != TCL_OK) { return TCL_ERROR; } ++objv; --objc; if (STATUS_WAIT == (enum switches) index) { options = 0; } else { break; } } if (objc != 1 && objc != 2) { Tcl_WrongNumArgs(interp, 1, savedobjv, "?switches? ?pids?"); return TCL_ERROR; } if (objc == 1) { /* * Return a dict with all child process statuses. */ dict = Tcl_NewDictObj(); Tcl_MutexLock(&infoTablesMutex); for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); RefreshProcessInfo(info, options); if (info->purge && autopurge) { /* * Purge entry. */ Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); } else { /* * Add to result. */ Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), BuildProcessStatusObj(info)); } } Tcl_MutexUnlock(&infoTablesMutex); } else { /* * Only return statuses of provided processes. */ result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs); if (result != TCL_OK) { return result; } dict = Tcl_NewDictObj(); Tcl_MutexLock(&infoTablesMutex); for (i = 0; i < numPids; i++) { result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid); if (result != TCL_OK) { Tcl_MutexUnlock(&infoTablesMutex); Tcl_DecrRefCount(dict); return result; } entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(pid)); if (!entry) { /* * Skip unknown process. */ continue; } info = (ProcessInfo *) Tcl_GetHashValue(entry); RefreshProcessInfo(info, options); if (info->purge && autopurge) { /* * Purge entry. */ Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); } else { /* * Add to result. */ Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), BuildProcessStatusObj(info)); } } Tcl_MutexUnlock(&infoTablesMutex); } Tcl_SetObjResult(interp, dict); return TCL_OK; } /*---------------------------------------------------------------------- * * ProcessPurgeObjCmd -- * * This function implements the 'tcl::process purge' Tcl command. * Refer to the user documentation for details on what it does. * * Results: * Returns a standard Tcl result. * * Side effects: * Frees all ProcessInfo structures with their purge flag set. * *---------------------------------------------------------------------- */ static int ProcessPurgeObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { Tcl_HashEntry *entry; Tcl_HashSearch search; ProcessInfo *info; int numPids; Tcl_Obj **pidObjs; int result; int i; int pid; if (objc != 1 && objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?pids?"); return TCL_ERROR; } /* * First reap detached procs so that their purge flag is up-to-date. */ Tcl_ReapDetachedProcs(); if (objc == 1) { /* * Purge all terminated processes. */ Tcl_MutexLock(&infoTablesMutex); for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); if (info->purge) { Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); } } Tcl_MutexUnlock(&infoTablesMutex); } else { /* * Purge only provided processes. */ result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs); if (result != TCL_OK) { return result; } Tcl_MutexLock(&infoTablesMutex); for (i = 0; i < numPids; i++) { result = Tcl_GetIntFromObj(interp, pidObjs[i], (int *) &pid); if (result != TCL_OK) { Tcl_MutexUnlock(&infoTablesMutex); return result; } entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(pid)); if (!entry) { /* * Skip unknown process. */ continue; } info = (ProcessInfo *) Tcl_GetHashValue(entry); if (info->purge) { Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); } } Tcl_MutexUnlock(&infoTablesMutex); } return TCL_OK; } /*---------------------------------------------------------------------- * * ProcessAutopurgeObjCmd -- * * This function implements the 'tcl::process autopurge' Tcl command. * Refer to the user documentation for details on what it does. * * Results: * Returns a standard Tcl result. * * Side effects: * Alters detached process handling by Tcl_ReapDetachedProcs(). * *---------------------------------------------------------------------- */ static int ProcessAutopurgeObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { if (objc != 1 && objc != 2) { Tcl_WrongNumArgs(interp, 1, objv, "?flag?"); return TCL_ERROR; } if (objc == 2) { /* * Set given value. */ int flag; int result = Tcl_GetBooleanFromObj(interp, objv[1], &flag); if (result != TCL_OK) { return result; } autopurge = !!flag; } /* * Return current value. */ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(autopurge)); return TCL_OK; } /* *---------------------------------------------------------------------- * * TclInitProcessCmd -- * * This procedure creates the "tcl::process" Tcl command. See the user * documentation for details on what it does. * * Results: * A standard Tcl result. * * Side effects: * See the user documentation. * *---------------------------------------------------------------------- */ Tcl_Command TclInitProcessCmd( Tcl_Interp *interp) /* Current interpreter. */ { static const EnsembleImplMap processImplMap[] = { {"list", ProcessListObjCmd, TclCompileBasic0ArgCmd, NULL, NULL, 1}, {"status", ProcessStatusObjCmd, TclCompileBasicMin0ArgCmd, NULL, NULL, 1}, {"purge", ProcessPurgeObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1}, {"autopurge", ProcessAutopurgeObjCmd, TclCompileBasic0Or1ArgCmd, NULL, NULL, 1}, {NULL, NULL, NULL, NULL, NULL, 0} }; Tcl_Command processCmd; if (infoTablesInitialized == 0) { Tcl_MutexLock(&infoTablesMutex); if (infoTablesInitialized == 0) { Tcl_InitHashTable(&infoTablePerPid, TCL_ONE_WORD_KEYS); Tcl_InitHashTable(&infoTablePerResolvedPid, TCL_ONE_WORD_KEYS); infoTablesInitialized = 1; } Tcl_MutexUnlock(&infoTablesMutex); } processCmd = TclMakeEnsemble(interp, "::tcl::process", processImplMap); Tcl_Export(interp, Tcl_FindNamespace(interp, "::tcl", NULL, 0), "process", 0); return processCmd; } /* *---------------------------------------------------------------------- * * TclProcessCreated -- * * Called when a child process has been created by Tcl. * * Results: * None. * * Side effects: * Internal structures are updated with a new ProcessInfo. * *---------------------------------------------------------------------- */ void TclProcessCreated( Tcl_Pid pid) /* Process id. */ { int resolvedPid; Tcl_HashEntry *entry, *entry2; int isNew; ProcessInfo *info; /* * Get resolved pid first. */ resolvedPid = TclpGetPid(pid); Tcl_MutexLock(&infoTablesMutex); /* * Create entry in pid table. */ entry = Tcl_CreateHashEntry(&infoTablePerPid, pid, &isNew); if (!isNew) { /* * Pid was reused, free old info and reuse structure. */ info = (ProcessInfo *) Tcl_GetHashValue(entry); entry2 = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(resolvedPid)); if (entry2) Tcl_DeleteHashEntry(entry2); FreeProcessInfo(info); } /* * Allocate and initialize info structure. */ info = (ProcessInfo *) ckalloc(sizeof(ProcessInfo)); InitProcessInfo(info, pid, resolvedPid); /* * Add entry to tables. */ Tcl_SetHashValue(entry, info); entry = Tcl_CreateHashEntry(&infoTablePerResolvedPid, INT2PTR(resolvedPid), &isNew); Tcl_SetHashValue(entry, info); Tcl_MutexUnlock(&infoTablesMutex); } /* *---------------------------------------------------------------------- * * TclProcessWait -- * * Wait for process status to change. * * Results: * TclProcessWaitStatus enum value. * * Side effects: * Completed process info structures are purged immediately (autopurge on) * or eventually (autopurge off). * *---------------------------------------------------------------------- */ TclProcessWaitStatus TclProcessWait( Tcl_Pid pid, /* Process id. */ int options, /* Options passed to WaitProcessStatus. */ int *codePtr, /* If non-NULL, will receive either: * - 0 for normal exit. * - errno in case of error. * - non-zero exit code for abormal exit. * - signal number if killed or suspended. * - Tcl_WaitPid status in all other cases. */ Tcl_Obj **msgObjPtr, /* If non-NULL, will receive error message. */ Tcl_Obj **errorObjPtr) /* If non-NULL, will receive error code. */ { Tcl_HashEntry *entry; ProcessInfo *info; TclProcessWaitStatus result; /* * First search for pid in table. */ Tcl_MutexLock(&infoTablesMutex); entry = Tcl_FindHashEntry(&infoTablePerPid, pid); if (!entry) { /* * Unknown process, just call WaitProcessStatus and return. */ result = WaitProcessStatus(pid, TclpGetPid(pid), options, codePtr, msgObjPtr, errorObjPtr); if (msgObjPtr && *msgObjPtr) Tcl_IncrRefCount(*msgObjPtr); if (errorObjPtr && *errorObjPtr) Tcl_IncrRefCount(*errorObjPtr); Tcl_MutexUnlock(&infoTablesMutex); return result; } info = (ProcessInfo *) Tcl_GetHashValue(entry); if (info->purge) { /* * Process has completed but TclProcessWait has already been called, * so report no change. */ Tcl_MutexUnlock(&infoTablesMutex); return TCL_PROCESS_UNCHANGED; } RefreshProcessInfo(info, options); if (info->status == TCL_PROCESS_UNCHANGED) { /* * No change, stop there. */ Tcl_MutexUnlock(&infoTablesMutex); return TCL_PROCESS_UNCHANGED; } /* * Set return values. */ result = info->status; if (codePtr) *codePtr = info->code; if (msgObjPtr) *msgObjPtr = info->msg; if (errorObjPtr) *errorObjPtr = info->error; if (msgObjPtr && *msgObjPtr) Tcl_IncrRefCount(*msgObjPtr); if (errorObjPtr && *errorObjPtr) Tcl_IncrRefCount(*errorObjPtr); if (autopurge) { /* * Purge now. */ Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(info->resolvedPid)); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); } else { /* * Eventually purge. Subsequent calls will return * TCL_PROCESS_UNCHANGED. */ info->purge = 1; } Tcl_MutexUnlock(&infoTablesMutex); return result; } |
Changes to generic/tclScan.c.
︙ | ︙ | |||
922 923 924 925 926 927 928 | string = end; if (flags & SCAN_SUPPRESS) { Tcl_DecrRefCount(objPtr); break; } if (flags & SCAN_LONGER) { if (Tcl_GetWideIntFromObj(NULL, objPtr, &wideValue) != TCL_OK) { | | | | > > | > > > > > > > > > > | > | 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | string = end; if (flags & SCAN_SUPPRESS) { Tcl_DecrRefCount(objPtr); break; } if (flags & SCAN_LONGER) { if (Tcl_GetWideIntFromObj(NULL, objPtr, &wideValue) != TCL_OK) { wideValue = LLONG_MAX; if (TclGetString(objPtr)[0] == '-') { wideValue = LLONG_MIN; } } if ((flags & SCAN_UNSIGNED) && (wideValue < 0)) { sprintf(buf, "%" TCL_LL_MODIFIER "u", (Tcl_WideUInt)wideValue); Tcl_SetStringObj(objPtr, buf, -1); } else { TclSetIntObj(objPtr, wideValue); } } else if (flags & SCAN_BIG) { if (flags & SCAN_UNSIGNED) { mp_int big; int code = Tcl_GetBignumFromObj(interp, objPtr, &big); if (code == TCL_OK) { if (mp_isneg(&big)) { code = TCL_ERROR; } mp_clear(&big); } if (code == TCL_ERROR) { if (objs != NULL) { ckfree(objs); } Tcl_DecrRefCount(objPtr); Tcl_SetObjResult(interp, Tcl_NewStringObj( "unsigned bignum scans are invalid", -1)); Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADUNSIGNED",NULL); return TCL_ERROR; } } } else { if (TclGetLongFromObj(NULL, objPtr, &value) != TCL_OK) { if (TclGetString(objPtr)[0] == '-') { value = LONG_MIN; |
︙ | ︙ |
Changes to generic/tclStringObj.c.
︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tclInt.h" #include "tommath.h" #include "tclStringRep.h" /* * Prototypes for functions defined later in this file: */ static void AppendPrintfToObjVA(Tcl_Obj *objPtr, const char *format, va_list argList); static void AppendUnicodeToUnicodeRep(Tcl_Obj *objPtr, | > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tclInt.h" #include "tommath.h" #include "tclStringRep.h" #include "assert.h" /* * Prototypes for functions defined later in this file: */ static void AppendPrintfToObjVA(Tcl_Obj *objPtr, const char *format, va_list argList); static void AppendUnicodeToUnicodeRep(Tcl_Obj *objPtr, |
︙ | ︙ | |||
1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 | goto error; } cmpResult = mp_cmp_d(&big, 0); isNegative = (cmpResult == MP_LT); if (cmpResult == MP_EQ) gotHash = 0; if (ch == 'u') { if (isNegative) { msg = "unsigned bignum format is invalid"; errCode = "BADUNSIGNED"; goto errorMsg; } else { ch = 'd'; } } | > | 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 | goto error; } cmpResult = mp_cmp_d(&big, 0); isNegative = (cmpResult == MP_LT); if (cmpResult == MP_EQ) gotHash = 0; if (ch == 'u') { if (isNegative) { mp_clear(&big); msg = "unsigned bignum format is invalid"; errCode = "BADUNSIGNED"; goto errorMsg; } else { ch = 'd'; } } |
︙ | ︙ | |||
3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 | if ((objPtr->bytes == NULL) || (objPtr->length)) { int more; char *src = Tcl_GetStringFromObj(objPtr, &more); memcpy(dst, src, (size_t) more); dst += more; } } } return objResultPtr; overflow: if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%d bytes) exceeded", INT_MAX)); | > > | 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 | if ((objPtr->bytes == NULL) || (objPtr->length)) { int more; char *src = Tcl_GetStringFromObj(objPtr, &more); memcpy(dst, src, (size_t) more); dst += more; } } /* Must NUL-terminate! */ *dst = '\0'; } return objResultPtr; overflow: if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%d bytes) exceeded", INT_MAX)); |
︙ | ︙ | |||
3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 | } /* Pass 2. Reverse all the bytes. */ ReverseBytes((unsigned char *)to, (unsigned char *)from, numBytes); } return objPtr; } /* *--------------------------------------------------------------------------- * * FillUnicodeRep -- * * Populate the Unicode internal rep with the Unicode form of its string | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 | } /* Pass 2. Reverse all the bytes. */ ReverseBytes((unsigned char *)to, (unsigned char *)from, numBytes); } return objPtr; } /* *--------------------------------------------------------------------------- * * TclStringReplace -- * * Implements the inner engine of the [string replace] command. * * The result is a concatenation of a prefix from objPtr, characters * 0 through first-1, the insertPtr string value, and a suffix from * objPtr, characters from first + count to the end. The effect is * as if the inner substring of characters first through first+count-1 * are removed and replaced with insertPtr. * If insertPtr is NULL, it is treated as an empty string. * When passed the flag TCL_STRING_IN_PLACE, this routine will try * to do the work within objPtr, so long as no sharing forbids it. * Without that request, or as needed, a new Tcl value will be allocated * to be the result. * * Results: * A Tcl value that is the result of the substring replacement. * May return NULL in case of an error. When NULL is returned and * interp is non-NULL, error information is left in interp * *--------------------------------------------------------------------------- */ Tcl_Obj * TclStringReplace( Tcl_Interp *interp, /* For error reporting, may be NULL */ Tcl_Obj *objPtr, /* String to act upon */ int first, /* First index to replace */ int count, /* How many chars to replace */ Tcl_Obj *insertPtr, /* Replacement string, may be NULL */ int flags) /* TCL_STRING_IN_PLACE => attempt in-place */ { int inPlace = flags & TCL_STRING_IN_PLACE; Tcl_Obj *result; /* Caller is expected to pass sensible arguments */ assert ( count >= 0 ) ; assert ( first >= 0 ) ; /* Replace nothing with nothing */ if ((insertPtr == NULL) && (count == 0)) { if (inPlace) { return objPtr; } else { return Tcl_DuplicateObj(objPtr); } } /* * The caller very likely had to call Tcl_GetCharLength() or similar * to be able to process index values. This means it is like that * objPtr is either a proper "bytearray" or a "string" or else it has * a known and short string rep. */ if (TclIsPureByteArray(objPtr)) { int numBytes; unsigned char *bytes = Tcl_GetByteArrayFromObj(objPtr, &numBytes); if (insertPtr == NULL) { /* Replace something with nothing. */ assert ( first <= numBytes ) ; assert ( count <= numBytes ) ; assert ( first + count <= numBytes ) ; result = Tcl_NewByteArrayObj(NULL, numBytes - count);/* PANIC? */ TclAppendBytesToByteArray(result, bytes, first); TclAppendBytesToByteArray(result, bytes + first + count, numBytes - count - first); return result; } /* Replace everything */ if ((first == 0) && (count == numBytes)) { return insertPtr; } if (TclIsPureByteArray(insertPtr)) { int newBytes; unsigned char *iBytes = Tcl_GetByteArrayFromObj(insertPtr, &newBytes); if (count == newBytes && inPlace && !Tcl_IsShared(objPtr)) { /* * Removal count and replacement count are equal. * Other conditions permit. Do in-place splice. */ memcpy(bytes + first, iBytes, count); Tcl_InvalidateStringRep(objPtr); return objPtr; } if (newBytes > INT_MAX - (numBytes - count)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "max size for a Tcl value (%d bytes) exceeded", INT_MAX)); Tcl_SetErrorCode(interp, "TCL", "MEMORY", NULL); } return NULL; } result = Tcl_NewByteArrayObj(NULL, numBytes - count + newBytes); /* PANIC? */ Tcl_SetByteArrayLength(result, 0); TclAppendBytesToByteArray(result, bytes, first); TclAppendBytesToByteArray(result, iBytes, newBytes); TclAppendBytesToByteArray(result, bytes + first + count, numBytes - count - first); return result; } /* Flow through to try other approaches below */ } /* * TODO: Figure out how not to generate a Tcl_UniChar array rep * when it can be determined objPtr->bytes points to a string of * all single-byte characters so we can index it directly. */ /* The traditional implementation... */ { int numChars; Tcl_UniChar *ustring = Tcl_GetUnicodeFromObj(objPtr, &numChars); /* TODO: Is there an in-place option worth pursuing here? */ result = Tcl_NewUnicodeObj(ustring, first); if (insertPtr) { Tcl_AppendObjToObj(result, insertPtr); } if (first + count < numChars) { Tcl_AppendUnicodeToObj(result, ustring + first + count, numChars - first - count); } return result; } } /* *--------------------------------------------------------------------------- * * FillUnicodeRep -- * * Populate the Unicode internal rep with the Unicode form of its string |
︙ | ︙ |
Changes to generic/tclStringRep.h.
︙ | ︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #define stringRealloc(ptr, numChars) \ (String *) Tcl_Realloc((ptr), STRING_SIZE(numChars)) #define stringAttemptRealloc(ptr, numChars) \ (String *) Tcl_AttemptRealloc((ptr), STRING_SIZE(numChars)) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.twoPtrValue.ptr1) #define SET_STRING(objPtr, stringPtr) \ ((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (stringPtr)) /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 | > | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #define stringRealloc(ptr, numChars) \ (String *) Tcl_Realloc((ptr), STRING_SIZE(numChars)) #define stringAttemptRealloc(ptr, numChars) \ (String *) Tcl_AttemptRealloc((ptr), STRING_SIZE(numChars)) #define GET_STRING(objPtr) \ ((String *) (objPtr)->internalRep.twoPtrValue.ptr1) #define SET_STRING(objPtr, stringPtr) \ ((objPtr)->internalRep.twoPtrValue.ptr2 = NULL), \ ((objPtr)->internalRep.twoPtrValue.ptr1 = (void *) (stringPtr)) /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 |
︙ | ︙ |
Changes to generic/tclStubInit.c.
︙ | ︙ | |||
146 147 148 149 150 151 152 | #if defined(TCL_WIDE_INT_IS_LONG) /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore * we have to make sure that all stub entries on Cygwin64 follow the Win64 * signature. Tcl 9 must find a better solution, but that cannot be done * without introducing a binary incompatibility. */ | < < < < < < < < < < < < < < < < < < < < < < | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | #if defined(TCL_WIDE_INT_IS_LONG) /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore * we have to make sure that all stub entries on Cygwin64 follow the Win64 * signature. Tcl 9 must find a better solution, but that cannot be done * without introducing a binary incompatibility. */ static int exprInt(Tcl_Interp *interp, const char *expr, int *ptr){ long longValue; int result = Tcl_ExprLong(interp, expr, &longValue); if (result == TCL_OK) { if ((longValue >= -(long)(UINT_MAX)) && (longValue <= (long)(UINT_MAX))) { *ptr = (int)longValue; |
︙ | ︙ | |||
216 217 218 219 220 221 222 | return Tcl_UtfNcasecmp(s1, s2, (unsigned long)n); } #define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))utfNcasecmp static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n); } #define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcasecmp | < < < < | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | return Tcl_UtfNcasecmp(s1, s2, (unsigned long)n); } #define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))utfNcasecmp static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n); } #define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcasecmp #endif /* TCL_WIDE_INT_IS_LONG */ #endif /* __CYGWIN__ */ #if defined(TCL_NO_DEPRECATED) # undef Tcl_SetBooleanObj |
︙ | ︙ |
Changes to generic/tclTomMath.h.
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 | #endif #ifdef __cplusplus extern "C" { #endif /* detect 64-bit mode if possible */ | > > > > > | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #endif #ifdef __cplusplus extern "C" { #endif /* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */ #if defined(_MSC_VER) || defined(__LLP64__) # define MP_32BIT #endif /* detect 64-bit mode if possible */ #if defined(NEVER) # if !(defined(MP_32BIT) || defined(MP_16BIT) || defined(MP_8BIT) || defined(_MSC_VER)) # define MP_64BIT # endif #endif /* some default configurations. * * A "mp_digit" must be able to hold DIGIT_BIT + 1 bits |
︙ | ︙ | |||
69 70 71 72 73 74 75 | # endif #elif defined(MP_64BIT) /* for GCC only on supported platforms */ #ifndef MP_DIGIT_DECLARED typedef uint64_t mp_digit; #define MP_DIGIT_DECLARED #endif | | < < < < < | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | # endif #elif defined(MP_64BIT) /* for GCC only on supported platforms */ #ifndef MP_DIGIT_DECLARED typedef uint64_t mp_digit; #define MP_DIGIT_DECLARED #endif # if defined(__GNUC__) typedef unsigned long mp_word __attribute__((mode(TI))); # else /* it seems you have a problem * but we assume you can somewhere define your own uint128_t */ #ifndef MP_WORD_DECLARED typedef uint128_t mp_word; #define MP_WORD_DECLARED |
︙ | ︙ | |||
120 121 122 123 124 125 126 | #else typedef mp_digit mp_min_u32; #endif /* use arc4random on platforms that support it */ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) # define MP_GEN_RANDOM() arc4random() | | | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | #else typedef mp_digit mp_min_u32; #endif /* use arc4random on platforms that support it */ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) # define MP_GEN_RANDOM() arc4random() # define MP_GEN_RANDOM_MAX 0xffffffffu #endif /* use rand() as fall-back if there's no better rand function */ #ifndef MP_GEN_RANDOM # define MP_GEN_RANDOM() rand() # define MP_GEN_RANDOM_MAX RAND_MAX #endif |
︙ | ︙ | |||
177 178 179 180 181 182 183 | # define MP_PREC 32 /* default digits of precision */ # else # define MP_PREC 8 /* default digits of precision */ # endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ | | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | # define MP_PREC 32 /* default digits of precision */ # else # define MP_PREC 8 /* default digits of precision */ # endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ #define MP_WARRAY (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1)) /* the infamous mp_int structure */ #ifndef MP_INT_DECLARED #define MP_INT_DECLARED typedef struct mp_int mp_int; #endif struct mp_int { |
︙ | ︙ | |||
267 268 269 270 271 272 273 | */ /* set a platform dependent unsigned long value */ /* int mp_set_long(mp_int *a, unsigned long b); */ | | | | | | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | */ /* set a platform dependent unsigned long value */ /* int mp_set_long(mp_int *a, unsigned long b); */ /* set a platform dependent Tcl_WideUInt value */ /* int mp_set_long_long(mp_int *a, Tcl_WideUInt b); */ /* get a 32-bit value */ /* unsigned long mp_get_int(const mp_int *a); */ /* get a platform dependent unsigned long value */ /* unsigned long mp_get_long(const mp_int *a); */ /* get a platform dependent Tcl_WideUInt value */ /* Tcl_WideUInt mp_get_long_long(const mp_int *a); */ /* initialize and set a digit */ /* int mp_init_set(mp_int *a, mp_digit b); */ |
︙ | ︙ | |||
549 550 551 552 553 554 555 | /* special sqrt algo */ /* int mp_sqrt(const mp_int *arg, mp_int *ret); */ /* special sqrt (mod prime) */ /* | | | | | | | | | | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | /* special sqrt algo */ /* int mp_sqrt(const mp_int *arg, mp_int *ret); */ /* special sqrt (mod prime) */ /* int mp_sqrtmod_prime(const mp_int *n, const mp_int *prime, mp_int *ret); */ /* is number a square? */ /* int mp_is_square(const mp_int *arg, int *ret); */ /* computes the jacobi c = (a | n) (or Legendre if b is prime) */ /* int mp_jacobi(const mp_int *a, const mp_int *n, int *c); */ /* used to setup the Barrett reduction for a given modulus b */ /* int mp_reduce_setup(mp_int *a, const mp_int *b); */ /* Barrett Reduction, computes a (mod b) with a precomputed value c * * Assumes that 0 < x <= m*m, note if 0 > x > -(m*m) then you can merely * compute the reduction as -1 * mp_reduce(mp_abs(x)) [pseudo code]. */ /* int mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu); */ /* setups the montgomery reduction */ /* int mp_montgomery_setup(const mp_int *n, mp_digit *rho); */ /* computes a = B**n mod b without division or multiplication useful for * normalizing numbers in a Montgomery system. */ /* int mp_montgomery_calc_normalization(mp_int *a, const mp_int *b); */ /* computes x/R == x (mod N) via Montgomery Reduction */ /* int mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho); */ /* returns 1 if a is a valid DR modulus */ /* int mp_dr_is_modulus(const mp_int *a); */ /* sets the value of "d" required for mp_dr_reduce */ /* void mp_dr_setup(const mp_int *a, mp_digit *d); */ /* reduces a modulo n using the Diminished Radix method */ /* int mp_dr_reduce(mp_int *x, const mp_int *n, mp_digit k); */ /* returns true if a can be reduced with mp_reduce_2k */ /* int mp_reduce_is_2k(const mp_int *a); */ |
︙ | ︙ | |||
638 639 640 641 642 643 644 | */ /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ /* int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d); */ | | | | 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | */ /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ /* int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d); */ /* Y = G**X (mod P) */ /* int mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y); */ /* ---> Primes <--- */ /* number of primes */ #ifdef MP_8BIT # define PRIME_SIZE 31 |
︙ | ︙ |
Changes to generic/tclUtil.c.
︙ | ︙ | |||
96 97 98 99 100 101 102 103 104 105 106 107 108 109 | /* * Prototypes for functions defined later in this file. */ static void ClearHash(Tcl_HashTable *tablePtr); static void FreeProcessGlobalValue(ClientData clientData); static void FreeThreadHash(ClientData clientData); static Tcl_HashTable * GetThreadHash(Tcl_ThreadDataKey *keyPtr); static int SetEndOffsetFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int FindElement(Tcl_Interp *interp, const char *string, int stringLength, const char *typeStr, const char *typeCode, const char **elementPtr, const char **nextPtr, size_t *sizePtr, | > > | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | /* * Prototypes for functions defined later in this file. */ static void ClearHash(Tcl_HashTable *tablePtr); static void FreeProcessGlobalValue(ClientData clientData); static void FreeThreadHash(ClientData clientData); static int GetEndOffsetFromObj(Tcl_Obj *objPtr, int endValue, int *indexPtr); static Tcl_HashTable * GetThreadHash(Tcl_ThreadDataKey *keyPtr); static int SetEndOffsetFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); static int FindElement(Tcl_Interp *interp, const char *string, int stringLength, const char *typeStr, const char *typeCode, const char **elementPtr, const char **nextPtr, size_t *sizePtr, |
︙ | ︙ | |||
1594 1595 1596 1597 1598 1599 1600 | } return result; } /* *---------------------------------------------------------------------- * | > > > > > > > > > > > > > | > > > > > > > > | > > > > > > > > > > > > > > | < > | | | < < < < < < < < < < < < | 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 | } return result; } /* *---------------------------------------------------------------------- * * UtfWellFormedEnd -- * Checks the end of utf string is malformed, if yes - wraps bytes * to the given buffer (as well-formed NTS string). The buffer * argument should be initialized by the caller and ready to use. * * Results: * The bytes with well-formed end of the string. * * Side effects: * Buffer (DString) may be allocated, so must be released. * *---------------------------------------------------------------------- */ static inline const char* UtfWellFormedEnd( Tcl_DString *buffer, /* Buffer used to hold well-formed string. */ const char *bytes, /* Pointer to the beginning of the string. */ int length) /* Length of the string. */ { const char *l = bytes + length; const char *p = Tcl_UtfPrev(l, bytes); if (Tcl_UtfCharComplete(p, l - p)) { return bytes; } /* * Malformed utf-8 end, be sure we've NTS to safe compare of end-character, * avoid segfault by access violation out of range. */ Tcl_DStringAppend(buffer, bytes, length); return Tcl_DStringValue(buffer); } /* *---------------------------------------------------------------------- * * TclTrimRight -- * Takes two counted strings in the Tcl encoding. Conceptually * finds the sub string (offset) to trim from the right side of the * first string all characters found in the second string. * * Results: * The number of bytes to be removed from the end of the string. * * Side effects: * None. * *---------------------------------------------------------------------- */ static inline int TrimRight( const char *bytes, /* String to be trimmed... */ int numBytes, /* ...and its length in bytes */ const char *trim, /* String of trim characters... */ int numTrim) /* ...and its length in bytes */ { const char *p = bytes + numBytes; int pInc; Tcl_UniChar ch1 = 0, ch2 = 0; /* * Outer loop: iterate over string to be trimmed. */ do { const char *q = trim; int bytesLeft = numTrim; |
︙ | ︙ | |||
1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 | p += pInc; break; } } while (p > bytes); return numBytes - (p - bytes); } /* *---------------------------------------------------------------------- * * TclTrimLeft -- * | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | < < < < < < < < < < < < | 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | p += pInc; break; } } while (p > bytes); return numBytes - (p - bytes); } int TclTrimRight( const char *bytes, /* String to be trimmed... */ int numBytes, /* ...and its length in bytes */ const char *trim, /* String of trim characters... */ int numTrim) /* ...and its length in bytes */ { int res; Tcl_DString bytesBuf, trimBuf; /* Empty strings -> nothing to do */ if ((numBytes == 0) || (numTrim == 0)) { return 0; } Tcl_DStringInit(&bytesBuf); Tcl_DStringInit(&trimBuf); bytes = UtfWellFormedEnd(&bytesBuf, bytes, numBytes); trim = UtfWellFormedEnd(&trimBuf, trim, numTrim); res = TrimRight(bytes, numBytes, trim, numTrim); if (res > numBytes) { res = numBytes; } Tcl_DStringFree(&bytesBuf); Tcl_DStringFree(&trimBuf); return res; } /* *---------------------------------------------------------------------- * * TclTrimLeft -- * * Takes two counted strings in the Tcl encoding. Conceptually * finds the sub string (offset) to trim from the left side of the * first string all characters found in the second string. * * Results: * The number of bytes to be removed from the start of the string. * * Side effects: * None. * *---------------------------------------------------------------------- */ static inline int TrimLeft( const char *bytes, /* String to be trimmed... */ int numBytes, /* ...and its length in bytes */ const char *trim, /* String of trim characters... */ int numTrim) /* ...and its length in bytes */ { const char *p = bytes; Tcl_UniChar ch1 = 0, ch2 = 0; /* * Outer loop: iterate over string to be trimmed. */ do { int pInc = TclUtfToUniChar(p, &ch1); const char *q = trim; |
︙ | ︙ | |||
1745 1746 1747 1748 1749 1750 1751 | */ break; } p += pInc; numBytes -= pInc; | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 | */ break; } p += pInc; numBytes -= pInc; } while (numBytes > 0); return p - bytes; } int TclTrimLeft( const char *bytes, /* String to be trimmed... */ int numBytes, /* ...and its length in bytes */ const char *trim, /* String of trim characters... */ int numTrim) /* ...and its length in bytes */ { int res; Tcl_DString bytesBuf, trimBuf; /* Empty strings -> nothing to do */ if ((numBytes == 0) || (numTrim == 0)) { return 0; } Tcl_DStringInit(&bytesBuf); Tcl_DStringInit(&trimBuf); bytes = UtfWellFormedEnd(&bytesBuf, bytes, numBytes); trim = UtfWellFormedEnd(&trimBuf, trim, numTrim); res = TrimLeft(bytes, numBytes, trim, numTrim); if (res > numBytes) { res = numBytes; } Tcl_DStringFree(&bytesBuf); Tcl_DStringFree(&trimBuf); return res; } /* *---------------------------------------------------------------------- * * TclTrim -- * Finds the sub string (offset) to trim from both sides of the * first string all characters found in the second string. * * Results: * The number of bytes to be removed from the start of the string * * Side effects: * None. * *---------------------------------------------------------------------- */ int TclTrim( const char *bytes, /* String to be trimmed... */ int numBytes, /* ...and its length in bytes */ const char *trim, /* String of trim characters... */ int numTrim, /* ...and its length in bytes */ int *trimRight) /* Offset from the end of the string. */ { int trimLeft; Tcl_DString bytesBuf, trimBuf; *trimRight = 0; /* Empty strings -> nothing to do */ if ((numBytes == 0) || (numTrim == 0)) { return 0; } Tcl_DStringInit(&bytesBuf); Tcl_DStringInit(&trimBuf); bytes = UtfWellFormedEnd(&bytesBuf, bytes, numBytes); trim = UtfWellFormedEnd(&trimBuf, trim, numTrim); trimLeft = TrimLeft(bytes, numBytes, trim, numTrim); if (trimLeft > numBytes) { trimLeft = numBytes; } numBytes -= trimLeft; /* have to trim yet (first char was already verified within TrimLeft) */ if (numBytes > 1) { bytes += trimLeft; *trimRight = TrimRight(bytes, numBytes, trim, numTrim); if (*trimRight > numBytes) { *trimRight = numBytes; } } Tcl_DStringFree(&bytesBuf); Tcl_DStringFree(&trimBuf); return trimLeft; } /* *---------------------------------------------------------------------- * * Tcl_Concat -- * * Concatenate a set of strings into a single large string. |
︙ | ︙ | |||
1816 1817 1818 1819 1820 1821 1822 | /* * All element bytes + (argc - 1) spaces + 1 terminating NULL. */ result = ckalloc((unsigned) (bytesNeeded + argc)); for (p = result, i = 0; i < argc; i++) { | | < | < < | | | | < < | < < < < | < | 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 | /* * All element bytes + (argc - 1) spaces + 1 terminating NULL. */ result = ckalloc((unsigned) (bytesNeeded + argc)); for (p = result, i = 0; i < argc; i++) { int triml, trimr, elemLength; const char *element; element = argv[i]; elemLength = strlen(argv[i]); /* Trim away the leading/trailing whitespace. */ triml = TclTrim(element, elemLength, CONCAT_TRIM_SET, CONCAT_WS_SIZE, &trimr); element += triml; elemLength -= triml + trimr; /* Do not permit trimming to expose a final backslash character. */ elemLength += trimr && (element[elemLength - 1] == '\\'); /* * If we're left with empty element after trimming, do nothing. */ if (elemLength == 0) { continue; |
︙ | ︙ | |||
1959 1960 1961 1962 1963 1964 1965 | */ TclNewObj(resPtr); (void) Tcl_AttemptSetObjLength(resPtr, bytesNeeded + objc - 1); Tcl_SetObjLength(resPtr, 0); for (i = 0; i < objc; i++) { | | > < | < < | | | | < < | < < < < | < | 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 | */ TclNewObj(resPtr); (void) Tcl_AttemptSetObjLength(resPtr, bytesNeeded + objc - 1); Tcl_SetObjLength(resPtr, 0); for (i = 0; i < objc; i++) { size_t triml; int trimr; element = TclGetString(objv[i]); elemLength = objv[i]->length; /* Trim away the leading/trailing whitespace. */ triml = TclTrim(element, elemLength, CONCAT_TRIM_SET, CONCAT_WS_SIZE, &trimr); element += triml; elemLength -= triml + trimr; /* Do not permit trimming to expose a final backslash character. */ elemLength += trimr && (element[elemLength - 1] == '\\'); /* * If we're left with empty element after trimming, do nothing. */ if (elemLength == 0) { continue; |
︙ | ︙ | |||
3324 3325 3326 3327 3328 3329 3330 | char *opPtr; const char *bytes; if (TclGetIntFromObj(NULL, objPtr, indexPtr) == TCL_OK) { return TCL_OK; } | < < < < < | < | 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 | char *opPtr; const char *bytes; if (TclGetIntFromObj(NULL, objPtr, indexPtr) == TCL_OK) { return TCL_OK; } if (GetEndOffsetFromObj(objPtr, endValue, indexPtr) == TCL_OK) { return TCL_OK; } bytes = TclGetString(objPtr); length = objPtr->length; /* |
︙ | ︙ | |||
3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 | } Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } return TCL_ERROR; } /* *---------------------------------------------------------------------- * * SetEndOffsetFromAny -- * * Look for a string of the form "end[+-]offset" and convert it to an * internal representation holding the offset. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 | } Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } return TCL_ERROR; } /* *---------------------------------------------------------------------- * * GetEndOffsetFromObj -- * * Look for a string of the form "end[+-]offset" and convert it to an * internal representation holding the offset. * * Results: * Tcl return code. * * Side effects: * May store a Tcl_ObjType. * *---------------------------------------------------------------------- */ static int GetEndOffsetFromObj( Tcl_Obj *objPtr, /* Pointer to the object to parse */ int endValue, /* The value to be stored at "indexPtr" if * "objPtr" holds "end". */ int *indexPtr) /* Location filled in with an integer * representing an index. */ { if (SetEndOffsetFromAny(NULL, objPtr) != TCL_OK) { return TCL_ERROR; } /* TODO: Handle overflow cases sensibly */ *indexPtr = endValue + (int)objPtr->internalRep.wideValue; return TCL_OK; } /* *---------------------------------------------------------------------- * * SetEndOffsetFromAny -- * * Look for a string of the form "end[+-]offset" and convert it to an * internal representation holding the offset. |
︙ | ︙ | |||
3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 | return TCL_ERROR; } if (objPtr->typePtr != &tclIntType) { goto badIndexFormat; } offset = objPtr->internalRep.wideValue; if (bytes[3] == '-') { offset = -offset; } } else { /* * Conversion failed. Report the error. */ | > > | 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 | return TCL_ERROR; } if (objPtr->typePtr != &tclIntType) { goto badIndexFormat; } offset = objPtr->internalRep.wideValue; if (bytes[3] == '-') { /* TODO: Review overflow concerns here! */ offset = -offset; } } else { /* * Conversion failed. Report the error. */ |
︙ | ︙ | |||
3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 | TclFreeIntRep(objPtr); objPtr->internalRep.wideValue = offset; objPtr->typePtr = &endOffsetType; return TCL_OK; } /* *---------------------------------------------------------------------- * * ClearHash -- * * Remove all the entries in the hash table *tablePtr. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 | TclFreeIntRep(objPtr); objPtr->internalRep.wideValue = offset; objPtr->typePtr = &endOffsetType; return TCL_OK; } /* *---------------------------------------------------------------------- * * TclIndexEncode -- * * Parse objPtr to determine if it is an index value. Two cases * are possible. The value objPtr might be parsed as an absolute * index value in the C signed int range. Note that this includes * index values that are integers as presented and it includes index * arithmetic expressions. The absolute index values that can be * directly meaningful as an index into either a list or a string are * those integer values >= TCL_INDEX_START (0) * and < TCL_INDEX_AFTER (INT_MAX). * The largest string supported in Tcl 8 has bytelength INT_MAX. * This means the largest supported character length is also INT_MAX, * and the index of the last character in a string of length INT_MAX * is INT_MAX-1. * * Any absolute index value parsed outside that range is encoded * using the before and after values passed in by the * caller as the encoding to use for indices that are either * less than or greater than the usable index range. TCL_INDEX_AFTER * is available as a good choice for most callers to use for * after. Likewise, the value TCL_INDEX_BEFORE is good for * most callers to use for before. Other values are possible * when the caller knows it is helpful in producing its own behavior * for indices before and after the indexed item. * * A token can also be parsed as an end-relative index expression. * All end-relative expressions that indicate an index larger * than end (end+2, end--5) point beyond the end of the indexed * collection, and can be encoded as after. The end-relative * expressions that indicate an index less than or equal to end * are encoded relative to the value TCL_INDEX_END (-2). The * index "end" is encoded as -2, down to the index "end-0x7ffffffe" * which is encoded as INT_MIN. Since the largest index into a * string possible in Tcl 8 is 0x7ffffffe, the interpretation of * "end-0x7ffffffe" for that largest string would be 0. Thus, * if the tokens "end-0x7fffffff" or "end+-0x80000000" are parsed, * they can be encoded with the before value. * * These details will require re-examination whenever string and * list length limits are increased, but that will likely also * mean a revised routine capable of returning Tcl_WideInt values. * * Returns: * TCL_OK if parsing succeeded, and TCL_ERROR if it failed. * * Side effects: * When TCL_OK is returned, the encoded index value is written * to *indexPtr. * *---------------------------------------------------------------------- */ int TclIndexEncode( Tcl_Interp *interp, /* For error reporting, may be NULL */ Tcl_Obj *objPtr, /* Index value to parse */ int before, /* Value to return for index before beginning */ int after, /* Value to return for index after end */ int *indexPtr) /* Where to write the encoded answer, not NULL */ { int idx; if (TCL_OK == TclGetIntFromObj(NULL, objPtr, &idx)) { /* We parsed a value in the range INT_MIN...INT_MAX */ integerEncode: if (idx < TCL_INDEX_START) { /* All negative absolute indices are "before the beginning" */ idx = before; } else if (idx == INT_MAX) { /* This index value is always "after the end" */ idx = after; } /* usual case, the absolute index value encodes itself */ } else if (TCL_OK == GetEndOffsetFromObj(objPtr, 0, &idx)) { /* * We parsed an end+offset index value. * idx holds the offset value in the range INT_MIN...INT_MAX. */ if (idx > 0) { /* * All end+postive or end-negative expressions * always indicate "after the end". */ idx = after; } else if (idx < INT_MIN - TCL_INDEX_END) { /* These indices always indicate "before the beginning */ idx = before; } else { /* Encoded end-positive (or end+negative) are offset */ idx += TCL_INDEX_END; } /* TODO: Consider flag to suppress repeated end-offset parse. */ } else if (TCL_OK == TclGetIntForIndexM(interp, objPtr, 0, &idx)) { /* * Only reach this case when the index value is a * constant index arithmetic expression, and idx * holds the result. Treat it the same as if it were * parsed as an absolute integer value. */ goto integerEncode; } else { return TCL_ERROR; } *indexPtr = idx; return TCL_OK; } /* *---------------------------------------------------------------------- * * TclIndexDecode -- * * Decodes a value previously encoded by TclIndexEncode. The argument * endValue indicates what value of "end" should be used in the * decoding. * * Results: * The decoded index value. * *---------------------------------------------------------------------- */ int TclIndexDecode( int encoded, /* Value to decode */ int endValue) /* Meaning of "end" to use, > TCL_INDEX_END */ { if (encoded <= TCL_INDEX_END) { return (encoded - TCL_INDEX_END) + endValue; } return encoded; } /* *---------------------------------------------------------------------- * * ClearHash -- * * Remove all the entries in the hash table *tablePtr. |
︙ | ︙ |
Changes to library/msgcat/msgcat.tcl.
1 2 3 4 5 6 | # msgcat.tcl -- # # This file defines various procedures which implement a # message catalog facility for Tcl programs. It should be # loaded with the command "package require msgcat". # | | > | | > | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # msgcat.tcl -- # # This file defines various procedures which implement a # message catalog facility for Tcl programs. It should be # loaded with the command "package require msgcat". # # Copyright (c) 2010-2018 by Harald Oehlmann. # Copyright (c) 1998-2000 by Ajuba Solutions. # Copyright (c) 1998 by Mark Harrison. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # We use oo::define::self, which is new in Tcl 8.7 package require Tcl 8.7- # When the version number changes, be sure to update the pkgIndex.tcl file, # and the installation directory in the Makefiles. package provide msgcat 1.7.0 namespace eval msgcat { namespace export mc mcn mcexists mcload mclocale mcmax\ mcmset mcpreferences mcset\ mcunknown mcflset mcflmset mcloadedlocales mcforgetpackage\ mcpackagenamespaceget mcpackageconfig mcpackagelocale mcutil # Records the list of locales to search variable Loclist {} # List of currently loaded locales variable LoadedLocales {} |
︙ | ︙ | |||
37 38 39 40 41 42 43 | unknowncmd {} loadedlocales {} loclist {}] # Records the mapping between source strings and translated strings. The # dict key is of the form "<namespace> <locale> <src>", where locale and # namespace should be themselves dict values and the value is # the translated string. variable Msgs [dict create] | | > > > > > > | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | unknowncmd {} loadedlocales {} loclist {}] # Records the mapping between source strings and translated strings. The # dict key is of the form "<namespace> <locale> <src>", where locale and # namespace should be themselves dict values and the value is # the translated string. variable Msgs [dict create] } # create ensemble namespace for mcutil command namespace eval msgcat::mcutil { namespace export getsystemlocale getpreferences namespace ensemble create -prefix 0 # Map of language codes used in Windows registry to those of ISO-639 if {[info sharedlibextension] eq ".dll"} { variable WinRegToISO639 [dict create {*}{ 01 ar 0401 ar_SA 0801 ar_IQ 0c01 ar_EG 1001 ar_LY 1401 ar_DZ 1801 ar_MA 1c01 ar_TN 2001 ar_OM 2401 ar_YE 2801 ar_SY 2c01 ar_JO 3001 ar_LB 3401 ar_KW 3801 ar_AE 3c01 ar_BH 4001 ar_QA |
︙ | ︙ | |||
188 189 190 191 192 193 194 | # src The string to translate. # args Args to pass to the format command # # Results: # Returns the translated string. Propagates errors thrown by the # format command. | | > > | > > > > > > > > > > > > > > > > > > | | < | | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | # src The string to translate. # args Args to pass to the format command # # Results: # Returns the translated string. Propagates errors thrown by the # format command. proc msgcat::mc {args} { tailcall mcn [PackageNamespaceGet] {*}$args } # msgcat::mcn -- # # Find the translation for the given string based on the current # locale setting. Check the passed namespace first, then look in each # parent namespace until the source is found. If additional args are # specified, use the format command to work them into the traslated # string. # If no catalog item is found, mcunknown is called in the caller frame # and its result is returned. # # Arguments: # ns Package namespace of the translation # src The string to translate. # args Args to pass to the format command # # Results: # Returns the translated string. Propagates errors thrown by the # format command. proc msgcat::mcn {ns src args} { # Check for the src in each namespace starting from the local and # ending in the global. variable Msgs variable Loclist set loclist [PackagePreferences $ns] set nscur $ns while {$nscur != ""} { foreach loc $loclist { if {[dict exists $Msgs $nscur $loc $src]} { return [DefaultUnknown "" [dict get $Msgs $nscur $loc $src]\ {*}$args] } } set nscur [namespace parent $nscur] } # call package local or default unknown command set args [linsert $args 0 [lindex $loclist 0] $src] switch -exact -- [Invoke unknowncmd $args $ns result 1] { 0 { tailcall mcunknown {*}$args } 1 { return [DefaultUnknown {*}$args] } default { return $result } } } # msgcat::mcexists -- # |
︙ | ︙ | |||
241 242 243 244 245 246 247 | proc msgcat::mcexists {args} { variable Msgs variable Loclist variable PackageConfig | < < < > | > > > > | > | > > > > > | | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | proc msgcat::mcexists {args} { variable Msgs variable Loclist variable PackageConfig while {[llength $args] != 1} { set args [lassign $args option] switch -glob -- $option { -exactnamespace - -exactlocale { set $option 1 } -namespace { if {[llength $args] < 2} { return -code error\ "Argument missing for switch \"-namespace\"" } set args [lassign $args ns] } -* { return -code error "unknown option \"$option\"" } default { return -code error "wrong # args: should be\ \"[lindex [info level 0] 0] ?-exactnamespace?\ ?-exactlocale? ?-namespace ns? src\"" } } } set src [lindex $args 0] if {![info exists ns]} { set ns [PackageNamespaceGet] } set loclist [PackagePreferences $ns] if {[info exists -exactlocale]} { set loclist [lrange $loclist 0 0] } while {$ns ne ""} { foreach loc $loclist { if {[dict exists $Msgs $ns $loc $src]} { return 1 } } if {[info exists -exactnamespace]} {return 0} set ns [namespace parent $ns] } return 0 } # msgcat::mclocale -- # |
︙ | ︙ | |||
299 300 301 302 303 304 305 | if {$len == 1} { set newLocale [string tolower [lindex $args 0]] if {$newLocale ne [file tail $newLocale]} { return -code error "invalid newLocale value \"$newLocale\":\ could be path to unsafe code." } | < < | < < < < < | > > | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | if {$len == 1} { set newLocale [string tolower [lindex $args 0]] if {$newLocale ne [file tail $newLocale]} { return -code error "invalid newLocale value \"$newLocale\":\ could be path to unsafe code." } mcpreferences {*}[mcutil getpreferences $newLocale] } return [lindex $Loclist 0] } # msgcat::mcutil::getpreferences -- # # Get list of locales from a locale. # The first element is always the lowercase locale. # Other elements have one component separated by "_" less. # Multiple "_" are seen as one separator: de__ch_spec de__ch de {} # # This method is part of the ensemble mcutil # # Arguments: # Locale. # # Results: # Locale list proc msgcat::mcutil::getpreferences {locale} { set locale [string tolower $locale] set loclist [list $locale] while {-1 !=[set pos [string last "_" $locale]]} { set locale [string range $locale 0 $pos-1] if { "_" ne [string index $locale end] } { lappend loclist $locale } } if {"" ne [lindex $loclist end]} { lappend loclist {} } return $loclist } # msgcat::mcpreferences -- # # Fetch the list of locales used to look up strings, ordered from # most preferred to least preferred. # # Arguments: # New location list # # Results: # Returns an ordered list of the locales preferred by the user. proc msgcat::mcpreferences {args} { variable Loclist if {[llength $args] > 0} { # args is the new loclist if {![ListEqualString $args $Loclist]} { set Loclist $args # locale not loaded jet LoadAll $Loclist # Invoke callback Invoke changecmd $Loclist } } return $Loclist } # msgcat::ListStringEqual -- # # Compare two strings for equal string contents # # Arguments: # list1 first list # list2 second list # # Results: # 1 if lists of strings are identical, 0 otherwise proc msgcat::ListEqualString {list1 list2} { if {[llength $list1] != [llength $list2]} { return 0 } foreach item1 $list1 item2 $list2 { if {$item1 ne $item2} { return 0 } } return 1 } # msgcat::mcloadedlocales -- # # Get or change the list of currently loaded default locales # # The following subcommands are available: # loaded |
︙ | ︙ | |||
438 439 440 441 442 443 444 | # Arguments: # subcommand see list above # locale package locale (only set subcommand) # # Results: # Empty string, if not stated differently for the subcommand | | | < < < < < | | | | < < | < > > > > > > | > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > | > | | | | > | > < < < > > > | | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | # Arguments: # subcommand see list above # locale package locale (only set subcommand) # # Results: # Empty string, if not stated differently for the subcommand proc msgcat::mcpackagelocale {subcommand args} { # todo: implement using an ensemble variable Loclist variable LoadedLocales variable Msgs variable PackageConfig # Check option # check if required item is exactly provided if { [llength $args] > 0 && $subcommand in {"get" "isset" "unset" "loaded" "clear"} } { return -code error "wrong # args: should be\ \"[lrange [info level 0] 0 1]\"" } set ns [PackageNamespaceGet] switch -exact -- $subcommand { get { return [lindex [PackagePreferences $ns] 0] } loaded { return [PackageLocales $ns] } present { if {[llength $args] != 1} { return -code error "wrong # args: should be\ \"[lrange [info level 0] 0 1] locale\"" } return [expr {[string tolower [lindex $args 0]] in [PackageLocales $ns]} ] } isset { return [dict exists $PackageConfig loclist $ns] } set - preferences { # set a package locale or add a package locale set fSet [expr {$subcommand eq "set"}] # Check parameter if {$fSet && 1 < [llength $args] } { return -code error "wrong # args: should be\ \"[lrange [info level 0] 0 1] ?locale?\"" } # > Return preferences if no parameter if {!$fSet && 0 == [llength $args] } { return [PackagePreferences $ns] } # Copy the default locale if no package locale set so far if {![dict exists $PackageConfig loclist $ns]} { dict set PackageConfig loclist $ns $Loclist dict set PackageConfig loadedlocales $ns $LoadedLocales } # No argument for set: return current package locale # The difference to no argument and subcommand "preferences" is, # that "preferences" does not set the package locale property. # This case is processed above, so no check for fSet here if { 0 == [llength $args] } { return [lindex [dict get $PackageConfig loclist $ns] 0] } # Get new loclist if {$fSet} { set loclist [mcutil getpreferences [lindex $args 0]] } else { set loclist $args } # Check if not changed to return imediately if { [ListEqualString $loclist\ [dict get $PackageConfig loclist $ns]] } { if {$fSet} { return [lindex $loclist 0] } return $loclist } # Change loclist dict set PackageConfig loclist $ns $loclist # load eventual missing locales set loadedLocales [dict get $PackageConfig loadedlocales $ns] set loadLocales [ListComplement $loadedLocales $loclist] dict set PackageConfig loadedlocales $ns\ [concat $loadedLocales $loadLocales] Load $ns $loadLocales if {$fSet} { return [lindex $loclist 0] } return $loclist } clear { # Remove all locales not contained in Loclist if {![dict exists $PackageConfig loclist $ns]} { return -code error "clear only when package locale set" } set loclist [dict get $PackageConfig loclist $ns] dict set PackageConfig loadedlocales $ns $loclist |
︙ | ︙ | |||
547 548 549 550 551 552 553 | # Remove any data of the calling package from msgcat # proc msgcat::mcforgetpackage {} { # todo: this may be implemented using an ensemble variable PackageConfig variable Msgs | | > > > > > > > > > | 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | # Remove any data of the calling package from msgcat # proc msgcat::mcforgetpackage {} { # todo: this may be implemented using an ensemble variable PackageConfig variable Msgs set ns [PackageNamespaceGet] # Remove MC items dict unset Msgs $ns # Remove config items foreach key [dict keys $PackageConfig] { dict unset PackageConfig $key $ns } return } # msgcat::mcgetmynamespace -- # # Return the package namespace of the caller # This consideres to be called from a class or object. proc msgcat::mcpackagenamespaceget {} { return [PackageNamespaceGet] } # msgcat::mcpackageconfig -- # # Get or modify the per caller namespace (e.g. packages) config options. # # Available subcommands are: # |
︙ | ︙ | |||
612 613 614 615 616 617 618 | # # Results: # Depends on the subcommand and option and is described there proc msgcat::mcpackageconfig {subcommand option {value ""}} { variable PackageConfig # get namespace | | | 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | # # Results: # Depends on the subcommand and option and is described there proc msgcat::mcpackageconfig {subcommand option {value ""}} { variable PackageConfig # get namespace set ns [PackageNamespaceGet] if {$option ni {"mcfolder" "loadcmd" "changecmd" "unknowncmd"}} { return -code error "bad option \"$option\": must be mcfolder, loadcmd,\ changecmd, or unknowncmd" } # check if value argument is exactly provided |
︙ | ︙ | |||
752 753 754 755 756 757 758 | # Arguments: # langdir The directory to search. # # Results: # Returns the number of message catalogs that were loaded. proc msgcat::mcload {langdir} { | < | | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 | # Arguments: # langdir The directory to search. # # Results: # Returns the number of message catalogs that were loaded. proc msgcat::mcload {langdir} { tailcall mcpackageconfig set mcfolder $langdir } # msgcat::LoadAll -- # # Load a list of locales for all packages not having a package locale # list. # |
︙ | ︙ | |||
919 920 921 922 923 924 925 | proc msgcat::mcset {locale src {dest ""}} { variable Msgs if {[llength [info level 0]] == 3} { ;# dest not specified set dest $src } | | | 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | proc msgcat::mcset {locale src {dest ""}} { variable Msgs if {[llength [info level 0]] == 3} { ;# dest not specified set dest $src } set ns [PackageNamespaceGet] set locale [string tolower $locale] dict set Msgs $ns $locale $src $dest return $dest } |
︙ | ︙ | |||
947 948 949 950 951 952 953 | variable FileLocale variable Msgs if {![info exists FileLocale]} { return -code error "must only be used inside a message catalog loaded\ with ::msgcat::mcload" } | | | 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 | variable FileLocale variable Msgs if {![info exists FileLocale]} { return -code error "must only be used inside a message catalog loaded\ with ::msgcat::mcload" } tailcall mcset $FileLocale $src $dest } # msgcat::mcmset -- # # Set the translation for multiple strings in a specified locale. # # Arguments: |
︙ | ︙ | |||
971 972 973 974 975 976 977 | set length [llength $pairs] if {$length % 2} { return -code error "bad translation list:\ should be \"[lindex [info level 0] 0] locale {src dest ...}\"" } set locale [string tolower $locale] | | | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | set length [llength $pairs] if {$length % 2} { return -code error "bad translation list:\ should be \"[lindex [info level 0] 0] locale {src dest ...}\"" } set locale [string tolower $locale] set ns [PackageNamespaceGet] foreach {src dest} $pairs { dict set Msgs $ns $locale $src $dest } return [expr {$length / 2}] } |
︙ | ︙ | |||
998 999 1000 1001 1002 1003 1004 | variable FileLocale variable Msgs if {![info exists FileLocale]} { return -code error "must only be used inside a message catalog loaded\ with ::msgcat::mcload" } | | | 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 | variable FileLocale variable Msgs if {![info exists FileLocale]} { return -code error "must only be used inside a message catalog loaded\ with ::msgcat::mcload" } tailcal mcmset $FileLocale $pairs } # msgcat::mcunknown -- # # This routine is called by msgcat::mc if a translation cannot # be found for a string and no unknowncmd is set for the current # package. This routine is intended to be replaced |
︙ | ︙ | |||
1020 1021 1022 1023 1024 1025 1026 | # src The string to be translated. # args Args to pass to the format command # # Results: # Returns the translated value. proc msgcat::mcunknown {args} { | | | 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | # src The string to be translated. # args Args to pass to the format command # # Results: # Returns the translated value. proc msgcat::mcunknown {args} { tailcall DefaultUnknown {*}$args } # msgcat::DefaultUnknown -- # # This routine is called by msgcat::mc if a translation cannot # be found for a string in the following circumstances: # - Default global handler, if mcunknown is not redefined. |
︙ | ︙ | |||
1063 1064 1065 1066 1067 1068 1069 1070 | # args strings to translate. # # Results: # Returns the length of the longest translated string. proc msgcat::mcmax {args} { set max 0 foreach string $args { | > | | | 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | # args strings to translate. # # Results: # Returns the length of the longest translated string. proc msgcat::mcmax {args} { set max 0 set ns [PackageNamespaceGet] foreach string $args { set translated [uplevel 1 [list [namespace origin mcn] $ns $string]] set len [string length $translated] if {$len>$max} { set max $len } } return $max } # Convert the locale values stored in environment variables to a form # suitable for passing to [mclocale] proc msgcat::mcutil::ConvertLocale {value} { # Assume $value is of form: $language[_$territory][.$codeset][@modifier] # Convert to form: $language[_$territory][_$modifier] # # Comment out expanded RE version -- bugs alleged # regexp -expanded { # ^ # Match all the way to the beginning # ([^_.@]*) # Match "lanugage"; ends with _, ., or @ |
︙ | ︙ | |||
1102 1103 1104 1105 1106 1107 1108 1109 | } if {[string length $modifier]} { append ret _$modifier } return $ret } # Initialize the default locale | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | < | < | < | < | < | | 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 | } if {[string length $modifier]} { append ret _$modifier } return $ret } # helper function to find package namespace of stack-frame -2 # There are 4 possibilities: # - called from a proc # - called within a class definition script # - called from an class defined oo object # - called from a classless oo object proc ::msgcat::PackageNamespaceGet {} { uplevel 2 { # Check self namespace to determine environment switch -exact -- [namespace which self] { {::oo::define::self} { # We are within a class definition return [namespace qualifiers [self]] } {::oo::Helpers::self} { # We are within an object set Class [info object class [self]] # Check for classless defined object if {$Class eq {::oo::object}} { return [namespace qualifiers [self]] } # Class defined object return [namespace qualifiers $Class] } default { # Not in object environment return [namespace current] } } } } # Initialize the default locale proc msgcat::mcutil::getsystemlocale {} { global env # # set default locale, try to get from environment # foreach varName {LC_ALL LC_MESSAGES LANG} { if {[info exists env($varName)] && ("" ne $env($varName))} { if {![catch { ConvertLocale $env($varName) } locale]} { return $locale } } } # # On Darwin, fallback to current CFLocale identifier if available. # if {[info exists ::tcl::mac::locale] && $::tcl::mac::locale ne ""} { if {![catch { ConvertLocale $::tcl::mac::locale } locale]} { return $locale } } # # The rest of this routine is special processing for Windows or # Cygwin. All other platforms, get out now. # if {([info sharedlibextension] ne ".dll") || [catch {package require registry}]} { return C } # # On Windows or Cygwin, try to set locale depending on registry # settings, or fall back on locale of "C". # # On Vista and later: |
︙ | ︙ | |||
1166 1167 1168 1169 1170 1171 1172 | if {"" ne $territory} { append locale _ $territory } set modifierDict [dict create latn latin cyrl cyrillic] if {[dict exists $modifierDict $script]} { append locale @ [dict get $modifierDict $script] } | | | < | | | | | | | 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 | if {"" ne $territory} { append locale _ $territory } set modifierDict [dict create latn latin cyrl cyrillic] if {[dict exists $modifierDict $script]} { append locale @ [dict get $modifierDict $script] } if {![catch {ConvertLocale $locale} locale]} { return $locale } } } # then check value locale which contains a numerical language ID if {[catch { set locale [registry get $key "locale"] }]} { return C } # # Keep trying to match against smaller and smaller suffixes # of the registry value, since the latter hexadigits appear # to determine general language and earlier hexadigits determine # more precise information, such as territory. For example, # 0409 - English - United States # 0809 - English - United Kingdom # Add more translations to the WinRegToISO639 array above. # variable WinRegToISO639 set locale [string tolower $locale] while {[string length $locale]} { if {![catch { ConvertLocale [dict get $WinRegToISO639 $locale] } localeOut]} { return $localeOut } set locale [string range $locale 1 end] } # # No translation known. Fall back on "C" locale # return C } msgcat::mclocale [msgcat::mcutil getsystemlocale] |
Changes to library/msgcat/pkgIndex.tcl.
|
| | | | 1 2 | if {![package vsatisfies [package provide Tcl] 8.7-]} {return} package ifneeded msgcat 1.7.0 [list source [file join $dir msgcat.tcl]] |
Changes to library/tzdata/Africa/Accra.
1 2 3 4 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Accra) { {-9223372036854775808 -52 0 LMT} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Accra) { {-9223372036854775808 -52 0 LMT} {-1640995148 0 0 GMT} {-1556841600 1200 1 GMT} {-1546388400 0 0 GMT} {-1525305600 1200 1 GMT} {-1514852400 0 0 GMT} {-1493769600 1200 1 GMT} {-1483316400 0 0 GMT} {-1462233600 1200 1 GMT} {-1451780400 0 0 GMT} {-1430611200 1200 1 GMT} {-1420158000 0 0 GMT} {-1399075200 1200 1 GMT} {-1388622000 0 0 GMT} {-1367539200 1200 1 GMT} {-1357086000 0 0 GMT} {-1336003200 1200 1 GMT} {-1325550000 0 0 GMT} {-1304380800 1200 1 GMT} {-1293927600 0 0 GMT} {-1272844800 1200 1 GMT} {-1262391600 0 0 GMT} {-1241308800 1200 1 GMT} {-1230855600 0 0 GMT} {-1209772800 1200 1 GMT} {-1199319600 0 0 GMT} {-1178150400 1200 1 GMT} {-1167697200 0 0 GMT} {-1146614400 1200 1 GMT} {-1136161200 0 0 GMT} {-1115078400 1200 1 GMT} {-1104625200 0 0 GMT} {-1083542400 1200 1 GMT} {-1073089200 0 0 GMT} {-1051920000 1200 1 GMT} {-1041466800 0 0 GMT} {-1020384000 1200 1 GMT} {-1009930800 0 0 GMT} {-988848000 1200 1 GMT} {-978394800 0 0 GMT} {-957312000 1200 1 GMT} {-946858800 0 0 GMT} {-925689600 1200 1 GMT} {-915236400 0 0 GMT} {-894153600 1200 1 GMT} {-883700400 0 0 GMT} {-862617600 1200 1 GMT} {-852164400 0 0 GMT} } |
Changes to library/tzdata/Africa/Bissau.
1 2 3 4 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Bissau) { {-9223372036854775808 -3740 0 LMT} | | | 1 2 3 4 5 6 7 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Bissau) { {-9223372036854775808 -3740 0 LMT} {-1830380400 -3600 0 -01} {157770000 0 0 GMT} } |
Changes to library/tzdata/Africa/Sao_Tome.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Sao_Tome) { {-9223372036854775808 1616 0 LMT} {-2713912016 -2205 0 LMT} | | | 1 2 3 4 5 6 7 8 | # created by tools/tclZIC.tcl - do not edit set TZData(:Africa/Sao_Tome) { {-9223372036854775808 1616 0 LMT} {-2713912016 -2205 0 LMT} {-1830384000 0 0 GMT} {1514768400 3600 0 WAT} } |
Changes to library/tzdata/America/Araguaina.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Araguaina) { {-9223372036854775808 -11568 0 LMT} {-1767214032 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Araguaina) { {-9223372036854775808 -11568 0 LMT} {-1767214032 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {653536800 -10800 0 -03} {811047600 -10800 0 -03} {813726000 -7200 1 -03} {824004000 -10800 0 -03} {844570800 -7200 1 -03} {856058400 -10800 0 -03} {876106800 -7200 1 -03} {888717600 -10800 0 -03} {908074800 -7200 1 -03} {919562400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {982461600 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1036292400 -7200 1 -03} {1045360800 -10800 0 -03} {1064368800 -10800 0 -03} {1350788400 -7200 0 -03} {1361066400 -10800 0 -03} {1378000800 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Buenos_Aires.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Buenos_Aires) { {-9223372036854775808 -14028 0 LMT} {-2372097972 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Buenos_Aires) { {-9223372036854775808 -14028 0 LMT} {-2372097972 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -10800 0 -03} {687927600 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224385200 -7200 1 -03} {1237082400 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Catamarca.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Catamarca) { {-9223372036854775808 -15788 0 LMT} {-2372096212 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Catamarca) { {-9223372036854775808 -15788 0 LMT} {-2372096212 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -14400 0 -04} {687931200 -7200 0 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1086058800 -14400 0 -04} {1087704000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Cordoba.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Cordoba) { {-9223372036854775808 -15408 0 LMT} {-2372096592 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Cordoba) { {-9223372036854775808 -15408 0 LMT} {-2372096592 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -14400 0 -04} {687931200 -7200 0 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224385200 -7200 1 -03} {1237082400 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Jujuy.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Jujuy) { {-9223372036854775808 -15672 0 LMT} {-2372096328 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Jujuy) { {-9223372036854775808 -15672 0 LMT} {-2372096328 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {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 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/La_Rioja.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/La_Rioja) { {-9223372036854775808 -16044 0 LMT} {-2372095956 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/La_Rioja) { {-9223372036854775808 -16044 0 LMT} {-2372095956 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667792800 -14400 0 -04} {673588800 -10800 0 -03} {687927600 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1086058800 -14400 0 -04} {1087704000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Mendoza.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Mendoza) { {-9223372036854775808 -16516 0 LMT} {-2372095484 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Mendoza) { {-9223372036854775808 -16516 0 LMT} {-2372095484 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -14400 0 -04} {655963200 -10800 1 -03} {667796400 -14400 0 -04} {687499200 -10800 1 -03} {699418800 -14400 0 -04} {719380800 -7200 0 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1085281200 -14400 0 -04} {1096171200 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Rio_Gallegos.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Rio_Gallegos) { {-9223372036854775808 -16612 0 LMT} {-2372095388 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Rio_Gallegos) { {-9223372036854775808 -16612 0 LMT} {-2372095388 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -10800 0 -03} {687927600 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1086058800 -14400 0 -04} {1087704000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Salta.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Salta) { {-9223372036854775808 -15700 0 LMT} {-2372096300 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Salta) { {-9223372036854775808 -15700 0 LMT} {-2372096300 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -14400 0 -04} {687931200 -7200 0 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/San_Juan.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/San_Juan) { {-9223372036854775808 -16444 0 LMT} {-2372095556 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/San_Juan) { {-9223372036854775808 -16444 0 LMT} {-2372095556 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667792800 -14400 0 -04} {673588800 -10800 0 -03} {687927600 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1085972400 -14400 0 -04} {1090728000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/San_Luis.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/San_Luis) { {-9223372036854775808 -15924 0 LMT} {-2372096076 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/San_Luis) { {-9223372036854775808 -15924 0 LMT} {-2372096076 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {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 -03} {1200880800 -10800 0 -04} {1205031600 -14400 0 -04} {1223784000 -10800 1 -04} {1236481200 -14400 0 -04} {1255233600 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Tucuman.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Tucuman) { {-9223372036854775808 -15652 0 LMT} {-2372096348 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Tucuman) { {-9223372036854775808 -15652 0 LMT} {-2372096348 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -14400 0 -04} {687931200 -7200 0 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1086058800 -14400 0 -04} {1087099200 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224385200 -7200 1 -03} {1237082400 -10800 0 -03} } |
Changes to library/tzdata/America/Argentina/Ushuaia.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Ushuaia) { {-9223372036854775808 -16392 0 LMT} {-2372095608 -15408 0 CMT} {-1567453392 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Argentina/Ushuaia) { {-9223372036854775808 -16392 0 LMT} {-2372095608 -15408 0 CMT} {-1567453392 -14400 0 -04} {-1233432000 -10800 0 -04} {-1222981200 -14400 0 -04} {-1205956800 -10800 1 -04} {-1194037200 -14400 0 -04} {-1172865600 -10800 1 -04} {-1162501200 -14400 0 -04} {-1141329600 -10800 1 -04} {-1130965200 -14400 0 -04} {-1109793600 -10800 1 -04} {-1099429200 -14400 0 -04} {-1078257600 -10800 1 -04} {-1067806800 -14400 0 -04} {-1046635200 -10800 1 -04} {-1036270800 -14400 0 -04} {-1015099200 -10800 1 -04} {-1004734800 -14400 0 -04} {-983563200 -10800 1 -04} {-973198800 -14400 0 -04} {-952027200 -10800 1 -04} {-941576400 -14400 0 -04} {-931032000 -10800 1 -04} {-900882000 -14400 0 -04} {-890337600 -10800 1 -04} {-833749200 -14400 0 -04} {-827265600 -10800 1 -04} {-752274000 -14400 0 -04} {-733780800 -10800 1 -04} {-197326800 -14400 0 -04} {-190843200 -10800 1 -04} {-184194000 -14400 0 -04} {-164491200 -10800 1 -04} {-152658000 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {596948400 -7200 1 -03} {605066400 -10800 0 -03} {624423600 -7200 1 -03} {636516000 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -10800 0 -03} {687927600 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {731469600 -10800 0 -03} {938916000 -10800 0 -04} {938919600 -10800 1 -04} {952056000 -10800 0 -03} {1085886000 -14400 0 -04} {1087704000 -10800 0 -03} {1198983600 -7200 1 -03} {1205632800 -10800 0 -03} {1224295200 -10800 0 -03} } |
Changes to library/tzdata/America/Asuncion.
1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Asuncion) { {-9223372036854775808 -13840 0 LMT} {-2524507760 -13840 0 AMT} {-1206389360 -14400 0 -04} {86760000 -10800 0 -03} {134017200 -14400 0 -04} {162878400 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Asuncion) { {-9223372036854775808 -13840 0 LMT} {-2524507760 -13840 0 AMT} {-1206389360 -14400 0 -04} {86760000 -10800 0 -03} {134017200 -14400 0 -04} {162878400 -14400 0 -04} {181368000 -10800 1 -04} {194497200 -14400 0 -04} {212990400 -10800 1 -04} {226033200 -14400 0 -04} {244526400 -10800 1 -04} {257569200 -14400 0 -04} {276062400 -10800 1 -04} {291783600 -14400 0 -04} {307598400 -10800 1 -04} {323406000 -14400 0 -04} {339220800 -10800 1 -04} {354942000 -14400 0 -04} {370756800 -10800 1 -04} {386478000 -14400 0 -04} {402292800 -10800 1 -04} {418014000 -14400 0 -04} {433828800 -10800 1 -04} {449636400 -14400 0 -04} {465451200 -10800 1 -04} {481172400 -14400 0 -04} {496987200 -10800 1 -04} {512708400 -14400 0 -04} {528523200 -10800 1 -04} {544244400 -14400 0 -04} {560059200 -10800 1 -04} {575866800 -14400 0 -04} {591681600 -10800 1 -04} {607402800 -14400 0 -04} {625032000 -10800 1 -04} {638938800 -14400 0 -04} {654753600 -10800 1 -04} {670474800 -14400 0 -04} {686721600 -10800 1 -04} {699418800 -14400 0 -04} {718257600 -10800 1 -04} {733546800 -14400 0 -04} {749448000 -10800 1 -04} {762318000 -14400 0 -04} {780984000 -10800 1 -04} {793767600 -14400 0 -04} {812520000 -10800 1 -04} {825649200 -14400 0 -04} {844574400 -10800 1 -04} {856666800 -14400 0 -04} {876024000 -10800 1 -04} {888721200 -14400 0 -04} {907473600 -10800 1 -04} {920775600 -14400 0 -04} {938923200 -10800 1 -04} {952225200 -14400 0 -04} {970372800 -10800 1 -04} {983674800 -14400 0 -04} {1002427200 -10800 1 -04} {1018148400 -14400 0 -04} {1030852800 -10800 1 -04} {1049598000 -14400 0 -04} {1062907200 -10800 1 -04} {1081047600 -14400 0 -04} {1097985600 -10800 1 -04} {1110682800 -14400 0 -04} {1129435200 -10800 1 -04} {1142132400 -14400 0 -04} {1160884800 -10800 1 -04} {1173582000 -14400 0 -04} {1192939200 -10800 1 -04} {1205031600 -14400 0 -04} {1224388800 -10800 1 -04} {1236481200 -14400 0 -04} {1255838400 -10800 1 -04} {1270954800 -14400 0 -04} {1286078400 -10800 1 -04} {1302404400 -14400 0 -04} {1317528000 -10800 1 -04} {1333854000 -14400 0 -04} {1349582400 -10800 1 -04} {1364094000 -14400 0 -04} {1381032000 -10800 1 -04} {1395543600 -14400 0 -04} {1412481600 -10800 1 -04} {1426993200 -14400 0 -04} {1443931200 -10800 1 -04} {1459047600 -14400 0 -04} {1475380800 -10800 1 -04} {1490497200 -14400 0 -04} {1506830400 -10800 1 -04} {1521946800 -14400 0 -04} {1538884800 -10800 1 -04} {1553396400 -14400 0 -04} {1570334400 -10800 1 -04} {1584846000 -14400 0 -04} {1601784000 -10800 1 -04} {1616900400 -14400 0 -04} {1633233600 -10800 1 -04} {1648350000 -14400 0 -04} {1664683200 -10800 1 -04} {1679799600 -14400 0 -04} {1696132800 -10800 1 -04} {1711249200 -14400 0 -04} {1728187200 -10800 1 -04} {1742698800 -14400 0 -04} {1759636800 -10800 1 -04} {1774148400 -14400 0 -04} {1791086400 -10800 1 -04} {1806202800 -14400 0 -04} {1822536000 -10800 1 -04} {1837652400 -14400 0 -04} {1853985600 -10800 1 -04} {1869102000 -14400 0 -04} {1886040000 -10800 1 -04} {1900551600 -14400 0 -04} {1917489600 -10800 1 -04} {1932001200 -14400 0 -04} {1948939200 -10800 1 -04} {1964055600 -14400 0 -04} {1980388800 -10800 1 -04} {1995505200 -14400 0 -04} {2011838400 -10800 1 -04} {2026954800 -14400 0 -04} {2043288000 -10800 1 -04} {2058404400 -14400 0 -04} {2075342400 -10800 1 -04} {2089854000 -14400 0 -04} {2106792000 -10800 1 -04} {2121303600 -14400 0 -04} {2138241600 -10800 1 -04} {2153358000 -14400 0 -04} {2169691200 -10800 1 -04} {2184807600 -14400 0 -04} {2201140800 -10800 1 -04} {2216257200 -14400 0 -04} {2233195200 -10800 1 -04} {2247706800 -14400 0 -04} {2264644800 -10800 1 -04} {2279156400 -14400 0 -04} {2296094400 -10800 1 -04} {2310606000 -14400 0 -04} {2327544000 -10800 1 -04} {2342660400 -14400 0 -04} {2358993600 -10800 1 -04} {2374110000 -14400 0 -04} {2390443200 -10800 1 -04} {2405559600 -14400 0 -04} {2422497600 -10800 1 -04} {2437009200 -14400 0 -04} {2453947200 -10800 1 -04} {2468458800 -14400 0 -04} {2485396800 -10800 1 -04} {2500513200 -14400 0 -04} {2516846400 -10800 1 -04} {2531962800 -14400 0 -04} {2548296000 -10800 1 -04} {2563412400 -14400 0 -04} {2579745600 -10800 1 -04} {2594862000 -14400 0 -04} {2611800000 -10800 1 -04} {2626311600 -14400 0 -04} {2643249600 -10800 1 -04} {2657761200 -14400 0 -04} {2674699200 -10800 1 -04} {2689815600 -14400 0 -04} {2706148800 -10800 1 -04} {2721265200 -14400 0 -04} {2737598400 -10800 1 -04} {2752714800 -14400 0 -04} {2769652800 -10800 1 -04} {2784164400 -14400 0 -04} {2801102400 -10800 1 -04} {2815614000 -14400 0 -04} {2832552000 -10800 1 -04} {2847668400 -14400 0 -04} {2864001600 -10800 1 -04} {2879118000 -14400 0 -04} {2895451200 -10800 1 -04} {2910567600 -14400 0 -04} {2926900800 -10800 1 -04} {2942017200 -14400 0 -04} {2958955200 -10800 1 -04} {2973466800 -14400 0 -04} {2990404800 -10800 1 -04} {3004916400 -14400 0 -04} {3021854400 -10800 1 -04} {3036970800 -14400 0 -04} {3053304000 -10800 1 -04} {3068420400 -14400 0 -04} {3084753600 -10800 1 -04} {3099870000 -14400 0 -04} {3116808000 -10800 1 -04} {3131319600 -14400 0 -04} {3148257600 -10800 1 -04} {3162769200 -14400 0 -04} {3179707200 -10800 1 -04} {3194218800 -14400 0 -04} {3211156800 -10800 1 -04} {3226273200 -14400 0 -04} {3242606400 -10800 1 -04} {3257722800 -14400 0 -04} {3274056000 -10800 1 -04} {3289172400 -14400 0 -04} {3306110400 -10800 1 -04} {3320622000 -14400 0 -04} {3337560000 -10800 1 -04} {3352071600 -14400 0 -04} {3369009600 -10800 1 -04} {3384126000 -14400 0 -04} {3400459200 -10800 1 -04} {3415575600 -14400 0 -04} {3431908800 -10800 1 -04} {3447025200 -14400 0 -04} {3463358400 -10800 1 -04} {3478474800 -14400 0 -04} {3495412800 -10800 1 -04} {3509924400 -14400 0 -04} {3526862400 -10800 1 -04} {3541374000 -14400 0 -04} {3558312000 -10800 1 -04} {3573428400 -14400 0 -04} {3589761600 -10800 1 -04} {3604878000 -14400 0 -04} {3621211200 -10800 1 -04} {3636327600 -14400 0 -04} {3653265600 -10800 1 -04} {3667777200 -14400 0 -04} {3684715200 -10800 1 -04} {3699226800 -14400 0 -04} {3716164800 -10800 1 -04} {3731281200 -14400 0 -04} {3747614400 -10800 1 -04} {3762730800 -14400 0 -04} {3779064000 -10800 1 -04} {3794180400 -14400 0 -04} {3810513600 -10800 1 -04} {3825630000 -14400 0 -04} {3842568000 -10800 1 -04} {3857079600 -14400 0 -04} {3874017600 -10800 1 -04} {3888529200 -14400 0 -04} {3905467200 -10800 1 -04} {3920583600 -14400 0 -04} {3936916800 -10800 1 -04} {3952033200 -14400 0 -04} {3968366400 -10800 1 -04} {3983482800 -14400 0 -04} {4000420800 -10800 1 -04} {4014932400 -14400 0 -04} {4031870400 -10800 1 -04} {4046382000 -14400 0 -04} {4063320000 -10800 1 -04} {4077831600 -14400 0 -04} {4094769600 -10800 1 -04} } |
Changes to library/tzdata/America/Bahia.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Bahia) { {-9223372036854775808 -9244 0 LMT} {-1767216356 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Bahia) { {-9223372036854775808 -9244 0 LMT} {-1767216356 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {656478000 -7200 1 -03} {666756000 -10800 0 -03} {687927600 -7200 1 -03} {697600800 -10800 0 -03} {719982000 -7200 1 -03} {728445600 -10800 0 -03} {750826800 -7200 1 -03} {761709600 -10800 0 -03} {782276400 -7200 1 -03} {793159200 -10800 0 -03} {813726000 -7200 1 -03} {824004000 -10800 0 -03} {844570800 -7200 1 -03} {856058400 -10800 0 -03} {876106800 -7200 1 -03} {888717600 -10800 0 -03} {908074800 -7200 1 -03} {919562400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {982461600 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1036292400 -7200 1 -03} {1045360800 -10800 0 -03} {1064368800 -10800 0 -03} {1318734000 -7200 0 -03} {1330221600 -10800 0 -03} {1350784800 -10800 0 -03} } |
Changes to library/tzdata/America/Belem.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Belem) { {-9223372036854775808 -11636 0 LMT} {-1767213964 -10800 0 -03} | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Belem) { {-9223372036854775808 -11636 0 LMT} {-1767213964 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {590032800 -10800 0 -03} } |
Changes to library/tzdata/America/Boa_Vista.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Boa_Vista) { {-9223372036854775808 -14560 0 LMT} {-1767211040 -14400 0 -04} | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Boa_Vista) { {-9223372036854775808 -14560 0 LMT} {-1767211040 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {590036400 -14400 0 -04} {938664000 -14400 0 -04} {938923200 -10800 1 -04} {951620400 -14400 0 -04} {970977600 -10800 1 -04} {971578800 -14400 0 -04} } |
Changes to library/tzdata/America/Bogota.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Bogota) { {-9223372036854775808 -17776 0 LMT} {-2707671824 -17776 0 BMT} {-1739041424 -18000 0 -05} | | | 1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Bogota) { {-9223372036854775808 -17776 0 LMT} {-2707671824 -17776 0 BMT} {-1739041424 -18000 0 -05} {704869200 -14400 1 -05} {733896000 -18000 0 -05} } |
Changes to library/tzdata/America/Campo_Grande.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Campo_Grande) { {-9223372036854775808 -13108 0 LMT} {-1767212492 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Campo_Grande) { {-9223372036854775808 -13108 0 LMT} {-1767212492 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {592977600 -10800 1 -04} {602046000 -14400 0 -04} {624427200 -10800 1 -04} {634705200 -14400 0 -04} {656481600 -10800 1 -04} {666759600 -14400 0 -04} {687931200 -10800 1 -04} {697604400 -14400 0 -04} {719985600 -10800 1 -04} {728449200 -14400 0 -04} {750830400 -10800 1 -04} {761713200 -14400 0 -04} {782280000 -10800 1 -04} {793162800 -14400 0 -04} {813729600 -10800 1 -04} {824007600 -14400 0 -04} {844574400 -10800 1 -04} {856062000 -14400 0 -04} {876110400 -10800 1 -04} {888721200 -14400 0 -04} {908078400 -10800 1 -04} {919566000 -14400 0 -04} {938923200 -10800 1 -04} {951620400 -14400 0 -04} {970977600 -10800 1 -04} {982465200 -14400 0 -04} {1003032000 -10800 1 -04} {1013914800 -14400 0 -04} {1036296000 -10800 1 -04} {1045364400 -14400 0 -04} {1066536000 -10800 1 -04} {1076814000 -14400 0 -04} {1099368000 -10800 1 -04} {1108868400 -14400 0 -04} {1129435200 -10800 1 -04} {1140318000 -14400 0 -04} {1162699200 -10800 1 -04} {1172372400 -14400 0 -04} {1192334400 -10800 1 -04} {1203217200 -14400 0 -04} {1224388800 -10800 1 -04} {1234666800 -14400 0 -04} {1255838400 -10800 1 -04} {1266721200 -14400 0 -04} {1287288000 -10800 1 -04} {1298170800 -14400 0 -04} {1318737600 -10800 1 -04} {1330225200 -14400 0 -04} {1350792000 -10800 1 -04} {1361070000 -14400 0 -04} {1382241600 -10800 1 -04} {1392519600 -14400 0 -04} {1413691200 -10800 1 -04} {1424574000 -14400 0 -04} {1445140800 -10800 1 -04} {1456023600 -14400 0 -04} {1476590400 -10800 1 -04} {1487473200 -14400 0 -04} {1508040000 -10800 1 -04} {1518922800 -14400 0 -04} {1541304000 -10800 1 -04} {1550372400 -14400 0 -04} {1572753600 -10800 1 -04} {1581822000 -14400 0 -04} {1604203200 -10800 1 -04} {1613876400 -14400 0 -04} {1636257600 -10800 1 -04} {1645326000 -14400 0 -04} {1667707200 -10800 1 -04} {1677380400 -14400 0 -04} {1699156800 -10800 1 -04} {1708225200 -14400 0 -04} {1730606400 -10800 1 -04} {1739674800 -14400 0 -04} {1762056000 -10800 1 -04} {1771729200 -14400 0 -04} {1793505600 -10800 1 -04} {1803178800 -14400 0 -04} {1825560000 -10800 1 -04} {1834628400 -14400 0 -04} {1857009600 -10800 1 -04} {1866078000 -14400 0 -04} {1888459200 -10800 1 -04} {1897527600 -14400 0 -04} {1919908800 -10800 1 -04} {1928977200 -14400 0 -04} {1951358400 -10800 1 -04} {1960426800 -14400 0 -04} {1983412800 -10800 1 -04} {1992481200 -14400 0 -04} {2014862400 -10800 1 -04} {2024535600 -14400 0 -04} {2046312000 -10800 1 -04} {2055380400 -14400 0 -04} {2077761600 -10800 1 -04} {2086830000 -14400 0 -04} {2109211200 -10800 1 -04} {2118884400 -14400 0 -04} {2140660800 -10800 1 -04} {2150334000 -14400 0 -04} {2172715200 -10800 1 -04} {2181783600 -14400 0 -04} {2204164800 -10800 1 -04} {2213233200 -14400 0 -04} {2235614400 -10800 1 -04} {2244682800 -14400 0 -04} {2267064000 -10800 1 -04} {2276132400 -14400 0 -04} {2298513600 -10800 1 -04} {2307582000 -14400 0 -04} {2329963200 -10800 1 -04} {2339636400 -14400 0 -04} {2362017600 -10800 1 -04} {2371086000 -14400 0 -04} {2393467200 -10800 1 -04} {2402535600 -14400 0 -04} {2424916800 -10800 1 -04} {2433985200 -14400 0 -04} {2456366400 -10800 1 -04} {2465434800 -14400 0 -04} {2487816000 -10800 1 -04} {2497489200 -14400 0 -04} {2519870400 -10800 1 -04} {2528938800 -14400 0 -04} {2551320000 -10800 1 -04} {2560388400 -14400 0 -04} {2582769600 -10800 1 -04} {2591838000 -14400 0 -04} {2614219200 -10800 1 -04} {2623287600 -14400 0 -04} {2645668800 -10800 1 -04} {2654737200 -14400 0 -04} {2677118400 -10800 1 -04} {2686791600 -14400 0 -04} {2709172800 -10800 1 -04} {2718241200 -14400 0 -04} {2740622400 -10800 1 -04} {2749690800 -14400 0 -04} {2772072000 -10800 1 -04} {2781140400 -14400 0 -04} {2803521600 -10800 1 -04} {2812590000 -14400 0 -04} {2834971200 -10800 1 -04} {2844039600 -14400 0 -04} {2867025600 -10800 1 -04} {2876094000 -14400 0 -04} {2898475200 -10800 1 -04} {2907543600 -14400 0 -04} {2929924800 -10800 1 -04} {2938993200 -14400 0 -04} {2961374400 -10800 1 -04} {2970442800 -14400 0 -04} {2992824000 -10800 1 -04} {3001892400 -14400 0 -04} {3024273600 -10800 1 -04} {3033946800 -14400 0 -04} {3056328000 -10800 1 -04} {3065396400 -14400 0 -04} {3087777600 -10800 1 -04} {3096846000 -14400 0 -04} {3119227200 -10800 1 -04} {3128295600 -14400 0 -04} {3150676800 -10800 1 -04} {3159745200 -14400 0 -04} {3182126400 -10800 1 -04} {3191194800 -14400 0 -04} {3213576000 -10800 1 -04} {3223249200 -14400 0 -04} {3245630400 -10800 1 -04} {3254698800 -14400 0 -04} {3277080000 -10800 1 -04} {3286148400 -14400 0 -04} {3308529600 -10800 1 -04} {3317598000 -14400 0 -04} {3339979200 -10800 1 -04} {3349047600 -14400 0 -04} {3371428800 -10800 1 -04} {3381102000 -14400 0 -04} {3403483200 -10800 1 -04} {3412551600 -14400 0 -04} {3434932800 -10800 1 -04} {3444001200 -14400 0 -04} {3466382400 -10800 1 -04} {3475450800 -14400 0 -04} {3497832000 -10800 1 -04} {3506900400 -14400 0 -04} {3529281600 -10800 1 -04} {3538350000 -14400 0 -04} {3560731200 -10800 1 -04} {3570404400 -14400 0 -04} {3592785600 -10800 1 -04} {3601854000 -14400 0 -04} {3624235200 -10800 1 -04} {3633303600 -14400 0 -04} {3655684800 -10800 1 -04} {3664753200 -14400 0 -04} {3687134400 -10800 1 -04} {3696202800 -14400 0 -04} {3718584000 -10800 1 -04} {3727652400 -14400 0 -04} {3750638400 -10800 1 -04} {3759706800 -14400 0 -04} {3782088000 -10800 1 -04} {3791156400 -14400 0 -04} {3813537600 -10800 1 -04} {3822606000 -14400 0 -04} {3844987200 -10800 1 -04} {3854055600 -14400 0 -04} {3876436800 -10800 1 -04} {3885505200 -14400 0 -04} {3907886400 -10800 1 -04} {3917559600 -14400 0 -04} {3939940800 -10800 1 -04} {3949009200 -14400 0 -04} {3971390400 -10800 1 -04} {3980458800 -14400 0 -04} {4002840000 -10800 1 -04} {4011908400 -14400 0 -04} {4034289600 -10800 1 -04} {4043358000 -14400 0 -04} {4065739200 -10800 1 -04} {4074807600 -14400 0 -04} {4097188800 -10800 1 -04} } |
Changes to library/tzdata/America/Cuiaba.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Cuiaba) { {-9223372036854775808 -13460 0 LMT} {-1767212140 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Cuiaba) { {-9223372036854775808 -13460 0 LMT} {-1767212140 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {592977600 -10800 1 -04} {602046000 -14400 0 -04} {624427200 -10800 1 -04} {634705200 -14400 0 -04} {656481600 -10800 1 -04} {666759600 -14400 0 -04} {687931200 -10800 1 -04} {697604400 -14400 0 -04} {719985600 -10800 1 -04} {728449200 -14400 0 -04} {750830400 -10800 1 -04} {761713200 -14400 0 -04} {782280000 -10800 1 -04} {793162800 -14400 0 -04} {813729600 -10800 1 -04} {824007600 -14400 0 -04} {844574400 -10800 1 -04} {856062000 -14400 0 -04} {876110400 -10800 1 -04} {888721200 -14400 0 -04} {908078400 -10800 1 -04} {919566000 -14400 0 -04} {938923200 -10800 1 -04} {951620400 -14400 0 -04} {970977600 -10800 1 -04} {982465200 -14400 0 -04} {1003032000 -10800 1 -04} {1013914800 -14400 0 -04} {1036296000 -10800 1 -04} {1045364400 -14400 0 -04} {1064372400 -14400 0 -04} {1096603200 -14400 0 -04} {1099368000 -10800 1 -04} {1108868400 -14400 0 -04} {1129435200 -10800 1 -04} {1140318000 -14400 0 -04} {1162699200 -10800 1 -04} {1172372400 -14400 0 -04} {1192334400 -10800 1 -04} {1203217200 -14400 0 -04} {1224388800 -10800 1 -04} {1234666800 -14400 0 -04} {1255838400 -10800 1 -04} {1266721200 -14400 0 -04} {1287288000 -10800 1 -04} {1298170800 -14400 0 -04} {1318737600 -10800 1 -04} {1330225200 -14400 0 -04} {1350792000 -10800 1 -04} {1361070000 -14400 0 -04} {1382241600 -10800 1 -04} {1392519600 -14400 0 -04} {1413691200 -10800 1 -04} {1424574000 -14400 0 -04} {1445140800 -10800 1 -04} {1456023600 -14400 0 -04} {1476590400 -10800 1 -04} {1487473200 -14400 0 -04} {1508040000 -10800 1 -04} {1518922800 -14400 0 -04} {1541304000 -10800 1 -04} {1550372400 -14400 0 -04} {1572753600 -10800 1 -04} {1581822000 -14400 0 -04} {1604203200 -10800 1 -04} {1613876400 -14400 0 -04} {1636257600 -10800 1 -04} {1645326000 -14400 0 -04} {1667707200 -10800 1 -04} {1677380400 -14400 0 -04} {1699156800 -10800 1 -04} {1708225200 -14400 0 -04} {1730606400 -10800 1 -04} {1739674800 -14400 0 -04} {1762056000 -10800 1 -04} {1771729200 -14400 0 -04} {1793505600 -10800 1 -04} {1803178800 -14400 0 -04} {1825560000 -10800 1 -04} {1834628400 -14400 0 -04} {1857009600 -10800 1 -04} {1866078000 -14400 0 -04} {1888459200 -10800 1 -04} {1897527600 -14400 0 -04} {1919908800 -10800 1 -04} {1928977200 -14400 0 -04} {1951358400 -10800 1 -04} {1960426800 -14400 0 -04} {1983412800 -10800 1 -04} {1992481200 -14400 0 -04} {2014862400 -10800 1 -04} {2024535600 -14400 0 -04} {2046312000 -10800 1 -04} {2055380400 -14400 0 -04} {2077761600 -10800 1 -04} {2086830000 -14400 0 -04} {2109211200 -10800 1 -04} {2118884400 -14400 0 -04} {2140660800 -10800 1 -04} {2150334000 -14400 0 -04} {2172715200 -10800 1 -04} {2181783600 -14400 0 -04} {2204164800 -10800 1 -04} {2213233200 -14400 0 -04} {2235614400 -10800 1 -04} {2244682800 -14400 0 -04} {2267064000 -10800 1 -04} {2276132400 -14400 0 -04} {2298513600 -10800 1 -04} {2307582000 -14400 0 -04} {2329963200 -10800 1 -04} {2339636400 -14400 0 -04} {2362017600 -10800 1 -04} {2371086000 -14400 0 -04} {2393467200 -10800 1 -04} {2402535600 -14400 0 -04} {2424916800 -10800 1 -04} {2433985200 -14400 0 -04} {2456366400 -10800 1 -04} {2465434800 -14400 0 -04} {2487816000 -10800 1 -04} {2497489200 -14400 0 -04} {2519870400 -10800 1 -04} {2528938800 -14400 0 -04} {2551320000 -10800 1 -04} {2560388400 -14400 0 -04} {2582769600 -10800 1 -04} {2591838000 -14400 0 -04} {2614219200 -10800 1 -04} {2623287600 -14400 0 -04} {2645668800 -10800 1 -04} {2654737200 -14400 0 -04} {2677118400 -10800 1 -04} {2686791600 -14400 0 -04} {2709172800 -10800 1 -04} {2718241200 -14400 0 -04} {2740622400 -10800 1 -04} {2749690800 -14400 0 -04} {2772072000 -10800 1 -04} {2781140400 -14400 0 -04} {2803521600 -10800 1 -04} {2812590000 -14400 0 -04} {2834971200 -10800 1 -04} {2844039600 -14400 0 -04} {2867025600 -10800 1 -04} {2876094000 -14400 0 -04} {2898475200 -10800 1 -04} {2907543600 -14400 0 -04} {2929924800 -10800 1 -04} {2938993200 -14400 0 -04} {2961374400 -10800 1 -04} {2970442800 -14400 0 -04} {2992824000 -10800 1 -04} {3001892400 -14400 0 -04} {3024273600 -10800 1 -04} {3033946800 -14400 0 -04} {3056328000 -10800 1 -04} {3065396400 -14400 0 -04} {3087777600 -10800 1 -04} {3096846000 -14400 0 -04} {3119227200 -10800 1 -04} {3128295600 -14400 0 -04} {3150676800 -10800 1 -04} {3159745200 -14400 0 -04} {3182126400 -10800 1 -04} {3191194800 -14400 0 -04} {3213576000 -10800 1 -04} {3223249200 -14400 0 -04} {3245630400 -10800 1 -04} {3254698800 -14400 0 -04} {3277080000 -10800 1 -04} {3286148400 -14400 0 -04} {3308529600 -10800 1 -04} {3317598000 -14400 0 -04} {3339979200 -10800 1 -04} {3349047600 -14400 0 -04} {3371428800 -10800 1 -04} {3381102000 -14400 0 -04} {3403483200 -10800 1 -04} {3412551600 -14400 0 -04} {3434932800 -10800 1 -04} {3444001200 -14400 0 -04} {3466382400 -10800 1 -04} {3475450800 -14400 0 -04} {3497832000 -10800 1 -04} {3506900400 -14400 0 -04} {3529281600 -10800 1 -04} {3538350000 -14400 0 -04} {3560731200 -10800 1 -04} {3570404400 -14400 0 -04} {3592785600 -10800 1 -04} {3601854000 -14400 0 -04} {3624235200 -10800 1 -04} {3633303600 -14400 0 -04} {3655684800 -10800 1 -04} {3664753200 -14400 0 -04} {3687134400 -10800 1 -04} {3696202800 -14400 0 -04} {3718584000 -10800 1 -04} {3727652400 -14400 0 -04} {3750638400 -10800 1 -04} {3759706800 -14400 0 -04} {3782088000 -10800 1 -04} {3791156400 -14400 0 -04} {3813537600 -10800 1 -04} {3822606000 -14400 0 -04} {3844987200 -10800 1 -04} {3854055600 -14400 0 -04} {3876436800 -10800 1 -04} {3885505200 -14400 0 -04} {3907886400 -10800 1 -04} {3917559600 -14400 0 -04} {3939940800 -10800 1 -04} {3949009200 -14400 0 -04} {3971390400 -10800 1 -04} {3980458800 -14400 0 -04} {4002840000 -10800 1 -04} {4011908400 -14400 0 -04} {4034289600 -10800 1 -04} {4043358000 -14400 0 -04} {4065739200 -10800 1 -04} {4074807600 -14400 0 -04} {4097188800 -10800 1 -04} } |
Changes to library/tzdata/America/Eirunepe.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Eirunepe) { {-9223372036854775808 -16768 0 LMT} {-1767208832 -18000 0 -05} | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Eirunepe) { {-9223372036854775808 -16768 0 LMT} {-1767208832 -18000 0 -05} {-1206950400 -14400 1 -05} {-1191355200 -18000 0 -05} {-1175367600 -14400 1 -05} {-1159819200 -18000 0 -05} {-633812400 -14400 1 -05} {-622062000 -18000 0 -05} {-602276400 -14400 1 -05} {-591825600 -18000 0 -05} {-570740400 -14400 1 -05} {-560203200 -18000 0 -05} {-539118000 -14400 1 -05} {-531345600 -18000 0 -05} {-191358000 -14400 1 -05} {-184190400 -18000 0 -05} {-155156400 -14400 1 -05} {-150062400 -18000 0 -05} {-128890800 -14400 1 -05} {-121118400 -18000 0 -05} {-99946800 -14400 1 -05} {-89582400 -18000 0 -05} {-68410800 -14400 1 -05} {-57960000 -18000 0 -05} {499755600 -14400 1 -05} {511243200 -18000 0 -05} {530600400 -14400 1 -05} {540273600 -18000 0 -05} {562136400 -14400 1 -05} {571204800 -18000 0 -05} {590040000 -18000 0 -05} {749192400 -18000 0 -05} {750834000 -14400 1 -05} {761716800 -18000 0 -05} {780206400 -18000 0 -05} {1214283600 -14400 0 -04} {1384056000 -18000 0 -05} } |
Changes to library/tzdata/America/Fortaleza.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Fortaleza) { {-9223372036854775808 -9240 0 LMT} {-1767216360 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Fortaleza) { {-9223372036854775808 -9240 0 LMT} {-1767216360 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {653536800 -10800 0 -03} {938660400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {972180000 -10800 0 -03} {1000350000 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1033437600 -10800 0 -03} } |
Changes to library/tzdata/America/Grand_Turk.
1 2 3 4 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Grand_Turk) { {-9223372036854775808 -17072 0 LMT} | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Grand_Turk) { {-9223372036854775808 -17072 0 LMT} {-2524504528 -18430 0 KMT} {-1827687170 -18000 0 EST} {284014800 -18000 0 EST} {294217200 -14400 1 EDT} {309938400 -18000 0 EST} {325666800 -14400 1 EDT} {341388000 -18000 0 EST} {357116400 -14400 1 EDT} {372837600 -18000 0 EST} |
︙ | ︙ |
Changes to library/tzdata/America/Guayaquil.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Guayaquil) { {-9223372036854775808 -19160 0 LMT} {-2524502440 -18840 0 QMT} {-1230749160 -18000 0 -05} | | | 1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Guayaquil) { {-9223372036854775808 -19160 0 LMT} {-2524502440 -18840 0 QMT} {-1230749160 -18000 0 -05} {722926800 -14400 1 -05} {728884800 -18000 0 -05} } |
Changes to library/tzdata/America/Jamaica.
1 2 3 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Jamaica) { | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Jamaica) { {-9223372036854775808 -18430 0 LMT} {-2524503170 -18430 0 KMT} {-1827687170 -18000 0 EST} {126248400 -18000 0 EST} {126687600 -14400 1 EDT} {152085600 -18000 0 EST} {162370800 -14400 1 EDT} {183535200 -18000 0 EST} {199263600 -14400 1 EDT} {215589600 -18000 0 EST} |
︙ | ︙ |
Changes to library/tzdata/America/Lima.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Lima) { {-9223372036854775808 -18492 0 LMT} {-2524503108 -18516 0 LMT} | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Lima) { {-9223372036854775808 -18492 0 LMT} {-2524503108 -18516 0 LMT} {-1938538284 -14400 0 -05} {-1002052800 -18000 0 -05} {-986756400 -14400 1 -05} {-971035200 -18000 0 -05} {-955306800 -14400 1 -05} {-939585600 -18000 0 -05} {512712000 -18000 0 -05} {544248000 -18000 0 -05} {638942400 -18000 0 -05} {765172800 -18000 0 -05} } |
Changes to library/tzdata/America/Maceio.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Maceio) { {-9223372036854775808 -8572 0 LMT} {-1767217028 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Maceio) { {-9223372036854775808 -8572 0 LMT} {-1767217028 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {653536800 -10800 0 -03} {813553200 -10800 0 -03} {813726000 -7200 1 -03} {824004000 -10800 0 -03} {841802400 -10800 0 -03} {938660400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {972180000 -10800 0 -03} {1000350000 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1033437600 -10800 0 -03} } |
Changes to library/tzdata/America/Manaus.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Manaus) { {-9223372036854775808 -14404 0 LMT} {-1767211196 -14400 0 -04} | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Manaus) { {-9223372036854775808 -14404 0 LMT} {-1767211196 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {590036400 -14400 0 -04} {749188800 -14400 0 -04} {750830400 -10800 1 -04} {761713200 -14400 0 -04} {780202800 -14400 0 -04} } |
Changes to library/tzdata/America/Montevideo.
1 2 3 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Montevideo) { | | | | | | | | | | | | | | | | < | | | | > | | < < < < | | < | | < | | | > | > | > > | | | | | | > > | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Montevideo) { {-9223372036854775808 -13491 0 LMT} {-1942690509 -13491 0 MMT} {-1567455309 -14400 0 -04} {-1459627200 -10800 0 -0330} {-1443819600 -12600 0 -0330} {-1428006600 -10800 1 -0330} {-1412283600 -12600 0 -0330} {-1396470600 -10800 1 -0330} {-1380747600 -12600 0 -0330} {-1141590600 -10800 1 -0330} {-1128286800 -12600 0 -0330} {-1110141000 -10800 1 -0330} {-1096837200 -12600 0 -0330} {-1078691400 -10800 1 -0330} {-1065387600 -12600 0 -0330} {-1047241800 -10800 1 -0330} {-1033938000 -12600 0 -0330} {-1015187400 -10800 1 -0330} {-1002488400 -12600 0 -0330} {-983737800 -10800 1 -0330} {-971038800 -12600 0 -0330} {-954707400 -10800 1 -0330} {-938984400 -12600 0 -0330} {-920838600 -10800 1 -0330} {-907534800 -12600 0 -0330} {-896819400 -10800 1 -0330} {-853621200 -9000 0 -03} {-845847000 -10800 0 -03} {-334789200 -9000 1 -03} {-319671000 -10800 0 -03} {-315608400 -10800 0 -03} {-314226000 -7200 1 -03} {-309996000 -10800 0 -03} {-149720400 -7200 1 -03} {-134604000 -10800 0 -03} {-63147600 -10800 0 -03} {-50446800 -9000 1 -03} {-34205400 -10800 0 -03} {10800 -10800 0 -03} {9860400 -7200 1 -03} {14176800 -10800 0 -03} {72846000 -7200 1 -03} {80100000 -10800 0 -03} {126241200 -10800 0 -03} {127278000 -5400 1 -03} {132112800 -9000 0 -03} {147234600 -10800 0 -03} {156909600 -10800 0 -03} {156913200 -7200 1 -03} {165376800 -10800 0 -03} {219812400 -7200 1 -03} {226461600 -10800 0 -03} {250052400 -7200 1 -03} {257911200 -10800 0 -03} {282711600 -7200 1 -03} {289360800 -10800 0 -03} {294202800 -7200 1 -03} {322020000 -10800 0 -03} {566449200 -7200 1 -03} {573012000 -10800 0 -03} {597812400 -7200 1 -03} {605066400 -10800 0 -03} {625633200 -7200 1 -03} {635911200 -10800 0 -03} {656478000 -7200 1 -03} {667965600 -10800 0 -03} {688532400 -7200 1 -03} {699415200 -10800 0 -03} {719377200 -7200 1 -03} {730864800 -10800 0 -03} {1095562800 -7200 1 -03} {1111896000 -10800 0 -03} {1128834000 -7200 1 -03} {1142136000 -10800 0 -03} {1159678800 -7200 1 -03} {1173585600 -10800 0 -03} {1191733200 -7200 1 -03} {1205035200 -10800 0 -03} {1223182800 -7200 1 -03} {1236484800 -10800 0 -03} {1254632400 -7200 1 -03} {1268539200 -10800 0 -03} {1286082000 -7200 1 -03} {1299988800 -10800 0 -03} {1317531600 -7200 1 -03} {1331438400 -10800 0 -03} {1349586000 -7200 1 -03} {1362888000 -10800 0 -03} {1381035600 -7200 1 -03} {1394337600 -10800 0 -03} {1412485200 -7200 1 -03} {1425787200 -10800 0 -03} } |
Changes to library/tzdata/America/Noronha.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Noronha) { {-9223372036854775808 -7780 0 LMT} {-1767217820 -7200 0 -02} | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Noronha) { {-9223372036854775808 -7780 0 LMT} {-1767217820 -7200 0 -02} {-1206961200 -3600 1 -02} {-1191366000 -7200 0 -02} {-1175378400 -3600 1 -02} {-1159830000 -7200 0 -02} {-633823200 -3600 1 -02} {-622072800 -7200 0 -02} {-602287200 -3600 1 -02} {-591836400 -7200 0 -02} {-570751200 -3600 1 -02} {-560214000 -7200 0 -02} {-539128800 -3600 1 -02} {-531356400 -7200 0 -02} {-191368800 -3600 1 -02} {-184201200 -7200 0 -02} {-155167200 -3600 1 -02} {-150073200 -7200 0 -02} {-128901600 -3600 1 -02} {-121129200 -7200 0 -02} {-99957600 -3600 1 -02} {-89593200 -7200 0 -02} {-68421600 -3600 1 -02} {-57970800 -7200 0 -02} {499744800 -3600 1 -02} {511232400 -7200 0 -02} {530589600 -3600 1 -02} {540262800 -7200 0 -02} {562125600 -3600 1 -02} {571194000 -7200 0 -02} {592970400 -3600 1 -02} {602038800 -7200 0 -02} {624420000 -3600 1 -02} {634698000 -7200 0 -02} {653533200 -7200 0 -02} {938656800 -7200 0 -02} {938916000 -3600 1 -02} {951613200 -7200 0 -02} {970970400 -3600 1 -02} {971571600 -7200 0 -02} {1000346400 -7200 0 -02} {1003024800 -3600 1 -02} {1013907600 -7200 0 -02} {1033434000 -7200 0 -02} } |
Changes to library/tzdata/America/Porto_Velho.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Porto_Velho) { {-9223372036854775808 -15336 0 LMT} {-1767210264 -14400 0 -04} | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Porto_Velho) { {-9223372036854775808 -15336 0 LMT} {-1767210264 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {590036400 -14400 0 -04} } |
Changes to library/tzdata/America/Punta_Arenas.
1 2 3 4 5 6 7 8 9 10 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Punta_Arenas) { {-9223372036854775808 -17020 0 LMT} {-2524504580 -16966 0 SMT} {-1892661434 -18000 0 -05} {-1688410800 -16966 0 SMT} {-1619205434 -14400 0 -04} {-1593806400 -16966 0 SMT} {-1335986234 -18000 0 -05} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Punta_Arenas) { {-9223372036854775808 -17020 0 LMT} {-2524504580 -16966 0 SMT} {-1892661434 -18000 0 -05} {-1688410800 -16966 0 SMT} {-1619205434 -14400 0 -04} {-1593806400 -16966 0 SMT} {-1335986234 -18000 0 -05} {-1335985200 -14400 1 -05} {-1317585600 -18000 0 -05} {-1304362800 -14400 1 -05} {-1286049600 -18000 0 -05} {-1272826800 -14400 1 -05} {-1254513600 -18000 0 -05} {-1241290800 -14400 1 -05} {-1222977600 -18000 0 -05} {-1209754800 -14400 1 -05} {-1191355200 -18000 0 -05} {-1178132400 -14400 0 -04} {-870552000 -18000 0 -05} {-865278000 -14400 0 -04} {-718056000 -18000 0 -05} {-713649600 -14400 0 -04} {-36619200 -10800 1 -04} {-23922000 -14400 0 -04} {-3355200 -10800 1 -04} {7527600 -14400 0 -04} {24465600 -10800 1 -04} {37767600 -14400 0 -04} {55915200 -10800 1 -04} {69217200 -14400 0 -04} {87969600 -10800 1 -04} {100666800 -14400 0 -04} {118209600 -10800 1 -04} {132116400 -14400 0 -04} {150868800 -10800 1 -04} {163566000 -14400 0 -04} {182318400 -10800 1 -04} {195620400 -14400 0 -04} {213768000 -10800 1 -04} {227070000 -14400 0 -04} {245217600 -10800 1 -04} {258519600 -14400 0 -04} {277272000 -10800 1 -04} {289969200 -14400 0 -04} {308721600 -10800 1 -04} {321418800 -14400 0 -04} {340171200 -10800 1 -04} {353473200 -14400 0 -04} {371620800 -10800 1 -04} {384922800 -14400 0 -04} {403070400 -10800 1 -04} {416372400 -14400 0 -04} {434520000 -10800 1 -04} {447822000 -14400 0 -04} {466574400 -10800 1 -04} {479271600 -14400 0 -04} {498024000 -10800 1 -04} {510721200 -14400 0 -04} {529473600 -10800 1 -04} {545194800 -14400 0 -04} {560923200 -10800 1 -04} {574225200 -14400 0 -04} {592372800 -10800 1 -04} {605674800 -14400 0 -04} {624427200 -10800 1 -04} {637124400 -14400 0 -04} {653457600 -10800 1 -04} {668574000 -14400 0 -04} {687326400 -10800 1 -04} {700628400 -14400 0 -04} {718776000 -10800 1 -04} {732078000 -14400 0 -04} {750225600 -10800 1 -04} {763527600 -14400 0 -04} {781675200 -10800 1 -04} {794977200 -14400 0 -04} {813729600 -10800 1 -04} {826426800 -14400 0 -04} {845179200 -10800 1 -04} {859690800 -14400 0 -04} {876628800 -10800 1 -04} {889930800 -14400 0 -04} {906868800 -10800 1 -04} {923194800 -14400 0 -04} {939528000 -10800 1 -04} {952830000 -14400 0 -04} {971582400 -10800 1 -04} {984279600 -14400 0 -04} {1003032000 -10800 1 -04} {1015729200 -14400 0 -04} {1034481600 -10800 1 -04} {1047178800 -14400 0 -04} {1065931200 -10800 1 -04} {1079233200 -14400 0 -04} {1097380800 -10800 1 -04} {1110682800 -14400 0 -04} {1128830400 -10800 1 -04} {1142132400 -14400 0 -04} {1160884800 -10800 1 -04} {1173582000 -14400 0 -04} {1192334400 -10800 1 -04} {1206846000 -14400 0 -04} {1223784000 -10800 1 -04} {1237086000 -14400 0 -04} {1255233600 -10800 1 -04} {1270350000 -14400 0 -04} {1286683200 -10800 1 -04} {1304823600 -14400 0 -04} {1313899200 -10800 1 -04} {1335668400 -14400 0 -04} {1346558400 -10800 1 -04} {1367118000 -14400 0 -04} {1378612800 -10800 1 -04} {1398567600 -14400 0 -04} {1410062400 -10800 1 -04} {1463281200 -14400 0 -04} {1471147200 -10800 1 -04} {1480820400 -10800 0 -03} } |
Changes to library/tzdata/America/Recife.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Recife) { {-9223372036854775808 -8376 0 LMT} {-1767217224 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Recife) { {-9223372036854775808 -8376 0 LMT} {-1767217224 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-191365200 -7200 1 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {653536800 -10800 0 -03} {938660400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {971575200 -10800 0 -03} {1000350000 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1033437600 -10800 0 -03} } |
Changes to library/tzdata/America/Rio_Branco.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Rio_Branco) { {-9223372036854775808 -16272 0 LMT} {-1767209328 -18000 0 -05} | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Rio_Branco) { {-9223372036854775808 -16272 0 LMT} {-1767209328 -18000 0 -05} {-1206950400 -14400 1 -05} {-1191355200 -18000 0 -05} {-1175367600 -14400 1 -05} {-1159819200 -18000 0 -05} {-633812400 -14400 1 -05} {-622062000 -18000 0 -05} {-602276400 -14400 1 -05} {-591825600 -18000 0 -05} {-570740400 -14400 1 -05} {-560203200 -18000 0 -05} {-539118000 -14400 1 -05} {-531345600 -18000 0 -05} {-191358000 -14400 1 -05} {-184190400 -18000 0 -05} {-155156400 -14400 1 -05} {-150062400 -18000 0 -05} {-128890800 -14400 1 -05} {-121118400 -18000 0 -05} {-99946800 -14400 1 -05} {-89582400 -18000 0 -05} {-68410800 -14400 1 -05} {-57960000 -18000 0 -05} {499755600 -14400 1 -05} {511243200 -18000 0 -05} {530600400 -14400 1 -05} {540273600 -18000 0 -05} {562136400 -14400 1 -05} {571204800 -18000 0 -05} {590040000 -18000 0 -05} {1214283600 -14400 0 -04} {1384056000 -18000 0 -05} } |
Changes to library/tzdata/America/Santarem.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Santarem) { {-9223372036854775808 -13128 0 LMT} {-1767212472 -14400 0 -04} | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Santarem) { {-9223372036854775808 -13128 0 LMT} {-1767212472 -14400 0 -04} {-1206954000 -10800 1 -04} {-1191358800 -14400 0 -04} {-1175371200 -10800 1 -04} {-1159822800 -14400 0 -04} {-633816000 -10800 1 -04} {-622065600 -14400 0 -04} {-602280000 -10800 1 -04} {-591829200 -14400 0 -04} {-570744000 -10800 1 -04} {-560206800 -14400 0 -04} {-539121600 -10800 1 -04} {-531349200 -14400 0 -04} {-191361600 -10800 1 -04} {-184194000 -14400 0 -04} {-155160000 -10800 1 -04} {-150066000 -14400 0 -04} {-128894400 -10800 1 -04} {-121122000 -14400 0 -04} {-99950400 -10800 1 -04} {-89586000 -14400 0 -04} {-68414400 -10800 1 -04} {-57963600 -14400 0 -04} {499752000 -10800 1 -04} {511239600 -14400 0 -04} {530596800 -10800 1 -04} {540270000 -14400 0 -04} {562132800 -10800 1 -04} {571201200 -14400 0 -04} {590036400 -14400 0 -04} {1214280000 -10800 0 -03} } |
Changes to library/tzdata/America/Santiago.
1 2 3 4 5 6 7 8 9 10 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Santiago) { {-9223372036854775808 -16966 0 LMT} {-2524504634 -16966 0 SMT} {-1892661434 -18000 0 -05} {-1688410800 -16966 0 SMT} {-1619205434 -14400 0 -04} {-1593806400 -16966 0 SMT} {-1335986234 -18000 0 -05} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Santiago) { {-9223372036854775808 -16966 0 LMT} {-2524504634 -16966 0 SMT} {-1892661434 -18000 0 -05} {-1688410800 -16966 0 SMT} {-1619205434 -14400 0 -04} {-1593806400 -16966 0 SMT} {-1335986234 -18000 0 -05} {-1335985200 -14400 1 -05} {-1317585600 -18000 0 -05} {-1304362800 -14400 1 -05} {-1286049600 -18000 0 -05} {-1272826800 -14400 1 -05} {-1254513600 -18000 0 -05} {-1241290800 -14400 1 -05} {-1222977600 -18000 0 -05} {-1209754800 -14400 1 -05} {-1191355200 -18000 0 -05} {-1178132400 -14400 0 -04} {-870552000 -18000 0 -05} {-865278000 -14400 0 -04} {-740520000 -10800 1 -03} {-736376400 -14400 0 -04} {-718056000 -18000 0 -05} {-713649600 -14400 0 -04} {-36619200 -10800 1 -04} {-23922000 -14400 0 -04} {-3355200 -10800 1 -04} {7527600 -14400 0 -04} {24465600 -10800 1 -04} {37767600 -14400 0 -04} {55915200 -10800 1 -04} {69217200 -14400 0 -04} {87969600 -10800 1 -04} {100666800 -14400 0 -04} {118209600 -10800 1 -04} {132116400 -14400 0 -04} {150868800 -10800 1 -04} {163566000 -14400 0 -04} {182318400 -10800 1 -04} {195620400 -14400 0 -04} {213768000 -10800 1 -04} {227070000 -14400 0 -04} {245217600 -10800 1 -04} {258519600 -14400 0 -04} {277272000 -10800 1 -04} {289969200 -14400 0 -04} {308721600 -10800 1 -04} {321418800 -14400 0 -04} {340171200 -10800 1 -04} {353473200 -14400 0 -04} {371620800 -10800 1 -04} {384922800 -14400 0 -04} {403070400 -10800 1 -04} {416372400 -14400 0 -04} {434520000 -10800 1 -04} {447822000 -14400 0 -04} {466574400 -10800 1 -04} {479271600 -14400 0 -04} {498024000 -10800 1 -04} {510721200 -14400 0 -04} {529473600 -10800 1 -04} {545194800 -14400 0 -04} {560923200 -10800 1 -04} {574225200 -14400 0 -04} {592372800 -10800 1 -04} {605674800 -14400 0 -04} {624427200 -10800 1 -04} {637124400 -14400 0 -04} {653457600 -10800 1 -04} {668574000 -14400 0 -04} {687326400 -10800 1 -04} {700628400 -14400 0 -04} {718776000 -10800 1 -04} {732078000 -14400 0 -04} {750225600 -10800 1 -04} {763527600 -14400 0 -04} {781675200 -10800 1 -04} {794977200 -14400 0 -04} {813729600 -10800 1 -04} {826426800 -14400 0 -04} {845179200 -10800 1 -04} {859690800 -14400 0 -04} {876628800 -10800 1 -04} {889930800 -14400 0 -04} {906868800 -10800 1 -04} {923194800 -14400 0 -04} {939528000 -10800 1 -04} {952830000 -14400 0 -04} {971582400 -10800 1 -04} {984279600 -14400 0 -04} {1003032000 -10800 1 -04} {1015729200 -14400 0 -04} {1034481600 -10800 1 -04} {1047178800 -14400 0 -04} {1065931200 -10800 1 -04} {1079233200 -14400 0 -04} {1097380800 -10800 1 -04} {1110682800 -14400 0 -04} {1128830400 -10800 1 -04} {1142132400 -14400 0 -04} {1160884800 -10800 1 -04} {1173582000 -14400 0 -04} {1192334400 -10800 1 -04} {1206846000 -14400 0 -04} {1223784000 -10800 1 -04} {1237086000 -14400 0 -04} {1255233600 -10800 1 -04} {1270350000 -14400 0 -04} {1286683200 -10800 1 -04} {1304823600 -14400 0 -04} {1313899200 -10800 1 -04} {1335668400 -14400 0 -04} {1346558400 -10800 1 -04} {1367118000 -14400 0 -04} {1378612800 -10800 1 -04} {1398567600 -14400 0 -04} {1410062400 -10800 1 -04} {1463281200 -14400 0 -04} {1471147200 -10800 1 -04} {1494730800 -14400 0 -04} {1502596800 -10800 1 -04} {1526180400 -14400 0 -04} {1534046400 -10800 1 -04} {1557630000 -14400 0 -04} {1565496000 -10800 1 -04} {1589079600 -14400 0 -04} {1596945600 -10800 1 -04} {1620529200 -14400 0 -04} {1629000000 -10800 1 -04} {1652583600 -14400 0 -04} {1660449600 -10800 1 -04} {1684033200 -14400 0 -04} {1691899200 -10800 1 -04} {1715482800 -14400 0 -04} {1723348800 -10800 1 -04} {1746932400 -14400 0 -04} {1754798400 -10800 1 -04} {1778382000 -14400 0 -04} {1786248000 -10800 1 -04} {1809831600 -14400 0 -04} {1818302400 -10800 1 -04} {1841886000 -14400 0 -04} {1849752000 -10800 1 -04} {1873335600 -14400 0 -04} {1881201600 -10800 1 -04} {1904785200 -14400 0 -04} {1912651200 -10800 1 -04} {1936234800 -14400 0 -04} {1944100800 -10800 1 -04} {1967684400 -14400 0 -04} {1976155200 -10800 1 -04} {1999738800 -14400 0 -04} {2007604800 -10800 1 -04} {2031188400 -14400 0 -04} {2039054400 -10800 1 -04} {2062638000 -14400 0 -04} {2070504000 -10800 1 -04} {2094087600 -14400 0 -04} {2101953600 -10800 1 -04} {2125537200 -14400 0 -04} {2133403200 -10800 1 -04} {2156986800 -14400 0 -04} {2165457600 -10800 1 -04} {2189041200 -14400 0 -04} {2196907200 -10800 1 -04} {2220490800 -14400 0 -04} {2228356800 -10800 1 -04} {2251940400 -14400 0 -04} {2259806400 -10800 1 -04} {2283390000 -14400 0 -04} {2291256000 -10800 1 -04} {2314839600 -14400 0 -04} {2322705600 -10800 1 -04} {2346894000 -14400 0 -04} {2354760000 -10800 1 -04} {2378343600 -14400 0 -04} {2386209600 -10800 1 -04} {2409793200 -14400 0 -04} {2417659200 -10800 1 -04} {2441242800 -14400 0 -04} {2449108800 -10800 1 -04} {2472692400 -14400 0 -04} {2480558400 -10800 1 -04} {2504142000 -14400 0 -04} {2512612800 -10800 1 -04} {2536196400 -14400 0 -04} {2544062400 -10800 1 -04} {2567646000 -14400 0 -04} {2575512000 -10800 1 -04} {2599095600 -14400 0 -04} {2606961600 -10800 1 -04} {2630545200 -14400 0 -04} {2638411200 -10800 1 -04} {2661994800 -14400 0 -04} {2669860800 -10800 1 -04} {2693444400 -14400 0 -04} {2701915200 -10800 1 -04} {2725498800 -14400 0 -04} {2733364800 -10800 1 -04} {2756948400 -14400 0 -04} {2764814400 -10800 1 -04} {2788398000 -14400 0 -04} {2796264000 -10800 1 -04} {2819847600 -14400 0 -04} {2827713600 -10800 1 -04} {2851297200 -14400 0 -04} {2859768000 -10800 1 -04} {2883351600 -14400 0 -04} {2891217600 -10800 1 -04} {2914801200 -14400 0 -04} {2922667200 -10800 1 -04} {2946250800 -14400 0 -04} {2954116800 -10800 1 -04} {2977700400 -14400 0 -04} {2985566400 -10800 1 -04} {3009150000 -14400 0 -04} {3017016000 -10800 1 -04} {3040599600 -14400 0 -04} {3049070400 -10800 1 -04} {3072654000 -14400 0 -04} {3080520000 -10800 1 -04} {3104103600 -14400 0 -04} {3111969600 -10800 1 -04} {3135553200 -14400 0 -04} {3143419200 -10800 1 -04} {3167002800 -14400 0 -04} {3174868800 -10800 1 -04} {3198452400 -14400 0 -04} {3206318400 -10800 1 -04} {3230506800 -14400 0 -04} {3238372800 -10800 1 -04} {3261956400 -14400 0 -04} {3269822400 -10800 1 -04} {3293406000 -14400 0 -04} {3301272000 -10800 1 -04} {3324855600 -14400 0 -04} {3332721600 -10800 1 -04} {3356305200 -14400 0 -04} {3364171200 -10800 1 -04} {3387754800 -14400 0 -04} {3396225600 -10800 1 -04} {3419809200 -14400 0 -04} {3427675200 -10800 1 -04} {3451258800 -14400 0 -04} {3459124800 -10800 1 -04} {3482708400 -14400 0 -04} {3490574400 -10800 1 -04} {3514158000 -14400 0 -04} {3522024000 -10800 1 -04} {3545607600 -14400 0 -04} {3553473600 -10800 1 -04} {3577057200 -14400 0 -04} {3585528000 -10800 1 -04} {3609111600 -14400 0 -04} {3616977600 -10800 1 -04} {3640561200 -14400 0 -04} {3648427200 -10800 1 -04} {3672010800 -14400 0 -04} {3679876800 -10800 1 -04} {3703460400 -14400 0 -04} {3711326400 -10800 1 -04} {3734910000 -14400 0 -04} {3743380800 -10800 1 -04} {3766964400 -14400 0 -04} {3774830400 -10800 1 -04} {3798414000 -14400 0 -04} {3806280000 -10800 1 -04} {3829863600 -14400 0 -04} {3837729600 -10800 1 -04} {3861313200 -14400 0 -04} {3869179200 -10800 1 -04} {3892762800 -14400 0 -04} {3900628800 -10800 1 -04} {3924212400 -14400 0 -04} {3932683200 -10800 1 -04} {3956266800 -14400 0 -04} {3964132800 -10800 1 -04} {3987716400 -14400 0 -04} {3995582400 -10800 1 -04} {4019166000 -14400 0 -04} {4027032000 -10800 1 -04} {4050615600 -14400 0 -04} {4058481600 -10800 1 -04} {4082065200 -14400 0 -04} {4089931200 -10800 1 -04} } |
Changes to library/tzdata/America/Sao_Paulo.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Sao_Paulo) { {-9223372036854775808 -11188 0 LMT} {-1767214412 -10800 0 -03} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | # created by tools/tclZIC.tcl - do not edit set TZData(:America/Sao_Paulo) { {-9223372036854775808 -11188 0 LMT} {-1767214412 -10800 0 -03} {-1206957600 -7200 1 -03} {-1191362400 -10800 0 -03} {-1175374800 -7200 1 -03} {-1159826400 -10800 0 -03} {-633819600 -7200 1 -03} {-622069200 -10800 0 -03} {-602283600 -7200 1 -03} {-591832800 -10800 0 -03} {-570747600 -7200 1 -03} {-560210400 -10800 0 -03} {-539125200 -7200 1 -03} {-531352800 -10800 0 -03} {-195429600 -7200 1 -02} {-189381600 -7200 0 -03} {-184197600 -10800 0 -03} {-155163600 -7200 1 -03} {-150069600 -10800 0 -03} {-128898000 -7200 1 -03} {-121125600 -10800 0 -03} {-99954000 -7200 1 -03} {-89589600 -10800 0 -03} {-68418000 -7200 1 -03} {-57967200 -10800 0 -03} {499748400 -7200 1 -03} {511236000 -10800 0 -03} {530593200 -7200 1 -03} {540266400 -10800 0 -03} {562129200 -7200 1 -03} {571197600 -10800 0 -03} {592974000 -7200 1 -03} {602042400 -10800 0 -03} {624423600 -7200 1 -03} {634701600 -10800 0 -03} {656478000 -7200 1 -03} {666756000 -10800 0 -03} {687927600 -7200 1 -03} {697600800 -10800 0 -03} {719982000 -7200 1 -03} {728445600 -10800 0 -03} {750826800 -7200 1 -03} {761709600 -10800 0 -03} {782276400 -7200 1 -03} {793159200 -10800 0 -03} {813726000 -7200 1 -03} {824004000 -10800 0 -03} {844570800 -7200 1 -03} {856058400 -10800 0 -03} {876106800 -7200 1 -03} {888717600 -10800 0 -03} {908074800 -7200 1 -03} {919562400 -10800 0 -03} {938919600 -7200 1 -03} {951616800 -10800 0 -03} {970974000 -7200 1 -03} {982461600 -10800 0 -03} {1003028400 -7200 1 -03} {1013911200 -10800 0 -03} {1036292400 -7200 1 -03} {1045360800 -10800 0 -03} {1066532400 -7200 1 -03} {1076810400 -10800 0 -03} {1099364400 -7200 1 -03} {1108864800 -10800 0 -03} {1129431600 -7200 1 -03} {1140314400 -10800 0 -03} {1162695600 -7200 1 -03} {1172368800 -10800 0 -03} {1192330800 -7200 1 -03} {1203213600 -10800 0 -03} {1224385200 -7200 1 -03} {1234663200 -10800 0 -03} {1255834800 -7200 1 -03} {1266717600 -10800 0 -03} {1287284400 -7200 1 -03} {1298167200 -10800 0 -03} {1318734000 -7200 1 -03} {1330221600 -10800 0 -03} {1350788400 -7200 1 -03} {1361066400 -10800 0 -03} {1382238000 -7200 1 -03} {1392516000 -10800 0 -03} {1413687600 -7200 1 -03} {1424570400 -10800 0 -03} {1445137200 -7200 1 -03} {1456020000 -10800 0 -03} {1476586800 -7200 1 -03} {1487469600 -10800 0 -03} {1508036400 -7200 1 -03} {1518919200 -10800 0 -03} {1541300400 -7200 1 -03} {1550368800 -10800 0 -03} {1572750000 -7200 1 -03} {1581818400 -10800 0 -03} {1604199600 -7200 1 -03} {1613872800 -10800 0 -03} {1636254000 -7200 1 -03} {1645322400 -10800 0 -03} {1667703600 -7200 1 -03} {1677376800 -10800 0 -03} {1699153200 -7200 1 -03} {1708221600 -10800 0 -03} {1730602800 -7200 1 -03} {1739671200 -10800 0 -03} {1762052400 -7200 1 -03} {1771725600 -10800 0 -03} {1793502000 -7200 1 -03} {1803175200 -10800 0 -03} {1825556400 -7200 1 -03} {1834624800 -10800 0 -03} {1857006000 -7200 1 -03} {1866074400 -10800 0 -03} {1888455600 -7200 1 -03} {1897524000 -10800 0 -03} {1919905200 -7200 1 -03} {1928973600 -10800 0 -03} {1951354800 -7200 1 -03} {1960423200 -10800 0 -03} {1983409200 -7200 1 -03} {1992477600 -10800 0 -03} {2014858800 -7200 1 -03} {2024532000 -10800 0 -03} {2046308400 -7200 1 -03} {2055376800 -10800 0 -03} {2077758000 -7200 1 -03} {2086826400 -10800 0 -03} {2109207600 -7200 1 -03} {2118880800 -10800 0 -03} {2140657200 -7200 1 -03} {2150330400 -10800 0 -03} {2172711600 -7200 1 -03} {2181780000 -10800 0 -03} {2204161200 -7200 1 -03} {2213229600 -10800 0 -03} {2235610800 -7200 1 -03} {2244679200 -10800 0 -03} {2267060400 -7200 1 -03} {2276128800 -10800 0 -03} {2298510000 -7200 1 -03} {2307578400 -10800 0 -03} {2329959600 -7200 1 -03} {2339632800 -10800 0 -03} {2362014000 -7200 1 -03} {2371082400 -10800 0 -03} {2393463600 -7200 1 -03} {2402532000 -10800 0 -03} {2424913200 -7200 1 -03} {2433981600 -10800 0 -03} {2456362800 -7200 1 -03} {2465431200 -10800 0 -03} {2487812400 -7200 1 -03} {2497485600 -10800 0 -03} {2519866800 -7200 1 -03} {2528935200 -10800 0 -03} {2551316400 -7200 1 -03} {2560384800 -10800 0 -03} {2582766000 -7200 1 -03} {2591834400 -10800 0 -03} {2614215600 -7200 1 -03} {2623284000 -10800 0 -03} {2645665200 -7200 1 -03} {2654733600 -10800 0 -03} {2677114800 -7200 1 -03} {2686788000 -10800 0 -03} {2709169200 -7200 1 -03} {2718237600 -10800 0 -03} {2740618800 -7200 1 -03} {2749687200 -10800 0 -03} {2772068400 -7200 1 -03} {2781136800 -10800 0 -03} {2803518000 -7200 1 -03} {2812586400 -10800 0 -03} {2834967600 -7200 1 -03} {2844036000 -10800 0 -03} {2867022000 -7200 1 -03} {2876090400 -10800 0 -03} {2898471600 -7200 1 -03} {2907540000 -10800 0 -03} {2929921200 -7200 1 -03} {2938989600 -10800 0 -03} {2961370800 -7200 1 -03} {2970439200 -10800 0 -03} {2992820400 -7200 1 -03} {3001888800 -10800 0 -03} {3024270000 -7200 1 -03} {3033943200 -10800 0 -03} {3056324400 -7200 1 -03} {3065392800 -10800 0 -03} {3087774000 -7200 1 -03} {3096842400 -10800 0 -03} {3119223600 -7200 1 -03} {3128292000 -10800 0 -03} {3150673200 -7200 1 -03} {3159741600 -10800 0 -03} {3182122800 -7200 1 -03} {3191191200 -10800 0 -03} {3213572400 -7200 1 -03} {3223245600 -10800 0 -03} {3245626800 -7200 1 -03} {3254695200 -10800 0 -03} {3277076400 -7200 1 -03} {3286144800 -10800 0 -03} {3308526000 -7200 1 -03} {3317594400 -10800 0 -03} {3339975600 -7200 1 -03} {3349044000 -10800 0 -03} {3371425200 -7200 1 -03} {3381098400 -10800 0 -03} {3403479600 -7200 1 -03} {3412548000 -10800 0 -03} {3434929200 -7200 1 -03} {3443997600 -10800 0 -03} {3466378800 -7200 1 -03} {3475447200 -10800 0 -03} {3497828400 -7200 1 -03} {3506896800 -10800 0 -03} {3529278000 -7200 1 -03} {3538346400 -10800 0 -03} {3560727600 -7200 1 -03} {3570400800 -10800 0 -03} {3592782000 -7200 1 -03} {3601850400 -10800 0 -03} {3624231600 -7200 1 -03} {3633300000 -10800 0 -03} {3655681200 -7200 1 -03} {3664749600 -10800 0 -03} {3687130800 -7200 1 -03} {3696199200 -10800 0 -03} {3718580400 -7200 1 -03} {3727648800 -10800 0 -03} {3750634800 -7200 1 -03} {3759703200 -10800 0 -03} {3782084400 -7200 1 -03} {3791152800 -10800 0 -03} {3813534000 -7200 1 -03} {3822602400 -10800 0 -03} {3844983600 -7200 1 -03} {3854052000 -10800 0 -03} {3876433200 -7200 1 -03} {3885501600 -10800 0 -03} {3907882800 -7200 1 -03} {3917556000 -10800 0 -03} {3939937200 -7200 1 -03} {3949005600 -10800 0 -03} {3971386800 -7200 1 -03} {3980455200 -10800 0 -03} {4002836400 -7200 1 -03} {4011904800 -10800 0 -03} {4034286000 -7200 1 -03} {4043354400 -10800 0 -03} {4065735600 -7200 1 -03} {4074804000 -10800 0 -03} {4097185200 -7200 1 -03} } |
Changes to library/tzdata/Antarctica/Casey.
1 2 3 4 5 6 7 8 9 10 11 | # created by tools/tclZIC.tcl - do not edit set TZData(:Antarctica/Casey) { {-9223372036854775808 0 0 -00} {-31536000 28800 0 +08} {1255802400 39600 0 +11} {1267714800 28800 0 +08} {1319738400 39600 0 +11} {1329843600 28800 0 +08} {1477065600 39600 0 +11} } | > | 1 2 3 4 5 6 7 8 9 10 11 12 | # created by tools/tclZIC.tcl - do not edit set TZData(:Antarctica/Casey) { {-9223372036854775808 0 0 -00} {-31536000 28800 0 +08} {1255802400 39600 0 +11} {1267714800 28800 0 +08} {1319738400 39600 0 +11} {1329843600 28800 0 +08} {1477065600 39600 0 +11} {1520701200 28800 0 +08} } |
Changes to library/tzdata/Antarctica/Palmer.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Antarctica/Palmer) { {-9223372036854775808 0 0 -00} {-157766400 -14400 0 -04} {-152654400 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # created by tools/tclZIC.tcl - do not edit set TZData(:Antarctica/Palmer) { {-9223372036854775808 0 0 -00} {-157766400 -14400 0 -04} {-152654400 -14400 0 -04} {-132955200 -10800 1 -04} {-121122000 -14400 0 -04} {-101419200 -10800 1 -04} {-86821200 -14400 0 -04} {-71092800 -10800 1 -04} {-54766800 -14400 0 -04} {-39038400 -10800 1 -04} {-23317200 -14400 0 -04} {-7588800 -10800 0 -03} {128142000 -7200 1 -03} {136605600 -10800 0 -03} {389070000 -14400 0 -04} {403070400 -10800 1 -04} {416372400 -14400 0 -04} {434520000 -10800 1 -04} {447822000 -14400 0 -04} {466574400 -10800 1 -04} {479271600 -14400 0 -04} {498024000 -10800 1 -04} {510721200 -14400 0 -04} {529473600 -10800 1 -04} {545194800 -14400 0 -04} {560923200 -10800 1 -04} {574225200 -14400 0 -04} {592372800 -10800 1 -04} {605674800 -14400 0 -04} {624427200 -10800 1 -04} {637124400 -14400 0 -04} {653457600 -10800 1 -04} {668574000 -14400 0 -04} {687326400 -10800 1 -04} {700628400 -14400 0 -04} {718776000 -10800 1 -04} {732078000 -14400 0 -04} {750225600 -10800 1 -04} {763527600 -14400 0 -04} {781675200 -10800 1 -04} {794977200 -14400 0 -04} {813729600 -10800 1 -04} {826426800 -14400 0 -04} {845179200 -10800 1 -04} {859690800 -14400 0 -04} {876628800 -10800 1 -04} {889930800 -14400 0 -04} {906868800 -10800 1 -04} {923194800 -14400 0 -04} {939528000 -10800 1 -04} {952830000 -14400 0 -04} {971582400 -10800 1 -04} {984279600 -14400 0 -04} {1003032000 -10800 1 -04} {1015729200 -14400 0 -04} {1034481600 -10800 1 -04} {1047178800 -14400 0 -04} {1065931200 -10800 1 -04} {1079233200 -14400 0 -04} {1097380800 -10800 1 -04} {1110682800 -14400 0 -04} {1128830400 -10800 1 -04} {1142132400 -14400 0 -04} {1160884800 -10800 1 -04} {1173582000 -14400 0 -04} {1192334400 -10800 1 -04} {1206846000 -14400 0 -04} {1223784000 -10800 1 -04} {1237086000 -14400 0 -04} {1255233600 -10800 1 -04} {1270350000 -14400 0 -04} {1286683200 -10800 1 -04} {1304823600 -14400 0 -04} {1313899200 -10800 1 -04} {1335668400 -14400 0 -04} {1346558400 -10800 1 -04} {1367118000 -14400 0 -04} {1378612800 -10800 1 -04} {1398567600 -14400 0 -04} {1410062400 -10800 1 -04} {1463281200 -14400 0 -04} {1471147200 -10800 1 -04} {1480820400 -10800 0 -03} } |
Changes to library/tzdata/Asia/Almaty.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Almaty) { {-9223372036854775808 18468 0 LMT} {-1441170468 18000 0 +05} {-1247547600 21600 0 +06} | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Almaty) { {-9223372036854775808 18468 0 LMT} {-1441170468 18000 0 +05} {-1247547600 21600 0 +06} {354909600 25200 1 +06} {370717200 21600 0 +06} {386445600 25200 1 +06} {402253200 21600 0 +06} {417981600 25200 1 +06} {433789200 21600 0 +06} {449604000 25200 1 +06} {465336000 21600 0 +06} {481060800 25200 1 +06} {496785600 21600 0 +06} {512510400 25200 1 +06} {528235200 21600 0 +06} {543960000 25200 1 +06} {559684800 21600 0 +06} {575409600 25200 1 +06} {591134400 21600 0 +06} {606859200 25200 1 +06} {622584000 21600 0 +06} {638308800 25200 1 +06} {654638400 21600 0 +06} {670363200 18000 0 +05} {670366800 21600 1 +05} {686091600 18000 0 +05} {695768400 21600 0 +06} {701812800 25200 1 +06} {717537600 21600 0 +06} {733262400 25200 1 +06} {748987200 21600 0 +06} {764712000 25200 1 +06} {780436800 21600 0 +06} {796161600 25200 1 +06} {811886400 21600 0 +06} {828216000 25200 1 +06} {846360000 21600 0 +06} {859665600 25200 1 +06} {877809600 21600 0 +06} {891115200 25200 1 +06} {909259200 21600 0 +06} {922564800 25200 1 +06} {941313600 21600 0 +06} {954014400 25200 1 +06} {972763200 21600 0 +06} {985464000 25200 1 +06} {1004212800 21600 0 +06} {1017518400 25200 1 +06} {1035662400 21600 0 +06} {1048968000 25200 1 +06} {1067112000 21600 0 +06} {1080417600 25200 1 +06} {1099166400 21600 0 +06} } |
Changes to library/tzdata/Asia/Aqtau.
1 2 3 4 5 6 7 8 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Aqtau) { {-9223372036854775808 12064 0 LMT} {-1441164064 14400 0 +04} {-1247544000 18000 0 +05} {370724400 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Aqtau) { {-9223372036854775808 12064 0 LMT} {-1441164064 14400 0 +04} {-1247544000 18000 0 +05} {370724400 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 14400 0 +04} {670370400 18000 1 +04} {686095200 14400 0 +04} {695772000 18000 0 +05} {701816400 21600 1 +05} {717541200 18000 0 +05} {733266000 21600 1 +05} {748990800 18000 0 +05} {764715600 21600 1 +05} {780440400 18000 0 +04} {780444000 14400 0 +04} {796168800 18000 1 +04} {811893600 14400 0 +04} {828223200 18000 1 +04} {846367200 14400 0 +04} {859672800 18000 1 +04} {877816800 14400 0 +04} {891122400 18000 1 +04} {909266400 14400 0 +04} {922572000 18000 1 +04} {941320800 14400 0 +04} {954021600 18000 1 +04} {972770400 14400 0 +04} {985471200 18000 1 +04} {1004220000 14400 0 +04} {1017525600 18000 1 +04} {1035669600 14400 0 +04} {1048975200 18000 1 +04} {1067119200 14400 0 +04} {1080424800 18000 1 +04} {1099173600 18000 0 +05} } |
Changes to library/tzdata/Asia/Aqtobe.
1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Aqtobe) { {-9223372036854775808 13720 0 LMT} {-1441165720 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Aqtobe) { {-9223372036854775808 13720 0 LMT} {-1441165720 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 14400 0 +04} {670370400 18000 1 +04} {686095200 14400 0 +04} {695772000 18000 0 +05} {701816400 21600 1 +05} {717541200 18000 0 +05} {733266000 21600 1 +05} {748990800 18000 0 +05} {764715600 21600 1 +05} {780440400 18000 0 +05} {796165200 21600 1 +05} {811890000 18000 0 +05} {828219600 21600 1 +05} {846363600 18000 0 +05} {859669200 21600 1 +05} {877813200 18000 0 +05} {891118800 21600 1 +05} {909262800 18000 0 +05} {922568400 21600 1 +05} {941317200 18000 0 +05} {954018000 21600 1 +05} {972766800 18000 0 +05} {985467600 21600 1 +05} {1004216400 18000 0 +05} {1017522000 21600 1 +05} {1035666000 18000 0 +05} {1048971600 21600 1 +05} {1067115600 18000 0 +05} {1080421200 21600 1 +05} {1099170000 18000 0 +05} } |
Changes to library/tzdata/Asia/Ashgabat.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Ashgabat) { {-9223372036854775808 14012 0 LMT} {-1441166012 14400 0 +04} {-1247544000 18000 0 +05} | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Ashgabat) { {-9223372036854775808 14012 0 LMT} {-1441166012 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +05} {370720800 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 14400 0 +04} {670370400 18000 1 +04} {686095200 14400 0 +04} {695772000 18000 0 +05} } |
Changes to library/tzdata/Asia/Atyrau.
1 2 3 4 5 6 7 8 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Atyrau) { {-9223372036854775808 12464 0 LMT} {-1441164464 10800 0 +03} {-1247540400 18000 0 +05} {370724400 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Atyrau) { {-9223372036854775808 12464 0 LMT} {-1441164464 10800 0 +03} {-1247540400 18000 0 +05} {370724400 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 14400 0 +04} {670370400 18000 1 +04} {686095200 14400 0 +04} {695772000 18000 0 +05} {701816400 21600 1 +05} {717541200 18000 0 +05} {733266000 21600 1 +05} {748990800 18000 0 +05} {764715600 21600 1 +05} {780440400 18000 0 +05} {796165200 21600 1 +05} {811890000 18000 0 +05} {828219600 21600 1 +05} {846363600 18000 0 +05} {859669200 21600 1 +05} {877813200 18000 0 +05} {891118800 21600 1 +05} {909262800 18000 0 +05} {922568400 14400 0 +04} {922572000 18000 1 +04} {941320800 14400 0 +04} {954021600 18000 1 +04} {972770400 14400 0 +04} {985471200 18000 1 +04} {1004220000 14400 0 +04} {1017525600 18000 1 +04} {1035669600 14400 0 +04} {1048975200 18000 1 +04} {1067119200 14400 0 +04} {1080424800 18000 1 +04} {1099173600 18000 0 +05} } |
Changes to library/tzdata/Asia/Baghdad.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Baghdad) { {-9223372036854775808 10660 0 LMT} {-2524532260 10656 0 BMT} {-1641005856 10800 0 +03} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Baghdad) { {-9223372036854775808 10660 0 LMT} {-2524532260 10656 0 BMT} {-1641005856 10800 0 +03} {389048400 14400 0 +03} {402264000 10800 0 +03} {417906000 14400 1 +03} {433800000 10800 0 +03} {449614800 14400 1 +03} {465422400 10800 0 +03} {481150800 14400 1 +03} {496792800 10800 0 +03} {512517600 14400 1 +03} {528242400 10800 0 +03} {543967200 14400 1 +03} {559692000 10800 0 +03} {575416800 14400 1 +03} {591141600 10800 0 +03} {606866400 14400 1 +03} {622591200 10800 0 +03} {638316000 14400 1 +03} {654645600 10800 0 +03} {670464000 14400 1 +03} {686275200 10800 0 +03} {702086400 14400 1 +03} {717897600 10800 0 +03} {733622400 14400 1 +03} {749433600 10800 0 +03} {765158400 14400 1 +03} {780969600 10800 0 +03} {796694400 14400 1 +03} {812505600 10800 0 +03} {828316800 14400 1 +03} {844128000 10800 0 +03} {859852800 14400 1 +03} {875664000 10800 0 +03} {891388800 14400 1 +03} {907200000 10800 0 +03} {922924800 14400 1 +03} {938736000 10800 0 +03} {954547200 14400 1 +03} {970358400 10800 0 +03} {986083200 14400 1 +03} {1001894400 10800 0 +03} {1017619200 14400 1 +03} {1033430400 10800 0 +03} {1049155200 14400 1 +03} {1064966400 10800 0 +03} {1080777600 14400 1 +03} {1096588800 10800 0 +03} {1112313600 14400 1 +03} {1128124800 10800 0 +03} {1143849600 14400 1 +03} {1159660800 10800 0 +03} {1175385600 14400 1 +03} {1191196800 10800 0 +03} } |
Changes to library/tzdata/Asia/Baku.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Baku) { {-9223372036854775808 11964 0 LMT} {-1441163964 10800 0 +03} {-405140400 14400 0 +04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Baku) { {-9223372036854775808 11964 0 LMT} {-1441163964 10800 0 +03} {-405140400 14400 0 +04} {354916800 18000 1 +04} {370724400 14400 0 +04} {386452800 18000 1 +04} {402260400 14400 0 +04} {417988800 18000 1 +04} {433796400 14400 0 +04} {449611200 18000 1 +04} {465343200 14400 0 +04} {481068000 18000 1 +04} {496792800 14400 0 +04} {512517600 18000 1 +04} {528242400 14400 0 +04} {543967200 18000 1 +04} {559692000 14400 0 +04} {575416800 18000 1 +04} {591141600 14400 0 +04} {606866400 18000 1 +04} {622591200 14400 0 +04} {638316000 18000 1 +04} {654645600 14400 0 +04} {670370400 10800 0 +03} {670374000 14400 1 +03} {686098800 10800 0 +03} {701823600 14400 1 +03} {717548400 14400 0 +04} {820440000 14400 0 +04} {828234000 18000 1 +05} {846378000 14400 0 +04} {852062400 14400 0 +04} {859680000 18000 1 +04} {877824000 14400 0 +04} {891129600 18000 1 +04} {909273600 14400 0 +04} {922579200 18000 1 +04} {941328000 14400 0 +04} {954028800 18000 1 +04} {972777600 14400 0 +04} {985478400 18000 1 +04} {1004227200 14400 0 +04} {1017532800 18000 1 +04} {1035676800 14400 0 +04} {1048982400 18000 1 +04} {1067126400 14400 0 +04} {1080432000 18000 1 +04} {1099180800 14400 0 +04} {1111881600 18000 1 +04} {1130630400 14400 0 +04} {1143331200 18000 1 +04} {1162080000 14400 0 +04} {1174780800 18000 1 +04} {1193529600 14400 0 +04} {1206835200 18000 1 +04} {1224979200 14400 0 +04} {1238284800 18000 1 +04} {1256428800 14400 0 +04} {1269734400 18000 1 +04} {1288483200 14400 0 +04} {1301184000 18000 1 +04} {1319932800 14400 0 +04} {1332633600 18000 1 +04} {1351382400 14400 0 +04} {1364688000 18000 1 +04} {1382832000 14400 0 +04} {1396137600 18000 1 +04} {1414281600 14400 0 +04} {1427587200 18000 1 +04} {1445731200 14400 0 +04} } |
Changes to library/tzdata/Asia/Bishkek.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Bishkek) { {-9223372036854775808 17904 0 LMT} {-1441169904 18000 0 +05} {-1247547600 21600 0 +06} | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Bishkek) { {-9223372036854775808 17904 0 LMT} {-1441169904 18000 0 +05} {-1247547600 21600 0 +06} {354909600 25200 1 +06} {370717200 21600 0 +06} {386445600 25200 1 +06} {402253200 21600 0 +06} {417981600 25200 1 +06} {433789200 21600 0 +06} {449604000 25200 1 +06} {465336000 21600 0 +06} {481060800 25200 1 +06} {496785600 21600 0 +06} {512510400 25200 1 +06} {528235200 21600 0 +06} {543960000 25200 1 +06} {559684800 21600 0 +06} {575409600 25200 1 +06} {591134400 21600 0 +06} {606859200 25200 1 +06} {622584000 21600 0 +06} {638308800 25200 1 +06} {654638400 21600 0 +06} {670363200 18000 0 +05} {670366800 21600 1 +05} {683586000 18000 0 +05} {703018800 21600 1 +05} {717530400 18000 0 +05} {734468400 21600 1 +05} {748980000 18000 0 +05} {765918000 21600 1 +05} {780429600 18000 0 +05} {797367600 21600 1 +05} {811879200 18000 0 +05} {828817200 21600 1 +05} {843933600 18000 0 +05} {859671000 21600 1 +05} {877811400 18000 0 +05} {891120600 21600 1 +05} {909261000 18000 0 +05} {922570200 21600 1 +05} {941315400 18000 0 +05} {954019800 21600 1 +05} {972765000 18000 0 +05} {985469400 21600 1 +05} {1004214600 18000 0 +05} {1017523800 21600 1 +05} {1035664200 18000 0 +05} {1048973400 21600 1 +05} {1067113800 18000 0 +05} {1080423000 21600 1 +05} {1099168200 18000 0 +05} {1111872600 21600 1 +05} {1123783200 21600 0 +06} } |
Changes to library/tzdata/Asia/Choibalsan.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Choibalsan) { {-9223372036854775808 27480 0 LMT} {-2032933080 25200 0 +07} {252435600 28800 0 +08} | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Choibalsan) { {-9223372036854775808 27480 0 LMT} {-2032933080 25200 0 +07} {252435600 28800 0 +08} {417974400 36000 0 +09} {433778400 32400 0 +09} {449593200 36000 1 +09} {465314400 32400 0 +09} {481042800 36000 1 +09} {496764000 32400 0 +09} {512492400 36000 1 +09} {528213600 32400 0 +09} {543942000 36000 1 +09} {559663200 32400 0 +09} {575391600 36000 1 +09} {591112800 32400 0 +09} {606841200 36000 1 +09} {622562400 32400 0 +09} {638290800 36000 1 +09} {654616800 32400 0 +09} {670345200 36000 1 +09} {686066400 32400 0 +09} {701794800 36000 1 +09} {717516000 32400 0 +09} {733244400 36000 1 +09} {748965600 32400 0 +09} {764694000 36000 1 +09} {780415200 32400 0 +09} {796143600 36000 1 +09} {811864800 32400 0 +09} {828198000 36000 1 +09} {843919200 32400 0 +09} {859647600 36000 1 +09} {875368800 32400 0 +09} {891097200 36000 1 +09} {906818400 32400 0 +09} {988390800 36000 1 +09} {1001692800 32400 0 +09} {1017421200 36000 1 +09} {1033142400 32400 0 +09} {1048870800 36000 1 +09} {1064592000 32400 0 +09} {1080320400 36000 1 +09} {1096041600 32400 0 +09} {1111770000 36000 1 +09} {1127491200 32400 0 +09} {1143219600 36000 1 +09} {1159545600 32400 0 +09} {1206889200 28800 0 +08} {1427479200 32400 1 +08} {1443193200 28800 0 +08} {1458928800 32400 1 +08} {1474642800 28800 0 +08} } |
Changes to library/tzdata/Asia/Dhaka.
1 2 3 4 5 6 7 8 9 10 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Dhaka) { {-9223372036854775808 21700 0 LMT} {-2524543300 21200 0 HMT} {-891582800 23400 0 +0630} {-872058600 19800 0 +0530} {-862637400 23400 0 +0630} {-576138600 21600 0 +06} {1230746400 21600 0 +06} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Dhaka) { {-9223372036854775808 21700 0 LMT} {-2524543300 21200 0 HMT} {-891582800 23400 0 +0630} {-872058600 19800 0 +0530} {-862637400 23400 0 +0630} {-576138600 21600 0 +06} {1230746400 21600 0 +06} {1245430800 25200 1 +06} {1262278800 21600 0 +06} } |
Changes to library/tzdata/Asia/Dushanbe.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Dushanbe) { {-9223372036854775808 16512 0 LMT} {-1441168512 18000 0 +05} {-1247547600 21600 0 +06} | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Dushanbe) { {-9223372036854775808 16512 0 LMT} {-1441168512 18000 0 +05} {-1247547600 21600 0 +06} {354909600 25200 1 +06} {370717200 21600 0 +06} {386445600 25200 1 +06} {402253200 21600 0 +06} {417981600 25200 1 +06} {433789200 21600 0 +06} {449604000 25200 1 +06} {465336000 21600 0 +06} {481060800 25200 1 +06} {496785600 21600 0 +06} {512510400 25200 1 +06} {528235200 21600 0 +06} {543960000 25200 1 +06} {559684800 21600 0 +06} {575409600 25200 1 +06} {591134400 21600 0 +06} {606859200 25200 1 +06} {622584000 21600 0 +06} {638308800 25200 1 +06} {654638400 21600 0 +06} {670363200 21600 1 +06} {684363600 18000 0 +05} } |
Changes to library/tzdata/Asia/Gaza.
︙ | ︙ | |||
107 108 109 110 111 112 113 | {1414098000 7200 0 EET} {1427493600 10800 1 EEST} {1445547600 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} {1509141600 7200 0 EET} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | {1414098000 7200 0 EET} {1427493600 10800 1 EEST} {1445547600 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} {1509141600 7200 0 EET} {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553295600 10800 1 EEST} {1572040800 7200 0 EET} {1585350000 10800 1 EEST} {1604095200 7200 0 EET} {1616799600 10800 1 EEST} {1635544800 7200 0 EET} {1648249200 10800 1 EEST} {1666994400 7200 0 EET} {1679698800 10800 1 EEST} {1698444000 7200 0 EET} {1711148400 10800 1 EEST} {1729893600 7200 0 EET} {1742598000 10800 1 EEST} {1761343200 7200 0 EET} {1774652400 10800 1 EEST} {1793397600 7200 0 EET} {1806102000 10800 1 EEST} {1824847200 7200 0 EET} {1837551600 10800 1 EEST} {1856296800 7200 0 EET} {1869001200 10800 1 EEST} {1887746400 7200 0 EET} {1900450800 10800 1 EEST} {1919196000 7200 0 EET} {1931900400 10800 1 EEST} {1950645600 7200 0 EET} {1963954800 10800 1 EEST} {1982700000 7200 0 EET} {1995404400 10800 1 EEST} {2014149600 7200 0 EET} {2026854000 10800 1 EEST} {2045599200 7200 0 EET} {2058303600 10800 1 EEST} {2077048800 7200 0 EET} {2089753200 10800 1 EEST} {2108498400 7200 0 EET} {2121807600 10800 1 EEST} {2140552800 7200 0 EET} {2153257200 10800 1 EEST} {2172002400 7200 0 EET} {2184706800 10800 1 EEST} {2203452000 7200 0 EET} {2216156400 10800 1 EEST} {2234901600 7200 0 EET} {2247606000 10800 1 EEST} {2266351200 7200 0 EET} {2279055600 10800 1 EEST} {2297800800 7200 0 EET} {2311110000 10800 1 EEST} {2329855200 7200 0 EET} {2342559600 10800 1 EEST} {2361304800 7200 0 EET} {2374009200 10800 1 EEST} {2392754400 7200 0 EET} {2405458800 10800 1 EEST} {2424204000 7200 0 EET} {2436908400 10800 1 EEST} {2455653600 7200 0 EET} {2468962800 10800 1 EEST} {2487708000 7200 0 EET} {2500412400 10800 1 EEST} {2519157600 7200 0 EET} {2531862000 10800 1 EEST} {2550607200 7200 0 EET} {2563311600 10800 1 EEST} {2582056800 7200 0 EET} {2594761200 10800 1 EEST} {2613506400 7200 0 EET} {2626210800 10800 1 EEST} {2644956000 7200 0 EET} {2658265200 10800 1 EEST} {2677010400 7200 0 EET} {2689714800 10800 1 EEST} {2708460000 7200 0 EET} {2721164400 10800 1 EEST} {2739909600 7200 0 EET} {2752614000 10800 1 EEST} {2771359200 7200 0 EET} {2784063600 10800 1 EEST} {2802808800 7200 0 EET} {2815513200 10800 1 EEST} {2834258400 7200 0 EET} {2847567600 10800 1 EEST} {2866312800 7200 0 EET} {2879017200 10800 1 EEST} {2897762400 7200 0 EET} {2910466800 10800 1 EEST} {2929212000 7200 0 EET} {2941916400 10800 1 EEST} {2960661600 7200 0 EET} {2973366000 10800 1 EEST} {2992111200 7200 0 EET} {3005420400 10800 1 EEST} {3024165600 7200 0 EET} {3036870000 10800 1 EEST} {3055615200 7200 0 EET} {3068319600 10800 1 EEST} {3087064800 7200 0 EET} {3099769200 10800 1 EEST} {3118514400 7200 0 EET} {3131218800 10800 1 EEST} {3149964000 7200 0 EET} {3162668400 10800 1 EEST} {3181413600 7200 0 EET} {3194722800 10800 1 EEST} {3213468000 7200 0 EET} {3226172400 10800 1 EEST} {3244917600 7200 0 EET} {3257622000 10800 1 EEST} {3276367200 7200 0 EET} {3289071600 10800 1 EEST} {3307816800 7200 0 EET} {3320521200 10800 1 EEST} {3339266400 7200 0 EET} {3352575600 10800 1 EEST} {3371320800 7200 0 EET} {3384025200 10800 1 EEST} {3402770400 7200 0 EET} {3415474800 10800 1 EEST} {3434220000 7200 0 EET} {3446924400 10800 1 EEST} {3465669600 7200 0 EET} {3478374000 10800 1 EEST} {3497119200 7200 0 EET} {3509823600 10800 1 EEST} {3528568800 7200 0 EET} {3541878000 10800 1 EEST} {3560623200 7200 0 EET} {3573327600 10800 1 EEST} {3592072800 7200 0 EET} {3604777200 10800 1 EEST} {3623522400 7200 0 EET} {3636226800 10800 1 EEST} {3654972000 7200 0 EET} {3667676400 10800 1 EEST} {3686421600 7200 0 EET} {3699126000 10800 1 EEST} {3717871200 7200 0 EET} {3731180400 10800 1 EEST} {3749925600 7200 0 EET} {3762630000 10800 1 EEST} {3781375200 7200 0 EET} {3794079600 10800 1 EEST} {3812824800 7200 0 EET} {3825529200 10800 1 EEST} {3844274400 7200 0 EET} {3856978800 10800 1 EEST} {3875724000 7200 0 EET} {3889033200 10800 1 EEST} {3907778400 7200 0 EET} {3920482800 10800 1 EEST} {3939228000 7200 0 EET} {3951932400 10800 1 EEST} {3970677600 7200 0 EET} {3983382000 10800 1 EEST} {4002127200 7200 0 EET} {4014831600 10800 1 EEST} {4033576800 7200 0 EET} {4046281200 10800 1 EEST} {4065026400 7200 0 EET} {4078335600 10800 1 EEST} {4097080800 7200 0 EET} } |
Changes to library/tzdata/Asia/Hebron.
︙ | ︙ | |||
106 107 108 109 110 111 112 | {1414098000 7200 0 EET} {1427493600 10800 1 EEST} {1445547600 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} {1509141600 7200 0 EET} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | {1414098000 7200 0 EET} {1427493600 10800 1 EEST} {1445547600 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} {1509141600 7200 0 EET} {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553295600 10800 1 EEST} {1572040800 7200 0 EET} {1585350000 10800 1 EEST} {1604095200 7200 0 EET} {1616799600 10800 1 EEST} {1635544800 7200 0 EET} {1648249200 10800 1 EEST} {1666994400 7200 0 EET} {1679698800 10800 1 EEST} {1698444000 7200 0 EET} {1711148400 10800 1 EEST} {1729893600 7200 0 EET} {1742598000 10800 1 EEST} {1761343200 7200 0 EET} {1774652400 10800 1 EEST} {1793397600 7200 0 EET} {1806102000 10800 1 EEST} {1824847200 7200 0 EET} {1837551600 10800 1 EEST} {1856296800 7200 0 EET} {1869001200 10800 1 EEST} {1887746400 7200 0 EET} {1900450800 10800 1 EEST} {1919196000 7200 0 EET} {1931900400 10800 1 EEST} {1950645600 7200 0 EET} {1963954800 10800 1 EEST} {1982700000 7200 0 EET} {1995404400 10800 1 EEST} {2014149600 7200 0 EET} {2026854000 10800 1 EEST} {2045599200 7200 0 EET} {2058303600 10800 1 EEST} {2077048800 7200 0 EET} {2089753200 10800 1 EEST} {2108498400 7200 0 EET} {2121807600 10800 1 EEST} {2140552800 7200 0 EET} {2153257200 10800 1 EEST} {2172002400 7200 0 EET} {2184706800 10800 1 EEST} {2203452000 7200 0 EET} {2216156400 10800 1 EEST} {2234901600 7200 0 EET} {2247606000 10800 1 EEST} {2266351200 7200 0 EET} {2279055600 10800 1 EEST} {2297800800 7200 0 EET} {2311110000 10800 1 EEST} {2329855200 7200 0 EET} {2342559600 10800 1 EEST} {2361304800 7200 0 EET} {2374009200 10800 1 EEST} {2392754400 7200 0 EET} {2405458800 10800 1 EEST} {2424204000 7200 0 EET} {2436908400 10800 1 EEST} {2455653600 7200 0 EET} {2468962800 10800 1 EEST} {2487708000 7200 0 EET} {2500412400 10800 1 EEST} {2519157600 7200 0 EET} {2531862000 10800 1 EEST} {2550607200 7200 0 EET} {2563311600 10800 1 EEST} {2582056800 7200 0 EET} {2594761200 10800 1 EEST} {2613506400 7200 0 EET} {2626210800 10800 1 EEST} {2644956000 7200 0 EET} {2658265200 10800 1 EEST} {2677010400 7200 0 EET} {2689714800 10800 1 EEST} {2708460000 7200 0 EET} {2721164400 10800 1 EEST} {2739909600 7200 0 EET} {2752614000 10800 1 EEST} {2771359200 7200 0 EET} {2784063600 10800 1 EEST} {2802808800 7200 0 EET} {2815513200 10800 1 EEST} {2834258400 7200 0 EET} {2847567600 10800 1 EEST} {2866312800 7200 0 EET} {2879017200 10800 1 EEST} {2897762400 7200 0 EET} {2910466800 10800 1 EEST} {2929212000 7200 0 EET} {2941916400 10800 1 EEST} {2960661600 7200 0 EET} {2973366000 10800 1 EEST} {2992111200 7200 0 EET} {3005420400 10800 1 EEST} {3024165600 7200 0 EET} {3036870000 10800 1 EEST} {3055615200 7200 0 EET} {3068319600 10800 1 EEST} {3087064800 7200 0 EET} {3099769200 10800 1 EEST} {3118514400 7200 0 EET} {3131218800 10800 1 EEST} {3149964000 7200 0 EET} {3162668400 10800 1 EEST} {3181413600 7200 0 EET} {3194722800 10800 1 EEST} {3213468000 7200 0 EET} {3226172400 10800 1 EEST} {3244917600 7200 0 EET} {3257622000 10800 1 EEST} {3276367200 7200 0 EET} {3289071600 10800 1 EEST} {3307816800 7200 0 EET} {3320521200 10800 1 EEST} {3339266400 7200 0 EET} {3352575600 10800 1 EEST} {3371320800 7200 0 EET} {3384025200 10800 1 EEST} {3402770400 7200 0 EET} {3415474800 10800 1 EEST} {3434220000 7200 0 EET} {3446924400 10800 1 EEST} {3465669600 7200 0 EET} {3478374000 10800 1 EEST} {3497119200 7200 0 EET} {3509823600 10800 1 EEST} {3528568800 7200 0 EET} {3541878000 10800 1 EEST} {3560623200 7200 0 EET} {3573327600 10800 1 EEST} {3592072800 7200 0 EET} {3604777200 10800 1 EEST} {3623522400 7200 0 EET} {3636226800 10800 1 EEST} {3654972000 7200 0 EET} {3667676400 10800 1 EEST} {3686421600 7200 0 EET} {3699126000 10800 1 EEST} {3717871200 7200 0 EET} {3731180400 10800 1 EEST} {3749925600 7200 0 EET} {3762630000 10800 1 EEST} {3781375200 7200 0 EET} {3794079600 10800 1 EEST} {3812824800 7200 0 EET} {3825529200 10800 1 EEST} {3844274400 7200 0 EET} {3856978800 10800 1 EEST} {3875724000 7200 0 EET} {3889033200 10800 1 EEST} {3907778400 7200 0 EET} {3920482800 10800 1 EEST} {3939228000 7200 0 EET} {3951932400 10800 1 EEST} {3970677600 7200 0 EET} {3983382000 10800 1 EEST} {4002127200 7200 0 EET} {4014831600 10800 1 EEST} {4033576800 7200 0 EET} {4046281200 10800 1 EEST} {4065026400 7200 0 EET} {4078335600 10800 1 EEST} {4097080800 7200 0 EET} } |
Changes to library/tzdata/Asia/Hovd.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Hovd) { {-9223372036854775808 21996 0 LMT} {-2032927596 21600 0 +06} {252439200 25200 0 +07} | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Hovd) { {-9223372036854775808 21996 0 LMT} {-2032927596 21600 0 +06} {252439200 25200 0 +07} {417978000 28800 1 +07} {433785600 25200 0 +07} {449600400 28800 1 +07} {465321600 25200 0 +07} {481050000 28800 1 +07} {496771200 25200 0 +07} {512499600 28800 1 +07} {528220800 25200 0 +07} {543949200 28800 1 +07} {559670400 25200 0 +07} {575398800 28800 1 +07} {591120000 25200 0 +07} {606848400 28800 1 +07} {622569600 25200 0 +07} {638298000 28800 1 +07} {654624000 25200 0 +07} {670352400 28800 1 +07} {686073600 25200 0 +07} {701802000 28800 1 +07} {717523200 25200 0 +07} {733251600 28800 1 +07} {748972800 25200 0 +07} {764701200 28800 1 +07} {780422400 25200 0 +07} {796150800 28800 1 +07} {811872000 25200 0 +07} {828205200 28800 1 +07} {843926400 25200 0 +07} {859654800 28800 1 +07} {875376000 25200 0 +07} {891104400 28800 1 +07} {906825600 25200 0 +07} {988398000 28800 1 +07} {1001700000 25200 0 +07} {1017428400 28800 1 +07} {1033149600 25200 0 +07} {1048878000 28800 1 +07} {1064599200 25200 0 +07} {1080327600 28800 1 +07} {1096048800 25200 0 +07} {1111777200 28800 1 +07} {1127498400 25200 0 +07} {1143226800 28800 1 +07} {1159552800 25200 0 +07} {1427482800 28800 1 +07} {1443196800 25200 0 +07} {1458932400 28800 1 +07} {1474646400 25200 0 +07} } |
Changes to library/tzdata/Asia/Kuching.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Kuching) { {-9223372036854775808 26480 0 LMT} {-1383463280 27000 0 +0730} {-1167636600 28800 0 +08} | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Kuching) { {-9223372036854775808 26480 0 LMT} {-1383463280 27000 0 +0730} {-1167636600 28800 0 +08} {-1082448000 30000 1 +08} {-1074586800 28800 0 +08} {-1050825600 30000 1 +08} {-1042964400 28800 0 +08} {-1019289600 30000 1 +08} {-1011428400 28800 0 +08} {-987753600 30000 1 +08} {-979892400 28800 0 +08} {-956217600 30000 1 +08} {-948356400 28800 0 +08} {-924595200 30000 1 +08} {-916734000 28800 0 +08} {-893059200 30000 1 +08} {-885198000 28800 0 +08} {-879667200 32400 0 +09} {-767005200 28800 0 +08} } |
Changes to library/tzdata/Asia/Macau.
1 2 3 4 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Macau) { {-9223372036854775808 27260 0 LMT} | | | 1 2 3 4 5 6 7 8 9 10 11 12 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Macau) { {-9223372036854775808 27260 0 LMT} {-1830412800 28800 0 CST} {-277360200 32400 1 CDT} {-257405400 28800 0 CST} {-245910600 32400 1 CDT} {-225955800 28800 0 CST} {-214473600 32400 1 CDT} {-194506200 28800 0 CST} {-182406600 32400 1 CDT} |
︙ | ︙ |
Changes to library/tzdata/Asia/Manila.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Manila) { {-9223372036854775808 -57360 0 LMT} {-3944621040 29040 0 LMT} {-2229321840 28800 0 +08} | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Manila) { {-9223372036854775808 -57360 0 LMT} {-3944621040 29040 0 LMT} {-2229321840 28800 0 +08} {-1046678400 32400 1 +08} {-1038733200 28800 0 +08} {-873273600 32400 0 +09} {-794221200 28800 0 +08} {-496224000 32400 1 +08} {-489315600 28800 0 +08} {259344000 32400 1 +08} {275151600 28800 0 +08} } |
Changes to library/tzdata/Asia/Oral.
1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Oral) { {-9223372036854775808 12324 0 LMT} {-1441164324 10800 0 +03} {-1247540400 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Oral) { {-9223372036854775808 12324 0 LMT} {-1441164324 10800 0 +03} {-1247540400 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 14400 0 +04} {606866400 18000 1 +04} {622591200 14400 0 +04} {638316000 18000 1 +04} {654645600 14400 0 +04} {670370400 18000 1 +04} {686095200 14400 0 +04} {701816400 14400 0 +04} {701820000 18000 1 +04} {717544800 14400 0 +04} {733269600 18000 1 +04} {748994400 14400 0 +04} {764719200 18000 1 +04} {780444000 14400 0 +04} {796168800 18000 1 +04} {811893600 14400 0 +04} {828223200 18000 1 +04} {846367200 14400 0 +04} {859672800 18000 1 +04} {877816800 14400 0 +04} {891122400 18000 1 +04} {909266400 14400 0 +04} {922572000 18000 1 +04} {941320800 14400 0 +04} {954021600 18000 1 +04} {972770400 14400 0 +04} {985471200 18000 1 +04} {1004220000 14400 0 +04} {1017525600 18000 1 +04} {1035669600 14400 0 +04} {1048975200 18000 1 +04} {1067119200 14400 0 +04} {1080424800 18000 1 +04} {1099173600 18000 0 +05} } |
Changes to library/tzdata/Asia/Qyzylorda.
1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Qyzylorda) { {-9223372036854775808 15712 0 LMT} {-1441167712 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Qyzylorda) { {-9223372036854775808 15712 0 LMT} {-1441167712 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 14400 0 +04} {670370400 18000 1 +04} {701812800 18000 0 +05} {701816400 21600 1 +05} {717541200 18000 0 +05} {733266000 21600 1 +05} {748990800 18000 0 +05} {764715600 21600 1 +05} {780440400 18000 0 +05} {796165200 21600 1 +05} {811890000 18000 0 +05} {828219600 21600 1 +05} {846363600 18000 0 +05} {859669200 21600 1 +05} {877813200 18000 0 +05} {891118800 21600 1 +05} {909262800 18000 0 +05} {922568400 21600 1 +05} {941317200 18000 0 +05} {954018000 21600 1 +05} {972766800 18000 0 +05} {985467600 21600 1 +05} {1004216400 18000 0 +05} {1017522000 21600 1 +05} {1035666000 18000 0 +05} {1048971600 21600 1 +05} {1067115600 18000 0 +05} {1080421200 21600 1 +05} {1099170000 21600 0 +06} } |
Changes to library/tzdata/Asia/Samarkand.
1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Samarkand) { {-9223372036854775808 16073 0 LMT} {-1441168073 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Samarkand) { {-9223372036854775808 16073 0 LMT} {-1441168073 14400 0 +04} {-1247544000 18000 0 +05} {354913200 21600 1 +06} {370720800 21600 0 +06} {386445600 18000 0 +05} {386449200 21600 1 +05} {402256800 18000 0 +05} {417985200 21600 1 +05} {433792800 18000 0 +05} {449607600 21600 1 +05} {465339600 18000 0 +05} {481064400 21600 1 +05} {496789200 18000 0 +05} {512514000 21600 1 +05} {528238800 18000 0 +05} {543963600 21600 1 +05} {559688400 18000 0 +05} {575413200 21600 1 +05} {591138000 18000 0 +05} {606862800 21600 1 +05} {622587600 18000 0 +05} {638312400 21600 1 +05} {654642000 18000 0 +05} {670366800 21600 1 +05} {686091600 18000 0 +05} {694206000 18000 0 +05} } |
Changes to library/tzdata/Asia/Tashkent.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tashkent) { {-9223372036854775808 16631 0 LMT} {-1441168631 18000 0 +05} {-1247547600 21600 0 +06} | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tashkent) { {-9223372036854775808 16631 0 LMT} {-1441168631 18000 0 +05} {-1247547600 21600 0 +06} {354909600 25200 1 +06} {370717200 21600 0 +06} {386445600 25200 1 +06} {402253200 21600 0 +06} {417981600 25200 1 +06} {433789200 21600 0 +06} {449604000 25200 1 +06} {465336000 21600 0 +06} {481060800 25200 1 +06} {496785600 21600 0 +06} {512510400 25200 1 +06} {528235200 21600 0 +06} {543960000 25200 1 +06} {559684800 21600 0 +06} {575409600 25200 1 +06} {591134400 21600 0 +06} {606859200 25200 1 +06} {622584000 21600 0 +06} {638308800 25200 1 +06} {654638400 21600 0 +06} {670363200 18000 0 +05} {670366800 21600 1 +05} {686091600 18000 0 +05} {694206000 18000 0 +05} } |
Changes to library/tzdata/Asia/Tbilisi.
1 2 3 4 5 6 7 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tbilisi) { {-9223372036854775808 10751 0 LMT} {-2840151551 10751 0 TBMT} {-1441162751 10800 0 +03} {-405140400 14400 0 +04} | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tbilisi) { {-9223372036854775808 10751 0 LMT} {-2840151551 10751 0 TBMT} {-1441162751 10800 0 +03} {-405140400 14400 0 +04} {354916800 18000 1 +04} {370724400 14400 0 +04} {386452800 18000 1 +04} {402260400 14400 0 +04} {417988800 18000 1 +04} {433796400 14400 0 +04} {449611200 18000 1 +04} {465343200 14400 0 +04} {481068000 18000 1 +04} {496792800 14400 0 +04} {512517600 18000 1 +04} {528242400 14400 0 +04} {543967200 18000 1 +04} {559692000 14400 0 +04} {575416800 18000 1 +04} {591141600 14400 0 +04} {606866400 18000 1 +04} {622591200 14400 0 +04} {638316000 18000 1 +04} {654645600 14400 0 +04} {670370400 10800 0 +03} {670374000 14400 1 +03} {686098800 10800 0 +03} {694213200 10800 0 +03} {701816400 14400 1 +03} {717537600 10800 0 +03} {733266000 14400 1 +03} {748987200 10800 0 +03} {764715600 14400 1 +03} {780440400 14400 0 +04} {796161600 18000 1 +04} {811882800 14400 0 +04} {828216000 18000 1 +04} {846360000 18000 1 +05} {859662000 18000 0 +04} {877806000 14400 0 +04} {891115200 18000 1 +04} {909255600 14400 0 +04} {922564800 18000 1 +04} {941310000 14400 0 +04} {954014400 18000 1 +04} {972759600 14400 0 +04} {985464000 18000 1 +04} {1004209200 14400 0 +04} {1017518400 18000 1 +04} {1035658800 14400 0 +04} {1048968000 18000 1 +04} {1067108400 14400 0 +04} {1080417600 18000 1 +04} {1088280000 14400 0 +03} {1099177200 10800 0 +03} {1111878000 14400 0 +04} } |
Changes to library/tzdata/Asia/Tehran.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tehran) { {-9223372036854775808 12344 0 LMT} {-1704165944 12344 0 TMT} {-757394744 12600 0 +0330} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Tehran) { {-9223372036854775808 12344 0 LMT} {-1704165944 12344 0 TMT} {-757394744 12600 0 +0330} {247177800 14400 0 +04} {259272000 18000 1 +04} {277758000 14400 0 +04} {283982400 12600 0 +0330} {290809800 16200 1 +0330} {306531000 12600 0 +0330} {322432200 16200 1 +0330} {338499000 12600 0 +0330} {673216200 16200 1 +0330} {685481400 12600 0 +0330} {701209800 16200 1 +0330} {717103800 12600 0 +0330} {732745800 16200 1 +0330} {748639800 12600 0 +0330} {764281800 16200 1 +0330} {780175800 12600 0 +0330} {795817800 16200 1 +0330} {811711800 12600 0 +0330} {827353800 16200 1 +0330} {843247800 12600 0 +0330} {858976200 16200 1 +0330} {874870200 12600 0 +0330} {890512200 16200 1 +0330} {906406200 12600 0 +0330} {922048200 16200 1 +0330} {937942200 12600 0 +0330} {953584200 16200 1 +0330} {969478200 12600 0 +0330} {985206600 16200 1 +0330} {1001100600 12600 0 +0330} {1016742600 16200 1 +0330} {1032636600 12600 0 +0330} {1048278600 16200 1 +0330} {1064172600 12600 0 +0330} {1079814600 16200 1 +0330} {1095708600 12600 0 +0330} {1111437000 16200 1 +0330} {1127331000 12600 0 +0330} {1206045000 16200 1 +0330} {1221939000 12600 0 +0330} {1237667400 16200 1 +0330} {1253561400 12600 0 +0330} {1269203400 16200 1 +0330} {1285097400 12600 0 +0330} {1300739400 16200 1 +0330} {1316633400 12600 0 +0330} {1332275400 16200 1 +0330} {1348169400 12600 0 +0330} {1363897800 16200 1 +0330} {1379791800 12600 0 +0330} {1395433800 16200 1 +0330} {1411327800 12600 0 +0330} {1426969800 16200 1 +0330} {1442863800 12600 0 +0330} {1458505800 16200 1 +0330} {1474399800 12600 0 +0330} {1490128200 16200 1 +0330} {1506022200 12600 0 +0330} {1521664200 16200 1 +0330} {1537558200 12600 0 +0330} {1553200200 16200 1 +0330} {1569094200 12600 0 +0330} {1584736200 16200 1 +0330} {1600630200 12600 0 +0330} {1616358600 16200 1 +0330} {1632252600 12600 0 +0330} {1647894600 16200 1 +0330} {1663788600 12600 0 +0330} {1679430600 16200 1 +0330} {1695324600 12600 0 +0330} {1710966600 16200 1 +0330} {1726860600 12600 0 +0330} {1742589000 16200 1 +0330} {1758483000 12600 0 +0330} {1774125000 16200 1 +0330} {1790019000 12600 0 +0330} {1805661000 16200 1 +0330} {1821555000 12600 0 +0330} {1837197000 16200 1 +0330} {1853091000 12600 0 +0330} {1868733000 16200 1 +0330} {1884627000 12600 0 +0330} {1900355400 16200 1 +0330} {1916249400 12600 0 +0330} {1931891400 16200 1 +0330} {1947785400 12600 0 +0330} {1963427400 16200 1 +0330} {1979321400 12600 0 +0330} {1994963400 16200 1 +0330} {2010857400 12600 0 +0330} {2026585800 16200 1 +0330} {2042479800 12600 0 +0330} {2058121800 16200 1 +0330} {2074015800 12600 0 +0330} {2089657800 16200 1 +0330} {2105551800 12600 0 +0330} {2121193800 16200 1 +0330} {2137087800 12600 0 +0330} {2152729800 16200 1 +0330} {2168623800 12600 0 +0330} {2184265800 16200 1 +0330} {2200159800 12600 0 +0330} {2215888200 16200 1 +0330} {2231782200 12600 0 +0330} {2247424200 16200 1 +0330} {2263318200 12600 0 +0330} {2278960200 16200 1 +0330} {2294854200 12600 0 +0330} {2310496200 16200 1 +0330} {2326390200 12600 0 +0330} {2342118600 16200 1 +0330} {2358012600 12600 0 +0330} {2373654600 16200 1 +0330} {2389548600 12600 0 +0330} {2405190600 16200 1 +0330} {2421084600 12600 0 +0330} {2436726600 16200 1 +0330} {2452620600 12600 0 +0330} {2468349000 16200 1 +0330} {2484243000 12600 0 +0330} {2499885000 16200 1 +0330} {2515779000 12600 0 +0330} {2531421000 16200 1 +0330} {2547315000 12600 0 +0330} {2562957000 16200 1 +0330} {2578851000 12600 0 +0330} {2594579400 16200 1 +0330} {2610473400 12600 0 +0330} {2626115400 16200 1 +0330} {2642009400 12600 0 +0330} {2657651400 16200 1 +0330} {2673545400 12600 0 +0330} {2689187400 16200 1 +0330} {2705081400 12600 0 +0330} {2720809800 16200 1 +0330} {2736703800 12600 0 +0330} {2752345800 16200 1 +0330} {2768239800 12600 0 +0330} {2783881800 16200 1 +0330} {2799775800 12600 0 +0330} {2815417800 16200 1 +0330} {2831311800 12600 0 +0330} {2847040200 16200 1 +0330} {2862934200 12600 0 +0330} {2878576200 16200 1 +0330} {2894470200 12600 0 +0330} {2910112200 16200 1 +0330} {2926006200 12600 0 +0330} {2941648200 16200 1 +0330} {2957542200 12600 0 +0330} {2973270600 16200 1 +0330} {2989164600 12600 0 +0330} {3004806600 16200 1 +0330} {3020700600 12600 0 +0330} {3036342600 16200 1 +0330} {3052236600 12600 0 +0330} {3067878600 16200 1 +0330} {3083772600 12600 0 +0330} {3099501000 16200 1 +0330} {3115395000 12600 0 +0330} {3131037000 16200 1 +0330} {3146931000 12600 0 +0330} {3162573000 16200 1 +0330} {3178467000 12600 0 +0330} {3194109000 16200 1 +0330} {3210003000 12600 0 +0330} {3225731400 16200 1 +0330} {3241625400 12600 0 +0330} {3257267400 16200 1 +0330} {3273161400 12600 0 +0330} {3288803400 16200 1 +0330} {3304697400 12600 0 +0330} {3320339400 16200 1 +0330} {3336233400 12600 0 +0330} {3351961800 16200 1 +0330} {3367855800 12600 0 +0330} {3383497800 16200 1 +0330} {3399391800 12600 0 +0330} {3415033800 16200 1 +0330} {3430927800 12600 0 +0330} {3446569800 16200 1 +0330} {3462463800 12600 0 +0330} {3478192200 16200 1 +0330} {3494086200 12600 0 +0330} {3509728200 16200 1 +0330} {3525622200 12600 0 +0330} {3541264200 16200 1 +0330} {3557158200 12600 0 +0330} {3572800200 16200 1 +0330} {3588694200 12600 0 +0330} {3604422600 16200 1 +0330} {3620316600 12600 0 +0330} {3635958600 16200 1 +0330} {3651852600 12600 0 +0330} {3667494600 16200 1 +0330} {3683388600 12600 0 +0330} {3699030600 16200 1 +0330} {3714924600 12600 0 +0330} {3730653000 16200 1 +0330} {3746547000 12600 0 +0330} {3762189000 16200 1 +0330} {3778083000 12600 0 +0330} {3793725000 16200 1 +0330} {3809619000 12600 0 +0330} {3825261000 16200 1 +0330} {3841155000 12600 0 +0330} {3856883400 16200 1 +0330} {3872777400 12600 0 +0330} {3888419400 16200 1 +0330} {3904313400 12600 0 +0330} {3919955400 16200 1 +0330} {3935849400 12600 0 +0330} {3951491400 16200 1 +0330} {3967385400 12600 0 +0330} {3983113800 16200 1 +0330} {3999007800 12600 0 +0330} {4014649800 16200 1 +0330} {4030543800 12600 0 +0330} {4046185800 16200 1 +0330} {4062079800 12600 0 +0330} {4077721800 16200 1 +0330} {4093615800 12600 0 +0330} } |
Changes to library/tzdata/Asia/Ulaanbaatar.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Ulaanbaatar) { {-9223372036854775808 25652 0 LMT} {-2032931252 25200 0 +07} {252435600 28800 0 +08} | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Ulaanbaatar) { {-9223372036854775808 25652 0 LMT} {-2032931252 25200 0 +07} {252435600 28800 0 +08} {417974400 32400 1 +08} {433782000 28800 0 +08} {449596800 32400 1 +08} {465318000 28800 0 +08} {481046400 32400 1 +08} {496767600 28800 0 +08} {512496000 32400 1 +08} {528217200 28800 0 +08} {543945600 32400 1 +08} {559666800 28800 0 +08} {575395200 32400 1 +08} {591116400 28800 0 +08} {606844800 32400 1 +08} {622566000 28800 0 +08} {638294400 32400 1 +08} {654620400 28800 0 +08} {670348800 32400 1 +08} {686070000 28800 0 +08} {701798400 32400 1 +08} {717519600 28800 0 +08} {733248000 32400 1 +08} {748969200 28800 0 +08} {764697600 32400 1 +08} {780418800 28800 0 +08} {796147200 32400 1 +08} {811868400 28800 0 +08} {828201600 32400 1 +08} {843922800 28800 0 +08} {859651200 32400 1 +08} {875372400 28800 0 +08} {891100800 32400 1 +08} {906822000 28800 0 +08} {988394400 32400 1 +08} {1001696400 28800 0 +08} {1017424800 32400 1 +08} {1033146000 28800 0 +08} {1048874400 32400 1 +08} {1064595600 28800 0 +08} {1080324000 32400 1 +08} {1096045200 28800 0 +08} {1111773600 32400 1 +08} {1127494800 28800 0 +08} {1143223200 32400 1 +08} {1159549200 28800 0 +08} {1427479200 32400 1 +08} {1443193200 28800 0 +08} {1458928800 32400 1 +08} {1474642800 28800 0 +08} } |
Changes to library/tzdata/Asia/Yerevan.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Yerevan) { {-9223372036854775808 10680 0 LMT} {-1441162680 10800 0 +03} {-405140400 14400 0 +04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | # created by tools/tclZIC.tcl - do not edit set TZData(:Asia/Yerevan) { {-9223372036854775808 10680 0 LMT} {-1441162680 10800 0 +03} {-405140400 14400 0 +04} {354916800 18000 1 +04} {370724400 14400 0 +04} {386452800 18000 1 +04} {402260400 14400 0 +04} {417988800 18000 1 +04} {433796400 14400 0 +04} {449611200 18000 1 +04} {465343200 14400 0 +04} {481068000 18000 1 +04} {496792800 14400 0 +04} {512517600 18000 1 +04} {528242400 14400 0 +04} {543967200 18000 1 +04} {559692000 14400 0 +04} {575416800 18000 1 +04} {591141600 14400 0 +04} {606866400 18000 1 +04} {622591200 14400 0 +04} {638316000 18000 1 +04} {654645600 14400 0 +04} {670370400 10800 0 +03} {670374000 14400 1 +03} {686098800 10800 0 +03} {701823600 14400 1 +03} {717548400 10800 0 +03} {733273200 14400 1 +03} {748998000 10800 0 +03} {764722800 14400 1 +03} {780447600 10800 0 +03} {796172400 14400 1 +03} {811897200 14400 0 +04} {852062400 14400 0 +04} {859672800 18000 1 +04} {877816800 14400 0 +04} {891122400 18000 1 +04} {909266400 14400 0 +04} {922572000 18000 1 +04} {941320800 14400 0 +04} {954021600 18000 1 +04} {972770400 14400 0 +04} {985471200 18000 1 +04} {1004220000 14400 0 +04} {1017525600 18000 1 +04} {1035669600 14400 0 +04} {1048975200 18000 1 +04} {1067119200 14400 0 +04} {1080424800 18000 1 +04} {1099173600 14400 0 +04} {1111874400 18000 1 +04} {1130623200 14400 0 +04} {1143324000 18000 1 +04} {1162072800 14400 0 +04} {1174773600 18000 1 +04} {1193522400 14400 0 +04} {1206828000 18000 1 +04} {1224972000 14400 0 +04} {1238277600 18000 1 +04} {1256421600 14400 0 +04} {1269727200 18000 1 +04} {1288476000 14400 0 +04} {1293825600 14400 0 +04} {1301176800 18000 1 +04} {1319925600 14400 0 +04} } |
Changes to library/tzdata/Atlantic/Azores.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Azores) { {-9223372036854775808 -6160 0 LMT} {-2713904240 -6872 0 HMT} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Azores) { {-9223372036854775808 -6160 0 LMT} {-2713904240 -6872 0 HMT} {-1830376800 -7200 0 -02} {-1689548400 -3600 1 -01} {-1677794400 -7200 0 -02} {-1667430000 -3600 1 -01} {-1647730800 -7200 0 -02} {-1635807600 -3600 1 -01} {-1616194800 -7200 0 -02} {-1604358000 -3600 1 -01} |
︙ | ︙ |
Changes to library/tzdata/Atlantic/Cape_Verde.
1 2 3 4 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Cape_Verde) { {-9223372036854775808 -5644 0 LMT} | | | 1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Cape_Verde) { {-9223372036854775808 -5644 0 LMT} {-1830376800 -7200 0 -02} {-862610400 -3600 1 -01} {-764118000 -7200 0 -02} {186120000 -3600 0 -01} } |
Changes to library/tzdata/Atlantic/Madeira.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Madeira) { {-9223372036854775808 -4056 0 LMT} {-2713906344 -4056 0 FMT} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Madeira) { {-9223372036854775808 -4056 0 LMT} {-2713906344 -4056 0 FMT} {-1830380400 -3600 0 -01} {-1689552000 0 1 +00} {-1677798000 -3600 0 -01} {-1667433600 0 1 +00} {-1647734400 -3600 0 -01} {-1635811200 0 1 +00} {-1616198400 -3600 0 -01} {-1604361600 0 1 +00} |
︙ | ︙ |
Changes to library/tzdata/Atlantic/Reykjavik.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Reykjavik) { {-9223372036854775808 -5280 0 LMT} {-1956609120 -3600 0 -01} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Reykjavik) { {-9223372036854775808 -5280 0 LMT} {-1956609120 -3600 0 -01} {-1668211200 0 1 -01} {-1647212400 -3600 0 -01} {-1636675200 0 1 -01} {-1613430000 -3600 0 -01} {-1605139200 0 1 -01} {-1581894000 -3600 0 -01} {-1539561600 0 1 -01} {-1531350000 -3600 0 -01} {-968025600 0 1 -01} {-952293600 -3600 0 -01} {-942008400 0 1 -01} {-920239200 -3600 0 -01} {-909957600 0 1 -01} {-888789600 -3600 0 -01} {-877903200 0 1 -01} {-857944800 -3600 0 -01} {-846453600 0 1 -01} {-826495200 -3600 0 -01} {-815004000 0 1 -01} {-795045600 -3600 0 -01} {-783554400 0 1 -01} {-762991200 -3600 0 -01} {-752104800 0 1 -01} {-731541600 -3600 0 -01} {-717631200 0 1 -01} {-700092000 -3600 0 -01} {-686181600 0 1 -01} {-668642400 -3600 0 -01} {-654732000 0 1 -01} {-636588000 -3600 0 -01} {-623282400 0 1 -01} {-605743200 -3600 0 -01} {-591832800 0 1 -01} {-573688800 -3600 0 -01} {-559778400 0 1 -01} {-542239200 -3600 0 -01} {-528328800 0 1 -01} {-510789600 -3600 0 -01} {-496879200 0 1 -01} {-479340000 -3600 0 -01} {-465429600 0 1 -01} {-447890400 -3600 0 -01} {-433980000 0 1 -01} {-415836000 -3600 0 -01} {-401925600 0 1 -01} {-384386400 -3600 0 -01} {-370476000 0 1 -01} {-352936800 -3600 0 -01} {-339026400 0 1 -01} {-321487200 -3600 0 -01} {-307576800 0 1 -01} {-290037600 -3600 0 -01} {-276127200 0 1 -01} {-258588000 -3600 0 -01} {-244677600 0 1 -01} {-226533600 -3600 0 -01} {-212623200 0 1 -01} {-195084000 -3600 0 -01} {-181173600 0 1 -01} {-163634400 -3600 0 -01} {-149724000 0 1 -01} {-132184800 -3600 0 -01} {-118274400 0 1 -01} {-100735200 -3600 0 -01} {-86824800 0 1 -01} {-68680800 -3600 0 -01} {-54770400 0 0 GMT} } |
Changes to library/tzdata/Atlantic/Stanley.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Stanley) { {-9223372036854775808 -13884 0 LMT} {-2524507716 -13884 0 SMT} {-1824235716 -14400 0 -04} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | # created by tools/tclZIC.tcl - do not edit set TZData(:Atlantic/Stanley) { {-9223372036854775808 -13884 0 LMT} {-2524507716 -13884 0 SMT} {-1824235716 -14400 0 -04} {-1018209600 -10800 1 -04} {-1003093200 -14400 0 -04} {-986760000 -10800 1 -04} {-971643600 -14400 0 -04} {-954705600 -10800 1 -04} {-939589200 -14400 0 -04} {-923256000 -10800 1 -04} {-908139600 -14400 0 -04} {-891806400 -10800 1 -04} {-876690000 -14400 0 -04} {-860356800 -10800 1 -04} {420606000 -7200 0 -03} {433303200 -7200 1 -03} {452052000 -10800 0 -03} {464151600 -7200 1 -03} {483501600 -10800 0 -03} {495597600 -14400 0 -04} {495604800 -10800 1 -04} {514350000 -14400 0 -04} {527054400 -10800 1 -04} {545799600 -14400 0 -04} {558504000 -10800 1 -04} {577249200 -14400 0 -04} {589953600 -10800 1 -04} {608698800 -14400 0 -04} {621403200 -10800 1 -04} {640753200 -14400 0 -04} {652852800 -10800 1 -04} {672202800 -14400 0 -04} {684907200 -10800 1 -04} {703652400 -14400 0 -04} {716356800 -10800 1 -04} {735102000 -14400 0 -04} {747806400 -10800 1 -04} {766551600 -14400 0 -04} {779256000 -10800 1 -04} {798001200 -14400 0 -04} {810705600 -10800 1 -04} {830055600 -14400 0 -04} {842760000 -10800 1 -04} {861505200 -14400 0 -04} {874209600 -10800 1 -04} {892954800 -14400 0 -04} {905659200 -10800 1 -04} {924404400 -14400 0 -04} {937108800 -10800 1 -04} {955854000 -14400 0 -04} {968558400 -10800 1 -04} {987310800 -14400 0 -04} {999410400 -10800 1 -04} {1019365200 -14400 0 -04} {1030860000 -10800 1 -04} {1050814800 -14400 0 -04} {1062914400 -10800 1 -04} {1082264400 -14400 0 -04} {1094364000 -10800 1 -04} {1113714000 -14400 0 -04} {1125813600 -10800 1 -04} {1145163600 -14400 0 -04} {1157263200 -10800 1 -04} {1176613200 -14400 0 -04} {1188712800 -10800 1 -04} {1208667600 -14400 0 -04} {1220767200 -10800 1 -04} {1240117200 -14400 0 -04} {1252216800 -10800 1 -04} {1271566800 -14400 0 -04} {1283662800 -10800 0 -03} } |
Changes to library/tzdata/Australia/Lord_Howe.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Australia/Lord_Howe) { {-9223372036854775808 38180 0 LMT} {-2364114980 36000 0 AEST} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | # created by tools/tclZIC.tcl - do not edit set TZData(:Australia/Lord_Howe) { {-9223372036854775808 38180 0 LMT} {-2364114980 36000 0 AEST} {352216800 37800 0 +1030} {372785400 41400 1 +1030} {384273000 37800 0 +1030} {404839800 41400 1 +1030} {415722600 37800 0 +1030} {436289400 41400 1 +1030} {447172200 37800 0 +1030} {467739000 41400 1 +1030} {478621800 37800 0 +1030} {488984400 37800 0 +1030} {499188600 39600 1 +1030} {511282800 37800 0 +1030} {530033400 39600 1 +1030} {542732400 37800 0 +1030} {562087800 39600 1 +1030} {574786800 37800 0 +1030} {594142200 39600 1 +1030} {606236400 37800 0 +1030} {625591800 39600 1 +1030} {636476400 37800 0 +1030} {657041400 39600 1 +1030} {667926000 37800 0 +1030} {688491000 39600 1 +1030} {699375600 37800 0 +1030} {719940600 39600 1 +1030} {731430000 37800 0 +1030} {751995000 39600 1 +1030} {762879600 37800 0 +1030} {783444600 39600 1 +1030} {794329200 37800 0 +1030} {814894200 39600 1 +1030} {828198000 37800 0 +1030} {846343800 39600 1 +1030} {859647600 37800 0 +1030} {877793400 39600 1 +1030} {891097200 37800 0 +1030} {909243000 39600 1 +1030} {922546800 37800 0 +1030} {941297400 39600 1 +1030} {953996400 37800 0 +1030} {967303800 39600 1 +1030} {985446000 37800 0 +1030} {1004196600 39600 1 +1030} {1017500400 37800 0 +1030} {1035646200 39600 1 +1030} {1048950000 37800 0 +1030} {1067095800 39600 1 +1030} {1080399600 37800 0 +1030} {1099150200 39600 1 +1030} {1111849200 37800 0 +1030} {1130599800 39600 1 +1030} {1143903600 37800 0 +1030} {1162049400 39600 1 +1030} {1174748400 37800 0 +1030} {1193499000 39600 1 +1030} {1207407600 37800 0 +1030} {1223134200 39600 1 +1030} {1238857200 37800 0 +1030} {1254583800 39600 1 +1030} {1270306800 37800 0 +1030} {1286033400 39600 1 +1030} {1301756400 37800 0 +1030} {1317483000 39600 1 +1030} {1333206000 37800 0 +1030} {1349537400 39600 1 +1030} {1365260400 37800 0 +1030} {1380987000 39600 1 +1030} {1396710000 37800 0 +1030} {1412436600 39600 1 +1030} {1428159600 37800 0 +1030} {1443886200 39600 1 +1030} {1459609200 37800 0 +1030} {1475335800 39600 1 +1030} {1491058800 37800 0 +1030} {1506785400 39600 1 +1030} {1522508400 37800 0 +1030} {1538839800 39600 1 +1030} {1554562800 37800 0 +1030} {1570289400 39600 1 +1030} {1586012400 37800 0 +1030} {1601739000 39600 1 +1030} {1617462000 37800 0 +1030} {1633188600 39600 1 +1030} {1648911600 37800 0 +1030} {1664638200 39600 1 +1030} {1680361200 37800 0 +1030} {1696087800 39600 1 +1030} {1712415600 37800 0 +1030} {1728142200 39600 1 +1030} {1743865200 37800 0 +1030} {1759591800 39600 1 +1030} {1775314800 37800 0 +1030} {1791041400 39600 1 +1030} {1806764400 37800 0 +1030} {1822491000 39600 1 +1030} {1838214000 37800 0 +1030} {1853940600 39600 1 +1030} {1869663600 37800 0 +1030} {1885995000 39600 1 +1030} {1901718000 37800 0 +1030} {1917444600 39600 1 +1030} {1933167600 37800 0 +1030} {1948894200 39600 1 +1030} {1964617200 37800 0 +1030} {1980343800 39600 1 +1030} {1996066800 37800 0 +1030} {2011793400 39600 1 +1030} {2027516400 37800 0 +1030} {2043243000 39600 1 +1030} {2058966000 37800 0 +1030} {2075297400 39600 1 +1030} {2091020400 37800 0 +1030} {2106747000 39600 1 +1030} {2122470000 37800 0 +1030} {2138196600 39600 1 +1030} {2153919600 37800 0 +1030} {2169646200 39600 1 +1030} {2185369200 37800 0 +1030} {2201095800 39600 1 +1030} {2216818800 37800 0 +1030} {2233150200 39600 1 +1030} {2248873200 37800 0 +1030} {2264599800 39600 1 +1030} {2280322800 37800 0 +1030} {2296049400 39600 1 +1030} {2311772400 37800 0 +1030} {2327499000 39600 1 +1030} {2343222000 37800 0 +1030} {2358948600 39600 1 +1030} {2374671600 37800 0 +1030} {2390398200 39600 1 +1030} {2406121200 37800 0 +1030} {2422452600 39600 1 +1030} {2438175600 37800 0 +1030} {2453902200 39600 1 +1030} {2469625200 37800 0 +1030} {2485351800 39600 1 +1030} {2501074800 37800 0 +1030} {2516801400 39600 1 +1030} {2532524400 37800 0 +1030} {2548251000 39600 1 +1030} {2563974000 37800 0 +1030} {2579700600 39600 1 +1030} {2596028400 37800 0 +1030} {2611755000 39600 1 +1030} {2627478000 37800 0 +1030} {2643204600 39600 1 +1030} {2658927600 37800 0 +1030} {2674654200 39600 1 +1030} {2690377200 37800 0 +1030} {2706103800 39600 1 +1030} {2721826800 37800 0 +1030} {2737553400 39600 1 +1030} {2753276400 37800 0 +1030} {2769607800 39600 1 +1030} {2785330800 37800 0 +1030} {2801057400 39600 1 +1030} {2816780400 37800 0 +1030} {2832507000 39600 1 +1030} {2848230000 37800 0 +1030} {2863956600 39600 1 +1030} {2879679600 37800 0 +1030} {2895406200 39600 1 +1030} {2911129200 37800 0 +1030} {2926855800 39600 1 +1030} {2942578800 37800 0 +1030} {2958910200 39600 1 +1030} {2974633200 37800 0 +1030} {2990359800 39600 1 +1030} {3006082800 37800 0 +1030} {3021809400 39600 1 +1030} {3037532400 37800 0 +1030} {3053259000 39600 1 +1030} {3068982000 37800 0 +1030} {3084708600 39600 1 +1030} {3100431600 37800 0 +1030} {3116763000 39600 1 +1030} {3132486000 37800 0 +1030} {3148212600 39600 1 +1030} {3163935600 37800 0 +1030} {3179662200 39600 1 +1030} {3195385200 37800 0 +1030} {3211111800 39600 1 +1030} {3226834800 37800 0 +1030} {3242561400 39600 1 +1030} {3258284400 37800 0 +1030} {3274011000 39600 1 +1030} {3289734000 37800 0 +1030} {3306065400 39600 1 +1030} {3321788400 37800 0 +1030} {3337515000 39600 1 +1030} {3353238000 37800 0 +1030} {3368964600 39600 1 +1030} {3384687600 37800 0 +1030} {3400414200 39600 1 +1030} {3416137200 37800 0 +1030} {3431863800 39600 1 +1030} {3447586800 37800 0 +1030} {3463313400 39600 1 +1030} {3479641200 37800 0 +1030} {3495367800 39600 1 +1030} {3511090800 37800 0 +1030} {3526817400 39600 1 +1030} {3542540400 37800 0 +1030} {3558267000 39600 1 +1030} {3573990000 37800 0 +1030} {3589716600 39600 1 +1030} {3605439600 37800 0 +1030} {3621166200 39600 1 +1030} {3636889200 37800 0 +1030} {3653220600 39600 1 +1030} {3668943600 37800 0 +1030} {3684670200 39600 1 +1030} {3700393200 37800 0 +1030} {3716119800 39600 1 +1030} {3731842800 37800 0 +1030} {3747569400 39600 1 +1030} {3763292400 37800 0 +1030} {3779019000 39600 1 +1030} {3794742000 37800 0 +1030} {3810468600 39600 1 +1030} {3826191600 37800 0 +1030} {3842523000 39600 1 +1030} {3858246000 37800 0 +1030} {3873972600 39600 1 +1030} {3889695600 37800 0 +1030} {3905422200 39600 1 +1030} {3921145200 37800 0 +1030} {3936871800 39600 1 +1030} {3952594800 37800 0 +1030} {3968321400 39600 1 +1030} {3984044400 37800 0 +1030} {4000375800 39600 1 +1030} {4016098800 37800 0 +1030} {4031825400 39600 1 +1030} {4047548400 37800 0 +1030} {4063275000 39600 1 +1030} {4078998000 37800 0 +1030} {4094724600 39600 1 +1030} } |
Changes to library/tzdata/Europe/Lisbon.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Europe/Lisbon) { {-9223372036854775808 -2205 0 LMT} {-2713908195 -2205 0 LMT} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # created by tools/tclZIC.tcl - do not edit set TZData(:Europe/Lisbon) { {-9223372036854775808 -2205 0 LMT} {-2713908195 -2205 0 LMT} {-1830384000 0 0 WET} {-1689555600 3600 1 WEST} {-1677801600 0 0 WET} {-1667437200 3600 1 WEST} {-1647738000 0 0 WET} {-1635814800 3600 1 WEST} {-1616202000 0 0 WET} {-1604365200 3600 1 WEST} |
︙ | ︙ |
Changes to library/tzdata/Indian/Mauritius.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Indian/Mauritius) { {-9223372036854775808 13800 0 LMT} {-1988164200 14400 0 +04} | | | | 1 2 3 4 5 6 7 8 9 10 | # created by tools/tclZIC.tcl - do not edit set TZData(:Indian/Mauritius) { {-9223372036854775808 13800 0 LMT} {-1988164200 14400 0 +04} {403041600 18000 1 +04} {417034800 14400 0 +04} {1224972000 18000 1 +04} {1238274000 14400 0 +04} } |
Changes to library/tzdata/Pacific/Apia.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Apia) { {-9223372036854775808 45184 0 LMT} {-2445424384 -41216 0 LMT} {-1861878784 -41400 0 -1130} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Apia) { {-9223372036854775808 45184 0 LMT} {-2445424384 -41216 0 LMT} {-1861878784 -41400 0 -1130} {-631110600 -39600 0 -11} {1285498800 -36000 1 -11} {1301752800 -39600 0 -11} {1316872800 -36000 1 -11} {1325239200 50400 0 +13} {1333202400 46800 0 +13} {1348927200 50400 1 +13} {1365256800 46800 0 +13} {1380376800 50400 1 +13} {1396706400 46800 0 +13} {1411826400 50400 1 +13} {1428156000 46800 0 +13} {1443276000 50400 1 +13} {1459605600 46800 0 +13} {1474725600 50400 1 +13} {1491055200 46800 0 +13} {1506175200 50400 1 +13} {1522504800 46800 0 +13} {1538229600 50400 1 +13} {1554559200 46800 0 +13} {1569679200 50400 1 +13} {1586008800 46800 0 +13} {1601128800 50400 1 +13} {1617458400 46800 0 +13} {1632578400 50400 1 +13} {1648908000 46800 0 +13} {1664028000 50400 1 +13} {1680357600 46800 0 +13} {1695477600 50400 1 +13} {1712412000 46800 0 +13} {1727532000 50400 1 +13} {1743861600 46800 0 +13} {1758981600 50400 1 +13} {1775311200 46800 0 +13} {1790431200 50400 1 +13} {1806760800 46800 0 +13} {1821880800 50400 1 +13} {1838210400 46800 0 +13} {1853330400 50400 1 +13} {1869660000 46800 0 +13} {1885384800 50400 1 +13} {1901714400 46800 0 +13} {1916834400 50400 1 +13} {1933164000 46800 0 +13} {1948284000 50400 1 +13} {1964613600 46800 0 +13} {1979733600 50400 1 +13} {1996063200 46800 0 +13} {2011183200 50400 1 +13} {2027512800 46800 0 +13} {2042632800 50400 1 +13} {2058962400 46800 0 +13} {2074687200 50400 1 +13} {2091016800 46800 0 +13} {2106136800 50400 1 +13} {2122466400 46800 0 +13} {2137586400 50400 1 +13} {2153916000 46800 0 +13} {2169036000 50400 1 +13} {2185365600 46800 0 +13} {2200485600 50400 1 +13} {2216815200 46800 0 +13} {2232540000 50400 1 +13} {2248869600 46800 0 +13} {2263989600 50400 1 +13} {2280319200 46800 0 +13} {2295439200 50400 1 +13} {2311768800 46800 0 +13} {2326888800 50400 1 +13} {2343218400 46800 0 +13} {2358338400 50400 1 +13} {2374668000 46800 0 +13} {2389788000 50400 1 +13} {2406117600 46800 0 +13} {2421842400 50400 1 +13} {2438172000 46800 0 +13} {2453292000 50400 1 +13} {2469621600 46800 0 +13} {2484741600 50400 1 +13} {2501071200 46800 0 +13} {2516191200 50400 1 +13} {2532520800 46800 0 +13} {2547640800 50400 1 +13} {2563970400 46800 0 +13} {2579090400 50400 1 +13} {2596024800 46800 0 +13} {2611144800 50400 1 +13} {2627474400 46800 0 +13} {2642594400 50400 1 +13} {2658924000 46800 0 +13} {2674044000 50400 1 +13} {2690373600 46800 0 +13} {2705493600 50400 1 +13} {2721823200 46800 0 +13} {2736943200 50400 1 +13} {2753272800 46800 0 +13} {2768997600 50400 1 +13} {2785327200 46800 0 +13} {2800447200 50400 1 +13} {2816776800 46800 0 +13} {2831896800 50400 1 +13} {2848226400 46800 0 +13} {2863346400 50400 1 +13} {2879676000 46800 0 +13} {2894796000 50400 1 +13} {2911125600 46800 0 +13} {2926245600 50400 1 +13} {2942575200 46800 0 +13} {2958300000 50400 1 +13} {2974629600 46800 0 +13} {2989749600 50400 1 +13} {3006079200 46800 0 +13} {3021199200 50400 1 +13} {3037528800 46800 0 +13} {3052648800 50400 1 +13} {3068978400 46800 0 +13} {3084098400 50400 1 +13} {3100428000 46800 0 +13} {3116152800 50400 1 +13} {3132482400 46800 0 +13} {3147602400 50400 1 +13} {3163932000 46800 0 +13} {3179052000 50400 1 +13} {3195381600 46800 0 +13} {3210501600 50400 1 +13} {3226831200 46800 0 +13} {3241951200 50400 1 +13} {3258280800 46800 0 +13} {3273400800 50400 1 +13} {3289730400 46800 0 +13} {3305455200 50400 1 +13} {3321784800 46800 0 +13} {3336904800 50400 1 +13} {3353234400 46800 0 +13} {3368354400 50400 1 +13} {3384684000 46800 0 +13} {3399804000 50400 1 +13} {3416133600 46800 0 +13} {3431253600 50400 1 +13} {3447583200 46800 0 +13} {3462703200 50400 1 +13} {3479637600 46800 0 +13} {3494757600 50400 1 +13} {3511087200 46800 0 +13} {3526207200 50400 1 +13} {3542536800 46800 0 +13} {3557656800 50400 1 +13} {3573986400 46800 0 +13} {3589106400 50400 1 +13} {3605436000 46800 0 +13} {3620556000 50400 1 +13} {3636885600 46800 0 +13} {3652610400 50400 1 +13} {3668940000 46800 0 +13} {3684060000 50400 1 +13} {3700389600 46800 0 +13} {3715509600 50400 1 +13} {3731839200 46800 0 +13} {3746959200 50400 1 +13} {3763288800 46800 0 +13} {3778408800 50400 1 +13} {3794738400 46800 0 +13} {3809858400 50400 1 +13} {3826188000 46800 0 +13} {3841912800 50400 1 +13} {3858242400 46800 0 +13} {3873362400 50400 1 +13} {3889692000 46800 0 +13} {3904812000 50400 1 +13} {3921141600 46800 0 +13} {3936261600 50400 1 +13} {3952591200 46800 0 +13} {3967711200 50400 1 +13} {3984040800 46800 0 +13} {3999765600 50400 1 +13} {4016095200 46800 0 +13} {4031215200 50400 1 +13} {4047544800 46800 0 +13} {4062664800 50400 1 +13} {4078994400 46800 0 +13} {4094114400 50400 1 +13} } |
Changes to library/tzdata/Pacific/Chatham.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Chatham) { {-9223372036854775808 44028 0 LMT} {-3192437628 44100 0 +1215} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Chatham) { {-9223372036854775808 44028 0 LMT} {-3192437628 44100 0 +1215} {-757426500 45900 0 +1245} {152632800 49500 1 +1245} {162309600 45900 0 +1245} {183477600 49500 1 +1245} {194968800 45900 0 +1245} {215532000 49500 1 +1245} {226418400 45900 0 +1245} {246981600 49500 1 +1245} {257868000 45900 0 +1245} {278431200 49500 1 +1245} {289317600 45900 0 +1245} {309880800 49500 1 +1245} {320767200 45900 0 +1245} {341330400 49500 1 +1245} {352216800 45900 0 +1245} {372780000 49500 1 +1245} {384271200 45900 0 +1245} {404834400 49500 1 +1245} {415720800 45900 0 +1245} {436284000 49500 1 +1245} {447170400 45900 0 +1245} {467733600 49500 1 +1245} {478620000 45900 0 +1245} {499183200 49500 1 +1245} {510069600 45900 0 +1245} {530632800 49500 1 +1245} {541519200 45900 0 +1245} {562082400 49500 1 +1245} {573573600 45900 0 +1245} {594136800 49500 1 +1245} {605023200 45900 0 +1245} {623772000 49500 1 +1245} {637682400 45900 0 +1245} {655221600 49500 1 +1245} {669132000 45900 0 +1245} {686671200 49500 1 +1245} {700581600 45900 0 +1245} {718120800 49500 1 +1245} {732636000 45900 0 +1245} {749570400 49500 1 +1245} {764085600 45900 0 +1245} {781020000 49500 1 +1245} {795535200 45900 0 +1245} {812469600 49500 1 +1245} {826984800 45900 0 +1245} {844524000 49500 1 +1245} {858434400 45900 0 +1245} {875973600 49500 1 +1245} {889884000 45900 0 +1245} {907423200 49500 1 +1245} {921938400 45900 0 +1245} {938872800 49500 1 +1245} {953388000 45900 0 +1245} {970322400 49500 1 +1245} {984837600 45900 0 +1245} {1002376800 49500 1 +1245} {1016287200 45900 0 +1245} {1033826400 49500 1 +1245} {1047736800 45900 0 +1245} {1065276000 49500 1 +1245} {1079791200 45900 0 +1245} {1096725600 49500 1 +1245} {1111240800 45900 0 +1245} {1128175200 49500 1 +1245} {1142690400 45900 0 +1245} {1159624800 49500 1 +1245} {1174140000 45900 0 +1245} {1191074400 49500 1 +1245} {1207404000 45900 0 +1245} {1222524000 49500 1 +1245} {1238853600 45900 0 +1245} {1253973600 49500 1 +1245} {1270303200 45900 0 +1245} {1285423200 49500 1 +1245} {1301752800 45900 0 +1245} {1316872800 49500 1 +1245} {1333202400 45900 0 +1245} {1348927200 49500 1 +1245} {1365256800 45900 0 +1245} {1380376800 49500 1 +1245} {1396706400 45900 0 +1245} {1411826400 49500 1 +1245} {1428156000 45900 0 +1245} {1443276000 49500 1 +1245} {1459605600 45900 0 +1245} {1474725600 49500 1 +1245} {1491055200 45900 0 +1245} {1506175200 49500 1 +1245} {1522504800 45900 0 +1245} {1538229600 49500 1 +1245} {1554559200 45900 0 +1245} {1569679200 49500 1 +1245} {1586008800 45900 0 +1245} {1601128800 49500 1 +1245} {1617458400 45900 0 +1245} {1632578400 49500 1 +1245} {1648908000 45900 0 +1245} {1664028000 49500 1 +1245} {1680357600 45900 0 +1245} {1695477600 49500 1 +1245} {1712412000 45900 0 +1245} {1727532000 49500 1 +1245} {1743861600 45900 0 +1245} {1758981600 49500 1 +1245} {1775311200 45900 0 +1245} {1790431200 49500 1 +1245} {1806760800 45900 0 +1245} {1821880800 49500 1 +1245} {1838210400 45900 0 +1245} {1853330400 49500 1 +1245} {1869660000 45900 0 +1245} {1885384800 49500 1 +1245} {1901714400 45900 0 +1245} {1916834400 49500 1 +1245} {1933164000 45900 0 +1245} {1948284000 49500 1 +1245} {1964613600 45900 0 +1245} {1979733600 49500 1 +1245} {1996063200 45900 0 +1245} {2011183200 49500 1 +1245} {2027512800 45900 0 +1245} {2042632800 49500 1 +1245} {2058962400 45900 0 +1245} {2074687200 49500 1 +1245} {2091016800 45900 0 +1245} {2106136800 49500 1 +1245} {2122466400 45900 0 +1245} {2137586400 49500 1 +1245} {2153916000 45900 0 +1245} {2169036000 49500 1 +1245} {2185365600 45900 0 +1245} {2200485600 49500 1 +1245} {2216815200 45900 0 +1245} {2232540000 49500 1 +1245} {2248869600 45900 0 +1245} {2263989600 49500 1 +1245} {2280319200 45900 0 +1245} {2295439200 49500 1 +1245} {2311768800 45900 0 +1245} {2326888800 49500 1 +1245} {2343218400 45900 0 +1245} {2358338400 49500 1 +1245} {2374668000 45900 0 +1245} {2389788000 49500 1 +1245} {2406117600 45900 0 +1245} {2421842400 49500 1 +1245} {2438172000 45900 0 +1245} {2453292000 49500 1 +1245} {2469621600 45900 0 +1245} {2484741600 49500 1 +1245} {2501071200 45900 0 +1245} {2516191200 49500 1 +1245} {2532520800 45900 0 +1245} {2547640800 49500 1 +1245} {2563970400 45900 0 +1245} {2579090400 49500 1 +1245} {2596024800 45900 0 +1245} {2611144800 49500 1 +1245} {2627474400 45900 0 +1245} {2642594400 49500 1 +1245} {2658924000 45900 0 +1245} {2674044000 49500 1 +1245} {2690373600 45900 0 +1245} {2705493600 49500 1 +1245} {2721823200 45900 0 +1245} {2736943200 49500 1 +1245} {2753272800 45900 0 +1245} {2768997600 49500 1 +1245} {2785327200 45900 0 +1245} {2800447200 49500 1 +1245} {2816776800 45900 0 +1245} {2831896800 49500 1 +1245} {2848226400 45900 0 +1245} {2863346400 49500 1 +1245} {2879676000 45900 0 +1245} {2894796000 49500 1 +1245} {2911125600 45900 0 +1245} {2926245600 49500 1 +1245} {2942575200 45900 0 +1245} {2958300000 49500 1 +1245} {2974629600 45900 0 +1245} {2989749600 49500 1 +1245} {3006079200 45900 0 +1245} {3021199200 49500 1 +1245} {3037528800 45900 0 +1245} {3052648800 49500 1 +1245} {3068978400 45900 0 +1245} {3084098400 49500 1 +1245} {3100428000 45900 0 +1245} {3116152800 49500 1 +1245} {3132482400 45900 0 +1245} {3147602400 49500 1 +1245} {3163932000 45900 0 +1245} {3179052000 49500 1 +1245} {3195381600 45900 0 +1245} {3210501600 49500 1 +1245} {3226831200 45900 0 +1245} {3241951200 49500 1 +1245} {3258280800 45900 0 +1245} {3273400800 49500 1 +1245} {3289730400 45900 0 +1245} {3305455200 49500 1 +1245} {3321784800 45900 0 +1245} {3336904800 49500 1 +1245} {3353234400 45900 0 +1245} {3368354400 49500 1 +1245} {3384684000 45900 0 +1245} {3399804000 49500 1 +1245} {3416133600 45900 0 +1245} {3431253600 49500 1 +1245} {3447583200 45900 0 +1245} {3462703200 49500 1 +1245} {3479637600 45900 0 +1245} {3494757600 49500 1 +1245} {3511087200 45900 0 +1245} {3526207200 49500 1 +1245} {3542536800 45900 0 +1245} {3557656800 49500 1 +1245} {3573986400 45900 0 +1245} {3589106400 49500 1 +1245} {3605436000 45900 0 +1245} {3620556000 49500 1 +1245} {3636885600 45900 0 +1245} {3652610400 49500 1 +1245} {3668940000 45900 0 +1245} {3684060000 49500 1 +1245} {3700389600 45900 0 +1245} {3715509600 49500 1 +1245} {3731839200 45900 0 +1245} {3746959200 49500 1 +1245} {3763288800 45900 0 +1245} {3778408800 49500 1 +1245} {3794738400 45900 0 +1245} {3809858400 49500 1 +1245} {3826188000 45900 0 +1245} {3841912800 49500 1 +1245} {3858242400 45900 0 +1245} {3873362400 49500 1 +1245} {3889692000 45900 0 +1245} {3904812000 49500 1 +1245} {3921141600 45900 0 +1245} {3936261600 49500 1 +1245} {3952591200 45900 0 +1245} {3967711200 49500 1 +1245} {3984040800 45900 0 +1245} {3999765600 49500 1 +1245} {4016095200 45900 0 +1245} {4031215200 49500 1 +1245} {4047544800 45900 0 +1245} {4062664800 49500 1 +1245} {4078994400 45900 0 +1245} {4094114400 49500 1 +1245} } |
Changes to library/tzdata/Pacific/Easter.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Easter) { {-9223372036854775808 -26248 0 LMT} {-2524495352 -26248 0 EMT} {-1178124152 -25200 0 -07} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Easter) { {-9223372036854775808 -26248 0 LMT} {-2524495352 -26248 0 EMT} {-1178124152 -25200 0 -07} {-36619200 -21600 1 -07} {-23922000 -25200 0 -07} {-3355200 -21600 1 -07} {7527600 -25200 0 -07} {24465600 -21600 1 -07} {37767600 -25200 0 -07} {55915200 -21600 1 -07} {69217200 -25200 0 -07} {87969600 -21600 1 -07} {100666800 -25200 0 -07} {118209600 -21600 1 -07} {132116400 -25200 0 -07} {150868800 -21600 1 -07} {163566000 -25200 0 -07} {182318400 -21600 1 -07} {195620400 -25200 0 -07} {213768000 -21600 1 -07} {227070000 -25200 0 -07} {245217600 -21600 1 -07} {258519600 -25200 0 -07} {277272000 -21600 1 -07} {289969200 -25200 0 -07} {308721600 -21600 1 -07} {321418800 -25200 0 -07} {340171200 -21600 1 -07} {353473200 -25200 0 -07} {371620800 -21600 1 -07} {384922800 -21600 0 -06} {403070400 -18000 1 -06} {416372400 -21600 0 -06} {434520000 -18000 1 -06} {447822000 -21600 0 -06} {466574400 -18000 1 -06} {479271600 -21600 0 -06} {498024000 -18000 1 -06} {510721200 -21600 0 -06} {529473600 -18000 1 -06} {545194800 -21600 0 -06} {560923200 -18000 1 -06} {574225200 -21600 0 -06} {592372800 -18000 1 -06} {605674800 -21600 0 -06} {624427200 -18000 1 -06} {637124400 -21600 0 -06} {653457600 -18000 1 -06} {668574000 -21600 0 -06} {687326400 -18000 1 -06} {700628400 -21600 0 -06} {718776000 -18000 1 -06} {732078000 -21600 0 -06} {750225600 -18000 1 -06} {763527600 -21600 0 -06} {781675200 -18000 1 -06} {794977200 -21600 0 -06} {813729600 -18000 1 -06} {826426800 -21600 0 -06} {845179200 -18000 1 -06} {859690800 -21600 0 -06} {876628800 -18000 1 -06} {889930800 -21600 0 -06} {906868800 -18000 1 -06} {923194800 -21600 0 -06} {939528000 -18000 1 -06} {952830000 -21600 0 -06} {971582400 -18000 1 -06} {984279600 -21600 0 -06} {1003032000 -18000 1 -06} {1015729200 -21600 0 -06} {1034481600 -18000 1 -06} {1047178800 -21600 0 -06} {1065931200 -18000 1 -06} {1079233200 -21600 0 -06} {1097380800 -18000 1 -06} {1110682800 -21600 0 -06} {1128830400 -18000 1 -06} {1142132400 -21600 0 -06} {1160884800 -18000 1 -06} {1173582000 -21600 0 -06} {1192334400 -18000 1 -06} {1206846000 -21600 0 -06} {1223784000 -18000 1 -06} {1237086000 -21600 0 -06} {1255233600 -18000 1 -06} {1270350000 -21600 0 -06} {1286683200 -18000 1 -06} {1304823600 -21600 0 -06} {1313899200 -18000 1 -06} {1335668400 -21600 0 -06} {1346558400 -18000 1 -06} {1367118000 -21600 0 -06} {1378612800 -18000 1 -06} {1398567600 -21600 0 -06} {1410062400 -18000 1 -06} {1463281200 -21600 0 -06} {1471147200 -18000 1 -06} {1494730800 -21600 0 -06} {1502596800 -18000 1 -06} {1526180400 -21600 0 -06} {1534046400 -18000 1 -06} {1557630000 -21600 0 -06} {1565496000 -18000 1 -06} {1589079600 -21600 0 -06} {1596945600 -18000 1 -06} {1620529200 -21600 0 -06} {1629000000 -18000 1 -06} {1652583600 -21600 0 -06} {1660449600 -18000 1 -06} {1684033200 -21600 0 -06} {1691899200 -18000 1 -06} {1715482800 -21600 0 -06} {1723348800 -18000 1 -06} {1746932400 -21600 0 -06} {1754798400 -18000 1 -06} {1778382000 -21600 0 -06} {1786248000 -18000 1 -06} {1809831600 -21600 0 -06} {1818302400 -18000 1 -06} {1841886000 -21600 0 -06} {1849752000 -18000 1 -06} {1873335600 -21600 0 -06} {1881201600 -18000 1 -06} {1904785200 -21600 0 -06} {1912651200 -18000 1 -06} {1936234800 -21600 0 -06} {1944100800 -18000 1 -06} {1967684400 -21600 0 -06} {1976155200 -18000 1 -06} {1999738800 -21600 0 -06} {2007604800 -18000 1 -06} {2031188400 -21600 0 -06} {2039054400 -18000 1 -06} {2062638000 -21600 0 -06} {2070504000 -18000 1 -06} {2094087600 -21600 0 -06} {2101953600 -18000 1 -06} {2125537200 -21600 0 -06} {2133403200 -18000 1 -06} {2156986800 -21600 0 -06} {2165457600 -18000 1 -06} {2189041200 -21600 0 -06} {2196907200 -18000 1 -06} {2220490800 -21600 0 -06} {2228356800 -18000 1 -06} {2251940400 -21600 0 -06} {2259806400 -18000 1 -06} {2283390000 -21600 0 -06} {2291256000 -18000 1 -06} {2314839600 -21600 0 -06} {2322705600 -18000 1 -06} {2346894000 -21600 0 -06} {2354760000 -18000 1 -06} {2378343600 -21600 0 -06} {2386209600 -18000 1 -06} {2409793200 -21600 0 -06} {2417659200 -18000 1 -06} {2441242800 -21600 0 -06} {2449108800 -18000 1 -06} {2472692400 -21600 0 -06} {2480558400 -18000 1 -06} {2504142000 -21600 0 -06} {2512612800 -18000 1 -06} {2536196400 -21600 0 -06} {2544062400 -18000 1 -06} {2567646000 -21600 0 -06} {2575512000 -18000 1 -06} {2599095600 -21600 0 -06} {2606961600 -18000 1 -06} {2630545200 -21600 0 -06} {2638411200 -18000 1 -06} {2661994800 -21600 0 -06} {2669860800 -18000 1 -06} {2693444400 -21600 0 -06} {2701915200 -18000 1 -06} {2725498800 -21600 0 -06} {2733364800 -18000 1 -06} {2756948400 -21600 0 -06} {2764814400 -18000 1 -06} {2788398000 -21600 0 -06} {2796264000 -18000 1 -06} {2819847600 -21600 0 -06} {2827713600 -18000 1 -06} {2851297200 -21600 0 -06} {2859768000 -18000 1 -06} {2883351600 -21600 0 -06} {2891217600 -18000 1 -06} {2914801200 -21600 0 -06} {2922667200 -18000 1 -06} {2946250800 -21600 0 -06} {2954116800 -18000 1 -06} {2977700400 -21600 0 -06} {2985566400 -18000 1 -06} {3009150000 -21600 0 -06} {3017016000 -18000 1 -06} {3040599600 -21600 0 -06} {3049070400 -18000 1 -06} {3072654000 -21600 0 -06} {3080520000 -18000 1 -06} {3104103600 -21600 0 -06} {3111969600 -18000 1 -06} {3135553200 -21600 0 -06} {3143419200 -18000 1 -06} {3167002800 -21600 0 -06} {3174868800 -18000 1 -06} {3198452400 -21600 0 -06} {3206318400 -18000 1 -06} {3230506800 -21600 0 -06} {3238372800 -18000 1 -06} {3261956400 -21600 0 -06} {3269822400 -18000 1 -06} {3293406000 -21600 0 -06} {3301272000 -18000 1 -06} {3324855600 -21600 0 -06} {3332721600 -18000 1 -06} {3356305200 -21600 0 -06} {3364171200 -18000 1 -06} {3387754800 -21600 0 -06} {3396225600 -18000 1 -06} {3419809200 -21600 0 -06} {3427675200 -18000 1 -06} {3451258800 -21600 0 -06} {3459124800 -18000 1 -06} {3482708400 -21600 0 -06} {3490574400 -18000 1 -06} {3514158000 -21600 0 -06} {3522024000 -18000 1 -06} {3545607600 -21600 0 -06} {3553473600 -18000 1 -06} {3577057200 -21600 0 -06} {3585528000 -18000 1 -06} {3609111600 -21600 0 -06} {3616977600 -18000 1 -06} {3640561200 -21600 0 -06} {3648427200 -18000 1 -06} {3672010800 -21600 0 -06} {3679876800 -18000 1 -06} {3703460400 -21600 0 -06} {3711326400 -18000 1 -06} {3734910000 -21600 0 -06} {3743380800 -18000 1 -06} {3766964400 -21600 0 -06} {3774830400 -18000 1 -06} {3798414000 -21600 0 -06} {3806280000 -18000 1 -06} {3829863600 -21600 0 -06} {3837729600 -18000 1 -06} {3861313200 -21600 0 -06} {3869179200 -18000 1 -06} {3892762800 -21600 0 -06} {3900628800 -18000 1 -06} {3924212400 -21600 0 -06} {3932683200 -18000 1 -06} {3956266800 -21600 0 -06} {3964132800 -18000 1 -06} {3987716400 -21600 0 -06} {3995582400 -18000 1 -06} {4019166000 -21600 0 -06} {4027032000 -18000 1 -06} {4050615600 -21600 0 -06} {4058481600 -18000 1 -06} {4082065200 -21600 0 -06} {4089931200 -18000 1 -06} } |
Changes to library/tzdata/Pacific/Efate.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Efate) { {-9223372036854775808 40396 0 LMT} {-1829387596 39600 0 +11} | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Efate) { {-9223372036854775808 40396 0 LMT} {-1829387596 39600 0 +11} {433256400 43200 1 +11} {448977600 39600 0 +11} {467298000 43200 1 +11} {480427200 39600 0 +11} {496760400 43200 1 +11} {511876800 39600 0 +11} {528210000 43200 1 +11} {543931200 39600 0 +11} {559659600 43200 1 +11} {575380800 39600 0 +11} {591109200 43200 1 +11} {606830400 39600 0 +11} {622558800 43200 1 +11} {638280000 39600 0 +11} {654008400 43200 1 +11} {669729600 39600 0 +11} {686062800 43200 1 +11} {696340800 39600 0 +11} {719931600 43200 1 +11} {727790400 39600 0 +11} } |
Changes to library/tzdata/Pacific/Enderbury.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Enderbury) { {-9223372036854775808 -41060 0 LMT} {-2177411740 -43200 0 -12} {307627200 -39600 0 -11} | | | 1 2 3 4 5 6 7 8 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Enderbury) { {-9223372036854775808 -41060 0 LMT} {-2177411740 -43200 0 -12} {307627200 -39600 0 -11} {788871600 46800 0 +13} } |
Changes to library/tzdata/Pacific/Fiji.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Fiji) { {-9223372036854775808 42944 0 LMT} {-1709985344 43200 0 +12} | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Fiji) { {-9223372036854775808 42944 0 LMT} {-1709985344 43200 0 +12} {909842400 46800 1 +12} {920124000 43200 0 +12} {941896800 46800 1 +12} {951573600 43200 0 +12} {1259416800 46800 1 +12} {1269698400 43200 0 +12} {1287842400 46800 1 +12} {1299333600 43200 0 +12} {1319292000 46800 1 +12} {1327154400 43200 0 +12} {1350741600 46800 1 +12} {1358604000 43200 0 +12} {1382796000 46800 1 +12} {1390050000 43200 0 +12} {1414850400 46800 1 +12} {1421503200 43200 0 +12} {1446300000 46800 1 +12} {1452952800 43200 0 +12} {1478354400 46800 1 +12} {1484402400 43200 0 +12} {1509804000 46800 1 +12} {1515852000 43200 0 +12} {1541253600 46800 1 +12} {1547906400 43200 0 +12} {1572703200 46800 1 +12} {1579356000 43200 0 +12} {1604152800 46800 1 +12} {1610805600 43200 0 +12} {1636207200 46800 1 +12} {1642255200 43200 0 +12} {1667656800 46800 1 +12} {1673704800 43200 0 +12} {1699106400 46800 1 +12} {1705154400 43200 0 +12} {1730556000 46800 1 +12} {1737208800 43200 0 +12} {1762005600 46800 1 +12} {1768658400 43200 0 +12} {1793455200 46800 1 +12} {1800108000 43200 0 +12} {1825509600 46800 1 +12} {1831557600 43200 0 +12} {1856959200 46800 1 +12} {1863007200 43200 0 +12} {1888408800 46800 1 +12} {1895061600 43200 0 +12} {1919858400 46800 1 +12} {1926511200 43200 0 +12} {1951308000 46800 1 +12} {1957960800 43200 0 +12} {1983362400 46800 1 +12} {1989410400 43200 0 +12} {2014812000 46800 1 +12} {2020860000 43200 0 +12} {2046261600 46800 1 +12} {2052309600 43200 0 +12} {2077711200 46800 1 +12} {2084364000 43200 0 +12} {2109160800 46800 1 +12} {2115813600 43200 0 +12} {2140610400 46800 1 +12} {2147263200 43200 0 +12} {2172664800 46800 1 +12} {2178712800 43200 0 +12} {2204114400 46800 1 +12} {2210162400 43200 0 +12} {2235564000 46800 1 +12} {2242216800 43200 0 +12} {2267013600 46800 1 +12} {2273666400 43200 0 +12} {2298463200 46800 1 +12} {2305116000 43200 0 +12} {2329912800 46800 1 +12} {2336565600 43200 0 +12} {2361967200 46800 1 +12} {2368015200 43200 0 +12} {2393416800 46800 1 +12} {2399464800 43200 0 +12} {2424866400 46800 1 +12} {2431519200 43200 0 +12} {2456316000 46800 1 +12} {2462968800 43200 0 +12} {2487765600 46800 1 +12} {2494418400 43200 0 +12} {2519820000 46800 1 +12} {2525868000 43200 0 +12} {2551269600 46800 1 +12} {2557317600 43200 0 +12} {2582719200 46800 1 +12} {2588767200 43200 0 +12} {2614168800 46800 1 +12} {2620821600 43200 0 +12} {2645618400 46800 1 +12} {2652271200 43200 0 +12} {2677068000 46800 1 +12} {2683720800 43200 0 +12} {2709122400 46800 1 +12} {2715170400 43200 0 +12} {2740572000 46800 1 +12} {2746620000 43200 0 +12} {2772021600 46800 1 +12} {2778674400 43200 0 +12} {2803471200 46800 1 +12} {2810124000 43200 0 +12} {2834920800 46800 1 +12} {2841573600 43200 0 +12} {2866975200 46800 1 +12} {2873023200 43200 0 +12} {2898424800 46800 1 +12} {2904472800 43200 0 +12} {2929874400 46800 1 +12} {2935922400 43200 0 +12} {2961324000 46800 1 +12} {2967976800 43200 0 +12} {2992773600 46800 1 +12} {2999426400 43200 0 +12} {3024223200 46800 1 +12} {3030876000 43200 0 +12} {3056277600 46800 1 +12} {3062325600 43200 0 +12} {3087727200 46800 1 +12} {3093775200 43200 0 +12} {3119176800 46800 1 +12} {3125829600 43200 0 +12} {3150626400 46800 1 +12} {3157279200 43200 0 +12} {3182076000 46800 1 +12} {3188728800 43200 0 +12} {3213525600 46800 1 +12} {3220178400 43200 0 +12} {3245580000 46800 1 +12} {3251628000 43200 0 +12} {3277029600 46800 1 +12} {3283077600 43200 0 +12} {3308479200 46800 1 +12} {3315132000 43200 0 +12} {3339928800 46800 1 +12} {3346581600 43200 0 +12} {3371378400 46800 1 +12} {3378031200 43200 0 +12} {3403432800 46800 1 +12} {3409480800 43200 0 +12} {3434882400 46800 1 +12} {3440930400 43200 0 +12} {3466332000 46800 1 +12} {3472380000 43200 0 +12} {3497781600 46800 1 +12} {3504434400 43200 0 +12} {3529231200 46800 1 +12} {3535884000 43200 0 +12} {3560680800 46800 1 +12} {3567333600 43200 0 +12} {3592735200 46800 1 +12} {3598783200 43200 0 +12} {3624184800 46800 1 +12} {3630232800 43200 0 +12} {3655634400 46800 1 +12} {3662287200 43200 0 +12} {3687084000 46800 1 +12} {3693736800 43200 0 +12} {3718533600 46800 1 +12} {3725186400 43200 0 +12} {3750588000 46800 1 +12} {3756636000 43200 0 +12} {3782037600 46800 1 +12} {3788085600 43200 0 +12} {3813487200 46800 1 +12} {3819535200 43200 0 +12} {3844936800 46800 1 +12} {3851589600 43200 0 +12} {3876386400 46800 1 +12} {3883039200 43200 0 +12} {3907836000 46800 1 +12} {3914488800 43200 0 +12} {3939890400 46800 1 +12} {3945938400 43200 0 +12} {3971340000 46800 1 +12} {3977388000 43200 0 +12} {4002789600 46800 1 +12} {4009442400 43200 0 +12} {4034239200 46800 1 +12} {4040892000 43200 0 +12} {4065688800 46800 1 +12} {4072341600 43200 0 +12} {4097138400 46800 1 +12} } |
Changes to library/tzdata/Pacific/Galapagos.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Galapagos) { {-9223372036854775808 -21504 0 LMT} {-1230746496 -18000 0 -05} {504939600 -21600 0 -06} | | | 1 2 3 4 5 6 7 8 9 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Galapagos) { {-9223372036854775808 -21504 0 LMT} {-1230746496 -18000 0 -05} {504939600 -21600 0 -06} {722930400 -18000 1 -06} {728888400 -21600 0 -06} } |
Changes to library/tzdata/Pacific/Kiritimati.
1 2 3 4 5 6 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Kiritimati) { {-9223372036854775808 -37760 0 LMT} {-2177415040 -38400 0 -1040} {307622400 -36000 0 -10} | | | 1 2 3 4 5 6 7 8 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Kiritimati) { {-9223372036854775808 -37760 0 LMT} {-2177415040 -38400 0 -1040} {307622400 -36000 0 -10} {788868000 50400 0 +14} } |
Changes to library/tzdata/Pacific/Noumea.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Noumea) { {-9223372036854775808 39948 0 LMT} {-1829387148 39600 0 +11} | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Noumea) { {-9223372036854775808 39948 0 LMT} {-1829387148 39600 0 +11} {250002000 43200 1 +11} {257342400 39600 0 +11} {281451600 43200 1 +11} {288878400 39600 0 +11} {849366000 43200 1 +11} {857228400 39600 0 +11} } |
Changes to library/tzdata/Pacific/Rarotonga.
1 2 3 4 5 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Rarotonga) { {-9223372036854775808 -38344 0 LMT} {-2177414456 -37800 0 -1030} | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Rarotonga) { {-9223372036854775808 -38344 0 LMT} {-2177414456 -37800 0 -1030} {279714600 -34200 0 -10} {289387800 -36000 0 -10} {309952800 -34200 1 -10} {320837400 -36000 0 -10} {341402400 -34200 1 -10} {352287000 -36000 0 -10} {372852000 -34200 1 -10} {384341400 -36000 0 -10} {404906400 -34200 1 -10} {415791000 -36000 0 -10} {436356000 -34200 1 -10} {447240600 -36000 0 -10} {467805600 -34200 1 -10} {478690200 -36000 0 -10} {499255200 -34200 1 -10} {510139800 -36000 0 -10} {530704800 -34200 1 -10} {541589400 -36000 0 -10} {562154400 -34200 1 -10} {573643800 -36000 0 -10} {594208800 -34200 1 -10} {605093400 -36000 0 -10} {625658400 -34200 1 -10} {636543000 -36000 0 -10} {657108000 -34200 1 -10} {667992600 -36000 0 -10} } |
Changes to library/tzdata/Pacific/Tongatapu.
1 2 3 4 5 6 7 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Tongatapu) { {-9223372036854775808 44360 0 LMT} {-2177497160 44400 0 +1220} {-915193200 46800 0 +13} {915102000 46800 0 +13} | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # created by tools/tclZIC.tcl - do not edit set TZData(:Pacific/Tongatapu) { {-9223372036854775808 44360 0 LMT} {-2177497160 44400 0 +1220} {-915193200 46800 0 +13} {915102000 46800 0 +13} {939214800 50400 1 +13} {953384400 46800 0 +13} {973342800 50400 1 +13} {980596800 46800 0 +13} {1004792400 50400 1 +13} {1012046400 46800 0 +13} {1478350800 50400 1 +13} {1484398800 46800 0 +13} } |
Changes to libtommath/README.md.
|
| > > > > > > | | < > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # libtommath This is the git repository for [LibTomMath](http://www.libtom.net/LibTomMath/), a free open source portable number theoretic multiple-precision integer (MPI) library written entirely in C. ## Build Status master - [](https://travis-ci.org/libtom/libtommath) develop - [](https://travis-ci.org/libtom/libtommath) ## Summary The `develop` branch contains the in-development version. Stable releases are tagged. Documentation is built from the LaTeX file `bn.tex`. There is also limited documentation in `tommath.h`. There is also a document, `tommath.pdf`, which describes the goals of the project and many of the algorithms used. The project can be build by using `make`. Along with the usual `make`, `make clean` and `make install`, there are several other build targets, see the makefile for details. There are also makefiles for certain specific platforms. ## Testing Tests are located in `demo/` and can be built in two flavors. * `make test` creates a test binary that is intended to be run against `mtest`. `mtest` can be built with `make mtest` and test execution is done like `./mtest/mtest | ./test`. `mtest` is creating test vectors using an alternative MPI library and `test` is consuming these vectors to verify correct behavior of ltm * `make test_standalone` creates a stand-alone test binary that executes several test routines. |
Changes to libtommath/bn_error.c.
︙ | ︙ | |||
23 24 25 26 27 28 29 | { MP_MEM, "Out of heap" }, { MP_VAL, "Value out of range" } }; /* return a char * string for a given code */ const char *mp_error_to_string(int code) { | | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | { MP_MEM, "Out of heap" }, { MP_VAL, "Value out of range" } }; /* return a char * string for a given code */ const char *mp_error_to_string(int code) { size_t x; /* scan the lookup table for the given message */ for (x = 0; x < (sizeof(msgs) / sizeof(msgs[0])); x++) { if (msgs[x].code == code) { return msgs[x].msg; } } /* generic reply for invalid code */ return "Invalid error code"; |
︙ | ︙ |
Changes to libtommath/bn_fast_mp_invmod.c.
︙ | ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | goto LBL_ERR; } /* we need y = |a| */ if ((res = mp_mod(a, b, &y)) != MP_OKAY) { goto LBL_ERR; } /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ if ((res = mp_copy(&x, &u)) != MP_OKAY) { goto LBL_ERR; } if ((res = mp_copy(&y, &v)) != MP_OKAY) { goto LBL_ERR; } | > > > > > > | | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | goto LBL_ERR; } /* we need y = |a| */ if ((res = mp_mod(a, b, &y)) != MP_OKAY) { goto LBL_ERR; } /* if one of x,y is zero return an error! */ if ((mp_iszero(&x) == MP_YES) || (mp_iszero(&y) == MP_YES)) { res = MP_VAL; goto LBL_ERR; } /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ if ((res = mp_copy(&x, &u)) != MP_OKAY) { goto LBL_ERR; } if ((res = mp_copy(&y, &v)) != MP_OKAY) { goto LBL_ERR; } mp_set(&D, 1uL); top: /* 4. while u is even do */ while (mp_iseven(&u) == MP_YES) { /* 4.1 u = u/2 */ if ((res = mp_div_2(&u, &u)) != MP_OKAY) { goto LBL_ERR; |
︙ | ︙ | |||
118 119 120 121 122 123 124 | if (mp_iszero(&u) == MP_NO) { goto top; } /* now a = C, b = D, gcd == g*v */ /* if v != 1 then there is no inverse */ | | | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | if (mp_iszero(&u) == MP_NO) { goto top; } /* now a = C, b = D, gcd == g*v */ /* if v != 1 then there is no inverse */ if (mp_cmp_d(&v, 1uL) != MP_EQ) { res = MP_VAL; goto LBL_ERR; } /* b is now the inverse */ neg = a->sign; while (D.sign == MP_NEG) { |
︙ | ︙ |
Changes to libtommath/bn_fast_mp_montgomery_reduce.c.
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | * * Based on Algorithm 14.32 on pp.601 of HAC. */ int fast_mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho) { int ix, res, olduse; mp_word W[MP_WARRAY]; /* get old used count */ olduse = x->used; /* grow a as required */ if (x->alloc < (n->used + 1)) { if ((res = mp_grow(x, n->used + 1)) != MP_OKAY) { | > > > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | * * Based on Algorithm 14.32 on pp.601 of HAC. */ int fast_mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho) { int ix, res, olduse; mp_word W[MP_WARRAY]; if (x->used > (int)MP_WARRAY) { return MP_VAL; } /* get old used count */ olduse = x->used; /* grow a as required */ if (x->alloc < (n->used + 1)) { if ((res = mp_grow(x, n->used + 1)) != MP_OKAY) { |
︙ | ︙ | |||
69 70 71 72 73 74 75 | /* mu = ai * m' mod b * * We avoid a double precision multiplication (which isn't required) * by casting the value down to a mp_digit. Note this requires * that W[ix-1] have the carry cleared (see after the inner loop) */ mp_digit mu; | | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | /* mu = ai * m' mod b * * We avoid a double precision multiplication (which isn't required) * by casting the value down to a mp_digit. Note this requires * that W[ix-1] have the carry cleared (see after the inner loop) */ mp_digit mu; mu = ((W[ix] & MP_MASK) * rho) & MP_MASK; /* a = a + mu * m * b**i * * This is computed in place and on the fly. The multiplication * by b**i is handled by offseting which columns the results * are added to. * |
︙ | ︙ | |||
98 99 100 101 102 103 104 | tmpn = n->dp; /* Alias for the columns set by an offset of ix */ _W = W + ix; /* inner loop */ for (iy = 0; iy < n->used; iy++) { | | | | | | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | tmpn = n->dp; /* Alias for the columns set by an offset of ix */ _W = W + ix; /* inner loop */ for (iy = 0; iy < n->used; iy++) { *_W++ += (mp_word)mu * (mp_word)*tmpn++; } } /* now fix carry for next digit, W[ix+1] */ W[ix + 1] += W[ix] >> (mp_word)DIGIT_BIT; } /* now we have to propagate the carries and * shift the words downward [all those least * significant digits we zeroed]. */ { mp_digit *tmpx; mp_word *_W, *_W1; /* nox fix rest of carries */ /* alias for current word */ _W1 = W + ix; /* alias for next word, where the carry goes */ _W = W + ++ix; for (; ix <= ((n->used * 2) + 1); ix++) { *_W++ += *_W1++ >> (mp_word)DIGIT_BIT; } /* copy out, A = A/b**n * * The result is A/b**n but instead of converting from an * array of mp_word to mp_digit than calling mp_rshd * we just copy them in the right order */ /* alias for destination word */ tmpx = x->dp; /* alias for shifted double precision result */ _W = W + n->used; for (ix = 0; ix < (n->used + 1); ix++) { *tmpx++ = *_W++ & (mp_word)MP_MASK; } /* zero oldused digits, if the input a was larger than * m->used+1 we'll have to clear the digits */ for (; ix < olduse; ix++) { *tmpx++ = 0; |
︙ | ︙ |
Changes to libtommath/bn_fast_s_mp_mul_digs.c.
︙ | ︙ | |||
65 66 67 68 69 70 71 | /* this is the number of times the loop will iterrate, essentially while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); /* execute loop */ for (iz = 0; iz < iy; ++iz) { | | | | | | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | /* this is the number of times the loop will iterrate, essentially while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); /* execute loop */ for (iz = 0; iz < iy; ++iz) { _W += (mp_word)*tmpx++ * (mp_word)*tmpy--; } /* store term */ W[ix] = (mp_digit)_W & MP_MASK; /* make next carry */ _W = _W >> (mp_word)DIGIT_BIT; } /* setup dest */ olduse = c->used; c->used = pa; { mp_digit *tmpc; tmpc = c->dp; for (ix = 0; ix < pa; ix++) { /* now extract the previous digit [below the carry] */ *tmpc++ = W[ix]; } /* clear unused digits [that existed in the old copy of c] */ for (; ix < olduse; ix++) { *tmpc++ = 0; |
︙ | ︙ |
Changes to libtommath/bn_fast_s_mp_mul_high_digs.c.
︙ | ︙ | |||
56 57 58 59 60 61 62 | /* this is the number of times the loop will iterrate, essentially its while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); /* execute loop */ for (iz = 0; iz < iy; iz++) { | | | | | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /* this is the number of times the loop will iterrate, essentially its while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); /* execute loop */ for (iz = 0; iz < iy; iz++) { _W += (mp_word)*tmpx++ * (mp_word)*tmpy--; } /* store term */ W[ix] = (mp_digit)_W & MP_MASK; /* make next carry */ _W = _W >> (mp_word)DIGIT_BIT; } /* setup dest */ olduse = c->used; c->used = pa; { |
︙ | ︙ |
Changes to libtommath/bn_fast_s_mp_sqr.c.
︙ | ︙ | |||
66 67 68 69 70 71 72 | * we halve the distance since they approach at a rate of 2x * and we have to round because odd cases need to be executed */ iy = MIN(iy, ((ty-tx)+1)>>1); /* execute loop */ for (iz = 0; iz < iy; iz++) { | | | | | | | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | * we halve the distance since they approach at a rate of 2x * and we have to round because odd cases need to be executed */ iy = MIN(iy, ((ty-tx)+1)>>1); /* execute loop */ for (iz = 0; iz < iy; iz++) { _W += (mp_word)*tmpx++ * (mp_word)*tmpy--; } /* double the inner product and add carry */ _W = _W + _W + W1; /* even columns have the square term in them */ if (((unsigned)ix & 1u) == 0u) { _W += (mp_word)a->dp[ix>>1] * (mp_word)a->dp[ix>>1]; } /* store it */ W[ix] = _W & MP_MASK; /* make next carry */ W1 = _W >> (mp_word)DIGIT_BIT; } /* setup dest */ olduse = b->used; b->used = a->used+a->used; { |
︙ | ︙ |
Changes to libtommath/bn_mp_2expt.c.
︙ | ︙ | |||
32 33 34 35 36 37 38 | return res; } /* set the used count of where the bit will go */ a->used = (b / DIGIT_BIT) + 1; /* put the single bit in its place */ | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | return res; } /* set the used count of where the bit will go */ a->used = (b / DIGIT_BIT) + 1; /* put the single bit in its place */ a->dp[b / DIGIT_BIT] = (mp_digit)1 << (mp_digit)(b % DIGIT_BIT); return MP_OKAY; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ |
︙ | ︙ |
Changes to libtommath/bn_mp_clamp.c.
︙ | ︙ | |||
23 24 25 26 27 28 29 | * are no more leading digits */ void mp_clamp(mp_int *a) { /* decrease used while the most significant digit is * zero. */ | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | * are no more leading digits */ void mp_clamp(mp_int *a) { /* decrease used while the most significant digit is * zero. */ while ((a->used > 0) && (a->dp[a->used - 1] == 0u)) { --(a->used); } /* reset the sign flag if used == 0 */ if (a->used == 0) { a->sign = MP_ZPOS; } |
︙ | ︙ |
Changes to libtommath/bn_mp_clear_multi.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #include <stdarg.h> void mp_clear_multi(mp_int *mp, ...) { mp_int *next_mp = mp; va_list args; va_start(args, mp); | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #include <stdarg.h> void mp_clear_multi(mp_int *mp, ...) { mp_int *next_mp = mp; va_list args; va_start(args, mp); |
︙ | ︙ |
Changes to libtommath/bn_mp_cnt_lsb.c.
︙ | ︙ | |||
27 28 29 30 31 32 33 | /* easy out */ if (mp_iszero(a) == MP_YES) { return 0; } /* scan lower digits until non-zero */ | | | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | /* easy out */ if (mp_iszero(a) == MP_YES) { return 0; } /* scan lower digits until non-zero */ for (x = 0; (x < a->used) && (a->dp[x] == 0u); x++) {} q = a->dp[x]; x *= DIGIT_BIT; /* now scan this digit until a 1 is found */ if ((q & 1u) == 0u) { do { qq = q & 15u; x += lnz[qq]; q >>= 4; } while (qq == 0u); } return x; } #endif /* ref: $Format:%D$ */ |
︙ | ︙ |
Changes to libtommath/bn_mp_count_bits.c.
︙ | ︙ | |||
27 28 29 30 31 32 33 | } /* get number of digits and add that */ r = (a->used - 1) * DIGIT_BIT; /* take the last digit and count the bits in it */ q = a->dp[a->used - 1]; | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | } /* get number of digits and add that */ r = (a->used - 1) * DIGIT_BIT; /* take the last digit and count the bits in it */ q = a->dp[a->used - 1]; while (q > (mp_digit)0) { ++r; q >>= (mp_digit)1; } return r; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ |
︙ | ︙ |
Changes to libtommath/bn_mp_div.c.
︙ | ︙ | |||
43 44 45 46 47 48 49 | /* init our temps */ if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL)) != MP_OKAY) { return res; } | | | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /* init our temps */ if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL)) != MP_OKAY) { return res; } mp_set(&tq, 1uL); n = mp_count_bits(a) - mp_count_bits(b); if (((res = mp_abs(a, &ta)) != MP_OKAY) || ((res = mp_abs(b, &tb)) != MP_OKAY) || ((res = mp_mul_2d(&tb, n, &tb)) != MP_OKAY) || ((res = mp_mul_2d(&tq, n, &tq)) != MP_OKAY)) { goto LBL_ERR; } |
︙ | ︙ | |||
146 147 148 149 150 151 152 | /* fix the sign */ neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG; x.sign = y.sign = MP_ZPOS; /* normalize both x and y, ensure that y >= b/2, [b == 2**DIGIT_BIT] */ norm = mp_count_bits(&y) % DIGIT_BIT; | | | | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /* fix the sign */ neg = (a->sign == b->sign) ? MP_ZPOS : MP_NEG; x.sign = y.sign = MP_ZPOS; /* normalize both x and y, ensure that y >= b/2, [b == 2**DIGIT_BIT] */ norm = mp_count_bits(&y) % DIGIT_BIT; if (norm < (DIGIT_BIT - 1)) { norm = (DIGIT_BIT - 1) - norm; if ((res = mp_mul_2d(&x, norm, &x)) != MP_OKAY) { goto LBL_Y; } if ((res = mp_mul_2d(&y, norm, &y)) != MP_OKAY) { goto LBL_Y; } } else { |
︙ | ︙ | |||
186 187 188 189 190 191 192 | if (i > x.used) { continue; } /* step 3.1 if xi == yt then set q{i-t-1} to b-1, * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ if (x.dp[i] == y.dp[t]) { | | | | | | | | | | | | | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | if (i > x.used) { continue; } /* step 3.1 if xi == yt then set q{i-t-1} to b-1, * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ if (x.dp[i] == y.dp[t]) { q.dp[(i - t) - 1] = ((mp_digit)1 << (mp_digit)DIGIT_BIT) - (mp_digit)1; } else { mp_word tmp; tmp = (mp_word)x.dp[i] << (mp_word)DIGIT_BIT; tmp |= (mp_word)x.dp[i - 1]; tmp /= (mp_word)y.dp[t]; if (tmp > (mp_word)MP_MASK) { tmp = MP_MASK; } q.dp[(i - t) - 1] = (mp_digit)(tmp & (mp_word)MP_MASK); } /* while (q{i-t-1} * (yt * b + y{t-1})) > xi * b**2 + xi-1 * b + xi-2 do q{i-t-1} -= 1; */ q.dp[(i - t) - 1] = (q.dp[(i - t) - 1] + 1uL) & (mp_digit)MP_MASK; do { q.dp[(i - t) - 1] = (q.dp[(i - t) - 1] - 1uL) & (mp_digit)MP_MASK; /* find left hand */ mp_zero(&t1); t1.dp[0] = ((t - 1) < 0) ? 0u : y.dp[t - 1]; t1.dp[1] = y.dp[t]; t1.used = 2; if ((res = mp_mul_d(&t1, q.dp[(i - t) - 1], &t1)) != MP_OKAY) { goto LBL_Y; } /* find right hand */ t2.dp[0] = ((i - 2) < 0) ? 0u : x.dp[i - 2]; t2.dp[1] = ((i - 1) < 0) ? 0u : x.dp[i - 1]; t2.dp[2] = x.dp[i]; t2.used = 3; } while (mp_cmp_mag(&t1, &t2) == MP_GT); /* step 3.3 x = x - q{i-t-1} * y * b**{i-t-1} */ if ((res = mp_mul_d(&y, q.dp[(i - t) - 1], &t1)) != MP_OKAY) { goto LBL_Y; |
︙ | ︙ | |||
248 249 250 251 252 253 254 | if ((res = mp_lshd(&t1, (i - t) - 1)) != MP_OKAY) { goto LBL_Y; } if ((res = mp_add(&x, &t1, &x)) != MP_OKAY) { goto LBL_Y; } | | | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | if ((res = mp_lshd(&t1, (i - t) - 1)) != MP_OKAY) { goto LBL_Y; } if ((res = mp_add(&x, &t1, &x)) != MP_OKAY) { goto LBL_Y; } q.dp[(i - t) - 1] = (q.dp[(i - t) - 1] - 1uL) & MP_MASK; } } /* now q is the quotient and x is the remainder * [which we have to normalize] */ |
︙ | ︙ |
Changes to libtommath/bn_mp_div_2.c.
︙ | ︙ | |||
38 39 40 41 42 43 44 | /* dest alias */ tmpb = b->dp + b->used - 1; /* carry */ r = 0; for (x = b->used - 1; x >= 0; x--) { /* get the carry for the next iteration */ | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | /* dest alias */ tmpb = b->dp + b->used - 1; /* carry */ r = 0; for (x = b->used - 1; x >= 0; x--) { /* get the carry for the next iteration */ rr = *tmpa & 1u; /* shift the current digit, add in carry and store */ *tmpb-- = (*tmpa-- >> 1) | (r << (DIGIT_BIT - 1)); /* forward carry to next iteration */ r = rr; } |
︙ | ︙ |
Changes to libtommath/bn_mp_div_2d.c.
︙ | ︙ | |||
40 41 42 43 44 45 46 | if (d != NULL) { if ((res = mp_mod_2d(a, b, d)) != MP_OKAY) { return res; } } /* shift by as many digits in the bit count */ | | | | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | if (d != NULL) { if ((res = mp_mod_2d(a, b, d)) != MP_OKAY) { return res; } } /* shift by as many digits in the bit count */ if (b >= DIGIT_BIT) { mp_rshd(c, b / DIGIT_BIT); } /* shift any bit count < DIGIT_BIT */ D = (mp_digit)(b % DIGIT_BIT); if (D != 0u) { mp_digit *tmpc, mask, shift; /* mask */ mask = ((mp_digit)1 << D) - 1uL; /* shift for lsb */ shift = (mp_digit)DIGIT_BIT - D; /* alias */ tmpc = c->dp + (c->used - 1); /* carry */ r = 0; for (x = c->used - 1; x >= 0; x--) { |
︙ | ︙ |
Changes to libtommath/bn_mp_div_3.c.
︙ | ︙ | |||
20 21 22 23 24 25 26 | { mp_int q; mp_word w, t; mp_digit b; int res, ix; /* b = 2**DIGIT_BIT / 3 */ | | | | | | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | { mp_int q; mp_word w, t; mp_digit b; int res, ix; /* b = 2**DIGIT_BIT / 3 */ b = ((mp_word)1 << (mp_word)DIGIT_BIT) / (mp_word)3; if ((res = mp_init_size(&q, a->used)) != MP_OKAY) { return res; } q.used = a->used; q.sign = a->sign; w = 0; for (ix = a->used - 1; ix >= 0; ix--) { w = (w << (mp_word)DIGIT_BIT) | (mp_word)a->dp[ix]; if (w >= 3u) { /* multiply w by [1/3] */ t = (w * (mp_word)b) >> (mp_word)DIGIT_BIT; /* now subtract 3 * [w/3] from w, to get the remainder */ w -= t+t+t; /* fixup the remainder as required since * the optimization is not exact. */ while (w >= 3u) { t += 1u; w -= 3u; } } else { t = 0; } q.dp[ix] = (mp_digit)t; } |
︙ | ︙ |
Changes to libtommath/bn_mp_div_d.c.
︙ | ︙ | |||
20 21 22 23 24 25 26 | { mp_int q; mp_word w; mp_digit t; int res, ix; /* cannot divide by zero */ | | | | | | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | { mp_int q; mp_word w; mp_digit t; int res, ix; /* cannot divide by zero */ if (b == 0u) { return MP_VAL; } /* quick outs */ if ((b == 1u) || (mp_iszero(a) == MP_YES)) { if (d != NULL) { *d = 0; } if (c != NULL) { return mp_copy(a, c); } return MP_OKAY; } /* power of two ? */ if (((b & (b-1)) == 0)) { for (ix = 1; ix < DIGIT_BIT; ix++) { if (b == (((mp_digit)1)<<ix)) { break; } } if (d != NULL) { *d = a->dp[0] & (((mp_digit)1<<(mp_digit)ix) - 1uL); } if (c != NULL) { return mp_div_2d(a, ix, c, NULL); } return MP_OKAY; } #ifdef BN_MP_DIV_3_C /* three? */ if (b == 3u) { return mp_div_3(a, c, d); } #endif /* no easy answer [c'est la vie]. Just division */ if ((res = mp_init_size(&q, a->used)) != MP_OKAY) { return res; } q.used = a->used; q.sign = a->sign; w = 0; for (ix = a->used - 1; ix >= 0; ix--) { w = (w << (mp_word)DIGIT_BIT) | (mp_word)a->dp[ix]; if (w >= b) { t = (mp_digit)(w / b); w -= (mp_word)t * (mp_word)b; } else { t = 0; } q.dp[ix] = t; } if (d != NULL) { *d = (mp_digit)w; } if (c != NULL) { |
︙ | ︙ |
Changes to libtommath/bn_mp_dr_reduce.c.
︙ | ︙ | |||
57 58 59 60 61 62 63 | tmpx2 = x->dp + m; /* set carry to zero */ mu = 0; /* compute (x mod B**m) + k * [x/B**m] inline and inplace */ for (i = 0; i < m; i++) { | | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | tmpx2 = x->dp + m; /* set carry to zero */ mu = 0; /* compute (x mod B**m) + k * [x/B**m] inline and inplace */ for (i = 0; i < m; i++) { r = ((mp_word)*tmpx2++ * (mp_word)k) + *tmpx1 + mu; *tmpx1++ = (mp_digit)(r & MP_MASK); mu = (mp_digit)(r >> ((mp_word)DIGIT_BIT)); } /* set final carry */ *tmpx1++ = mu; |
︙ | ︙ |
Changes to libtommath/bn_mp_dr_setup.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | /* determines the setup value */ void mp_dr_setup(const mp_int *a, mp_digit *d) { /* the casts are required if DIGIT_BIT is one less than * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] */ | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /* determines the setup value */ void mp_dr_setup(const mp_int *a, mp_digit *d) { /* the casts are required if DIGIT_BIT is one less than * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] */ *d = (mp_digit)(((mp_word)1 << (mp_word)DIGIT_BIT) - (mp_word)a->dp[0]); } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_export.c.
︙ | ︙ | |||
34 35 36 37 38 39 40 | if (endian == 0) { union { unsigned int i; char c[4]; } lint; lint.i = 0x01020304; | | | | | | | | | | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | if (endian == 0) { union { unsigned int i; char c[4]; } lint; lint.i = 0x01020304; endian = (lint.c[0] == '\x04') ? -1 : 1; } odd_nails = (nails % 8u); odd_nail_mask = 0xff; for (i = 0; i < odd_nails; ++i) { odd_nail_mask ^= (unsigned char)(1u << (7u - i)); } nail_bytes = nails / 8u; bits = (size_t)mp_count_bits(&t); count = (bits / ((size * 8u) - nails)) + (((bits % ((size * 8u) - nails)) != 0u) ? 1u : 0u); for (i = 0; i < count; ++i) { for (j = 0; j < size; ++j) { unsigned char *byte = (unsigned char *)rop + (((order == -1) ? i : ((count - 1u) - i)) * size) + ((endian == -1) ? j : ((size - 1u) - j)); if (j >= (size - nail_bytes)) { *byte = 0; continue; } *byte = (unsigned char)((j == ((size - nail_bytes) - 1u)) ? (t.dp[0] & odd_nail_mask) : (t.dp[0] & 0xFFuL)); if ((result = mp_div_2d(&t, (j == ((size - nail_bytes) - 1u)) ? (int)(8u - odd_nails) : 8, &t, NULL)) != MP_OKAY) { mp_clear(&t); return result; } } } mp_clear(&t); |
︙ | ︙ |
Changes to libtommath/bn_mp_expt_d_ex.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | mp_int g; if ((res = mp_init_copy(&g, a)) != MP_OKAY) { return res; } /* set initial result */ | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | mp_int g; if ((res = mp_init_copy(&g, a)) != MP_OKAY) { return res; } /* set initial result */ mp_set(c, 1uL); if (fast != 0) { while (b > 0u) { /* if the bit is set multiply */ if ((b & 1u) != 0u) { if ((res = mp_mul(c, &g, c)) != MP_OKAY) { mp_clear(&g); return res; } } /* square */ if (b > 1u) { if ((res = mp_sqr(&g, &g)) != MP_OKAY) { mp_clear(&g); return res; } } /* shift to next bit */ b >>= 1; } } else { for (x = 0; x < (unsigned)DIGIT_BIT; x++) { /* square */ if ((res = mp_sqr(c, c)) != MP_OKAY) { mp_clear(&g); return res; } /* if the bit is set multiply */ if ((b & ((mp_digit)1 << (DIGIT_BIT - 1))) != 0u) { if ((res = mp_mul(c, &g, c)) != MP_OKAY) { mp_clear(&g); return res; } } /* shift to next bit */ |
︙ | ︙ |
Changes to libtommath/bn_mp_exptmod_fast.c.
︙ | ︙ | |||
35 36 37 38 39 40 41 | mp_digit buf, mp; int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; /* use a pointer to the reduction algorithm. This allows us to use * one of many reduction algorithms without modding the guts of * the code with if statements everywhere. */ | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | mp_digit buf, mp; int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; /* use a pointer to the reduction algorithm. This allows us to use * one of many reduction algorithms without modding the guts of * the code with if statements everywhere. */ int (*redux)(mp_int *x, const mp_int *n, mp_digit rho); /* find window size */ x = mp_count_bits(X); if (x <= 7) { winsize = 2; } else if (x <= 36) { winsize = 3; |
︙ | ︙ | |||
92 93 94 95 96 97 98 | #else err = MP_VAL; goto LBL_M; #endif /* automatically pick the comba one if available (saves quite a few calls/ifs) */ #ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C | | | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | #else err = MP_VAL; goto LBL_M; #endif /* automatically pick the comba one if available (saves quite a few calls/ifs) */ #ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C if ((((P->used * 2) + 1) < (int)MP_WARRAY) && (P->used < (1 << ((CHAR_BIT * sizeof(mp_word)) - (2 * DIGIT_BIT))))) { redux = fast_mp_montgomery_reduce; } else #endif { #ifdef BN_MP_MONTGOMERY_REDUCE_C /* use slower baseline Montgomery method */ |
︙ | ︙ | |||
156 157 158 159 160 161 162 | goto LBL_RES; } #else err = MP_VAL; goto LBL_RES; #endif } else { | | | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | goto LBL_RES; } #else err = MP_VAL; goto LBL_RES; #endif } else { mp_set(&res, 1uL); if ((err = mp_mod(G, P, &M[1])) != MP_OKAY) { goto LBL_RES; } } /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times */ if ((err = mp_copy(&M[1], &M[1 << (winsize - 1)])) != MP_OKAY) { |
︙ | ︙ |
Changes to libtommath/bn_mp_exteuclid.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | int err; if ((err = mp_init_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL)) != MP_OKAY) { return err; } /* initialize, (u1,u2,u3) = (1,0,a) */ | | | | | | | | | | | | | | | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | int err; if ((err = mp_init_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL)) != MP_OKAY) { return err; } /* initialize, (u1,u2,u3) = (1,0,a) */ mp_set(&u1, 1uL); if ((err = mp_copy(a, &u3)) != MP_OKAY) { goto LBL_ERR; } /* initialize, (v1,v2,v3) = (0,1,b) */ mp_set(&v2, 1uL); if ((err = mp_copy(b, &v3)) != MP_OKAY) { goto LBL_ERR; } /* loop while v3 != 0 */ while (mp_iszero(&v3) == MP_NO) { /* q = u3/v3 */ if ((err = mp_div(&u3, &v3, &q, NULL)) != MP_OKAY) { goto LBL_ERR; } /* (t1,t2,t3) = (u1,u2,u3) - (v1,v2,v3)q */ if ((err = mp_mul(&v1, &q, &tmp)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_sub(&u1, &tmp, &t1)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_mul(&v2, &q, &tmp)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_sub(&u2, &tmp, &t2)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_mul(&v3, &q, &tmp)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_sub(&u3, &tmp, &t3)) != MP_OKAY) { goto LBL_ERR; } /* (u1,u2,u3) = (v1,v2,v3) */ if ((err = mp_copy(&v1, &u1)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_copy(&v2, &u2)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_copy(&v3, &u3)) != MP_OKAY) { goto LBL_ERR; } /* (v1,v2,v3) = (t1,t2,t3) */ if ((err = mp_copy(&t1, &v1)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_copy(&t2, &v2)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_copy(&t3, &v3)) != MP_OKAY) { goto LBL_ERR; } } /* make sure U3 >= 0 */ if (u3.sign == MP_NEG) { if ((err = mp_neg(&u1, &u1)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_neg(&u2, &u2)) != MP_OKAY) { goto LBL_ERR; } if ((err = mp_neg(&u3, &u3)) != MP_OKAY) { goto LBL_ERR; } } /* copy result out */ if (U1 != NULL) { mp_exch(U1, &u1); |
︙ | ︙ |
Changes to libtommath/bn_mp_fread.c.
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 | */ #ifndef LTM_NO_FILE /* read a bigint from a file stream in ASCII */ int mp_fread(mp_int *a, int radix, FILE *stream) { int err, ch, neg, y; /* clear a */ mp_zero(a); /* if first digit is - then set negative */ ch = fgetc(stream); | > | < | | | | | > | > | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | */ #ifndef LTM_NO_FILE /* read a bigint from a file stream in ASCII */ int mp_fread(mp_int *a, int radix, FILE *stream) { int err, ch, neg, y; unsigned pos; /* clear a */ mp_zero(a); /* if first digit is - then set negative */ ch = fgetc(stream); if (ch == (int)'-') { neg = MP_NEG; ch = fgetc(stream); } else { neg = MP_ZPOS; } for (;;) { pos = (unsigned)(ch - (int)'('); if (mp_s_rmap_reverse_sz < pos) { break; } y = (int)mp_s_rmap_reverse[pos]; if ((y == 0xff) || (y >= radix)) { break; } /* shift up and add */ if ((err = mp_mul_d(a, (mp_digit)radix, a)) != MP_OKAY) { return err; } if ((err = mp_add_d(a, (mp_digit)y, a)) != MP_OKAY) { return err; } ch = fgetc(stream); } if (mp_cmp_d(a, 0uL) != MP_EQ) { a->sign = neg; } return MP_OKAY; } #endif |
︙ | ︙ |
Changes to libtommath/bn_mp_fwrite.c.
︙ | ︙ | |||
21 22 23 24 25 26 27 | char *buf; int err, len, x; if ((err = mp_radix_size(a, radix, &len)) != MP_OKAY) { return err; } | | | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | char *buf; int err, len, x; if ((err = mp_radix_size(a, radix, &len)) != MP_OKAY) { return err; } buf = OPT_CAST(char) XMALLOC((size_t)len); if (buf == NULL) { return MP_MEM; } if ((err = mp_toradix(a, buf, radix)) != MP_OKAY) { XFREE(buf); return err; } for (x = 0; x < len; x++) { if (fputc((int)buf[x], stream) == EOF) { XFREE(buf); return MP_VAL; } } XFREE(buf); return MP_OKAY; |
︙ | ︙ |
Changes to libtommath/bn_mp_get_int.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | mp_min_u32 res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | mp_min_u32 res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ i = MIN(a->used, ((((int)sizeof(unsigned long) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1; /* get most significant digit of result */ res = DIGIT(a, i); while (--i >= 0) { res = (res << DIGIT_BIT) | DIGIT(a, i); } |
︙ | ︙ |
Changes to libtommath/bn_mp_get_long.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | unsigned long res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | unsigned long res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ i = MIN(a->used, ((((int)sizeof(unsigned long) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1; /* get most significant digit of result */ res = DIGIT(a, i); #if (ULONG_MAX != 0xffffffffuL) || (DIGIT_BIT < 32) while (--i >= 0) { res = (res << DIGIT_BIT) | DIGIT(a, i); |
︙ | ︙ |
Changes to libtommath/bn_mp_get_long_long.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | Tcl_WideUInt res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | Tcl_WideUInt res; if (a->used == 0) { return 0; } /* get number of digits of the lsb we have to read */ i = MIN(a->used, ((((int)sizeof(Tcl_WideUInt) * CHAR_BIT) + DIGIT_BIT - 1) / DIGIT_BIT)) - 1; /* get most significant digit of result */ res = DIGIT(a, i); #if DIGIT_BIT < 64 while (--i >= 0) { res = (res << DIGIT_BIT) | DIGIT(a, i); |
︙ | ︙ |
Changes to libtommath/bn_mp_grow.c.
︙ | ︙ | |||
28 29 30 31 32 33 34 | /* reallocate the array a->dp * * We store the return in a temporary variable * in case the operation failed we don't want * to overwrite the dp member of a. */ | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | /* reallocate the array a->dp * * We store the return in a temporary variable * in case the operation failed we don't want * to overwrite the dp member of a. */ tmp = OPT_CAST(mp_digit) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)size); if (tmp == NULL) { /* reallocation failed but "a" is still valid [can be freed] */ return MP_MEM; } /* reallocation succeeded so set a->dp */ a->dp = tmp; |
︙ | ︙ |
Changes to libtommath/bn_mp_import.c.
︙ | ︙ | |||
30 31 32 33 34 35 36 | if (endian == 0) { union { unsigned int i; char c[4]; } lint; lint.i = 0x01020304; | | | | | | | | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | if (endian == 0) { union { unsigned int i; char c[4]; } lint; lint.i = 0x01020304; endian = (lint.c[0] == '\x04') ? -1 : 1; } odd_nails = (nails % 8u); odd_nail_mask = 0xff; for (i = 0; i < odd_nails; ++i) { odd_nail_mask ^= (unsigned char)(1u << (7u - i)); } nail_bytes = nails / 8u; for (i = 0; i < count; ++i) { for (j = 0; j < (size - nail_bytes); ++j) { unsigned char byte = *((unsigned char *)op + (((order == 1) ? i : ((count - 1u) - i)) * size) + ((endian == 1) ? (j + nail_bytes) : (((size - 1u) - j) - nail_bytes))); if ((result = mp_mul_2d(rop, (j == 0u) ? (int)(8u - odd_nails) : 8, rop)) != MP_OKAY) { return result; } rop->dp[0] |= (j == 0u) ? (mp_digit)(byte & odd_nail_mask) : (mp_digit)byte; rop->used += 1; } } mp_clamp(rop); return MP_OKAY; |
︙ | ︙ |
Changes to libtommath/bn_mp_init.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | /* init a new mp_int */ int mp_init(mp_int *a) { int i; /* allocate memory required and clear it */ | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /* init a new mp_int */ int mp_init(mp_int *a) { int i; /* allocate memory required and clear it */ a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * (size_t)MP_PREC); if (a->dp == NULL) { return MP_MEM; } /* set the digits to zero */ for (i = 0; i < MP_PREC; i++) { a->dp[i] = 0; |
︙ | ︙ |
Changes to libtommath/bn_mp_init_multi.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #include <stdarg.h> int mp_init_multi(mp_int *mp, ...) { mp_err res = MP_OKAY; /* Assume ok until proven otherwise */ int n = 0; /* Number of ok inits */ mp_int *cur_arg = mp; | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #include <stdarg.h> int mp_init_multi(mp_int *mp, ...) { mp_err res = MP_OKAY; /* Assume ok until proven otherwise */ int n = 0; /* Number of ok inits */ mp_int *cur_arg = mp; |
︙ | ︙ |
Changes to libtommath/bn_mp_init_size.c.
︙ | ︙ | |||
20 21 22 23 24 25 26 | { int x; /* pad size so there are always extra digits */ size += (MP_PREC * 2) - (size % MP_PREC); /* alloc mem */ | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | { int x; /* pad size so there are always extra digits */ size += (MP_PREC * 2) - (size % MP_PREC); /* alloc mem */ a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * (size_t)size); if (a->dp == NULL) { return MP_MEM; } /* set the members */ a->used = 0; a->alloc = size; |
︙ | ︙ |
Changes to libtommath/bn_mp_invmod.c.
︙ | ︙ | |||
14 15 16 17 18 19 20 | * * Tom St Denis, [email protected], http://libtom.org */ /* hac 14.61, pp608 */ int mp_invmod(const mp_int *a, const mp_int *b, mp_int *c) { | | | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | * * Tom St Denis, [email protected], http://libtom.org */ /* hac 14.61, pp608 */ int mp_invmod(const mp_int *a, const mp_int *b, mp_int *c) { /* b cannot be negative and has to be >1 */ if ((b->sign == MP_NEG) || (mp_cmp_d(b, 1uL) != MP_GT)) { return MP_VAL; } #ifdef BN_FAST_MP_INVMOD_C /* if the modulus is odd we can use a faster routine instead */ if ((mp_isodd(b) == MP_YES)) { return fast_mp_invmod(a, b, c); } #endif #ifdef BN_MP_INVMOD_SLOW_C return mp_invmod_slow(a, b, c); #else |
︙ | ︙ |
Changes to libtommath/bn_mp_invmod_slow.c.
︙ | ︙ | |||
49 50 51 52 53 54 55 | /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ if ((res = mp_copy(&x, &u)) != MP_OKAY) { goto LBL_ERR; } if ((res = mp_copy(&y, &v)) != MP_OKAY) { goto LBL_ERR; } | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ if ((res = mp_copy(&x, &u)) != MP_OKAY) { goto LBL_ERR; } if ((res = mp_copy(&y, &v)) != MP_OKAY) { goto LBL_ERR; } mp_set(&A, 1uL); mp_set(&D, 1uL); top: /* 4. while u is even do */ while (mp_iseven(&u) == MP_YES) { /* 4.1 u = u/2 */ if ((res = mp_div_2(&u, &u)) != MP_OKAY) { goto LBL_ERR; |
︙ | ︙ | |||
139 140 141 142 143 144 145 | /* if not zero goto step 4 */ if (mp_iszero(&u) == MP_NO) goto top; /* now a = C, b = D, gcd == g*v */ /* if v != 1 then there is no inverse */ | | | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | /* if not zero goto step 4 */ if (mp_iszero(&u) == MP_NO) goto top; /* now a = C, b = D, gcd == g*v */ /* if v != 1 then there is no inverse */ if (mp_cmp_d(&v, 1uL) != MP_EQ) { res = MP_VAL; goto LBL_ERR; } /* if its too low */ while (mp_cmp_d(&C, 0uL) == MP_LT) { if ((res = mp_add(&C, b, &C)) != MP_OKAY) { goto LBL_ERR; } } /* too big */ while (mp_cmp_mag(&C, b) != MP_LT) { |
︙ | ︙ |
Changes to libtommath/bn_mp_is_square.c.
︙ | ︙ | |||
54 55 56 57 58 59 60 | /* digits used? (TSD) */ if (arg->used == 0) { return MP_OKAY; } /* First check mod 128 (suppose that DIGIT_BIT is at least 7) */ | | | | | | | | | | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | /* digits used? (TSD) */ if (arg->used == 0) { return MP_OKAY; } /* First check mod 128 (suppose that DIGIT_BIT is at least 7) */ if (rem_128[127u & DIGIT(arg, 0)] == (char)1) { return MP_OKAY; } /* Next check mod 105 (3*5*7) */ if ((res = mp_mod_d(arg, 105uL, &c)) != MP_OKAY) { return res; } if (rem_105[c] == (char)1) { return MP_OKAY; } if ((res = mp_init_set_int(&t, 11L*13L*17L*19L*23L*29L*31L)) != MP_OKAY) { return res; } if ((res = mp_mod(arg, &t, &t)) != MP_OKAY) { goto ERR; } r = mp_get_int(&t); /* Check for other prime modules, note it's not an ERROR but we must * free "t" so the easiest way is to goto ERR. We know that res * is already equal to MP_OKAY from the mp_mod call */ if (((1uL<<(r%11uL)) & 0x5C4uL) != 0uL) goto ERR; if (((1uL<<(r%13uL)) & 0x9E4uL) != 0uL) goto ERR; if (((1uL<<(r%17uL)) & 0x5CE8uL) != 0uL) goto ERR; if (((1uL<<(r%19uL)) & 0x4F50CuL) != 0uL) goto ERR; if (((1uL<<(r%23uL)) & 0x7ACCA0uL) != 0uL) goto ERR; if (((1uL<<(r%29uL)) & 0xC2EDD0CuL) != 0uL) goto ERR; if (((1uL<<(r%31uL)) & 0x6DE2B848uL) != 0uL) goto ERR; /* Final check - is sqr(sqrt(arg)) == arg ? */ if ((res = mp_sqrt(arg, &t)) != MP_OKAY) { goto ERR; } if ((res = mp_sqr(&t, &t)) != MP_OKAY) { goto ERR; |
︙ | ︙ |
Changes to libtommath/bn_mp_jacobi.c.
︙ | ︙ | |||
28 29 30 31 32 33 34 | /* if a < 0 return MP_VAL */ if (mp_isneg(a) == MP_YES) { return MP_VAL; } /* if n <= 0 return MP_VAL */ | | | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /* if a < 0 return MP_VAL */ if (mp_isneg(a) == MP_YES) { return MP_VAL; } /* if n <= 0 return MP_VAL */ if (mp_cmp_d(n, 0uL) != MP_GT) { return MP_VAL; } /* step 1. handle case of a == 0 */ if (mp_iszero(a) == MP_YES) { /* special case of a == 0 and n == 1 */ if (mp_cmp_d(n, 1uL) == MP_EQ) { *c = 1; } else { *c = 0; } return MP_OKAY; } /* step 2. if a == 1, return 1 */ if (mp_cmp_d(a, 1uL) == MP_EQ) { *c = 1; return MP_OKAY; } /* default */ s = 0; |
︙ | ︙ | |||
68 69 70 71 72 73 74 | /* divide out larger power of two */ k = mp_cnt_lsb(&a1); if ((res = mp_div_2d(&a1, k, &a1, NULL)) != MP_OKAY) { goto LBL_P1; } /* step 4. if e is even set s=1 */ | | | | | | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | /* divide out larger power of two */ k = mp_cnt_lsb(&a1); if ((res = mp_div_2d(&a1, k, &a1, NULL)) != MP_OKAY) { goto LBL_P1; } /* step 4. if e is even set s=1 */ if (((unsigned)k & 1u) == 0u) { s = 1; } else { /* else set s=1 if p = 1/7 (mod 8) or s=-1 if p = 3/5 (mod 8) */ residue = n->dp[0] & 7u; if ((residue == 1u) || (residue == 7u)) { s = 1; } else if ((residue == 3u) || (residue == 5u)) { s = -1; } } /* step 5. if p == 3 (mod 4) *and* a1 == 3 (mod 4) then s = -s */ if (((n->dp[0] & 3u) == 3u) && ((a1.dp[0] & 3u) == 3u)) { s = -s; } /* if a1 == 1 we're done */ if (mp_cmp_d(&a1, 1uL) == MP_EQ) { *c = s; } else { /* n1 = n mod a1 */ if ((res = mp_mod(n, &a1, &p1)) != MP_OKAY) { goto LBL_P1; } if ((res = mp_jacobi(&p1, &a1, &r)) != MP_OKAY) { |
︙ | ︙ |
Changes to libtommath/bn_mp_lshd.c.
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | int mp_lshd(mp_int *a, int b) { int x, res; /* if its less than zero return */ if (b <= 0) { return MP_OKAY; } /* grow to fit the new digits */ if (a->alloc < (a->used + b)) { if ((res = mp_grow(a, a->used + b)) != MP_OKAY) { return res; } | > > > > | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | int mp_lshd(mp_int *a, int b) { int x, res; /* if its less than zero return */ if (b <= 0) { return MP_OKAY; } /* no need to shift 0 around */ if (mp_iszero(a) == MP_YES) { return MP_OKAY; } /* grow to fit the new digits */ if (a->alloc < (a->used + b)) { if ((res = mp_grow(a, a->used + b)) != MP_OKAY) { return res; } |
︙ | ︙ |
Changes to libtommath/bn_mp_mod_2d.c.
︙ | ︙ | |||
23 24 25 26 27 28 29 | /* if b is <= 0 then zero the int */ if (b <= 0) { mp_zero(c); return MP_OKAY; } /* if the modulus is larger than the value than return */ | | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /* if b is <= 0 then zero the int */ if (b <= 0) { mp_zero(c); return MP_OKAY; } /* if the modulus is larger than the value than return */ if (b >= (a->used * DIGIT_BIT)) { res = mp_copy(a, c); return res; } /* copy */ if ((res = mp_copy(a, c)) != MP_OKAY) { return res; } /* zero digits above the last digit of the modulus */ for (x = (b / DIGIT_BIT) + (((b % DIGIT_BIT) == 0) ? 0 : 1); x < c->used; x++) { c->dp[x] = 0; } /* clear the digit that is not completely outside/inside the modulus */ c->dp[b / DIGIT_BIT] &= ((mp_digit)1 << (mp_digit)(b % DIGIT_BIT)) - (mp_digit)1; mp_clamp(c); return MP_OKAY; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_montgomery_calc_normalization.c.
︙ | ︙ | |||
29 30 31 32 33 34 35 | bits = mp_count_bits(b) % DIGIT_BIT; if (b->used > 1) { if ((res = mp_2expt(a, ((b->used - 1) * DIGIT_BIT) + bits - 1)) != MP_OKAY) { return res; } } else { | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | bits = mp_count_bits(b) % DIGIT_BIT; if (b->used > 1) { if ((res = mp_2expt(a, ((b->used - 1) * DIGIT_BIT) + bits - 1)) != MP_OKAY) { return res; } } else { mp_set(a, 1uL); bits = 1; } /* now compute C = A * B mod b */ for (x = bits - 1; x < (int)DIGIT_BIT; x++) { if ((res = mp_mul_2(a, a)) != MP_OKAY) { |
︙ | ︙ |
Changes to libtommath/bn_mp_montgomery_reduce.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | /* can the fast reduction [comba] method be used? * * Note that unlike in mul you're safely allowed *less* * than the available columns [255 per default] since carries * are fixed up in the inner loop. */ digs = (n->used * 2) + 1; | > | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | /* can the fast reduction [comba] method be used? * * Note that unlike in mul you're safely allowed *less* * than the available columns [255 per default] since carries * are fixed up in the inner loop. */ digs = (n->used * 2) + 1; if ((digs < (int)MP_WARRAY) && (x->used <= (int)MP_WARRAY) && (n->used < (int)(1u << (((size_t)CHAR_BIT * sizeof(mp_word)) - (2u * (size_t)DIGIT_BIT))))) { return fast_mp_montgomery_reduce(x, n, rho); } /* grow the input as required */ if (x->alloc < digs) { if ((res = mp_grow(x, digs)) != MP_OKAY) { return res; |
︙ | ︙ | |||
68 69 70 71 72 73 74 | /* set the carry to zero */ u = 0; /* Multiply and add in place */ for (iy = 0; iy < n->used; iy++) { /* compute product and sum */ r = ((mp_word)mu * (mp_word)*tmpn++) + | | | | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | /* set the carry to zero */ u = 0; /* Multiply and add in place */ for (iy = 0; iy < n->used; iy++) { /* compute product and sum */ r = ((mp_word)mu * (mp_word)*tmpn++) + (mp_word)u + (mp_word)*tmpx; /* get carry */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); /* fix digit */ *tmpx++ = (mp_digit)(r & (mp_word)MP_MASK); } /* At this point the ix'th digit of x should be zero */ /* propagate carries upwards as required*/ while (u != 0u) { *tmpx += u; u = *tmpx >> DIGIT_BIT; *tmpx++ &= MP_MASK; } } } |
︙ | ︙ |
Changes to libtommath/bn_mp_montgomery_setup.c.
︙ | ︙ | |||
26 27 28 29 30 31 32 | * * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) * => 2*X*A - X*X*A*A = 1 * => 2*(1) - (1) = 1 */ b = n->dp[0]; | | | | | | | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | * * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) * => 2*X*A - X*X*A*A = 1 * => 2*(1) - (1) = 1 */ b = n->dp[0]; if ((b & 1u) == 0u) { return MP_VAL; } x = (((b + 2u) & 4u) << 1) + b; /* here x*a==1 mod 2**4 */ x *= 2u - (b * x); /* here x*a==1 mod 2**8 */ #if !defined(MP_8BIT) x *= 2u - (b * x); /* here x*a==1 mod 2**16 */ #endif #if defined(MP_64BIT) || !(defined(MP_8BIT) || defined(MP_16BIT)) x *= 2u - (b * x); /* here x*a==1 mod 2**32 */ #endif #ifdef MP_64BIT x *= 2u - (b * x); /* here x*a==1 mod 2**64 */ #endif /* rho = -1/m mod b */ *rho = (mp_digit)(((mp_word)1 << (mp_word)DIGIT_BIT) - x) & MP_MASK; return MP_OKAY; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ |
︙ | ︙ |
Changes to libtommath/bn_mp_mul.c.
︙ | ︙ | |||
39 40 41 42 43 44 45 | * The fast multiplier can be used if the output will * have less than MP_WARRAY digits and the number of * digits won't affect carry propagation */ int digs = a->used + b->used + 1; #ifdef BN_FAST_S_MP_MUL_DIGS_C | | | | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | * The fast multiplier can be used if the output will * have less than MP_WARRAY digits and the number of * digits won't affect carry propagation */ int digs = a->used + b->used + 1; #ifdef BN_FAST_S_MP_MUL_DIGS_C if ((digs < (int)MP_WARRAY) && (MIN(a->used, b->used) <= (int)(1u << (((size_t)CHAR_BIT * sizeof(mp_word)) - (2u * (size_t)DIGIT_BIT))))) { res = fast_s_mp_mul_digs(a, b, c, digs); } else #endif { #ifdef BN_S_MP_MUL_DIGS_C res = s_mp_mul(a, b, c); /* uses s_mp_mul_digs */ #else |
︙ | ︙ |
Changes to libtommath/bn_mp_mul_2.c.
︙ | ︙ | |||
42 43 44 45 46 47 48 | /* carry */ r = 0; for (x = 0; x < a->used; x++) { /* get what will be the *next* carry bit from the * MSB of the current digit */ | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | /* carry */ r = 0; for (x = 0; x < a->used; x++) { /* get what will be the *next* carry bit from the * MSB of the current digit */ rr = *tmpa >> (mp_digit)(DIGIT_BIT - 1); /* now shift up this digit, add in the carry [from the previous] */ *tmpb++ = ((*tmpa++ << 1uL) | r) & MP_MASK; /* copy the carry that would be from the source * digit into the next iteration */ r = rr; } /* new leading digit? */ if (r != 0u) { /* add a MSB which is always 1 at this point */ *tmpb = 1; ++(b->used); } /* now zero any excess digits on the destination * that we didn't write to |
︙ | ︙ |
Changes to libtommath/bn_mp_mul_2d.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | /* copy */ if (a != c) { if ((res = mp_copy(a, c)) != MP_OKAY) { return res; } } | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | /* copy */ if (a != c) { if ((res = mp_copy(a, c)) != MP_OKAY) { return res; } } if (c->alloc < (c->used + (b / DIGIT_BIT) + 1)) { if ((res = mp_grow(c, c->used + (b / DIGIT_BIT) + 1)) != MP_OKAY) { return res; } } /* shift by as many digits in the bit count */ if (b >= DIGIT_BIT) { if ((res = mp_lshd(c, b / DIGIT_BIT)) != MP_OKAY) { return res; } } /* shift any bit count < DIGIT_BIT */ d = (mp_digit)(b % DIGIT_BIT); if (d != 0u) { mp_digit *tmpc, shift, mask, r, rr; int x; /* bitmask for carries */ mask = ((mp_digit)1 << d) - (mp_digit)1; /* shift for msbs */ shift = (mp_digit)DIGIT_BIT - d; /* alias */ tmpc = c->dp; /* carry */ r = 0; for (x = 0; x < c->used; x++) { /* get the higher bits of the current word */ rr = (*tmpc >> shift) & mask; /* shift the current word and OR in the carry */ *tmpc = ((*tmpc << d) | r) & MP_MASK; ++tmpc; /* set the carry to the carry bits of the current word */ r = rr; } /* set final carry */ if (r != 0u) { c->dp[(c->used)++] = r; } } mp_clamp(c); return MP_OKAY; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_mul_d.c.
︙ | ︙ | |||
46 47 48 49 50 51 52 | /* compute columns */ for (ix = 0; ix < a->used; ix++) { /* compute product and carry sum for this term */ r = (mp_word)u + ((mp_word)*tmpa++ * (mp_word)b); /* mask off higher bits to get a single digit */ | | | | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /* compute columns */ for (ix = 0; ix < a->used; ix++) { /* compute product and carry sum for this term */ r = (mp_word)u + ((mp_word)*tmpa++ * (mp_word)b); /* mask off higher bits to get a single digit */ *tmpc++ = (mp_digit)(r & (mp_word)MP_MASK); /* send carry into next iteration */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); } /* store final carry [if any] and increment ix offset */ *tmpc++ = u; ++ix; /* now zero digits above the top */ |
︙ | ︙ |
Changes to libtommath/bn_mp_n_root_ex.c.
︙ | ︙ | |||
27 28 29 30 31 32 33 | */ int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast) { mp_int t1, t2, t3, a_; int res; /* input must be positive if b is even */ | | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | */ int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast) { mp_int t1, t2, t3, a_; int res; /* input must be positive if b is even */ if (((b & 1u) == 0u) && (a->sign == MP_NEG)) { return MP_VAL; } if ((res = mp_init(&t1)) != MP_OKAY) { return res; } if ((res = mp_init(&t2)) != MP_OKAY) { goto LBL_T1; } if ((res = mp_init(&t3)) != MP_OKAY) { goto LBL_T2; } /* if a is negative fudge the sign but keep track */ a_ = *a; a_.sign = MP_ZPOS; /* t2 = 2 */ mp_set(&t2, 2uL); do { /* t1 = t2 */ if ((res = mp_copy(&t2, &t1)) != MP_OKAY) { goto LBL_T3; } /* t2 = t1 - ((t1**b - a) / (b * t1**(b-1))) */ /* t3 = t1**(b-1) */ if ((res = mp_expt_d_ex(&t1, b - 1u, &t3, fast)) != MP_OKAY) { goto LBL_T3; } /* numerator */ /* t2 = t1**b */ if ((res = mp_mul(&t3, &t1, &t2)) != MP_OKAY) { goto LBL_T3; |
︙ | ︙ | |||
97 98 99 100 101 102 103 | /* result can be off by a few so check */ for (;;) { if ((res = mp_expt_d_ex(&t1, b, &t2, fast)) != MP_OKAY) { goto LBL_T3; } if (mp_cmp(&t2, &a_) == MP_GT) { | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | /* result can be off by a few so check */ for (;;) { if ((res = mp_expt_d_ex(&t1, b, &t2, fast)) != MP_OKAY) { goto LBL_T3; } if (mp_cmp(&t2, &a_) == MP_GT) { if ((res = mp_sub_d(&t1, 1uL, &t1)) != MP_OKAY) { goto LBL_T3; } } else { break; } } |
︙ | ︙ |
Changes to libtommath/bn_mp_prime_fermat.c.
︙ | ︙ | |||
28 29 30 31 32 33 34 | mp_int t; int err; /* default to composite */ *result = MP_NO; /* ensure b > 1 */ | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | mp_int t; int err; /* default to composite */ *result = MP_NO; /* ensure b > 1 */ if (mp_cmp_d(b, 1uL) != MP_GT) { return MP_VAL; } /* init t */ if ((err = mp_init(&t)) != MP_OKAY) { return err; } |
︙ | ︙ |
Changes to libtommath/bn_mp_prime_is_divisible.c.
︙ | ︙ | |||
31 32 33 34 35 36 37 | for (ix = 0; ix < PRIME_SIZE; ix++) { /* what is a mod LBL_prime_tab[ix] */ if ((err = mp_mod_d(a, ltm_prime_tab[ix], &res)) != MP_OKAY) { return err; } /* is the residue zero? */ | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | for (ix = 0; ix < PRIME_SIZE; ix++) { /* what is a mod LBL_prime_tab[ix] */ if ((err = mp_mod_d(a, ltm_prime_tab[ix], &res)) != MP_OKAY) { return err; } /* is the residue zero? */ if (res == 0u) { *result = MP_YES; return MP_OKAY; } } return MP_OKAY; } |
︙ | ︙ |
Changes to libtommath/bn_mp_prime_miller_rabin.c.
︙ | ︙ | |||
27 28 29 30 31 32 33 | mp_int n1, y, r; int s, j, err; /* default */ *result = MP_NO; /* ensure b > 1 */ | | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | mp_int n1, y, r; int s, j, err; /* default */ *result = MP_NO; /* ensure b > 1 */ if (mp_cmp_d(b, 1uL) != MP_GT) { return MP_VAL; } /* get n1 = a - 1 */ if ((err = mp_init_copy(&n1, a)) != MP_OKAY) { return err; } if ((err = mp_sub_d(&n1, 1uL, &n1)) != MP_OKAY) { goto LBL_N1; } /* set 2**s * r = n1 */ if ((err = mp_init_copy(&r, &n1)) != MP_OKAY) { goto LBL_N1; } |
︙ | ︙ | |||
63 64 65 66 67 68 69 | goto LBL_R; } if ((err = mp_exptmod(b, &r, a, &y)) != MP_OKAY) { goto LBL_Y; } /* if y != 1 and y != n1 do */ | | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | goto LBL_R; } if ((err = mp_exptmod(b, &r, a, &y)) != MP_OKAY) { goto LBL_Y; } /* if y != 1 and y != n1 do */ if ((mp_cmp_d(&y, 1uL) != MP_EQ) && (mp_cmp(&y, &n1) != MP_EQ)) { j = 1; /* while j <= s-1 and y != n1 */ while ((j <= (s - 1)) && (mp_cmp(&y, &n1) != MP_EQ)) { if ((err = mp_sqrmod(&y, a, &y)) != MP_OKAY) { goto LBL_Y; } /* if y == 1 then composite */ if (mp_cmp_d(&y, 1uL) == MP_EQ) { goto LBL_Y; } ++j; } /* if y != n1 then composite */ |
︙ | ︙ |
Changes to libtommath/bn_mp_prime_next_prime.c.
︙ | ︙ | |||
42 43 44 45 46 47 48 | if (bbs_style == 1) { /* ok we found a prime smaller or * equal [so the next is larger] * * however, the prime must be * congruent to 3 mod 4 */ | | | | | | | | | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | if (bbs_style == 1) { /* ok we found a prime smaller or * equal [so the next is larger] * * however, the prime must be * congruent to 3 mod 4 */ if ((ltm_prime_tab[x + 1] & 3u) != 3u) { /* scan upwards for a prime congruent to 3 mod 4 */ for (y = x + 1; y < PRIME_SIZE; y++) { if ((ltm_prime_tab[y] & 3u) == 3u) { mp_set(a, ltm_prime_tab[y]); return MP_OKAY; } } } } else { mp_set(a, ltm_prime_tab[x + 1]); return MP_OKAY; } } } /* at this point a maybe 1 */ if (mp_cmp_d(a, 1uL) == MP_EQ) { mp_set(a, 2uL); return MP_OKAY; } /* fall through to the sieve */ } /* generate a prime congruent to 3 mod 4 or 1/3 mod 4? */ if (bbs_style == 1) { kstep = 4; } else { kstep = 2; } /* at this point we will use a combination of a sieve and Miller-Rabin */ if (bbs_style == 1) { /* if a mod 4 != 3 subtract the correct value to make it so */ if ((a->dp[0] & 3u) != 3u) { if ((err = mp_sub_d(a, (a->dp[0] & 3u) + 1u, a)) != MP_OKAY) { return err; }; } } else { if (mp_iseven(a) == MP_YES) { /* force odd */ if ((err = mp_sub_d(a, 1uL, a)) != MP_OKAY) { return err; } } } /* generate the restable */ for (x = 1; x < PRIME_SIZE; x++) { |
︙ | ︙ | |||
123 124 125 126 127 128 129 | /* subtract the modulus [instead of using division] */ if (res_tab[x] >= ltm_prime_tab[x]) { res_tab[x] -= ltm_prime_tab[x]; } /* set flag if zero */ | | | | | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /* subtract the modulus [instead of using division] */ if (res_tab[x] >= ltm_prime_tab[x]) { res_tab[x] -= ltm_prime_tab[x]; } /* set flag if zero */ if (res_tab[x] == 0u) { y = 1; } } } while ((y == 1) && (step < (((mp_digit)1 << DIGIT_BIT) - kstep))); /* add the step */ if ((err = mp_add_d(a, step, a)) != MP_OKAY) { goto LBL_ERR; } /* if didn't pass sieve and step == MAX then skip test */ if ((y == 1) && (step >= (((mp_digit)1 << DIGIT_BIT) - kstep))) { continue; } /* is this prime? */ for (x = 0; x < t; x++) { mp_set(&b, ltm_prime_tab[x]); if ((err = mp_prime_miller_rabin(a, &b, &res)) != MP_OKAY) { |
︙ | ︙ |
Changes to libtommath/bn_mp_prime_random_ex.c.
︙ | ︙ | |||
45 46 47 48 49 50 51 | flags |= LTM_PRIME_BBS; } /* calc the byte size */ bsize = (size>>3) + ((size&7)?1:0); /* we need a buffer of bsize bytes */ | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | flags |= LTM_PRIME_BBS; } /* calc the byte size */ bsize = (size>>3) + ((size&7)?1:0); /* we need a buffer of bsize bytes */ tmp = OPT_CAST(unsigned char) XMALLOC((size_t)bsize); if (tmp == NULL) { return MP_MEM; } /* calc the maskAND value for the MSbyte*/ maskAND = ((size&7) == 0) ? 0xFF : (0xFF >> (8 - (size & 7))); |
︙ | ︙ | |||
82 83 84 85 86 87 88 | tmp[0] |= 1 << ((size - 1) & 7); /* mix in the maskORs */ tmp[maskOR_msb_offset] |= maskOR_msb; tmp[bsize-1] |= maskOR_lsb; /* read it in */ | | | | | | | | | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | tmp[0] |= 1 << ((size - 1) & 7); /* mix in the maskORs */ tmp[maskOR_msb_offset] |= maskOR_msb; tmp[bsize-1] |= maskOR_lsb; /* read it in */ if ((err = mp_read_unsigned_bin(a, tmp, bsize)) != MP_OKAY) { goto error; } /* is it prime? */ if ((err = mp_prime_is_prime(a, t, &res)) != MP_OKAY) { goto error; } if (res == MP_NO) { continue; } if ((flags & LTM_PRIME_SAFE) != 0) { /* see if (a-1)/2 is prime */ if ((err = mp_sub_d(a, 1uL, a)) != MP_OKAY) { goto error; } if ((err = mp_div_2(a, a)) != MP_OKAY) { goto error; } /* is it prime? */ if ((err = mp_prime_is_prime(a, t, &res)) != MP_OKAY) { goto error; } } } while (res == MP_NO); if ((flags & LTM_PRIME_SAFE) != 0) { /* restore a to the original value */ if ((err = mp_mul_2(a, a)) != MP_OKAY) { goto error; } if ((err = mp_add_d(a, 1uL, a)) != MP_OKAY) { goto error; } } err = MP_OKAY; error: XFREE(tmp); |
︙ | ︙ |
Changes to libtommath/bn_mp_radix_smap.c.
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 | * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ /* chars used in radix conversions */ const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ | > > > > > > > > > > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ /* chars used in radix conversions */ const char *mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; const unsigned char mp_s_rmap_reverse[] = { 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, /* ()*+,-./ */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 01234567 */ 0x08, 0x09, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 89:;<=>? */ 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, /* @ABCDEFG */ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, /* HIJKLMNO */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, /* PQRSTUVW */ 0x21, 0x22, 0x23, 0xff, 0xff, 0xff, 0xff, 0xff, /* XYZ[\]^_ */ 0xff, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, /* `abcdefg */ 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, /* hijklmno */ 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, /* pqrstuvw */ 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, /* xyz{|}~. */ }; const size_t mp_s_rmap_reverse_sz = sizeof(mp_s_rmap_reverse); #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_rand.c.
︙ | ︙ | |||
11 12 13 14 15 16 17 | * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ | > > > | > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #if defined(MP_8BIT) || defined(MP_16BIT) #define MP_GEN_RANDOM_SHIFT DIGIT_BIT #else #if MP_GEN_RANDOM_MAX == 0xffffffffu #define MP_GEN_RANDOM_SHIFT 32 #elif MP_GEN_RANDOM_MAX == 32767 /* SHRT_MAX */ #define MP_GEN_RANDOM_SHIFT 15 #elif MP_GEN_RANDOM_MAX == 2147483647 /* INT_MAX */ #define MP_GEN_RANDOM_SHIFT 31 #elif !defined(MP_GEN_RANDOM_SHIFT) #error Thou shalt define their own valid MP_GEN_RANDOM_SHIFT #endif #endif /* makes a pseudo-random int of a given size */ static mp_digit s_gen_random(void) { mp_digit d = 0, msk = 0; do { |
︙ | ︙ | |||
50 51 52 53 54 55 56 | if (digits <= 0) { return MP_OKAY; } /* first place a random non-zero digit */ do { d = s_gen_random(); | | | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | if (digits <= 0) { return MP_OKAY; } /* first place a random non-zero digit */ do { d = s_gen_random(); } while (d == 0u); if ((res = mp_add_d(a, d, a)) != MP_OKAY) { return res; } while (--digits > 0) { if ((res = mp_lshd(a, 1)) != MP_OKAY) { |
︙ | ︙ |
Changes to libtommath/bn_mp_read_radix.c.
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * Tom St Denis, [email protected], http://libtom.org */ /* read a string [ASCII] in a given radix */ int mp_read_radix(mp_int *a, const char *str, int radix) { int y, res, neg; char ch; /* zero the digit bignum */ mp_zero(a); /* make sure the radix is ok */ if ((radix < 2) || (radix > 64)) { | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * Tom St Denis, [email protected], http://libtom.org */ /* read a string [ASCII] in a given radix */ int mp_read_radix(mp_int *a, const char *str, int radix) { int y, res, neg; unsigned pos; char ch; /* zero the digit bignum */ mp_zero(a); /* make sure the radix is ok */ if ((radix < 2) || (radix > 64)) { |
︙ | ︙ | |||
45 46 47 48 49 50 51 | /* process each digit of the string */ while (*str != '\0') { /* if the radix <= 36 the conversion is case insensitive * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ ch = (radix <= 36) ? (char)toupper((int)*str) : *str; | | | | | < > | > > | | | | | < < < | | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | /* process each digit of the string */ while (*str != '\0') { /* if the radix <= 36 the conversion is case insensitive * this allows numbers like 1AB and 1ab to represent the same value * [e.g. in hex] */ ch = (radix <= 36) ? (char)toupper((int)*str) : *str; pos = (unsigned)(ch - '('); if (mp_s_rmap_reverse_sz < pos) { break; } y = (int)mp_s_rmap_reverse[pos]; /* if the char was found in the map * and is less than the given radix add it * to the number, otherwise exit the loop. */ if ((y == 0xff) || (y >= radix)) { break; } if ((res = mp_mul_d(a, (mp_digit)radix, a)) != MP_OKAY) { return res; } if ((res = mp_add_d(a, (mp_digit)y, a)) != MP_OKAY) { return res; } ++str; } /* if an illegal character was found, fail. */ if (!((*str == '\0') || (*str == '\r') || (*str == '\n'))) { mp_zero(a); return MP_VAL; } /* set the sign only if a != 0 */ if (mp_iszero(a) != MP_YES) { a->sign = neg; |
︙ | ︙ |
Changes to libtommath/bn_mp_read_signed_bin.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | /* read magnitude */ if ((res = mp_read_unsigned_bin(a, b + 1, c - 1)) != MP_OKAY) { return res; } /* first byte is 0 for positive, non-zero for negative */ | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | /* read magnitude */ if ((res = mp_read_unsigned_bin(a, b + 1, c - 1)) != MP_OKAY) { return res; } /* first byte is 0 for positive, non-zero for negative */ if (b[0] == (unsigned char)0) { a->sign = MP_ZPOS; } else { a->sign = MP_NEG; } return MP_OKAY; } |
︙ | ︙ |
Changes to libtommath/bn_mp_read_unsigned_bin.c.
︙ | ︙ | |||
37 38 39 40 41 42 43 | } #ifndef MP_8BIT a->dp[0] |= *b++; a->used += 1; #else a->dp[0] = (*b & MP_MASK); | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | } #ifndef MP_8BIT a->dp[0] |= *b++; a->used += 1; #else a->dp[0] = (*b & MP_MASK); a->dp[1] |= ((*b++ >> 7) & 1u); a->used += 2; #endif } mp_clamp(a); return MP_OKAY; } #endif |
︙ | ︙ |
Changes to libtommath/bn_mp_reduce.c.
︙ | ︙ | |||
29 30 31 32 33 34 35 | return res; } /* q1 = x / b**(k-1) */ mp_rshd(&q, um - 1); /* according to HAC this optimization is ok */ | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | return res; } /* q1 = x / b**(k-1) */ mp_rshd(&q, um - 1); /* according to HAC this optimization is ok */ if ((mp_digit)um > ((mp_digit)1 << (DIGIT_BIT - 1))) { if ((res = mp_mul(&q, mu, &q)) != MP_OKAY) { goto CLEANUP; } } else { #ifdef BN_S_MP_MUL_HIGH_DIGS_C if ((res = s_mp_mul_high_digs(&q, mu, &q, um)) != MP_OKAY) { goto CLEANUP; |
︙ | ︙ | |||
69 70 71 72 73 74 75 | /* x = x - q */ if ((res = mp_sub(x, &q, x)) != MP_OKAY) { goto CLEANUP; } /* If x < 0, add b**(k+1) to it */ | | | | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /* x = x - q */ if ((res = mp_sub(x, &q, x)) != MP_OKAY) { goto CLEANUP; } /* If x < 0, add b**(k+1) to it */ if (mp_cmp_d(x, 0uL) == MP_LT) { mp_set(&q, 1uL); if ((res = mp_lshd(&q, um + 1)) != MP_OKAY) goto CLEANUP; if ((res = mp_add(x, &q, x)) != MP_OKAY) goto CLEANUP; } /* Back off if it's too big */ |
︙ | ︙ |
Changes to libtommath/bn_mp_reduce_2k.c.
︙ | ︙ | |||
28 29 30 31 32 33 34 | p = mp_count_bits(n); top: /* q = a/2**p, a = a mod 2**p */ if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { goto ERR; } | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | p = mp_count_bits(n); top: /* q = a/2**p, a = a mod 2**p */ if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { goto ERR; } if (d != 1u) { /* q = q * d */ if ((res = mp_mul_d(&q, d, &q)) != MP_OKAY) { goto ERR; } } /* a = a + q */ |
︙ | ︙ |
Changes to libtommath/bn_mp_reduce_is_2k.c.
︙ | ︙ | |||
28 29 30 31 32 33 34 | } else if (a->used > 1) { iy = mp_count_bits(a); iz = 1; iw = 1; /* Test every bit from the second digit up, must be 1 */ for (ix = DIGIT_BIT; ix < iy; ix++) { | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | } else if (a->used > 1) { iy = mp_count_bits(a); iz = 1; iw = 1; /* Test every bit from the second digit up, must be 1 */ for (ix = DIGIT_BIT; ix < iy; ix++) { if ((a->dp[iw] & iz) == 0u) { return MP_NO; } iz <<= 1; if (iz > (mp_digit)MP_MASK) { ++iw; iz = 1; } |
︙ | ︙ |
Changes to libtommath/bn_mp_set.c.
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ /* set to a digit */ void mp_set(mp_int *a, mp_digit b) { mp_zero(a); a->dp[0] = b & MP_MASK; | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | */ /* set to a digit */ void mp_set(mp_int *a, mp_digit b) { mp_zero(a); a->dp[0] = b & MP_MASK; a->used = (a->dp[0] != 0u) ? 1 : 0; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_set_int.c.
︙ | ︙ | |||
26 27 28 29 30 31 32 | for (x = 0; x < 8; x++) { /* shift the number up four bits */ if ((res = mp_mul_2d(a, 4, a)) != MP_OKAY) { return res; } /* OR in the top four bits of the source */ | | | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | for (x = 0; x < 8; x++) { /* shift the number up four bits */ if ((res = mp_mul_2d(a, 4, a)) != MP_OKAY) { return res; } /* OR in the top four bits of the source */ a->dp[0] |= (mp_digit)(b >> 28) & 15uL; /* shift the source up to the next four bits */ b <<= 4; /* ensure that digits are not clamped off */ a->used += 1; } |
︙ | ︙ |
Changes to libtommath/bn_mp_shrink.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | int used = 1; if (a->used > 0) { used = a->used; } if (a->alloc != used) { | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | int used = 1; if (a->used > 0) { used = a->used; } if (a->alloc != used) { if ((tmp = OPT_CAST(mp_digit) XREALLOC(a->dp, sizeof(mp_digit) * (size_t)used)) == NULL) { return MP_MEM; } a->dp = tmp; a->alloc = used; } return MP_OKAY; } |
︙ | ︙ |
Changes to libtommath/bn_mp_sqr.c.
︙ | ︙ | |||
31 32 33 34 35 36 37 | if (a->used >= KARATSUBA_SQR_CUTOFF) { res = mp_karatsuba_sqr(a, b); } else #endif { #ifdef BN_FAST_S_MP_SQR_C /* can we use the fast comba multiplier? */ | | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | if (a->used >= KARATSUBA_SQR_CUTOFF) { res = mp_karatsuba_sqr(a, b); } else #endif { #ifdef BN_FAST_S_MP_SQR_C /* can we use the fast comba multiplier? */ if ((((a->used * 2) + 1) < (int)MP_WARRAY) && (a->used < (int)(1u << (((sizeof(mp_word) * (size_t)CHAR_BIT) - (2u * (size_t)DIGIT_BIT)) - 1u)))) { res = fast_s_mp_sqr(a, b); } else #endif { #ifdef BN_S_MP_SQR_C res = s_mp_sqr(a, b); #else |
︙ | ︙ |
Changes to libtommath/bn_mp_sqrtmod_prime.c.
︙ | ︙ | |||
18 19 20 21 22 23 24 | int mp_sqrtmod_prime(const mp_int *n, const mp_int *prime, mp_int *ret) { int res, legendre; mp_int t1, C, Q, S, Z, M, T, R, two; mp_digit i; /* first handle the simple cases */ | | | | | | | | | | | | | | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | int mp_sqrtmod_prime(const mp_int *n, const mp_int *prime, mp_int *ret) { int res, legendre; mp_int t1, C, Q, S, Z, M, T, R, two; mp_digit i; /* first handle the simple cases */ if (mp_cmp_d(n, 0uL) == MP_EQ) { mp_zero(ret); return MP_OKAY; } if (mp_cmp_d(prime, 2uL) == MP_EQ) return MP_VAL; /* prime must be odd */ if ((res = mp_jacobi(n, prime, &legendre)) != MP_OKAY) return res; if (legendre == -1) return MP_VAL; /* quadratic non-residue mod prime */ if ((res = mp_init_multi(&t1, &C, &Q, &S, &Z, &M, &T, &R, &two, NULL)) != MP_OKAY) { return res; } /* SPECIAL CASE: if prime mod 4 == 3 * compute directly: res = n^(prime+1)/4 mod prime * Handbook of Applied Cryptography algorithm 3.36 */ if ((res = mp_mod_d(prime, 4uL, &i)) != MP_OKAY) goto cleanup; if (i == 3u) { if ((res = mp_add_d(prime, 1uL, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_div_2(&t1, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_div_2(&t1, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_exptmod(n, &t1, prime, ret)) != MP_OKAY) goto cleanup; res = MP_OKAY; goto cleanup; } /* NOW: Tonelli-Shanks algorithm */ /* factor out powers of 2 from prime-1, defining Q and S as: prime-1 = Q*2^S */ if ((res = mp_copy(prime, &Q)) != MP_OKAY) goto cleanup; if ((res = mp_sub_d(&Q, 1uL, &Q)) != MP_OKAY) goto cleanup; /* Q = prime - 1 */ mp_zero(&S); /* S = 0 */ while (mp_iseven(&Q) != MP_NO) { if ((res = mp_div_2(&Q, &Q)) != MP_OKAY) goto cleanup; /* Q = Q / 2 */ if ((res = mp_add_d(&S, 1uL, &S)) != MP_OKAY) goto cleanup; /* S = S + 1 */ } /* find a Z such that the Legendre symbol (Z|prime) == -1 */ if ((res = mp_set_int(&Z, 2uL)) != MP_OKAY) goto cleanup; /* Z = 2 */ while (1) { if ((res = mp_jacobi(&Z, prime, &legendre)) != MP_OKAY) goto cleanup; if (legendre == -1) break; if ((res = mp_add_d(&Z, 1uL, &Z)) != MP_OKAY) goto cleanup; /* Z = Z + 1 */ } if ((res = mp_exptmod(&Z, &Q, prime, &C)) != MP_OKAY) goto cleanup; /* C = Z ^ Q mod prime */ if ((res = mp_add_d(&Q, 1uL, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_div_2(&t1, &t1)) != MP_OKAY) goto cleanup; /* t1 = (Q + 1) / 2 */ if ((res = mp_exptmod(n, &t1, prime, &R)) != MP_OKAY) goto cleanup; /* R = n ^ ((Q + 1) / 2) mod prime */ if ((res = mp_exptmod(n, &Q, prime, &T)) != MP_OKAY) goto cleanup; /* T = n ^ Q mod prime */ if ((res = mp_copy(&S, &M)) != MP_OKAY) goto cleanup; /* M = S */ if ((res = mp_set_int(&two, 2uL)) != MP_OKAY) goto cleanup; res = MP_VAL; while (1) { if ((res = mp_copy(&T, &t1)) != MP_OKAY) goto cleanup; i = 0; while (1) { if (mp_cmp_d(&t1, 1uL) == MP_EQ) break; if ((res = mp_exptmod(&t1, &two, prime, &t1)) != MP_OKAY) goto cleanup; i++; } if (i == 0u) { if ((res = mp_copy(&R, ret)) != MP_OKAY) goto cleanup; res = MP_OKAY; goto cleanup; } if ((res = mp_sub_d(&M, i, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_sub_d(&t1, 1uL, &t1)) != MP_OKAY) goto cleanup; if ((res = mp_exptmod(&two, &t1, prime, &t1)) != MP_OKAY) goto cleanup; /* t1 = 2 ^ (M - i - 1) */ if ((res = mp_exptmod(&C, &t1, prime, &t1)) != MP_OKAY) goto cleanup; /* t1 = C ^ (2 ^ (M - i - 1)) mod prime */ if ((res = mp_sqrmod(&t1, prime, &C)) != MP_OKAY) goto cleanup; /* C = (t1 * t1) mod prime */ if ((res = mp_mulmod(&R, &t1, prime, &R)) != MP_OKAY) goto cleanup; |
︙ | ︙ |
Changes to libtommath/bn_mp_sub_d.c.
︙ | ︙ | |||
63 64 65 66 67 68 69 | } else { /* positive/size */ c->sign = MP_ZPOS; c->used = a->used; /* subtract first digit */ *tmpc = *tmpa++ - b; | | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | } else { /* positive/size */ c->sign = MP_ZPOS; c->used = a->used; /* subtract first digit */ *tmpc = *tmpa++ - b; mu = *tmpc >> ((sizeof(mp_digit) * (size_t)CHAR_BIT) - 1u); *tmpc++ &= MP_MASK; /* handle rest of the digits */ for (ix = 1; ix < a->used; ix++) { *tmpc = *tmpa++ - mu; mu = *tmpc >> ((sizeof(mp_digit) * (size_t)CHAR_BIT) - 1u); *tmpc++ &= MP_MASK; } } /* zero excess digits */ while (ix++ < oldused) { *tmpc++ = 0; |
︙ | ︙ |
Changes to libtommath/bn_mp_to_signed_bin_n.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | /* store in signed [big endian] format */ int mp_to_signed_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) { if (*outlen < (unsigned long)mp_signed_bin_size(a)) { return MP_VAL; } | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /* store in signed [big endian] format */ int mp_to_signed_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) { if (*outlen < (unsigned long)mp_signed_bin_size(a)) { return MP_VAL; } *outlen = (unsigned long)mp_signed_bin_size(a); return mp_to_signed_bin(a, b); } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_to_unsigned_bin.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | if ((res = mp_init_copy(&t, a)) != MP_OKAY) { return res; } x = 0; while (mp_iszero(&t) == MP_NO) { #ifndef MP_8BIT | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | if ((res = mp_init_copy(&t, a)) != MP_OKAY) { return res; } x = 0; while (mp_iszero(&t) == MP_NO) { #ifndef MP_8BIT b[x++] = (unsigned char)(t.dp[0] & 255u); #else b[x++] = (unsigned char)(t.dp[0] | ((t.dp[1] & 1u) << 7)); #endif if ((res = mp_div_2d(&t, 8, &t, NULL)) != MP_OKAY) { mp_clear(&t); return res; } } bn_reverse(b, x); |
︙ | ︙ |
Changes to libtommath/bn_mp_to_unsigned_bin_n.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | /* store in unsigned [big endian] format */ int mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) { if (*outlen < (unsigned long)mp_unsigned_bin_size(a)) { return MP_VAL; } | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /* store in unsigned [big endian] format */ int mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) { if (*outlen < (unsigned long)mp_unsigned_bin_size(a)) { return MP_VAL; } *outlen = (unsigned long)mp_unsigned_bin_size(a); return mp_to_unsigned_bin(a, b); } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_mp_toom_mul.c.
︙ | ︙ | |||
215 216 217 218 219 220 221 | if ((res = mp_mul_2d(&w4, 3, &tmp1)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w3, &tmp1, &w3)) != MP_OKAY) { goto ERR; } /* 3r2 - r1 - r3 */ | | | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | if ((res = mp_mul_2d(&w4, 3, &tmp1)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w3, &tmp1, &w3)) != MP_OKAY) { goto ERR; } /* 3r2 - r1 - r3 */ if ((res = mp_mul_d(&w2, 3uL, &w2)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w2, &w1, &w2)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w2, &w3, &w2)) != MP_OKAY) { goto ERR; |
︙ | ︙ |
Changes to libtommath/bn_mp_toom_sqr.c.
︙ | ︙ | |||
158 159 160 161 162 163 164 | if ((res = mp_mul_2d(&w4, 3, &tmp1)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w3, &tmp1, &w3)) != MP_OKAY) { goto ERR; } /* 3r2 - r1 - r3 */ | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | if ((res = mp_mul_2d(&w4, 3, &tmp1)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w3, &tmp1, &w3)) != MP_OKAY) { goto ERR; } /* 3r2 - r1 - r3 */ if ((res = mp_mul_d(&w2, 3uL, &w2)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w2, &w1, &w2)) != MP_OKAY) { goto ERR; } if ((res = mp_sub(&w2, &w3, &w2)) != MP_OKAY) { goto ERR; |
︙ | ︙ |
Changes to libtommath/bn_mp_unsigned_bin_size.c.
︙ | ︙ | |||
15 16 17 18 19 20 21 | * Tom St Denis, [email protected], http://libtom.org */ /* get the size for an unsigned equivalent */ int mp_unsigned_bin_size(const mp_int *a) { int size = mp_count_bits(a); | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * Tom St Denis, [email protected], http://libtom.org */ /* get the size for an unsigned equivalent */ int mp_unsigned_bin_size(const mp_int *a) { int size = mp_count_bits(a); return (size / 8) + ((((unsigned)size & 7u) != 0u) ? 1 : 0); } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_prime_tab.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ const mp_digit ltm_prime_tab[] = { 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, #ifndef MP_8BIT 0x0083, | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ const mp_digit ltm_prime_tab[] = { 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, #ifndef MP_8BIT 0x0083, |
︙ | ︙ |
Changes to libtommath/bn_s_mp_add.c.
︙ | ︙ | |||
63 64 65 66 67 68 69 | /* zero the carry */ u = 0; for (i = 0; i < min; i++) { /* Compute the sum at one digit, T[i] = A[i] + B[i] + U */ *tmpc = *tmpa++ + *tmpb++ + u; /* U = carry bit of T[i] */ | | | | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /* zero the carry */ u = 0; for (i = 0; i < min; i++) { /* Compute the sum at one digit, T[i] = A[i] + B[i] + U */ *tmpc = *tmpa++ + *tmpb++ + u; /* U = carry bit of T[i] */ u = *tmpc >> (mp_digit)DIGIT_BIT; /* take away carry bit from T[i] */ *tmpc++ &= MP_MASK; } /* now copy higher words if any, that is in A+B * if A or B has more digits add those in */ if (min != max) { for (; i < max; i++) { /* T[i] = X[i] + U */ *tmpc = x->dp[i] + u; /* U = carry bit of T[i] */ u = *tmpc >> (mp_digit)DIGIT_BIT; /* take away carry bit from T[i] */ *tmpc++ &= MP_MASK; } } /* add carry */ |
︙ | ︙ |
Changes to libtommath/bn_s_mp_exptmod.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #ifdef MP_LOW_MEM # define TAB_SIZE 32 #else # define TAB_SIZE 256 #endif int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode) { mp_int M[TAB_SIZE], res, mu; mp_digit buf; int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; | > | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | * additional optimizations in place. * * The library is free for all purposes without any express * guarantee it works. * * Tom St Denis, [email protected], http://libtom.org */ #ifdef MP_LOW_MEM # define TAB_SIZE 32 #else # define TAB_SIZE 256 #endif int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode) { mp_int M[TAB_SIZE], res, mu; mp_digit buf; int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; int (*redux)(mp_int *x, const mp_int *m, const mp_int *mu); /* find window size */ x = mp_count_bits(X); if (x <= 7) { winsize = 2; } else if (x <= 36) { winsize = 3; |
︙ | ︙ | |||
129 130 131 132 133 134 135 | } } /* setup result */ if ((err = mp_init(&res)) != MP_OKAY) { goto LBL_MU; } | | | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | } } /* setup result */ if ((err = mp_init(&res)) != MP_OKAY) { goto LBL_MU; } mp_set(&res, 1uL); /* set initial mode and bit cnt */ mode = 0; bitcnt = 1; buf = 0; digidx = X->used - 1; bitcpy = 0; |
︙ | ︙ |
Changes to libtommath/bn_s_mp_mul_digs.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | mp_int t; int res, pa, pb, ix, iy; mp_digit u; mp_word r; mp_digit tmpx, *tmpt, *tmpy; /* can we use the fast multiplier? */ | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | mp_int t; int res, pa, pb, ix, iy; mp_digit u; mp_word r; mp_digit tmpx, *tmpt, *tmpy; /* can we use the fast multiplier? */ if ((digs < (int)MP_WARRAY) && (MIN(a->used, b->used) < (int)(1u << (((size_t)CHAR_BIT * sizeof(mp_word)) - (2u * (size_t)DIGIT_BIT))))) { return fast_s_mp_mul_digs(a, b, c, digs); } if ((res = mp_init_size(&t, digs)) != MP_OKAY) { return res; } t.used = digs; |
︙ | ︙ | |||
62 63 64 65 66 67 68 | for (iy = 0; iy < pb; iy++) { /* compute the column as a mp_word */ r = (mp_word)*tmpt + ((mp_word)tmpx * (mp_word)*tmpy++) + (mp_word)u; /* the new column is the lower part of the result */ | | | | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | for (iy = 0; iy < pb; iy++) { /* compute the column as a mp_word */ r = (mp_word)*tmpt + ((mp_word)tmpx * (mp_word)*tmpy++) + (mp_word)u; /* the new column is the lower part of the result */ *tmpt++ = (mp_digit)(r & (mp_word)MP_MASK); /* get the carry word from the result */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); } /* set carry if it is placed below digs */ if ((ix + iy) < digs) { *tmpt = u; } } |
︙ | ︙ |
Changes to libtommath/bn_s_mp_mul_high_digs.c.
︙ | ︙ | |||
24 25 26 27 28 29 30 | int res, pa, pb, ix, iy; mp_digit u; mp_word r; mp_digit tmpx, *tmpt, *tmpy; /* can we use the fast multiplier? */ #ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | int res, pa, pb, ix, iy; mp_digit u; mp_word r; mp_digit tmpx, *tmpt, *tmpy; /* can we use the fast multiplier? */ #ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C if (((a->used + b->used + 1) < (int)MP_WARRAY) && (MIN(a->used, b->used) < (int)(1u << (((size_t)CHAR_BIT * sizeof(mp_word)) - (2u * (size_t)DIGIT_BIT))))) { return fast_s_mp_mul_high_digs(a, b, c, digs); } #endif if ((res = mp_init_size(&t, a->used + b->used + 1)) != MP_OKAY) { return res; } |
︙ | ︙ | |||
57 58 59 60 61 62 63 | for (iy = digs - ix; iy < pb; iy++) { /* calculate the double precision result */ r = (mp_word)*tmpt + ((mp_word)tmpx * (mp_word)*tmpy++) + (mp_word)u; /* get the lower part */ | | | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | for (iy = digs - ix; iy < pb; iy++) { /* calculate the double precision result */ r = (mp_word)*tmpt + ((mp_word)tmpx * (mp_word)*tmpy++) + (mp_word)u; /* get the lower part */ *tmpt++ = (mp_digit)(r & (mp_word)MP_MASK); /* carry the carry */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); } *tmpt = u; } mp_clamp(&t); mp_exch(&t, c); mp_clear(&t); return MP_OKAY; } #endif /* ref: $Format:%D$ */ /* git commit: $Format:%H$ */ /* commit time: $Format:%ai$ */ |
Changes to libtommath/bn_s_mp_sqr.c.
︙ | ︙ | |||
34 35 36 37 38 39 40 | for (ix = 0; ix < pa; ix++) { /* first calculate the digit at 2*ix */ /* calculate double precision result */ r = (mp_word)t.dp[2*ix] + ((mp_word)a->dp[ix] * (mp_word)a->dp[ix]); /* store lower part in result */ | | | | | | | | | | | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | for (ix = 0; ix < pa; ix++) { /* first calculate the digit at 2*ix */ /* calculate double precision result */ r = (mp_word)t.dp[2*ix] + ((mp_word)a->dp[ix] * (mp_word)a->dp[ix]); /* store lower part in result */ t.dp[ix+ix] = (mp_digit)(r & (mp_word)MP_MASK); /* get the carry */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); /* left hand side of A[ix] * A[iy] */ tmpx = a->dp[ix]; /* alias for where to store the results */ tmpt = t.dp + ((2 * ix) + 1); for (iy = ix + 1; iy < pa; iy++) { /* first calculate the product */ r = (mp_word)tmpx * (mp_word)a->dp[iy]; /* now calculate the double precision result, note we use * addition instead of *2 since it's easier to optimize */ r = (mp_word)*tmpt + r + r + (mp_word)u; /* store lower part */ *tmpt++ = (mp_digit)(r & (mp_word)MP_MASK); /* get carry */ u = (mp_digit)(r >> (mp_word)DIGIT_BIT); } /* propagate upwards */ while (u != 0uL) { r = (mp_word)*tmpt + (mp_word)u; *tmpt++ = (mp_digit)(r & (mp_word)MP_MASK); u = (mp_digit)(r >> (mp_word)DIGIT_BIT); } } mp_clamp(&t); mp_exch(&t, b); mp_clear(&t); return MP_OKAY; |
︙ | ︙ |
Changes to libtommath/bn_s_mp_sub.c.
︙ | ︙ | |||
49 50 51 52 53 54 55 | *tmpc = (*tmpa++ - *tmpb++) - u; /* U = carry bit of T[i] * Note this saves performing an AND operation since * if a carry does occur it will propagate all the way to the * MSB. As a result a single shift is enough to get the carry */ | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | *tmpc = (*tmpa++ - *tmpb++) - u; /* U = carry bit of T[i] * Note this saves performing an AND operation since * if a carry does occur it will propagate all the way to the * MSB. As a result a single shift is enough to get the carry */ u = *tmpc >> (((size_t)CHAR_BIT * sizeof(mp_digit)) - 1u); /* Clear carry from T[i] */ *tmpc++ &= MP_MASK; } /* now copy higher words if any, e.g. if A has more digits than B */ for (; i < max; i++) { /* T[i] = A[i] - U */ *tmpc = *tmpa++ - u; /* U = carry bit of T[i] */ u = *tmpc >> (((size_t)CHAR_BIT * sizeof(mp_digit)) - 1u); /* Clear carry from T[i] */ *tmpc++ &= MP_MASK; } /* clear digits above used (since we may not have grown result above) */ for (i = c->used; i < olduse; i++) { |
︙ | ︙ |
Changes to libtommath/makefile.
︙ | ︙ | |||
98 99 100 101 102 103 104 | test_standalone: $(LIBNAME) demo/demo.o $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test .PHONY: mtest mtest: cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LFLAGS) -o mtest | < < < < | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | test_standalone: $(LIBNAME) demo/demo.o $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test .PHONY: mtest mtest: cd mtest ; $(CC) $(CFLAGS) -O0 mtest.c $(LFLAGS) -o mtest timing: $(LIBNAME) $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) $(LFLAGS) -o ltmtest # You have to create a file .coveralls.yml with the content "repo_token: <the token>" # in the base folder to be able to submit to coveralls coveralls: lcov coveralls-lcov |
︙ | ︙ | |||
144 145 146 147 148 149 150 | gpg -b -a ltm-$(VERSION).zip new_file: bash updatemakes.sh perl dep.pl perlcritic: | | | | 140 141 142 143 144 145 146 147 148 149 150 | gpg -b -a ltm-$(VERSION).zip new_file: bash updatemakes.sh perl dep.pl perlcritic: perlcritic *.pl doc/*.pl astyle: astyle --options=astylerc $(OBJECTS:.o=.c) tommath*.h demo/*.c etc/*.c mtest/mtest.c |
Changes to libtommath/makefile_include.mk.
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | endif endif # COMPILE_SIZE endif # COMPILE_DEBUG ifneq ($(findstring clang,$(CC)),) CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header endif ifeq ($(PLATFORM), Darwin) CFLAGS += -Wno-nullability-completeness endif # adjust coverage set ifneq ($(filter $(shell arch), i386 i686 x86_64 amd64 ia64),) | > > > | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | endif endif # COMPILE_SIZE endif # COMPILE_DEBUG ifneq ($(findstring clang,$(CC)),) CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header endif ifneq ($(findstring mingw,$(CC)),) CFLAGS += -Wno-shadow endif ifeq ($(PLATFORM), Darwin) CFLAGS += -Wno-nullability-completeness endif # adjust coverage set ifneq ($(filter $(shell arch), i386 i686 x86_64 amd64 ia64),) |
︙ | ︙ |
Changes to libtommath/tommath.h.
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #include <limits.h> #include <tommath_class.h> #ifdef __cplusplus extern "C" { #endif /* detect 64-bit mode if possible */ #if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || \ defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \ defined(__s390x__) || defined(__arch64__) || defined(__aarch64__) || \ defined(__sparcv9) || defined(__sparc_v9__) || defined(__sparc64__) || \ defined(__ia64) || defined(__ia64__) || defined(__itanium__) || defined(_M_IA64) || \ | > > > > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #include <limits.h> #include <tommath_class.h> #ifdef __cplusplus extern "C" { #endif /* MS Visual C++ doesn't have a 128bit type for words, so fall back to 32bit MPI's (where words are 64bit) */ #if defined(_MSC_VER) || defined(__LLP64__) # define MP_32BIT #endif /* detect 64-bit mode if possible */ #if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || \ defined(__powerpc64__) || defined(__ppc64__) || defined(__PPC64__) || \ defined(__s390x__) || defined(__arch64__) || defined(__aarch64__) || \ defined(__sparcv9) || defined(__sparc_v9__) || defined(__sparc64__) || \ defined(__ia64) || defined(__ia64__) || defined(__itanium__) || defined(_M_IA64) || \ |
︙ | ︙ | |||
61 62 63 64 65 66 67 | # define MP_SIZEOF_MP_DIGIT 2 # ifdef DIGIT_BIT # error You must not define DIGIT_BIT when using MP_16BIT # endif #elif defined(MP_64BIT) /* for GCC only on supported platforms */ typedef uint64_t mp_digit; | | < < | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | # define MP_SIZEOF_MP_DIGIT 2 # ifdef DIGIT_BIT # error You must not define DIGIT_BIT when using MP_16BIT # endif #elif defined(MP_64BIT) /* for GCC only on supported platforms */ typedef uint64_t mp_digit; # if defined(__GNUC__) typedef unsigned long mp_word __attribute__((mode(TI))); # else /* it seems you have a problem * but we assume you can somewhere define your own uint128_t */ typedef uint128_t mp_word; # endif |
︙ | ︙ | |||
100 101 102 103 104 105 106 | #else typedef mp_digit mp_min_u32; #endif /* use arc4random on platforms that support it */ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) # define MP_GEN_RANDOM() arc4random() | | | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | #else typedef mp_digit mp_min_u32; #endif /* use arc4random on platforms that support it */ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) # define MP_GEN_RANDOM() arc4random() # define MP_GEN_RANDOM_MAX 0xffffffffu #endif /* use rand() as fall-back if there's no better rand function */ #ifndef MP_GEN_RANDOM # define MP_GEN_RANDOM() rand() # define MP_GEN_RANDOM_MAX RAND_MAX #endif |
︙ | ︙ | |||
155 156 157 158 159 160 161 | # define MP_PREC 32 /* default digits of precision */ # else # define MP_PREC 8 /* default digits of precision */ # endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ | | | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | # define MP_PREC 32 /* default digits of precision */ # else # define MP_PREC 8 /* default digits of precision */ # endif #endif /* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ #define MP_WARRAY (1u << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) + 1)) /* the infamous mp_int structure */ typedef struct { int used, alloc, sign; mp_digit *dp; } mp_int; |
︙ | ︙ | |||
390 391 392 393 394 395 396 | int mp_n_root(const mp_int *a, mp_digit b, mp_int *c); int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast); /* special sqrt algo */ int mp_sqrt(const mp_int *arg, mp_int *ret); /* special sqrt (mod prime) */ | | | | | | | | | | | | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 | int mp_n_root(const mp_int *a, mp_digit b, mp_int *c); int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast); /* special sqrt algo */ int mp_sqrt(const mp_int *arg, mp_int *ret); /* special sqrt (mod prime) */ int mp_sqrtmod_prime(const mp_int *n, const mp_int *prime, mp_int *ret); /* is number a square? */ int mp_is_square(const mp_int *arg, int *ret); /* computes the jacobi c = (a | n) (or Legendre if b is prime) */ int mp_jacobi(const mp_int *a, const mp_int *n, int *c); /* used to setup the Barrett reduction for a given modulus b */ int mp_reduce_setup(mp_int *a, const mp_int *b); /* Barrett Reduction, computes a (mod b) with a precomputed value c * * Assumes that 0 < x <= m*m, note if 0 > x > -(m*m) then you can merely * compute the reduction as -1 * mp_reduce(mp_abs(x)) [pseudo code]. */ int mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu); /* setups the montgomery reduction */ int mp_montgomery_setup(const mp_int *n, mp_digit *rho); /* computes a = B**n mod b without division or multiplication useful for * normalizing numbers in a Montgomery system. */ int mp_montgomery_calc_normalization(mp_int *a, const mp_int *b); /* computes x/R == x (mod N) via Montgomery Reduction */ int mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho); /* returns 1 if a is a valid DR modulus */ int mp_dr_is_modulus(const mp_int *a); /* sets the value of "d" required for mp_dr_reduce */ void mp_dr_setup(const mp_int *a, mp_digit *d); /* reduces a modulo n using the Diminished Radix method */ int mp_dr_reduce(mp_int *x, const mp_int *n, mp_digit k); /* returns true if a can be reduced with mp_reduce_2k */ int mp_reduce_is_2k(const mp_int *a); /* determines k value for 2k reduction */ int mp_reduce_2k_setup(const mp_int *a, mp_digit *d); /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ int mp_reduce_2k(mp_int *a, const mp_int *n, mp_digit d); /* returns true if a can be reduced with mp_reduce_2k_l */ int mp_reduce_is_2k_l(const mp_int *a); /* determines k value for 2k reduction */ int mp_reduce_2k_setup_l(const mp_int *a, mp_int *d); /* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ int mp_reduce_2k_l(mp_int *a, const mp_int *n, const mp_int *d); /* Y = G**X (mod P) */ int mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y); /* ---> Primes <--- */ /* number of primes */ #ifdef MP_8BIT # define PRIME_SIZE 31 #else |
︙ | ︙ |
Changes to libtommath/tommath_private.h.
︙ | ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 | int mp_invmod_slow(const mp_int *a, const mp_int *b, mp_int *c); int fast_mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho); int mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode); int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode); void bn_reverse(unsigned char *s, int len); extern const char *mp_s_rmap; /* Fancy macro to set an MPI from another type. * There are several things assumed: * x is the counter and unsigned * a is the pointer to the MPI * b is the original value that should be set in the MPI. */ | > > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | int mp_invmod_slow(const mp_int *a, const mp_int *b, mp_int *c); int fast_mp_montgomery_reduce(mp_int *x, const mp_int *n, mp_digit rho); int mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode); int s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y, int redmode); void bn_reverse(unsigned char *s, int len); extern const char *mp_s_rmap; extern const unsigned char mp_s_rmap_reverse[]; extern const size_t mp_s_rmap_reverse_sz; /* Fancy macro to set an MPI from another type. * There are several things assumed: * x is the counter and unsigned * a is the pointer to the MPI * b is the original value that should be set in the MPI. */ |
︙ | ︙ | |||
95 96 97 98 99 100 101 | for (x = 0; x < (sizeof(type) * 2u); x++) { \ /* shift the number up four bits */ \ if ((res = mp_mul_2d (a, 4, a)) != MP_OKAY) { \ return res; \ } \ \ /* OR in the top four bits of the source */ \ | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | for (x = 0; x < (sizeof(type) * 2u); x++) { \ /* shift the number up four bits */ \ if ((res = mp_mul_2d (a, 4, a)) != MP_OKAY) { \ return res; \ } \ \ /* OR in the top four bits of the source */ \ a->dp[0] |= (mp_digit)(b >> ((sizeof(type) * 8u) - 4u)) & 15uL;\ \ /* shift the source up to the next four bits */ \ b <<= 4; \ \ /* ensure that digits are not clamped off */ \ a->used += 1; \ } \ |
︙ | ︙ |
Changes to tests/assemble.test.
︙ | ︙ | |||
528 529 530 531 532 533 534 | } } x } -result 12 -cleanup {rename x {}} } | < < < < < < < < < < < < | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | } } x } -result 12 -cleanup {rename x {}} } test assemble-7.18 {lappendArrayStk} { -body { proc x {} { set able(baker) charlie assemble { push able push baker |
︙ | ︙ | |||
1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 | } test assemble-15.7 {listIndexImm} { -body { assemble {push {a b c}; listIndexImm end} } -result c } # assemble-16 - invokeStk test assemble-16.1 {invokeStk - wrong # args} { -body { assemble {invokeStk} } | > > > > > > | 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | } test assemble-15.7 {listIndexImm} { -body { assemble {push {a b c}; listIndexImm end} } -result c } test assemble-15.8 {listIndexImm} { assemble {push {a b c}; listIndexImm end+2} } {} test assemble-15.9 {listIndexImm} { assemble {push {a b c}; listIndexImm -1-1} } {} # assemble-16 - invokeStk test assemble-16.1 {invokeStk - wrong # args} { -body { assemble {invokeStk} } |
︙ | ︙ |
Changes to tests/basic.test.
︙ | ︙ | |||
666 667 668 669 670 671 672 | set l1 [list a {b b} c d] set l2 [list e f {g g} h] proc l3 {} { list i j k {l l} } # Do all tests once byte compiled and once with direct string evaluation | | | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | set l1 [list a {b b} c d] set l2 [list e f {g g} h] proc l3 {} { list i j k {l l} } # Do all tests once byte compiled and once with direct string evaluation foreach noComp {0 1} { if $noComp { interp alias {} run {} testevalex set constraints testevalex } else { interp alias {} run {} if 1 set constraints {} |
︙ | ︙ |
Changes to tests/cmdIL.test.
︙ | ︙ | |||
156 157 158 159 160 161 162 163 164 165 166 167 168 169 | } [list \0 \x7f \x80 \uffff] test cmdIL-1.39 {Tcl_LsortObjCmd procedure, Bug 8e1e31eac0fd6b6c} fullutf { lsort -ascii [list \0 \x7f \x80 \U01ffff \uffff] } [list \0 \x7f \x80 \uffff \U01ffff] test cmdIL-1.40 {Tcl_LsortObjCmd procedure, Bug 8e1e31eac0fd6b6c} fullutf { lsort -ascii -nocase [list \0 \x7f \x80 \U01ffff \uffff] } [list \0 \x7f \x80 \uffff \U01ffff] # Can't think of any good tests for the MergeSort and MergeLists procedures, # except a bunch of random lists to sort. test cmdIL-2.1 {MergeSort and MergeLists procedures} -setup { set result {} set r 1435753299 | > > > > > > | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | } [list \0 \x7f \x80 \uffff] test cmdIL-1.39 {Tcl_LsortObjCmd procedure, Bug 8e1e31eac0fd6b6c} fullutf { lsort -ascii [list \0 \x7f \x80 \U01ffff \uffff] } [list \0 \x7f \x80 \uffff \U01ffff] test cmdIL-1.40 {Tcl_LsortObjCmd procedure, Bug 8e1e31eac0fd6b6c} fullutf { lsort -ascii -nocase [list \0 \x7f \x80 \U01ffff \uffff] } [list \0 \x7f \x80 \uffff \U01ffff] test cmdIL-1.41 {lsort -stride and -index} -body { lsort -stride 2 -index -2 {a 2 b 1} } -returnCodes error -result {index "-2" cannot select an element from any list} test cmdIL-1.42 {lsort -stride and-index} -body { lsort -stride 2 -index -1-1 {a 2 b 1} } -returnCodes error -result {index "-1-1" cannot select an element from any list} # Can't think of any good tests for the MergeSort and MergeLists procedures, # except a bunch of random lists to sort. test cmdIL-2.1 {MergeSort and MergeLists procedures} -setup { set result {} set r 1435753299 |
︙ | ︙ | |||
212 213 214 215 216 217 218 219 220 221 222 223 224 225 | } -returnCodes error -result {expected integer but got "c"} test cmdIL-3.4.1 {SortCompare procedure, -index option} -body { lsort -integer -index 2 "{1 2 3} \\\{" } -returnCodes error -result {unmatched open brace in list} test cmdIL-3.5 {SortCompare procedure, -index option} -body { lsort -integer -index 2 {{20 10 13} {15}} } -returnCodes error -result {element 2 missing from sublist "15"} test cmdIL-3.6 {SortCompare procedure, -index option} { lsort -integer -index 2 {{1 15 30} {2 5 25} {3 25 20}} } {{3 25 20} {2 5 25} {1 15 30}} test cmdIL-3.7 {SortCompare procedure, -ascii option} { lsort -ascii {d e c b a d35 d300 100 20} } {100 20 a b c d d300 d35 e} test cmdIL-3.8 {SortCompare procedure, -dictionary option} { | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | } -returnCodes error -result {expected integer but got "c"} test cmdIL-3.4.1 {SortCompare procedure, -index option} -body { lsort -integer -index 2 "{1 2 3} \\\{" } -returnCodes error -result {unmatched open brace in list} test cmdIL-3.5 {SortCompare procedure, -index option} -body { lsort -integer -index 2 {{20 10 13} {15}} } -returnCodes error -result {element 2 missing from sublist "15"} test cmdIL-3.5.1 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index 1+3 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {element 4 missing from sublist "1 . c"} test cmdIL-3.5.2 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index -1-1 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {index "-1-1" cannot select an element from any list} test cmdIL-3.5.3 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index -2 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {index "-2" cannot select an element from any list} test cmdIL-3.5.4 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index end-4 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {element -2 missing from sublist "1 . c"} test cmdIL-3.5.5 {SortCompare procedure, -index option} { lsort -index {} {a b} } {a b} test cmdIL-3.5.6 {SortCompare procedure, -index option} { lsort -index {} [list a \{] } {a \{} test cmdIL-3.5.7 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index end--1 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {index "end--1" cannot select an element from any list} test cmdIL-3.5.8 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index end+1 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {index "end+1" cannot select an element from any list} test cmdIL-3.5.9 {SortCompare procedure, -index option (out of range, calculated index)} -body { lsort -index end+2 {{1 . c} {2 . b} {3 . a}} } -returnCodes error -result {index "end+2" cannot select an element from any list} test cmdIL-3.6 {SortCompare procedure, -index option} { lsort -integer -index 2 {{1 15 30} {2 5 25} {3 25 20}} } {{3 25 20} {2 5 25} {1 15 30}} test cmdIL-3.7 {SortCompare procedure, -ascii option} { lsort -ascii {d e c b a d35 d300 100 20} } {100 20 a b c d d300 d35 e} test cmdIL-3.8 {SortCompare procedure, -dictionary option} { |
︙ | ︙ |
Changes to tests/compile.test.
︙ | ︙ | |||
495 496 497 498 499 500 501 | test compile-15.4 {proper TCL_RETURN code from [return]} { apply {{} {catch {return [info library]}}} } 2 test compile-15.5 {proper TCL_RETURN code from [return]} { apply {{} {catch {set a 1}; return}} } "" | > | | 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | test compile-15.4 {proper TCL_RETURN code from [return]} { apply {{} {catch {return [info library]}}} } 2 test compile-15.5 {proper TCL_RETURN code from [return]} { apply {{} {catch {set a 1}; return}} } "" # Do all tests once byte compiled and once with direct string evaluation foreach noComp {0 1} { if $noComp { interp alias {} run {} testevalex set constraints testevalex } else { interp alias {} run {} if 1 set constraints {} |
︙ | ︙ |
Changes to tests/coroutine.test.
︙ | ︙ | |||
735 736 737 738 739 740 741 742 743 744 745 746 747 748 | } proc boom {} { cc ; # coro created at level 2 C ; # and called at level 1 } boom ; # does not crash: the coro floor is a good insulator list } -result {} test coroutine-8.0.0 {coro inject executed} -body { coroutine demo apply {{} { foreach i {1 2} yield }} demo set ::result none tcl::unsupported::inject demo set ::result inject-executed | > > | 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | } proc boom {} { cc ; # coro created at level 2 C ; # and called at level 1 } boom ; # does not crash: the coro floor is a good insulator list } -cleanup { rename boom {}; rename cc {}; rename c {} } -result {} test coroutine-8.0.0 {coro inject executed} -body { coroutine demo apply {{} { foreach i {1 2} yield }} demo set ::result none tcl::unsupported::inject demo set ::result inject-executed |
︙ | ︙ |
Changes to tests/foreach.test.
︙ | ︙ | |||
208 209 210 211 212 213 214 | } {a b} test foreach-6.3 {break tests} {catch {break foo} msg} 1 test foreach-6.4 {break tests} { catch {break foo} msg set msg } {wrong # args: should be "break"} # Check for bug #406709 | | | > > | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | } {a b} test foreach-6.3 {break tests} {catch {break foo} msg} 1 test foreach-6.4 {break tests} { catch {break foo} msg set msg } {wrong # args: should be "break"} # Check for bug #406709 test foreach-6.5 {break tests} -body { proc a {} { set a 1 foreach b b {list [concat a; break]; incr a} incr a } a } -cleanup { rename a {} } -result {2} # Test for incorrect "double evaluation" semantics test foreach-7.1 {delayed substitution of body} { proc foo {} { set a 0 foreach a [list 1 2 3] " set x $a |
︙ | ︙ |
Changes to tests/ioCmd.test.
︙ | ︙ | |||
2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 | lappend res [catch {interp eval $idb [list puts $chan shoo]} msg] $msg lappend res [catch {interp eval $idb [list tell $chan]} msg] $msg lappend res [catch {interp eval $idb [list seek $chan 1]} msg] $msg lappend res [catch {interp eval $idb [list gets $chan]} msg] $msg lappend res [catch {interp eval $idb [list close $chan]} msg] $msg set res } -constraints {testchannel} \ -result {1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} test iocmd-32.1 {origin interpreter of moved channel destroyed during access} -match glob -body { set ida [interp create];#puts <<$ida>> set idb [interp create];#puts <<$idb>> | > > | 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | lappend res [catch {interp eval $idb [list puts $chan shoo]} msg] $msg lappend res [catch {interp eval $idb [list tell $chan]} msg] $msg lappend res [catch {interp eval $idb [list seek $chan 1]} msg] $msg lappend res [catch {interp eval $idb [list gets $chan]} msg] $msg lappend res [catch {interp eval $idb [list close $chan]} msg] $msg set res } -cleanup { interp delete $idb } -constraints {testchannel} \ -result {1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} test iocmd-32.1 {origin interpreter of moved channel destroyed during access} -match glob -body { set ida [interp create];#puts <<$ida>> set idb [interp create];#puts <<$idb>> |
︙ | ︙ | |||
2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 | # wait a bit, give the main thread the time to start its event # loop to wait for the response from B after 2000 catch { puts $chan shoo } res set res }] set res } -constraints {testchannel} -result {Owner lost} test iocmd-32.2 {delete interp of reflected chan} { # Bug 3034840 # Run this test in an interp with memory debugging to panic # on the double free interp create slave | > > | 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 | # wait a bit, give the main thread the time to start its event # loop to wait for the response from B after 2000 catch { puts $chan shoo } res set res }] set res } -cleanup { interp delete $idb } -constraints {testchannel} -result {Owner lost} test iocmd-32.2 {delete interp of reflected chan} { # Bug 3034840 # Run this test in an interp with memory debugging to panic # on the double free interp create slave |
︙ | ︙ |
Changes to tests/ioTrans.test.
︙ | ︙ | |||
1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 | [catch {interp eval $idb [list close $chan]} msg] $msg #lappend res [interp eval $ida {set res}] # actions: clear|write|clear|write|clear|flush|limit?|drain|flush # The 'tell' is ok, as it passed through the transform to the base channel # without invoking the transform handler. } -cleanup { tempdone } -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} test iortrans-11.1 {origin interpreter of moved transform destroyed during access} -setup { set ida [interp create]; #puts <<$ida>> set idb [interp create]; #puts <<$idb>> # Magic to get the test* commands in the slaves load {} Tcltest $ida load {} Tcltest $idb | > | 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 | [catch {interp eval $idb [list close $chan]} msg] $msg #lappend res [interp eval $ida {set res}] # actions: clear|write|clear|write|clear|flush|limit?|drain|flush # The 'tell' is ok, as it passed through the transform to the base channel # without invoking the transform handler. } -cleanup { tempdone interp delete $idb } -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} test iortrans-11.1 {origin interpreter of moved transform destroyed during access} -setup { set ida [interp create]; #puts <<$ida>> set idb [interp create]; #puts <<$idb>> # Magic to get the test* commands in the slaves load {} Tcltest $ida load {} Tcltest $idb |
︙ | ︙ | |||
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 | # wait for the response from B after 50 catch { puts $chan shoo } res set res }] } -cleanup { tempdone } -result {Owner lost} test iortrans-11.2 {delete interp of reflected transform} -setup { interp create slave # Magic to get the test* commands into the slave load {} Tcltest slave } -constraints {testchannel} -body { # Get base channel into the slave | > | 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 | # wait for the response from B after 50 catch { puts $chan shoo } res set res }] } -cleanup { tempdone interp delete $idb } -result {Owner lost} test iortrans-11.2 {delete interp of reflected transform} -setup { interp create slave # Magic to get the test* commands into the slave load {} Tcltest slave } -constraints {testchannel} -body { # Get base channel into the slave |
︙ | ︙ |
Changes to tests/lindex.test.
︙ | ︙ | |||
75 76 77 78 79 80 81 82 83 84 85 86 87 88 | set x -0o9 list [catch { testevalex {lindex {a b c} $x} } result] $result } -match glob -result {1 {*}} test lindex-3.7 {indexes don't shimmer wide ints} { set x [expr {(wide(1)<<31) - 2}] list $x [lindex {1 2 3} $x] [incr x] [incr x] } {2147483646 {} 2147483647 2147483648} # Indices relative to end test lindex-4.1 {index = end} testevalex { set x end list [testevalex {lindex {a b c} $x}] [testevalex {lindex {a b c} $x}] } {c c} | > > > > > > > > > | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | set x -0o9 list [catch { testevalex {lindex {a b c} $x} } result] $result } -match glob -result {1 {*}} test lindex-3.7 {indexes don't shimmer wide ints} { set x [expr {(wide(1)<<31) - 2}] list $x [lindex {1 2 3} $x] [incr x] [incr x] } {2147483646 {} 2147483647 2147483648} test lindex-3.8 {compiled with static indices out of range, negative} { list [lindex {a b c} -1] [lindex {a b c} -2] [lindex {a b c} -3] } [lrepeat 3 {}] test lindex-3.9 {compiled with calculated indices out of range, negative constant} { list [lindex {a b c} -1-1] [lindex {a b c} -2+0] [lindex {a b c} -2+1] } [lrepeat 3 {}] test lindex-3.10 {compiled with calculated indices out of range, after end} { list [lindex {a b c} end+1] [lindex {a b c} end+2] [lindex {a b c} end+3] } [lrepeat 3 {}] # Indices relative to end test lindex-4.1 {index = end} testevalex { set x end list [testevalex {lindex {a b c} $x}] [testevalex {lindex {a b c} $x}] } {c c} |
︙ | ︙ |
Changes to tests/lrange.test.
︙ | ︙ | |||
86 87 88 89 90 91 92 93 94 95 96 97 98 99 | } {1 {unmatched open brace in list}} test lrange-3.1 {Bug 3588366: end-offsets before start} { apply {l { lrange $l 0 end-5 }} {1 2 3 4 5} } {} # cleanup ::tcltest::cleanupTests return # Local Variables: # mode: tcl | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | } {1 {unmatched open brace in list}} test lrange-3.1 {Bug 3588366: end-offsets before start} { apply {l { lrange $l 0 end-5 }} {1 2 3 4 5} } {} test lrange-3.2 {compiled with static indices out of range, negative} { list [lrange {a b c} -1 -2] [lrange {a b c} -2 -1] [lrange {a b c} -3 -2] [lrange {a b c} -2 -3] } [lrepeat 4 {}] test lrange-3.3 {compiled with calculated indices out of range, negative constant} { list [lrange {a b c} 0-1 -1-1] [lrange {a b c} -2+0 0-1] [lrange {a b c} -2-1 -2+1] [lrange {a b c} -2+1 -2-1] } [lrepeat 4 {}] test lrange-3.4 {compiled with calculated indices out of range, after end} { list [lrange {a b c} end+1 end+2] [lrange {a b c} end+2 end+1] [lrange {a b c} end+2 end+3] [lrange {a b c} end+3 end+2] } [lrepeat 4 {}] test lrange-3.5 {compiled with calculated indices, start out of range (negative)} { list [lrange {a b c} -1 1] [lrange {a b c} -1+0 end-1] [lrange {a b c} -2 1] [lrange {a b c} -2+0 0+1] } [lrepeat 4 {a b}] test lrange-3.6 {compiled with calculated indices, end out of range (after end)} { list [lrange {a b c} 1 end+1] [lrange {a b c} 1+0 2+1] [lrange {a b c} 1 end+1] [lrange {a b c} end-1 3+1] } [lrepeat 4 {b c}] test lrange-4.1 {lrange pure promise} -body { set ll1 [list $tcl_version 2 3 4] # Shared set ll2 $ll1 # With string rep string length $ll1 set rep1 [tcl::unsupported::representation $ll1] # Get new pure object set x [lrange $ll1 0 end] set rep2 [tcl::unsupported::representation $x] regexp {object pointer at (\S+)} $rep1 -> obj1 regexp {object pointer at (\S+)} $rep2 -> obj2 list $rep1 $rep2 [string equal $obj1 $obj2] # Check for a new clean object } -match glob -result {*value is *refcount of 3,*, string rep*value is*refcount of 2,* no string rep* 0} test lrange-4.2 {lrange pure promise} -body { set ll1 [list $tcl_version 2 3 4] # Shared set ll2 $ll1 # With string rep string length $ll1 set rep1 [tcl::unsupported::representation $ll1] # Get new pure object, not compiled set x [[string cat l range] $ll1 0 end] set rep2 [tcl::unsupported::representation $x] regexp {object pointer at (\S+)} $rep1 -> obj1 regexp {object pointer at (\S+)} $rep2 -> obj2 list $rep1 $rep2 [string equal $obj1 $obj2] # Check for a new clean object } -match glob -result {*value is *refcount of 3,*, string rep*value is*refcount of 2,* no string rep* 0} test lrange-4.3 {lrange pure promise} -body { set ll1 [list $tcl_version 2 3 4] # With string rep string length $ll1 set rep1 [tcl::unsupported::representation $ll1] # Get pure object, unshared set ll2 [lrange $ll1[set ll1 {}] 0 end] set rep2 [tcl::unsupported::representation $ll2] regexp {object pointer at (\S+)} $rep1 -> obj1 regexp {object pointer at (\S+)} $rep2 -> obj2 list $rep1 $rep2 [string equal $obj1 $obj2] # Internal optimisations should keep the same object } -match glob -result {*value is *refcount of 2,*, string rep*value is*refcount of 2,* no string rep* 1} test lrange-4.4 {lrange pure promise} -body { set ll1 [list $tcl_version 2 3 4] # With string rep string length $ll1 set rep1 [tcl::unsupported::representation $ll1] # Get pure object, unshared, not compiled set ll2 [[string cat l range] $ll1[set ll1 {}] 0 end] set rep2 [tcl::unsupported::representation $ll2] regexp {object pointer at (\S+)} $rep1 -> obj1 regexp {object pointer at (\S+)} $rep2 -> obj2 list $rep1 $rep2 [string equal $obj1 $obj2] # Internal optimisations should keep the same object } -match glob -result {*value is *refcount of 2,*, string rep*value is*refcount of 2,* no string rep* 1} # Testing for compiled vs non-compiled behaviour, and shared vs non-shared. # Far too many variations to check with spelt-out tests. # Note that this *just* checks whether the different versions are the same # not whether any of them is correct. apply {{} { set lss {{} {a} {a b c} {a b c d}} set idxs {-2 -1 0 1 2 3 end-3 end-2 end-1 end end+1 end+2} set lrange lrange foreach ls $lss { foreach a $idxs { foreach b $idxs { # Shared, uncompiled set ls2 $ls set expected [list [catch {$lrange $ls $a $b} m] $m] # Shared, compiled set tester [list lrange $ls $a $b] set script [list catch $tester m] set script "list \[$script\] \$m" test lrange-5.[incr n].1 {lrange shared compiled} \ [list apply [list {} $script]] $expected # Unshared, uncompiled set tester [string map [list %l [list $ls] %a $a %b $b] { [string cat l range] [lrange %l 0 end] %a %b }] set script [list catch $tester m] set script "list \[$script\] \$m" test lrange-5.$n.2 {lrange unshared uncompiled} \ [list apply [list {} $script]] $expected # Unshared, compiled set tester [string map [list %l [list $ls] %a $a %b $b] { lrange [lrange %l 0 end] %a %b }] set script [list catch $tester m] set script "list \[$script\] \$m" test lrange-5.$n.3 {lrange unshared compiled} \ [list apply [list {} $script]] $expected } } } }} # cleanup ::tcltest::cleanupTests return # Local Variables: # mode: tcl |
︙ | ︙ |
Changes to tests/lreplace.test.
︙ | ︙ | |||
94 95 96 97 98 99 100 | test lreplace-1.26 {lreplace command} { catch {unset foo} set foo {a b} list [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] } {a {} {}} | | | | > > | > > > > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | test lreplace-1.26 {lreplace command} { catch {unset foo} set foo {a b} list [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] \ [set foo [lreplace $foo end end]] } {a {} {}} test lreplace-1.27 {lreplace command} -body { lreplace x 1 1 } -returnCodes 1 -result {list doesn't contain element 1} test lreplace-1.28 {lreplace command} -body { lreplace x 1 1 y } -returnCodes 1 -result {list doesn't contain element 1} test lreplace-1.29 {lreplace command} -body { lreplace x 1 1 [error foo] } -returnCodes 1 -result {foo} test lreplace-1.30 {lreplace command} -body { lreplace {not {}alist} 0 0 [error foo] } -returnCodes 1 -result {foo} test lreplace-2.1 {lreplace errors} { list [catch lreplace msg] $msg } {1 {wrong # args: should be "lreplace list first last ?element ...?"}} test lreplace-2.2 {lreplace errors} { list [catch {lreplace a b} msg] $msg } {1 {wrong # args: should be "lreplace list first last ?element ...?"}} |
︙ | ︙ |
Changes to tests/lsearch.test.
︙ | ︙ | |||
55 56 57 58 59 60 61 | lsearch -glob {xyz bbcc *bc*} *bc* } 1 test lsearch-2.9 {search modes} { lsearch -glob {b.x ^bc xy bcx} ^bc } 1 test lsearch-2.10 {search modes} -returnCodes error -body { lsearch -glib {b.x bx xy bcx} b.x | | | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | lsearch -glob {xyz bbcc *bc*} *bc* } 1 test lsearch-2.9 {search modes} { lsearch -glob {b.x ^bc xy bcx} ^bc } 1 test lsearch-2.10 {search modes} -returnCodes error -body { lsearch -glib {b.x bx xy bcx} b.x } -result {bad option "-glib": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, -stride, or -subindices} test lsearch-2.11 {search modes with -nocase} { lsearch -exact -nocase {a b c A B C} A } 0 test lsearch-2.12 {search modes with -nocase} { lsearch -glob -nocase {a b c A B C} A* } 0 test lsearch-2.13 {search modes with -nocase} { |
︙ | ︙ | |||
83 84 85 86 87 88 89 | lsearch } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.2 {lsearch errors} -returnCodes error -body { lsearch a } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.3 {lsearch errors} -returnCodes error -body { lsearch a b c | | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | lsearch } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.2 {lsearch errors} -returnCodes error -body { lsearch a } -result {wrong # args: should be "lsearch ?-option value ...? list pattern"} test lsearch-3.3 {lsearch errors} -returnCodes error -body { lsearch a b c } -result {bad option "a": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, -stride, or -subindices} test lsearch-3.4 {lsearch errors} -returnCodes error -body { lsearch a b c d } -result {bad option "a": must be -all, -ascii, -bisect, -decreasing, -dictionary, -exact, -glob, -increasing, -index, -inline, -integer, -nocase, -not, -real, -regexp, -sorted, -start, -stride, or -subindices} test lsearch-3.5 {lsearch errors} -returnCodes error -body { lsearch "\{" b } -result {unmatched open brace in list} test lsearch-3.6 {lsearch errors} -returnCodes error -body { lsearch -index a b } -result {"-index" option must be followed by list index} test lsearch-3.7 {lsearch errors} -returnCodes error -body { |
︙ | ︙ | |||
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | } {0 1} test lsearch-17.6 {lsearch -index option, basic functionality} { lsearch -all -index 1 -glob {{ab cb} {ab bb} {db bx}} b* } {1 2} test lsearch-17.7 {lsearch -index option, basic functionality} { lsearch -all -index 1 -regexp {{ab cb} {ab bb} {ab ab}} {[cb]b} } {0 1} test lsearch-18.1 {lsearch -index option, list as index basic functionality} { lsearch -index {0 0} {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } 1 test lsearch-18.2 {lsearch -index option, list as index basic functionality} { lsearch -index {2 0} -exact {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } 0 test lsearch-18.3 {lsearch -index option, list as index basic functionality} { lsearch -index {1 1} -glob {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} b* } 0 test lsearch-18.4 {lsearch -index option, list as index basic functionality} { lsearch -index {0 1} -regexp {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} {[cb]b} } 0 test lsearch-18.5 {lsearch -index option, list as index basic functionality} { lsearch -all -index {0 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {0 1} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | > > > > > > > > > | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | } {0 1} test lsearch-17.6 {lsearch -index option, basic functionality} { lsearch -all -index 1 -glob {{ab cb} {ab bb} {db bx}} b* } {1 2} test lsearch-17.7 {lsearch -index option, basic functionality} { lsearch -all -index 1 -regexp {{ab cb} {ab bb} {ab ab}} {[cb]b} } {0 1} test lsearch-17.8 {lsearch -index option, empty argument} { lsearch -index {} a a } 0 test lsearch-17.9 {lsearch -index option, empty argument} { lsearch -index {} a a } [lsearch a a] test lsearch-17.10 {lsearch -index option, empty argument} { lsearch -index {} [list \{] \{ } 0 test lsearch-17.11 {lsearch -index option, empty argument} { lsearch -index {} [list \{] \{ } [lsearch [list \{] \{] test lsearch-17.12 {lsearch -index option, encoding aliasing} -body { lsearch -index -2 a a } -returnCodes error -result {index "-2" cannot select an element from any list} test lsearch-17.13 {lsearch -index option, encoding aliasing} -body { lsearch -index -1-1 a a } -returnCodes error -result {index "-1-1" cannot select an element from any list} test lsearch-17.14 {lsearch -index option, encoding aliasing} -body { lsearch -index end--1 a a } -returnCodes error -result {index "end--1" cannot select an element from any list} test lsearch-17.15 {lsearch -index option, encoding aliasing} -body { lsearch -index end+1 a a } -returnCodes error -result {index "end+1" cannot select an element from any list} test lsearch-17.16 {lsearch -index option, encoding aliasing} -body { lsearch -index end+2 a a } -returnCodes error -result {index "end+2" cannot select an element from any list} test lsearch-18.1 {lsearch -index option, list as index basic functionality} { lsearch -index {0 0} {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } 1 test lsearch-18.2 {lsearch -index option, list as index basic functionality} { lsearch -index {2 0} -exact {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } 0 test lsearch-18.3 {lsearch -index option, list as index basic functionality} { lsearch -index {1 1} -glob {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} b* } 0 test lsearch-18.4 {lsearch -index option, list as index basic functionality} { lsearch -index {0 1} -regexp {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} {[cb]b} } 0 test lsearch-18.5 {lsearch -index option, list as index basic functionality} { lsearch -all -index {0 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {0 1} test lsearch-19.1 {lsearch -subindices option} { lsearch -subindices -index {0 0} {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } {1 0 0} test lsearch-19.2 {lsearch -subindices option} { lsearch -subindices -index {2 0} -exact {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } {0 2 0} test lsearch-19.3 {lsearch -subindices option} { lsearch -subindices -index {1 1} -glob {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} b* } {0 1 1} test lsearch-19.4 {lsearch -subindices option} { lsearch -subindices -index {0 1} -regexp {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} {[cb]b} } {0 0 1} test lsearch-19.5 {lsearch -subindices option} { lsearch -subindices -all -index {0 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {{0 0 0} {1 0 0}} test lsearch-19.6 {lsearch -subindices option} { lsearch -subindices -all -index {1 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {{0 1 0} {1 1 0}} test lsearch-19.7 {lsearch -subindices option} { lsearch -subindices -index end {{1 a}} a } {0 1} test lsearch-19.8 {lsearch -subindices option} { lsearch -subindices -all -index end {{1 a}} a } {{0 1}} test lsearch-20.1 {lsearch -index option, index larger than sublists} -body { lsearch -index 2 {{a c} {a b} {a a}} a } -returnCodes error -result {element 2 missing from sublist "a c"} test lsearch-20.2 {lsearch -index option, malformed index} -body { lsearch -index foo {{a c} {a b} {a a}} a } -returnCodes error -result {bad index "foo": must be integer?[+-]integer? or end?[+-]integer?} |
︙ | ︙ | |||
505 506 507 508 509 510 511 512 513 514 515 516 517 518 | } -result {10 8 5 2} test lsearch-22.5 {lsearch -bisect, all equal} { lsearch -bisect -integer {5 5 5 5} 5 } {3} test lsearch-22.6 {lsearch -sorted, all equal} { lsearch -sorted -integer {5 5 5 5} 5 } {0} # cleanup catch {unset res} catch {unset increasingIntegers} catch {unset decreasingIntegers} catch {unset increasingDoubles} catch {unset decreasingDoubles} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 | } -result {10 8 5 2} test lsearch-22.5 {lsearch -bisect, all equal} { lsearch -bisect -integer {5 5 5 5} 5 } {3} test lsearch-22.6 {lsearch -sorted, all equal} { lsearch -sorted -integer {5 5 5 5} 5 } {0} test lsearch-23.1 {lsearch -stride option, errors} -body { lsearch -stride {a b} a } -returnCodes error -result {"-stride" option must be followed by stride length} test lsearch-23.2 {lsearch -stride option, errors} -body { lsearch -stride 0 {a b} a } -returnCodes error -result {stride length must be at least 1} test lsearch-23.3 {lsearch -stride option, errors} -body { lsearch -stride 2 {a b c} a } -returnCodes error -result {list size must be a multiple of the stride length} test lsearch-23.4 {lsearch -stride option, errors} -body { lsearch -stride 5 {a b c} a } -returnCodes error -result {list size must be a multiple of the stride length} test lsearch-23.5 {lsearch -stride option, errors} -body { # Stride equal to length is ok lsearch -stride 3 {a b c} a } -result 0 test lsearch-24.1 {lsearch -stride option} -body { lsearch -stride 2 {a b c d e f g h} d } -result -1 test lsearch-24.2 {lsearch -stride option} -body { lsearch -stride 2 {a b c d e f g h} e } -result 4 test lsearch-24.3 {lsearch -stride option} -body { lsearch -stride 3 {a b c d e f g h i} e } -result -1 test lsearch-24.4 {lsearch -stride option} -body { # Result points first in group lsearch -stride 3 -index 1 {a b c d e f g h i} e } -result 3 test lsearch-24.5 {lsearch -stride option} -body { lsearch -inline -stride 2 {a b c d e f g h} d } -result {} test lsearch-24.6 {lsearch -stride option} -body { # Inline result is a "single element" strided list lsearch -inline -stride 2 {a b c d e f g h} e } -result "e f" test lsearch-24.7 {lsearch -stride option} -body { lsearch -inline -stride 3 {a b c d e f g h i} e } -result {} test lsearch-24.8 {lsearch -stride option} -body { lsearch -inline -stride 3 -index 1 {a b c d e f g h i} e } -result "d e f" test lsearch-24.9 {lsearch -stride option} -body { lsearch -all -inline -stride 3 -index 1 {a b c d e f g e i} e } -result "d e f g e i" test lsearch-24.10 {lsearch -stride option} -body { lsearch -all -inline -stride 3 -index 0 {a b c d e f a e i} a } -result "a b c a e i" test lsearch-24.11 {lsearch -stride option} -body { # Stride 1 is same as no stride lsearch -stride 1 {a b c d e f g h} d } -result 3 # 25* mimics 19* but with -inline added to -subindices test lsearch-25.1 {lsearch -subindices option} { lsearch -inline -subindices -index {0 0} {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } {a} test lsearch-25.2 {lsearch -subindices option} { lsearch -inline -subindices -index {2 0} -exact {{{x x} {x b} {a d}} {{a c} {a b} {a a}}} a } {a} test lsearch-25.3 {lsearch -subindices option} { lsearch -inline -subindices -index {1 1} -glob {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} b* } {bb} test lsearch-25.4 {lsearch -subindices option} { lsearch -inline -subindices -index {0 1} -regexp {{{ab cb} {ab bb} {ab ab}} {{ab cb} {ab bb} {ab ab}}} {[cb]b} } {cb} test lsearch-25.5 {lsearch -subindices option} { lsearch -inline -subindices -all -index {0 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {a a} test lsearch-25.6 {lsearch -subindices option} { lsearch -inline -subindices -all -index {1 0} -exact {{{a c} {a b} {d a}} {{a c} {a b} {d a}}} a } {a a} # 26* mimics 19* but with -stride added test lsearch-26.1 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -index {0 0} {{x x} {x b} {a d} {a c} {a b} {a a}} a } {3 0} test lsearch-26.2 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -index {2 0} -exact {{x x} {x b} {a d} {a c} {a b} {a a}} a } {2 0} test lsearch-26.3 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -index {1 1} -glob {{ab cb} {ab bb} {ab ab} {ab cb} {ab bb} {ab ab}} b* } {1 1} test lsearch-26.4 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -index {0 1} -regexp {{ab cb} {ab bb} {ab ab} {ab cb} {ab bb} {ab ab}} {[cb]b} } {0 1} test lsearch-26.5 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -all -index {0 0} -exact {{a c} {a b} {d a} {a c} {a b} {d a}} a } {{0 0} {3 0}} test lsearch-26.6 {lsearch -stride + -subindices option} { lsearch -stride 3 -subindices -all -index {1 0} -exact {{a c} {a b} {d a} {x c} {a b} {d a}} a } {{1 0} {4 0}} # 27* mimics 25* but with -stride added test lsearch-27.1 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -index {0 0} {{x x} {x b} {a d} {a c} {a b} {a a}} a } {a} test lsearch-27.2 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -index {2 0} -exact {{x x} {x b} {a d} {a c} {a b} {a a}} a } {a} test lsearch-27.3 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -index {1 1} -glob {{ab cb} {ab bb} {ab ab} {ab cb} {ab bb} {ab ab}} b* } {bb} test lsearch-27.4 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -index {0 1} -regexp {{ab cb} {ab bb} {ab ab} {ab cb} {ab bb} {ab ab}} {[cb]b} } {cb} test lsearch-27.5 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -all -index {0 0} -exact {{a c} {a b} {d a} {a c} {a b} {d a}} a } {a a} test lsearch-27.6 {lsearch -stride + -subindices option} { lsearch -inline -stride 3 -subindices -all -index {1 0} -exact {{a c} {a b} {d a} {x c} {a b} {d a}} a } {a a} test lsearch-28.1 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 5 } -result 0 test lsearch-28.2 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 3 } -result -1 test lsearch-28.3 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 7 } -result 2 test lsearch-28.4 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 8 } -result -1 test lsearch-28.5 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 9 } -result 4 test lsearch-28.6 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 {5 3 7 8 9 2} 2 } -result -1 test lsearch-28.7 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 -index 0 -subindices {5 3 7 8 9 2} 9 } -result 4 test lsearch-28.8 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 -index 1 -subindices {3 5 8 7 2 9} 9 } -result 5 test lsearch-28.9 {lsearch -sorted with -stride} -body { lsearch -sorted -stride 2 -index 1 -subindices -inline {3 5 8 7 2 9} 9 } -result 9 # cleanup catch {unset res} catch {unset increasingIntegers} catch {unset decreasingIntegers} catch {unset increasingDoubles} catch {unset decreasingDoubles} |
︙ | ︙ |
Changes to tests/msgcat.test.
︙ | ︙ | |||
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | variable body variable result variable setVars foreach setVars [PowerSet $envVars] { set result [string tolower [lindex $setVars 0]] if {[string length $result] == 0} { if {[info exists ::tcl::mac::locale]} { set result [string tolower \ [msgcat::ConvertLocale $::tcl::mac::locale]] } else { if {([info sharedlibextension] eq ".dll") && ![catch {package require registry}]} { # Windows and Cygwin have other ways to determine the # locale when the environment variables are missing # and the registry package is present continue | > > > > > | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | variable body variable result variable setVars foreach setVars [PowerSet $envVars] { set result [string tolower [lindex $setVars 0]] if {[string length $result] == 0} { if {[info exists ::tcl::mac::locale]} { if {[package vsatisfies [package provide msgcat] 1.7]} { set result [string tolower \ [msgcat::mcutil::ConvertLocale $::tcl::mac::locale]] } else { set result [string tolower \ [msgcat::ConvertLocale $::tcl::mac::locale]] } } else { if {([info sharedlibextension] eq ".dll") && ![catch {package require registry}]} { # Windows and Cygwin have other ways to determine the # locale when the environment variables are missing # and the registry package is present continue |
︙ | ︙ | |||
189 190 191 192 193 194 195 196 197 198 199 200 201 202 | test msgcat-1.13 {mclocale set, reject evil input} -setup { variable locale [mclocale] } -cleanup { mclocale $locale } -body { mclocale looks/ok/../../../../but/is/path/to/evil/code } -returnCodes error -match glob -result {invalid newLocale value *} # Tests msgcat-2.*: [mcset], [mcmset], namespace partitioning test msgcat-2.1 {mcset, global scope} { namespace eval :: ::msgcat::mcset foo_BAR text1 text2 } {text2} | > > > > > > > > > > > > > > > > > > > > > > | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | test msgcat-1.13 {mclocale set, reject evil input} -setup { variable locale [mclocale] } -cleanup { mclocale $locale } -body { mclocale looks/ok/../../../../but/is/path/to/evil/code } -returnCodes error -match glob -result {invalid newLocale value *} test msgcat-1.14 {mcpreferences, custom locale preferences} -setup { variable locale [mclocale] mclocale en mcpreferences fr en {} } -cleanup { mclocale $locale } -body { mcpreferences } -result {fr en {}} test msgcat-1.15 {mcpreferences, overwrite custom locale preferences}\ -setup { variable locale [mclocale] mcpreferences fr en {} mclocale en } -cleanup { mclocale $locale } -body { mcpreferences } -result {en {}} # Tests msgcat-2.*: [mcset], [mcmset], namespace partitioning test msgcat-2.1 {mcset, global scope} { namespace eval :: ::msgcat::mcset foo_BAR text1 text2 } {text2} |
︙ | ︙ | |||
684 685 686 687 688 689 690 | removeDirectory msgdir3 # Tests msgcat-9.*: [mcexists] test msgcat-9.1 {mcexists no parameter} -body { mcexists } -returnCodes 1\ | | | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 | removeDirectory msgdir3 # Tests msgcat-9.*: [mcexists] test msgcat-9.1 {mcexists no parameter} -body { mcexists } -returnCodes 1\ -result {wrong # args: should be "mcexists ?-exactnamespace? ?-exactlocale? ?-namespace ns? src"} test msgcat-9.2 {mcexists unknown option} -body { mcexists -unknown src } -returnCodes 1\ -result {unknown option "-unknown"} test msgcat-9.3 {mcexists} -setup { |
︙ | ︙ | |||
720 721 722 723 724 725 726 727 | test msgcat-9.5 {mcexists parent namespace} -setup { mcforgetpackage variable locale [mclocale] mclocale foo_bar mcset foo k1 v1 } -cleanup { mclocale $locale } -body { | > | | | > > > > > > > > > > > > > > > > > > > > > | 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | test msgcat-9.5 {mcexists parent namespace} -setup { mcforgetpackage variable locale [mclocale] mclocale foo_bar mcset foo k1 v1 } -cleanup { mclocale $locale namespace delete ::foo } -body { namespace eval ::foo { list [::msgcat::mcexists k1]\ [::msgcat::mcexists -namespace ::msgcat::test k1] } } -result {0 1} test msgcat-9.6 {mcexists -namespace ns parameter} -setup { mcforgetpackage variable locale [mclocale] mclocale foo_bar mcset foo k1 v1 } -cleanup { mclocale $locale namespace delete ::foo } -body { namespace eval ::foo { list [::msgcat::mcexists k1]\ [::msgcat::mcexists -namespace ::msgcat::test k1] } } -result {0 1} test msgcat-9.7 {mcexists -namespace - ns argument missing} -body { mcexists -namespace src } -returnCodes 1\ -result {Argument missing for switch "-namespace"} # Tests msgcat-10.*: [mcloadedlocales] test msgcat-10.1 {mcloadedlocales no arg} -body { mcloadedlocales } -returnCodes 1\ -result {wrong # args: should be "mcloadedlocales subcommand"} |
︙ | ︙ | |||
807 808 809 810 811 812 813 | } -result {1 0} # Tests msgcat-12.*: [mcpackagelocale] test msgcat-12.1 {mcpackagelocale no subcommand} -body { mcpackagelocale } -returnCodes 1\ | | > > > > > | 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | } -result {1 0} # Tests msgcat-12.*: [mcpackagelocale] test msgcat-12.1 {mcpackagelocale no subcommand} -body { mcpackagelocale } -returnCodes 1\ -result {wrong # args: should be "mcpackagelocale subcommand ?arg ...?"} test msgcat-12.2 {mclpackagelocale wrong subcommand} -body { mcpackagelocale junk } -returnCodes 1\ -result {unknown subcommand "junk": must be clear, get, isset, loaded, present, set, or unset} test msgcat-12.2.1 {mclpackagelocale set multiple args} -body { mcpackagelocale set a b } -returnCodes 1\ -result {wrong # args: should be "mcpackagelocale set ?locale?"} test msgcat-12.3 {mcpackagelocale set} -setup { variable locale [mclocale] } -cleanup { mclocale $locale mcforgetpackage } -body { mclocale foo |
︙ | ︙ | |||
918 919 920 921 922 923 924 925 926 927 928 929 930 931 | mcloadedlocales clear mclocale foo mcpackagelocale set bar mcpackagelocale clear list [mcpackagelocale present foo] [mcpackagelocale present bar] } -result {0 1} # Tests msgcat-13.*: [mcpackageconfig subcmds] test msgcat-13.1 {mcpackageconfig no subcommand} -body { mcpackageconfig } -returnCodes 1\ -result {wrong # args: should be "mcpackageconfig subcommand option ?value?"} | > > > > > > > > > > > > > > > > > > > > > > > > | 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 | mcloadedlocales clear mclocale foo mcpackagelocale set bar mcpackagelocale clear list [mcpackagelocale present foo] [mcpackagelocale present bar] } -result {0 1} test msgcat-12.11 {mcpackagelocale custom preferences} -setup { variable locale [mclocale] } -cleanup { mclocale $locale mcforgetpackage } -body { mclocale foo set res [list [mcpackagelocale preferences]] mcpackagelocale preferences bar {} lappend res [mcpackagelocale preferences] } -result {{foo {}} {bar {}}} test msgcat-12.12 {mcpackagelocale preferences -> no isset} -setup { variable locale [mclocale] } -cleanup { mclocale $locale mcforgetpackage } -body { mclocale foo mcpackagelocale preferences mcpackagelocale isset } -result {0} # Tests msgcat-13.*: [mcpackageconfig subcmds] test msgcat-13.1 {mcpackageconfig no subcommand} -body { mcpackageconfig } -returnCodes 1\ -result {wrong # args: should be "mcpackageconfig subcommand option ?value?"} |
︙ | ︙ | |||
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | mcforgetpackage } -body { mcpackageconfig set unknowncmd [namespace code callbackfailproc] mclocale foo_bar mc k1 } -returnCodes 1\ -result {fail} interp bgerror {} $bgerrorsaved cleanupTests } namespace delete ::msgcat::test return # Local Variables: # mode: tcl # End: | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 | mcforgetpackage } -body { mcpackageconfig set unknowncmd [namespace code callbackfailproc] mclocale foo_bar mc k1 } -returnCodes 1\ -result {fail} # Tests msgcat-15.*: tcloo coverage # There are 4 use-cases, where 3 must be tested now: # - namespace defined, in class definition, class defined oo, classless test msgcat-15.1 {mc in class setup} -setup { # full namespace is ::msgcat::test:bar namespace eval bar { ::msgcat::mcset foo_BAR con2 con2bar oo::class create ClassCur } variable locale [mclocale] mclocale foo_BAR } -cleanup { mclocale $locale namespace eval bar {::msgcat::mcforgetpackage} namespace delete bar } -body { oo::define bar::ClassCur msgcat::mc con2 } -result con2bar test msgcat-15.2 {mc in class} -setup { # full namespace is ::msgcat::test:bar namespace eval bar { ::msgcat::mcset foo_BAR con2 con2bar oo::class create ClassCur oo::define ClassCur method method1 {} {::msgcat::mc con2} } # full namespace is ::msgcat::test:baz namespace eval baz { set ObjCur [::msgcat::test::bar::ClassCur new] } variable locale [mclocale] mclocale foo_BAR } -cleanup { mclocale $locale namespace eval bar {::msgcat::mcforgetpackage} namespace delete bar baz } -body { $baz::ObjCur method1 } -result con2bar test msgcat-15.3 {mc in classless object} -setup { # full namespace is ::msgcat::test:bar namespace eval bar { ::msgcat::mcset foo_BAR con2 con2bar oo::object create ObjCur oo::objdefine ObjCur method method1 {} {::msgcat::mc con2} } variable locale [mclocale] mclocale foo_BAR } -cleanup { mclocale $locale namespace eval bar {::msgcat::mcforgetpackage} namespace delete bar } -body { bar::ObjCur method1 } -result con2bar test msgcat-15.4 {mc in classless object with explicite namespace eval}\ -setup { # full namespace is ::msgcat::test:bar namespace eval bar { ::msgcat::mcset foo_BAR con2 con2bar oo::object create ObjCur oo::objdefine ObjCur method method1 {} { namespace eval ::msgcat::test::baz { ::msgcat::mc con2 } } } namespace eval baz { ::msgcat::mcset foo_BAR con2 con2baz } variable locale [mclocale] mclocale foo_BAR } -cleanup { mclocale $locale namespace eval bar {::msgcat::mcforgetpackage} namespace eval baz {::msgcat::mcforgetpackage} namespace delete bar baz } -body { bar::ObjCur method1 } -result con2baz # Test msgcat-16.*: command mcpackagenamespaceget test msgcat-16.1 {mcpackagenamespaceget in namespace procedure} -body { namespace eval baz {msgcat::mcpackagenamespaceget} } -result ::msgcat::test::baz test msgcat-16.2 {mcpackagenamespaceget in class setup} -setup { namespace eval bar { oo::class create ClassCur oo::define ClassCur variable a } } -cleanup { namespace delete bar } -body { oo::define bar::ClassCur msgcat::mcpackagenamespaceget } -result ::msgcat::test::bar test msgcat-16.3 {mcpackagenamespaceget in class} -setup { namespace eval bar { oo::class create ClassCur oo::define ClassCur method method1 {} {msgcat::mcpackagenamespaceget} } namespace eval baz { set ObjCur [::msgcat::test::bar::ClassCur new] } } -cleanup { namespace delete bar baz } -body { $baz::ObjCur method1 } -result ::msgcat::test::bar test msgcat-16.4 {mcpackagenamespaceget in classless object} -setup { namespace eval bar { oo::object create ObjCur oo::objdefine ObjCur method method1 {} {msgcat::mcpackagenamespaceget} } } -cleanup { namespace delete bar } -body { bar::ObjCur method1 } -result ::msgcat::test::bar test msgcat-16.5\ {mcpackagenamespaceget in classless object with explicite namespace eval}\ -setup { namespace eval bar { oo::object create ObjCur oo::objdefine ObjCur method method1 {} { namespace eval ::msgcat::test::baz { msgcat::mcpackagenamespaceget } } } } -cleanup { namespace delete bar baz } -body { bar::ObjCur method1 } -result ::msgcat::test::baz # Test msgcat-17.*: mcn command test msgcat-17.1 {mcn no parameters} -body { mcn } -returnCodes 1\ -result {wrong # args: should be "mcn ns src ?arg ...?"} test msgcat-17.2 {mcn} -setup { namespace eval bar {::msgcat::mcset foo_BAR con1 con1bar} variable locale [mclocale] mclocale foo_BAR } -cleanup { mclocale $locale } -body { ::msgcat::mcn [namespace current]::bar con1 } -result con1bar interp bgerror {} $bgerrorsaved # Tests msgcat-15.*: [mcutil] test msgcat-15.1 {mcutil - no argument} -body { mcutil } -returnCodes 1\ -result {wrong # args: should be "mcutil subcommand ?arg ...?"} test msgcat-15.2 {mcutil - wrong argument} -body { mcutil junk } -returnCodes 1\ -result {unknown subcommand "junk": must be getpreferences, or getsystemlocale} test msgcat-15.3 {mcutil - partial argument} -body { mcutil getsystem } -returnCodes 1\ -result {unknown subcommand "getsystem": must be getpreferences, or getsystemlocale} test msgcat-15.4 {mcutil getpreferences - no argument} -body { mcutil getpreferences } -returnCodes 1\ -result {wrong # args: should be "mcutil getpreferences locale"} test msgcat-15.5 {mcutil getpreferences - DE_de} -body { mcutil getpreferences DE_de } -result {de_de de {}} test msgcat-15.6 {mcutil getsystemlocale - wrong argument} -body { mcutil getsystemlocale DE_de } -returnCodes 1\ -result {wrong # args: should be "mcutil getsystemlocale"} # The result is system dependent # So just test if it runs # The environment variable version was test with test 0.x test msgcat-15.7 {mcutil getsystemlocale} -body { mcutil getsystemlocale set ok ok } -result {ok} cleanupTests } namespace delete ::msgcat::test return # Local Variables: # mode: tcl # End: |
Changes to tests/oo.test.
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require TclOO 1.0.3 package require tcltest 2 if {"::tcltest" in [namespace children]} { namespace import -force ::tcltest::* } testConstraint memory [llength [info commands memory]] if {[testConstraint memory]} { proc getbytes {} { set lines [split [memory info] \n] return [lindex $lines 3 3] } | > > > > > > > | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # this file, and for a DISCLAIMER OF ALL WARRANTIES. package require TclOO 1.0.3 package require tcltest 2 if {"::tcltest" in [namespace children]} { namespace import -force ::tcltest::* } # The foundational objects oo::object and oo::class are sensitive to reference # counting errors and are deallocated only when an interp is deleted, so in # this test suite, interp creation and interp deletion are often used in # leaktests in order to leverage this sensitivity. testConstraint memory [llength [info commands memory]] if {[testConstraint memory]} { proc getbytes {} { set lines [split [memory info] \n] return [lindex $lines 3 3] } |
︙ | ︙ | |||
53 54 55 56 57 58 59 | test oo-0.4 {basic test of OO's ability to clean up its initial state} -body { leaktest { oo::class create foo foo new foo destroy } } -constraints memory -result 0 | > > > > > > | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | test oo-0.4 {basic test of OO's ability to clean up its initial state} -body { leaktest { oo::class create foo foo new foo destroy } } -constraints memory -result 0 test oo-0.5.1 {testing object foundation cleanup} memory { leaktest { interp create foo interp delete foo } } 0 test oo-0.5.2 {testing literal leak on interp delete} memory { leaktest { interp create foo foo eval {oo::object new} interp delete foo } } 0 test oo-0.6 {cleaning the core class pair; way #1} -setup { |
︙ | ︙ | |||
261 262 263 264 265 266 267 | } -body { oo::define B constructor {} {A create test-oo-1.18} B create C } -cleanup { rename test-oo-1.18 {} A destroy } -result ::C | > > > > > > > > > > > > > > | | | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | } -body { oo::define B constructor {} {A create test-oo-1.18} B create C } -cleanup { rename test-oo-1.18 {} A destroy } -result ::C test oo-1.18.1 {no memory leak: superclass} -setup { } -constraints memory -body { leaktest { interp create t t eval { oo::class create A { superclass oo::class } } interp delete t } } -cleanup { } -result 0 test oo-1.18.2 {Bug 75b8433707: memory leak in oo-1.18} -setup { proc test-oo-1.18 {} return } -constraints memory -body { leaktest { oo::class create A oo::class create B {superclass A} oo::define B constructor {} {A create test-oo-1.18} B create C A destroy } } -cleanup { rename test-oo-1.18 {} } -result 0 test oo-1.18.3 {Bug 21c144f0f5} -setup { interp create slave } -body { slave eval { oo::define [oo::class create foo] superclass oo::class oo::class destroy } } -cleanup { |
︙ | ︙ | |||
1498 1499 1500 1501 1502 1503 1504 | }}} rename obj1 {} # No segmentation fault return done } done | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 | }}} rename obj1 {} # No segmentation fault return done } done test oo-11.6.1 { OO: cleanup of when an class is mixed into itself } -constraints memory -body { leaktest { interp create interp1 oo::class create obj1 ::oo::define obj1 {self mixin [uplevel 1 {namespace which obj1}]} rename obj1 {} interp delete interp1 } } -result 0 -cleanup { } test oo-11.6.2 { OO: cleanup ReleaseClassContents() where class is mixed into one of its instances } -constraints memory -body { leaktest { interp create interp1 interp1 eval { oo::class create obj1 ::oo::copy obj1 obj2 rename obj2 {} rename obj1 {} } interp delete interp1 } } -result 0 -cleanup { } test oo-11.6.3 { OO: cleanup ReleaseClassContents() where class is mixed into one of its instances } -constraints memory -body { leaktest { interp create interp1 interp1 eval { oo::class create obj1 ::oo::define obj1 {self mixin [uplevel 1 {namespace which obj1}]} ::oo::copy obj1 obj2 rename obj2 {} rename obj1 {} } interp delete interp1 } } -result 0 -cleanup { } test oo-11.6.4 { OO: cleanup ReleaseClassContents() where class is mixed into one of its instances } -body { oo::class create obj1 ::oo::define obj1 {self mixin [self]} ::oo::copy obj1 obj2 |
︙ | ︙ | |||
2061 2062 2063 2064 2065 2066 2067 | } -body { namespace eval ::existing {} oo::copy Cls {} ::existing } -returnCodes error -cleanup { Super destroy catch {namespace delete ::existing} } -result {::existing refers to an existing namespace} | > > > > > > > > > > > > > | | 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 | } -body { namespace eval ::existing {} oo::copy Cls {} ::existing } -returnCodes error -cleanup { Super destroy catch {namespace delete ::existing} } -result {::existing refers to an existing namespace} test oo-15.13.1 { OO: object cloning with target NS Valgrind will report a leak if the reference count of the namespace isn't properly incremented. } -setup { oo::class create Cls {} } -body { oo::copy Cls Cls2 ::dupens return done } -cleanup { Cls destroy Cls2 destroy } -result done test oo-15.13.2 {OO: object cloning with target NS} -setup { oo::class create Super oo::class create Cls {superclass Super} } -body { list [namespace exist ::dupens] [oo::copy Cls Cls2 ::dupens] [namespace exist ::dupens] } -cleanup { Super destroy } -result {0 ::Cls2 1} |
︙ | ︙ | |||
3657 3658 3659 3660 3661 3662 3663 | } } list [leaktest {[cls new] destroy}] [info class instances cls] } -cleanup { cls destroy } -result {0 {}} | > > | | | | | | | | | | | | | | | | | | | | | > > > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | < < | 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 | } } list [leaktest {[cls new] destroy}] [info class instances cls] } -cleanup { cls destroy } -result {0 {}} proc SampleSlotSetup script { set script0 { oo::class create SampleSlot { superclass oo::Slot constructor {} { variable contents {a b c} ops {} } method contents {} {variable contents; return $contents} method ops {} {variable ops; return $ops} method Get {} { variable contents variable ops lappend ops [info level] Get return $contents } method Set {lst} { variable contents $lst variable ops lappend ops [info level] Set $lst return } } } append script0 \n$script } proc SampleSlotCleanup script { set script0 { SampleSlot destroy } append script \n$script0 } test oo-32.1 {TIP 380: slots - class test} -setup [SampleSlotSetup { SampleSlot create sampleSlot }] -body { list [info level] [sampleSlot contents] [sampleSlot ops] } -cleanup [SampleSlotCleanup { rename sampleSlot {} }] -result {0 {a b c} {}} test oo-32.2 {TIP 380: slots - class test} -setup [SampleSlotSetup { SampleSlot create sampleSlot }] -body { list [info level] [sampleSlot -clear] \ [sampleSlot contents] [sampleSlot ops] } -cleanup [SampleSlotCleanup { rename sampleSlot {} }] -result {0 {} {} {1 Set {}}} test oo-32.3 {TIP 380: slots - class test} -setup [SampleSlotSetup { SampleSlot create sampleSlot }] -body { list [info level] [sampleSlot -append g h i] \ [sampleSlot contents] [sampleSlot ops] } -cleanup [SampleSlotCleanup { rename sampleSlot {} }] -result {0 {} {a b c g h i} {1 Get 1 Set {a b c g h i}}} test oo-32.4 {TIP 380: slots - class test} -setup [SampleSlotSetup { SampleSlot create sampleSlot }] -body { list [info level] [sampleSlot -set d e f] \ [sampleSlot contents] [sampleSlot ops] } -cleanup [SampleSlotCleanup { rename sampleSlot {} }] -result {0 {} {d e f} {1 Set {d e f}}} test oo-32.5 {TIP 380: slots - class test} -setup [SampleSlotSetup { SampleSlot create sampleSlot }] -body { list [info level] [sampleSlot -set d e f] [sampleSlot -append g h i] \ [sampleSlot contents] [sampleSlot ops] } -cleanup [SampleSlotCleanup { rename sampleSlot {} }] -result {0 {} {} {d e f g h i} {1 Set {d e f} 1 Get 1 Set {d e f g h i}}} test oo-33.1 {TIP 380: slots - defaulting} -setup [SampleSlotSetup { set s [SampleSlot new] }] -body { list [$s x y] [$s contents] } -cleanup [SampleSlotCleanup { rename $s {} }] -result {{} {a b c x y}} test oo-33.2 {TIP 380: slots - defaulting} -setup [SampleSlotSetup { set s [SampleSlot new] }] -body { list [$s destroy; $s unknown] [$s contents] } -cleanup [SampleSlotCleanup { rename $s {} }] -result {{} {a b c destroy unknown}} test oo-33.3 {TIP 380: slots - defaulting} -setup [SampleSlotSetup { set s [SampleSlot new] }] -body { oo::objdefine $s forward --default-operation my -set list [$s destroy; $s unknown] [$s contents] [$s ops] } -cleanup [SampleSlotCleanup { rename $s {} }] -result {{} unknown {1 Set destroy 1 Set unknown}} test oo-33.4 {TIP 380: slots - errors} -setup [SampleSlotSetup { set s [SampleSlot new] }] -body { # Method names beginning with "-" are special to slots $s -grill q } -returnCodes error -cleanup [SampleSlotCleanup { rename $s {} }] -result \ {unknown method "-grill": must be -append, -clear, -set, contents or ops} test oo-34.1 {TIP 380: slots - presence} -setup { set obj [oo::object new] set result {} } -body { oo::define oo::object { ::lappend ::result [::info object class filter] |
︙ | ︙ |
Added tests/process.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # process.test -- # # This file contains a collection of tests for the tcl::process ensemble. # Sourcing this file into Tcl runs the tests and generates output for # errors. No output means no errors were found. # # Copyright (c) 2017 Frederic Bonnet # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 namespace import -force ::tcltest::* } test process-1.1 {tcl::process command basic syntax} -returnCodes error -body { tcl::process } -result {wrong # args: should be "tcl::process subcommand ?arg ...?"} test process-1.2 {tcl::process command basic syntax} -returnCodes error -body { tcl::process ? } -match glob -result {unknown or ambiguous subcommand "?": must be autopurge, list, purge, or status} test process-2.1 {tcl::process autopurge get} {tcl::process autopurge} {1} test process-2.2 {tcl::process autopurge set true} { tcl::process autopurge true tcl::process autopurge } {1} test process-2.3 {tcl::process autopurge set false} { tcl::process autopurge false tcl::process autopurge } {0} |
Changes to tests/string.test.
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 | package require tcltest namespace import -force ::tcltest::* } ::tcltest::loadTestedCommands catch [list package require -exact Tcltest [info patchlevel]] # Some tests require the testobj command | > > > > > > | | > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > | | | | > > > > > > | > > > | | | | | | | | | | | | | | | | | | | | | | > > > > > > > > > | | | | > | > > | | | > > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | < | | < > > > > > > > > > | | | | | | | | | | | | | | | | > > > > > > > > > > > > > > > > > > > > > | | | | | | | | > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | > | > > | > | > > > > > > > | | | | | | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > | > > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > > > > | > > > | | > > | > | < > > | | > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 | package require tcltest namespace import -force ::tcltest::* } ::tcltest::loadTestedCommands catch [list package require -exact Tcltest [info patchlevel]] # Helper commands to test various optimizations, code paths, and special cases. proc makeByteArray {s} {binary format a* $s} proc makeUnicode {s} {lindex [regexp -inline .* $s] 0} proc makeList {args} {return $args} proc makeShared {s} {uplevel 1 [list lappend copy $s]; return $s} # Some tests require the testobj command testConstraint testobj [expr {[info commands testobj] ne {}}] testConstraint testindexobj [expr {[info commands testindexobj] ne {}}] testConstraint testevalex [expr {[info commands testevalex] ne {}}] testConstraint fullutf [expr {[format %c 0x010000] != "\ufffd"}] # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] if {[testConstraint memory]} { proc getbytes {} { set lines [split [memory info] \n] return [lindex $lines 3 3] } proc leaktest {script {iterations 3}} { set end [getbytes] for {set i 0} {$i < $iterations} {incr i} { uplevel 1 $script set tmp $end set end [getbytes] } return [expr {$end - $tmp}] } } proc representationpoke s { set r [::tcl::unsupported::representation $s] list [lindex $r 3] [string match {*, string representation "*"} $r] } foreach noComp {0 1} { if {$noComp} { if {[info commands testevalex] eq {}} { test string-0.1.$noComp "show testevalex availability" {testevalex} {list} {} continue } interp alias {} run {} testevalex set constraints testevalex } else { interp alias {} run {} try set constraints {} } test string-1.1.$noComp {error conditions} { list [catch {run {string gorp a b}} msg] $msg } {1 {unknown or ambiguous subcommand "gorp": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-1.2.$noComp {error conditions} { list [catch {run {string}} msg] $msg } {1 {wrong # args: should be "string subcommand ?arg ...?"}} test stringComp-1.3.$noComp {error condition - undefined method during compile} { # We don't want this to complain about 'never' because it may never # be called, or string may get redefined. This must compile OK. proc foo {str i} { if {"yes" == "no"} { string never called but complains here } string index $str $i } foo abc 0 } a test string-2.1.$noComp {string compare, too few args} { list [catch {run {string compare a}} msg] $msg } {1 {wrong # args: should be "string compare ?-nocase? ?-length int? string1 string2"}} test string-2.2.$noComp {string compare, bad args} { list [catch {run {string compare a b c}} msg] $msg } {1 {bad option "a": must be -nocase or -length}} test string-2.3.$noComp {string compare, bad args} { list [catch {run {string compare -length -nocase str1 str2}} msg] $msg } {1 {expected integer but got "-nocase"}} test string-2.4.$noComp {string compare, too many args} { list [catch {run {string compare -length 10 -nocase str1 str2 str3}} msg] $msg } {1 {wrong # args: should be "string compare ?-nocase? ?-length int? string1 string2"}} test string-2.5.$noComp {string compare with length unspecified} { list [catch {run {string compare -length 10 10}} msg] $msg } {1 {wrong # args: should be "string compare ?-nocase? ?-length int? string1 string2"}} test string-2.6.$noComp {string compare} { run {string compare abcde abdef} } -1 test string-2.7.$noComp {string compare, shortest method name} { run {string co abcde ABCDE} } 1 test string-2.8.$noComp {string compare} { run {string compare abcde abcde} } 0 test string-2.9.$noComp {string compare with length} { run {string compare -length 2 abcde abxyz} } 0 test string-2.10.$noComp {string compare with special index} { list [catch {run {string compare -length end-3 abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-2.11.$noComp {string compare, unicode} { run {string compare ab\u7266 ab\u7267} } -1 test string-2.11.1.$noComp {string compare, unicode} { run {string compare \334 \u00dc} } 0 test string-2.11.2.$noComp {string compare, unicode} { run {string compare \334 \u00fc} } -1 test string-2.11.3.$noComp {string compare, unicode} { run {string compare \334\334\334\374\374 \334\334\334\334\334} } 1 test string-2.12.$noComp {string compare, high bit} { # This test will fail if the underlying comparaison # is using signed chars instead of unsigned chars. # (like SunOS's default memcmp thus the compat/memcmp.c) run {string compare "\x80" "@"} # Nb this tests works also in utf8 space because \x80 is # translated into a 2 or more bytelength but whose first byte has # the high bit set. } 1 test string-2.13.$noComp {string compare -nocase} { run {string compare -nocase abcde abdef} } -1 test string-2.13.1.$noComp {string compare -nocase} { run {string compare -nocase abcde Abdef} } -1 test string-2.14.$noComp {string compare -nocase} { run {string compare -nocase abcde ABCDE} } 0 test string-2.15.$noComp {string compare -nocase} { run {string compare -nocase abcde abcde} } 0 test string-2.15.1.$noComp {string compare -nocase} { run {string compare -nocase \334 \u00dc} } 0 test string-2.15.2.$noComp {string compare -nocase} { run {string compare -nocase \334\334\334\374\u00fc \334\334\334\334\334} } 0 test string-2.16.$noComp {string compare -nocase with length} { run {string compare -length 2 -nocase abcde Abxyz} } 0 test string-2.17.$noComp {string compare -nocase with length} { run {string compare -nocase -length 3 abcde Abxyz} } -1 test string-2.18.$noComp {string compare -nocase with length <= 0} { run {string compare -nocase -length -1 abcde AbCdEf} } -1 test string-2.19.$noComp {string compare -nocase with excessive length} { run {string compare -nocase -length 50 AbCdEf abcde} } 1 test string-2.20.$noComp {string compare -len unicode} { # These are strings that are 6 BYTELENGTH long, but the length # shouldn't make a different because there are actually 3 CHARS long run {string compare -len 5 \334\334\334 \334\334\374} } -1 test string-2.21.$noComp {string compare -nocase with special index} { list [catch {run {string compare -nocase -length end-3 Abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-2.22.$noComp {string compare, null strings} { run {string compare "" ""} } 0 test string-2.23.$noComp {string compare, null strings} { run {string compare "" foo} } -1 test string-2.24.$noComp {string compare, null strings} { run {string compare foo ""} } 1 test string-2.25.$noComp {string compare -nocase, null strings} { run {string compare -nocase "" ""} } 0 test string-2.26.$noComp {string compare -nocase, null strings} { run {string compare -nocase "" foo} } -1 test string-2.27.$noComp {string compare -nocase, null strings} { run {string compare -nocase foo ""} } 1 test string-2.28.$noComp {string compare with length, unequal strings} { run {string compare -length 2 abc abde} } 0 test string-2.29.$noComp {string compare with length, unequal strings} { run {string compare -length 2 ab abde} } 0 test string-2.30.$noComp {string compare with NUL character vs. other ASCII} { # Be careful here, since UTF-8 rep comparison with memcmp() of # these puts chars in the wrong order run {string compare \x00 \x01} } -1 test string-2.31.$noComp {string compare, high bit} { run {string compare "a\x80" "a@"} } 1 test string-2.32.$noComp {string compare, high bit} { run {string compare "a\x00" "a\x01"} } -1 test string-2.33.$noComp {string compare, high bit} { run {string compare "\x00\x00" "\x00\x01"} } -1 test string-2.34.$noComp {string compare, binary equal} { run {string compare [binary format a100 0] [binary format a100 0]} } 0 test string-2.35.$noComp {string compare, binary neq} { run {string compare [binary format a100a 0 1] [binary format a100a 0 0]} } 1 test string-2.36.$noComp {string compare, binary neq unequal length} { run {string compare [binary format a20a 0 1] [binary format a100a 0 0]} } 1 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output test string-3.1.$noComp {string equal} { run {string equal abcde abdef} } 0 test string-3.2.$noComp {string equal} { run {string e abcde ABCDE} } 0 test string-3.3.$noComp {string equal} { run {string equal abcde abcde} } 1 test string-3.4.$noComp {string equal -nocase} { run {string equal -nocase \334\334\334\334\374\374\374\374 \334\334\334\334\334\334\334\334} } 1 test string-3.5.$noComp {string equal -nocase} { run {string equal -nocase abcde abdef} } 0 test string-3.6.$noComp {string equal -nocase} { run {string eq -nocase abcde ABCDE} } 1 test string-3.7.$noComp {string equal -nocase} { run {string equal -nocase abcde abcde} } 1 test string-3.8.$noComp {string equal with length, unequal strings} { run {string equal -length 2 abc abde} } 1 test string-3.9.$noComp {string equal, too few args} { list [catch {run {string equal a}} msg] $msg } {1 {wrong # args: should be "string equal ?-nocase? ?-length int? string1 string2"}} test string-3.10.$noComp {string equal, bad args} { list [catch {run {string equal a b c}} msg] $msg } {1 {bad option "a": must be -nocase or -length}} test string-3.11.$noComp {string equal, bad args} { list [catch {run {string equal -length -nocase str1 str2}} msg] $msg } {1 {expected integer but got "-nocase"}} test string-3.12.$noComp {string equal, too many args} { list [catch {run {string equal -length 10 -nocase str1 str2 str3}} msg] $msg } {1 {wrong # args: should be "string equal ?-nocase? ?-length int? string1 string2"}} test string-3.13.$noComp {string equal with length unspecified} { list [catch {run {string equal -length 10 10}} msg] $msg } {1 {wrong # args: should be "string equal ?-nocase? ?-length int? string1 string2"}} test string-3.14.$noComp {string equal with length} { run {string equal -length 2 abcde abxyz} } 1 test string-3.15.$noComp {string equal with special index} { list [catch {run {string equal -length end-3 abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-3.16.$noComp {string equal, unicode} { run {string equal ab\u7266 ab\u7267} } 0 test string-3.17.$noComp {string equal, unicode} { run {string equal \334 \u00dc} } 1 test string-3.18.$noComp {string equal, unicode} { run {string equal \334 \u00fc} } 0 test string-3.19.$noComp {string equal, unicode} { run {string equal \334\334\334\374\374 \334\334\334\334\334} } 0 test string-3.20.$noComp {string equal, high bit} { # This test will fail if the underlying comparaison # is using signed chars instead of unsigned chars. # (like SunOS's default memcmp thus the compat/memcmp.c) run {string equal "\x80" "@"} # Nb this tests works also in utf8 space because \x80 is # translated into a 2 or more bytelength but whose first byte has # the high bit set. } 0 test string-3.21.$noComp {string equal -nocase} { run {string equal -nocase abcde Abdef} } 0 test string-3.22.$noComp {string equal, -nocase unicode} { run {string equal -nocase \334 \u00dc} } 1 test string-3.23.$noComp {string equal, -nocase unicode} { run {string equal -nocase \334\334\334\374\u00fc \334\334\334\334\334} } 1 test string-3.24.$noComp {string equal -nocase with length} { run {string equal -length 2 -nocase abcde Abxyz} } 1 test string-3.25.$noComp {string equal -nocase with length} { run {string equal -nocase -length 3 abcde Abxyz} } 0 test string-3.26.$noComp {string equal -nocase with length <= 0} { run {string equal -nocase -length -1 abcde AbCdEf} } 0 test string-3.27.$noComp {string equal -nocase with excessive length} { run {string equal -nocase -length 50 AbCdEf abcde} } 0 test string-3.28.$noComp {string equal -len unicode} { # These are strings that are 6 BYTELENGTH long, but the length # shouldn't make a different because there are actually 3 CHARS long run {string equal -len 5 \334\334\334 \334\334\374} } 0 test string-3.29.$noComp {string equal -nocase with special index} { list [catch {run {string equal -nocase -length end-3 Abcde abxyz}} msg] $msg } {1 {expected integer but got "end-3"}} test string-3.30.$noComp {string equal, null strings} { run {string equal "" ""} } 1 test string-3.31.$noComp {string equal, null strings} { run {string equal "" foo} } 0 test string-3.32.$noComp {string equal, null strings} { run {string equal foo ""} } 0 test string-3.33.$noComp {string equal -nocase, null strings} { run {string equal -nocase "" ""} } 1 test string-3.34.$noComp {string equal -nocase, null strings} { run {string equal -nocase "" foo} } 0 test string-3.35.$noComp {string equal -nocase, null strings} { run {string equal -nocase foo ""} } 0 test string-3.36.$noComp {string equal with NUL character vs. other ASCII} { # Be careful here, since UTF-8 rep comparison with memcmp() of # these puts chars in the wrong order run {string equal \x00 \x01} } 0 test string-3.37.$noComp {string equal, high bit} { run {string equal "a\x80" "a@"} } 0 test string-3.38.$noComp {string equal, high bit} { run {string equal "a\x00" "a\x01"} } 0 test string-3.39.$noComp {string equal, high bit} { run {string equal "a\x00\x00" "a\x00\x01"} } 0 test string-3.40.$noComp {string equal, binary equal} { run {string equal [binary format a100 0] [binary format a100 0]} } 1 test string-3.41.$noComp {string equal, binary neq} { run {string equal [binary format a100a 0 1] [binary format a100a 0 0]} } 0 test string-3.42.$noComp {string equal, binary neq inequal length} { run {string equal [binary format a20a 0 1] [binary format a100a 0 0]} } 0 test string-4.1.$noComp {string first, too few args} { list [catch {run {string first a}} msg] $msg } {1 {wrong # args: should be "string first needleString haystackString ?startIndex?"}} test string-4.2.$noComp {string first, bad args} { list [catch {run {string first a b c}} msg] $msg } {1 {bad index "c": must be integer?[+-]integer? or end?[+-]integer?}} test string-4.3.$noComp {string first, too many args} { list [catch {run {string first a b 5 d}} msg] $msg } {1 {wrong # args: should be "string first needleString haystackString ?startIndex?"}} test string-4.4.$noComp {string first} { run {string first bq abcdefgbcefgbqrs} } 12 test string-4.5.$noComp {string first} { run {string fir bcd abcdefgbcefgbqrs} } 1 test string-4.6.$noComp {string first} { run {string f b abcdefgbcefgbqrs} } 1 test string-4.7.$noComp {string first} { run {string first xxx x123xx345xxx789xxx012} } 9 test string-4.8.$noComp {string first} { run {string first "" x123xx345xxx789xxx012} } -1 test string-4.9.$noComp {string first, unicode} { run {string first x abc\u7266x} } 4 test string-4.10.$noComp {string first, unicode} { run {string first \u7266 abc\u7266x} } 3 test string-4.11.$noComp {string first, start index} { run {string first \u7266 abc\u7266x 3} } 3 test string-4.12.$noComp {string first, start index} { run {string first \u7266 abc\u7266x 4} } -1 test string-4.13.$noComp {string first, start index} { run {string first \u7266 abc\u7266x end-2} } 3 test string-4.14.$noComp {string first, negative start index} { run {string first b abc -1} } 1 test string-4.15.$noComp {string first, ability to two-byte encoded utf-8 chars} { # Test for a bug in Tcl 8.3 where test for all-single-byte-encoded # strings was incorrect, leading to an index returned by [string first] # which pointed past the end of the string. set uchar \u057e ;# character with two-byte encoding in utf-8 run {string first % %#$uchar$uchar#$uchar$uchar#% 3} } 8 test string-4.16.$noComp {string first, normal string vs pure unicode string} { set s hello regexp ll $s m # Representation checks are canaries run {list [representationpoke $s] [representationpoke $m] \ [string first $m $s]} } {{string 1} {string 0} 2} test string-5.1.$noComp {string index} { list [catch {run {string index}} msg] $msg } {1 {wrong # args: should be "string index string charIndex"}} test string-5.2.$noComp {string index} { list [catch {run {string index a b c}} msg] $msg } {1 {wrong # args: should be "string index string charIndex"}} test string-5.3.$noComp {string index} { run {string index abcde 0} } a test string-5.4.$noComp {string index} { run {string ind abcde 4} } e test string-5.5.$noComp {string index} { run {string index abcde 5} } {} test string-5.6.$noComp {string index} { list [catch {run {string index abcde -10}} msg] $msg } {0 {}} test string-5.7.$noComp {string index} { list [catch {run {string index a xyz}} msg] $msg } {1 {bad index "xyz": must be integer?[+-]integer? or end?[+-]integer?}} test string-5.8.$noComp {string index} { run {string index abc end} } c test string-5.9.$noComp {string index} { run {string index abc end-1} } b test string-5.10.$noComp {string index, unicode} { run {string index abc\u7266d 4} } d test string-5.11.$noComp {string index, unicode} { run {string index abc\u7266d 3} } \u7266 test string-5.12.$noComp {string index, unicode over char length, under byte length} { run {string index \334\374\334\374 6} } {} test string-5.13.$noComp {string index, bytearray object} { run {string index [binary format a5 fuz] 0} } f test string-5.14.$noComp {string index, bytearray object} { run {string index [binary format I* {0x50515253 0x52}] 3} } S test string-5.15.$noComp {string index, bytearray object} { set b [binary format I* {0x50515253 0x52}] set i1 [run {string index $b end-6}] set i2 [run {string index $b 1}] run {string compare $i1 $i2} } 0 test string-5.16.$noComp {string index, bytearray object with string obj shimmering} { set str "0123456789\x00 abcdedfghi" binary scan $str H* dump run {string compare [run {string index $str 10}] \x00} } 0 test string-5.17.$noComp {string index, bad integer} -body { list [catch {run {string index "abc" 0o8}} msg] $msg } -match glob -result {1 {*}} test string-5.18.$noComp {string index, bad integer} -body { list [catch {run {string index "abc" end-0o0289}} msg] $msg } -match glob -result {1 {*}} test string-5.19.$noComp {string index, bytearray object out of bounds} { run {string index [binary format I* {0x50515253 0x52}] -1} } {} test string-5.20.$noComp {string index, bytearray object out of bounds} { run {string index [binary format I* {0x50515253 0x52}] 20} } {} proc largest_int {} { # This will give us what the largest valid int on this machine is, # so we can test for overflow properly below on >32 bit systems set int 1 set exp 7; # assume we get at least 8 bits while {wide($int) > 0} { set int [expr {wide(1) << [incr exp]}] } return [expr {$int-1}] } test string-6.1.$noComp {string is, too few args} { list [catch {run {string is}} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} test string-6.2.$noComp {string is, too few args} { list [catch {run {string is alpha}} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} test string-6.3.$noComp {string is, bad args} { list [catch {run {string is alpha -failin str}} msg] $msg } {1 {wrong # args: should be "string is alpha ?-strict? ?-failindex var? str"}} test string-6.4.$noComp {string is, too many args} { list [catch {run {string is alpha -failin var -strict str more}} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} test string-6.5.$noComp {string is, class check} { list [catch {run {string is bogus str}} msg] $msg } {1 {bad class "bogus": must be alnum, alpha, ascii, control, boolean, digit, double, entier, false, graph, integer, list, lower, print, punct, space, true, upper, wideinteger, wordchar, or xdigit}} test string-6.6.$noComp {string is, ambiguous class} { list [catch {run {string is al str}} msg] $msg } {1 {ambiguous class "al": must be alnum, alpha, ascii, control, boolean, digit, double, entier, false, graph, integer, list, lower, print, punct, space, true, upper, wideinteger, wordchar, or xdigit}} test string-6.7.$noComp {string is alpha, all ok} { run {string is alpha -strict -failindex var abc} } 1 test string-6.8.$noComp {string is, error in var} { list [run {string is alpha -failindex var abc5def}] $var } {0 3} test string-6.9.$noComp {string is, var shouldn't get set} { catch {unset var} list [catch {run {string is alpha -failindex var abc; set var}} msg] $msg } {1 {can't read "var": no such variable}} test string-6.10.$noComp {string is, ok on empty} { run {string is alpha {}} } 1 test string-6.11.$noComp {string is, -strict check against empty} { run {string is alpha -strict {}} } 0 test string-6.12.$noComp {string is alnum, true} { run {string is alnum abc123} } 1 test string-6.13.$noComp {string is alnum, false} { list [run {string is alnum -failindex var abc1.23}] $var } {0 4} test string-6.14.$noComp {string is alnum, unicode} "run {string is alnum abc\xfc}" 1 test string-6.15.$noComp {string is alpha, true} { run {string is alpha abc} } 1 test string-6.16.$noComp {string is alpha, false} { list [run {string is alpha -fail var a1bcde}] $var } {0 1} test string-6.17.$noComp {string is alpha, unicode} { run {string is alpha abc\374} } 1 test string-6.18.$noComp {string is ascii, true} { run {string is ascii abc\u007Fend\u0000} } 1 test string-6.19.$noComp {string is ascii, false} { list [run {string is ascii -fail var abc\u0000def\u0080more}] $var } {0 7} test string-6.20.$noComp {string is boolean, true} { run {string is boolean true} } 1 test string-6.21.$noComp {string is boolean, true} { run {string is boolean f} } 1 test string-6.22.$noComp {string is boolean, true based on type} { run {string is bool [run {string compare a a}]} } 1 test string-6.23.$noComp {string is boolean, false} { list [run {string is bool -fail var yada}] $var } {0 0} test string-6.24.$noComp {string is digit, true} { run {string is digit 0123456789} } 1 test string-6.25.$noComp {string is digit, false} { list [run {string is digit -fail var 0123\u00dc567}] $var } {0 4} test string-6.26.$noComp {string is digit, false} { list [run {string is digit -fail var +123567}] $var } {0 0} test string-6.27.$noComp {string is double, true} { run {string is double 1} } 1 test string-6.28.$noComp {string is double, true} { run {string is double [expr double(1)]} } 1 test string-6.29.$noComp {string is double, true} { run {string is double 1.0} } 1 test string-6.30.$noComp {string is double, true} { run {string is double [run {string compare a a}]} } 1 test string-6.31.$noComp {string is double, true} { run {string is double " +1.0e-1 "} } 1 test string-6.32.$noComp {string is double, true} { run {string is double "\n1.0\v"} } 1 test string-6.33.$noComp {string is double, false} { list [run {string is double -fail var 1abc}] $var } {0 1} test string-6.34.$noComp {string is double, false} { list [run {string is double -fail var abc}] $var } {0 0} test string-6.35.$noComp {string is double, false} { list [run {string is double -fail var " 1.0e4e4 "}] $var } {0 8} test string-6.36.$noComp {string is double, false} { list [run {string is double -fail var "\n"}] $var } {0 0} test string-6.37.$noComp {string is double, false on int overflow} -setup { set var priorValue } -body { # Make it the largest int recognizable, with one more digit for overflow # Since bignums arrived in Tcl 8.5, the sense of this test changed. # Now integer values that exceed native limits become bignums, and # bignums can convert to doubles without error. list [run {string is double -fail var [largest_int]0}] $var } -result {1 priorValue} # string-6.38 removed, underflow on input is no longer an error. test string-6.39.$noComp {string is double, false} { # This test is non-portable because IRIX thinks # that .e1 is a valid double - this is really a bug # on IRIX as .e1 should NOT be a valid double # # Portable now. Tcl 8.5 does its own double parsing. list [run {string is double -fail var .e1}] $var } {0 0} test string-6.40.$noComp {string is false, true} { run {string is false false} } 1 test string-6.41.$noComp {string is false, true} { run {string is false FaLsE} } 1 test string-6.42.$noComp {string is false, true} { run {string is false N} } 1 test string-6.43.$noComp {string is false, true} { run {string is false 0} } 1 test string-6.44.$noComp {string is false, true} { run {string is false off} } 1 test string-6.45.$noComp {string is false, false} { list [run {string is false -fail var abc}] $var } {0 0} test string-6.46.$noComp {string is false, false} { catch {unset var} list [run {string is false -fail var Y}] $var } {0 0} test string-6.47.$noComp {string is false, false} { catch {unset var} list [run {string is false -fail var offensive}] $var } {0 0} test string-6.48.$noComp {string is integer, true} { run {string is integer +1234567890} } 1 test string-6.49.$noComp {string is integer, true on type} { run {string is integer [expr int(50.0)]} } 1 test string-6.50.$noComp {string is integer, true} { run {string is integer [list -10]} } 1 test string-6.51.$noComp {string is integer, true as hex} { run {string is integer 0xabcdef} } 1 test string-6.52.$noComp {string is integer, true as octal} { run {string is integer 012345} } 1 test string-6.53.$noComp {string is integer, true with whitespace} { run {string is integer " \n1234\v"} } 1 test string-6.54.$noComp {string is integer, false} { list [run {string is integer -fail var 123abc}] $var } {0 3} test string-6.55.$noComp {string is integer, false on overflow} { list [run {string is integer -fail var +[largest_int]0}] $var } {0 -1} test string-6.56.$noComp {string is integer, false} { list [run {string is integer -fail var [expr double(1)]}] $var } {0 1} test string-6.57.$noComp {string is integer, false} { list [run {string is integer -fail var " "}] $var } {0 0} test string-6.58.$noComp {string is integer, false on bad octal} { list [run {string is integer -fail var 0o36963}] $var } {0 4} test string-6.58.1.$noComp {string is integer, false on bad octal} { list [run {string is integer -fail var 0o36963}] $var } {0 4} test string-6.59.$noComp {string is integer, false on bad hex} { list [run {string is integer -fail var 0X345XYZ}] $var } {0 5} test string-6.60.$noComp {string is lower, true} { run {string is lower abc} } 1 test string-6.61.$noComp {string is lower, unicode true} { run {string is lower abc\u00fcue} } 1 test string-6.62.$noComp {string is lower, false} { list [run {string is lower -fail var aBc}] $var } {0 1} test string-6.63.$noComp {string is lower, false} { list [run {string is lower -fail var abc1}] $var } {0 3} test string-6.64.$noComp {string is lower, unicode false} { list [run {string is lower -fail var ab\u00dcUE}] $var } {0 2} test string-6.65.$noComp {string is space, true} { run {string is space " \t\n\v\f"} } 1 test string-6.66.$noComp {string is space, false} { list [run {string is space -fail var " \t\n\v1\f"}] $var } {0 4} test string-6.67.$noComp {string is true, true} { run {string is true true} } 1 test string-6.68.$noComp {string is true, true} { run {string is true TrU} } 1 test string-6.69.$noComp {string is true, true} { run {string is true ye} } 1 test string-6.70.$noComp {string is true, true} { run {string is true 1} } 1 test string-6.71.$noComp {string is true, true} { run {string is true on} } 1 test string-6.72.$noComp {string is true, false} { list [run {string is true -fail var onto}] $var } {0 0} test string-6.73.$noComp {string is true, false} { catch {unset var} list [run {string is true -fail var 25}] $var } {0 0} test string-6.74.$noComp {string is true, false} { catch {unset var} list [run {string is true -fail var no}] $var } {0 0} test string-6.75.$noComp {string is upper, true} { run {string is upper ABC} } 1 test string-6.76.$noComp {string is upper, unicode true} { run {string is upper ABC\u00dcUE} } 1 test string-6.77.$noComp {string is upper, false} { list [run {string is upper -fail var AbC}] $var } {0 1} test string-6.78.$noComp {string is upper, false} { list [run {string is upper -fail var AB2C}] $var } {0 2} test string-6.79.$noComp {string is upper, unicode false} { list [run {string is upper -fail var ABC\u00fcue}] $var } {0 3} test string-6.80.$noComp {string is wordchar, true} { run {string is wordchar abc_123} } 1 test string-6.81.$noComp {string is wordchar, unicode true} { run {string is wordchar abc\u00fcab\u00dcAB\u5001} } 1 test string-6.82.$noComp {string is wordchar, false} { list [run {string is wordchar -fail var abcd.ef}] $var } {0 4} test string-6.83.$noComp {string is wordchar, unicode false} { list [run {string is wordchar -fail var abc\u0080def}] $var } {0 3} test string-6.84.$noComp {string is control} { ## Control chars are in the ranges ## 00..1F && 7F..9F list [run {string is control -fail var \x00\x01\x10\x1F\x7F\x80\x9F\x60}] $var } {0 7} test string-6.85.$noComp {string is control} { run {string is control \u0100} } 0 test string-6.86.$noComp {string is graph} { ## graph is any print char, except space list [run {string is gra -fail var "0123abc!@#\$\u0100\UE0100\UE01EF "}] $var } {0 14} test string-6.87.$noComp {string is print} { ## basically any printable char list [run {string is print -fail var "0123abc!@#\$\u0100 \UE0100\UE01EF\u0010"}] $var } {0 15} test string-6.88.$noComp {string is punct} { ## any graph char that isn't alnum list [run {string is punct -fail var "_!@#\u00beq0"}] $var } {0 4} test string-6.89.$noComp {string is xdigit} { list [run {string is xdigit -fail var 0123456789\u0061bcdefABCDEFg}] $var } {0 22} test string-6.90.$noComp {string is integer, bad integers} { # SF bug #634856 set result "" set numbers [list 1 +1 ++1 +-1 -+1 -1 --1 "- +1"] foreach num $numbers { lappend result [run {string is int -strict $num}] } return $result } {1 1 0 0 0 1 0 0} test string-6.91.$noComp {string is double, bad doubles} { set result "" set numbers [list 1.0 +1.0 ++1.0 +-1.0 -+1.0 -1.0 --1.0 "- +1.0"] foreach num $numbers { lappend result [run {string is double -strict $num}] } return $result } {1 1 0 0 0 1 0 0} test string-6.92.$noComp {string is integer, 32-bit overflow} { # Bug 718878 set x 0x100000000 list [run {string is integer -failindex var $x}] $var } {0 -1} test string-6.93.$noComp {string is integer, 32-bit overflow} { # Bug 718878 set x 0x100000000 append x "" list [run {string is integer -failindex var $x}] $var } {0 -1} test string-6.94.$noComp {string is integer, 32-bit overflow} { # Bug 718878 set x 0x100000000 list [run {string is integer -failindex var [expr {$x}]}] $var } {0 -1} test string-6.95.$noComp {string is wideinteger, true} { run {string is wideinteger +1234567890} } 1 test string-6.96.$noComp {string is wideinteger, true on type} { run {string is wideinteger [expr wide(50.0)]} } 1 test string-6.97.$noComp {string is wideinteger, true} { run {string is wideinteger [list -10]} } 1 test string-6.98.$noComp {string is wideinteger, true as hex} { run {string is wideinteger 0xabcdef} } 1 test string-6.99.$noComp {string is wideinteger, true as octal} { run {string is wideinteger 0123456} } 1 test string-6.100.$noComp {string is wideinteger, true with whitespace} { run {string is wideinteger " \n1234\v"} } 1 test string-6.101.$noComp {string is wideinteger, false} { list [run {string is wideinteger -fail var 123abc}] $var } {0 3} test string-6.102.$noComp {string is wideinteger, false on overflow} { list [run {string is wideinteger -fail var +[largest_int]0}] $var } {0 -1} test string-6.103.$noComp {string is wideinteger, false} { list [run {string is wideinteger -fail var [expr double(1)]}] $var } {0 1} test string-6.104.$noComp {string is wideinteger, false} { list [run {string is wideinteger -fail var " "}] $var } {0 0} test string-6.105.$noComp {string is wideinteger, false on bad octal} { list [run {string is wideinteger -fail var 0o36963}] $var } {0 4} test string-6.105.1.$noComp {string is wideinteger, false on bad octal} { list [run {string is wideinteger -fail var 0o36963}] $var } {0 4} test string-6.106.$noComp {string is wideinteger, false on bad hex} { list [run {string is wideinteger -fail var 0X345XYZ}] $var } {0 5} test string-6.107.$noComp {string is integer, bad integers} { # SF bug #634856 set result "" set numbers [list 1 +1 ++1 +-1 -+1 -1 --1 "- +1"] foreach num $numbers { lappend result [run {string is wideinteger -strict $num}] } return $result } {1 1 0 0 0 1 0 0} test string-6.108.$noComp {string is double, Bug 1382287} { set x 2turtledoves run {string is double $x} run {string is double $x} } 0 test string-6.109.$noComp {string is double, Bug 1360532} { run {string is double 1\u00a0} } 0 test string-6.110.$noComp {string is entier, true} { run {string is entier +1234567890} } 1 test string-6.111.$noComp {string is entier, true on type} { run {string is entier [expr wide(50.0)]} } 1 test string-6.112.$noComp {string is entier, true} { run {string is entier [list -10]} } 1 test string-6.113.$noComp {string is entier, true as hex} { run {string is entier 0xabcdef} } 1 test string-6.114.$noComp {string is entier, true as octal} { run {string is entier 0123456} } 1 test string-6.115.$noComp {string is entier, true with whitespace} { run {string is entier " \n1234\v"} } 1 test string-6.116.$noComp {string is entier, false} { list [run {string is entier -fail var 123abc}] $var } {0 3} test string-6.117.$noComp {string is entier, false} { list [run {string is entier -fail var 123123123123123123123123123123123123123123123123123123123123123123123123123123123123abc}] $var } {0 84} test string-6.118.$noComp {string is entier, false} { list [run {string is entier -fail var [expr double(1)]}] $var } {0 1} test string-6.119.$noComp {string is entier, false} { list [run {string is entier -fail var " "}] $var } {0 0} test string-6.120.$noComp {string is entier, false on bad octal} { list [run {string is entier -fail var 0o36963}] $var } {0 4} test string-6.121.1.$noComp {string is entier, false on bad octal} { list [run {string is entier -fail var 0o36963}] $var } {0 4} test string-6.122.$noComp {string is entier, false on bad hex} { list [run {string is entier -fail var 0X345XYZ}] $var } {0 5} test string-6.123.$noComp {string is entier, bad integers} { # SF bug #634856 set result "" set numbers [list 1 +1 ++1 +-1 -+1 -1 --1 "- +1"] foreach num $numbers { lappend result [run {string is entier -strict $num}] } return $result } {1 1 0 0 0 1 0 0} test string-6.124.$noComp {string is entier, true} { run {string is entier +1234567890123456789012345678901234567890} } 1 test string-6.125.$noComp {string is entier, true} { run {string is entier [list -10000000000000000000000000000000000000000000000000000000000000000000000000000000000000]} } 1 test string-6.126.$noComp {string is entier, true as hex} { run {string is entier 0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef} } 1 test string-6.127.$noComp {string is entier, true as octal} { run {string is entier 0123456112341234561234565623456123456123456123456123456123456123456123456123456123456} } 1 test string-6.128.$noComp {string is entier, true with whitespace} { run {string is entier " \n12340000000000000000000000000000000000000000000000000000000000000000000000000000000000000\v"} } 1 test string-6.129.$noComp {string is entier, false on bad octal} { list [run {string is entier -fail var 0o1234561123412345612345656234561234561234561234561234561234561234561234561234561234536963}] $var } {0 87} test string-6.130.1.$noComp {string is entier, false on bad octal} { list [run {string is entier -fail var 0o1234561123412345612345656234561234561234561234561234561234561234561234561234561234536963}] $var } {0 87} test string-6.131.$noComp {string is entier, false on bad hex} { list [run {string is entier -fail var 0X12345611234123456123456562345612345612345612345612345612345612345612345612345612345345XYZ}] $var } {0 88} catch {rename largest_int {}} test string-7.1.$noComp {string last, too few args} { list [catch {run {string last a}} msg] $msg } {1 {wrong # args: should be "string last needleString haystackString ?lastIndex?"}} test string-7.2.$noComp {string last, bad args} { list [catch {run {string last a b c}} msg] $msg } {1 {bad index "c": must be integer?[+-]integer? or end?[+-]integer?}} test string-7.3.$noComp {string last, too many args} { list [catch {run {string last a b c d}} msg] $msg } {1 {wrong # args: should be "string last needleString haystackString ?lastIndex?"}} test string-7.4.$noComp {string last} { run {string la xxx xxxx123xx345x678} } 1 test string-7.5.$noComp {string last} { run {string last xx xxxx123xx345x678} } 7 test string-7.6.$noComp {string last} { run {string las x xxxx123xx345x678} } 12 test string-7.7.$noComp {string last, unicode} { run {string las x xxxx12\u7266xx345x678} } 12 test string-7.8.$noComp {string last, unicode} { run {string las \u7266 xxxx12\u7266xx345x678} } 6 test string-7.9.$noComp {string last, stop index} { run {string las \u7266 xxxx12\u7266xx345x678} } 6 test string-7.10.$noComp {string last, unicode} { run {string las \u7266 xxxx12\u7266xx345x678} } 6 test string-7.11.$noComp {string last, start index} { run {string last \u7266 abc\u7266x 3} } 3 test string-7.12.$noComp {string last, start index} { run {string last \u7266 abc\u7266x 2} } -1 test string-7.13.$noComp {string last, start index} { ## Constrain to last 'a' should work run {string last ba badbad end-1} } 3 test string-7.14.$noComp {string last, start index} { ## Constrain to last 'b' should skip last 'ba' run {string last ba badbad end-2} } 0 test string-7.15.$noComp {string last, start index} { run {string last \334a \334ad\334ad 0} } -1 test string-7.16.$noComp {string last, start index} { run {string last \334a \334ad\334ad end-1} } 3 test string-8.1.$noComp {string bytelength} { list [catch {run {string bytelength}} msg] $msg } {1 {wrong # args: should be "string bytelength string"}} test string-8.2.$noComp {string bytelength} { list [catch {run {string bytelength a b}} msg] $msg } {1 {wrong # args: should be "string bytelength string"}} test string-8.3.$noComp {string bytelength} { run {string bytelength "\u00c7"} } 2 test string-8.4.$noComp {string bytelength} { run {string b ""} } 0 test string-9.1.$noComp {string length} { list [catch {run {string length}} msg] $msg } {1 {wrong # args: should be "string length string"}} test string-9.2.$noComp {string length} { list [catch {run {string length a b}} msg] $msg } {1 {wrong # args: should be "string length string"}} test string-9.3.$noComp {string length} { run {string length "a little string"} } 15 test string-9.4.$noComp {string length} { run {string le ""} } 0 test string-9.5.$noComp {string length, unicode} { run {string le "abcd\u7266"} } 5 test string-9.6.$noComp {string length, bytearray object} { run {string length [binary format a5 foo]} } 5 test string-9.7.$noComp {string length, bytearray object} { run {string length [binary format I* {0x50515253 0x52}]} } 8 test string-10.1.$noComp {string map, too few args} { list [catch {run {string map}} msg] $msg } {1 {wrong # args: should be "string map ?-nocase? charMap string"}} test string-10.2.$noComp {string map, bad args} { list [catch {run {string map {a b} abba oops}} msg] $msg } {1 {bad option "a b": must be -nocase}} test string-10.3.$noComp {string map, too many args} { list [catch {run {string map -nocase {a b} str1 str2}} msg] $msg } {1 {wrong # args: should be "string map ?-nocase? charMap string"}} test string-10.4.$noComp {string map} { run {string map {a b} abba} } {bbbb} test string-10.5.$noComp {string map} { run {string map {a b} a} } {b} test string-10.6.$noComp {string map -nocase} { run {string map -nocase {a b} Abba} } {bbbb} test string-10.7.$noComp {string map} { run {string map {abc 321 ab * a A} aabcabaababcab} } {A321*A*321*} test string-10.8.$noComp {string map -nocase} { run {string map -nocase {aBc 321 Ab * a A} aabcabaababcab} } {A321*A*321*} test string-10.9.$noComp {string map -nocase} { run {string map -no {abc 321 Ab * a A} aAbCaBaAbAbcAb} } {A321*A*321*} test string-10.10.$noComp {string map} { list [catch {run {string map {a b c} abba}} msg] $msg } {1 {char map list unbalanced}} test string-10.11.$noComp {string map, nulls} { run {string map {\x00 NULL blah \x00nix} {qwerty}} } {qwerty} test string-10.12.$noComp {string map, unicode} { run {string map [list \374 ue UE \334] "a\374ueUE\000EU"} } aueue\334\0EU test string-10.13.$noComp {string map, -nocase unicode} { run {string map -nocase [list \374 ue UE \334] "a\374ueUE\000EU"} } aue\334\334\0EU test string-10.14.$noComp {string map, -nocase null arguments} { run {string map -nocase {{} abc} foo} } foo test string-10.15.$noComp {string map, one pair case} { run {string map -nocase {abc 32} aAbCaBaAbAbcAb} } {a32aBaAb32Ab} test string-10.16.$noComp {string map, one pair case} { run {string map -nocase {ab 4321} aAbCaBaAbAbcAb} } {a4321C4321a43214321c4321} test string-10.17.$noComp {string map, one pair case} { run {string map {Ab 4321} aAbCaBaAbAbcAb} } {a4321CaBa43214321c4321} test string-10.18.$noComp {string map, empty argument} { run {string map -nocase {{} abc} foo} } foo test string-10.19.$noComp {string map, empty arguments} { run {string map -nocase {{} abc f bar {} def} foo} } baroo test string-10.20.$noComp {string map, dictionaries don't alter map ordering} { set map {aa X a Y} list [run {string map [dict create aa X a Y] aaa}] [run {string map $map aaa}] [dict size $map] [run {string map $map aaa}] } {XY XY 2 XY} test string-10.20.1.$noComp {string map, dictionaries don't alter map ordering} { set map {a X b Y a Z} list [run {string map [dict create a X b Y a Z] aaa}] [run {string map $map aaa}] [dict size $map] [run {string map $map aaa}] } {ZZZ XXX 2 XXX} test string-10.21.$noComp {string map, ABR checks} { run {string map {longstring foob} long} } long test string-10.22.$noComp {string map, ABR checks} { run {string map {long foob} long} } foob test string-10.23.$noComp {string map, ABR checks} { run {string map {lon foob} long} } foobg test string-10.24.$noComp {string map, ABR checks} { run {string map {lon foob} longlo} } foobglo test string-10.25.$noComp {string map, ABR checks} { run {string map {lon foob} longlon} } foobgfoob test string-10.26.$noComp {string map, ABR checks} { run {string map {longstring foob longstring bar} long} } long test string-10.27.$noComp {string map, ABR checks} { run {string map {long foob longstring bar} long} } foob test string-10.28.$noComp {string map, ABR checks} { run {string map {lon foob longstring bar} long} } foobg test string-10.29.$noComp {string map, ABR checks} { run {string map {lon foob longstring bar} longlo} } foobglo test string-10.30.$noComp {string map, ABR checks} { run {string map {lon foob longstring bar} longlon} } foobgfoob test string-10.31.$noComp {string map, nasty sharing crash from [Bug 1018562]} { set a {a b} run {string map $a $a} } {b b} test string-11.1.$noComp {string match, too few args} { list [catch {run {string match a}} msg] $msg } {1 {wrong # args: should be "string match ?-nocase? pattern string"}} test string-11.2.$noComp {string match, too many args} { list [catch {run {string match a b c d}} msg] $msg } {1 {wrong # args: should be "string match ?-nocase? pattern string"}} test string-11.3.$noComp {string match} { run {string match abc abc} } 1 test string-11.4.$noComp {string match} { run {string mat abc abd} } 0 test string-11.5.$noComp {string match} { run {string match ab*c abc} } 1 test string-11.6.$noComp {string match} { run {string match ab**c abc} } 1 test string-11.7.$noComp {string match} { run {string match ab* abcdef} } 1 test string-11.8.$noComp {string match} { run {string match *c abc} } 1 test string-11.9.$noComp {string match} { run {string match *3*6*9 0123456789} } 1 test string-11.9.1.$noComp {string match} { run {string match *3*6*89 0123456789} } 1 test string-11.9.2.$noComp {string match} { run {string match *3*456*89 0123456789} } 1 test string-11.9.3.$noComp {string match} { run {string match *3*6* 0123456789} } 1 test string-11.9.4.$noComp {string match} { run {string match *3*56* 0123456789} } 1 test string-11.9.5.$noComp {string match} { run {string match *3*456*** 0123456789} } 1 test string-11.9.6.$noComp {string match} { run {string match **3*456** 0123456789} } 1 test string-11.9.7.$noComp {string match} { run {string match *3***456* 0123456789} } 1 test string-11.9.8.$noComp {string match} { run {string match *3***\[456]* 0123456789} } 1 test string-11.9.9.$noComp {string match} { run {string match *3***\[4-6]* 0123456789} } 1 test string-11.9.10.$noComp {string match} { run {string match *3***\[4-6] 0123456789} } 0 test string-11.9.11.$noComp {string match} { run {string match *3***\[4-6] 0123456} } 1 test string-11.10.$noComp {string match} { run {string match *3*6*9 01234567890} } 0 test string-11.10.1.$noComp {string match} { run {string match *3*6*89 01234567890} } 0 test string-11.10.2.$noComp {string match} { run {string match *3*456*89 01234567890} } 0 test string-11.10.3.$noComp {string match} { run {string match **3*456*89 01234567890} } 0 test string-11.10.4.$noComp {string match} { run {string match *3*456***89 01234567890} } 0 test string-11.11.$noComp {string match} { run {string match a?c abc} } 1 test string-11.12.$noComp {string match} { run {string match a??c abc} } 0 test string-11.13.$noComp {string match} { run {string match ?1??4???8? 0123456789} } 1 test string-11.14.$noComp {string match} { run {string match {[abc]bc} abc} } 1 test string-11.15.$noComp {string match} { run {string match {a[abc]c} abc} } 1 test string-11.16.$noComp {string match} { run {string match {a[xyz]c} abc} } 0 test string-11.17.$noComp {string match} { run {string match {12[2-7]45} 12345} } 1 test string-11.18.$noComp {string match} { run {string match {12[ab2-4cd]45} 12345} } 1 test string-11.19.$noComp {string match} { run {string match {12[ab2-4cd]45} 12b45} } 1 test string-11.20.$noComp {string match} { run {string match {12[ab2-4cd]45} 12d45} } 1 test string-11.21.$noComp {string match} { run {string match {12[ab2-4cd]45} 12145} } 0 test string-11.22.$noComp {string match} { run {string match {12[ab2-4cd]45} 12545} } 0 test string-11.23.$noComp {string match} { run {string match {a\*b} a*b} } 1 test string-11.24.$noComp {string match} { run {string match {a\*b} ab} } 0 test string-11.25.$noComp {string match} { run {string match {a\*\?\[\]\\\x} "a*?\[\]\\x"} } 1 test string-11.26.$noComp {string match} { run {string match ** ""} } 1 test string-11.27.$noComp {string match} { run {string match *. ""} } 0 test string-11.28.$noComp {string match} { run {string match "" ""} } 1 test string-11.29.$noComp {string match} { run {string match \[a a} } 1 test string-11.30.$noComp {string match, bad args} { list [catch {run {string match - b c}} msg] $msg } {1 {bad option "-": must be -nocase}} test string-11.31.$noComp {string match case} { run {string match a A} } 0 test string-11.32.$noComp {string match nocase} { run {string match -n a A} } 1 test string-11.33.$noComp {string match nocase} { run {string match -nocase a\334 A\374} } 1 test string-11.34.$noComp {string match nocase} { run {string match -nocase a*f ABCDEf} } 1 test string-11.35.$noComp {string match case, false hope} { # This is true because '_' lies between the A-Z and a-z ranges run {string match {[A-z]} _} } 1 test string-11.36.$noComp {string match nocase range} { # This is false because although '_' lies between the A-Z and a-z ranges, # we lower case the end points before checking the ranges. run {string match -nocase {[A-z]} _} } 0 test string-11.37.$noComp {string match nocase} { run {string match -nocase {[A-fh-Z]} g} } 0 test string-11.38.$noComp {string match case, reverse range} { run {string match {[A-fh-Z]} g} } 1 test string-11.39.$noComp {string match, *\ case} { run {string match {*\abc} abc} } 1 test string-11.39.1.$noComp {string match, *\ case} { run {string match {*ab\c} abc} } 1 test string-11.39.2.$noComp {string match, *\ case} { run {string match {*ab\*} ab*} } 1 test string-11.39.3.$noComp {string match, *\ case} { run {string match {*ab\*} abc} } 0 test string-11.39.4.$noComp {string match, *\ case} { run {string match {*ab\\*} {ab\c}} } 1 test string-11.39.5.$noComp {string match, *\ case} { run {string match {*ab\\*} {ab\*}} } 1 test string-11.40.$noComp {string match, *special case} { run {string match {*[ab]} abc} } 0 test string-11.41.$noComp {string match, *special case} { run {string match {*[ab]*} abc} } 1 test string-11.42.$noComp {string match, *special case} { run {string match "*\\" "\\"} } 0 test string-11.43.$noComp {string match, *special case} { run {string match "*\\\\" "\\"} } 1 test string-11.44.$noComp {string match, *special case} { run {string match "*???" "12345"} } 1 test string-11.45.$noComp {string match, *special case} { run {string match "*???" "12"} } 0 test string-11.46.$noComp {string match, *special case} { run {string match "*\\*" "abc*"} } 1 test string-11.47.$noComp {string match, *special case} { run {string match "*\\*" "*"} } 1 test string-11.48.$noComp {string match, *special case} { run {string match "*\\*" "*abc"} } 0 test string-11.49.$noComp {string match, *special case} { run {string match "?\\*" "a*"} } 1 test string-11.50.$noComp {string match, *special case} { run {string match "\\" "\\"} } 0 test string-11.51.$noComp {string match; *, -nocase and UTF-8} { run {string match -nocase [binary format I 717316707] \ [binary format I 2028036707]} } 1 test string-11.52.$noComp {string match, null char in string} { set out "" set ptn "*abc*" foreach elem [list "\u0000@abc" "@abc" "\u0000@abc\u0000" "blahabcblah"] { lappend out [run {string match $ptn $elem}] } set out } {1 1 1 1} test string-11.53.$noComp {string match, null char in pattern} { set out "" foreach {ptn elem} [list \ "*\u0000abc\u0000" "\u0000abc\u0000" \ "*\u0000abc\u0000" "\u0000abc\u0000ef" \ "*\u0000abc\u0000*" "\u0000abc\u0000ef" \ "*\u0000abc\u0000" "@\u0000abc\u0000ef" \ "*\u0000abc\u0000*" "@\u0000abc\u0000ef" \ ] { lappend out [run {string match $ptn $elem}] } set out } {1 0 1 0 1} test string-11.54.$noComp {string match, failure} { set longString "" for {set i 0} {$i < 10} {incr i} { append longString "abcdefghijklmnopqrstuvwxy\u0000z01234567890123" } run {string first $longString 123} list [run {string match *cba* $longString}] \ [run {string match *a*l*\u0000* $longString}] \ [run {string match *a*l*\u0000*123 $longString}] \ [run {string match *a*l*\u0000*123* $longString}] \ [run {string match *a*l*\u0000*cba* $longString}] \ [run {string match *===* $longString}] } {0 1 1 1 0 0} test string-11.55.$noComp {string match, invalid binary optimization} { [format string] match \u0141 [binary format c 65] } 0 test stringComp-12.1.0.$noComp {Bug 3588366: end-offsets before start} { apply {s { string range $s 0 end-5 }} 12345 } {} test string-12.1.$noComp {string range} { list [catch {run {string range}} msg] $msg } {1 {wrong # args: should be "string range string first last"}} test string-12.2.$noComp {string range} { list [catch {run {string range a 1}} msg] $msg } {1 {wrong # args: should be "string range string first last"}} test string-12.3.$noComp {string range} { list [catch {run {string range a 1 2 3}} msg] $msg } {1 {wrong # args: should be "string range string first last"}} test string-12.4.$noComp {string range} { run {string range abcdefghijklmnop 2 14} } {cdefghijklmno} test string-12.5.$noComp {string range, last > length} { run {string range abcdefghijklmnop 7 1000} } {hijklmnop} test string-12.6.$noComp {string range} { run {string range abcdefghijklmnop 10 end} } {klmnop} test string-12.7.$noComp {string range, last < first} { run {string range abcdefghijklmnop 10 9} } {} test string-12.8.$noComp {string range, first < 0} { run {string range abcdefghijklmnop -3 2} } {abc} test string-12.9.$noComp {string range} { run {string range abcdefghijklmnop -3 -2} } {} test string-12.10.$noComp {string range} { run {string range abcdefghijklmnop 1000 1010} } {} test string-12.11.$noComp {string range} { run {string range abcdefghijklmnop -100 end} } {abcdefghijklmnop} test string-12.12.$noComp {string range} { list [catch {run {string range abc abc 1}} msg] $msg } {1 {bad index "abc": must be integer?[+-]integer? or end?[+-]integer?}} test string-12.13.$noComp {string range} { list [catch {run {string range abc 1 eof}} msg] $msg } {1 {bad index "eof": must be integer?[+-]integer? or end?[+-]integer?}} test string-12.14.$noComp {string range} { run {string range abcdefghijklmnop end-1 end} } {op} test string-12.15.$noComp {string range} { run {string range abcdefghijklmnop end 1000} } {p} test string-12.16.$noComp {string range} { run {string range abcdefghijklmnop end end-1} } {} test string-12.17.$noComp {string range, unicode} { run {string range ab\u7266cdefghijklmnop 5 5} } e test string-12.18.$noComp {string range, unicode} { run {string range ab\u7266cdefghijklmnop 2 3} } \u7266c test string-12.19.$noComp {string range, bytearray object} { set b [binary format I* {0x50515253 0x52}] set r1 [run {string range $b 1 end-1}] set r2 [run {string range $b 1 6}] run {string equal $r1 $r2} } 1 test string-12.20.$noComp {string range, out of bounds indices} { run {string range \u00ff 0 1} } \u00ff # Bug 1410553 test string-12.21.$noComp {string range, regenerates correct reps, bug 1410553} { set bytes "\x00 \x03 \x41" set rxBuffer {} foreach ch $bytes { append rxBuffer $ch if {$ch eq "\x03"} { run {string length $rxBuffer} } } set rxCRC [run {string range $rxBuffer end-1 end}] binary scan [join $bytes {}] "H*" input_hex binary scan $rxBuffer "H*" rxBuffer_hex binary scan $rxCRC "H*" rxCRC_hex list $input_hex $rxBuffer_hex $rxCRC_hex } {000341 000341 0341} test string-12.22.$noComp {string range, shimmering binary/index} { set s 0000000001 binary scan $s a* x run {string range $s $s end} } 000000001 test string-12.23.$noComp {string range, surrogates, bug [11ae2be95dac9417]} fullutf { run {list [string range a\U100000b 1 1] [string range a\U100000b 2 2] [string range a\U100000b 3 3]} } [list \U100000 {} b] test string-13.1.$noComp {string repeat} { list [catch {run {string repeat}} msg] $msg } {1 {wrong # args: should be "string repeat string count"}} test string-13.2.$noComp {string repeat} { list [catch {run {string repeat abc 10 oops}} msg] $msg } {1 {wrong # args: should be "string repeat string count"}} test string-13.3.$noComp {string repeat} { run {string repeat {} 100} } {} test string-13.4.$noComp {string repeat} { run {string repeat { } 5} } { } test string-13.5.$noComp {string repeat} { run {string repeat abc 3} } {abcabcabc} test string-13.6.$noComp {string repeat} { run {string repeat abc -1} } {} test string-13.7.$noComp {string repeat} { list [catch {run {string repeat abc end}} msg] $msg } {1 {expected integer but got "end"}} test string-13.8.$noComp {string repeat} { run {string repeat {} -1000} } {} test string-13.9.$noComp {string repeat} { run {string repeat {} 0} } {} test string-13.10.$noComp {string repeat} { run {string repeat def 0} } {} test string-13.11.$noComp {string repeat} { run {string repeat def 1} } def test string-13.12.$noComp {string repeat} { run {string repeat ab\u7266cd 3} } ab\u7266cdab\u7266cdab\u7266cd test string-13.13.$noComp {string repeat} { run {string repeat \x00 3} } \x00\x00\x00 test string-13.14.$noComp {string repeat} { # The string range will ensure us that string repeat gets a unicode string run {string repeat [run {string range ab\u7266cd 2 3}] 3} } \u7266c\u7266c\u7266c test string-14.1.$noComp {string replace} { list [catch {run {string replace}} msg] $msg } {1 {wrong # args: should be "string replace string first last ?string?"}} test string-14.2.$noComp {string replace} { list [catch {run {string replace a 1}} msg] $msg } {1 {wrong # args: should be "string replace string first last ?string?"}} test string-14.3.$noComp {string replace} { list [catch {run {string replace a 1 2 3 4}} msg] $msg } {1 {wrong # args: should be "string replace string first last ?string?"}} test string-14.4.$noComp {string replace} { } {} test string-14.5.$noComp {string replace} { run {string replace abcdefghijklmnop 2 14} } {abp} test string-14.6.$noComp {string replace} { run {string replace abcdefghijklmnop 7 1000} } {abcdefg} test string-14.7.$noComp {string replace} { run {string replace abcdefghijklmnop 10 end} } {abcdefghij} test string-14.8.$noComp {string replace} { run {string replace abcdefghijklmnop 10 9} } {abcdefghijklmnop} test string-14.9.$noComp {string replace} { run {string replace abcdefghijklmnop -3 2} } {defghijklmnop} test string-14.10.$noComp {string replace} { run {string replace abcdefghijklmnop -3 -2} } {abcdefghijklmnop} test string-14.11.$noComp {string replace} { run {string replace abcdefghijklmnop 1000 1010} } {abcdefghijklmnop} test string-14.12.$noComp {string replace} { run {string replace abcdefghijklmnop -100 end} } {} test string-14.13.$noComp {string replace} { list [catch {run {string replace abc abc 1}} msg] $msg } {1 {bad index "abc": must be integer?[+-]integer? or end?[+-]integer?}} test string-14.14.$noComp {string replace} { list [catch {run {string replace abc 1 eof}} msg] $msg } {1 {bad index "eof": must be integer?[+-]integer? or end?[+-]integer?}} test string-14.15.$noComp {string replace} { run {string replace abcdefghijklmnop end-10 end-2 NEW} } {abcdeNEWop} test string-14.16.$noComp {string replace} { run {string replace abcdefghijklmnop 0 end foo} } {foo} test string-14.17.$noComp {string replace} { run {string replace abcdefghijklmnop end end-1} } {abcdefghijklmnop} test string-14.18.$noComp {string replace} { run {string replace abcdefghijklmnop 10 9 XXX} } {abcdefghijklmnop} test string-14.19.$noComp {string replace} { run {string replace {} -1 0 A} } A test string-14.20.$noComp {string replace} { run {string replace [makeByteArray abcdefghijklmnop] end-10 end-2\ [makeByteArray NEW]} } {abcdeNEWop} test stringComp-14.21.$noComp {Bug 82e7f67325} { apply {x { set a [join $x {}] lappend b [string length [string replace ___! 0 2 $a]] lappend b [string length [string replace ___! 0 2 $a[unset a]]] }} {a b} } {3 3} test stringComp-14.22.$noComp {Bug 82e7f67325} memory { # As in stringComp-14.1, but make sure we don't retain too many refs leaktest { apply {x { set a [join $x {}] lappend b [string length [string replace ___! 0 2 $a]] lappend b [string length [string replace ___! 0 2 $a[unset a]]] }} {a b} } } {0} test stringComp-14.23.$noComp {Bug 0dca3bfa8f} { apply {arg { set argCopy $arg set arg [string replace $arg 1 2 aa] # Crashes in comparison before fix expr {$arg ne $argCopy} }} abcde } 1 test stringComp-14.24.$noComp {Bug 1af8de570511} { apply {{x y} { # Generate an unshared string value set val "" for { set i 0 } { $i < $x } { incr i } { set val [format "0%s" $val] } string replace $val[unset val] 1 1 $y }} 4 x } 0x00 test stringComp-14.25.$noComp {} { string length [string replace [string repeat a\u00fe 2] 3 end {}] } 3 test string-15.1.$noComp {string tolower too few args} { list [catch {run {string tolower}} msg] $msg } {1 {wrong # args: should be "string tolower string ?first? ?last?"}} test string-15.2.$noComp {string tolower bad args} { list [catch {run {string tolower a b}} msg] $msg } {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}} test string-15.3.$noComp {string tolower too many args} { list [catch {run {string tolower ABC 1 end oops}} msg] $msg } {1 {wrong # args: should be "string tolower string ?first? ?last?"}} test string-15.4.$noComp {string tolower} { run {string tolower ABCDeF} } {abcdef} test string-15.5.$noComp {string tolower} { run {string tolower "ABC XyZ"} } {abc xyz} test string-15.6.$noComp {string tolower} { run {string tolower {123#$&*()}} } {123#$&*()} test string-15.7.$noComp {string tolower} { run {string tolower ABC 1} } AbC test string-15.8.$noComp {string tolower} { run {string tolower ABC 1 end} } Abc test string-15.9.$noComp {string tolower} { run {string tolower ABC 0 end-1} } abC test string-15.10.$noComp {string tolower, unicode} { run {string tolower ABCabc\xc7\xe7} } "abcabc\xe7\xe7" test string-15.11.$noComp {string tolower, compiled} { lindex [run {string tolower [list A B [list C]]}] 1 } b test string-16.1.$noComp {string toupper} { list [catch {run {string toupper}} msg] $msg } {1 {wrong # args: should be "string toupper string ?first? ?last?"}} test string-16.2.$noComp {string toupper} { list [catch {run {string toupper a b}} msg] $msg } {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}} test string-16.3.$noComp {string toupper} { list [catch {run {string toupper a 1 end oops}} msg] $msg } {1 {wrong # args: should be "string toupper string ?first? ?last?"}} test string-16.4.$noComp {string toupper} { run {string toupper abCDEf} } {ABCDEF} test string-16.5.$noComp {string toupper} { run {string toupper "abc xYz"} } {ABC XYZ} test string-16.6.$noComp {string toupper} { run {string toupper {123#$&*()}} } {123#$&*()} test string-16.7.$noComp {string toupper} { run {string toupper abc 1} } aBc test string-16.8.$noComp {string toupper} { run {string toupper abc 1 end} } aBC test string-16.9.$noComp {string toupper} { run {string toupper abc 0 end-1} } ABc test string-16.10.$noComp {string toupper, unicode} { run {string toupper ABCabc\xc7\xe7} } "ABCABC\xc7\xc7" test string-16.11.$noComp {string toupper, compiled} { lindex [run {string toupper [list a b [list c]]}] 1 } B test string-17.1.$noComp {string totitle} { list [catch {run {string totitle}} msg] $msg } {1 {wrong # args: should be "string totitle string ?first? ?last?"}} test string-17.2.$noComp {string totitle} { list [catch {run {string totitle a b}} msg] $msg } {1 {bad index "b": must be integer?[+-]integer? or end?[+-]integer?}} test string-17.3.$noComp {string totitle} { run {string totitle abCDEf} } {Abcdef} test string-17.4.$noComp {string totitle} { run {string totitle "abc xYz"} } {Abc xyz} test string-17.5.$noComp {string totitle} { run {string totitle {123#$&*()}} } {123#$&*()} test string-17.6.$noComp {string totitle, unicode} { run {string totitle ABCabc\xc7\xe7} } "Abcabc\xe7\xe7" test string-17.7.$noComp {string totitle, unicode} { run {string totitle \u01f3BCabc\xc7\xe7} } "\u01f2bcabc\xe7\xe7" test string-17.8.$noComp {string totitle, compiled} { lindex [run {string totitle [list aa bb [list cc]]}] 0 } Aa test string-18.1.$noComp {string trim} { list [catch {run {string trim}} msg] $msg } {1 {wrong # args: should be "string trim string ?chars?"}} test string-18.2.$noComp {string trim} { list [catch {run {string trim a b c}} msg] $msg } {1 {wrong # args: should be "string trim string ?chars?"}} test string-18.3.$noComp {string trim} { run {string trim " XYZ "} } {XYZ} test string-18.4.$noComp {string trim} { run {string trim "\t\nXYZ\t\n\r\n"} } {XYZ} test string-18.5.$noComp {string trim} { run {string trim " A XYZ A "} } {A XYZ A} test string-18.6.$noComp {string trim} { run {string trim "XXYYZZABC XXYYZZ" ZYX} } {ABC } test string-18.7.$noComp {string trim} { run {string trim " \t\r "} } {} test string-18.8.$noComp {string trim} { run {string trim {abcdefg} {}} } {abcdefg} test string-18.9.$noComp {string trim} { run {string trim {}} } {} test string-18.10.$noComp {string trim} { run {string trim ABC DEF} } {ABC} test string-18.11.$noComp {string trim, unicode} { run {string trim "\xe7\xe8 AB\xe7C \xe8\xe7" \xe7\xe8} } " AB\xe7C " test string-18.12.$noComp {string trim, unicode default} { run {string trim \ufeff\x00\u0085\u00a0\u1680\u180eABC\u1361\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000} } ABC\u1361 test string-19.1.$noComp {string trimleft} { list [catch {run {string trimleft}} msg] $msg } {1 {wrong # args: should be "string trimleft string ?chars?"}} test string-19.2.$noComp {string trimleft} { run {string trimleft " XYZ "} } {XYZ } test string-19.3.$noComp {string trimleft, unicode default} { run {string trimleft \ufeff\u0085\u00a0\x00\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000\u1361ABC} } \u1361ABC test string-20.1.$noComp {string trimright errors} { list [catch {run {string trimright}} msg] $msg } {1 {wrong # args: should be "string trimright string ?chars?"}} test string-20.2.$noComp {string trimright errors} { list [catch {run {string trimg a}} msg] $msg } {1 {unknown or ambiguous subcommand "trimg": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-20.3.$noComp {string trimright} { run {string trimright " XYZ "} } { XYZ} test string-20.4.$noComp {string trimright} { run {string trimright " "} } {} test string-20.5.$noComp {string trimright} { run {string trimright ""} } {} test string-20.6.$noComp {string trimright, unicode default} { run {string trimright ABC\u1361\u0085\x00\u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u202f\u205f\u3000} } ABC\u1361 test string-21.1.$noComp {string wordend} { list [catch {run {string wordend a}} msg] $msg } {1 {wrong # args: should be "string wordend string index"}} test string-21.2.$noComp {string wordend} { list [catch {run {string wordend a b c}} msg] $msg } {1 {wrong # args: should be "string wordend string index"}} test string-21.3.$noComp {string wordend} { list [catch {run {string wordend a gorp}} msg] $msg } {1 {bad index "gorp": must be integer?[+-]integer? or end?[+-]integer?}} test string-21.4.$noComp {string wordend} { run {string wordend abc. -1} } 3 test string-21.5.$noComp {string wordend} { run {string wordend abc. 100} } 4 test string-21.6.$noComp {string wordend} { run {string wordend "word_one two three" 2} } 8 test string-21.7.$noComp {string wordend} { run {string wordend "one .&# three" 5} } 6 test string-21.8.$noComp {string wordend} { run {string worde "x.y" 0} } 1 test string-21.9.$noComp {string wordend} { run {string worde "x.y" end-1} } 2 test string-21.10.$noComp {string wordend, unicode} { run {string wordend "xyz\u00c7de fg" 0} } 6 test string-21.11.$noComp {string wordend, unicode} { run {string wordend "xyz\uc700de fg" 0} } 6 test string-21.12.$noComp {string wordend, unicode} { run {string wordend "xyz\u203fde fg" 0} } 6 test string-21.13.$noComp {string wordend, unicode} { run {string wordend "xyz\u2045de fg" 0} } 3 test string-21.14.$noComp {string wordend, unicode} { run {string wordend "\uc700\uc700 abc" 8} } 6 test string-22.1.$noComp {string wordstart} { list [catch {run {string word a}} msg] $msg } {1 {unknown or ambiguous subcommand "word": must be bytelength, cat, compare, equal, first, index, is, last, length, map, match, range, repeat, replace, reverse, tolower, totitle, toupper, trim, trimleft, trimright, wordend, or wordstart}} test string-22.2.$noComp {string wordstart} { list [catch {run {string wordstart a}} msg] $msg } {1 {wrong # args: should be "string wordstart string index"}} test string-22.3.$noComp {string wordstart} { list [catch {run {string wordstart a b c}} msg] $msg } {1 {wrong # args: should be "string wordstart string index"}} test string-22.4.$noComp {string wordstart} { list [catch {run {string wordstart a gorp}} msg] $msg } {1 {bad index "gorp": must be integer?[+-]integer? or end?[+-]integer?}} test string-22.5.$noComp {string wordstart} { run {string wordstart "one two three_words" 400} } 8 test string-22.6.$noComp {string wordstart} { run {string wordstart "one two three_words" 2} } 0 test string-22.7.$noComp {string wordstart} { run {string wordstart "one two three_words" -2} } 0 test string-22.8.$noComp {string wordstart} { run {string wordstart "one .*&^ three" 6} } 6 test string-22.9.$noComp {string wordstart} { run {string wordstart "one two three" 4} } 4 test string-22.10.$noComp {string wordstart} { run {string wordstart "one two three" end-5} } 7 test string-22.11.$noComp {string wordstart, unicode} { run {string wordstart "one tw\u00c7o three" 7} } 4 test string-22.12.$noComp {string wordstart, unicode} { run {string wordstart "ab\uc700\uc700 cdef ghi" 12} } 10 test string-22.13.$noComp {string wordstart, unicode} { run {string wordstart "\uc700\uc700 abc" 8} } 3 test string-23.0.$noComp {string is boolean, Bug 1187123} testindexobj { set x 5 catch {testindexobj $x foo bar soom} run {string is boolean $x} } 0 test string-23.1.$noComp {string is command with empty string} { set s "" list \ [run {string is alnum $s}] \ [run {string is alpha $s}] \ [run {string is ascii $s}] \ [run {string is control $s}] \ [run {string is boolean $s}] \ [run {string is digit $s}] \ [run {string is double $s}] \ [run {string is false $s}] \ [run {string is graph $s}] \ [run {string is integer $s}] \ [run {string is lower $s}] \ [run {string is print $s}] \ [run {string is punct $s}] \ [run {string is space $s}] \ [run {string is true $s}] \ [run {string is upper $s}] \ [run {string is wordchar $s}] \ [run {string is xdigit $s}] \ } {1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1} test string-23.2.$noComp {string is command with empty string} { set s "" list \ [run {string is alnum -strict $s}] \ [run {string is alpha -strict $s}] \ [run {string is ascii -strict $s}] \ [run {string is control -strict $s}] \ [run {string is boolean -strict $s}] \ [run {string is digit -strict $s}] \ [run {string is double -strict $s}] \ [run {string is false -strict $s}] \ [run {string is graph -strict $s}] \ [run {string is integer -strict $s}] \ [run {string is lower -strict $s}] \ [run {string is print -strict $s}] \ [run {string is punct -strict $s}] \ [run {string is space -strict $s}] \ [run {string is true -strict $s}] \ [run {string is upper -strict $s}] \ [run {string is wordchar -strict $s}] \ [run {string is xdigit -strict $s}] \ } {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} test string-24.1.$noComp {string reverse command} -body { run {string reverse} } -returnCodes error -result "wrong # args: should be \"string reverse string\"" test string-24.2.$noComp {string reverse command} -body { run {string reverse a b} } -returnCodes error -result "wrong # args: should be \"string reverse string\"" test string-24.3.$noComp {string reverse command - shared string} { set x abcde run {string reverse $x} } edcba test string-24.4.$noComp {string reverse command - unshared string} { set x abc set y de run {string reverse $x$y} } edcba test string-24.5.$noComp {string reverse command - shared unicode string} { set x abcde\ud0ad run {string reverse $x} } \ud0adedcba test string-24.6.$noComp {string reverse command - unshared string} { set x abc set y de\ud0ad run {string reverse $x$y} } \ud0adedcba test string-24.7.$noComp {string reverse command - simple case} { run {string reverse a} } a test string-24.8.$noComp {string reverse command - simple case} { run {string reverse \ud0ad} } \ud0ad test string-24.9.$noComp {string reverse command - simple case} { run {string reverse {}} } {} test string-24.10.$noComp {string reverse command - corner case} { set x \ubeef\ud0ad run {string reverse $x} } \ud0ad\ubeef test string-24.11.$noComp {string reverse command - corner case} { set x \ubeef set y \ud0ad run {string reverse $x$y} } \ud0ad\ubeef test string-24.12.$noComp {string reverse command - corner case} { set x \ubeef set y \ud0ad run {string is ascii [run {string reverse $x$y}]} } 0 test string-24.13.$noComp {string reverse command - pure Unicode string} { run {string reverse [run {string range \ubeef\ud0ad\ubeef\ud0ad\ubeef\ud0ad 1 5}]} } \ud0ad\ubeef\ud0ad\ubeef\ud0ad test string-24.14.$noComp {string reverse command - pure bytearray} { binary scan [run {string reverse [binary format H* 010203]}] H* x set x } 030201 test string-24.15.$noComp {string reverse command - pure bytearray} { binary scan [run {tcl::string::reverse [binary format H* 010203]}] H* x set x } 030201 test string-25.1.$noComp {string is list} { run {string is list {a b c}} } 1 test string-25.2.$noComp {string is list} { run {string is list "a \{b c"} } 0 test string-25.3.$noComp {string is list} { run {string is list {a {b c}d e}} } 0 test string-25.4.$noComp {string is list} { run {string is list {}} } 1 test string-25.5.$noComp {string is list} { run {string is list -strict {a b c}} } 1 test string-25.6.$noComp {string is list} { run {string is list -strict "a \{b c"} } 0 test string-25.7.$noComp {string is list} { run {string is list -strict {a {b c}d e}} } 0 test string-25.8.$noComp {string is list} { run {string is list -strict {}} } 1 test string-25.9.$noComp {string is list} { set x {} list [run {string is list -failindex x {a b c}}] $x } {1 {}} test string-25.10.$noComp {string is list} { set x {} list [run {string is list -failindex x "a \{b c"}] $x } {0 2} test string-25.11.$noComp {string is list} { set x {} list [run {string is list -failindex x {a b {b c}d e}}] $x } {0 4} test string-25.12.$noComp {string is list} { set x {} list [run {string is list -failindex x {}}] $x } {1 {}} test string-25.13.$noComp {string is list} { set x {} list [run {string is list -failindex x { {b c}d e}}] $x } {0 2} test string-25.14.$noComp {string is list} { set x {} list [run {string is list -failindex x "\uabcd {b c}d e"}] $x } {0 2} test string-26.1.$noComp {tcl::prefix, too few args} -body { tcl::prefix match a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix match ?options? table string"} test string-26.2.$noComp {tcl::prefix, bad args} -body { tcl::prefix match a b c } -returnCodes 1 -result {bad option "a": must be -error, -exact, or -message} test string-26.2.1.$noComp {tcl::prefix, empty table} -body { tcl::prefix match {} foo } -returnCodes 1 -result {bad option "foo": no valid options} test string-26.3.$noComp {tcl::prefix, bad args} -body { tcl::prefix match -error "{}x" -exact str1 str2 } -returnCodes 1 -result {list element in braces followed by "x" instead of space} test string-26.3.1.$noComp {tcl::prefix, bad args} -body { tcl::prefix match -error "x" -exact str1 str2 } -returnCodes 1 -result {error options must have an even number of elements} test string-26.3.2.$noComp {tcl::prefix, bad args} -body { tcl::prefix match -error str1 str2 } -returnCodes 1 -result {missing value for -error} test string-26.4.$noComp {tcl::prefix, bad args} -body { tcl::prefix match -message str1 str2 } -returnCodes 1 -result {missing value for -message} test string-26.5.$noComp {tcl::prefix} { tcl::prefix match {apa bepa cepa depa} cepa } cepa test string-26.6.$noComp {tcl::prefix} { tcl::prefix match {apa bepa cepa depa} be } bepa test string-26.7.$noComp {tcl::prefix} -body { tcl::prefix match -exact {apa bepa cepa depa} be } -returnCodes 1 -result {bad option "be": must be apa, bepa, cepa, or depa} test string-26.8.$noComp {tcl::prefix} -body { tcl::prefix match -message wombat {apa bepa bear depa} be } -returnCodes 1 -result {ambiguous wombat "be": must be apa, bepa, bear, or depa} test string-26.9.$noComp {tcl::prefix} -body { tcl::prefix match -error {} {apa bepa bear depa} be } -returnCodes 0 -result {} test string-26.10.$noComp {tcl::prefix} -body { tcl::prefix match -error {-level 1} {apa bepa bear depa} be } -returnCodes 2 -result {ambiguous option "be": must be apa, bepa, bear, or depa} test string-26.10.1.$noComp {tcl::prefix} -setup { proc _testprefix {args} { array set opts {-a x -b y -c y} foreach {opt val} $args { set opt [tcl::prefix match -error {-level 1} {-a -b -c} $opt] set opts($opt) $val } array get opts |
︙ | ︙ | |||
1867 1868 1869 1870 1871 1872 1873 | set end [lindex [lindex [split [memory info] "\n"] 3] 3] } lappend res [expr {$end - $tmp}] } return $res } | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | | | | | | | | | | | | | | | | | | | | | | > > > > > > > | 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 | set end [lindex [lindex [split [memory info] "\n"] 3] 3] } lappend res [expr {$end - $tmp}] } return $res } test string-26.11.$noComp {tcl::prefix: testing for leaks} -body { # This test is made to stress object reference management MemStress { set table {hejj miff gurk} set item [lindex $table 1] # If not careful, this can cause a circular reference # that will cause a leak. tcl::prefix match $table $item } { # A similar case with nested lists set table2 {hejj {miff maff} gurk} set item [lindex [lindex $table2 1] 0] tcl::prefix match $table2 $item } { # A similar case with dict set table3 {hejj {miff maff} gurk2} set item [lindex [dict keys [lindex $table3 1]] 0] tcl::prefix match $table3 $item } } -constraints memory -result {0 0 0} test string-26.12.$noComp {tcl::prefix: testing for leaks} -body { # This is a memory leak test in a form that might actually happen # in real code. The shared literal "miff" causes a connection # between the item and the table. MemStress { proc stress1 {item} { set table [list hejj miff gurk] tcl::prefix match $table $item } proc stress2 {} { stress1 miff } stress2 rename stress1 {} rename stress2 {} } } -constraints memory -result 0 test string-26.13.$noComp {tcl::prefix: testing for leaks} -body { # This test is made to stress object reference management MemStress { set table [list hejj miff] set item $table set error $table # Use the same objects in all places catch { tcl::prefix match -error $error $table $item } } } -constraints memory -result {0} test string-27.1.$noComp {tcl::prefix all, too few args} -body { tcl::prefix all a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix all table string"} test string-27.2.$noComp {tcl::prefix all, bad args} -body { tcl::prefix all a b c } -returnCodes 1 -result {wrong # args: should be "tcl::prefix all table string"} test string-27.3.$noComp {tcl::prefix all, bad args} -body { tcl::prefix all "{}x" str2 } -returnCodes 1 -result {list element in braces followed by "x" instead of space} test string-27.4.$noComp {tcl::prefix all} { tcl::prefix all {apa bepa cepa depa} c } cepa test string-27.5.$noComp {tcl::prefix all} { tcl::prefix all {apa bepa cepa depa} cepa } cepa test string-27.6.$noComp {tcl::prefix all} { tcl::prefix all {apa bepa cepa depa} cepax } {} test string-27.7.$noComp {tcl::prefix all} { tcl::prefix all {apa aska appa} a } {apa aska appa} test string-27.8.$noComp {tcl::prefix all} { tcl::prefix all {apa aska appa} ap } {apa appa} test string-27.9.$noComp {tcl::prefix all} { tcl::prefix all {apa aska appa} p } {} test string-27.10.$noComp {tcl::prefix all} { tcl::prefix all {apa aska appa} {} } {apa aska appa} test string-28.1.$noComp {tcl::prefix longest, too few args} -body { tcl::prefix longest a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix longest table string"} test string-28.2.$noComp {tcl::prefix longest, bad args} -body { tcl::prefix longest a b c } -returnCodes 1 -result {wrong # args: should be "tcl::prefix longest table string"} test string-28.3.$noComp {tcl::prefix longest, bad args} -body { tcl::prefix longest "{}x" str2 } -returnCodes 1 -result {list element in braces followed by "x" instead of space} test string-28.4.$noComp {tcl::prefix longest} { tcl::prefix longest {apa bepa cepa depa} c } cepa test string-28.5.$noComp {tcl::prefix longest} { tcl::prefix longest {apa bepa cepa depa} cepa } cepa test string-28.6.$noComp {tcl::prefix longest} { tcl::prefix longest {apa bepa cepa depa} cepax } {} test string-28.7.$noComp {tcl::prefix longest} { tcl::prefix longest {apa aska appa} a } a test string-28.8.$noComp {tcl::prefix longest} { tcl::prefix longest {apa aska appa} ap } ap test string-28.9.$noComp {tcl::prefix longest} { tcl::prefix longest {apa bska appa} a } ap test string-28.10.$noComp {tcl::prefix longest} { tcl::prefix longest {apa bska appa} {} } {} test string-28.11.$noComp {tcl::prefix longest} { tcl::prefix longest {{} bska appa} {} } {} test string-28.12.$noComp {tcl::prefix longest} { tcl::prefix longest {apa {} appa} {} } {} test string-28.13.$noComp {tcl::prefix longest} { # Test UTF8 handling tcl::prefix longest {ax\x90 bep ax\x91} a } ax test string-29.1.$noComp {string cat, no arg} { run {string cat} } "" test string-29.2.$noComp {string cat, single arg} { set x FOO run {string compare $x [run {string cat $x}]} } 0 test string-29.3.$noComp {string cat, two args} { set x FOO run {string compare $x$x [run {string cat $x $x}]} } 0 test string-29.4.$noComp {string cat, many args} { set x FOO set n 260 set xx [run {string repeat $x $n}] set vv [run {string repeat {$x} $n}] set vvs [run {string repeat {$x } $n}] set r1 [run {string compare $xx [subst $vv]}] set r2 [run {string compare $xx [eval "run {string cat $vvs}"]}] list $r1 $r2 } {0 0} if {$noComp} { test string-29.5.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list x] [list]}] } -match glob -result {*no string representation} test string-29.6.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list] [list x]}] } -match glob -result {*no string representation} test string-29.7.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list x] [list] [list]}] } -match glob -result {*no string representation} test string-29.8.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list] [list x] [list]}] } -match glob -result {*no string representation} test string-29.9.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list] [list] [list x]}] } -match glob -result {*no string representation} test string-29.10.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat [list x] [list x]}] } -match glob -result {*, string representation "xx"} test string-29.11.$noComp {string cat, efficiency} -body { tcl::unsupported::representation \ [run {string cat [list x] [encoding convertto utf-8 {}]}] } -match glob -result {*no string representation} test string-29.12.$noComp {string cat, efficiency} -body { tcl::unsupported::representation \ [run {string cat [encoding convertto utf-8 {}] [list x]}] } -match glob -result {*, string representation "x"} test string-29.13.$noComp {string cat, efficiency} -body { tcl::unsupported::representation [run {string cat \ [encoding convertto utf-8 {}] [encoding convertto utf-8 {}] [list x]}] } -match glob -result {*, string representation "x"} test string-29.14.$noComp {string cat, efficiency} -setup { set e [encoding convertto utf-8 {}] } -cleanup { unset e } -body { tcl::unsupported::representation [run {string cat $e $e [list x]}] } -match glob -result {*no string representation} test string-29.15.$noComp {string cat, efficiency} -setup { set e [encoding convertto utf-8 {}] set f [encoding convertto utf-8 {}] } -cleanup { unset e f } -body { tcl::unsupported::representation [run {string cat $e $f $e $f [list x]}] } -match glob -result {*no string representation} } } # cleanup rename MemStress {} rename makeByteArray {} rename makeUnicode {} rename makeList {} rename makeShared {} catch {rename foo {}} ::tcltest::cleanupTests return # Local Variables: # mode: tcl # End: |
Deleted tests/stringComp.test.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to unix/Makefile.in.
︙ | ︙ | |||
299 300 301 302 303 304 305 | tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o \ tclLink.o tclListObj.o \ tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o \ tclObj.o tclOptimize.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o \ tclPkg.o tclPkgConfig.o tclPosixStr.o \ | | | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 | tclEnv.o tclEvent.o tclExecute.o tclFCmd.o tclFileName.o tclGet.o \ tclHash.o tclHistory.o tclIndexObj.o tclInterp.o tclIO.o tclIOCmd.o \ tclIORChan.o tclIORTrans.o tclIOGT.o tclIOSock.o tclIOUtil.o \ tclLink.o tclListObj.o \ tclLiteral.o tclLoad.o tclMain.o tclNamesp.o tclNotify.o \ tclObj.o tclOptimize.o tclPanic.o tclParse.o tclPathObj.o tclPipe.o \ tclPkg.o tclPkgConfig.o tclPosixStr.o \ tclPreserve.o tclProc.o tclProcess.o tclRegexp.o \ tclResolve.o tclResult.o tclScan.o tclStringObj.o \ tclStrToD.o tclThread.o \ tclThreadAlloc.o tclThreadJoin.o tclThreadStorage.o tclStubInit.o \ tclTimer.o tclTrace.o tclUtf.o tclUtil.o tclVar.o tclZlib.o \ tclTomMathInterface.o OO_OBJS = tclOO.o tclOOBasic.o tclOOCall.o tclOODefineCmds.o tclOOInfo.o \ |
︙ | ︙ | |||
440 441 442 443 444 445 446 447 448 449 450 451 452 453 | $(GENERIC_DIR)/tclPathObj.c \ $(GENERIC_DIR)/tclPipe.c \ $(GENERIC_DIR)/tclPkg.c \ $(GENERIC_DIR)/tclPkgConfig.c \ $(GENERIC_DIR)/tclPosixStr.c \ $(GENERIC_DIR)/tclPreserve.c \ $(GENERIC_DIR)/tclProc.c \ $(GENERIC_DIR)/tclRegexp.c \ $(GENERIC_DIR)/tclResolve.c \ $(GENERIC_DIR)/tclResult.c \ $(GENERIC_DIR)/tclScan.c \ $(GENERIC_DIR)/tclStubInit.c \ $(GENERIC_DIR)/tclStringObj.c \ $(GENERIC_DIR)/tclStrToD.c \ | > | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | $(GENERIC_DIR)/tclPathObj.c \ $(GENERIC_DIR)/tclPipe.c \ $(GENERIC_DIR)/tclPkg.c \ $(GENERIC_DIR)/tclPkgConfig.c \ $(GENERIC_DIR)/tclPosixStr.c \ $(GENERIC_DIR)/tclPreserve.c \ $(GENERIC_DIR)/tclProc.c \ $(GENERIC_DIR)/tclProcess.c \ $(GENERIC_DIR)/tclRegexp.c \ $(GENERIC_DIR)/tclResolve.c \ $(GENERIC_DIR)/tclResult.c \ $(GENERIC_DIR)/tclScan.c \ $(GENERIC_DIR)/tclStubInit.c \ $(GENERIC_DIR)/tclStringObj.c \ $(GENERIC_DIR)/tclStrToD.c \ |
︙ | ︙ | |||
846 847 848 849 850 851 852 | @echo "Installing package http 2.8.12 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/http-2.8.12.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; | | | | 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 | @echo "Installing package http 2.8.12 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/http-2.8.12.tm; @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/"; @for i in $(TOP_DIR)/library/opt/*.tcl ; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"/opt0.4; \ done; @echo "Installing package msgcat 1.7.0 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/msgcat-1.7.0.tm; @echo "Installing package tcltest 2.4.1 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/tcltest-2.4.1.tm; @echo "Installing package platform 1.0.14 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/platform-1.0.14.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/platform/shell-1.1.4.tm; |
︙ | ︙ | |||
1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | tclPreserve.o: $(GENERIC_DIR)/tclPreserve.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPreserve.c tclProc.o: $(GENERIC_DIR)/tclProc.c $(COMPILEHDR) $(NREHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclProc.c tclRegexp.o: $(GENERIC_DIR)/tclRegexp.c $(TCLREHDRS) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclRegexp.c tclResolve.o: $(GENERIC_DIR)/tclResolve.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclResolve.c tclResult.o: $(GENERIC_DIR)/tclResult.c | > > > | 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 | tclPreserve.o: $(GENERIC_DIR)/tclPreserve.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclPreserve.c tclProc.o: $(GENERIC_DIR)/tclProc.c $(COMPILEHDR) $(NREHDR) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclProc.c tclProcess.o: $(GENERIC_DIR)/tclProcess.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclProcess.c tclRegexp.o: $(GENERIC_DIR)/tclRegexp.c $(TCLREHDRS) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclRegexp.c tclResolve.o: $(GENERIC_DIR)/tclResolve.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclResolve.c tclResult.o: $(GENERIC_DIR)/tclResult.c |
︙ | ︙ |
Changes to unix/configure.
︙ | ︙ | |||
5185 5186 5187 5188 5189 5190 5191 | SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; | | | 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 | SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; CYGWIN_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" DL_OBJS="tclLoadDl.o" PLAT_OBJS='${CYGWIN_OBJS}' PLAT_SRCS='${CYGWIN_SRCS}' DL_LIBS="-ldl" |
︙ | ︙ | |||
6460 6461 6462 6463 6464 6465 6466 | # standard manufacturer compiler. if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : case $system in AIX-*) ;; BSD/OS*) ;; | | | 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 | # standard manufacturer compiler. if test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes; then : case $system in AIX-*) ;; BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi |
︙ | ︙ |
Changes to unix/tcl.m4.
︙ | ︙ | |||
1192 1193 1194 1195 1196 1197 1198 | SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; | | | 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 | SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; CYGWIN_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" DL_OBJS="tclLoadDl.o" PLAT_OBJS='${CYGWIN_OBJS}' PLAT_SRCS='${CYGWIN_SRCS}' DL_LIBS="-ldl" |
︙ | ︙ | |||
1908 1909 1910 1911 1912 1913 1914 | # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. AS_IF([test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes], [ case $system in AIX-*) ;; BSD/OS*) ;; | | | 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 | # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. AS_IF([test "$DL_OBJS" != "tclLoadNone.o" -a "$GCC" = yes], [ case $system in AIX-*) ;; BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac]) |
︙ | ︙ |
Changes to win/Makefile.in.
︙ | ︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 | tclPathObj.$(OBJEXT) \ tclPipe.$(OBJEXT) \ tclPkg.$(OBJEXT) \ tclPkgConfig.$(OBJEXT) \ tclPosixStr.$(OBJEXT) \ tclPreserve.$(OBJEXT) \ tclProc.$(OBJEXT) \ tclRegexp.$(OBJEXT) \ tclResolve.$(OBJEXT) \ tclResult.$(OBJEXT) \ tclScan.$(OBJEXT) \ tclStringObj.$(OBJEXT) \ tclStrToD.$(OBJEXT) \ tclStubInit.$(OBJEXT) \ | > | 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | tclPathObj.$(OBJEXT) \ tclPipe.$(OBJEXT) \ tclPkg.$(OBJEXT) \ tclPkgConfig.$(OBJEXT) \ tclPosixStr.$(OBJEXT) \ tclPreserve.$(OBJEXT) \ tclProc.$(OBJEXT) \ tclProcess.$(OBJEXT) \ tclRegexp.$(OBJEXT) \ tclResolve.$(OBJEXT) \ tclResult.$(OBJEXT) \ tclScan.$(OBJEXT) \ tclStringObj.$(OBJEXT) \ tclStrToD.$(OBJEXT) \ tclStubInit.$(OBJEXT) \ |
︙ | ︙ | |||
655 656 657 658 659 660 661 | @echo "Installing package http 2.8.12 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/http-2.8.12.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ done; | | | | 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | @echo "Installing package http 2.8.12 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/http/http.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/http-2.8.12.tm; @echo "Installing library opt0.4 directory"; @for j in $(ROOT_DIR)/library/opt/*.tcl; \ do \ $(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ done; @echo "Installing package msgcat 1.7.0 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/msgcat-1.7.0.tm; @echo "Installing package tcltest 2.4.0 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/tcltest-2.4.0.tm; @echo "Installing package platform 1.0.14 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/platform-1.0.14.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/platform/shell-1.1.4.tm; @echo "Installing encodings"; |
︙ | ︙ |
Changes to win/buildall.vc.bat.
︙ | ︙ | |||
34 35 36 37 38 39 40 | if defined WINDOWSSDKDIR (goto :startBuilding) :: We need to run the development environment batch script that comes :: with developer studio (v4,5,6,7,etc...) All have it. This path :: might not be correct. You should call it yourself prior to running :: this batchfile. :: | | > > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | if defined WINDOWSSDKDIR (goto :startBuilding) :: We need to run the development environment batch script that comes :: with developer studio (v4,5,6,7,etc...) All have it. This path :: might not be correct. You should call it yourself prior to running :: this batchfile. :: REM call "C:\Program Files\Microsoft Developer Studio\vc98\bin\vcvars32.bat" set "VSCMD_START_DIR=%CD%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" if errorlevel 1 (goto no_vcvars) :startBuilding echo. echo Sit back and have a cup of coffee while this grinds through ;) echo You asked for *everything*, remember? |
︙ | ︙ |
Changes to win/makefile.vc.
︙ | ︙ | |||
214 215 216 217 218 219 220 221 222 223 224 225 226 227 | $(TMP_DIR)\tclPathObj.obj \ $(TMP_DIR)\tclPipe.obj \ $(TMP_DIR)\tclPkg.obj \ $(TMP_DIR)\tclPkgConfig.obj \ $(TMP_DIR)\tclPosixStr.obj \ $(TMP_DIR)\tclPreserve.obj \ $(TMP_DIR)\tclProc.obj \ $(TMP_DIR)\tclRegexp.obj \ $(TMP_DIR)\tclResolve.obj \ $(TMP_DIR)\tclResult.obj \ $(TMP_DIR)\tclScan.obj \ $(TMP_DIR)\tclStringObj.obj \ $(TMP_DIR)\tclStrToD.obj \ $(TMP_DIR)\tclStubInit.obj \ | > | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | $(TMP_DIR)\tclPathObj.obj \ $(TMP_DIR)\tclPipe.obj \ $(TMP_DIR)\tclPkg.obj \ $(TMP_DIR)\tclPkgConfig.obj \ $(TMP_DIR)\tclPosixStr.obj \ $(TMP_DIR)\tclPreserve.obj \ $(TMP_DIR)\tclProc.obj \ $(TMP_DIR)\tclProcess.obj \ $(TMP_DIR)\tclRegexp.obj \ $(TMP_DIR)\tclResolve.obj \ $(TMP_DIR)\tclResult.obj \ $(TMP_DIR)\tclScan.obj \ $(TMP_DIR)\tclStringObj.obj \ $(TMP_DIR)\tclStrToD.obj \ $(TMP_DIR)\tclStubInit.obj \ |
︙ | ︙ |
Changes to win/tcl.dsp.
︙ | ︙ | |||
1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 | SOURCE=..\generic\tclPreserve.c # End Source File # Begin Source File SOURCE=..\generic\tclProc.c # End Source File # Begin Source File SOURCE=..\generic\tclRegexp.c # End Source File # Begin Source File SOURCE=..\generic\tclRegexp.h # End Source File | > > > > | 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 | SOURCE=..\generic\tclPreserve.c # End Source File # Begin Source File SOURCE=..\generic\tclProc.c # End Source File # Begin Source File SOURCE=..\generic\tclProcess.c # End Source File # Begin Source File SOURCE=..\generic\tclRegexp.c # End Source File # Begin Source File SOURCE=..\generic\tclRegexp.h # End Source File |
︙ | ︙ |
Changes to win/tclWinPipe.c.
︙ | ︙ | |||
865 866 867 868 869 870 871 | { ProcInfo *infoPtr; PipeInit(); Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { | | | 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 | { ProcInfo *infoPtr; PipeInit(); Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { if (infoPtr->dwProcessId == (DWORD) pid) { Tcl_MutexUnlock(&pipeMutex); return infoPtr->dwProcessId; } } Tcl_MutexUnlock(&pipeMutex); return (unsigned long) -1; } |
︙ | ︙ | |||
1159 1160 1161 1162 1163 1164 1165 | * CreateProcess() and CloseHandle(), the problem does not occur." PSS ID * Number: Q124121 */ WaitForInputIdle(procInfo.hProcess, 5000); CloseHandle(procInfo.hThread); | | | 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | * CreateProcess() and CloseHandle(), the problem does not occur." PSS ID * Number: Q124121 */ WaitForInputIdle(procInfo.hProcess, 5000); CloseHandle(procInfo.hThread); *pidPtr = (Tcl_Pid) procInfo.dwProcessId; if (*pidPtr != 0) { TclWinAddProcess(procInfo.hProcess, procInfo.dwProcessId); } result = TCL_OK; end: Tcl_DStringFree(&cmdLine); |
︙ | ︙ | |||
2343 2344 2345 2346 2347 2348 2349 | * Find the process and cut it from the process list. */ Tcl_MutexLock(&pipeMutex); prevPtrPtr = &procList; for (infoPtr = procList; infoPtr != NULL; prevPtrPtr = &infoPtr->nextPtr, infoPtr = infoPtr->nextPtr) { | | | 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 | * Find the process and cut it from the process list. */ Tcl_MutexLock(&pipeMutex); prevPtrPtr = &procList; for (infoPtr = procList; infoPtr != NULL; prevPtrPtr = &infoPtr->nextPtr, infoPtr = infoPtr->nextPtr) { if (infoPtr->dwProcessId == (DWORD) pid) { *prevPtrPtr = infoPtr->nextPtr; break; } } Tcl_MutexUnlock(&pipeMutex); /* |
︙ | ︙ |