summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-07-14 17:29:09 (GMT)
committerkjnash <k.j.nash@usa.net>2020-07-14 17:29:09 (GMT)
commitab138d729bee33a3f0274e72b5cdb0bb2e83c168 (patch)
tree6a9f050cd4e01e010593e929b8470bdf81b6c556
parenteeb4747a4dc3cef279db5fd9c9415ebca8091b72 (diff)
parente152f1757cded2998c7928799246c3ce9ed401a0 (diff)
downloadtcl-ab138d729bee33a3f0274e72b5cdb0bb2e83c168.zip
tcl-ab138d729bee33a3f0274e72b5cdb0bb2e83c168.tar.gz
tcl-ab138d729bee33a3f0274e72b5cdb0bb2e83c168.tar.bz2
Merge 8.7
-rw-r--r--.fossil-settings/binary-glob3
-rw-r--r--doc/Tcl.n5
-rw-r--r--doc/dict.n14
-rw-r--r--generic/tclDate.c250
-rw-r--r--generic/tclGetDate.y21
-rw-r--r--library/tm.tcl5
-rw-r--r--tests/auto-files.zipbin0 -> 4447 bytes
-rw-r--r--tests/auto0/auto1/file1.tcl3
-rw-r--r--tests/auto0/auto1/package1.tcl5
-rw-r--r--tests/auto0/auto1/pkgIndex.tcl11
-rw-r--r--tests/auto0/auto1/tclIndex9
-rw-r--r--tests/auto0/auto2/file2.tcl3
-rw-r--r--tests/auto0/auto2/package2.tcl5
-rw-r--r--tests/auto0/auto2/pkgIndex.tcl11
-rw-r--r--tests/auto0/auto2/tclIndex9
-rw-r--r--tests/auto0/modules/mod1/test1-1.0.tm5
-rw-r--r--tests/auto0/modules/mod2/test2-2.0.tm5
-rw-r--r--tests/auto0/modules/test0-0.5.tm5
-rw-r--r--tests/clock.test101
-rw-r--r--tests/pkgIndex.tcl2
-rw-r--r--tests/safe.test5
21 files changed, 273 insertions, 204 deletions
diff --git a/.fossil-settings/binary-glob b/.fossil-settings/binary-glob
index a6eec26..aaffb5f 100644
--- a/.fossil-settings/binary-glob
+++ b/.fossil-settings/binary-glob
@@ -24,6 +24,5 @@ libtommath/win64/libtommath.dll.a
*.jpg
*.lib
*.pdf
-*.png
-*.xlsx
+*.png*.xlsx
*.zip
diff --git a/doc/Tcl.n b/doc/Tcl.n
index 0eb51b9..48a3488 100644
--- a/doc/Tcl.n
+++ b/doc/Tcl.n
@@ -223,7 +223,10 @@ before this range overflows, or when the maximum of eight digits
is reached. The upper bits of the Unicode character will be 0.
.RS
.PP
-The range U+010000\(enU+10FFFD is reserved for the future.
+The range U+00D800\(enU+00DFFF is reserved for surrogates, which
+are illegal on its own. Therefore, such sequences will result in
+the replacement character U+FFFD. Surrogate pairs should be
+encoded as single \e\fBU\fIhhhhhhhh\fR character.
.RE
.PP
Backslash substitution is not performed on words enclosed in braces,
diff --git a/doc/dict.n b/doc/dict.n
index ff56b22..e06947b 100644
--- a/doc/dict.n
+++ b/doc/dict.n
@@ -28,7 +28,7 @@ writing the resulting dictionary value back to that variable.
Non-existent keys are treated as if they map to an empty string. The
updated dictionary value is returned.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the appending operation.
.VE TIP508
@@ -142,7 +142,7 @@ are treated as if they map to 0. It is an error to increment a value
for an existing key if that value is not an integer. The updated
dictionary value is returned.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the incrementing operation.
.VE TIP508
@@ -172,7 +172,7 @@ there to be no items to append to the list. It is an error for the
value that the key maps to to not be representable as a list. The
updated dictionary value is returned.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the list-appending operation.
.VE TIP508
@@ -234,7 +234,7 @@ containing a mapping from the given key to the given value. When
multiple keys are present, this operation creates or updates a chain
of nested dictionaries. The updated dictionary value is returned.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the value insert/update operation.
.VE TIP508
@@ -254,7 +254,7 @@ must be specified, but the last key on the key-path need not exist.
All other components on the path must exist. The updated dictionary
value is returned.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the value remove operation.
.VE TIP508
@@ -274,7 +274,7 @@ or some other kind of exceptional exit. The result of \fBdict
update\fR is (unless some kind of error occurs) the result of the
evaluation of \fIbody\fR.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the update operation.
.VE TIP508
@@ -313,7 +313,7 @@ dictionaries no longer exists. The result of \fBdict with\fR is
(unless some kind of error occurs) the result of the evaluation of
\fIbody\fR.
.VS TIP508
-If \fIdictionaryVarable\fR indicates an element that does not exist of an
+If \fIdictionaryVariable\fR indicates an element that does not exist of an
array that has a default value set, the default value and will be used as the
value of the dictionary prior to the updating operation.
.VE TIP508
diff --git a/generic/tclDate.c b/generic/tclDate.c
index 0e25dbe..e9ef9bd 100644
--- a/generic/tclDate.c
+++ b/generic/tclDate.c
@@ -560,16 +560,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 86
+#define YYLAST 81
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 26
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 16
/* YYNRULES -- Number of rules. */
-#define YYNRULES 57
+#define YYNRULES 56
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 89
+#define YYNSTATES 85
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
@@ -587,7 +587,7 @@ static const yytype_uint8 yytranslate[] =
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, 2, 25, 22, 21, 24, 23, 2, 2,
+ 2, 2, 2, 25, 21, 23, 24, 22, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 20, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -618,11 +618,11 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint16 yyrline[] =
{
0, 223, 223, 224, 227, 230, 233, 236, 239, 242,
- 245, 249, 254, 257, 263, 269, 277, 283, 294, 299,
- 304, 310, 314, 318, 322, 326, 332, 336, 341, 346,
- 351, 356, 360, 365, 369, 374, 381, 385, 391, 401,
- 410, 419, 429, 443, 448, 451, 454, 457, 460, 463,
- 468, 471, 476, 480, 484, 490, 508, 511
+ 245, 249, 254, 257, 263, 269, 277, 282, 287, 291,
+ 297, 301, 305, 309, 313, 319, 323, 328, 333, 338,
+ 343, 347, 352, 356, 361, 368, 372, 378, 388, 397,
+ 406, 416, 430, 435, 438, 441, 444, 447, 450, 455,
+ 458, 463, 467, 471, 477, 495, 498
};
#endif
@@ -634,7 +634,7 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "tAGO", "tDAY", "tDAYZONE", "tID",
"tMERIDIAN", "tMONTH", "tMONTH_UNIT", "tSTARDATE", "tSEC_UNIT",
"tSNUMBER", "tUNUMBER", "tZONE", "tEPOCH", "tDST", "tISOBASE",
- "tDAY_UNIT", "tNEXT", "':'", "'-'", "','", "'/'", "'.'", "'+'",
+ "tDAY_UNIT", "tNEXT", "':'", "','", "'/'", "'-'", "'.'", "'+'",
"$accept", "spec", "item", "time", "zone", "day", "date", "ordMonth",
"iso", "trek", "relspec", "relunits", "sign", "unit", "number",
"o_merid", YY_NULLPTR
@@ -648,14 +648,14 @@ static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 58, 45, 44, 47, 46, 43
+ 58, 44, 47, 45, 46, 43
};
# endif
-#define YYPACT_NINF -22
+#define YYPACT_NINF -18
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-22)))
+ (!!((Yystate) == (-18)))
#define YYTABLE_NINF -1
@@ -666,15 +666,15 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int8 yypact[] =
{
- -22, 2, -22, -21, -22, -4, -22, 1, -22, 22,
- 18, -22, 8, -22, 40, -22, -22, -22, -22, -22,
- -22, -22, -22, -22, -22, -22, 32, 28, -22, -22,
- -22, 24, 26, -22, -22, 42, 47, -5, 49, -22,
- -22, 15, -22, -22, -22, 48, -22, -22, 43, 50,
- 51, -22, 17, 44, 46, 45, 52, -22, -22, -22,
- -22, -22, -22, -22, -22, 56, 57, -22, 58, 60,
- 61, 62, -3, -22, -22, 63, -22, 59, 65, -22,
- 67, 68, -22, 64, -22, 69, 66, 70, -22
+ -18, 2, -18, -17, -18, -4, -18, 10, -18, 22,
+ 8, -18, 18, -18, 39, -18, -18, -18, -18, -18,
+ -18, -18, -18, -18, -18, -18, 25, 21, -18, -18,
+ -18, 16, 14, -18, -18, 28, 36, 41, -5, -18,
+ -18, 5, -18, -18, -18, 47, -18, -18, 42, 46,
+ 48, -18, -6, 40, 43, 44, 49, -18, -18, -18,
+ -18, -18, -18, -18, -18, 50, -18, 51, 55, 57,
+ 58, 65, -18, -18, 59, 54, -18, 62, 63, 60,
+ -18, 64, 61, 66, -18
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -682,29 +682,29 @@ static const yytype_int8 yypact[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 0, 1, 21, 20, 0, 54, 0, 52, 55,
- 19, 34, 28, 53, 0, 50, 51, 3, 4, 5,
- 8, 6, 7, 10, 11, 9, 44, 0, 49, 12,
- 22, 31, 0, 23, 13, 33, 0, 0, 0, 46,
- 18, 0, 41, 25, 36, 0, 47, 43, 0, 0,
- 0, 35, 56, 0, 0, 26, 0, 39, 37, 48,
- 24, 45, 32, 42, 57, 0, 0, 14, 0, 0,
- 0, 0, 56, 15, 29, 30, 27, 0, 0, 16,
- 0, 0, 17, 0, 40, 0, 0, 0, 38
+ 2, 0, 1, 20, 18, 0, 53, 0, 51, 54,
+ 17, 33, 27, 52, 0, 49, 50, 3, 4, 5,
+ 8, 6, 7, 10, 11, 9, 43, 0, 48, 12,
+ 21, 30, 0, 22, 13, 32, 0, 0, 0, 45,
+ 16, 0, 40, 24, 35, 0, 46, 42, 19, 0,
+ 0, 34, 55, 25, 0, 0, 0, 38, 36, 47,
+ 23, 44, 31, 41, 56, 0, 14, 0, 0, 0,
+ 0, 55, 26, 28, 29, 0, 15, 0, 0, 0,
+ 39, 0, 0, 0, 37
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
- -22, -22, -22, -9, -22, 4
+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18,
+ -18, -18, -18, -9, -18, 7
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
-1, 1, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 67
+ 25, 26, 27, 28, 29, 66
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -712,28 +712,28 @@ static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 39, 30, 2, 53, 64, 46, 3, 4, 54, 31,
- 5, 6, 7, 8, 32, 9, 10, 11, 78, 12,
- 13, 14, 41, 15, 64, 42, 33, 16, 56, 34,
- 35, 6, 57, 8, 40, 47, 59, 65, 66, 61,
- 13, 48, 36, 37, 43, 38, 49, 60, 44, 6,
- 50, 8, 6, 45, 8, 51, 58, 6, 13, 8,
- 52, 13, 55, 62, 63, 68, 13, 69, 70, 72,
- 73, 74, 71, 75, 76, 77, 79, 80, 82, 81,
- 83, 84, 86, 88, 85, 0, 87
+ 39, 64, 2, 54, 30, 46, 3, 4, 55, 31,
+ 5, 6, 7, 8, 65, 9, 10, 11, 56, 12,
+ 13, 14, 57, 32, 40, 15, 33, 16, 47, 34,
+ 35, 6, 41, 8, 48, 42, 59, 49, 50, 61,
+ 13, 51, 36, 43, 37, 38, 60, 44, 6, 52,
+ 8, 6, 45, 8, 53, 58, 6, 13, 8, 62,
+ 13, 63, 67, 71, 72, 13, 68, 69, 73, 70,
+ 74, 75, 64, 77, 78, 79, 80, 82, 76, 84,
+ 81, 83
};
-static const yytype_int8 yycheck[] =
+static const yytype_uint8 yycheck[] =
{
- 9, 22, 0, 8, 7, 14, 4, 5, 13, 13,
- 8, 9, 10, 11, 13, 13, 14, 15, 21, 17,
- 18, 19, 14, 21, 7, 17, 4, 25, 13, 7,
- 8, 9, 17, 11, 16, 3, 45, 20, 21, 48,
- 18, 13, 20, 21, 4, 23, 22, 4, 8, 9,
- 24, 11, 9, 13, 11, 13, 8, 9, 18, 11,
- 13, 18, 13, 13, 13, 21, 18, 21, 23, 13,
- 13, 13, 20, 13, 13, 13, 72, 14, 13, 20,
- 13, 13, 13, 13, 20, -1, 20
+ 9, 7, 0, 8, 21, 14, 4, 5, 13, 13,
+ 8, 9, 10, 11, 20, 13, 14, 15, 13, 17,
+ 18, 19, 17, 13, 16, 23, 4, 25, 3, 7,
+ 8, 9, 14, 11, 13, 17, 45, 21, 24, 48,
+ 18, 13, 20, 4, 22, 23, 4, 8, 9, 13,
+ 11, 9, 13, 11, 13, 8, 9, 18, 11, 13,
+ 18, 13, 22, 13, 13, 18, 23, 23, 13, 20,
+ 13, 13, 7, 14, 20, 13, 13, 13, 71, 13,
+ 20, 20
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -741,36 +741,36 @@ static const yytype_int8 yycheck[] =
static const yytype_uint8 yystos[] =
{
0, 27, 0, 4, 5, 8, 9, 10, 11, 13,
- 14, 15, 17, 18, 19, 21, 25, 28, 29, 30,
+ 14, 15, 17, 18, 19, 23, 25, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 22, 13, 13, 4, 7, 8, 20, 21, 23, 39,
- 16, 14, 17, 4, 8, 13, 39, 3, 13, 22,
- 24, 13, 13, 8, 13, 13, 13, 17, 8, 39,
- 4, 39, 13, 13, 7, 20, 21, 41, 21, 21,
- 23, 20, 13, 13, 13, 13, 13, 13, 21, 41,
- 14, 20, 13, 13, 13, 20, 13, 20, 13
+ 21, 13, 13, 4, 7, 8, 20, 22, 23, 39,
+ 16, 14, 17, 4, 8, 13, 39, 3, 13, 21,
+ 24, 13, 13, 13, 8, 13, 13, 17, 8, 39,
+ 4, 39, 13, 13, 7, 20, 41, 22, 23, 23,
+ 20, 13, 13, 13, 13, 13, 41, 14, 20, 13,
+ 13, 20, 13, 20, 13
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 26, 27, 27, 28, 28, 28, 28, 28, 28,
- 28, 28, 28, 29, 29, 29, 29, 29, 30, 30,
- 30, 31, 31, 31, 31, 31, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 33, 33, 34, 34,
- 34, 34, 35, 36, 36, 37, 37, 37, 37, 37,
- 38, 38, 39, 39, 39, 40, 41, 41
+ 28, 28, 28, 29, 29, 29, 30, 30, 30, 30,
+ 31, 31, 31, 31, 31, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 33, 33, 34, 34, 34,
+ 34, 35, 36, 36, 37, 37, 37, 37, 37, 38,
+ 38, 39, 39, 39, 40, 41, 41
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 0, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 2, 4, 5, 6, 7, 2, 1,
- 1, 1, 2, 2, 3, 2, 3, 5, 1, 5,
- 5, 2, 4, 2, 1, 3, 2, 3, 11, 3,
- 7, 2, 4, 2, 1, 3, 2, 2, 3, 1,
- 1, 1, 1, 1, 1, 1, 0, 1
+ 1, 1, 1, 2, 4, 6, 2, 1, 1, 2,
+ 1, 2, 2, 3, 2, 3, 5, 1, 5, 5,
+ 2, 4, 2, 1, 3, 2, 3, 11, 3, 7,
+ 2, 4, 2, 1, 3, 2, 2, 3, 1, 1,
+ 1, 1, 1, 1, 1, 0, 1
};
@@ -1641,12 +1641,10 @@ yyreduce:
case 15:
{
- yyHour = (yyvsp[-4].Number);
- yyMinutes = (yyvsp[-2].Number);
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60);
- ++yyHaveZone;
+ yyHour = (yyvsp[-5].Number);
+ yyMinutes = (yyvsp[-3].Number);
+ yySeconds = (yyvsp[-1].Number);
+ yyMeridian = (yyvsp[0].Meridian);
}
break;
@@ -1654,10 +1652,9 @@ yyreduce:
case 16:
{
- yyHour = (yyvsp[-5].Number);
- yyMinutes = (yyvsp[-3].Number);
- yySeconds = (yyvsp[-1].Number);
- yyMeridian = (yyvsp[0].Meridian);
+ yyTimezone = (yyvsp[-1].Number);
+ if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
+ yyDSTmode = DSTon;
}
break;
@@ -1665,13 +1662,9 @@ yyreduce:
case 17:
{
- yyHour = (yyvsp[-6].Number);
- yyMinutes = (yyvsp[-4].Number);
- yySeconds = (yyvsp[-2].Number);
- yyMeridian = MER24;
+ yyTimezone = (yyvsp[0].Number);
+ if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
yyDSTmode = DSToff;
- yyTimezone = ((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60);
- ++yyHaveZone;
}
break;
@@ -1679,8 +1672,7 @@ yyreduce:
case 18:
{
- yyTimezone = (yyvsp[-1].Number);
- if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
+ yyTimezone = (yyvsp[0].Number);
yyDSTmode = DSTon;
}
@@ -1689,8 +1681,7 @@ yyreduce:
case 19:
{
- yyTimezone = (yyvsp[0].Number);
- if (yyTimezone > HOUR( 12)) yyTimezone -= HOUR(100);
+ yyTimezone = -(yyvsp[-1].Number)*((yyvsp[0].Number) % 100 + ((yyvsp[0].Number) / 100) * 60);
yyDSTmode = DSToff;
}
@@ -1699,22 +1690,13 @@ yyreduce:
case 20:
{
- yyTimezone = (yyvsp[0].Number);
- yyDSTmode = DSTon;
- }
-
- break;
-
- case 21:
-
- {
yyDayOrdinal = 1;
yyDayNumber = (yyvsp[0].Number);
}
break;
- case 22:
+ case 21:
{
yyDayOrdinal = 1;
@@ -1723,7 +1705,7 @@ yyreduce:
break;
- case 23:
+ case 22:
{
yyDayOrdinal = (yyvsp[-1].Number);
@@ -1732,7 +1714,7 @@ yyreduce:
break;
- case 24:
+ case 23:
{
yyDayOrdinal = (yyvsp[-2].Number) * (yyvsp[-1].Number);
@@ -1741,7 +1723,7 @@ yyreduce:
break;
- case 25:
+ case 24:
{
yyDayOrdinal = 2;
@@ -1750,7 +1732,7 @@ yyreduce:
break;
- case 26:
+ case 25:
{
yyMonth = (yyvsp[-2].Number);
@@ -1759,7 +1741,7 @@ yyreduce:
break;
- case 27:
+ case 26:
{
yyMonth = (yyvsp[-4].Number);
@@ -1769,7 +1751,7 @@ yyreduce:
break;
- case 28:
+ case 27:
{
yyYear = (yyvsp[0].Number) / 10000;
@@ -1779,7 +1761,7 @@ yyreduce:
break;
- case 29:
+ case 28:
{
yyDay = (yyvsp[-4].Number);
@@ -1789,7 +1771,7 @@ yyreduce:
break;
- case 30:
+ case 29:
{
yyMonth = (yyvsp[-2].Number);
@@ -1799,7 +1781,7 @@ yyreduce:
break;
- case 31:
+ case 30:
{
yyMonth = (yyvsp[-1].Number);
@@ -1808,7 +1790,7 @@ yyreduce:
break;
- case 32:
+ case 31:
{
yyMonth = (yyvsp[-3].Number);
@@ -1818,7 +1800,7 @@ yyreduce:
break;
- case 33:
+ case 32:
{
yyMonth = (yyvsp[0].Number);
@@ -1827,7 +1809,7 @@ yyreduce:
break;
- case 34:
+ case 33:
{
yyMonth = 1;
@@ -1837,7 +1819,7 @@ yyreduce:
break;
- case 35:
+ case 34:
{
yyMonth = (yyvsp[-1].Number);
@@ -1847,7 +1829,7 @@ yyreduce:
break;
- case 36:
+ case 35:
{
yyMonthOrdinal = 1;
@@ -1856,7 +1838,7 @@ yyreduce:
break;
- case 37:
+ case 36:
{
yyMonthOrdinal = (yyvsp[-1].Number);
@@ -1865,7 +1847,7 @@ yyreduce:
break;
- case 38:
+ case 37:
{
if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT;
@@ -1879,7 +1861,7 @@ yyreduce:
break;
- case 39:
+ case 38:
{
if ((yyvsp[-1].Number) != HOUR( 7) + HOUR(100)) YYABORT;
@@ -1893,7 +1875,7 @@ yyreduce:
break;
- case 40:
+ case 39:
{
if ((yyvsp[-5].Number) != HOUR( 7) + HOUR(100)) YYABORT;
@@ -1907,7 +1889,7 @@ yyreduce:
break;
- case 41:
+ case 40:
{
yyYear = (yyvsp[-1].Number) / 10000;
@@ -1920,7 +1902,7 @@ yyreduce:
break;
- case 42:
+ case 41:
{
/*
@@ -1937,7 +1919,7 @@ yyreduce:
break;
- case 43:
+ case 42:
{
yyRelSeconds *= -1;
@@ -1947,7 +1929,7 @@ yyreduce:
break;
- case 45:
+ case 44:
{
*yyRelPointer += (yyvsp[-2].Number) * (yyvsp[-1].Number) * (yyvsp[0].Number);
@@ -1955,7 +1937,7 @@ yyreduce:
break;
- case 46:
+ case 45:
{
*yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number);
@@ -1963,7 +1945,7 @@ yyreduce:
break;
- case 47:
+ case 46:
{
*yyRelPointer += (yyvsp[0].Number);
@@ -1971,7 +1953,7 @@ yyreduce:
break;
- case 48:
+ case 47:
{
*yyRelPointer += (yyvsp[-1].Number) * (yyvsp[0].Number);
@@ -1979,7 +1961,7 @@ yyreduce:
break;
- case 49:
+ case 48:
{
*yyRelPointer += (yyvsp[0].Number);
@@ -1987,7 +1969,7 @@ yyreduce:
break;
- case 50:
+ case 49:
{
(yyval.Number) = -1;
@@ -1995,7 +1977,7 @@ yyreduce:
break;
- case 51:
+ case 50:
{
(yyval.Number) = 1;
@@ -2003,7 +1985,7 @@ yyreduce:
break;
- case 52:
+ case 51:
{
(yyval.Number) = (yyvsp[0].Number);
@@ -2012,7 +1994,7 @@ yyreduce:
break;
- case 53:
+ case 52:
{
(yyval.Number) = (yyvsp[0].Number);
@@ -2021,7 +2003,7 @@ yyreduce:
break;
- case 54:
+ case 53:
{
(yyval.Number) = (yyvsp[0].Number);
@@ -2030,7 +2012,7 @@ yyreduce:
break;
- case 55:
+ case 54:
{
if (yyHaveTime && yyHaveDate && !yyHaveRel) {
@@ -2051,7 +2033,7 @@ yyreduce:
break;
- case 56:
+ case 55:
{
(yyval.Meridian) = MER24;
@@ -2059,7 +2041,7 @@ yyreduce:
break;
- case 57:
+ case 56:
{
(yyval.Meridian) = (yyvsp[0].Meridian);
diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y
index 88add40..c06e53a 100644
--- a/generic/tclGetDate.y
+++ b/generic/tclGetDate.y
@@ -266,29 +266,12 @@ time : tUNUMBER tMERIDIAN {
yySeconds = 0;
yyMeridian = $4;
}
- | tUNUMBER ':' tUNUMBER '-' tUNUMBER {
- yyHour = $1;
- yyMinutes = $3;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = ($5 % 100 + ($5 / 100) * 60);
- ++yyHaveZone;
- }
| tUNUMBER ':' tUNUMBER ':' tUNUMBER o_merid {
yyHour = $1;
yyMinutes = $3;
yySeconds = $5;
yyMeridian = $6;
}
- | tUNUMBER ':' tUNUMBER ':' tUNUMBER '-' tUNUMBER {
- yyHour = $1;
- yyMinutes = $3;
- yySeconds = $5;
- yyMeridian = MER24;
- yyDSTmode = DSToff;
- yyTimezone = ($7 % 100 + ($7 / 100) * 60);
- ++yyHaveZone;
- }
;
zone : tZONE tDST {
@@ -305,6 +288,10 @@ zone : tZONE tDST {
yyTimezone = $1;
yyDSTmode = DSTon;
}
+ | sign tUNUMBER {
+ yyTimezone = -$1*($2 % 100 + ($2 / 100) * 60);
+ yyDSTmode = DSToff;
+ }
;
day : tDAY {
diff --git a/library/tm.tcl b/library/tm.tcl
index 94ebb46..0ed3f1a 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -237,8 +237,9 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# acceptable to "package vcompare".
continue
}
- if { ([package ifneeded $pkgname $pkgversion] ne {})
- && (![interp issafe])
+
+ if {([package ifneeded $pkgname $pkgversion] ne {})
+ && (![interp issafe])
} {
# There's already a provide script registered for
# this version of this package. Since all units of
diff --git a/tests/auto-files.zip b/tests/auto-files.zip
new file mode 100644
index 0000000..b8bdf88
--- /dev/null
+++ b/tests/auto-files.zip
Binary files differ
diff --git a/tests/auto0/auto1/file1.tcl b/tests/auto0/auto1/file1.tcl
new file mode 100644
index 0000000..bd8b92b
--- /dev/null
+++ b/tests/auto0/auto1/file1.tcl
@@ -0,0 +1,3 @@
+proc report1 {args} {
+ return ok1
+}
diff --git a/tests/auto0/auto1/package1.tcl b/tests/auto0/auto1/package1.tcl
new file mode 100644
index 0000000..32d7c56
--- /dev/null
+++ b/tests/auto0/auto1/package1.tcl
@@ -0,0 +1,5 @@
+proc HeresPackage1 {args} {
+ return OK1
+}
+
+package provide SafeTestPackage1 1.2.3
diff --git a/tests/auto0/auto1/pkgIndex.tcl b/tests/auto0/auto1/pkgIndex.tcl
new file mode 100644
index 0000000..babb6d5
--- /dev/null
+++ b/tests/auto0/auto1/pkgIndex.tcl
@@ -0,0 +1,11 @@
+# Tcl package index file, version 1.1
+# This file is generated by the "pkg_mkIndex" command
+# and sourced either when an application starts up or
+# by a "package unknown" script. It invokes the
+# "package ifneeded" command to set up package-related
+# information so that packages will be loaded automatically
+# in response to "package require" commands. When this
+# script is sourced, the variable $dir must contain the
+# full path name of this file's directory.
+
+package ifneeded SafeTestPackage1 1.2.3 [list source [file join $dir package1.tcl]]
diff --git a/tests/auto0/auto1/tclIndex b/tests/auto0/auto1/tclIndex
new file mode 100644
index 0000000..bbfa6d4
--- /dev/null
+++ b/tests/auto0/auto1/tclIndex
@@ -0,0 +1,9 @@
+# Tcl autoload index file, version 2.0
+# This file is generated by the "auto_mkindex" command
+# and sourced to set up indexing information for one or
+# more commands. Typically each line is a command that
+# sets an element in the auto_index array, where the
+# element name is the name of a command and the value is
+# a script that loads the command.
+
+set auto_index(report1) [list source [file join $dir file1.tcl]]
diff --git a/tests/auto0/auto2/file2.tcl b/tests/auto0/auto2/file2.tcl
new file mode 100644
index 0000000..5bc622f
--- /dev/null
+++ b/tests/auto0/auto2/file2.tcl
@@ -0,0 +1,3 @@
+proc report2 {args} {
+ return ok2
+}
diff --git a/tests/auto0/auto2/package2.tcl b/tests/auto0/auto2/package2.tcl
new file mode 100644
index 0000000..61774df
--- /dev/null
+++ b/tests/auto0/auto2/package2.tcl
@@ -0,0 +1,5 @@
+proc HeresPackage2 {args} {
+ return OK2
+}
+
+package provide SafeTestPackage2 2.3.4
diff --git a/tests/auto0/auto2/pkgIndex.tcl b/tests/auto0/auto2/pkgIndex.tcl
new file mode 100644
index 0000000..1022691
--- /dev/null
+++ b/tests/auto0/auto2/pkgIndex.tcl
@@ -0,0 +1,11 @@
+# Tcl package index file, version 1.1
+# This file is generated by the "pkg_mkIndex" command
+# and sourced either when an application starts up or
+# by a "package unknown" script. It invokes the
+# "package ifneeded" command to set up package-related
+# information so that packages will be loaded automatically
+# in response to "package require" commands. When this
+# script is sourced, the variable $dir must contain the
+# full path name of this file's directory.
+
+package ifneeded SafeTestPackage2 2.3.4 [list source [file join $dir package2.tcl]]
diff --git a/tests/auto0/auto2/tclIndex b/tests/auto0/auto2/tclIndex
new file mode 100644
index 0000000..9cd2a74
--- /dev/null
+++ b/tests/auto0/auto2/tclIndex
@@ -0,0 +1,9 @@
+# Tcl autoload index file, version 2.0
+# This file is generated by the "auto_mkindex" command
+# and sourced to set up indexing information for one or
+# more commands. Typically each line is a command that
+# sets an element in the auto_index array, where the
+# element name is the name of a command and the value is
+# a script that loads the command.
+
+set auto_index(report2) [list source [file join $dir file2.tcl]]
diff --git a/tests/auto0/modules/mod1/test1-1.0.tm b/tests/auto0/modules/mod1/test1-1.0.tm
new file mode 100644
index 0000000..927fa6f
--- /dev/null
+++ b/tests/auto0/modules/mod1/test1-1.0.tm
@@ -0,0 +1,5 @@
+namespace eval mod1::test1 {}
+
+proc mod1::test1::try1 args {
+ return res1
+}
diff --git a/tests/auto0/modules/mod2/test2-2.0.tm b/tests/auto0/modules/mod2/test2-2.0.tm
new file mode 100644
index 0000000..b5cd45b
--- /dev/null
+++ b/tests/auto0/modules/mod2/test2-2.0.tm
@@ -0,0 +1,5 @@
+namespace eval mod2::test2 {}
+
+proc mod2::test2::try2 args {
+ return res2
+}
diff --git a/tests/auto0/modules/test0-0.5.tm b/tests/auto0/modules/test0-0.5.tm
new file mode 100644
index 0000000..19f3613
--- /dev/null
+++ b/tests/auto0/modules/test0-0.5.tm
@@ -0,0 +1,5 @@
+namespace eval test0 {}
+
+proc test0::try0 args {
+ return res0
+}
diff --git a/tests/clock.test b/tests/clock.test
index faa3bcd..e10f8bb 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -250,7 +250,6 @@ proc ::testClock::registry { cmd path key } {
return [dict get $reg $path $key]
}
-
# Test some of the basics of [clock format]
test clock-1.0 "clock format - wrong # args" {
@@ -35631,7 +35630,6 @@ test clock-34.11 {clock scan tests} {
set time [clock scan "1/1/37" -gmt true]
clock format $time -format {%b %d,%Y %H:%M GMT} -gmt true
} {Jan 01,2037 00:00 GMT}
-
test clock-34.12 {clock scan, relative times} {
set time [clock scan "Oct 23, 1992 -1 day"]
clock format $time -format {%b %d, %Y}
@@ -35660,30 +35658,6 @@ test clock-34.18 {clock scan, ISO 8601 point in time format} {
set time [clock scan "19921023T000000"]
clock format $time -format {%b %d, %Y %H:%M:%S}
} "Oct 23, 1992 00:00:00"
-test clock-34.19 {clock scan, ISO 8601 point in time format} {
- set time [clock scan "19921023T00:00:00"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} "Oct 23, 1992 00:00:00"
-test clock-34.20 {clock scan, ISO 8601 point in time format} {
- set time [clock scan "1992-10-23T00:00:00"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} "Oct 23, 1992 00:00:00"
-test clock-34.21 {clock scan, ISO 8601 invalid TZ} -body {
- set time [clock scan "19921023MST000000"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} -returnCodes error -match glob -result {unable to convert date-time string*}
-test clock-34.22 {clock scan, ISO 8601 invalid TZ} -body {
- set time [clock scan "19921023M000000"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} -returnCodes error -match glob -result {unable to convert date-time string*}
-test clock-34.23 {clock scan, ISO 8601 invalid TZ} -body {
- set time [clock scan "1992-10-23M00:00:00"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} -returnCodes error -match glob -result {unable to convert date-time string*}
-test clock-34.24 {clock scan, ISO 8601 invalid TZ} -body {
- set time [clock scan "1992-10-23MST00:00:00"]
- clock format $time -format {%b %d, %Y %H:%M:%S}
-} -returnCodes error -match glob -result {unable to convert date-time string*}
# CLOCK SCAN REAL TESTS
# We use 5am PST, 31-12-1999 as the base for these scans because irrespective
@@ -35807,7 +35781,6 @@ test clock-34.43 {last monday in november} {
}
set res
} {1991-11-25 1992-11-30 1993-11-29 1994-11-28 1995-11-27 1996-11-25}
-
test clock-34.44 {2nd monday in november} {
set res {}
foreach i {91 92 93 94 95 96} {
@@ -35840,38 +35813,95 @@ test clock-34.47 {ago with multiple relative units} {
set res [clock scan "2 days 2 hours ago" -base $base]
expr {$base - $res}
} 180000
-
test clock-34.48 {more than one ToD} {*}{
-body {clock scan {10:00 11:00}}
-returnCodes error
-result {unable to convert date-time string "10:00 11:00": more than one time of day in string}
}
-
test clock-34.49 {more than one date} {*}{
-body {clock scan {1/1/2001 2/2/2002}}
-returnCodes error
-result {unable to convert date-time string "1/1/2001 2/2/2002": more than one date in string}
}
-
test clock-34.50 {more than one time zone} {*}{
-body {clock scan {10:00 EST CST}}
-returnCodes error
-result {unable to convert date-time string "10:00 EST CST": more than one time zone in string}
}
-
test clock-34.51 {more than one weekday} {*}{
-body {clock scan {Monday Tuesday}}
-returnCodes error
-result {unable to convert date-time string "Monday Tuesday": more than one weekday in string}
}
-
test clock-34.52 {more than one ordinal month} {*}{
-body {clock scan {next January next March}}
-returnCodes error
-result {unable to convert date-time string "next January next March": more than one ordinal month in string}
}
-
-
+test clock-34.53 {clock scan, ISO 8601 point in time format} {
+ set time [clock scan "19921023T00:00:00"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} "Oct 23, 1992 00:00:00"
+test clock-34.54 {clock scan, ISO 8601 point in time format} {
+ set time [clock scan "1992-10-23T00:00:00"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} "Oct 23, 1992 00:00:00"
+test clock-34.55 {clock scan, ISO 8601 invalid TZ} -body {
+ set time [clock scan "19921023MST000000"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.56 {clock scan, ISO 8601 invalid TZ} -body {
+ set time [clock scan "19921023M000000"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.57 {clock scan, ISO 8601 invalid TZ} -body {
+ set time [clock scan "1992-10-23M00:00:00"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.58 {clock scan, ISO 8601 invalid TZ} -body {
+ set time [clock scan "1992-10-23MST00:00:00"]
+ clock format $time -format {%b %d, %Y %H:%M:%S}
+} -returnCodes error -match glob -result {unable to convert date-time string*}
+test clock-34.59 {clock scan tests (-TZ)} {
+ set time [clock scan "31 Jan 14 23:59:59 -0100"]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Feb 01,2014 00:59:59 GMT}
+test clock-34.60 {clock scan tests (+TZ)} {
+ set time [clock scan "31 Jan 14 23:59:59 +0100"]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 31,2014 22:59:59 GMT}
+test clock-34.61 {clock scan tests (-TZ)} {
+ set time [clock scan "23:59:59 -0100" -base 0 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 02,1970 00:59:59 GMT}
+test clock-34.62 {clock scan tests (+TZ)} {
+ set time [clock scan "23:59:59 +0100" -base 0 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 01,1970 22:59:59 GMT}
+test clock-34.63 {clock scan tests (TZ)} {
+ set time [clock scan "Mon, 30 Jun 2014 23:59:59 CEST"]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jun 30,2014 21:59:59 GMT}
+test clock-34.64 {clock scan tests (TZ)} {
+ set time [clock scan "Fri, 31 Jan 2014 23:59:59 CET"]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 31,2014 22:59:59 GMT}
+test clock-34.65 {clock scan tests (relspec, day unit not TZ)} {
+ set time [clock scan "23:59:59 +15 day" -base 2000000 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Feb 08,1970 23:59:59 GMT}
+test clock-34.66 {clock scan tests (relspec, day unit not TZ)} {
+ set time [clock scan "23:59:59 -15 day" -base 2000000 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 09,1970 23:59:59 GMT}
+test clock-34.67 {clock scan tests (merid and TZ)} {
+ set time [clock scan "10:59 pm CET" -base 2000000 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 24,1970 21:59:00 GMT}
+test clock-34.68 {clock scan tests (merid and TZ)} {
+ set time [clock scan "10:59 pm +0100" -base 2000000 -gmt true]
+ clock format $time -format {%b %d,%Y %H:%M:%S %Z} -gmt true
+} {Jan 24,1970 21:59:00 GMT}
# clock seconds
test clock-35.1 {clock seconds tests} {
@@ -36971,12 +37001,10 @@ test clock-67.2 {Bug d19a30db57} -body {
# error, not segfault
tcl::clock::GetJulianDayFromEraYearMonthDay {} 2361222
} -returnCodes error -match glob -result *
-
test clock-67.3 {Bug d19a30db57} -body {
# error, not segfault
tcl::clock::GetJulianDayFromEraYearWeekDay {} 2361222
} -returnCodes error -match glob -result *
-
test clock-67.4 {Change format %x output on global locale change [Bug 4a0c163d24]} -setup {
package require msgcat
set current [msgcat::mclocale]
@@ -36988,7 +37016,6 @@ test clock-67.4 {Change format %x output on global locale change [Bug 4a0c163d24
} -cleanup {
msgcat::mclocale $current
} -result {1 1}
-
test clock-67.5 {Change scan %x output on global locale change [Bug 4a0c163d24]} -setup {
package require msgcat
set current [msgcat::mclocale]
diff --git a/tests/pkgIndex.tcl b/tests/pkgIndex.tcl
index 96542f9..9d89277 100644
--- a/tests/pkgIndex.tcl
+++ b/tests/pkgIndex.tcl
@@ -1,3 +1,3 @@
#! /usr/bin/env tclsh
-package ifneeded tcltests 0.1 [list source $dir/tcltests.tcl] \ No newline at end of file
+package ifneeded tcltests 0.1 [list source $dir/tcltests.tcl]
diff --git a/tests/safe.test b/tests/safe.test
index 9e942be..c01ce47 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -533,7 +533,6 @@ test safe-7.1opt {tests that everything works at high level with conventional Au
}
set i [safe::interpCreate]
-
} -body {
# no error shall occur:
# (because the default access_path shall include 1st level sub dirs so
@@ -1287,7 +1286,7 @@ test safe-9.10z {interpConfigure change the access path; pkgIndex.tcl packages u
{-accessPath {[list $tcl_library $ZipMountPoint/auto0 $ZipMountPoint/auto0/auto2 $ZipMountPoint/auto0/auto1]*}\
-statics 1 -nested 0 -deleteHook {}}\
0 OK1 0 OK2"
-test safe-9.10opt {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, use pkg opt and tcl::idna} -setup {
+test safe-9.10opt {interpConfigure change the access path; pkgIndex.tcl packages unaffected by token rearrangement, uses pkg opt and tcl::idna} -setup {
set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
if {$SyncExists} {
set SyncVal_TMP [safe::setAutoPathSync]
@@ -1515,7 +1514,7 @@ test safe-9.12z {interpConfigure change the access path; pkgIndex.tcl packages f
{-accessPath {[list $tcl_library $ZipMountPoint/auto0/auto1 $ZipMountPoint/auto0/auto2]*}\
-statics 1 -nested 0 -deleteHook {}}\
{-accessPath {[list $tcl_library]*} -statics 1 -nested 0 -deleteHook {}}"
-test safe-9.12opt {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed, use pkg opt and tcl::idna} -setup {
+test safe-9.12opt {interpConfigure change the access path; pkgIndex.tcl packages fail if directory de-listed, uses pkg opt and tcl::idna} -setup {
set SyncExists [expr {[info commands ::safe::setAutoPathSync] ne {}}]
if {$SyncExists} {
set SyncVal_TMP [safe::setAutoPathSync]