Differences From Artifact [a36d72dfed]:
- File generic/tclDate.c — part of check-in [5b16c75353] at 2017-01-10 22:07:37 on branch sebres-trunk-clock-speedup — [temp-commit]: tclClockFmt.c - 1st try using "timerate" instead "time" by performance measurement tests (more precise and fixed time, so no switch of factor expected) (user: sebres size: 78271)
To Artifact [62150ab5f3]:
- File generic/tclDate.c — part of check-in [00cf5b57cd] at 2017-01-10 22:10:44 on branch sebres-trunk-clock-speedup — [temp-commit]: tclClockFmt.c - amend for 2nd try (with cherry picking of tclSE incompatible facilities) Prepared for common usage of both scan commands - free scan / scan with format (currently faked via eval to __org_scan); test cases passed. (user: sebres size: 77352)
| ︙ | ︙ | |||
105 106 107 108 109 110 111 | */ #include "tclDate.h" #define YYMALLOC ckalloc #define YYFREE(x) (ckfree((void*) (x))) | < < < < < < < < < < < < < < < < < < < < < < < < < | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | */ #include "tclDate.h" #define YYMALLOC ckalloc #define YYFREE(x) (ckfree((void*) (x))) #define EPOCH 1970 #define START_OF_TIME 1902 #define END_OF_TIME 2037 /* * The offset of tm_year of struct tm returned by localtime, gmtime, etc. * Posix requires 1900. |
| ︙ | ︙ | |||
566 567 568 569 570 571 572 |
13, 39, -1, 39, -1, 21, -1, 25, -1, 11,
-1, 18, -1, 9, -1, 13, -1, -1, 7, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
| > | | | < > | < | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
13, 39, -1, 39, -1, 21, -1, 25, -1, 11,
-1, 18, -1, 9, -1, 13, -1, -1, 7, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 152, 152, 153, 156, 159, 162, 165, 168, 171,
174, 178, 183, 186, 192, 198, 206, 212, 223, 227,
231, 237, 241, 245, 249, 253, 259, 263, 268, 273,
278, 283, 287, 292, 296, 301, 308, 312, 318, 327,
336, 346, 360, 365, 368, 371, 374, 377, 380, 385,
388, 393, 397, 401, 407, 425, 428
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
|
| ︙ | ︙ | |||
1838 1839 1840 1841 1842 1843 1844 |
yyYear = (yyvsp[(3) - (3)].Number);
;}
break;
case 36:
{
| | | | | | 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 |
yyYear = (yyvsp[(3) - (3)].Number);
;}
break;
case 36:
{
yyMonthOrdinalIncr = 1;
yyMonthOrdinal = (yyvsp[(2) - (2)].Number);
;}
break;
case 37:
{
yyMonthOrdinalIncr = (yyvsp[(2) - (3)].Number);
yyMonthOrdinal = (yyvsp[(3) - (3)].Number);
;}
break;
case 38:
{
if ((yyvsp[(2) - (3)].Number) != HOUR( 7)) YYABORT;
|
| ︙ | ︙ | |||
2718 2719 2720 2721 2722 2723 2724 |
yyHaveTime = 0;
yyHour = 0; yyMinutes = 0; yySeconds = 0; yyMeridian = MER24;
yyHaveZone = 0;
yyTimezone = 0; yyDSTmode = DSTmaybe;
yyHaveOrdinalMonth = 0;
| | | 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 |
yyHaveTime = 0;
yyHour = 0; yyMinutes = 0; yySeconds = 0; yyMeridian = MER24;
yyHaveZone = 0;
yyTimezone = 0; yyDSTmode = DSTmaybe;
yyHaveOrdinalMonth = 0;
yyMonthOrdinalIncr = 0;
yyHaveDay = 0;
yyDayOrdinal = 0; yyDayNumber = 0;
yyHaveRel = 0;
yyRelMonth = 0; yyRelDay = 0; yyRelSeconds = 0; yyRelPointer = NULL;
|
| ︙ | ︙ | |||
2869 2870 2871 2872 2873 2874 2875 |
Tcl_NewIntObj((int) yyDayNumber));
}
Tcl_ListObjAppendElement(interp, result, resultElement);
resultElement = Tcl_NewObj();
if (yyHaveOrdinalMonth) {
Tcl_ListObjAppendElement(interp, resultElement,
| | | | 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 |
Tcl_NewIntObj((int) yyDayNumber));
}
Tcl_ListObjAppendElement(interp, result, resultElement);
resultElement = Tcl_NewObj();
if (yyHaveOrdinalMonth) {
Tcl_ListObjAppendElement(interp, resultElement,
Tcl_NewIntObj((int) yyMonthOrdinalIncr));
Tcl_ListObjAppendElement(interp, resultElement,
Tcl_NewIntObj((int) yyMonthOrdinal));
}
Tcl_ListObjAppendElement(interp, result, resultElement);
Tcl_SetObjResult(interp, result);
return TCL_OK;
}
|
| ︙ | ︙ |