summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-11-14 12:16:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-11-14 12:16:38 (GMT)
commit9b461748a00c4ac031b5c01d99daa9e1b9171f05 (patch)
tree2a17f77690a1fb26a786c58490bd803d2e8074b6
parentfbc3a63f6c2f807d2181059be4b58e68e1791f00 (diff)
parent6e380ef6e9e2b4ccb24ded37f350f5dfcde61e50 (diff)
downloadtcl-9b461748a00c4ac031b5c01d99daa9e1b9171f05.zip
tcl-9b461748a00c4ac031b5c01d99daa9e1b9171f05.tar.gz
tcl-9b461748a00c4ac031b5c01d99daa9e1b9171f05.tar.bz2
merge trunk
-rw-r--r--generic/tcl.h2
-rw-r--r--generic/tclCmdMZ.c145
-rw-r--r--generic/tclEncoding.c3
-rw-r--r--generic/tclExecute.c30
-rw-r--r--generic/tclIOUtil.c4
-rw-r--r--generic/tclInt.decls2
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclIntPlatDecls.h12
-rw-r--r--generic/tclStringObj.c201
-rw-r--r--generic/tclTest.c6
-rw-r--r--library/tzdata/Antarctica/Casey1
-rw-r--r--library/tzdata/Europe/Malta28
-rw-r--r--library/tzdata/Europe/Rome33
-rw-r--r--library/tzdata/Pacific/Tongatapu185
-rw-r--r--tests/string.test4
-rw-r--r--unix/tclUnixCompat.c4
-rw-r--r--win/tclWin32Dll.c4
-rw-r--r--win/tclWinTime.c2
18 files changed, 458 insertions, 212 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index c729d51..4d955d8 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2623,7 +2623,9 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
# define Tcl_Ckrealloc Tcl_Realloc
# define Tcl_Return Tcl_SetResult
# define Tcl_TildeSubst Tcl_TranslateFileName
+#ifndef MAC_OSX_TCL /* On OSX, there is a conflict with "mach.h" */
# define panic Tcl_Panic
+#endif
# define panicVA Tcl_PanicVA
#endif /* !TCL_NO_DEPRECATED */
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index cf046b1..6f64ee9 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1176,8 +1176,7 @@ StringFirstCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tcl_UniChar *needleStr, *haystackStr;
- int match, start, needleLen, haystackLen;
+ int start = 0;
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv,
@@ -1185,82 +1184,23 @@ StringFirstCmd(
return TCL_ERROR;
}
- /*
- * We are searching haystackStr for the sequence needleStr.
- */
-
- match = -1;
- start = 0;
- haystackLen = -1;
-
- needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen);
- haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen);
-
if (objc == 4) {
- /*
- * If a startIndex is specified, we will need to fast forward to that
- * point in the string before we think about a match.
- */
+ int size = Tcl_GetCharLength(objv[2]);
- if (TclGetIntForIndexM(interp, objv[3], haystackLen-1,
- &start) != TCL_OK){
+ if (TCL_OK != TclGetIntForIndexM(interp, objv[3], size - 1, &start)) {
return TCL_ERROR;
}
- /*
- * Reread to prevent shimmering problems.
- */
-
- needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen);
- haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen);
-
- if (start >= haystackLen) {
- goto str_first_done;
- } else if (start > 0) {
- haystackStr += start;
- haystackLen -= start;
- } else if (start < 0) {
- /*
- * Invalid start index mapped to string start; Bug #423581
- */
-
+ if (start < 0) {
start = 0;
}
- }
-
- /*
- * If the length of the needle is more than the length of the haystack, it
- * cannot be contained in there so we can avoid searching. [Bug 2960021]
- */
-
- if (needleLen > 0 && needleLen <= haystackLen) {
- register Tcl_UniChar *p, *end;
-
- end = haystackStr + haystackLen - needleLen + 1;
- for (p = haystackStr; p < end; p++) {
- /*
- * Scan forward to find the first character.
- */
-
- if ((*p == *needleStr) && (memcmp(needleStr, p,
- sizeof(Tcl_UniChar) * (size_t)needleLen) == 0)) {
- match = p - haystackStr;
- break;
- }
+ if (start >= size) {
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(-1));
+ return TCL_OK;
}
}
-
- /*
- * Compute the character index of the matching string by counting the
- * number of characters before the match.
- */
-
- if ((match != -1) && (objc == 4)) {
- match += start;
- }
-
- str_first_done:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(match));
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(TclStringFind(objv[1],
+ objv[2], start)));
return TCL_OK;
}
@@ -1289,76 +1229,31 @@ StringLastCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tcl_UniChar *needleStr, *haystackStr, *p;
- int match, start, needleLen, haystackLen;
+ int last = INT_MAX - 1;
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 1, objv,
- "needleString haystackString ?startIndex?");
+ "needleString haystackString ?lastIndex?");
return TCL_ERROR;
}
- /*
- * We are searching haystackString for the sequence needleString.
- */
-
- match = -1;
- start = 0;
- haystackLen = -1;
-
- needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen);
- haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen);
-
if (objc == 4) {
- /*
- * If a startIndex is specified, we will need to restrict the string
- * range to that char index in the string
- */
+ int size = Tcl_GetCharLength(objv[2]);
- if (TclGetIntForIndexM(interp, objv[3], haystackLen-1,
- &start) != TCL_OK){
+ if (TCL_OK != TclGetIntForIndexM(interp, objv[3], size - 1, &last)) {
return TCL_ERROR;
}
- /*
- * Reread to prevent shimmering problems.
- */
-
- needleStr = Tcl_GetUnicodeFromObj(objv[1], &needleLen);
- haystackStr = Tcl_GetUnicodeFromObj(objv[2], &haystackLen);
-
- if (start < 0) {
- goto str_last_done;
- } else if (start < haystackLen) {
- p = haystackStr + start + 1 - needleLen;
- } else {
- p = haystackStr + haystackLen - needleLen;
+ if (last < 0) {
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(-1));
+ return TCL_OK;
}
- } else {
- p = haystackStr + haystackLen - needleLen;
- }
-
- /*
- * If the length of the needle is more than the length of the haystack, it
- * cannot be contained in there so we can avoid searching. [Bug 2960021]
- */
-
- if (needleLen > 0 && needleLen <= haystackLen) {
- for (; p >= haystackStr; p--) {
- /*
- * Scan backwards to find the first character.
- */
-
- if ((*p == *needleStr) && !memcmp(needleStr, p,
- sizeof(Tcl_UniChar) * (size_t)needleLen)) {
- match = p - haystackStr;
- break;
- }
+ if (last >= size) {
+ last = size - 1;
}
}
-
- str_last_done:
- Tcl_SetObjResult(interp, Tcl_NewIntObj(match));
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(TclStringLast(objv[1],
+ objv[2], last)));
return TCL_OK;
}
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 6beb10c..974b80d 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -993,7 +993,7 @@ Tcl_GetEncodingNames(
* Side effects:
* The reference count of the new system encoding is incremented. The
* reference count of the old system encoding is decremented and it may
- * be freed.
+ * be freed. All VFS cached information is invalidated.
*
*------------------------------------------------------------------------
*/
@@ -1024,6 +1024,7 @@ Tcl_SetSystemEncoding(
FreeEncoding(systemEncoding);
systemEncoding = encoding;
Tcl_MutexUnlock(&encodingMutex);
+ Tcl_FSMountsChanged(NULL);
return TCL_OK;
}
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 759e4a4..6b33d56 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5728,20 +5728,7 @@ TEBCresume(
NEXT_INST_V(1, 3, 1);
case INST_STR_FIND:
- ustring1 = Tcl_GetUnicodeFromObj(OBJ_AT_TOS, &length); /* Haystack */
- ustring2 = Tcl_GetUnicodeFromObj(OBJ_UNDER_TOS, &length2);/* Needle */
-
- match = -1;
- if (length2 > 0 && length2 <= length) {
- end = ustring1 + length - length2 + 1;
- for (p=ustring1 ; p<end ; p++) {
- if ((*p == *ustring2) &&
- memcmp(ustring2,p,sizeof(Tcl_UniChar)*length2) == 0) {
- match = p - ustring1;
- break;
- }
- }
- }
+ match = TclStringFind(OBJ_UNDER_TOS, OBJ_AT_TOS, 0);
TRACE(("%.20s %.20s => %d\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), match));
@@ -5749,23 +5736,10 @@ TEBCresume(
NEXT_INST_F(1, 2, 1);
case INST_STR_FIND_LAST:
- ustring1 = Tcl_GetUnicodeFromObj(OBJ_AT_TOS, &length); /* Haystack */
- ustring2 = Tcl_GetUnicodeFromObj(OBJ_UNDER_TOS, &length2);/* Needle */
-
- match = -1;
- if (length2 > 0 && length2 <= length) {
- for (p=ustring1+length-length2 ; p>=ustring1 ; p--) {
- if ((*p == *ustring2) &&
- memcmp(ustring2,p,sizeof(Tcl_UniChar)*length2) == 0) {
- match = p - ustring1;
- break;
- }
- }
- }
+ match = TclStringLast(OBJ_UNDER_TOS, OBJ_AT_TOS, INT_MAX - 1);
TRACE(("%.20s %.20s => %d\n",
O2S(OBJ_UNDER_TOS), O2S(OBJ_AT_TOS), match));
-
TclNewIntObj(objResultPtr, match);
NEXT_INST_F(1, 2, 1);
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 397c3b1..e3a6b2a 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -638,8 +638,8 @@ FsGetFirstFilesystem(void)
}
/*
- * The epoch can be changed both by filesystems being added or removed and by
- * env(HOME) changing.
+ * The epoch can be changed by filesystems being added or removed, by changing
+ * the "system encoding" and by env(HOME) changing.
*/
int
diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index c00dff1..8314925 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1246,7 +1246,7 @@ declare 19 macosx {
}
declare 29 {win unix} {
- int TclWinCPUID(unsigned int index, unsigned int *regs)
+ int TclWinCPUID(int index, int *regs)
}
# Added in 8.6; core of TclpOpenTemporaryFile
declare 30 {win unix} {
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 0e9a7a2..c6a6d04 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3140,6 +3140,10 @@ MODULE_SCOPE void * TclStackRealloc(Tcl_Interp *interp, void *ptr,
MODULE_SCOPE int TclStringCatObjv(Tcl_Interp *interp, int inPlace,
int objc, Tcl_Obj *const objv[],
Tcl_Obj **objPtrPtr);
+MODULE_SCOPE int TclStringFind(Tcl_Obj *needle, Tcl_Obj *haystack,
+ int start);
+MODULE_SCOPE int TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack,
+ int last);
MODULE_SCOPE int TclStringMatch(const char *str, int strLen,
const char *pattern, int ptnLen, int flags);
MODULE_SCOPE int TclStringMatchObj(Tcl_Obj *stringObj,
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index ac06787..494d6f1 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -98,7 +98,7 @@ EXTERN int TclUnixCopyFile(const char *src, const char *dst,
/* Slot 27 is reserved */
/* Slot 28 is reserved */
/* 29 */
-EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
+EXTERN int TclWinCPUID(int index, int *regs);
/* 30 */
EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
@@ -173,7 +173,7 @@ EXTERN void TclWinFlushDirtyChannels(void);
/* 28 */
EXTERN void TclWinResetInterfaces(void);
/* 29 */
-EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
+EXTERN int TclWinCPUID(int index, int *regs);
/* 30 */
EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
@@ -247,7 +247,7 @@ EXTERN void TclMacOSXNotifierAddRunLoopMode(
/* Slot 27 is reserved */
/* Slot 28 is reserved */
/* 29 */
-EXTERN int TclWinCPUID(unsigned int index, unsigned int *regs);
+EXTERN int TclWinCPUID(int index, int *regs);
/* 30 */
EXTERN int TclUnixOpenTemporaryFile(Tcl_Obj *dirObj,
Tcl_Obj *basenameObj, Tcl_Obj *extensionObj,
@@ -288,7 +288,7 @@ typedef struct TclIntPlatStubs {
void (*reserved26)(void);
void (*reserved27)(void);
void (*reserved28)(void);
- int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
+ int (*tclWinCPUID) (int index, int *regs); /* 29 */
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
#endif /* UNIX */
#if defined(_WIN32) || defined(__CYGWIN__) /* WIN */
@@ -321,7 +321,7 @@ typedef struct TclIntPlatStubs {
void (*tclWinSetInterfaces) (int wide); /* 26 */
void (*tclWinFlushDirtyChannels) (void); /* 27 */
void (*tclWinResetInterfaces) (void); /* 28 */
- int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
+ int (*tclWinCPUID) (int index, int *regs); /* 29 */
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
#endif /* WIN */
#ifdef MAC_OSX_TCL /* MACOSX */
@@ -354,7 +354,7 @@ typedef struct TclIntPlatStubs {
void (*reserved26)(void);
void (*reserved27)(void);
void (*reserved28)(void);
- int (*tclWinCPUID) (unsigned int index, unsigned int *regs); /* 29 */
+ int (*tclWinCPUID) (int index, int *regs); /* 29 */
int (*tclUnixOpenTemporaryFile) (Tcl_Obj *dirObj, Tcl_Obj *basenameObj, Tcl_Obj *extensionObj, Tcl_Obj *resultingNameObj); /* 30 */
#endif /* MACOSX */
} TclIntPlatStubs;
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 85b15fd..1417ea3 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -2841,6 +2841,207 @@ TclStringCatObjv(
/*
*---------------------------------------------------------------------------
*
+ * TclStringFind --
+ *
+ * Implements the [string first] operation.
+ *
+ * Results:
+ * If needle is found as a substring of haystack, the index of the
+ * first instance of such a find is returned. If needle is not present
+ * as a substring of haystack, -1 is returned.
+ *
+ * Side effects:
+ * needle and haystack may have their Tcl_ObjType changed.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclStringFind(
+ Tcl_Obj *needle,
+ Tcl_Obj *haystack,
+ int start)
+{
+ int lh, ln = Tcl_GetCharLength(needle);
+
+ if (ln == 0) {
+ /*
+ * We don't find empty substrings. Bizarre!
+ *
+ * TODO: When we one day make this a true substring
+ * finder, change this to "return 0"
+ */
+ return -1;
+ }
+
+ if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
+ unsigned char *end, *try, *bh;
+ unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
+
+ bh = Tcl_GetByteArrayFromObj(haystack, &lh);
+ end = bh + lh;
+
+ try = bh + start;
+ while (try + ln <= end) {
+ try = memchr(try, bn[0], end - try);
+
+ if (try == NULL) {
+ return -1;
+ }
+ if (0 == memcmp(try+1, bn+1, ln-1)) {
+ return (try - bh);
+ }
+ try++;
+ }
+ return -1;
+ }
+
+ lh = Tcl_GetCharLength(haystack);
+ if (haystack->bytes && (lh == haystack->length)) {
+ /* haystack is all single-byte chars */
+
+ if (needle->bytes && (ln == needle->length)) {
+ /* needle is also all single-byte chars */
+ char *found = strstr(haystack->bytes + start, needle->bytes);
+
+ if (found) {
+ return (found - haystack->bytes);
+ } else {
+ return -1;
+ }
+ } else {
+ /*
+ * Cannot find substring with a multi-byte char inside
+ * a string with no multi-byte chars.
+ */
+ return -1;
+ }
+ } else {
+ Tcl_UniChar *try, *end, *uh;
+ Tcl_UniChar *un = Tcl_GetUnicodeFromObj(needle, &ln);
+
+ uh = Tcl_GetUnicodeFromObj(haystack, &lh);
+ end = uh + lh;
+
+ try = uh + start;
+ while (try + ln <= end) {
+ if ((*try == *un)
+ && (0 == memcmp(try+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
+ return (try - uh);
+ }
+ try++;
+ }
+ return -1;
+ }
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
+ * TclStringLast --
+ *
+ * Implements the [string last] operation.
+ *
+ * Results:
+ * If needle is found as a substring of haystack, the index of the
+ * last instance of such a find is returned. If needle is not present
+ * as a substring of haystack, -1 is returned.
+ *
+ * Side effects:
+ * needle and haystack may have their Tcl_ObjType changed.
+ *
+ *---------------------------------------------------------------------------
+ */
+
+int
+TclStringLast(
+ Tcl_Obj *needle,
+ Tcl_Obj *haystack,
+ int last)
+{
+ int lh, ln = Tcl_GetCharLength(needle);
+
+ if (ln == 0) {
+ /*
+ * We don't find empty substrings. Bizarre!
+ *
+ * TODO: When we one day make this a true substring
+ * finder, change this to "return 0"
+ */
+ return -1;
+ }
+
+ if (ln > last + 1) {
+ return -1;
+ }
+
+ if (TclIsPureByteArray(needle) && TclIsPureByteArray(haystack)) {
+ unsigned char *try, *bh;
+ unsigned char *bn = Tcl_GetByteArrayFromObj(needle, &ln);
+
+ bh = Tcl_GetByteArrayFromObj(haystack, &lh);
+
+ if (last + 1 > lh) {
+ last = lh - 1;
+ }
+ try = bh + last + 1 - ln;
+ while (try >= bh) {
+ if ((*try == bn[0])
+ && (0 == memcmp(try+1, bn+1, ln-1))) {
+ return (try - bh);
+ }
+ try--;
+ }
+ return -1;
+ }
+
+ lh = Tcl_GetCharLength(haystack);
+ if (last + 1 > lh) {
+ last = lh - 1;
+ }
+ if (haystack->bytes && (lh == haystack->length)) {
+ /* haystack is all single-byte chars */
+
+ if (needle->bytes && (ln == needle->length)) {
+ /* needle is also all single-byte chars */
+
+ char *try = haystack->bytes + last + 1 - ln;
+ while (try >= haystack->bytes) {
+ if ((*try == needle->bytes[0])
+ && (0 == memcmp(try+1, needle->bytes + 1, ln - 1))) {
+ return (try - haystack->bytes);
+ }
+ try--;
+ }
+ return -1;
+ } else {
+ /*
+ * Cannot find substring with a multi-byte char inside
+ * a string with no multi-byte chars.
+ */
+ return -1;
+ }
+ } else {
+ Tcl_UniChar *try, *uh;
+ Tcl_UniChar *un = Tcl_GetUnicodeFromObj(needle, &ln);
+
+ uh = Tcl_GetUnicodeFromObj(haystack, &lh);
+
+ try = uh + last + 1 - ln;
+ while (try >= uh) {
+ if ((*try == un[0])
+ && (0 == memcmp(try+1, un+1, (ln-1)*sizeof(Tcl_UniChar)))) {
+ return (try - uh);
+ }
+ try--;
+ }
+ return -1;
+ }
+}
+
+/*
+ *---------------------------------------------------------------------------
+ *
* TclStringObjReverse --
*
* Implements the [string reverse] operation.
diff --git a/generic/tclTest.c b/generic/tclTest.c
index c86c3cc..8a8122a 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -6751,7 +6751,7 @@ TestcpuidCmd(
Tcl_Obj *const * objv) /* Parameter vector */
{
int status, index, i;
- unsigned int regs[4];
+ int regs[4];
Tcl_Obj *regsObjs[4];
if (objc != 2) {
@@ -6761,14 +6761,14 @@ TestcpuidCmd(
if (Tcl_GetIntFromObj(interp, objv[1], &index) != TCL_OK) {
return TCL_ERROR;
}
- status = TclWinCPUID((unsigned) index, regs);
+ status = TclWinCPUID(index, regs);
if (status != TCL_OK) {
Tcl_SetObjResult(interp,
Tcl_NewStringObj("operation not available", -1));
return status;
}
for (i=0 ; i<4 ; ++i) {
- regsObjs[i] = Tcl_NewIntObj((int) regs[i]);
+ regsObjs[i] = Tcl_NewIntObj(regs[i]);
}
Tcl_SetObjResult(interp, Tcl_NewListObj(4, regsObjs));
return TCL_OK;
diff --git a/library/tzdata/Antarctica/Casey b/library/tzdata/Antarctica/Casey
index 3035ab9..beb0f9e 100644
--- a/library/tzdata/Antarctica/Casey
+++ b/library/tzdata/Antarctica/Casey
@@ -7,4 +7,5 @@ set TZData(:Antarctica/Casey) {
{1267714800 28800 0 +08}
{1319738400 39600 0 +11}
{1329843600 28800 0 +08}
+ {1477065600 39600 0 +11}
}
diff --git a/library/tzdata/Europe/Malta b/library/tzdata/Europe/Malta
index b84f68e..0ebe2f6 100644
--- a/library/tzdata/Europe/Malta
+++ b/library/tzdata/Europe/Malta
@@ -3,23 +3,23 @@
set TZData(:Europe/Malta) {
{-9223372036854775808 3484 0 LMT}
{-2403478684 3600 0 CET}
- {-1690851600 7200 1 CEST}
- {-1680483600 3600 0 CET}
+ {-1690765200 7200 1 CEST}
+ {-1680487200 3600 0 CET}
{-1664758800 7200 1 CEST}
- {-1649034000 3600 0 CET}
+ {-1648951200 3600 0 CET}
{-1635123600 7200 1 CEST}
- {-1616979600 3600 0 CET}
+ {-1616896800 3600 0 CET}
{-1604278800 7200 1 CEST}
- {-1585530000 3600 0 CET}
+ {-1585533600 3600 0 CET}
{-1571014800 7200 1 CEST}
- {-1555290000 3600 0 CET}
+ {-1555293600 3600 0 CET}
{-932432400 7200 1 CEST}
{-857257200 3600 0 CET}
{-844556400 7200 1 CEST}
{-828226800 3600 0 CET}
- {-812502000 7200 1 CEST}
- {-796777200 3600 0 CET}
- {-781052400 7200 0 CEST}
+ {-812588400 7200 1 CEST}
+ {-798073200 3600 0 CET}
+ {-781052400 7200 1 CEST}
{-766717200 3600 0 CET}
{-750898800 7200 1 CEST}
{-733359600 3600 0 CET}
@@ -30,17 +30,17 @@ set TZData(:Europe/Malta) {
{-114051600 7200 1 CEST}
{-103168800 3600 0 CET}
{-81997200 7200 1 CEST}
- {-71719200 3600 0 CET}
+ {-71715600 3600 0 CET}
{-50547600 7200 1 CEST}
- {-40269600 3600 0 CET}
+ {-40266000 3600 0 CET}
{-18493200 7200 1 CEST}
- {-8215200 3600 0 CET}
+ {-8211600 3600 0 CET}
{12956400 7200 1 CEST}
- {23234400 3600 0 CET}
+ {23238000 3600 0 CET}
{43801200 7200 1 CEST}
{54687600 3600 0 CET}
{75855600 7200 1 CEST}
- {86738400 3600 0 CET}
+ {86742000 3600 0 CET}
{102380400 7200 0 CEST}
{118105200 3600 0 CET}
{135730800 7200 1 CEST}
diff --git a/library/tzdata/Europe/Rome b/library/tzdata/Europe/Rome
index 64948b8..f53340c 100644
--- a/library/tzdata/Europe/Rome
+++ b/library/tzdata/Europe/Rome
@@ -3,24 +3,25 @@
set TZData(:Europe/Rome) {
{-9223372036854775808 2996 0 LMT}
{-3259097396 2996 0 RMT}
- {-2403564596 3600 0 CET}
- {-1690851600 7200 1 CEST}
- {-1680483600 3600 0 CET}
+ {-2403565200 3600 0 CET}
+ {-1690765200 7200 1 CEST}
+ {-1680487200 3600 0 CET}
{-1664758800 7200 1 CEST}
- {-1649034000 3600 0 CET}
+ {-1648951200 3600 0 CET}
{-1635123600 7200 1 CEST}
- {-1616979600 3600 0 CET}
+ {-1616896800 3600 0 CET}
{-1604278800 7200 1 CEST}
- {-1585530000 3600 0 CET}
+ {-1585533600 3600 0 CET}
{-1571014800 7200 1 CEST}
- {-1555290000 3600 0 CET}
+ {-1555293600 3600 0 CET}
{-932432400 7200 1 CEST}
{-857257200 3600 0 CET}
{-844556400 7200 1 CEST}
+ {-830307600 7200 0 CEST}
{-828226800 3600 0 CET}
{-812502000 7200 1 CEST}
- {-804819600 3600 0 CET}
- {-798080400 3600 0 CET}
+ {-807152400 7200 0 CEST}
+ {-798073200 3600 0 CET}
{-781052400 7200 1 CEST}
{-766717200 3600 0 CET}
{-750898800 7200 1 CEST}
@@ -32,21 +33,21 @@ set TZData(:Europe/Rome) {
{-114051600 7200 1 CEST}
{-103168800 3600 0 CET}
{-81997200 7200 1 CEST}
- {-71719200 3600 0 CET}
+ {-71715600 3600 0 CET}
{-50547600 7200 1 CEST}
- {-40269600 3600 0 CET}
+ {-40266000 3600 0 CET}
{-18493200 7200 1 CEST}
- {-8215200 3600 0 CET}
+ {-8211600 3600 0 CET}
{12956400 7200 1 CEST}
- {23234400 3600 0 CET}
+ {23238000 3600 0 CET}
{43801200 7200 1 CEST}
{54687600 3600 0 CET}
{75855600 7200 1 CEST}
- {86738400 3600 0 CET}
+ {86742000 3600 0 CET}
{107910000 7200 1 CEST}
- {118188000 3600 0 CET}
+ {118191600 3600 0 CET}
{138754800 7200 1 CEST}
- {149637600 3600 0 CET}
+ {149641200 3600 0 CET}
{170809200 7200 1 CEST}
{181090800 3600 0 CET}
{202258800 7200 1 CEST}
diff --git a/library/tzdata/Pacific/Tongatapu b/library/tzdata/Pacific/Tongatapu
index da9f857..731b4f6 100644
--- a/library/tzdata/Pacific/Tongatapu
+++ b/library/tzdata/Pacific/Tongatapu
@@ -2,13 +2,180 @@
set TZData(:Pacific/Tongatapu) {
{-9223372036854775808 44360 0 LMT}
- {-2177497160 44400 0 TOT}
- {-915193200 46800 0 TOT}
- {915102000 46800 0 TOT}
- {939214800 50400 1 TOST}
- {953384400 46800 0 TOT}
- {973342800 50400 1 TOST}
- {980596800 46800 0 TOT}
- {1004792400 50400 1 TOST}
- {1012046400 46800 0 TOT}
+ {-2177497160 44400 0 +1220}
+ {-915193200 46800 0 +13}
+ {915102000 46800 0 +13}
+ {939214800 50400 1 +14}
+ {953384400 46800 0 +13}
+ {973342800 50400 1 +14}
+ {980596800 46800 0 +13}
+ {1004792400 50400 1 +14}
+ {1012046400 46800 0 +13}
+ {1478350800 50400 1 +14}
+ {1484398800 46800 0 +13}
+ {1509800400 50400 1 +14}
+ {1516453200 46800 0 +13}
+ {1541250000 50400 1 +14}
+ {1547902800 46800 0 +13}
+ {1572699600 50400 1 +14}
+ {1579352400 46800 0 +13}
+ {1604149200 50400 1 +14}
+ {1610802000 46800 0 +13}
+ {1636203600 50400 1 +14}
+ {1642251600 46800 0 +13}
+ {1667653200 50400 1 +14}
+ {1673701200 46800 0 +13}
+ {1699102800 50400 1 +14}
+ {1705755600 46800 0 +13}
+ {1730552400 50400 1 +14}
+ {1737205200 46800 0 +13}
+ {1762002000 50400 1 +14}
+ {1768654800 46800 0 +13}
+ {1793451600 50400 1 +14}
+ {1800104400 46800 0 +13}
+ {1825506000 50400 1 +14}
+ {1831554000 46800 0 +13}
+ {1856955600 50400 1 +14}
+ {1863608400 46800 0 +13}
+ {1888405200 50400 1 +14}
+ {1895058000 46800 0 +13}
+ {1919854800 50400 1 +14}
+ {1926507600 46800 0 +13}
+ {1951304400 50400 1 +14}
+ {1957957200 46800 0 +13}
+ {1983358800 50400 1 +14}
+ {1989406800 46800 0 +13}
+ {2014808400 50400 1 +14}
+ {2020856400 46800 0 +13}
+ {2046258000 50400 1 +14}
+ {2052910800 46800 0 +13}
+ {2077707600 50400 1 +14}
+ {2084360400 46800 0 +13}
+ {2109157200 50400 1 +14}
+ {2115810000 46800 0 +13}
+ {2140606800 50400 1 +14}
+ {2147259600 46800 0 +13}
+ {2172661200 50400 1 +14}
+ {2178709200 46800 0 +13}
+ {2204110800 50400 1 +14}
+ {2210158800 46800 0 +13}
+ {2235560400 50400 1 +14}
+ {2242213200 46800 0 +13}
+ {2267010000 50400 1 +14}
+ {2273662800 46800 0 +13}
+ {2298459600 50400 1 +14}
+ {2305112400 46800 0 +13}
+ {2329909200 50400 1 +14}
+ {2336562000 46800 0 +13}
+ {2361963600 50400 1 +14}
+ {2368011600 46800 0 +13}
+ {2393413200 50400 1 +14}
+ {2400066000 46800 0 +13}
+ {2424862800 50400 1 +14}
+ {2431515600 46800 0 +13}
+ {2456312400 50400 1 +14}
+ {2462965200 46800 0 +13}
+ {2487762000 50400 1 +14}
+ {2494414800 46800 0 +13}
+ {2519816400 50400 1 +14}
+ {2525864400 46800 0 +13}
+ {2551266000 50400 1 +14}
+ {2557314000 46800 0 +13}
+ {2582715600 50400 1 +14}
+ {2589368400 46800 0 +13}
+ {2614165200 50400 1 +14}
+ {2620818000 46800 0 +13}
+ {2645614800 50400 1 +14}
+ {2652267600 46800 0 +13}
+ {2677064400 50400 1 +14}
+ {2683717200 46800 0 +13}
+ {2709118800 50400 1 +14}
+ {2715166800 46800 0 +13}
+ {2740568400 50400 1 +14}
+ {2747221200 46800 0 +13}
+ {2772018000 50400 1 +14}
+ {2778670800 46800 0 +13}
+ {2803467600 50400 1 +14}
+ {2810120400 46800 0 +13}
+ {2834917200 50400 1 +14}
+ {2841570000 46800 0 +13}
+ {2866971600 50400 1 +14}
+ {2873019600 46800 0 +13}
+ {2898421200 50400 1 +14}
+ {2904469200 46800 0 +13}
+ {2929870800 50400 1 +14}
+ {2936523600 46800 0 +13}
+ {2961320400 50400 1 +14}
+ {2967973200 46800 0 +13}
+ {2992770000 50400 1 +14}
+ {2999422800 46800 0 +13}
+ {3024219600 50400 1 +14}
+ {3030872400 46800 0 +13}
+ {3056274000 50400 1 +14}
+ {3062322000 46800 0 +13}
+ {3087723600 50400 1 +14}
+ {3093771600 46800 0 +13}
+ {3119173200 50400 1 +14}
+ {3125826000 46800 0 +13}
+ {3150622800 50400 1 +14}
+ {3157275600 46800 0 +13}
+ {3182072400 50400 1 +14}
+ {3188725200 46800 0 +13}
+ {3213522000 50400 1 +14}
+ {3220174800 46800 0 +13}
+ {3245576400 50400 1 +14}
+ {3251624400 46800 0 +13}
+ {3277026000 50400 1 +14}
+ {3283678800 46800 0 +13}
+ {3308475600 50400 1 +14}
+ {3315128400 46800 0 +13}
+ {3339925200 50400 1 +14}
+ {3346578000 46800 0 +13}
+ {3371374800 50400 1 +14}
+ {3378027600 46800 0 +13}
+ {3403429200 50400 1 +14}
+ {3409477200 46800 0 +13}
+ {3434878800 50400 1 +14}
+ {3440926800 46800 0 +13}
+ {3466328400 50400 1 +14}
+ {3472981200 46800 0 +13}
+ {3497778000 50400 1 +14}
+ {3504430800 46800 0 +13}
+ {3529227600 50400 1 +14}
+ {3535880400 46800 0 +13}
+ {3560677200 50400 1 +14}
+ {3567330000 46800 0 +13}
+ {3592731600 50400 1 +14}
+ {3598779600 46800 0 +13}
+ {3624181200 50400 1 +14}
+ {3630834000 46800 0 +13}
+ {3655630800 50400 1 +14}
+ {3662283600 46800 0 +13}
+ {3687080400 50400 1 +14}
+ {3693733200 46800 0 +13}
+ {3718530000 50400 1 +14}
+ {3725182800 46800 0 +13}
+ {3750584400 50400 1 +14}
+ {3756632400 46800 0 +13}
+ {3782034000 50400 1 +14}
+ {3788082000 46800 0 +13}
+ {3813483600 50400 1 +14}
+ {3820136400 46800 0 +13}
+ {3844933200 50400 1 +14}
+ {3851586000 46800 0 +13}
+ {3876382800 50400 1 +14}
+ {3883035600 46800 0 +13}
+ {3907832400 50400 1 +14}
+ {3914485200 46800 0 +13}
+ {3939886800 50400 1 +14}
+ {3945934800 46800 0 +13}
+ {3971336400 50400 1 +14}
+ {3977384400 46800 0 +13}
+ {4002786000 50400 1 +14}
+ {4009438800 46800 0 +13}
+ {4034235600 50400 1 +14}
+ {4040888400 46800 0 +13}
+ {4065685200 50400 1 +14}
+ {4072338000 46800 0 +13}
+ {4097134800 50400 1 +14}
}
diff --git a/tests/string.test b/tests/string.test
index 5fdb510..11cbcff 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -756,13 +756,13 @@ catch {rename largest_int {}}
test string-7.1 {string last, too few args} {
list [catch {string last a} msg] $msg
-} {1 {wrong # args: should be "string last needleString haystackString ?startIndex?"}}
+} {1 {wrong # args: should be "string last needleString haystackString ?lastIndex?"}}
test string-7.2 {string last, bad args} {
list [catch {string last a b c} msg] $msg
} {1 {bad index "c": must be integer?[+-]integer? or end?[+-]integer?}}
test string-7.3 {string last, too many args} {
list [catch {string last a b c d} msg] $msg
-} {1 {wrong # args: should be "string last needleString haystackString ?startIndex?"}}
+} {1 {wrong # args: should be "string last needleString haystackString ?lastIndex?"}}
test string-7.4 {string last} {
string la xxx xxxx123xx345x678
} 1
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 1247061..ea6067e 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -988,8 +988,8 @@ CopyString(
int
TclWinCPUID(
- unsigned int index, /* Which CPUID value to retrieve. */
- unsigned int *regsPtr) /* Registers after the CPUID. */
+ int index, /* Which CPUID value to retrieve. */
+ int *regsPtr) /* Registers after the CPUID. */
{
int status = TCL_ERROR;
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c
index 688fa8d..d8a8717 100644
--- a/win/tclWin32Dll.c
+++ b/win/tclWin32Dll.c
@@ -603,8 +603,8 @@ Tcl_WinTCharToUtf(
int
TclWinCPUID(
- unsigned int index, /* Which CPUID value to retrieve. */
- unsigned int *regsPtr) /* Registers after the CPUID. */
+ int index, /* Which CPUID value to retrieve. */
+ int *regsPtr) /* Registers after the CPUID. */
{
int status = TCL_ERROR;
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index 7b5c18a..f4e08fa 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -341,7 +341,7 @@ NativeGetTime(
*/
SYSTEM_INFO systemInfo;
- unsigned int regs[4];
+ int regs[4];
GetSystemInfo(&systemInfo);
if (TclWinCPUID(0, regs) == TCL_OK