Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch sebres-8-5-event-perf-branch Excluding Merge-Ins
This is equivalent to a diff from 1e109808c9 to 6b4a81cdba
2022-05-31
| ||
13:25 | merge 8-5-event-perf-branch Leaf check-in: 2a854432fb user: sebres tags: sebres-8-6-event-perf-branch | |
13:22 | [windows] avoid overflow by calculation of perf-counter to 100ns as signed wide int (also fixes nega... Leaf check-in: 6b4a81cdba user: sebres tags: sebres-8-5-event-perf-branch | |
13:20 | correct comment for TclpGetUTimeMonotonic check-in: 7376838890 user: sebres tags: sebres-8-5-event-perf-branch | |
2019-03-08
| ||
04:05 | merge sebres-8-5-timerate (prepare for consolidation with 8.5) check-in: ca89c4e5a7 user: sebres tags: sebres-8-5-event-perf-branch | |
2019-03-05
| ||
16:25 | merge sebres-8-5-timerate (TIP#527 - New measurement facilities in TCL: New command timerate, perfor... check-in: 5c26638643 user: sebres tags: core-8-5-branch | |
16:13 | merge updated 8.5-timerate branch Closed-Leaf check-in: 5246d61897 user: sebres tags: sebres-8-6-timerate | |
15:46 | extended performance test-suite, since max-count is implemented in timerate, usage `::tclTestPerf::_... Closed-Leaf check-in: 1e109808c9 user: sebres tags: sebres-8-5-timerate | |
12:58 | back-porting other performance test (timer-event.perf.tcl) from event-perf-branch check-in: c3a401ee2c user: sebres tags: sebres-8-5-timerate | |
Changes to .travis.yml.
1 2 3 4 5 6 | 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 | - + - + - + - + - + - + - + - + | sudo: false language: c matrix: include: - os: linux |
︙ | |||
80 81 82 83 84 85 86 | 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 | - + - + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + - + | - NO_DIRECT_CONFIGURE=1 - os: osx osx_image: xcode9 env: - BUILD_DIR=macosx - NO_DIRECT_CONFIGURE=1 - os: osx |
Changes to doc/TraceVar.3.
︙ | |||
325 326 327 328 329 330 331 | 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + - - - + + + | The return value from \fIproc\fR is only used during read and write tracing. During unset traces, the return value is ignored and all relevant trace procedures will always be invoked. .SH "RESTRICTIONS" .PP A trace procedure can be called at any time, even when there |
︙ |
Changes to doc/timerate.n.
1 2 3 4 5 6 7 8 9 10 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 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 | - + - + - + - + + + + + + + + + + + - + - + - + - + - + - - - + - - - + - + - - - - - + + + + + + + + - + - + - + + + - + - + - + - - + - + - - - - + + + + + - - + - - - - + + + + + + + - - - + + + + + - - + + + + - + - + | '\" '\" Copyright (c) 2005 Sergey Brester aka sebres. '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH timerate n "" Tcl "Tcl Built-In Commands" .so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME |
Changes to generic/regc_locale.c.
︙ | |||
149 150 151 152 153 154 155 | 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 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + - - - - - - + + + + + + + - - + + | {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb5f, 0xb61}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa}, {0xbae, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39}, {0xc58, 0xc5a}, {0xc85, 0xc8c}, {0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9}, {0xd05, 0xd0c}, {0xd0e, 0xd10}, {0xd12, 0xd3a}, {0xd54, 0xd56}, {0xd5f, 0xd61}, {0xd7a, 0xd7f}, {0xd85, 0xd96}, {0xd9a, 0xdb1}, {0xdb3, 0xdbb}, |
︙ | |||
321 322 323 324 325 326 327 | 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | - + + | {0xa9d0, 0xa9d9}, {0xa9f0, 0xa9f9}, {0xaa50, 0xaa59}, {0xabf0, 0xabf9}, {0xff10, 0xff19} #if CHRBITS > 16 ,{0x104a0, 0x104a9}, {0x10d30, 0x10d39}, {0x11066, 0x1106f}, {0x110f0, 0x110f9}, {0x11136, 0x1113f}, {0x111d0, 0x111d9}, {0x112f0, 0x112f9}, {0x11450, 0x11459}, {0x114d0, 0x114d9}, {0x11650, 0x11659}, {0x116c0, 0x116c9}, {0x11730, 0x11739}, {0x118e0, 0x118e9}, {0x11c50, 0x11c59}, {0x11d50, 0x11d59}, {0x11da0, 0x11da9}, |
︙ | |||
344 345 346 347 348 349 350 | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | - + | {0x55a, 0x55f}, {0x66a, 0x66d}, {0x700, 0x70d}, {0x7f7, 0x7f9}, {0x830, 0x83e}, {0xf04, 0xf12}, {0xf3a, 0xf3d}, {0xfd0, 0xfd4}, {0x104a, 0x104f}, {0x1360, 0x1368}, {0x16eb, 0x16ed}, {0x17d4, 0x17d6}, {0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1aa0, 0x1aa6}, {0x1aa8, 0x1aad}, {0x1b5a, 0x1b60}, {0x1bfc, 0x1bff}, {0x1c3b, 0x1c3f}, {0x1cc0, 0x1cc7}, {0x2010, 0x2027}, {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x205e}, {0x2308, 0x230b}, {0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998}, |
︙ | |||
368 369 370 371 372 373 374 | 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 | - - + + - - + + | #define NUM_PUNCT_RANGE (sizeof(punctRangeTable)/sizeof(crange)) static const chr punctCharTable[] = { 0x3a, 0x3b, 0x3f, 0x40, 0x5f, 0x7b, 0x7d, 0xa1, 0xa7, 0xab, 0xb6, 0xb7, 0xbb, 0xbf, 0x37e, 0x387, 0x589, 0x58a, 0x5be, 0x5c0, 0x5c3, 0x5c6, 0x5f3, 0x5f4, 0x609, 0x60a, 0x60c, 0x60d, 0x61b, 0x61e, 0x61f, 0x6d4, 0x85e, 0x964, 0x965, 0x970, |
︙ | |||
420 421 422 423 424 425 426 | 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 | - + | {0x10fd, 0x10ff}, {0x13f8, 0x13fd}, {0x1c80, 0x1c88}, {0x1d00, 0x1d2b}, {0x1d6b, 0x1d77}, {0x1d79, 0x1d9a}, {0x1e95, 0x1e9d}, {0x1eff, 0x1f07}, {0x1f10, 0x1f15}, {0x1f20, 0x1f27}, {0x1f30, 0x1f37}, {0x1f40, 0x1f45}, {0x1f50, 0x1f57}, {0x1f60, 0x1f67}, {0x1f70, 0x1f7d}, {0x1f80, 0x1f87}, {0x1f90, 0x1f97}, {0x1fa0, 0x1fa7}, {0x1fb0, 0x1fb4}, {0x1fc2, 0x1fc4}, {0x1fd0, 0x1fd3}, {0x1fe0, 0x1fe7}, {0x1ff2, 0x1ff4}, {0x2146, 0x2149}, {0x2c30, 0x2c5e}, {0x2c76, 0x2c7b}, {0x2d00, 0x2d25}, {0xa72f, 0xa731}, |
︙ | |||
500 501 502 503 504 505 506 | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | - + | 0xa691, 0xa693, 0xa695, 0xa697, 0xa699, 0xa69b, 0xa723, 0xa725, 0xa727, 0xa729, 0xa72b, 0xa72d, 0xa733, 0xa735, 0xa737, 0xa739, 0xa73b, 0xa73d, 0xa73f, 0xa741, 0xa743, 0xa745, 0xa747, 0xa749, 0xa74b, 0xa74d, 0xa74f, 0xa751, 0xa753, 0xa755, 0xa757, 0xa759, 0xa75b, 0xa75d, 0xa75f, 0xa761, 0xa763, 0xa765, 0xa767, 0xa769, 0xa76b, 0xa76d, 0xa76f, 0xa77a, 0xa77c, 0xa77f, 0xa781, 0xa783, 0xa785, 0xa787, 0xa78c, 0xa78e, 0xa791, 0xa797, 0xa799, 0xa79b, 0xa79d, 0xa79f, 0xa7a1, 0xa7a3, 0xa7a5, 0xa7a7, 0xa7a9, |
︙ | |||
523 524 525 526 527 528 529 | 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | - + | {0x3d2, 0x3d4}, {0x3fd, 0x42f}, {0x531, 0x556}, {0x10a0, 0x10c5}, {0x13a0, 0x13f5}, {0x1c90, 0x1cba}, {0x1cbd, 0x1cbf}, {0x1f08, 0x1f0f}, {0x1f18, 0x1f1d}, {0x1f28, 0x1f2f}, {0x1f38, 0x1f3f}, {0x1f48, 0x1f4d}, {0x1f68, 0x1f6f}, {0x1fb8, 0x1fbb}, {0x1fc8, 0x1fcb}, {0x1fd8, 0x1fdb}, {0x1fe8, 0x1fec}, {0x1ff8, 0x1ffb}, {0x210b, 0x210d}, {0x2110, 0x2112}, {0x2119, 0x211d}, {0x212a, 0x212d}, {0x2130, 0x2133}, {0x2c00, 0x2c2e}, {0x2c62, 0x2c64}, {0x2c6d, 0x2c70}, {0x2c7e, 0x2c80}, {0xa7aa, 0xa7ae}, |
︙ | |||
602 603 604 605 606 607 608 | 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | - + | 0xa698, 0xa69a, 0xa722, 0xa724, 0xa726, 0xa728, 0xa72a, 0xa72c, 0xa72e, 0xa732, 0xa734, 0xa736, 0xa738, 0xa73a, 0xa73c, 0xa73e, 0xa740, 0xa742, 0xa744, 0xa746, 0xa748, 0xa74a, 0xa74c, 0xa74e, 0xa750, 0xa752, 0xa754, 0xa756, 0xa758, 0xa75a, 0xa75c, 0xa75e, 0xa760, 0xa762, 0xa764, 0xa766, 0xa768, 0xa76a, 0xa76c, 0xa76e, 0xa779, 0xa77b, 0xa77d, 0xa77e, 0xa780, 0xa782, 0xa784, 0xa786, 0xa78b, 0xa78d, 0xa790, 0xa792, 0xa796, 0xa798, 0xa79a, 0xa79c, 0xa79e, 0xa7a0, 0xa7a2, 0xa7a4, 0xa7a6, 0xa7a8, 0xa7b6, |
︙ | |||
636 637 638 639 640 641 642 | 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 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + | {0xae0, 0xae3}, {0xae6, 0xaf1}, {0xaf9, 0xaff}, {0xb01, 0xb03}, {0xb05, 0xb0c}, {0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb35, 0xb39}, {0xb3c, 0xb44}, {0xb4b, 0xb4d}, {0xb5f, 0xb63}, {0xb66, 0xb77}, {0xb85, 0xb8a}, {0xb8e, 0xb90}, {0xb92, 0xb95}, {0xba8, 0xbaa}, {0xbae, 0xbb9}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8}, {0xbca, 0xbcd}, {0xbe6, 0xbfa}, {0xc00, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28}, {0xc2a, 0xc39}, {0xc3d, 0xc44}, {0xc46, 0xc48}, {0xc4a, 0xc4d}, |
︙ | |||
707 708 709 710 711 712 713 | 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 | - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - - - - + + + - - - - - - - + + + + + + + | {0x10857, 0x1089e}, {0x108a7, 0x108af}, {0x108e0, 0x108f2}, {0x108fb, 0x1091b}, {0x1091f, 0x10939}, {0x10980, 0x109b7}, {0x109bc, 0x109cf}, {0x109d2, 0x10a03}, {0x10a0c, 0x10a13}, {0x10a15, 0x10a17}, {0x10a19, 0x10a35}, {0x10a38, 0x10a3a}, {0x10a3f, 0x10a48}, {0x10a50, 0x10a58}, {0x10a60, 0x10a9f}, {0x10ac0, 0x10ae6}, {0x10aeb, 0x10af6}, {0x10b00, 0x10b35}, {0x10b39, 0x10b55}, {0x10b58, 0x10b72}, {0x10b78, 0x10b91}, {0x10b99, 0x10b9c}, {0x10ba9, 0x10baf}, {0x10c00, 0x10c48}, {0x10c80, 0x10cb2}, {0x10cc0, 0x10cf2}, {0x10cfa, 0x10d27}, {0x10d30, 0x10d39}, |
︙ |
Changes to generic/tcl.h.
︙ | |||
706 707 708 709 710 711 712 713 714 715 716 717 718 719 | 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 | + | typedef int (Tcl_PackageInitProc) _ANSI_ARGS_((Tcl_Interp *interp)); typedef int (Tcl_PackageUnloadProc) _ANSI_ARGS_((Tcl_Interp *interp, int flags)); typedef void (Tcl_PanicProc) _ANSI_ARGS_((CONST char *format, ...)); typedef void (Tcl_TcpAcceptProc) _ANSI_ARGS_((ClientData callbackData, Tcl_Channel chan, char *address, int port)); typedef void (Tcl_TimerProc) _ANSI_ARGS_((ClientData clientData)); typedef void (Tcl_TimerDeleteProc) _ANSI_ARGS_((ClientData clientData)); typedef int (Tcl_SetFromAnyProc) _ANSI_ARGS_((Tcl_Interp *interp, struct Tcl_Obj *objPtr)); typedef void (Tcl_UpdateStringProc) _ANSI_ARGS_((struct Tcl_Obj *objPtr)); typedef char *(Tcl_VarTraceProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp, CONST84 char *part1, CONST84 char *part2, int flags)); typedef void (Tcl_CommandTraceProc) _ANSI_ARGS_((ClientData clientData, |
︙ | |||
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 | 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 | + | } Tcl_DictSearch; /* * Flag values to pass to Tcl_DoOneEvent to disable searches for some kinds of * events: */ #define TCL_ASYNC_EVENTS (1<<0) #define TCL_DONT_WAIT (1<<1) #define TCL_WINDOW_EVENTS (1<<2) #define TCL_FILE_EVENTS (1<<3) #define TCL_TIMER_EVENTS (1<<4) #define TCL_IDLE_EVENTS (1<<5) /* WAS 0x10 ???? */ #define TCL_ALL_EVENTS (~TCL_DONT_WAIT) |
︙ | |||
1318 1319 1320 1321 1322 1323 1324 | 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 | - + | }; /* * Positions to pass to Tcl_QueueEvent: */ typedef enum { |
︙ |
Changes to generic/tclClock.c.
︙ | |||
180 181 182 183 184 185 186 187 188 189 190 191 192 193 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | + + + | int objc, Tcl_Obj *const objv[]); static int ClockMicrosecondsObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ClockMillisecondsObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ClockMonotonicObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ClockParseformatargsObjCmd( ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj *const objv[]); static int ClockSecondsObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static struct tm * ThreadSafeLocalTime(const time_t *); |
︙ | |||
208 209 210 211 212 213 214 215 216 217 218 219 220 221 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | + | }; static const struct ClockCommand clockCommands[] = { { "clicks", ClockClicksObjCmd }, { "getenv", ClockGetenvObjCmd }, { "microseconds", ClockMicrosecondsObjCmd }, { "milliseconds", ClockMillisecondsObjCmd }, { "monotonic", ClockMonotonicObjCmd }, { "seconds", ClockSecondsObjCmd }, { "Oldscan", TclClockOldscanObjCmd }, { "ConvertLocalToUTC", ClockConvertlocaltoutcObjCmd }, { "GetDateFields", ClockGetdatefieldsObjCmd }, { "GetJulianDayFromEraYearMonthDay", ClockGetjuliandayfromerayearmonthdayObjCmd }, { "GetJulianDayFromEraYearWeekDay", |
︙ | |||
1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetMicroseconds())); return TCL_OK; } /*---------------------------------------------------------------------- * * ClockMonotonicObjCmd - * * Returns a count of microseconds since some starting point. * This represents monotonic time not affected from the time-jumps. * * Results: * Returns a standard Tcl result. * * Side effects: * None. * * This function implements the 'clock monotonic' Tcl command. Refer to the * user documentation for details on what it does. * *---------------------------------------------------------------------- */ int ClockMonotonicObjCmd( ClientData clientData, /* Client data is unused */ Tcl_Interp* interp, /* Tcl interpreter */ int objc, /* Parameter count */ Tcl_Obj* const* objv) /* Parameter values */ { if (objc != 1) { Tcl_WrongNumArgs(interp, 1, objv, NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewWideIntObj(TclpGetUTimeMonotonic())); return TCL_OK; } /* *----------------------------------------------------------------------------- * * ClockParseformatargsObjCmd -- * * Parses the arguments for [clock format]. |
︙ |
Changes to generic/tclCmdMZ.c.
︙ | |||
3952 3953 3954 3955 3956 3957 3958 | 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 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 | - - + + + - + - - + + - + - - + + + - + - - - + + - + + | /* *---------------------------------------------------------------------- * * Tcl_TimeRateObjCmd -- * * This object-based procedure is invoked to process the "timerate" Tcl |
︙ | |||
4034 4035 4036 4037 4038 4039 4040 | 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 | - - - + + + + + + + - + + + - - + + + + - - + + - + - + + - - + + + + + - - + + + + - + - + + - - + + + + + - + + + - + - + + + - - - - + + + + + + + + + - + - + - + + + + - + + + + - - + + + + - - + + - + + + + + - + + + + + + + + + + + - - - + + + + + + + + + - + + + - + + + + + - + + + - + + - - - - + + + + + + + - + + - + - - - + + - - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - + - - - + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - + + + - - - - + + + + + + + + + + + + + - + + + + - + + + + - + + + + - - + + - + + - - - + + + + + - + - - - - - - + + + + + + + + + + + + - - - + + + + + + + + - + - - - - + + + + + + + + + - + + + - + + + + - + + + + - - - + + + - + - - - - + + + + + + + | break; case TMRT_CALIBRATE: calibrate = objv[i]; break; } } |
︙ |
Changes to generic/tclEvent.c.
︙ | |||
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | TclThreadDataKeyGet(&dataKey); if (tsdPtr == NULL) { return 0; } else { return tsdPtr->inExit; } } static CONST char *updateEventOptions[] = { "-idle", "-noidle", /* new options */ "-timer", "-notimer", "-file", "-nofile", "-window", "-nowindow", "-async", "-noasync", "-nowait", "-wait", "idletasks", /* backwards compat. */ NULL }; static int GetEventFlagsFromOpts( Tcl_Interp *interp, /* Used for error reporting if not NULL. */ int objc, /* Number of arguments. */ Tcl_Obj *CONST objv[], /* Arguments containing the option to lookup. */ int *flagsPtr) /* Input and resulting flags. */ { int i, optionIndex, result = TCL_ERROR; int flags = *flagsPtr; /* default flags */ static CONST struct { int mask; int flags; } *updateFlag, updateFlags[] = { {0, TCL_IDLE_EVENTS}, {TCL_IDLE_EVENTS, 0}, /* -idle, -noidle */ {0, TCL_TIMER_EVENTS}, {TCL_TIMER_EVENTS, 0}, /* -timer, -notimer */ {0, TCL_FILE_EVENTS}, {TCL_FILE_EVENTS, 0}, /* -file, -nofile */ {0, TCL_WINDOW_EVENTS}, {TCL_WINDOW_EVENTS, 0}, /* -window, -nowindow */ {0, TCL_ASYNC_EVENTS}, {TCL_ASYNC_EVENTS, 0}, /* -async, -noasync */ {0, TCL_DONT_WAIT}, {TCL_DONT_WAIT, 0}, /* -nowait, -wait */ {TCL_ALL_EVENTS, TCL_WINDOW_EVENTS|TCL_IDLE_EVENTS}, /* idletasks */ {0, 0} /* dummy / place holder */ }; for (i = 0; i < objc; i++) { if (Tcl_GetIndexFromObj(interp, objv[i], updateEventOptions, "option", 0, &optionIndex) != TCL_OK) { goto done; } updateFlag = &updateFlags[optionIndex]; /* pure positive option and still default, * reset all events (only this flag) */ if (!updateFlag->mask && flags == *flagsPtr) { flags &= ~TCL_ALL_EVENTS; } flags &= ~updateFlag->mask; flags |= updateFlag->flags; } result = TCL_OK; done: *flagsPtr = flags; return result; } /* *---------------------------------------------------------------------- * * Tcl_VwaitObjCmd -- * * This function is invoked to process the "vwait" Tcl command. See the |
︙ | |||
1320 1321 1322 1323 1324 1325 1326 | 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 | - - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - | int Tcl_VwaitObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *CONST objv[]) /* Argument objects. */ { |
︙ | |||
1405 1406 1407 1408 1409 1410 1411 | 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 | - - + - - + - + - - - - + - - - - - - - - - - + + + | int Tcl_UpdateObjCmd( ClientData clientData, /* Not used. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *CONST objv[]) /* Argument objects. */ { |
︙ |
Changes to generic/tclHash.c.
︙ | |||
320 321 322 323 324 325 326 | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | + + - + + | for (hPtr = tablePtr->buckets[index]; hPtr != NULL; hPtr = hPtr->nextPtr) { #if TCL_HASH_KEY_STORE_HASH if (hash != PTR2UINT(hPtr->hash)) { continue; } #endif /* if keys pointers or values are equal */ if ((key == hPtr->key.oneWordValue) |
︙ |
Changes to generic/tclIO.c.
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + | */ static ChannelBuffer * AllocChannelBuffer(int length); static void PreserveChannelBuffer(ChannelBuffer *bufPtr); static void ReleaseChannelBuffer(ChannelBuffer *bufPtr); static int IsShared(ChannelBuffer *bufPtr); static void ChannelFree(Channel *chanPtr); |
︙ | |||
1586 1587 1588 1589 1590 1591 1592 | 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 | - + | statePtr->saveInBufPtr = NULL; statePtr->inQueueHead = NULL; statePtr->inQueueTail = NULL; statePtr->chPtr = NULL; statePtr->interestMask = 0; statePtr->scriptRecordPtr = NULL; statePtr->bufSize = CHANNELBUFFER_DEFAULT_SIZE; |
︙ | |||
2965 2966 2967 2968 2969 2970 2971 | 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 | - + - + + + + + + + + | errorCode = result; if (errorCode != 0) { Tcl_SetErrno(errorCode); } } /* |
︙ | |||
3447 3448 3449 3450 3451 3452 3453 | 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 | - + - + + + + + + + + | */ chanPtr = (Channel *) channel; statePtr = chanPtr->state; chanPtr = statePtr->topChanPtr; /* |
︙ | |||
4384 4385 4386 4387 4388 4389 4390 | 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 | - + | statePtr->inputEncodingState = oldState; statePtr->inputEncodingFlags = oldFlags; Tcl_SetObjLength(objPtr, oldLength); /* * We didn't get a complete line so we need to indicate to UpdateInterest * that the gets blocked. It will wait for more data instead of firing a |
︙ | |||
4665 4666 4667 4668 4669 4670 4671 | 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 | - + | statePtr->inputEncodingFlags = oldFlags; byteArray = Tcl_SetByteArrayLength(objPtr, oldLength); /* * We didn't get a complete line so we need to indicate to UpdateInterest * that the gets blocked. It will wait for more data instead of firing a |
︙ | |||
7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 | 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 | + + + + + + + + + + + + + + + - + | } Tcl_Release(statePtr); TclChannelRelease(channel); tsdPtr->nestedHandlerPtr = nh.nestedHandlerPtr; } static inline Tcl_Event * CreateChannelScheduledEvent( Channel *chanPtr) { #ifdef SYNTHETIC_EVENT_TIME Tcl_Time blckTime; blckTime.sec = SYNTHETIC_EVENT_TIME / 1000000; blckTime.usec = SYNTHETIC_EVENT_TIME % 1000000; Tcl_SetMaxBlockTime(&blckTime); #endif return TclpQueueEventClientData(ChannelScheduledProc, chanPtr, TCL_QUEUE_RETARDED); } /* *---------------------------------------------------------------------- * * UpdateInterest -- * * Arrange for the notifier to call us back at appropriate times based on * the current state of the channel. * * Results: * None. * * Side effects: |
︙ | |||
8011 8012 8013 8014 8015 8016 8017 | 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 | - + | if (GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { mask |= TCL_WRITABLE; } /* * If there is data in the input queue, and we aren't waiting for more |
︙ | |||
8040 8041 8042 8043 8044 8045 8046 | 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 | - + | * - It does not process all events in the event queue, but only * one, at least in some situations. * * In that case we can get into a situation where * * - Tcl drops READABLE here, because it has data in its own * buffers waiting to be read by the extension. |
︙ | |||
8062 8063 8064 8065 8066 8067 8068 | 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 | - + - - + - + - + - - - + + + - - - + + + + + + + + + - + + - + - - - + + + + + + - + | * Our solution here is to drop the interest in the EXCEPTION * events too. This compiles on all platforms, and also passes the * testsuite on all of them. */ mask &= ~TCL_EXCEPTION; |
︙ | |||
8565 8566 8567 8568 8569 8570 8571 | 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 | - + - + - - - + + + + + + | return TCL_OK; } /* *---------------------------------------------------------------------- * |
︙ | |||
8703 8704 8705 8706 8707 8708 8709 | 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 | - + | /* * Special handling of -size 0 async transfers, so that the -command is * still called asynchronously. */ if ((nonBlocking == CHANNEL_NONBLOCKING) && (toRead == 0)) { |
︙ |
Changes to generic/tclIO.h.
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | * this channel. */ int interestMask; /* Mask of all events this channel has * handlers for. */ EventScriptRecord *scriptRecordPtr; /* Chain of all scripts registered for event * handlers ("fileevent") on this channel. */ int bufSize; /* What size buffers to allocate? */ |
︙ |
Changes to generic/tclIndexObj.c.
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | static void FreeIndex(Tcl_Obj *objPtr); /* * The structure below defines the index Tcl object type by means of functions * that can be invoked by generic object code. */ |
︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #define STRING_AT(table, offset) \ (*((const char *const *)(((char *)(table)) + (offset)))) #define NEXT_ENTRY(table, offset) \ (&(STRING_AT(table, offset))) #define EXPAND_OF(indexRep) \ STRING_AT((indexRep)->tablePtr, (indexRep)->offset*(indexRep)->index) /* *---------------------------------------------------------------------- * * TclObjIsIndexOfStruct -- * * This function looks up an object's is a index of given table. * * Used for fast lookup by dynamic options count to check for other * object types. * * Results: * 1 if object is an option of table, otherwise 0. * * Side effects: * None. * *---------------------------------------------------------------------- */ int TclObjIsIndexOfStruct( Tcl_Obj *objPtr, /* Object containing the string to lookup. */ const void *tablePtr) /* Array of strings to compare against the * value of objPtr; last entry must be NULL * and there must not be duplicate entries. */ { IndexRep *indexRep; if (objPtr->typePtr != &tclIndexType) { return 0; } indexRep = objPtr->internalRep.twoPtrValue.ptr1; if (indexRep->tablePtr != (void *) tablePtr) { return 0; } return 1; } /* *---------------------------------------------------------------------- * * Tcl_GetIndexFromObj -- * * This function looks up an object's value in a table of strings and |
︙ | |||
101 102 103 104 105 106 107 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + | /* * See if there is a valid cached result from a previous lookup (doing the * check here saves the overhead of calling Tcl_GetIndexFromObjStruct in * the common case where the result is cached). */ |
︙ | |||
175 176 177 178 179 180 181 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | if (offset < (int)sizeof(char *)) { offset = (int)sizeof(char *); } /* * See if there is a valid cached result from a previous lookup. */ |
︙ | |||
236 237 238 239 240 241 242 | 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - + - + | done: /* * Cache the found representation. Note that we want to avoid allocating a * new internal-rep if at all possible since that is potentially a slow * operation. */ |
︙ | |||
378 379 380 381 382 383 384 | 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - + | Tcl_Obj *dupPtr) { IndexRep *srcIndexRep = srcPtr->internalRep.twoPtrValue.ptr1; IndexRep *dupIndexRep = (IndexRep *) ckalloc(sizeof(IndexRep)); memcpy(dupIndexRep, srcIndexRep, sizeof(IndexRep)); dupPtr->internalRep.twoPtrValue.ptr1 = dupIndexRep; |
︙ | |||
528 529 530 531 532 533 534 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - + | */ for (i=0 ; i<toPrint ; i++) { /* * Add the element, quoting it if necessary. */ |
︙ | |||
584 585 586 587 588 589 590 | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | - + | for (i = 0; i < objc; i++) { /* * If the object is an index type use the index table which allows for * the correct error message even if the subcommand was abbreviated. * Otherwise, just use the string rep. */ |
︙ |
Changes to generic/tclInt.h.
︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + + + + + + + + + + | #endif #if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \ || defined(__cplusplus) || defined(_MSC_VER) #include <stddef.h> #else typedef int ptrdiff_t; #endif /* * [MSVC] fallback to replace C++ keyword "inline" with C keyword "__inline" * Otherwise depending on the VC-version, context, include-order it can cause: * error C2054: expected '(' to follow 'inline' */ #if defined(_MSC_VER) && !defined(inline) # define inline __inline #endif /* * Ensure WORDS_BIGENDIAN is defined correctly: * Needs to happen here in addition to configure to work with fat compiles on * Darwin (where configure runs only once for multiple architectures). */ |
︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | # define PTR2UINT(p) ((unsigned int)(uintptr_t)(p)) # else # define UINT2PTR(p) ((void *)(p)) # define PTR2UINT(p) ((unsigned int)(p)) # endif #endif /* *---------------------------------------------------------------- * Data structures related to timer / idle events. *---------------------------------------------------------------- */ #define TCL_TMREV_PROMPT (1 << 0) /* Mark immediate event (0 microseconds) */ #define TCL_TMREV_AT (1 << 1) /* Mark timer event to execute verbatim * at the due-time (regardless any * time-jumps). */ #define TCL_TMREV_IDLE (1 << 3) /* Mark idle event */ #define TCL_TMREV_LISTED (1 << 5) /* Event listed (attached to queue). */ #define TCL_TMREV_DELETE (1 << 7) /* Event will be deleted. */ /* * This structure used for handling of timer events (with or without time to * invoke, e. g. created with "after 0") or declared in a call to Tcl_DoWhenIdle * (created with "after idle"). All of the currently-active handlers are linked * together into corresponding list. * * For each timer callback that's pending there is one record of the following * type. The normal handlers (created by Tcl_CreateTimerHandler) are chained * together in a list via TclTimerEvent sorted by time (earliest event first). */ typedef struct TclTimerEvent { Tcl_TimerProc *proc; /* Function to call timer/idle event */ Tcl_TimerDeleteProc *deleteProc; /* Function to cleanup idle event */ ClientData clientData; /* Argument to pass to proc and deleteProc */ int flags; /* Flags, OR-ed combination of flags/states * TCL_TMREV_PROMPT ... TCL_TMREV_DELETE */ Tcl_WideInt time; /* When timer is to fire (absolute/relative). */ Tcl_TimerToken token; /* Identifies handler so it can be deleted. */ size_t generation; /* Used to distinguish older handlers from * recently-created ones. */ size_t refCount; /* Used to preserve for deletion (nested exec * resp. prolongation). */ struct TclTimerEvent *nextPtr;/* Next and prev event in idle queue, */ struct TclTimerEvent *prevPtr;/* or NULL for end/start of the queue. */ /* variable ExtraData */ /* If extraDataSize supplied to create event. */ } TclTimerEvent; /* * Macros to wrap ExtraData and TclTimerEvent (and vice versa) */ #define TclpTimerEvent2ExtraData(ptr) \ ( (ClientData)(((TclTimerEvent *)(ptr))+1) ) #define TclpExtraData2TimerEvent(ptr) \ ( ((TclTimerEvent *)(ptr))-1 ) /* * The following procedures allow namespaces to be customized to support * special name resolution rules for commands/variables. */ struct Tcl_ResolvedVarInfo; |
︙ | |||
1793 1794 1795 1796 1797 1798 1799 | 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 | - - + | Tcl_Time time; /* Time limit for execution within the * interpreter. */ LimitHandler *timeHandlers; /* Handlers to execute when the limit is * reached. */ int timeGranularity; /* Mod factor used to determine how often to * evaluate the limit check. */ |
︙ | |||
1942 1943 1944 1945 1946 1947 1948 | 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 | - + + + - + - + + + + + + + + + + + + + + + + + + + + + + + | *((iPtr)->asyncReadyPtr) /* * Macros for splicing into and out of doubly linked lists. They assume * existence of struct items 'prevPtr' and 'nextPtr'. * * a = element to add or remove. |
︙ | |||
2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 | 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 | + | MODULE_SCOPE Tcl_ObjType tclBignumType; MODULE_SCOPE Tcl_ObjType tclBooleanType; MODULE_SCOPE Tcl_ObjType tclByteArrayType; MODULE_SCOPE Tcl_ObjType tclByteCodeType; MODULE_SCOPE Tcl_ObjType tclDoubleType; MODULE_SCOPE Tcl_ObjType tclEndOffsetType; MODULE_SCOPE Tcl_ObjType tclIntType; MODULE_SCOPE Tcl_ObjType tclIndexType; MODULE_SCOPE Tcl_ObjType tclListType; MODULE_SCOPE Tcl_ObjType tclDictType; MODULE_SCOPE Tcl_ObjType tclProcBodyType; MODULE_SCOPE Tcl_ObjType tclStringType; MODULE_SCOPE Tcl_ObjType tclArraySearchType; MODULE_SCOPE Tcl_ObjType tclEnsembleCmdType; #ifndef NO_WIDE_TYPE |
︙ | |||
2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 | 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 | + + + + + + + | #define TCL_DD_CONVERSION_TYPE_MASK 0x3 /* Mask to isolate the conversion type */ #define TCL_DD_STEELE0 0x1 /* 'Steele&White' after masking */ #define TCL_DD_SHORTEST0 0x0 /* 'Shortest possible' after masking */ /* *---------------------------------------------------------------- * Procedures shared among Tcl modules but not used by the outside world: *---------------------------------------------------------------- */ MODULE_SCOPE int TclObjIsIndexOfStruct(Tcl_Obj *objPtr, const void *tablePtr); #define TclObjIsIndexOfTable(objPtr, tablePtr) \ ((objPtr->typePtr == &tclIndexType) \ && TclObjIsIndexOfStruct(objPtr, tablePtr)) MODULE_SCOPE void TclAppendBytesToByteArray(Tcl_Obj *objPtr, const unsigned char *bytes, int len); MODULE_SCOPE void TclAdvanceContinuations(int* line, int** next, int loc); MODULE_SCOPE void TclAdvanceLines(int *line, const char *start, const char *end); MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp, |
︙ | |||
2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 | 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 | + + | const EnsembleImplMap map[]); MODULE_SCOPE int TclMaxListLength(CONST char *bytes, int numBytes, CONST char **endPtr); MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); MODULE_SCOPE int TclNokia770Doubles(); MODULE_SCOPE void TclNsDecrRefCount(Namespace *nsPtr); MODULE_SCOPE int TclNamespaceDeleted(Namespace *nsPtr); MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, const char *operation, const char *reason, int index); MODULE_SCOPE int TclObjInvokeNamespace(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Namespace *nsPtr, int flags); MODULE_SCOPE int TclObjUnsetVar2(Tcl_Interp *interp, |
︙ | |||
2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 | 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #else # ifdef _WIN32 # define TCL_WIDE_CLICKS 1 MODULE_SCOPE Tcl_WideInt TclpGetWideClicks(void); MODULE_SCOPE double TclpWideClickInMicrosec(void); # define TclpWideClicksToNanoseconds(clicks) \ ((double)(clicks) * TclpWideClickInMicrosec() * 1000) /* Tolerance (in percent), prevents entering busy wait, but has fewer accuracy * because can wait a bit shorter as wanted. Currently experimental value * (4.5% equivalent to 15600 / 15000 with small overhead) */ # ifndef TMR_RES_TOLERANCE # define TMR_RES_TOLERANCE 4.5 # endif # endif #endif MODULE_SCOPE Tcl_WideInt TclpGetMicroseconds(void); MODULE_SCOPE Tcl_WideInt TclpGetUTimeMonotonic(void); MODULE_SCOPE int TclpGetUTimeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideInt *timePtr, int factor); MODULE_SCOPE void TclpScaleUTime(Tcl_WideInt *usec); MODULE_SCOPE void TclpUSleep(Tcl_WideInt usec); /* * Helper macros for working with times. TCL_TIME_BEFORE encodes how to write * the ordering relation on (normalized) times, and TCL_TIME_DIFF_MS resp. * TCL_TIME_DIFF_US compute the number of milliseconds or microseconds difference * between two times. Both macros use both of their arguments multiple times, * so make sure they are cheap and side-effect free. * Macro TCL_TIME_TO_USEC converts Tcl_Time to microseconds. * The "prototypes" for these macros are: * * static int TCL_TIME_BEFORE(Tcl_Time t1, Tcl_Time t2); * static Tcl_WideInt TCL_TIME_DIFF_MS(Tcl_Time t1, Tcl_Time t2); * static Tcl_WideInt TCL_TIME_DIFF_US(Tcl_Time t1, Tcl_Time t2); * static Tcl_WideInt TCL_TIME_TO_USEC(Tcl_Time t) */ #define TCL_TIME_BEFORE(t1, t2) \ (((t1).sec<(t2).sec) || ((t1).sec==(t2).sec && (t1).usec<(t2).usec)) #define TCL_TIME_DIFF_MS(t1, t2) \ (1000*((Tcl_WideInt)(t1).sec - (Tcl_WideInt)(t2).sec) + \ ((long)(t1).usec - (long)(t2).usec)/1000) #define TCL_TIME_DIFF_US(t1, t2) \ (1000000*((Tcl_WideInt)(t1).sec - (Tcl_WideInt)(t2).sec) + \ ((long)(t1).usec - (long)(t2).usec)) #define TCL_TIME_TO_USEC(t) \ (((Tcl_WideInt)(t).sec)*1000000 + (t).usec) static inline void TclTimeSetMilliseconds( register Tcl_Time *timePtr, register double ms ) { timePtr->sec = (long)(ms / 1000); timePtr->usec = (((long)ms) % 1000) * 1000 + (((long)(ms*1000)) % 1000); } static inline void TclTimeAddMilliseconds( register Tcl_Time *timePtr, register double ms ) { timePtr->sec += (long)(ms / 1000); timePtr->usec += (((long)ms) % 1000) * 1000 + (((long)(ms*1000)) % 1000); if (timePtr->usec > 1000000) { timePtr->usec -= 1000000; timePtr->sec++; } } MODULE_SCOPE Tcl_Obj * TclDisassembleByteCodeObj(Tcl_Obj *objPtr); MODULE_SCOPE int TclUtfCasecmp(CONST char *cs, CONST char *ct); /* *---------------------------------------------------------------- * Command procedures in the generic core: |
︙ | |||
2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 | 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_ConcatObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_ContinueObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE void TclSetTimerEventMarker(int flags); MODULE_SCOPE int TclServiceTimerEvents(void); MODULE_SCOPE int TclServiceIdleEx(int flags, int count); MODULE_SCOPE void TclpCancelEvent(Tcl_Event *evPtr); static inline Tcl_Event* TclpQueueEventEx( Tcl_EventProc *proc, /* Event function to call if it servicing. */ ClientData extraData, /* Event extra data to be included and its */ size_t extraDataSize, /* extra size (to allocate and copy into). */ Tcl_QueuePosition position) /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, * TCL_QUEUE_MARK or TCL_QUEUE_RETARDED. */ { Tcl_Event *evPtr = (Tcl_Event*)ckalloc(sizeof(Tcl_Event) + extraDataSize); evPtr->proc = proc; memcpy((evPtr+1), extraData, extraDataSize); Tcl_QueueEvent(evPtr, position); return evPtr; } static inline Tcl_Event* TclpQueueEventClientData( Tcl_EventProc *proc, /* Event function to call if it servicing. */ ClientData clientData, /* Event extra data to be included. */ Tcl_QueuePosition position) /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, * TCL_QUEUE_MARK or TCL_QUEUE_RETARDED. */ { Tcl_Event *evPtr = (Tcl_Event*)ckalloc(sizeof(Tcl_Event) + sizeof(clientData)); evPtr->proc = proc; *(ClientData*)(evPtr+1) = clientData; Tcl_QueueEvent(evPtr, position); return evPtr; } MODULE_SCOPE TclTimerEvent* TclpCreateTimerEvent(Tcl_WideInt usec, Tcl_TimerProc *proc, Tcl_TimerDeleteProc *delProc, size_t extraDataSize, int flags); MODULE_SCOPE TclTimerEvent* TclpCreatePromptTimerEvent( Tcl_TimerProc *proc, Tcl_TimerDeleteProc *delProc, size_t extraDataSize, int flags); MODULE_SCOPE Tcl_TimerToken TclCreateTimerHandler( Tcl_Time *timePtr, Tcl_TimerProc *proc, ClientData clientData, int flags); MODULE_SCOPE Tcl_TimerToken TclCreateAbsoluteTimerHandler( Tcl_Time *timePtr, Tcl_TimerProc *proc, ClientData clientData); MODULE_SCOPE void TclpDeleteTimerEvent(TclTimerEvent *tmrEvent); MODULE_SCOPE TclTimerEvent* TclpProlongTimerEvent(TclTimerEvent *tmrEvent, Tcl_WideInt usec, int flags); MODULE_SCOPE int TclPeekEventQueued(int flags); MODULE_SCOPE int TclDefaultBgErrorHandlerObjCmd( ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); MODULE_SCOPE Tcl_Command TclInitDictCmd(Tcl_Interp *interp); MODULE_SCOPE int Tcl_DisassembleObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); |
︙ | |||
3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 | 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 | + + + + + + + + + + + | * readable; the non-inline version (in tclInterp.c) is much easier to * understand. Note also that these macros takes different args (iPtr->limit) * to the non-inline version. */ #define TclLimitExceeded(limit) ((limit).exceeded != 0) static inline int TclInlLimitExceeded( register Tcl_Interp *interp) { return (((Interp *)interp)->limit.exceeded != 0); } #ifdef Tcl_LimitExceeded # undef Tcl_LimitExceeded #endif #define Tcl_LimitExceeded(interp) TclInlLimitExceeded(interp) #define TclLimitReady(limit) \ (((limit).active == 0) ? 0 : \ (++(limit).granularityTicker, \ ((((limit).active & TCL_LIMIT_COMMANDS) && \ (((limit).cmdGranularity == 1) || \ ((limit).granularityTicker % (limit).cmdGranularity == 0))) \ ? 1 : \ |
︙ |
Changes to generic/tclInterp.c.
︙ | |||
3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 | 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 | + + | * * Notes: * If you change this function, you MUST also update TclLimitExceeded() in * tclInt.h. *---------------------------------------------------------------------- */ #undef Tcl_LimitExceeded int Tcl_LimitExceeded( Tcl_Interp *interp) { register Interp *iPtr = (Interp *) interp; return iPtr->limit.exceeded != 0; |
︙ | |||
3507 3508 3509 3510 3511 3512 3513 | 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 | - + | /* * Delete the timer callback that is used to trap limits that occur in * [vwait]s... */ if (iPtr->limit.timeEvent != NULL) { |
︙ | |||
3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 | 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 | + + + + + + + + - + + + + - + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + | Tcl_LimitGetCommands( Tcl_Interp *interp) { Interp *iPtr = (Interp *) interp; return iPtr->limit.cmdCount; } static void TimeLimitDeleteCallback( ClientData clientData) { Interp *iPtr = clientData; iPtr->limit.timeEvent = NULL; } /* *---------------------------------------------------------------------- * |
︙ |
Changes to generic/tclLink.c.
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | + | * For each linked variable there is a data structure of the following type, * which describes the link and is the clientData for the trace set on the Tcl * variable. */ typedef struct Link { Tcl_Interp *interp; /* Interpreter containing Tcl variable. */ Namespace *nsPtr; /* Namespace containing Tcl variable */ Tcl_Obj *varName; /* Name of variable (must be global). This is * needed during trace callbacks, since the * actual variable may be aliased at that time * via upvar. */ char *addr; /* Location of C variable. */ int type; /* Type of link (TCL_LINK_INT, etc.). */ union { |
︙ | |||
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 | 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 | + + + + + + + + + | char *addr, /* Address of a C variable to be linked to * varName. */ int type) /* Type of C variable: TCL_LINK_INT, etc. Also * may have TCL_LINK_READ_ONLY OR'ed in. */ { Tcl_Obj *objPtr; Link *linkPtr; Namespace *dummy; const char *name; int code; linkPtr = (Link *) Tcl_VarTraceInfo(interp, varName, TCL_GLOBAL_ONLY, LinkTraceProc, (ClientData) NULL); if (linkPtr != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "variable '%s' is already linked", varName)); return TCL_ERROR; } linkPtr = (Link *) ckalloc(sizeof(Link)); linkPtr->interp = interp; linkPtr->nsPtr = NULL; linkPtr->varName = Tcl_NewStringObj(varName, -1); Tcl_IncrRefCount(linkPtr->varName); linkPtr->addr = addr; linkPtr->type = type & ~TCL_LINK_READ_ONLY; if (type & TCL_LINK_READ_ONLY) { linkPtr->flags = LINK_READ_ONLY; } else { linkPtr->flags = 0; } objPtr = ObjValue(linkPtr); if (Tcl_ObjSetVar2(interp, linkPtr->varName, NULL, objPtr, TCL_GLOBAL_ONLY|TCL_LEAVE_ERR_MSG) == NULL) { Tcl_DecrRefCount(linkPtr->varName); ckfree((char *) linkPtr); return TCL_ERROR; } TclGetNamespaceForQualName(interp, varName, NULL, TCL_GLOBAL_ONLY, &(linkPtr->nsPtr), &dummy, &dummy, &name); linkPtr->nsPtr->refCount++; code = Tcl_TraceVar(interp, varName, TCL_GLOBAL_ONLY|TCL_TRACE_READS |TCL_TRACE_WRITES|TCL_TRACE_UNSETS, LinkTraceProc, (ClientData) linkPtr); if (code != TCL_OK) { Tcl_DecrRefCount(linkPtr->varName); TclNsDecrRefCount(linkPtr->nsPtr); ckfree((char *) linkPtr); } return code; } /* *---------------------------------------------------------------------- |
︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | + + + | if (linkPtr == NULL) { return; } Tcl_UntraceVar(interp, varName, TCL_GLOBAL_ONLY|TCL_TRACE_READS|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, LinkTraceProc, (ClientData) linkPtr); Tcl_DecrRefCount(linkPtr->varName); if (linkPtr->nsPtr) { TclNsDecrRefCount(linkPtr->nsPtr); } ckfree((char *) linkPtr); } /* *---------------------------------------------------------------------- * * Tcl_UpdateLinkedVar -- |
︙ | |||
275 276 277 278 279 280 281 | 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | - + + + + | /* * If the variable is being unset, then just re-create it (with a trace) * unless the whole interpreter is going away. */ if (flags & TCL_TRACE_UNSETS) { |
︙ |
Changes to generic/tclNamesp.c.
︙ | |||
1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 | + + + + + + + | * get killed later, avoiding mem leaks. */ nsPtr->flags &= ~(NS_DYING|NS_KILLED); } } } int TclNamespaceDeleted( Namespace *nsPtr) { return (nsPtr->flags & NS_DYING) ? 1 : 0; } /* *---------------------------------------------------------------------- * * TclTeardownNamespace -- * * Used internally to dismantle and unlink a namespace when it is |
︙ | |||
1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + | */ ckfree(nsPtr->name); ckfree(nsPtr->fullName); ckfree((char *) nsPtr); } /* *---------------------------------------------------------------------- * * TclNsDecrRefCount -- * * Drops a reference to a namespace and frees it if the namespace has * been deleted and the last reference has just been dropped. * * Results: * None. * * Side effects: * None. * *---------------------------------------------------------------------- */ void TclNsDecrRefCount( Namespace *nsPtr) { nsPtr->refCount--; if ((nsPtr->refCount == 0) && (nsPtr->flags & NS_DEAD)) { NamespaceFree(nsPtr); } } /* *---------------------------------------------------------------------- * * Tcl_Export -- * * Makes all the commands matching a pattern available to later be |
︙ |
Changes to generic/tclNotify.c.
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + | typedef struct EventSource { Tcl_EventSetupProc *setupProc; Tcl_EventCheckProc *checkProc; ClientData clientData; struct EventSource *nextPtr; } EventSource; /* * Used for performance purposes, threshold to bypass check source (if don't wait) * Value should be approximately correspond 100-ns ranges, if the wide-clicks * supported, it is more precise so e. g. 5 is ca. 0.5 microseconds (500-ns). */ #ifndef TCL_CHECK_EVENT_SOURCE_THRESHOLD #define TCL_CHECK_EVENT_SOURCE_THRESHOLD 5 #endif /* * The following structure keeps track of the state of the notifier on a * per-thread basis. The first three elements keep track of the event queue. * In addition to the first (next to be serviced) and last events in the * queue, we keep track of a "marker" event. This provides a simple priority * mechanism whereby events can be inserted at the front of the queue but * behind all other high-priority events already in the queue (this is used * for things like a sequence of Enter and Leave events generated during a * grab in Tk). These elements are protected by the queueMutex so that any * thread can queue an event on any notifier. Note that all of the values in * this structure will be initialized to 0. */ typedef struct ThreadSpecificData { Tcl_Event *firstEventPtr; /* First pending event, or NULL if none. */ Tcl_Event *lastEventPtr; /* Last pending event, or NULL if none. */ Tcl_Event *markerEventPtr; /* Last high-priority event in queue, or NULL * if none. */ Tcl_Event *timerMarkerPtr; /* Weak pointer to last event in the queue, * before timer event generation */ Tcl_Event *firstRetardEv; /* First retarded event, or NULL if none. */ Tcl_Event *lastRetardEv; /* Last retarded event, or NULL if none. */ Tcl_Mutex queueMutex; /* Mutex to protect access to the previous * three fields. */ size_t queueEpoch; /* Epoch of the queue (incremented if changed * using TCL_QUEUE_HEAD or TCL_QUEUE_MARK). */ int serviceMode; /* One of TCL_SERVICE_NONE or * TCL_SERVICE_ALL. */ size_t serviceLevel; /* Current (nested) level of event cycle. */ size_t blockTimeServLev; /* Level of the event cycle block time was set. */ int blockTimeSet; /* 0 means there is no maximum block time: * block forever. */ Tcl_Time blockTime; /* If blockTimeSet is 1, gives the maximum * elapsed time for the next block. */ int inTraversal; /* 1 if Tcl_SetMaxBlockTime is being called * during an event source traversal. */ EventSource *firstEventSourcePtr; /* Pointer to first event source in list of * event sources for this thread. */ Tcl_ThreadId threadId; /* Thread that owns this notifier instance. */ ClientData clientData; /* Opaque handle for platform specific * notifier. */ int initialized; /* 1 if notifier has been initialized. */ struct ThreadSpecificData *nextPtr; /* Next notifier in global list of notifiers. * Access is controlled by the listLock global * mutex. */ #if TCL_CHECK_EVENT_SOURCE_THRESHOLD /* Last "time" source checked, used as threshold * to avoid checking for events too often */ #ifndef TCL_WIDE_CLICKS unsigned long lastCheckClicks; #else Tcl_WideInt lastCheckClicks; #endif #endif } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; /* * Global list of notifiers. Access to this list is controlled by the listLock * mutex. If this becomes a performance bottleneck, this could be replaced |
︙ | |||
115 116 117 118 119 120 121 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + | Tcl_MutexLock(&listLock); for (tsdPtr = firstNotifierPtr; tsdPtr && tsdPtr->threadId != threadId; tsdPtr = tsdPtr->nextPtr) { /* Empty loop body. */ } |
︙ | |||
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | 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 | + + + + + + + + + | } Tcl_MutexLock(&(tsdPtr->queueMutex)); for (evPtr = tsdPtr->firstEventPtr; evPtr != NULL; ) { hold = evPtr; evPtr = evPtr->nextPtr; ckfree((char *) hold); } for (evPtr = tsdPtr->firstRetardEv; evPtr != NULL; ) { hold = evPtr; evPtr = evPtr->nextPtr; ckfree((char *) hold); } tsdPtr->firstEventPtr = NULL; tsdPtr->lastEventPtr = NULL; tsdPtr->markerEventPtr = NULL; tsdPtr->timerMarkerPtr = NULL; tsdPtr->firstRetardEv = NULL; tsdPtr->lastRetardEv = NULL; Tcl_MutexUnlock(&(tsdPtr->queueMutex)); Tcl_MutexLock(&listLock); if (tclStubs.tcl_FinalizeNotifier) { tclStubs.tcl_FinalizeNotifier(tsdPtr->clientData); } |
︙ | |||
360 361 362 363 364 365 366 | 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 | - + | Tcl_QueueEvent( Tcl_Event* evPtr, /* Event to add to queue. The storage space * must have been allocated the caller with * malloc (ckalloc), and it becomes the * property of the event queue. It will be * freed after the event has been handled. */ Tcl_QueuePosition position) /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, |
︙ | |||
391 392 393 394 395 396 397 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | - + | Tcl_ThreadId threadId, /* Identifier for thread to use. */ Tcl_Event *evPtr, /* Event to add to queue. The storage space * must have been allocated the caller with * malloc (ckalloc), and it becomes the * property of the event queue. It will be * freed after the event has been handled. */ Tcl_QueuePosition position) /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, |
︙ | |||
416 417 418 419 420 421 422 423 424 425 426 427 428 429 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | if (tsdPtr) { QueueEvent(tsdPtr, evPtr, position); } else { ckfree((char *) evPtr); } Tcl_MutexUnlock(&listLock); } static inline void SpliceEventTail( Tcl_Event *evPtr, Tcl_Event **firstEvPtr, Tcl_Event **lastEvPtr) { evPtr->nextPtr = NULL; if (*firstEvPtr == NULL) { *firstEvPtr = evPtr; } else { (*lastEvPtr)->nextPtr = evPtr; } *lastEvPtr = evPtr; } static inline void LinkEvent( ThreadSpecificData *tsdPtr, Tcl_Event *evPtr, Tcl_Event *prevPtr) { if (prevPtr) { evPtr->nextPtr = prevPtr->nextPtr; prevPtr->nextPtr = evPtr; } else { evPtr->nextPtr = tsdPtr->firstEventPtr; tsdPtr->firstEventPtr = evPtr; } if (evPtr->nextPtr == NULL) { tsdPtr->lastEventPtr = evPtr; } } /* *---------------------------------------------------------------------- * * QueueEvent -- * * Insert an event into the specified thread's event queue at one of |
︙ | |||
448 449 450 451 452 453 454 | 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 | - + + - + - - - + - - - + - - + + + + + + + + + + + - + - + - - - - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * which event queue to use. */ Tcl_Event *evPtr, /* Event to add to queue. The storage space * must have been allocated the caller with * malloc (ckalloc), and it becomes the * property of the event queue. It will be * freed after the event has been handled. */ Tcl_QueuePosition position) /* One of TCL_QUEUE_TAIL, TCL_QUEUE_HEAD, |
︙ | |||
522 523 524 525 526 527 528 | 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 | - - + - - + + - - - + + - - - - - - + + + + + + + + - - - - - - + + + + + + + + + + + + + + - - - + + + + - - + + + - - + + - - - - - - - + + + + + + + + + + - - - + + + + + + + + | Tcl_EventDeleteProc *proc, /* The function to call. */ ClientData clientData) /* The type-specific data. */ { Tcl_Event *evPtr; /* Pointer to the event being examined */ Tcl_Event *prevPtr; /* Pointer to evPtr's predecessor, or NULL if * evPtr designates the first event in the * queue for the thread. */ |
︙ | |||
609 610 611 612 613 614 615 616 617 | 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 | + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + | * flags defined elsewhere. Events not * matching this will be skipped for * processing later. */ { Tcl_Event *evPtr, *prevPtr; Tcl_EventProc *proc; int result; size_t queueEpoch; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); |
︙ | |||
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | 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 | + + + + - + + - + + + - - - + + + + - - + - - - + - - - + + + + + - - + - - + + + - - - - - - + + + + + + + - + - + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | proc = evPtr->proc; if (proc == NULL) { continue; } evPtr->proc = NULL; /* Save current queue epoch (if unchanged - the same prevPtr) */ queueEpoch = tsdPtr->queueEpoch; /* * Release the lock before calling the event function. This allows * other threads to post events if we enter a recursive event loop in * this thread. Note that we are making the assumption that if the * proc returns 0, the event is still in the list. */ Tcl_MutexUnlock(&(tsdPtr->queueMutex)); result = (*proc)(evPtr, flags); Tcl_MutexLock(&(tsdPtr->queueMutex)); /* If event processed or scheduled to be executed later (retarding) */ |
︙ | |||
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | 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 | + + + + - - + + + + + + - - + - - - - - - - - + + + + - - - + + + + + + + + + - + + + + + + + + + + + + + - + - + + + + + + + + - - + + - + - - - - - - + - - - - + - + + + - + + - + - - - - - - - + - - - - - - + + + - + + - - + + + + + + + + + + + + + + + + + + + | /* * If we are called outside an event source traversal, set the timeout * immediately. */ if (!tsdPtr->inTraversal) { if (tsdPtr->blockTimeServLev < tsdPtr->serviceLevel) { /* avoid resetting the blockTime set outside of traversal. */ tsdPtr->blockTimeServLev = tsdPtr->serviceLevel; } Tcl_SetTimer(&tsdPtr->blockTime); } } /* *---------------------------------------------------------------------- * * Tcl_DoOneEvent -- * * Process a single event of some sort. If there's no work to do, wait * for an event to occur, then process it. * * Results: * The return value is 1 if the function actually found an event to * process. If no processing occurred, then 0 is returned (this can |
︙ | |||
1035 1036 1037 1038 1039 1040 1041 | 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 | - + - + - + - - - - - + - - + - - - - + + - - - + + + - - - - - - + + + + + + + | *---------------------------------------------------------------------- */ int Tcl_ServiceAll(void) { int result = 0; |
︙ | |||
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 | 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 | + + + + + + + + + + + + + + + + + + + + + + + | tclStubs.tcl_AlertNotifier(tsdPtr->clientData); } break; } } Tcl_MutexUnlock(&listLock); } /* *---------------------------------------------------------------------- * * Tcl_Sleep -- * * Delay execution for the specified number of milliseconds. * * Results: * None. * * Side effects: * Time passes. * *---------------------------------------------------------------------- */ void Tcl_Sleep( int ms) /* Number of milliseconds to sleep. */ { TclpUSleep((Tcl_WideInt)ms * 1000); } /* * Local Variables: * mode: c * c-basic-offset: 4 * fill-column: 78 * End: */ |
Changes to generic/tclObj.c.
︙ | |||
2774 2775 2776 2777 2778 2779 2780 | 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 | - - + + | * long range get auto-narrowed to tclIntType, while all the * values in the unsigned long range will fit in a long. */ mp_int big; UNPACK_BIGNUM(objPtr, big); |
︙ | |||
3075 3076 3077 3078 3079 3080 3081 | 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 | - + | * Tcl_WideInt, even when auto-narrowing is enabled. */ mp_int big; UNPACK_BIGNUM(objPtr, big); if ((size_t)(big.used) <= (CHAR_BIT * sizeof(Tcl_WideInt) |
︙ | |||
3494 3495 3496 3497 3498 3499 3500 | 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 | - + | Tcl_Obj *objPtr, /* Object to set */ mp_int *bignumValue) /* Value to store */ { if (Tcl_IsShared(objPtr)) { Tcl_Panic("%s called with shared object", "Tcl_SetBignumObj"); } if ((size_t)(bignumValue->used) |
︙ | |||
3518 3519 3520 3521 3522 3523 3524 | 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 | - + | } mp_clear(bignumValue); return; } tooLargeForLong: #ifndef NO_WIDE_TYPE if ((size_t)(bignumValue->used) |
︙ | |||
3917 3918 3919 3920 3921 3922 3923 | 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 | - + - + - - + | Tcl_Obj *objPtr1 = (Tcl_Obj *) keyPtr; Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue; register CONST char *p1, *p2; register int l1, l2; /* * If the object pointers are the same then they match. |
︙ |
Changes to generic/tclStrToD.c.
︙ | |||
1829 1830 1831 1832 1833 1834 1835 | 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 | - + - + - + | * significand (the most significant) corresponds to the * 2**(binExponent+M2 + 1) bit of 2*M2*v. Allocate enough digits to hold * that quantity, then convert the significand to a large integer, scaled * appropriately. Then multiply by the appropriate power of 5. */ msb = binExponent + M2; /* 1008 */ |
︙ | |||
3113 3114 3115 3116 3117 3118 3119 | 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 | - + | ShouldBankerRoundUpPowD(mp_int* b, /* Numerator of the fraction */ int sd, /* Denominator is 2**(sd*DIGIT_BIT) */ int isodd) /* 1 if the digit is odd, 0 if even */ { int i; |
︙ | |||
4234 4235 4236 4237 4238 4239 4240 | 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 | - - + + - + | /* * The denominator is a power of 2, so we can replace division * by digit shifts. First we round up s2 to a multiple of * DIGIT_BIT, and adjust m2 and b2 accordingly. Then we launch * into a version of the comparison that's specialized for * the 'power of mp_digit in the denominator' case. */ |
︙ | |||
4294 4295 4296 4297 4298 4299 4300 | 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 | - - + + - + | /* * The denominator is a power of 2, so we can replace division * by digit shifts. First we round up s2 to a multiple of * DIGIT_BIT, and adjust m2 and b2 accordingly. Then we launch * into a version of the comparison that's specialized for * the 'power of mp_digit in the denominator' case. */ |
︙ | |||
4429 4430 4431 4432 4433 4434 4435 | 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 | - + | * the significand of a double. */ maxDigits = (int) ((DBL_MAX_EXP * log((double) FLT_RADIX) + 0.5 * log(10.)) / log(10.)); minDigits = (int) floor((DBL_MIN_EXP - DBL_MANT_DIG) * log((double) FLT_RADIX) / log(10.)); |
︙ | |||
4630 4631 4632 4633 4634 4635 4636 | 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 | - + | /* * Accumulate the result, one mp_digit at a time. */ r = 0.0; for (i=b.used-1 ; i>=0 ; --i) { |
︙ | |||
4699 4700 4701 4702 4703 4704 4705 | 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 | - + | } else { mp_copy(a, &b); } if (!exact) { mp_add_d(&b, 1, &b); } for (i=b.used-1 ; i>=0 ; --i) { |
︙ | |||
4749 4750 4751 4752 4753 4754 4755 | 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 | - + | mp_mul_2d(a, shift, &b); } else if (shift < 0) { mp_div_2d(a, -shift, &b, NULL); } else { mp_copy(a, &b); } for (i=b.used-1 ; i>=0 ; --i) { |
︙ | |||
4811 4812 4813 4814 4815 4816 4817 | 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 | - + | /* * Accumulate the result, one mp_digit at a time. */ r = 0.0; for (i=b.used-1; i>=0; --i) { |
︙ |
Changes to generic/tclStringObj.c.
︙ | |||
2247 2248 2249 2250 2251 2252 2253 | 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 | - - + + - + | bits = uw; while (uw) { numDigits++; uw /= base; } } else if (useBig && big.used) { |
︙ | |||
2286 2287 2288 2289 2290 2291 2292 | 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 | - + - + | bytes = TclGetString(pure); toAppend = length = (int)numDigits; while (numDigits--) { int digitOffset; if (useBig && big.used) { if (index < big.used && (size_t) shift < |
︙ |
Changes to generic/tclTest.c.
︙ | |||
4322 4323 4324 4325 4326 4327 4328 | 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 | - + | } /* *---------------------------------------------------------------------- * * TestupvarCmd -- * |
︙ |
Changes to generic/tclTimer.c.
︙ | |||
8 9 10 11 12 13 14 | 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 | - - - - - - - - - - - - - - - - + - + - - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - - - - - - + + + + + + - + - + - - - - - - - - + - - - + + - - + - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tclInt.h" |
︙ | |||
164 165 166 167 168 169 170 | 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | InitTimer(void) { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) TclThreadDataKeyGet(&dataKey); if (tsdPtr == NULL) { tsdPtr = TCL_TSD_INIT(&dataKey); |
︙ | |||
194 195 196 197 198 199 200 | 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 | + - - - - - - - + + + + + + + + + + - - + + + | static void TimerExitProc( ClientData clientData) /* Not used. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) TclThreadDataKeyGet(&dataKey); if (tsdPtr != NULL) { |
︙ | |||
232 233 234 235 236 237 238 | 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 | + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - + - - + - - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + - - - - - - - + + + + + + + + + + + + + + - - + - + + + - - - + + + + + | Tcl_TimerToken Tcl_CreateTimerHandler( int milliseconds, /* How many milliseconds to wait before * invoking proc. */ Tcl_TimerProc *proc, /* Function to invoke. */ ClientData clientData) /* Arbitrary data to pass to proc. */ { register TclTimerEvent *tmrEvent; |
︙ | |||
333 334 335 336 337 338 339 | 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 | - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + - + - + - + + - + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + - - - + + - + - - - - - + + + - - - - + + + + - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - + - - + + + - - + + + - - - + + - - - - + - - + + + - - - - - - + - - + - + - - + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + - + + + - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - + + - - - - - - - - - - - | * *-------------------------------------------------------------- */ void Tcl_DeleteTimerHandler( Tcl_TimerToken token) /* Result previously returned by |
︙ | |||
646 647 648 649 650 651 652 | 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 | - + - - - - + + + + + + + - + - - - - + - - - - - + + + + - + + - + - + + + - - + + - - + - + - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | */ void Tcl_CancelIdleCall( Tcl_IdleProc *proc, /* Function that was previously registered. */ ClientData clientData) /* Arbitrary value to pass to proc. */ { |
︙ | |||
765 766 767 768 769 770 771 | 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 | - + - - - + - + + + + - - - - - - - - + + + + + + + - - - - + + + - - - - + + + - - + - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - + - - - - - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + - + + + - + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + - - - - - - - + + + + + + + + + + + + + - + + - + | int Tcl_AfterObjCmd( ClientData clientData, /* Unused */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *CONST objv[]) /* Argument objects. */ { |
︙ | |||
985 986 987 988 989 990 991 | 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 | - + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - + - - - - - + + + + + + + + + - - + + + + + + + - + - - - - + + + + + + + - - - - + + + | * *---------------------------------------------------------------------- */ static int AfterDelay( Tcl_Interp *interp, |
︙ | |||
1061 1062 1063 1064 1065 1066 1067 | 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 | - + + + + + - + - - + + | *---------------------------------------------------------------------- */ static AfterInfo * GetAfterEvent( AfterAssocData *assocPtr, /* Points to "after"-related information for * this interpreter. */ |
︙ | |||
1112 1113 1114 1115 1116 1117 1118 | 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 | - + - - - - - + + + + + - + + - + + + + - + - + - + - + + - - + + - - - + + + + - - - - + + + + + + - | static void AfterProc( ClientData clientData) /* Describes command to execute. */ { AfterInfo *afterPtr = (AfterInfo *) clientData; AfterAssocData *assocPtr = afterPtr->assocPtr; |
︙ | |||
1216 1217 1218 1219 1220 1221 1222 | 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 | - - - + - - - + - - - + - - - - | static void AfterCleanupProc( ClientData clientData, /* Points to AfterAssocData for the * interpreter. */ Tcl_Interp *interp) /* Interpreter that is being deleted. */ { AfterAssocData *assocPtr = (AfterAssocData *) clientData; |
Changes to generic/tclTomMath.h.
| 1 2 3 4 5 6 7 8 9 10 | - - + + - - - + - - - - - - - - - |
|
︙ | |||
144 145 146 147 148 149 150 | 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 | + + - + + - - - - + + + + + - + - - - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - | #define DIGIT_BIT ((int)((CHAR_BIT * sizeof(mp_digit) - 1))) /* bits per digit */ #endif #define MP_DIGIT_BIT DIGIT_BIT #define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1)) #define MP_DIGIT_MAX MP_MASK typedef int mp_sign; #define MP_ZPOS 0 /* positive integer */ |
︙ | |||
273 274 275 276 277 278 279 280 281 282 283 284 285 286 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | + + + + + + + + + + | void mp_set(mp_int *a, mp_digit b); */ /* set a 32-bit const */ /* int mp_set_int(mp_int *a, unsigned long b); */ /* set a platform dependent unsigned long value */ /* int mp_set_long(mp_int *a, unsigned long b); */ /* set a platform dependent unsigned long long value */ /* int mp_set_long_long(mp_int *a, unsigned long long b); */ /* get a 32-bit value */ unsigned long mp_get_int(mp_int * a); /* initialize and set a digit */ /* int mp_init_set (mp_int * a, mp_digit b); |
︙ | |||
646 647 648 649 650 651 652 | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 | - + | * Sets result to 0 if composite or 1 if probable prime */ /* int mp_prime_miller_rabin(mp_int *a, mp_int *b, int *result); */ /* This gives [for a given bit size] the number of trials required |
︙ | |||
673 674 675 676 677 678 679 | 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 | - + - + - | * bbs_style = 1 means the prime must be congruent to 3 mod 4 */ /* int mp_prime_next_prime(mp_int *a, int t, int bbs_style); */ /* makes a truly random prime of a given size (bytes), |
︙ | |||
826 827 828 829 830 831 832 | 862 863 864 865 866 867 868 869 870 871 872 | - + | */ #if defined(BUILD_tcl) || !defined(_WIN32) MODULE_SCOPE const char *mp_s_rmap; #endif #ifdef __cplusplus |
Changes to generic/tclTomMathDecls.h.
︙ | |||
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | + + + | #define KARATSUBA_MUL_CUTOFF TclBNKaratsubaMulCutoff #define KARATSUBA_SQR_CUTOFF TclBNKaratsubaSqrCutoff #define TOOM_MUL_CUTOFF TclBNToomMulCutoff #define TOOM_SQR_CUTOFF TclBNToomSqrCutoff #define bn_reverse TclBN_reverse #define s_mp_reverse TclBN_reverse #define fast_s_mp_mul_digs TclBN_fast_s_mp_mul_digs #define s_mp_mul_digs_fast TclBN_fast_s_mp_mul_digs #define fast_s_mp_sqr TclBN_fast_s_mp_sqr #define s_mp_sqr_fast TclBN_fast_s_mp_sqr #define mp_add TclBN_mp_add #define mp_add_d TclBN_mp_add_d #define mp_and TclBN_mp_and #define mp_clamp TclBN_mp_clamp #define mp_clear TclBN_mp_clear #define mp_clear_multi TclBN_mp_clear_multi #define mp_cmp TclBN_mp_cmp |
︙ | |||
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + + | #define mp_init TclBN_mp_init #define mp_init_copy TclBN_mp_init_copy #define mp_init_multi TclBN_mp_init_multi #define mp_init_set TclBN_mp_init_set #define mp_init_set_int TclBN_mp_init_set_int #define mp_init_size TclBN_mp_init_size #define mp_karatsuba_mul TclBN_mp_karatsuba_mul #define s_mp_karatsuba_mul TclBN_mp_karatsuba_mul #define mp_karatsuba_sqr TclBN_mp_karatsuba_sqr #define s_mp_karatsuba_sqr TclBN_mp_karatsuba_sqr #define mp_lshd TclBN_mp_lshd #define mp_mod TclBN_mp_mod #define mp_mod_2d TclBN_mp_mod_2d #define mp_mul TclBN_mp_mul #define mp_mul_2 TclBN_mp_mul_2 #define mp_mul_2d TclBN_mp_mul_2d #define mp_mul_d TclBN_mp_mul_d |
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + + | #define mp_sqr TclBN_mp_sqr #define mp_sqrt TclBN_mp_sqrt #define mp_sub TclBN_mp_sub #define mp_sub_d TclBN_mp_sub_d #define mp_to_unsigned_bin TclBN_mp_to_unsigned_bin #define mp_to_unsigned_bin_n TclBN_mp_to_unsigned_bin_n #define mp_toom_mul TclBN_mp_toom_mul #define s_mp_toom_mul TclBN_mp_toom_mul #define mp_toom_sqr TclBN_mp_toom_sqr #define s_mp_toom_sqr TclBN_mp_toom_sqr #define mp_toradix_n TclBN_mp_toradix_n #define mp_unsigned_bin_size TclBN_mp_unsigned_bin_size #define mp_xor TclBN_mp_xor #define mp_zero TclBN_mp_zero #define s_mp_add TclBN_s_mp_add #define s_mp_mul_digs TclBN_s_mp_mul_digs #define s_mp_sqr TclBN_s_mp_sqr |
︙ |
Changes to generic/tclTomMathInterface.c.
︙ | |||
192 193 194 195 196 197 198 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | - + | mp_digit* p; /* * Allocate enough memory to hold the largest possible long */ status = mp_init_size(a, |
︙ | |||
279 280 281 282 283 284 285 | 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | - + | mp_digit *p; /* * Allocate enough memory to hold the largest possible Tcl_WideUInt. */ status = mp_init_size(a, |
︙ |
Changes to generic/tclUniData.c.
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - - - - - - + + + + + + | 6144, 6176, 6208, 6240, 6272, 6304, 6336, 6368, 6400, 6432, 6464, 6496, 6528, 6560, 6560, 6560, 6560, 6560, 6560, 6560, 6560, 6592, 6624, 4928, 6656, 6688, 6720, 6752, 6784, 4928, 6816, 6848, 6880, 6912, 6944, 6976, 7008, 4928, 4928, 4928, 4928, 4928, 7040, 7072, 7104, 4928, 4928, 4928, 7136, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 7168, 7200, 4928, 7232, 7264, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 4928, 6560, 6560, 6560, 6560, 7296, 6560, 7328, 7360, 6560, 6560, 6560, 6560, 6560, 6560, 6560, |
︙ | |||
126 127 128 129 130 131 132 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + - - - + + + | 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, |
︙ | |||
191 192 193 194 195 196 197 | 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 | - - + + - + - + - - - - - + + + + + - + - + - + | 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 9920, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 9952, 1344, 1344, 9984, 1824, 10016, 10048, 10080, 1344, 1344, 10112, 10144, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 10176, 10208, 1344, 10240, 1344, 10272, 10304, 10336, 10368, 10400, 10432, 1344, 1344, 1344, 10464, 10496, 64, 10528, 10560, 10592, 4736, 10624, 10656 |
︙ | |||
265 266 267 268 269 270 271 | 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 | - - + + - - + + - + - + | 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344, 1344, 1344, 1344, 1344, |
︙ | |||
313 314 315 316 317 318 319 | 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 | - + - + - - - + + + - - - - - - + + + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + | 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1824, 1344, 1344, 1344, 1344, |
︙ | |||
577 578 579 580 581 582 583 | 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 | - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - + + - - - - + + + + - - + + - + - - + + - + - - - - + + + + - + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - + - - - - - + + + + + - - - + + + - + - - - - - + + + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - + - - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - + + + - - - - + - - - + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + - - - - - + + - - - + + + - - - + - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + + + + - - + - - - - - + + + + + + - - - - + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + - + - - - - + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + - + - - + + - - + + - - - - + + + + - + - - - - - - - + + + + + + + + - + - - - - + + + - - - - - - - - - - + + + + + + + + + + + - - - + - - - - + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - + + + + + - + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - + + + + + - - - + + + - - - - + + + + + - + - - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - + + - - + + - + - - - - - - - - - + + + + + + + + + - - - + + + - - + + - - - + + + - - + + - - + + - + - - + + - - + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + + + + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - + + + + + + + + - - - + + + - + - - - - - - - - + + + + + + + + + + - - - - + + - - - + + + - - + + - + - - - - - - - - - + + + + + + + + + + + + + + + - - - - + + - - - - - - - + + + + + + + + + + - - - + + + + - - + - - - - + + + + - - + + - - - - - + + - - - + + - - - - - + + - - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + + + + - - - - - - + + + + - - - - - - - + + + + + + - - + + - - - - - - + + + + + - - - - + + + + | 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 21, 48, 49, 50, 23, 24, 52, 53, 23, 24, 23, 24, 23, 24, 23, 24, 54, 21, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 21, 21, 21, 21, 21, 21, 55, 23, 24, 56, 57, 58, 58, 23, 24, 59, 60, 61, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 62, 63, 64, 65, 66, 21, 67, 67, 21, 68, 21, 69, 70, 21, 21, 21, 67, 71, 21, 72, 21, 73, 74, 21, 75, 76, 74, 77, 78, 21, 21, 76, 21, 79, 80, 21, 21, 81, |
︙ | |||
1560 1561 1562 1563 1564 1565 1566 | 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 | - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + | 5, 23, 16, 11, -190078, 24, 2, -30846, 321, 386, -50879, 59522, -30911, 76930, -49790, 53825, 52801, 52545, 20289, 51777, 52033, 53057, -24702, 54081, 53569, -41598, 54593, -33150, 54849, 55873, 55617, 56129, -14206, 609, 451, 674, 20354, -24767, -14271, -33215, 2763585, -41663, 2762817, -2768510, -49855, 17729, 18241, -2760318, -2759550, -2760062, 53890, 52866, 52610, 51842, 52098, -10833534, -10832510, 53122, -10823550, -10830718, 53634, 54146, -2750078, |
︙ | |||
1636 1637 1638 1639 1640 1641 1642 | 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 | - + | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ |
Changes to generic/tclUtf.c.
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + - + - + | 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, #if TCL_UTF_MAX > 3 |
︙ |
Changes to library/init.tcl.
︙ | |||
173 174 175 176 177 178 179 | 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | - + | namespace eval ::tcl::clock [list variable TclLibDir $::tcl_library] proc clock args { namespace eval ::tcl::clock [list namespace ensemble create -command \ [uplevel 1 [list namespace origin [lindex [info level 0] 0]]] \ -subcommands { |
︙ |
Changes to library/msgs/ja.msg.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 | - + | ::msgcat::mcset ja DATE_FORMAT "%Y/%m/%d" ::msgcat::mcset ja TIME_FORMAT "%k:%M:%S" ::msgcat::mcset ja TIME_FORMAT_12 "%P %I:%M:%S" ::msgcat::mcset ja DATE_TIME_FORMAT "%Y/%m/%d %k:%M:%S %z" ::msgcat::mcset ja LOCALE_DATE_FORMAT "%EY\u5e74%m\u6708%d\u65e5" ::msgcat::mcset ja LOCALE_TIME_FORMAT "%H\u6642%M\u5206%S\u79d2" ::msgcat::mcset ja LOCALE_DATE_TIME_FORMAT "%EY\u5e74%m\u6708%d\u65e5 (%a) %H\u6642%M\u5206%S\u79d2 %z" |
Changes to library/tzdata/America/Metlakatla.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + - + | {1446372000 -32400 0 AKST} {1457866800 -28800 1 AKDT} {1478426400 -32400 0 AKST} {1489316400 -28800 1 AKDT} {1509876000 -32400 0 AKST} {1520766000 -28800 1 AKDT} {1541329200 -28800 0 PST} {1547978400 -32400 0 AKST} |
︙ |
Changes to library/tzdata/Asia/Gaza.
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | + + + + | {-102643200 7200 0 EET} {-84330000 10800 1 EEST} {-81313200 10800 0 IST} {142376400 10800 1 IDT} {150843600 7200 0 IST} {167176800 10800 1 IDT} {178664400 7200 0 IST} {334015200 10800 1 IDT} {337644000 7200 0 IST} {452556000 10800 1 IDT} {462232800 7200 0 IST} {482277600 10800 1 IDT} {495579600 7200 0 IST} {516751200 10800 1 IDT} {526424400 7200 0 IST} {545436000 10800 1 IDT} {558478800 7200 0 IST} {576626400 10800 1 IDT} |
︙ | |||
109 110 111 112 113 114 115 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | {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} |
Changes to library/tzdata/Asia/Hebron.
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | + + + + | {-102643200 7200 0 EET} {-84330000 10800 1 EEST} {-81313200 10800 0 IST} {142376400 10800 1 IDT} {150843600 7200 0 IST} {167176800 10800 1 IDT} {178664400 7200 0 IST} {334015200 10800 1 IDT} {337644000 7200 0 IST} {452556000 10800 1 IDT} {462232800 7200 0 IST} {482277600 10800 1 IDT} {495579600 7200 0 IST} {516751200 10800 1 IDT} {526424400 7200 0 IST} {545436000 10800 1 IDT} {558478800 7200 0 IST} {576626400 10800 1 IDT} |
︙ | |||
108 109 110 111 112 113 114 | 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 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | {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} |
Changes to library/tzdata/Asia/Jerusalem.
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + + | {-418262400 7200 0 IST} {-400032000 10800 1 IDT} {-387428400 7200 0 IST} {142380000 10800 1 IDT} {150843600 7200 0 IST} {167176800 10800 1 IDT} {178664400 7200 0 IST} {334015200 10800 1 IDT} {337644000 7200 0 IST} {452556000 10800 1 IDT} {462232800 7200 0 IST} {482277600 10800 1 IDT} {495579600 7200 0 IST} {516751200 10800 1 IDT} {526424400 7200 0 IST} {545436000 10800 1 IDT} {558478800 7200 0 IST} {576626400 10800 1 IDT} |
︙ |
Changes to library/tzdata/Etc/UCT.
1 | 1 2 3 4 5 | + + - - + + - - | # created by tools/tclZIC.tcl - do not edit if {![info exists TZData(Etc/UTC)]} { LoadTimeZoneFile Etc/UTC |
Changes to library/tzdata/UCT.
1 | 1 2 3 4 5 | - - + + - + | # created by tools/tclZIC.tcl - do not edit |
Changes to libtommath/tommath.h.
︙ | |||
502 503 504 505 506 507 508 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - | /* makes a truly random prime of a given size (bits), * * Flags are as follows: * * LTM_PRIME_BBS - make prime congruent to 3 mod 4 * LTM_PRIME_SAFE - make sure (p-1)/2 is prime as well (implies LTM_PRIME_BBS) |
︙ |
Changes to macosx/tclMacOSXNotify.c.
︙ | |||
1447 1448 1449 1450 1451 1452 1453 | 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 | - + - + - - + + - - - + + - + - - - - - + | return changeWaitingList; } /* *---------------------------------------------------------------------- * |
︙ | |||
1523 1524 1525 1526 1527 1528 1529 | 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 | - - + + | tsdPtr->sleeping = 0; if (runLoopTimer) { CFRunLoopTimerSetNextFireDate(runLoopTimer, nextTimerFire); } } else { struct timespec waitTime; |
︙ |
Changes to tests-perf/test-performance.tcl.
︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + - + - + - + + - + + + + - + - + + + + + + + + + - + - - - + + + - + - + + - + + | puts $_(m) puts "Min:" puts [lindex $_(itm) $mini] puts "Max:" puts [lindex $_(itm) $maxi] puts [string repeat ** 40] puts "" unset -nocomplain _(itm) _(starttime) } proc _test_start {reptime} { upvar _ _ array set _ [list itm {} reptime $reptime starttime [clock milliseconds] -from-run 0] } proc _test_iter {args} { if {[llength $args] > 2} { return -code error "wrong # args: should be \"[lindex [info level [info level]] 0] ?level? measure-result\"" } set lvl 1 if {[llength $args] > 1} { set args [lassign $args lvl] } upvar $lvl _ _ puts [set _(m) {*}$args] lappend _(itm) $_(m) puts "" } proc _adjust_maxcount {reptime maxcount} { if {[llength $reptime] > 1} { lreplace $reptime 1 1 [expr {min($maxcount,[lindex $reptime 1])}] } else { lappend reptime $maxcount } } proc _test_run {args} { upvar _ _ # parse args: |
Changes to tests-perf/timer-event.perf.tcl.
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | setup {set le $i; incr i; list $le .. 1; # cancel up to $howmuch events} {after cancel $ev([incr i -1]); if {$i <= 1} break} cleanup {update; unset -nocomplain ev} # cancel forwards "after 0" / $howmuch timer-events in queue: setup {set i 0; timerate {set ev([incr i]) [after 0 {set foo bar}]} {*}$reptime} setup {set le $i; set i 0; list 1 .. $le; # cancel up to $howmuch events} |
︙ | |||
127 128 129 130 131 132 133 | 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 | + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + | {update idletasks} # simple shortest sleep: {after 0} } } proc test-exec-new {{reptime 1000}} { _test_run $reptime { # conditional update pure idle only (without window): {update -idle} # conditional update without idle events: {update -noidle} # conditional update timers only: {update -timer} # conditional update AIO only: {update -async} # conditional vwait with zero timeout: pure idle only (without window): {vwait -idle 0 x} # conditional vwait with zero timeout: without idle events: {vwait -noidle 0 x} # conditional vwait with zero timeout: timers only: {vwait -timer 0 x} # conditional vwait with zero timeout: AIO only: {vwait -async 0 x} } } |
︙ |
Changes to tests/chanio.test.
︙ | |||
1767 1768 1769 1770 1771 1772 1773 | 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 | - + | chan close $f set f [open "|[list [interpreter] $path(script) [array get path]]" r] set c [chan gets $f] chan close $f # Added delay to give Windows time to stop the spawned process and clean # up its grip on the file test1. Added delete as proper test cleanup. # The failing tests were 18.1 and 18.2 as first re-users of file "test1". |
︙ | |||
6893 6894 6895 6896 6897 6898 6899 | 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 | - + - + - + | test chan-io-53.7 {CopyData: Flooding chan copy from pipe} {stdio openpipe fcopy} { variable fcopyTestDone file delete $path(pipe) catch {unset fcopyTestDone} set fcopyTestCount 0 set f1 [open $path(pipe) w] chan puts $f1 { |
︙ | |||
7014 7015 7016 7017 7018 7019 7020 | 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 | - + - + | set out [makeFile {} out] set err [makeFile {} err] set pipe [open "|[list [info nameofexecutable] 2> $err]" r+] chan configure $pipe -translation binary -buffering line chan puts $pipe { chan configure stdout -translation binary -buffering line chan puts stderr Waiting... |
︙ | |||
7143 7144 7145 7146 7147 7148 7149 | 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 | - + + + + | } proc readit {s next} { variable x variable result lappend result $next if {$next == 1} { chan event $s readable [namespace code [list readit $s 2]] |
︙ | |||
7172 7173 7174 7175 7176 7177 7178 | 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 | - - | variable x 0 variable as vwait [namespace which -variable as] chan configure $cs -translation lf lappend result [chan gets $cs] chan configure $cs -blocking off chan event $cs readable [namespace code [list readit $cs 1]] |
︙ |
Changes to tests/clock.test.
︙ | |||
36695 36696 36697 36698 36699 36700 36701 | 36695 36696 36697 36698 36699 36700 36701 36702 36703 36704 36705 36706 36707 36708 36709 36710 36711 36712 36713 36714 36715 36716 36717 36718 36719 36720 | - - - - - - - - - - + + + + + + + + + + + + | } } return $retval } } -body { set trouble {} |
︙ |
Changes to tests/cmdMZ.test.
︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + + | namespace eval ::tcl::test::cmdMZ { namespace import ::tcltest::cleanupTests namespace import ::tcltest::customMatch namespace import ::tcltest::makeFile namespace import ::tcltest::removeFile namespace import ::tcltest::temporaryDirectory namespace import ::tcltest::test if {[namespace which -command ::tcl::unsupported::timerate] ne ""} { namespace import ::tcl::unsupported::timerate } # Tcl_PwdObjCmd test cmdMZ-1.1 {Tcl_PwdObjCmd} { list [catch {pwd a} msg] $msg } {1 {wrong # args: should be "pwd"}} test cmdMZ-1.2 {Tcl_PwdObjCmd: simple pwd} { |
︙ | |||
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | 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 | + + + + + + + + - + | # if not UTF-8 aware, result is "a {} {} b qw\xe5 {} N wq" split "a\u4e4eb qw\u5e4e\x4e wq" " \u4e4e" } "a b qw\u5e4eN wq" # The tests for Tcl_StringObjCmd are in string.test # The tests for Tcl_SubstObjCmd are in subst.test # The tests for Tcl_SwitchObjCmd are in switch.test # todo: rewrite this if monotonic clock is provided resp. command "after" # gets microsecond accuracy (RFE [fdfbd5e10] gets merged): proc _nrt_sleep {msec} { set usec [expr {$msec * 1000}] set stime [clock microseconds] while {abs([clock microseconds] - $stime) < $usec} {after 0} } test cmdMZ-5.1 {Tcl_TimeObjCmd: basic format of command} { list [catch {time} msg] $msg } {1 {wrong # args: should be "time command ?count?"}} test cmdMZ-5.2 {Tcl_TimeObjCmd: basic format of command} { list [catch {time a b c} msg] $msg } {1 {wrong # args: should be "time command ?count?"}} test cmdMZ-5.3 {Tcl_TimeObjCmd: basic format of command} { list [catch {time a b} msg] $msg } {1 {expected integer but got "b"}} test cmdMZ-5.4 {Tcl_TimeObjCmd: nothing happens with negative iteration counts} { time bogusCmd -12456 } {0 microseconds per iteration} test cmdMZ-5.5 {Tcl_TimeObjCmd: result format} { regexp {^\d+ microseconds per iteration} [time {format 1}] } 1 test cmdMZ-5.6 {Tcl_TimeObjCmd: slower commands take longer} { |
︙ | |||
361 362 363 364 365 366 367 | 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 | - - + + + + + - - + + - + - - - - - + + + + + + + + + + + + + - + - + + + + + + + | } {1 {expected integer but got "b"}} test cmdMZ-6.3 {Tcl_TimeRateObjCmd: basic format of command} { list [catch {timerate -overhead b {} a b} msg] $msg } {1 {expected floating-point number but got "b"}} test cmdMZ-6.4 {Tcl_TimeRateObjCmd: compile of script happens even with negative iteration counts} { list [catch {timerate "foreach a {c d e} \{" -12456} msg] $msg } {1 {missing close-brace}} |
Changes to tests/event.test.
︙ | |||
400 401 402 403 404 405 406 407 408 409 410 411 412 413 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | NONE foo while executing "error foo" ("after" script) } test event-7.10 {after at - absolute time} { set result {} # 1st test simple delay (and mix generation / recursive processing) set attm [expr {[clock milliseconds]/1000.0 + 0.150}] after 0 {lappend result 1} after 100 { update; # this don't catch event 3 lappend result 2a after at $attm; # delay to 150ms from start update; # this still don't catch event 3 also lappend result 2b after at [expr {$attm + 0.100}]; # delay to 250ms from start update; # this should catch event 3 lappend result 2c } after 200 {lappend result 3; set a done} vwait a # 2nd test events "at" (mix due-times between relative/absolute events) lappend result -- set sttm [expr {[clock milliseconds]/1000.0}] after 200 {lappend result 4; set a done} after 120 {lappend result 5} after 40 {lappend result 6} after at [expr {$sttm+0.160}] {lappend result at-1} after at [expr {$sttm+0.080}] {lappend result at-2} after at [expr {$sttm+0.005}] {lappend result at-3} after 2000 {lappend result [set a timeout]} after 0 {lappend result 7} vwait a set result } {1 2a 2b 3 2c -- 7 at-3 6 at-2 5 at-1 4} # someday : add a test checking that # when there is no bgerror, an error msg goes to stderr # ideally one would use sub interp and transfer a fake stderr # to it, unfortunatly the current interp tcl API does not allow # that. the other option would be to use fork a test but it # then becomes more a file/exec test than a bgerror test. |
︙ | |||
484 485 486 487 488 489 490 | 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 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | puts $child "exit 3" list [catch {close $child} msg] $msg [lindex $::errorCode 0] \ [lindex $::errorCode 2] } {1 {child process exited abnormally} CHILDSTATUS 3} test event-11.1 {Tcl_VwaitCmd procedure} { list [catch {vwait} msg] $msg |
︙ | |||
566 567 568 569 570 571 572 | 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | - - - - + | } namespace eval ::t { vwait ::t::v } } {} |
︙ | |||
601 602 603 604 605 606 607 608 609 610 611 612 613 614 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | set y before set z before after 300 update list $x $y $z } {x-done before z-done} test event-12.5 {update -idle, update -noidle} { foreach i [after info] { after cancel $i } set x {} after idle {lappend x idle} update -noidle after 0 {lappend x 0} update -noidle after 50 {lappend x 1} update -noidle lappend x 2 update -idle lappend x 3 after idle {lappend x idle} after 0 {lappend x 4} after 0 {lappend x 5} update -idle lappend x 6 update lappend x res:[vwait 500 x] set x } {0 2 idle 3 idle 6 4 5 1 res:1} test event-12.6 {update -timer, update -notimer} { foreach i [after info] { after cancel $i } set x {} after idle {lappend x idle.0} update -timer after 0 {lappend x 0a} update -notimer after idle { lappend x idle.1a; after 0 {lappend x 0b}; after idle {lappend x idle.1b} } after 50 {lappend x 1; after idle {lappend x idle.2}} update -timer lappend x 2 update -timer -idle lappend x 3 after idle {lappend x idle.3} after 0 {lappend x 4} after 0 {lappend x 5} update -timer -idle lappend x 6 update lappend x res:[vwait 500 x] update -noidle lappend x 7 update set x } {idle.0 0a 2 idle.1a 0b idle.1b 3 4 5 idle.3 6 1 res:1 7 idle.2} test event-13.1 {Tcl_WaitForFile procedure, readable} {testfilehandler} { foreach i [after info] { after cancel $i } after 100 set x timeout testfilehandler close testfilehandler create 1 off off |
︙ |
Changes to tests/info.test.
︙ | |||
769 770 771 772 773 774 775 | 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | - - - - - - - - - - + + + + + + + + + + | ## The line 1967 is off by 5 from the true value of 1972. This is a knownBug, see testcase 30.0 |
︙ |
Changes to tests/interp.test.
︙ | |||
3472 3473 3474 3475 3476 3477 3478 | 3472 3473 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 | - + - + + + - + - - - - + + + + + + + + + - + | interp delete slave } -result {foo bar soom} test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup { interp create slave slave alias handler handler slave bgerror handler |
︙ |
Changes to tests/io.test.
︙ | |||
2877 2878 2879 2880 2881 2882 2883 | 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 | - + + | close $f exec [interpreter] $path(script) set f [open $path(test1) r] set r [read $f] close $f set r } "hello\nbye\nstrange\n" |
︙ | |||
2906 2907 2908 2909 2910 2911 2912 | 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 | - + + - + + + + + + + + + + + | set x done } elseif {([string length $l] > 0) || ![fblocked $s]} { incr c } } set ss [socket -server [namespace code accept] -myaddr 127.0.0.1 0] set cs [socket 127.0.0.1 [lindex [fconfigure $ss -sockname] 2]] |
︙ |
Changes to tests/link.test.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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 | + + + + + + + + + + + | } testConstraint testlink [llength [info commands testlink]] foreach i {int real bool string} { catch {unset $i} } test link-0.1 {leak test} {testlink} { interp create i load {} Tcltest i i eval { testlink create 1 0 0 0 0 0 0 0 0 0 0 0 0 0 namespace delete :: } interp delete i } {} test link-1.1 {reading C variables from Tcl} {testlink} { testlink delete testlink set 43 1.23 4 - 12341234 64 250 30000 60000 0xbeefbabe 12321 32123 3.25 1231231234 testlink create 1 1 1 1 1 1 1 1 1 1 1 1 1 1 list $int $real $bool $string $wide } {43 1.23 1 NULL 12341234} test link-1.2 {reading C variables from Tcl} {testlink} { |
︙ |
Changes to tests/socket.test.
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | + + + + | # server will be performed; otherwise, it will attempt to start the remote # server (via exec) on platforms that support this, on the local host, # listening at port 2048. If all fails, a message is printed and the tests # using the remote server are not performed. package require tcltest 2 namespace import -force ::tcltest::* if {[expr {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]}]} { return } # Some tests require the testthread and exec commands testConstraint testthread [llength [info commands testthread]] testConstraint exec [llength [info commands exec]] # Produce a random port number in the Dynamic/Private range # from 49152 through 65535. |
︙ | |||
1764 1765 1766 1767 1768 1769 1770 | 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 | - + - + - + | puts $commandSocket exit flush $commandSocket } catch {close $commandSocket} catch {close $remoteProcChan} test socket-14.13 {testing writable event when quick failure} -constraints {socket win supported_inet} -body { # Test for bug 336441ed59 where a quick background fail was ignored |
︙ |
Changes to tests/timer.test.
︙ | |||
13 14 15 16 17 18 19 | 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 | + + + - - + + + + + + + + + + + + + + + + + + + - - + - - + - - - + - - + - - + - + - + - - + - - + - - + - - + - - + - - - + + - - + - - + - - + - - - + - - - + - - + - + + + + + - - + + + - - + + + + - - + + - - + + - + - - + - - + - + - - + - - + - + - - + - - - + + - + - + - + - - + - - - + - - - + - - + + - - + + - - + - | # 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 namespace import -force ::tcltest::* } # On some platforms the short tolerance (in percent to wait-time) used to avoid # busy waiting, so it may cause on the fast mashines, that waiting interupts a bit # earlier as expected ("rounded" to this tolerance boundary). |
︙ | |||
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - - - + - | set event1 [after idle event 1] set event2 [after 1000 event 2] interp create x set childEvent [x eval {after idle event in child}] test timer-6.19 {Tcl_AfterCmd, info option} { lsort [after info] } [lsort "$event1 $event2"] test timer-6.19.1 {Tcl_AfterCmd, info option (all events in child)} { x eval {after info} } [list $childEvent] test timer-6.20 {Tcl_AfterCmd, info option} { list [catch {after info a b} msg] $msg } {1 {wrong # args: should be "after info ?id?"}} test timer-6.21 {Tcl_AfterCmd, info option} { list [catch {after info $childEvent} msg] $msg } "1 {event \"$childEvent\" doesn't exist}" test timer-6.21.1 {Tcl_AfterCmd, info option (internal representation)} { list [catch {x eval [list after info $childEvent]} msg] $msg } {0 {{event in child} idle}} test timer-6.21.1 {Tcl_AfterCmd, info option (internal representation)} { list [catch {x eval [list after info $childEvent]} msg] $msg } {0 {{event in child} idle}} test timer-6.21.2 {Tcl_AfterCmd, info option (search using string representation)} { list [catch {x eval [list after info [string trim " $childEvent "]]} msg] $msg } {0 {{event in child} idle}} test timer-6.22 {Tcl_AfterCmd, info option} { list [after info $event1] [after info $event2] } {{{event 1} idle} {{event 2} timer}} test timer-6.22.1 {Tcl_AfterCmd, cancel option (internal representation)} { after cancel $childEvent; # foreign event - does nothing # check still available: list [catch {x eval [list after info $childEvent]} msg] $msg } {0 {{event in child} idle}} test timer-6.22.2 {Tcl_AfterCmd, cancel option (search using string representation)} { after cancel [string trim " $childEvent "]; # foreign event - does nothing # check still available: set lst [list [catch {x eval [list after info $childEvent]} msg] $msg] # cancel again but in child: x eval [list after cancel [string trim " $childEvent "]] # check it was canceled: lappend lst {*}[list [catch {x eval [list after info $childEvent]} msg] $msg] } [list 0 {{event in child} idle} 1 "event \"$childEvent\" doesn't exist"] after cancel $event1 after cancel $event2 interp delete x test timer-6.23 {Tcl_AfterCmd procedure, no option, script with NULL} { |
︙ | |||
442 443 444 445 446 447 448 | 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 | - - + + - - + + - - + - - + + - - + - - + + - - + + - - + - - + - - + + - - + + - + - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | } "1 {event \"afterx[expr $id+1]\" doesn't exist}" after cancel $event test timer-8.1 {AfterProc procedure} { set x before proc foo {} { set x untouched |
Changes to tools/uniParse.tcl.
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | set last [expr {[llength $pMap] - 1}] for {set i 0} {$i <= $last} {incr i} { if {$i == [expr {0x10000 >> $shift}]} { set line [string trimright $line " \t,"] puts $f $line set lastpage [expr {[lindex $line end] >> $shift}] puts stdout "lastpage: $lastpage" |
︙ | |||
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + | set line " " set lasti [expr {[llength $pages] - 1}] for {set i 0} {$i <= $lasti} {incr i} { set page [lindex $pages $i] set lastj [expr {[llength $page] - 1}] if {$i == ($lastpage + 1)} { puts $f [string trimright $line " \t,"] |
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 | - + | puts $f [string trimright $line] set line " " } } puts $f $line puts -nonewline $f "}; |
︙ | |||
397 398 399 400 401 402 403 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 | - + | #define GetDelta(info) ((info) >> 8) /* * This macro extracts the information about a character from the * Unicode character tables. */ |
Changes to unix/configure.
more than 10,000 changes
Changes to unix/configure.in.
︙ | |||
515 516 517 518 519 520 521 | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | - - | AC_CHECK_FUNCS(OSSpinLockLock) fi AC_DEFINE(USE_VFORK, 1, [Should we use vfork() instead of fork()?]) AC_DEFINE(TCL_DEFAULT_ENCODING, "utf-8", [Are we to override what our default encoding is?]) AC_DEFINE(TCL_LOAD_FROM_MEMORY, 1, [Can this platform load code from memory?]) |
︙ | |||
563 564 565 566 567 568 569 570 571 572 573 574 575 576 | 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | + + + + + | # Build .bundle dltest binaries in addition to .dylib DLTEST_LD='${CC} -bundle -Wl,-w ${CFLAGS} ${LDFLAGS}' DLTEST_SUFFIX=".bundle" else DLTEST_LD='${SHLIB_LD}' DLTEST_SUFFIX="" fi # Completelly supports on unix (linux/darwin) AC_DEFINE(TCL_WIDE_CLICKS, 1, [Does this platform have wide high-resolution clicks?]) #-------------------------------------------------------------------- # Check for support of fts functions (readdir replacement) #-------------------------------------------------------------------- AC_CACHE_CHECK([for fts], tcl_cv_api_fts, [ AC_TRY_LINK([ |
︙ |
Changes to unix/tclUnixEvent.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ #include "tclInt.h" #ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is * in tclMacOSXNotify.c */ |
︙ |
Changes to unix/tclUnixNotfy.c.
︙ | |||
106 107 108 109 110 111 112 113 114 | 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | + - + | * that an event is ready to be processed * by sending this event. */ void *hwnd; /* Messaging window. */ #else /* !__CYGWIN__ */ pthread_cond_t waitCV; /* Any other thread alerts a notifier that an * event is ready to be processed by signaling * this condition variable. */ int waitCVMono; /* Mark wait monotonic based */ #endif /* __CYGWIN__ */ int waitCVinitialized; /* Variable to flag initialization of the structure */ |
︙ | |||
328 329 330 331 332 333 334 335 336 337 338 339 340 341 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | + | *---------------------------------------------------------------------- */ ClientData Tcl_InitNotifier(void) { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); pthread_condattr_t wcvAttr, *wcvAttrPtr = NULL; #ifdef TCL_THREADS tsdPtr->eventReady = 0; /* * Initialize thread specific condition variable for this thread. */ |
︙ | |||
357 358 359 360 361 362 363 | 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | + + + + + + - + + | RegisterClassW(&class); tsdPtr->hwnd = CreateWindowExW(NULL, class.lpszClassName, class.lpszClassName, 0, 0, 0, 0, 0, NULL, NULL, TclWinGetTclInstance(), NULL); tsdPtr->event = CreateEventW(NULL, 1 /* manual */, 0 /* !signaled */, NULL); #else pthread_condattr_init(&wcvAttr); if (pthread_condattr_setclock(&wcvAttr, CLOCK_MONOTONIC) == 0) { /* we can use conditional wait monotonic based */ wcvAttrPtr = &wcvAttr; tsdPtr->waitCVMono = 1; } |
︙ | |||
488 489 490 491 492 493 494 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | - + | Tcl_AlertNotifier( ClientData clientData) { #ifdef TCL_THREADS ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData; pthread_mutex_lock(¬ifierMutex); |
︙ | |||
818 819 820 821 822 823 824 | 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 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | return DefWindowProcW(hwnd, message, wParam, lParam); } /* * Process all of the runnable events. */ |
︙ | |||
847 848 849 850 851 852 853 | 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 | - - + + - + - + + + + + + + - - - + + + + + + - - + + - - + + | */ int Tcl_WaitForEvent( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { FileHandler *filePtr; |
︙ | |||
917 918 919 920 921 922 923 | 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 | - - - - - - + + + + + + + - - - - - - + - - - + + + + - | * interested threads, signal the notifier thread, and wait for a * response or a timeout. */ StartNotifierThread("Tcl_WaitForEvent"); pthread_mutex_lock(¬ifierMutex); |
︙ | |||
965 966 967 968 969 970 971 972 973 974 975 976 | 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 | + + - - + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + - - + + - + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + - + - + | tsdPtr->onList = 1; if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { Tcl_Panic("Tcl_WaitForEvent: %s", "unable to write to triggerPipe"); } } nowait: FD_ZERO(&tsdPtr->readyMasks.readable); FD_ZERO(&tsdPtr->readyMasks.writable); FD_ZERO(&tsdPtr->readyMasks.exception); |
︙ | |||
1044 1045 1046 1047 1048 1049 1050 | 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 | - + - + | tsdPtr->onList = 0; if ((write(triggerPipe, "", 1) == -1) && (errno != EAGAIN)) { Tcl_Panic("Tcl_WaitForEvent: %s", "unable to write to triggerPipe"); } } |
︙ | |||
1268 1269 1270 1271 1272 1273 1274 | 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 | - + | && FD_ISSET(i, &exceptionMask)) { FD_SET(i, &tsdPtr->readyMasks.exception); found = 1; } } if (found || (tsdPtr->pollState & POLL_DONE)) { |
︙ |
Changes to unix/tclUnixTime.c.
︙ | |||
100 101 102 103 104 105 106 | 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 | + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | * *---------------------------------------------------------------------- */ Tcl_WideInt TclpGetMicroseconds(void) { if (tclGetTimeProcPtr == NativeGetTime) { struct timeval tv; (void) gettimeofday(&tv, NULL); return ((Tcl_WideInt)tv.tv_sec)*1000000 + tv.tv_usec; } else { |
︙ | |||
128 129 130 131 132 133 134 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - - + - - - - - - - - - - - - - + - - - - - - - - - | * *---------------------------------------------------------------------- */ unsigned long TclpGetClicks(void) { |
︙ | |||
179 180 181 182 183 184 185 | 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 | - + + + + + + + + + + + + + + + + - - - - - - | */ Tcl_WideInt TclpGetWideClicks(void) { Tcl_WideInt now; |
︙ | |||
218 219 220 221 222 223 224 | 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 | - - + + + + - - + + - - + + + + + + | double TclpWideClicksToNanoseconds( Tcl_WideInt clicks) { double nsec; |
︙ | |||
263 264 265 266 267 268 269 | 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 | - - + + + + - - + + - - + + + | * *---------------------------------------------------------------------- */ double TclpWideClickInMicrosec(void) { |
︙ | |||
624 625 626 627 628 629 630 631 632 633 634 635 636 637 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + | static void NativeScaleTime( Tcl_Time *timePtr, ClientData clientData) { /* Native scale is 1:1. Nothing is done */ } /* *---------------------------------------------------------------------- * * TclpScaleUTime -- * * This procedure scales number of microseconds if expected. * * Results: * Number of microseconds scaled using tclScaleTimeProcPtr. * *---------------------------------------------------------------------- */ void TclpScaleUTime( Tcl_WideInt *usec) { /* Native scale is 1:1. */ if (tclScaleTimeProcPtr == NativeScaleTime) { return; } else { Tcl_Time scTime; scTime.sec = *usec / 1000000; scTime.usec = *usec % 1000000; tclScaleTimeProcPtr(&scTime, tclTimeClientData); *usec = ((Tcl_WideInt)scTime.sec) * 1000000 + scTime.usec; } } /* *---------------------------------------------------------------------- * * NativeGetTime -- * * TIP #233: Gets the current system time in seconds and microseconds |
︙ |
Changes to win/tclWinNotify.c.
︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + | * The follwing static indicates whether this module has been initialized. */ #define INTERVAL_TIMER 1 /* Handle of interval timer. */ #define WM_WAKEUP WM_USER /* Message that is send by * Tcl_AlertNotifier. */ /* * The following static structure contains the state information for the * Windows implementation of the Tcl notifier. One of these structures is * created for each thread that is using the notifier. */ typedef struct ThreadSpecificData { |
︙ | |||
112 113 114 115 116 117 118 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + | tsdPtr->pending = 0; tsdPtr->timerActive = 0; InitializeCriticalSection(&tsdPtr->crit); tsdPtr->hwnd = NULL; tsdPtr->thread = GetCurrentThreadId(); |
︙ | |||
390 391 392 393 394 395 396 397 398 399 400 401 402 403 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | /* * Process all of the runnable events. */ Tcl_ServiceAll(); return 0; } /* * Timer resolution primitives */ typedef int (CALLBACK* LPFN_NtQueryTimerResolution)(PULONG,PULONG,PULONG); typedef int (CALLBACK* LPFN_NtSetTimerResolution)(ULONG,BOOLEAN,PULONG); static LPFN_NtQueryTimerResolution NtQueryTimerResolution = NULL; static LPFN_NtSetTimerResolution NtSetTimerResolution = NULL; #define TMR_RES_MICROSEC (1000 / 100) static struct { int available; /* Availability of timer resolution functions */ ULONG minRes; /* Lowest possible resolution (in 100-ns) */ ULONG maxRes; /* Highest possible resolution (in 100-ns) */ ULONG curRes; /* Current resolution (in 100-ns units). */ ULONG resRes; /* Resolution to be restored (delayed restore) */ LONG minDelay; /* Lowest delay by max resolution (in microsecs) */ LONG maxDelay; /* Highest delay by min resolution (in microsecs) */ size_t count; /* Waiter count (used to restore the resolution) */ Tcl_WideInt timeToReset; /* Time to reset resolution (typically now + 5s) */ CRITICAL_SECTION cs; /* Mutex guarding this structure. */ } timerResolution = { -1, 15600 * TMR_RES_MICROSEC, 500 * TMR_RES_MICROSEC, 15600 * TMR_RES_MICROSEC, 0, 500, 15600, 0, (Tcl_WideInt)0x7FFFFFFFFFFFFFFFL }; /* *---------------------------------------------------------------------- * * InitTimerResolution -- * * This function initializes the timer resolution functionality. * * Results: * None. * * Side effects: * None. * *---------------------------------------------------------------------- */ static void InitTimerResolution(void) { if (timerResolution.available == -1) { TclpInitLock(); if (timerResolution.available == -1) { HMODULE hLib = GetModuleHandle("Ntdll"); if (hLib) { NtQueryTimerResolution = (LPFN_NtQueryTimerResolution)GetProcAddress(hLib, "NtQueryTimerResolution"); NtSetTimerResolution = (LPFN_NtSetTimerResolution)GetProcAddress(hLib, "NtSetTimerResolution"); if ( NtSetTimerResolution && NtQueryTimerResolution && NtQueryTimerResolution(&timerResolution.minRes, &timerResolution.maxRes, &timerResolution.curRes) == 0 ) { InitializeCriticalSection(&timerResolution.cs); timerResolution.resRes = timerResolution.curRes; timerResolution.minRes -= (timerResolution.minRes % TMR_RES_MICROSEC); timerResolution.minDelay = timerResolution.maxRes / TMR_RES_MICROSEC; timerResolution.maxDelay = timerResolution.minRes / TMR_RES_MICROSEC; if (timerResolution.maxRes <= 1000 * TMR_RES_MICROSEC) { timerResolution.available = 1; } } } if (timerResolution.available <= 0) { /* not available, set min/max to typical values on windows */ timerResolution.minRes = 15600 * TMR_RES_MICROSEC; timerResolution.maxRes = 500 * TMR_RES_MICROSEC; timerResolution.minDelay = timerResolution.maxRes / TMR_RES_MICROSEC; timerResolution.maxDelay = timerResolution.minRes / TMR_RES_MICROSEC; timerResolution.available = 0; } } TclpInitUnlock(); } } /* *---------------------------------------------------------------------- * * SetTimerResolution -- * * This is called by Tcl_WaitForEvent to increase timer resolution if wait * for events with time smaller as the typical windows value (ca. 15ms). * * Results: * Returns previous value of timer resolution, used for restoring with * RestoreTimerResolution. * * Side effects: * Note that timer resolution takes affect for the whole process (accross * all threads). * *---------------------------------------------------------------------- */ static unsigned long SetTimerResolution( unsigned long newResolution, unsigned long actualResolution ) { /* if available */ if (timerResolution.available > 0) { if (newResolution < timerResolution.maxRes) { newResolution = timerResolution.maxRes; } EnterCriticalSection(&timerResolution.cs); if (!actualResolution) { timerResolution.count++; actualResolution = timerResolution.curRes; } if (newResolution < timerResolution.curRes) { ULONG curRes; if (NtSetTimerResolution(newResolution, TRUE, &curRes) == 0) { timerResolution.curRes = curRes; } } LeaveCriticalSection(&timerResolution.cs); return actualResolution; } /* resolution unchanged (and counter not increased) */ return 0; } /* *---------------------------------------------------------------------- * * RestoreTimerResolution -- * * This is called by Tcl_WaitForEvent to restore timer resolution to * previous value. * * Results: * None. * * Side effects: * Because timer resolution takes affect for the whole process, it can * remain max resolution after execution of this function (if some thread * still waits with the highest timer resolution). * *---------------------------------------------------------------------- */ static void RestoreTimerResolution( unsigned long newResolution ) { /* if available */ if (timerResolution.available > 0 && newResolution) { EnterCriticalSection(&timerResolution.cs); if (timerResolution.count-- <= 1) { timerResolution.resRes = newResolution; /* prolong time to reset resolution */ timerResolution.timeToReset = TclpGetMicroseconds() + 1000000; } LeaveCriticalSection(&timerResolution.cs); } } /* *---------------------------------------------------------------------- * * TclWinResetTimerResolution -- * * This is called to delayed reset (after 1 second) of the timer resolution * to original value, if no more waiting workers using precise resolution. * * Results: * None. * * Side effects: * None. * *---------------------------------------------------------------------- */ void TclWinResetTimerResolution(void) { if ( timerResolution.available > 0 && timerResolution.count == 0 && timerResolution.resRes > timerResolution.curRes && TclpGetMicroseconds() >= timerResolution.timeToReset ) { EnterCriticalSection(&timerResolution.cs); if (timerResolution.count == 0 && timerResolution.resRes > timerResolution.curRes) { ULONG curRes; if (NtSetTimerResolution(timerResolution.resRes, TRUE, &curRes) == 0) { timerResolution.curRes = curRes; }; timerResolution.timeToReset = 0x7FFFFFFFFFFFFFFFL; } LeaveCriticalSection(&timerResolution.cs); } } /* *---------------------------------------------------------------------- * * Tcl_WaitForEvent -- * * This function is called by Tcl_DoOneEvent to wait for new events on |
︙ | |||
416 417 418 419 420 421 422 | 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 | - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + - - + + | int Tcl_WaitForEvent( Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); MSG msg; |
︙ | |||
506 507 508 509 510 511 512 | 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 | + - - + + + + + + + + + + - + + + + + + + - + - + + + - - + + - - + - - - + - - - + - - - - - - - + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - - - + + + + + | status = -1; } else { TranslateMessage(&msg); DispatchMessage(&msg); status = 1; } } |
Changes to win/tclWinTime.c.
︙ | |||
12 13 14 15 16 17 18 | 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 | - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - + - - - - - - - - - + - - - + + - + - - - - + + + - - + - - - + - - - + + + - + - - - - - - - - + - - - + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | #include "tclInt.h" #define SECSPERDAY (60L * 60L * 24L) #define SECSPERYEAR (SECSPERDAY * 365L) #define SECSPER4YEAR (SECSPERYEAR * 4L + SECSPERDAY) |
︙ | |||
167 168 169 170 171 172 173 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - - - - + + - - | * *---------------------------------------------------------------------- */ unsigned long TclpGetSeconds(void) { |
︙ | |||
204 205 206 207 208 209 210 | 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | - - - + - - - + | * *---------------------------------------------------------------------- */ unsigned long TclpGetClicks(void) { |
︙ | |||
327 328 329 330 331 332 333 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + - - - - - + + + - + | * *---------------------------------------------------------------------- */ Tcl_WideInt TclpGetMicroseconds(void) { /* Use high resolution timer if possible */ if (tclGetTimeProcPtr == NativeGetTime) { return NativeGetMicroseconds(0); } else { /* * Use the Tcl_GetTime abstraction to get the time in microseconds, as * nearly as we can, and return it. */ Tcl_Time now; tclGetTimeProcPtr(&now, tclTimeClientData); /* Tcl_GetTime inlined */ return TCL_TIME_TO_USEC(now); } } /* *---------------------------------------------------------------------- * * TclpGetUTimeMonotonic -- * * This procedure returns the number of microseconds from some unspecified * starting point. * This time is monotonic (not affected by the time-jumps), so can be used * for relative wait purposes and relative time calculation. * * Results: * Monotonic time in microseconds. * * Side effects: * None. * *---------------------------------------------------------------------- */ |
︙ | |||
402 403 404 405 406 407 408 | 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | - - - - + + - - - + + | *---------------------------------------------------------------------- */ void Tcl_GetTime( Tcl_Time *timePtr) /* Location to store time information. */ { |
︙ | |||
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 | 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 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - + - - - - - - - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + | * Native scale is 1:1. Nothing is done. */ } /* *---------------------------------------------------------------------- * * TclpScaleUTime -- * * This procedure scales number of microseconds if expected. * * Results: * Number of microseconds scaled using tclScaleTimeProcPtr. * *---------------------------------------------------------------------- */ void TclpScaleUTime( Tcl_WideInt *usec) { /* Native scale is 1:1. */ if (tclScaleTimeProcPtr == NativeScaleTime) { return; } else { Tcl_Time scTime; scTime.sec = *usec / 1000000; scTime.usec = *usec % 1000000; tclScaleTimeProcPtr(&scTime, tclTimeClientData); *usec = ((Tcl_WideInt)scTime.sec) * 1000000 + scTime.usec; } } /* *---------------------------------------------------------------------- * * NativeGetMicroseconds -- * * Gets the current system time in microseconds since the beginning * of the epoch: 00:00 UCT, January 1, 1970. * * Results: * Returns the wide integer with number of microseconds from the epoch, or * 0 if high resolution timer is not available. * * Side effects: * On the first call, initializes a set of static variables to keep track * of the base value of the performance counter, the corresponding wall * clock (obtained through ftime) and the frequency of the performance * counter. Also spins a thread whose function is to wake up periodically * and monitor these values, adjusting them as necessary to correct for * drift in the performance counter's oscillator. * *---------------------------------------------------------------------- */ |
︙ | |||
528 529 530 531 532 533 534 | 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 | - - + + - + + + - - + + + + + - - - - - + + + + + + + + + - + - - - - - - + + + + - - + - - - - - - - - - + + + - - + + + + + + + + + + - - + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + - - + + + + + + + + - - - + + + + + + + + - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + + + + + - - - - - + + + + + + + + + - + + + + + + + + + + - + + + | */ #if !defined(_WIN64) if (timeInfo.perfCounterAvailable /* * The following lines would do an exact match on crystal * frequency: |
︙ | |||
672 673 674 675 676 677 678 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | - + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | */ static void NativeGetTime( Tcl_Time *timePtr, ClientData clientData) { |
︙ | |||
1045 1046 1047 1048 1049 1050 1051 | 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | tmPtr->tm_wday %= 7; if (tmPtr->tm_wday < 0) { tmPtr->tm_wday += 7; } return tmPtr; } |
︙ |