From de08e1a14305a937cfb08f1f958c25732f53e133 Mon Sep 17 00:00:00 2001 From: dgp <dgp@users.sourceforge.net> Date: Fri, 24 Mar 2023 16:49:17 +0000 Subject: duplicate test name --- tests/exec.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/exec.test b/tests/exec.test index 3e25360..eece5dc 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -437,7 +437,7 @@ close $f test exec-10.20.1 {errors in exec invocation} -constraints {unix exec notValgrind} -body { exec ~non_existent_user/foo/bar } -returnCodes error -result {couldn't execute "~non_existent_user/foo/bar": no such file or directory} -test exec-10.20.1 {errors in exec invocation} -constraints {win exec notValgrind} -body { +test exec-10.20.2 {errors in exec invocation} -constraints {win exec notValgrind} -body { exec ~non_existent_user/foo/bar } -returnCodes error -result {couldn't execute "~non_existent_user\foo\bar": no such file or directory} test exec-10.21.1 {errors in exec invocation} -constraints {unix exec notValgrind} -body { -- cgit v0.12 From e27c66d81aa3904b675aa2851d14444b44c9555e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Fri, 24 Mar 2023 20:19:49 +0000 Subject: Fix [15e74a2fe6]: Fix various typos --- generic/tclBasic.c | 4 ++-- generic/tclCompCmds.c | 2 +- generic/tclCompCmdsSZ.c | 6 +++--- generic/tclEvent.c | 2 +- generic/tclExecute.c | 4 ++-- generic/tclFCmd.c | 2 +- generic/tclInterp.c | 2 +- generic/tclListObj.c | 2 +- generic/tclObj.c | 10 +++++----- generic/tclStringObj.c | 4 ++-- generic/tclUtil.c | 8 ++++---- library/clock.tcl | 2 +- unix/configure | 2 +- unix/configure.in | 2 +- unix/tclUnixTime.c | 4 ++-- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 9243539..e075701 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -3525,7 +3525,7 @@ TclCleanupCommand( * the builtin functions. Redefining a builtin function forces all * existing code to be invalidated since that code may be compiled using * an instruction specific to the replaced function. In addition, - * redefioning a non-builtin function will force existing code to be + * redefining a non-builtin function will force existing code to be * invalidated if the number of arguments has changed. * *---------------------------------------------------------------------- @@ -3536,7 +3536,7 @@ Tcl_CreateMathFunc( Tcl_Interp *interp, /* Interpreter in which function is to be * available. */ const char *name, /* Name of function (e.g. "sin"). */ - int numArgs, /* Nnumber of arguments required by + int numArgs, /* Number of arguments required by * function. */ Tcl_ValueType *argTypes, /* Array of types acceptable for each * argument. */ diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 306334b..1486920 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -3334,7 +3334,7 @@ TclCompileFormatCmd( * then return -1. * * Side effects: - * May add an entery into the table of compiled locals. + * May add an entry into the table of compiled locals. * *---------------------------------------------------------------------- */ diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index 70d8909..db01dcd 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -4039,7 +4039,7 @@ CompileAssociativeBinaryOpCmd( if (words > 3) { /* * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. + * calculations, including roundoff errors. */ OP4( REVERSE, words-1); @@ -4472,7 +4472,7 @@ TclCompileMinusOpCmd( /* * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. + * calculations, including roundoff errors. */ TclEmitInstInt4(INST_REVERSE, words-1, envPtr); @@ -4517,7 +4517,7 @@ TclCompileDivOpCmd( /* * Reverse order of arguments to get precise agreement with [expr] in - * calcuations, including roundoff errors. + * calculations, including roundoff errors. */ TclEmitInstInt4(INST_REVERSE, words-1, envPtr); diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 3c4ff74..8cbb55b 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -947,7 +947,7 @@ Tcl_Exit( /* * Warning: this function SHOULD NOT return, as there is code that depends * on Tcl_Exit never returning. In fact, we will Tcl_Panic if anyone - * returns, so critical is this dependcy. + * returns, so critical is this dependency. * * If subsystems are not (yet) initialized, proper Tcl-finalization is * impossible, so fallback to system exit, see bug-[f8a33ce3db5d8cc2]. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index a16334a..a9f4326 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -1859,7 +1859,7 @@ TclCompileObj( * of course). * * Side effects: - * valuePtr gets the new incrmented value. + * valuePtr gets the new incremented value. * *---------------------------------------------------------------------- */ @@ -2800,7 +2800,7 @@ TEBCresume( /* * If the first object is shared, we need a new obj for the result; * otherwise, we can reuse the first object. In any case, make sure it - * has enough room to accomodate all the concatenated bytes. Note that + * has enough room to accommodate all the concatenated bytes. Note that * if it is unshared its bytes are copied by ckrealloc, so that we set * the loop parameters to avoid copying them again: p points to the * end of the already copied bytes, currPtr to the second object. diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index d58d02d..dbb8994 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -425,7 +425,7 @@ TclFileDeleteCmd( if (result != TCL_OK) { if (errfile == NULL) { /* - * We try to accomodate poor error results from our Tcl_FS calls. + * We try to accommodate poor error results from our Tcl_FS calls. */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 2633a18..3ba27a1 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -60,7 +60,7 @@ typedef struct Alias { Tcl_Obj *objPtr; /* The first actual prefix object - the target * command name; this has to be at the end of * the structure, which will be extended to - * accomodate the remaining objects in the + * accommodate the remaining objects in the * prefix. */ } Alias; diff --git a/generic/tclListObj.c b/generic/tclListObj.c index a994fd7..964f596 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -93,7 +93,7 @@ NewListInternalRep( List *listRepPtr; if (objc <= 0) { - Tcl_Panic("NewListInternalRep: expects postive element count"); + Tcl_Panic("NewListInternalRep: expects positive element count"); } /* diff --git a/generic/tclObj.c b/generic/tclObj.c index a6e7698..0fce557 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -1040,7 +1040,7 @@ TclDbDumpActiveObjects( * * Called via the TclNewObj or TclDbNewObj macros when TCL_MEM_DEBUG is * enabled. This function will initialize the members of a Tcl_Obj - * struct. Initilization would be done inline via the TclNewObj macro + * struct. Initialization would be done inline via the TclNewObj macro * when compiling without TCL_MEM_DEBUG. * * Results: @@ -3204,7 +3204,7 @@ FreeBignum( * None. * * Side effects: - * The destination object receies a copy of the source object + * The destination object receives a copy of the source object * *---------------------------------------------------------------------- */ @@ -3285,7 +3285,7 @@ UpdateStringOfBignum( * * Tcl_NewBignumObj -- * - * Creates an initializes a bignum object. + * Creates and initializes a bignum object. * * Results: * Returns the newly created object. @@ -4208,7 +4208,7 @@ Tcl_GetCommandFromObj( * None. * * Side effects: - * The object's old internal rep is freed. It's string rep is not + * The object's old internal rep is freed. Its string rep is not * changed. The refcount in the Command structure is incremented to keep * it from being freed if the command is later deleted until * TclNRExecuteByteCode has a chance to recognize that it was deleted. @@ -4505,7 +4505,7 @@ Tcl_RepresentationCmd( /* * This is a workaround to silence reports from `make valgrind` * on 64-bit systems. The problem is that the test suite - * includes calling the [represenation] command on values of + * includes calling the [representation] command on values of * &tclDoubleType. When these values are created, the "doubleValue" * is set, but when the "twoPtrValue" is examined, its "ptr2" * field has never been initialized. Since [representation] diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index b109808..720ed44 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -3046,7 +3046,7 @@ TclStringReverse( * FillUnicodeRep -- * * Populate the Unicode internal rep with the Unicode form of its string - * rep. The object must alread have a "String" internal rep. + * rep. The object must already have a "String" internal rep. * * Results: * None. @@ -3228,7 +3228,7 @@ DupStringInternalRep( * This operation always succeeds and returns TCL_OK. * * Side effects: - * Any old internal reputation for objPtr is freed and the internal + * Any old internal representation for objPtr is freed and the internal * representation is set to "String". * *---------------------------------------------------------------------- diff --git a/generic/tclUtil.c b/generic/tclUtil.c index a8bf795..aee2b15 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -2649,7 +2649,7 @@ Tcl_DStringInit( * Side effects: * Length bytes from "bytes" (or all of "bytes" if length is less than * zero) are added to the current value of the string. Memory gets - * reallocated if needed to accomodate the string's new size. + * reallocated if needed to accommodate the string's new size. * *---------------------------------------------------------------------- */ @@ -2753,7 +2753,7 @@ TclDStringAppendDString( * * Side effects: * String is reformatted as a list element and added to the current value - * of the string. Memory gets reallocated if needed to accomodate the + * of the string. Memory gets reallocated if needed to accommodate the * string's new size. * *---------------------------------------------------------------------- @@ -3958,12 +3958,12 @@ TclIndexEncode( */ if (idx > 0) { /* - * All end+postive or end-negative expressions + * All end+positive or end-negative expressions * always indicate "after the end". */ idx = after; } else if (idx < INT_MIN - TCL_INDEX_END) { - /* These indices always indicate "before the beginning */ + /* These indices always indicate "before the beginning" */ idx = before; } else { /* Encoded end-positive (or end+negative) are offset */ diff --git a/library/clock.tcl b/library/clock.tcl index aa5d228..b51f86f 100644 --- a/library/clock.tcl +++ b/library/clock.tcl @@ -223,7 +223,7 @@ proc ::tcl::clock::Initialize {} { ::msgcat::mcset ru GREGORIAN_CHANGE_DATE 2421639 - # Romania (Transylvania changed earler - perhaps de_RO should show the + # Romania (Transylvania changed earlier - perhaps de_RO should show the # earlier date?) ::msgcat::mcset ro GREGORIAN_CHANGE_DATE 2422063 diff --git a/unix/configure b/unix/configure index 16210e6..13877ad 100755 --- a/unix/configure +++ b/unix/configure @@ -15109,7 +15109,7 @@ fi #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if +# On some systems strstr is broken: it returns a pointer even if # the original string is empty. #-------------------------------------------------------------------- diff --git a/unix/configure.in b/unix/configure.in index 55f09eb..f84720e 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -341,7 +341,7 @@ AC_CHECK_FUNC(memmove, , [ AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) ]) #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if +# On some systems strstr is broken: it returns a pointer even if # the original string is empty. #-------------------------------------------------------------------- diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 3694ba2..85a31e1 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -113,7 +113,7 @@ TclpGetMicroseconds(void) * TclpGetClicks -- * * This procedure returns a value that represents the highest resolution - * clock available on the system. There are no garantees on what the + * clock available on the system. There are no guarantees on what the * resolution will be. In Tcl we will call this value a "click". The * start time is also system dependent. * @@ -162,7 +162,7 @@ TclpGetClicks(void) * TclpGetWideClicks -- * * This procedure returns a WideInt value that represents the highest - * resolution clock available on the system. There are no garantees on + * resolution clock available on the system. There are no guarantees on * what the resolution will be. In Tcl we will call this value a "click". * The start time is also system dependent. * -- cgit v0.12 From 414896d31fc17726a8380347db1f306066ca6c70 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Fri, 24 Mar 2023 21:08:11 +0000 Subject: Fix [68417a8bb3]: No result/LF printed for 64-bit integer type check --- unix/configure | 6 ++++-- unix/tcl.m4 | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/unix/configure b/unix/configure index 685911b..05fd35a 100755 --- a/unix/configure +++ b/unix/configure @@ -7641,8 +7641,8 @@ printf "%s\n" "${tcl_flags}" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 -printf %s "checking for 64-bit integer type... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 'long' and 'long long' have the same size (64-bit)?" >&5 +printf %s "checking if 'long' and 'long long' have the same size (64-bit)?... " >&6; } if test ${tcl_cv_type_64bit+y} then : printf %s "(cached) " >&6 @@ -7679,6 +7679,8 @@ printf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } # Now check for auxiliary declarations { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 printf %s "checking for struct dirent64... " >&6; } diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 4e205fd..3717893 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2378,7 +2378,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_64BIT_FLAGS], [ - AC_MSG_CHECKING([for 64-bit integer type]) + AC_MSG_CHECKING([if 'long' and 'long long' have the same size (64-bit)?]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if we could use long anyway Note that we substitute in the @@ -2388,9 +2388,10 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ case 1: case (sizeof(long long)==sizeof(long)): ; }]])],[tcl_cv_type_64bit="long long"],[])]) if test "${tcl_cv_type_64bit}" = none ; then - AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?]) + AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, ['long' and 'long long' have the same size]) AC_MSG_RESULT([yes]) else + AC_MSG_RESULT([no]) # Now check for auxiliary declarations AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> -- cgit v0.12 From 5c40bd9a6cf398d2e031d37b77e670b2babf9020 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Sat, 25 Mar 2023 20:00:58 +0000 Subject: Experimental fix for [fa128568a5]: EOVERFLOW does not necessarily mean "file too big" Let's synchronize the POSIX error-messages with what Linux gives nowadays. --- doc/SetErrno.3 | 2 +- doc/package.n | 2 +- doc/safe.n | 2 +- doc/tclvars.n | 2 +- generic/tclCmdAH.c | 2 +- generic/tclFCmd.c | 6 +- generic/tclIOCmd.c | 2 +- generic/tclInterp.c | 8 +- generic/tclPosixStr.c | 276 +++++++++++++++++++++++++------------------------- generic/tclResult.c | 2 +- generic/tclZipfs.c | 2 +- library/http/http.tcl | 8 +- library/init.tcl | 4 +- library/safe.tcl | 22 ++-- tests/chanio.test | 16 +-- tests/cmdAH.test | 42 ++++---- tests/cmdMZ.test | 2 +- tests/event.test | 4 +- tests/exec.test | 32 +++--- tests/fCmd.test | 78 +++++++------- tests/fileName.test | 4 +- tests/fileSystem.test | 36 +++---- tests/http.test | 2 +- tests/interp.test | 20 ++-- tests/io.test | 36 +++---- tests/ioCmd.test | 22 ++-- tests/load.test | 8 +- tests/macOSXFCmd.test | 4 +- tests/result.test | 2 +- tests/safe-stock.test | 2 +- tests/safe.test | 28 ++--- tests/socket.test | 24 ++--- tests/source.test | 4 +- tests/unixFCmd.test | 24 ++--- tests/winFCmd.test | 10 +- unix/tclUnixInit.c | 2 +- win/tclWinFCmd.c | 2 +- 37 files changed, 374 insertions(+), 370 deletions(-) diff --git a/doc/SetErrno.3 b/doc/SetErrno.3 index c202e2e..3cc0dbc 100644 --- a/doc/SetErrno.3 +++ b/doc/SetErrno.3 @@ -55,7 +55,7 @@ returns a machine-readable textual identifier such as .QW EACCES that corresponds to the current value of \fBerrno\fR. \fBTcl_ErrnoMsg\fR returns a human-readable string such as -.QW "permission denied" +.QW "Permission denied" that corresponds to the value of its \fIerrorCode\fR argument. The \fIerrorCode\fR argument is typically the value returned by \fBTcl_GetErrno\fR. diff --git a/doc/package.n b/doc/package.n index 5687480..820938c 100644 --- a/doc/package.n +++ b/doc/package.n @@ -286,7 +286,7 @@ then the attempt to set it back to is ineffective and the mode value remains .QW latest . .PP -When passed any other value as an argument, raise an invalid argument +When passed any other value as an argument, raise an Invalid argument error. .PP When an interpreter is created, its initial selection mode value is set to diff --git a/doc/safe.n b/doc/safe.n index 6e0d948..86f58bc 100644 --- a/doc/safe.n +++ b/doc/safe.n @@ -191,7 +191,7 @@ the file was not found: NOTICE for child interp10 : Created NOTICE for child interp10 : Setting accessPath=(/foo/bar) staticsok=1 nestedok=0 deletehook=() NOTICE for child interp10 : auto_path in interp10 has been set to {$p(:0:)} -ERROR for child interp10 : /foo/bar/init.tcl: no such file or directory +ERROR for child interp10 : /foo/bar/init.tcl: No such file or directory .CE .RE .SS OPTIONS diff --git a/doc/tclvars.n b/doc/tclvars.n index 4d1413c..6e41405 100644 --- a/doc/tclvars.n +++ b/doc/tclvars.n @@ -197,7 +197,7 @@ of the error that occurred, such as \fBENOENT\fR; this will be one of the values defined in the include file errno.h. The \fImsg\fR element will be a human-readable message corresponding to \fIerrName\fR, such as -.QW "no such file or directory" +.QW "No such file or directory" for the \fBENOENT\fR case. .TP \fBTCL\fR ... diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 5c27bbc..f2d8904 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -2201,7 +2201,7 @@ PathSplitCmd( res = Tcl_FSSplitPath(objv[1], (int *)NULL); if (res == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "could not read \"%s\": no such file or directory", + "could not read \"%s\": No such file or directory", TclGetString(objv[1]))); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PATHSPLIT", "NONESUCH", NULL); diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index ea8f715..daddbf2 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -1225,8 +1225,8 @@ TclFileLinkCmd( if (errno == EEXIST) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "could not create new link \"%s\": that path already" - " exists", TclGetString(objv[index]))); + "could not create new link \"%s\": File exists", + TclGetString(objv[index]))); Tcl_PosixError(interp); } else if (errno == ENOENT) { /* @@ -1245,7 +1245,7 @@ TclFileLinkCmd( Tcl_DecrRefCount(dirPtr); if (access != 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "could not create new link \"%s\": no such file" + "could not create new link \"%s\": No such file" " or directory", TclGetString(objv[index]))); Tcl_PosixError(interp); } else { diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index e8a534f..1c9909c 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -442,7 +442,7 @@ Tcl_ReadObjCmd( if (strcmp(TclGetString(objv[i]), "nonewline") != 0) { #endif Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "expected non-negative integer but got \"%s\"", + "Expected non-negative integer but got \"%s\"", TclGetString(objv[i]))); Tcl_SetErrorCode(interp, "TCL", "VALUE", "NUMBER", NULL); return TCL_ERROR; diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 70cf8fa..302ac17 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -2950,7 +2950,7 @@ ChildExpose( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "permission denied: safe interpreter cannot expose commands", + "Permission denied: safe interpreter cannot expose commands", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", NULL); @@ -2995,7 +2995,7 @@ ChildRecursionLimit( if (objc) { if (Tcl_IsSafe(interp)) { - Tcl_SetObjResult(interp, Tcl_NewStringObj("permission denied: " + Tcl_SetObjResult(interp, Tcl_NewStringObj("Permission denied: " "safe interpreters cannot change recursion limit", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", NULL); @@ -3056,7 +3056,7 @@ ChildHide( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "permission denied: safe interpreter cannot hide commands", + "Permission denied: safe interpreter cannot hide commands", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", NULL); @@ -3218,7 +3218,7 @@ ChildMarkTrusted( { if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "permission denied: safe interpreter cannot mark trusted", + "Permission denied: safe interpreter cannot mark trusted", -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "INTERP", "UNSAFE", NULL); diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index ecdf652..c4647d9 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -496,447 +496,451 @@ const char * Tcl_ErrnoMsg( int err) /* Error number (such as in errno variable). */ { +#ifndef _WIN32 + return strerror(err); +#else switch (err) { #if defined(E2BIG) && (!defined(EOVERFLOW) || (E2BIG != EOVERFLOW)) - case E2BIG: return "argument list too long"; + case E2BIG: return "Argument list too long"; #endif #ifdef EACCES - case EACCES: return "permission denied"; + case EACCES: return "Permission denied"; #endif #ifdef EADDRINUSE - case EADDRINUSE: return "address already in use"; + case EADDRINUSE: return "Address in use"; #endif #ifdef EADDRNOTAVAIL - case EADDRNOTAVAIL: return "cannot assign requested address"; + case EADDRNOTAVAIL: return "Address not available"; #endif #ifdef EADV - case EADV: return "advertise error"; + case EADV: return "Advertise error"; #endif #ifdef EAFNOSUPPORT - case EAFNOSUPPORT: return "address family not supported by protocol"; + case EAFNOSUPPORT: return "Address family not supported"; #endif #ifdef EAGAIN - case EAGAIN: return "resource temporarily unavailable"; + case EAGAIN: return "Resource unavailable, try again"; #endif #ifdef EALIGN case EALIGN: return "EALIGN"; #endif #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY)) - case EALREADY: return "operation already in progress"; + case EALREADY: return "Connection already in progress"; #endif #ifdef EBADE - case EBADE: return "bad exchange descriptor"; + case EBADE: return "Bad exchange descriptor"; #endif #ifdef EBADF - case EBADF: return "bad file number"; + case EBADF: return "Bad file descriptor"; #endif #ifdef EBADFD - case EBADFD: return "file descriptor in bad state"; + case EBADFD: return "File descriptor in bad state"; #endif #ifdef EBADMSG - case EBADMSG: return "not a data message"; -#endif -#ifdef ECANCELED - case ECANCELED: return "operation canceled"; + case EBADMSG: return "Bad message"; #endif #ifdef EBADR - case EBADR: return "bad request descriptor"; + case EBADR: return "Bad request descriptor"; #endif #ifdef EBADRPC case EBADRPC: return "RPC structure is bad"; #endif #ifdef EBADRQC - case EBADRQC: return "bad request code"; + case EBADRQC: return "Bad request code"; #endif #ifdef EBADSLT - case EBADSLT: return "invalid slot"; + case EBADSLT: return "Invalid slot"; #endif #ifdef EBFONT - case EBFONT: return "bad font file format"; + case EBFONT: return "Bad font file format"; #endif #ifdef EBUSY - case EBUSY: return "file busy"; + case EBUSY: return "Device or resource busy"; +#endif +#ifdef ECANCELED + case ECANCELED: return "Operation canceled"; #endif #ifdef ECHILD - case ECHILD: return "no children"; + case ECHILD: return "No child processes"; #endif #ifdef ECHRNG - case ECHRNG: return "channel number out of range"; + case ECHRNG: return "Channel number out of range"; #endif #ifdef ECOMM - case ECOMM: return "communication error on send"; + case ECOMM: return "Communication error on send"; #endif #ifdef ECONNABORTED - case ECONNABORTED: return "software caused connection abort"; + case ECONNABORTED: return "Connection aborted"; #endif #ifdef ECONNREFUSED - case ECONNREFUSED: return "connection refused"; + case ECONNREFUSED: return "Connection refused"; #endif #ifdef ECONNRESET - case ECONNRESET: return "connection reset by peer"; + case ECONNRESET: return "Connection reset"; #endif #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) - case EDEADLK: return "resource deadlock avoided"; + case EDEADLK: return "Resource deadlock would occur"; #endif #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) - case EDEADLOCK: return "resource deadlock avoided"; + case EDEADLOCK: return "Resource deadlock would occur"; #endif #ifdef EDESTADDRREQ - case EDESTADDRREQ: return "destination address required"; + case EDESTADDRREQ: return "Destination address required"; #endif #ifdef EDIRTY - case EDIRTY: return "mounting a dirty fs w/o force"; + case EDIRTY: return "Mounting a dirty fs w/o force"; #endif #ifdef EDOM - case EDOM: return "math argument out of range"; + case EDOM: return "Mathematics argument out of domain of function"; #endif #ifdef EDOTDOT - case EDOTDOT: return "cross mount point"; + case EDOTDOT: return "Cross mount point"; #endif #ifdef EDQUOT - case EDQUOT: return "disk quota exceeded"; + case EDQUOT: return "Disk quota exceeded"; #endif #ifdef EDUPPKG - case EDUPPKG: return "duplicate package name"; + case EDUPPKG: return "Duplicate package name"; #endif #ifdef EEXIST - case EEXIST: return "file already exists"; + case EEXIST: return "File exists"; #endif #ifdef EFAULT - case EFAULT: return "bad address in system call argument"; + case EFAULT: return "Bad address"; #endif #ifdef EFBIG - case EFBIG: return "file too large"; + case EFBIG: return "File too large"; #endif #ifdef EHOSTDOWN - case EHOSTDOWN: return "host is down"; + case EHOSTDOWN: return "Host is down"; #endif #ifdef EHOSTUNREACH - case EHOSTUNREACH: return "host is unreachable"; + case EHOSTUNREACH: return "Host is unreachable"; #endif #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) - case EIDRM: return "identifier removed"; + case EIDRM: return "Identifier removed"; #endif #ifdef EINIT - case EINIT: return "initialization error"; + case EINIT: return "Initialization error"; #endif #ifdef EILSEQ - case EILSEQ: return "illegal byte sequence"; + case EILSEQ: return "Invalid or incomplete multibyte or wide character"; #endif #ifdef EINPROGRESS - case EINPROGRESS: return "operation now in progress"; + case EINPROGRESS: return "Operation in progress"; #endif #ifdef EINTR - case EINTR: return "interrupted system call"; + case EINTR: return "Interrupted function"; #endif #ifdef EINVAL - case EINVAL: return "invalid argument"; + case EINVAL: return "Invalid argument"; #endif #ifdef EIO case EIO: return "I/O error"; #endif #ifdef EISCONN - case EISCONN: return "socket is already connected"; + case EISCONN: return "Socket is connected"; #endif #ifdef EISDIR - case EISDIR: return "illegal operation on a directory"; + case EISDIR: return "Is a directory"; #endif #ifdef EISNAME - case EISNAM: return "is a name file"; + case EISNAM: return "Is a name file"; #endif #ifdef ELBIN case ELBIN: return "ELBIN"; #endif #ifdef EL2HLT - case EL2HLT: return "level 2 halted"; + case EL2HLT: return "Level 2 halted"; #endif #ifdef EL2NSYNC - case EL2NSYNC: return "level 2 not synchronized"; + case EL2NSYNC: return "Level 2 not synchronized"; #endif #ifdef EL3HLT - case EL3HLT: return "level 3 halted"; + case EL3HLT: return "Level 3 halted"; #endif #ifdef EL3RST - case EL3RST: return "level 3 reset"; + case EL3RST: return "Level 3 reset"; #endif #ifdef ELIBACC - case ELIBACC: return "cannot access a needed shared library"; + case ELIBACC: return "Cannot access a needed shared library"; #endif #ifdef ELIBBAD - case ELIBBAD: return "accessing a corrupted shared library"; + case ELIBBAD: return "Accessing a corrupted shared library"; #endif #ifdef ELIBEXEC - case ELIBEXEC: return "cannot exec a shared library directly"; + case ELIBEXEC: return "Cannot exec a shared library directly"; #endif #if defined(ELIBMAX) && (!defined(ECANCELED) || (ELIBMAX != ECANCELED)) case ELIBMAX: return - "attempting to link in more shared libraries than system limit"; + "Attempting to link in more shared libraries than system limit"; #endif #ifdef ELIBSCN case ELIBSCN: return ".lib section in a.out corrupted"; #endif #ifdef ELNRNG - case ELNRNG: return "link number out of range"; + case ELNRNG: return "Link number out of range"; #endif #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) - case ELOOP: return "too many levels of symbolic links"; + case ELOOP: return "Too many levels of symbolic links"; #endif #ifdef EMFILE - case EMFILE: return "too many open files"; + case EMFILE: return "File descriptor value too large"; #endif #ifdef EMLINK - case EMLINK: return "too many links"; + case EMLINK: return "Too many links"; #endif #ifdef EMSGSIZE - case EMSGSIZE: return "message too long"; + case EMSGSIZE: return "Message too large"; #endif #ifdef EMULTIHOP - case EMULTIHOP: return "multihop attempted"; + case EMULTIHOP: return "Multihop attempted"; #endif #ifdef ENAMETOOLONG - case ENAMETOOLONG: return "file name too long"; + case ENAMETOOLONG: return "Filename too long"; #endif #ifdef ENAVAIL - case ENAVAIL: return "not available"; + case ENAVAIL: return "Not available"; #endif #ifdef ENET case ENET: return "ENET"; #endif #ifdef ENETDOWN - case ENETDOWN: return "network is down"; + case ENETDOWN: return "Network is down"; #endif #ifdef ENETRESET - case ENETRESET: return "network dropped connection on reset"; + case ENETRESET: return "Network dropped connection on reset"; #endif #ifdef ENETUNREACH - case ENETUNREACH: return "network is unreachable"; + case ENETUNREACH: return "Network is unreachable"; #endif #ifdef ENFILE - case ENFILE: return "file table overflow"; + case ENFILE: return "Too many files open in system"; #endif #ifdef ENOANO - case ENOANO: return "anode table overflow"; + case ENOANO: return "Anode table overflow"; #endif #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) - case ENOBUFS: return "no buffer space available"; + case ENOBUFS: return "No buffer space available"; #endif #ifdef ENOCSI - case ENOCSI: return "no CSI structure available"; + case ENOCSI: return "No CSI structure available"; #endif #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED)) - case ENODATA: return "no data available"; + case ENODATA: return "No data available"; #endif #ifdef ENODEV - case ENODEV: return "no such device"; + case ENODEV: return "No such device"; #endif #ifdef ENOENT - case ENOENT: return "no such file or directory"; + case ENOENT: return "No such file or directory"; #endif #ifdef ENOEXEC - case ENOEXEC: return "exec format error"; + case ENOEXEC: return "Executable format error"; #endif #ifdef ENOLCK - case ENOLCK: return "no locks available"; + case ENOLCK: return "No locks available"; #endif #ifdef ENOLINK - case ENOLINK: return "link has been severed"; + case ENOLINK: return "Link has been severed"; #endif #ifdef ENOMEM - case ENOMEM: return "not enough memory"; + case ENOMEM: return "Not enough space"; #endif #ifdef ENOMSG - case ENOMSG: return "no message of desired type"; + case ENOMSG: return "No message of desired type"; #endif #ifdef ENONET - case ENONET: return "machine is not on the network"; + case ENONET: return "Machine is not on the network"; #endif #ifdef ENOPKG - case ENOPKG: return "package not installed"; + case ENOPKG: return "Package not installed"; #endif #ifdef ENOPROTOOPT - case ENOPROTOOPT: return "bad protocol option"; + case ENOPROTOOPT: return "Protocol not available"; #endif #ifdef ENOSPC - case ENOSPC: return "no space left on device"; + case ENOSPC: return "No space left on device"; #endif #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) - case ENOSR: return "out of stream resources"; + case ENOSR: return "No stream resources"; #endif #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) - case ENOSTR: return "not a stream device"; + case ENOSTR: return "Not a stream"; #endif #ifdef ENOSYM - case ENOSYM: return "unresolved symbol name"; + case ENOSYM: return "Unresolved symbol name"; #endif #ifdef ENOSYS - case ENOSYS: return "function not implemented"; + case ENOSYS: return "Functionality not supported"; #endif #ifdef ENOTBLK - case ENOTBLK: return "block device required"; + case ENOTBLK: return "Block device required"; #endif #ifdef ENOTCONN - case ENOTCONN: return "socket is not connected"; + case ENOTCONN: return "Transport endpoint is not connected"; #endif #ifdef ENOTRECOVERABLE - case ENOTRECOVERABLE: return "state not recoverable"; + case ENOTRECOVERABLE: return "State not recoverable"; #endif #ifdef ENOTDIR - case ENOTDIR: return "not a directory"; + case ENOTDIR: return "Not a directory or a symbolic link to a directory"; #endif #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) - case ENOTEMPTY: return "directory not empty"; + case ENOTEMPTY: return "Directory not empty"; #endif #ifdef ENOTNAM - case ENOTNAM: return "not a name file"; + case ENOTNAM: return "Not a name file"; #endif #ifdef ENOTSOCK - case ENOTSOCK: return "socket operation on non-socket"; + case ENOTSOCK: return "Not a socket"; #endif #ifdef ENOTSUP - case ENOTSUP: return "operation not supported"; + case ENOTSUP: return "Not supported"; #endif #ifdef ENOTTY - case ENOTTY: return "inappropriate device for ioctl"; + case ENOTTY: return "Inappropriate I/O control operation"; #endif #ifdef ENOTUNIQ - case ENOTUNIQ: return "name not unique on network"; + case ENOTUNIQ: return "Name not unique on network"; #endif #ifdef ENXIO - case ENXIO: return "no such device or address"; + case ENXIO: return "No such device or address"; #endif #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) - case EOPNOTSUPP: return "operation not supported on socket"; + case EOPNOTSUPP: return "Operation not supported on socket"; #endif #ifdef EOTHER - case EOTHER: return "other error"; + case EOTHER: return "Other error"; #endif #if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) - case EOVERFLOW: return "file too big"; + case EOVERFLOW: return "Value too large to be stored in data type"; #endif #ifdef EOWNERDEAD - case EOWNERDEAD: return "owner died"; + case EOWNERDEAD: return "Previous owner died"; #endif #ifdef EPERM - case EPERM: return "not owner"; + case EPERM: return "Operation not permitted"; #endif #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT)) - case EPFNOSUPPORT: return "protocol family not supported"; + case EPFNOSUPPORT: return "Protocol family not supported"; #endif #ifdef EPIPE - case EPIPE: return "broken pipe"; + case EPIPE: return "Broken pipe"; #endif #ifdef EPROCLIM - case EPROCLIM: return "too many processes"; + case EPROCLIM: return "Too many processes"; #endif #ifdef EPROCUNAVAIL - case EPROCUNAVAIL: return "bad procedure for program"; + case EPROCUNAVAIL: return "Bad procedure for program"; #endif #ifdef EPROGMISMATCH - case EPROGMISMATCH: return "program version wrong"; + case EPROGMISMATCH: return "Program version wrong"; #endif #ifdef EPROGUNAVAIL case EPROGUNAVAIL: return "RPC program not available"; #endif #ifdef EPROTO - case EPROTO: return "protocol error"; + case EPROTO: return "Protocol error"; #endif #ifdef EPROTONOSUPPORT - case EPROTONOSUPPORT: return "protocol not supported"; + case EPROTONOSUPPORT: return "Protocol not supported"; #endif #ifdef EPROTOTYPE - case EPROTOTYPE: return "protocol wrong type for socket"; + case EPROTOTYPE: return "Protocol wrong type for socket"; #endif #ifdef ERANGE - case ERANGE: return "math result unrepresentable"; + case ERANGE: return "Result too large"; #endif #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) case EREFUSED: return "EREFUSED"; #endif #ifdef EREMCHG - case EREMCHG: return "remote address changed"; + case EREMCHG: return "Remote address changed"; #endif #ifdef EREMDEV - case EREMDEV: return "remote device"; + case EREMDEV: return "Remote device"; #endif #ifdef EREMOTE - case EREMOTE: return "pathname hit remote file system"; + case EREMOTE: return "Pathname hit remote file system"; #endif #ifdef EREMOTEIO - case EREMOTEIO: return "remote i/o error"; + case EREMOTEIO: return "Remote i/o error"; #endif #ifdef EREMOTERELEASE case EREMOTERELEASE: return "EREMOTERELEASE"; #endif #ifdef EROFS - case EROFS: return "read-only file system"; + case EROFS: return "Read-only file system"; #endif #ifdef ERPCMISMATCH case ERPCMISMATCH: return "RPC version is wrong"; #endif #ifdef ERREMOTE - case ERREMOTE: return "object is remote"; + case ERREMOTE: return "Object is remote"; #endif #ifdef ESHUTDOWN - case ESHUTDOWN: return "cannot send after socket shutdown"; + case ESHUTDOWN: return "Cannot send after socket shutdown"; #endif #ifdef ESOCKTNOSUPPORT - case ESOCKTNOSUPPORT: return "socket type not supported"; + case ESOCKTNOSUPPORT: return "Socket type not supported"; #endif #ifdef ESPIPE - case ESPIPE: return "invalid seek"; + case ESPIPE: return "Invalid seek"; #endif #ifdef ESRCH - case ESRCH: return "no such process"; + case ESRCH: return "No such process"; #endif #ifdef ESRMNT - case ESRMNT: return "srmount error"; + case ESRMNT: return "Srmount error"; #endif #ifdef ESTALE - case ESTALE: return "stale remote file handle"; + case ESTALE: return "Stale remote file handle"; #endif #ifdef ESUCCESS case ESUCCESS: return "Error 0"; #endif #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) - case ETIME: return "timer expired"; + case ETIME: return "Timer expired"; #endif #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR)) - case ETIMEDOUT: return "connection timed out"; + case ETIMEDOUT: return "Connection timed out"; #endif #ifdef ETOOMANYREFS - case ETOOMANYREFS: return "too many references: cannot splice"; + case ETOOMANYREFS: return "Too many references: cannot splice"; #endif #ifdef ETXTBSY - case ETXTBSY: return "text file or pseudo-device busy"; + case ETXTBSY: return "Text file busy"; #endif #ifdef EUCLEAN - case EUCLEAN: return "structure needs cleaning"; + case EUCLEAN: return "Structure needs cleaning"; #endif #ifdef EUNATCH - case EUNATCH: return "protocol driver not attached"; + case EUNATCH: return "Protocol driver not attached"; #endif #ifdef EUSERS - case EUSERS: return "too many users"; + case EUSERS: return "Too many users"; #endif #ifdef EVERSION - case EVERSION: return "version mismatch"; + case EVERSION: return "Version mismatch"; #endif #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) - case EWOULDBLOCK: return "operation would block"; + case EWOULDBLOCK: return "Operation would block"; #endif #ifdef EXDEV - case EXDEV: return "cross-domain link"; + case EXDEV: return "Cross-domain link"; #endif #ifdef EXFULL - case EXFULL: return "message tables full"; + case EXFULL: return "Message tables full"; #endif default: #ifdef NO_STRERROR - return "unknown POSIX error"; + return "Unknown POSIX error"; #else return strerror(err); #endif } +#endif } /* diff --git a/generic/tclResult.c b/generic/tclResult.c index 7e108e9..620c939 100644 --- a/generic/tclResult.c +++ b/generic/tclResult.c @@ -1474,7 +1474,7 @@ TclMergeReturnOptions( */ Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "bad -level value: expected non-negative integer but got" + "bad -level value: Expected non-negative integer but got" " \"%s\"", TclGetString(valuePtr))); Tcl_SetErrorCode(interp, "TCL", "RESULT", "ILLEGAL_LEVEL", NULL); goto error; diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 1b602ea..014d95e 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -2569,7 +2569,7 @@ ZipAddFile( Tcl_DStringFree(&zpathDs); #ifdef _WIN32 /* hopefully a directory */ - if (strcmp("permission denied", Tcl_PosixError(interp)) == 0) { + if (strcmp("Permission denied", Tcl_PosixError(interp)) == 0) { Tcl_Close(interp, in); return TCL_OK; } diff --git a/library/http/http.tcl b/library/http/http.tcl index 79f876a..d744433 100644 --- a/library/http/http.tcl +++ b/library/http/http.tcl @@ -1773,7 +1773,7 @@ proc http::OpenSocket {token DoLater} { set socketPlayCmd($state(socketinfo)) [list ReplayIfClose Wready {} $socketPhQueue($sockOld)] set socketPhQueue($sockOld) {} } - if {[string range $result 0 20] eq {proxy connect failed:}} { + if {[string range $result 0 20] eq {Proxy connect failed:}} { # - The HTTPS proxy did not create a socket. The pre-existing value # (a "placeholder socket") is unchanged. # - The proxy returned a valid HTTP response to the failed CONNECT @@ -1786,7 +1786,7 @@ proc http::OpenSocket {token DoLater} { Finish $token $result # Because socket creation failed, the placeholder "socket" must be # "closed" and (if persistent) removed from the persistent sockets - # table. In the {proxy connect failed:} case Finish does this because + # table. In the {Proxy connect failed:} case Finish does this because # the value of ${token}(connection) is "close". In the other cases here, # it does so because $result is non-empty. } @@ -3392,7 +3392,7 @@ proc http::Connect {token proto phost srvurl} { # If any other requests are in flight or pipelined/queued, they will # be discarded. } - Finish $token "connect failed $err" + Finish $token "Connect failed: $err" return } @@ -5135,7 +5135,7 @@ proc http::SecureProxyConnect {args} { } } set state(connection) close - set msg "proxy connect failed: $code" + set msg "Proxy connect failed: $code" # - This error message will be detected by http::OpenSocket and will # cause it to present the proxy's HTTP response as that of the # original $token transaction, identified only by state(proxyUsed) diff --git a/library/init.tcl b/library/init.tcl index bbff158..22579c2 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -726,7 +726,7 @@ proc tcl::CopyDirectory {action src dest} { # the following code is now commented out. # # return -code error "error $action \"$src\" to\ - # \"$dest\": file already exists" + # \"$dest\": File exists" } else { # Depending on the platform, and on the current # working directory, the directories '.', '..' @@ -738,7 +738,7 @@ proc tcl::CopyDirectory {action src dest} { foreach s $existing { if {[file tail $s] ni {. ..}} { return -code error "error $action \"$src\" to\ - \"$dest\": file already exists" + \"$dest\": File exists" } } } diff --git a/library/safe.tcl b/library/safe.tcl index 7fc2b5c..c5546e5 100644 --- a/library/safe.tcl +++ b/library/safe.tcl @@ -818,7 +818,7 @@ proc ::safe::CheckFileName {child file} { if {![file exists $file]} { # don't tell the file path - return -code error "no such file or directory" + return -code error "No such file or directory" } if {![file readable $file]} { @@ -908,7 +908,7 @@ proc ::safe::AliasGlob {child args} { } on error msg { Log $child $msg if {$got(-nocomplain)} return - return -code error "permission denied" + return -code error "Permission denied" } if {$got(--)} { set cmd [linsert $cmd end-1 -directory $dir] @@ -921,7 +921,7 @@ proc ::safe::AliasGlob {child args} { # return now and reduce the number of cases to be considered later. Log $child {option -directory must be supplied} if {$got(-nocomplain)} return - return -code error "permission denied" + return -code error "Permission denied" } # Apply the -join semantics ourselves (hence -join not copied to $cmd) @@ -980,7 +980,7 @@ proc ::safe::AliasGlob {child args} { } on error msg { Log $child $msg if {$got(-nocomplain)} continue - return -code error "permission denied" + return -code error "Permission denied" } lappend cmd $opt } @@ -1034,7 +1034,7 @@ proc ::safe::AliasSource {child args} { set at 2 if {$encoding eq "identity"} { Log $child "attempt to use the identity encoding" - return -code error "permission denied" + return -code error "Permission denied" } } else { set at 0 @@ -1052,7 +1052,7 @@ proc ::safe::AliasSource {child args} { set realfile [TranslatePath $child $file] } msg]} { Log $child $msg - return -code error "permission denied" + return -code error "Permission denied" } # check that the path is in the access path of that child @@ -1060,7 +1060,7 @@ proc ::safe::AliasSource {child args} { FileInAccessPath $child $realfile } msg]} { Log $child $msg - return -code error "permission denied" + return -code error "Permission denied" } # Check that the filename exists and is readable. If it is not, deliver @@ -1124,7 +1124,7 @@ proc ::safe::AliasLoad {child file args} { if {!$state(nestedok)} { Log $child "loading to a sub interp (nestedok)\ disabled (trying to load $prefix to $target)" - return -code error "permission denied (nested load)" + return -code error "Permission denied (nested load)" } } @@ -1139,7 +1139,7 @@ proc ::safe::AliasLoad {child file args} { if {!$state(staticsok)} { Log $child "static loading disabled\ (trying to load $prefix to $target)" - return -code error "permission denied (static library)" + return -code error "Permission denied (static library)" } } else { # file loading @@ -1149,7 +1149,7 @@ proc ::safe::AliasLoad {child file args} { set file [TranslatePath $child $file] } on error msg { Log $child $msg - return -code error "permission denied" + return -code error "Permission denied" } # check the translated path @@ -1157,7 +1157,7 @@ proc ::safe::AliasLoad {child file args} { FileInAccessPath $child $file } on error msg { Log $child $msg - return -code error "permission denied (path)" + return -code error "Permission denied (path)" } } diff --git a/tests/chanio.test b/tests/chanio.test index d2008e6..4ad5e3a 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -2676,8 +2676,8 @@ test chan-io-29.27 {Tcl_Flush on chan closed pipeline} -setup { } else { set x {this was supposed to fail and did not} } - string tolower $x -} -match glob -result {1 {error flushing "*": broken pipe} {posix epipe {broken pipe}}} + set x +} -match glob -result {1 {error flushing "*": Broken pipe} {POSIX EPIPE {Broken pipe}}} test chan-io-29.28 {Tcl_WriteChars, lf mode} -setup { file delete $path(test1) } -body { @@ -3958,7 +3958,7 @@ test chan-io-32.3 {Tcl_Read, negative byte count} -setup { chan read $f -1 } -returnCodes error -cleanup { chan close $f -} -result {expected non-negative integer but got "-1"} +} -result {Expected non-negative integer but got "-1"} test chan-io-32.4 {Tcl_Read, positive byte count} -body { set f [open $path(longfile) r] string length [chan read $f 1024] @@ -4363,7 +4363,7 @@ test chan-io-34.8 {Tcl_Seek on pipes: not supported} -setup { chan seek $pipe 0 current } -returnCodes error -cleanup { chan close $pipe -} -match glob -result {error during seek on "*": invalid argument} +} -match glob -result {error during seek on "*": Invalid argument} test chan-io-34.9 {Tcl_Seek, testing buffered input flushing} -setup { file delete $path(test3) } -body { @@ -5462,11 +5462,11 @@ test chan-io-40.10 {POSIX open access modes: RDONLY} -body { test chan-io-40.11 {POSIX open access modes: RDONLY} -match regexp -body { file delete $path(test3) open $path(test3) RDONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test chan-io-40.12 {POSIX open access modes: WRONLY} -match regexp -body { file delete $path(test3) open $path(test3) WRONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test chan-io-40.13 {POSIX open access modes: WRONLY} -body { makeFile xyzzy test3 set f [open $path(test3) WRONLY] @@ -5480,7 +5480,7 @@ test chan-io-40.13 {POSIX open access modes: WRONLY} -body { test chan-io-40.14 {POSIX open access modes: RDWR} -match regexp -body { file delete $path(test3) open $path(test3) RDWR -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test chan-io-40.15 {POSIX open access modes: RDWR} { makeFile xyzzy test3 set f [open $path(test3) RDWR] @@ -7585,7 +7585,7 @@ test chan-io-60.1 {writing illegal utf sequences} {fileevent testbytestring} { # cut of the remainder of the error stack, especially the filename set result [lreplace $result 3 3 [lindex [split [lindex $result 3] \n] 0]] list $x $result -} {1 {gets {} catch {error writing "stdout": illegal byte sequence}}} +} {1 {gets {} catch {error writing "stdout": Invalid or incomplete multibyte or wide character}}} test chan-io-61.1 {Reset eof state after changing the eof char} -setup { set datafile [makeFile {} eofchar] diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 01a4a36..a417e34 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -137,10 +137,10 @@ test cmdAH-2.5 {Tcl_CdObjCmd} -returnCodes error -body { } -result {user "~" doesn't exist} test cmdAH-2.6 {Tcl_CdObjCmd} -returnCodes error -body { cd _foobar -} -result {couldn't change working directory to "_foobar": no such file or directory} +} -result {couldn't change working directory to "_foobar": No such file or directory} test cmdAH-2.6.1 {Tcl_CdObjCmd} -returnCodes error -body { cd "" -} -result {couldn't change working directory to "": no such file or directory} +} -result {couldn't change working directory to "": No such file or directory} test cmdAH-2.6.2 {cd} -constraints {unix nonPortable} -setup { set dir [pwd] } -body { @@ -1459,8 +1459,8 @@ test cmdAH-20.2 {Tcl_FileObjCmd: atime} -setup { [expr {[file atime $gorpfile] == $stat(atime)}] } -result {1 1} test cmdAH-20.3 {Tcl_FileObjCmd: atime} { - list [catch {file atime _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file atime _bogus_} msg] $msg $errorCode +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-20.4 {Tcl_FileObjCmd: atime} -returnCodes error -body { file atime $file notint } -result {expected integer but got "notint"} @@ -1525,7 +1525,7 @@ test cmdAH-22.3 {Tcl_FileObjCmd: isfile} {file isfile $dirfile} 0 catch {file link -symbolic $linkfile $gorpfile} test cmdAH-23.1 {Tcl_FileObjCmd: lstat} -returnCodes error -body { file lstat a -} -result {could not read "a": no such file or directory} +} -result {could not read "a": No such file or directory} test cmdAH-23.2 {Tcl_FileObjCmd: lstat} -returnCodes error -body { file lstat a b c } -result {wrong # args: should be "file lstat name ?varName?"} @@ -1542,9 +1542,9 @@ test cmdAH-23.4 {Tcl_FileObjCmd: lstat} -setup { list $stat(nlink) [expr {$stat(mode) & 0o777}] $stat(type) } -result {1 511 link} test cmdAH-23.5 {Tcl_FileObjCmd: lstat errors} {nonPortable} { - list [catch {file lstat _bogus_ stat} msg] [string tolower $msg] \ + list [catch {file lstat _bogus_ stat} msg] $msg \ $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-23.6 {Tcl_FileObjCmd: lstat errors} -setup { unset -nocomplain x } -body { @@ -1634,8 +1634,8 @@ test cmdAH-24.3 {Tcl_FileObjCmd: mtime} -setup { [expr {[file atime $gorpfile] == $stat(atime)}] } -result {1 1} test cmdAH-24.4 {Tcl_FileObjCmd: mtime} { - list [catch {file mtime _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file mtime _bogus_} msg] $msg $errorCode +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-24.5 {Tcl_FileObjCmd: mtime} -setup { # Under Unix, use a file in /tmp to avoid clock skew due to NFS. On other # platforms, just use a file in the local directory. @@ -1814,11 +1814,11 @@ test cmdAH-26.2 {Tcl_FileObjCmd: readlink} {unix nonPortable} { file readlink $linkfile } $gorpfile test cmdAH-26.3 {Tcl_FileObjCmd: readlink errors} {unix nonPortable} { - list [catch {file readlink _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not readlink "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file readlink _bogus_} msg] $msg $errorCode +} {1 {could not readlink "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-26.5 {Tcl_FileObjCmd: readlink errors} {win nonPortable} { - list [catch {file readlink _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not readlink "_bogus_": invalid argument} {POSIX EINVAL {invalid argument}}} + list [catch {file readlink _bogus_} msg] $msg $errorCode +} {1 {could not readlink "_bogus_": Invalid argument} {POSIX EINVAL {Invalid argument}}} # size test cmdAH-27.1 {Tcl_FileObjCmd: size} -returnCodes error -body { @@ -1833,8 +1833,8 @@ test cmdAH-27.2 {Tcl_FileObjCmd: size} { expr {[file size $gorpfile] - $oldsize} } {10} test cmdAH-27.3 {Tcl_FileObjCmd: size} { - list [catch {file size _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file size _bogus_} msg] $msg $errorCode +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-27.4 { Tcl_FileObjCmd: size (built-in Windows names) } -constraints {win} -body { @@ -1884,8 +1884,8 @@ test cmdAH-28.5 {Tcl_FileObjCmd: stat} -constraints {unix notWsl} -setup { format 0o%03o [expr {$stat(mode) & 0o777}] } -result 0o765 test cmdAH-28.6 {Tcl_FileObjCmd: stat} { - list [catch {file stat _bogus_ stat} msg] [string tolower $msg] $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file stat _bogus_ stat} msg] $msg $errorCode +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-28.7 {Tcl_FileObjCmd: stat} -setup { unset -nocomplain x } -returnCodes error -body { @@ -2006,8 +2006,8 @@ test cmdAH-29.4.1 {Tcl_FileObjCmd: type} -constraints {linkDirectory notWine} -s removeDirectory $tempdir } -result link test cmdAH-29.5 {Tcl_FileObjCmd: type} { - list [catch {file type _bogus_} msg] [string tolower $msg] $errorCode -} {1 {could not read "_bogus_": no such file or directory} {POSIX ENOENT {no such file or directory}}} + list [catch {file type _bogus_} msg] $msg $errorCode +} {1 {could not read "_bogus_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test cmdAH-29.6 { Tcl_FileObjCmd: type (built-in Windows names) } -constraints {win} -body { @@ -2206,7 +2206,7 @@ test cmdAH-33.6 {file tempdir: missing parent dir} -setup { file tempdir $base/quux/ } -cleanup { catch {file delete -force $base} -} -result {can't create temporary directory: no such file or directory} +} -result {can't create temporary directory: No such file or directory} test cmdAH-33.7 {file tempdir: missing parent dir} -setup { set base [file join [temporaryDirectory] gorp] file mkdir $base @@ -2214,7 +2214,7 @@ test cmdAH-33.7 {file tempdir: missing parent dir} -setup { file tempdir $base/quux/foobar } -cleanup { catch {file delete -force $base} -} -result {can't create temporary directory: no such file or directory} +} -result {can't create temporary directory: No such file or directory} # This shouldn't work, but just in case a test above failed... catch {close $newFileId} diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index a7aa36c..27ec3bf 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -64,7 +64,7 @@ test cmdMZ-1.4 {Tcl_PwdObjCmd: failure} -setup { } -returnCodes error -cleanup { cd $cwd file delete -force $foodir -} -result {error getting working directory name: permission denied} +} -result {error getting working directory name: Permission denied} # The tests for Tcl_RegexpObjCmd, Tcl_RegsubObjCmd are in regexp.test diff --git a/tests/event.test b/tests/event.test index 16cbc24..163a6f9 100644 --- a/tests/event.test +++ b/tests/event.test @@ -184,10 +184,10 @@ test event-5.1 {Tcl_BackgroundError, HandleBgErrors procedures} -setup { } -result {{{a simple error} {a simple error while executing "error "a simple error"" - ("after" script)} NONE} {{couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory + ("after" script)} NONE} {{couldn't open "non_existent": No such file or directory} {couldn't open "non_existent": No such file or directory while executing "open non_existent" - ("after" script)} {POSIX ENOENT {no such file or directory}}}} + ("after" script)} {POSIX ENOENT {No such file or directory}}}} test event-5.2 {Tcl_BackgroundError, HandleBgErrors procedures} -setup { catch {rename bgerror {}} } -body { diff --git a/tests/exec.test b/tests/exec.test index d1ef418..888042e 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -333,11 +333,11 @@ test exec-8.2 {long input and output} {exec} { test exec-9.1 {commands returning errors} {exec notValgrind} { set x [catch {exec gorp456} msg] - list $x [string tolower $msg] [string tolower $errorCode] -} {1 {couldn't execute "gorp456": no such file or directory} {posix enoent {no such file or directory}}} + list $x $msg $errorCode +} {1 {couldn't execute "gorp456": No such file or directory} {POSIX ENOENT {No such file or directory}}} test exec-9.2 {commands returning errors} {exec notValgrind} { - string tolower [list [catch {exec [interpreter] echo foo | foo123} msg] $msg $errorCode] -} {1 {couldn't execute "foo123": no such file or directory} {posix enoent {no such file or directory}}} + list [catch {exec [interpreter] echo foo | foo123} msg] $msg $errorCode +} {1 {couldn't execute "foo123": No such file or directory} {POSIX ENOENT {No such file or directory}}} test exec-9.3 {commands returning errors} -constraints {exec stdio} -body { exec [interpreter] $path(sleep) 1 | [interpreter] $path(exit) 43 | [interpreter] $path(sleep) 1 } -returnCodes error -result {child process exited abnormally} @@ -347,7 +347,7 @@ test exec-9.4 {commands returning errors} -constraints {exec stdio} -body { child process exited abnormally} test exec-9.5 {commands returning errors} -constraints {exec stdio notValgrind} -body { exec gorp456 | [interpreter] echo a b c -} -returnCodes error -result {couldn't execute "gorp456": no such file or directory} +} -returnCodes error -result {couldn't execute "gorp456": No such file or directory} test exec-9.6 {commands returning errors} -constraints {exec} -body { exec [interpreter] $path(sh) -c "\"$path(echo)\" error msg 1>&2" } -returnCodes error -result {error msg} @@ -417,13 +417,13 @@ test exec-10.14 {errors in exec invocation} -constraints {exec} -body { } -returnCodes error -result {can't specify "<@" as last word in command} test exec-10.15 {errors in exec invocation} -constraints {exec} -body { exec cat < a/b/c -} -returnCodes error -result {couldn't read file "a/b/c": no such file or directory} +} -returnCodes error -result {couldn't read file "a/b/c": No such file or directory} test exec-10.16 {errors in exec invocation} -constraints {exec} -body { exec cat << foo > a/b/c -} -returnCodes error -result {couldn't write file "a/b/c": no such file or directory} +} -returnCodes error -result {couldn't write file "a/b/c": No such file or directory} test exec-10.17 {errors in exec invocation} -constraints {exec} -body { exec cat << foo > a/b/c -} -returnCodes error -result {couldn't write file "a/b/c": no such file or directory} +} -returnCodes error -result {couldn't write file "a/b/c": No such file or directory} set f [open $path(gorp.file) w] test exec-10.18 {errors in exec invocation} -constraints {exec} -body { exec cat <@ $f @@ -511,16 +511,16 @@ test exec-12.3 {reaping background processes} {exec unix nonPortable} { # Make sure "errorCode" is set correctly. test exec-13.1 {setting errorCode variable} {exec} { - list [catch {exec [interpreter] $path(cat) < a/b/c} msg] [string tolower $errorCode] -} {1 {posix enoent {no such file or directory}}} + list [catch {exec [interpreter] $path(cat) < a/b/c} msg] $errorCode +} {1 {POSIX ENOENT {No such file or directory}}} test exec-13.2 {setting errorCode variable} {exec} { - list [catch {exec [interpreter] $path(cat) > a/b/c} msg] [string tolower $errorCode] -} {1 {posix enoent {no such file or directory}}} + list [catch {exec [interpreter] $path(cat) > a/b/c} msg] $errorCode +} {1 {POSIX ENOENT {No such file or directory}}} test exec-13.3 {setting errorCode variable} {exec notValgrind} { set x [catch {exec _weird_cmd_} msg] - list $x [string tolower $msg] [lindex $errorCode 0] \ - [string tolower [lrange $errorCode 2 end]] -} {1 {couldn't execute "_weird_cmd_": no such file or directory} POSIX {{no such file or directory}}} + list $x $msg [lindex $errorCode 0] \ + [lrange $errorCode 2 end] +} {1 {couldn't execute "_weird_cmd_": No such file or directory} POSIX {{No such file or directory}}} test exec-13.4 {extended exit result codes} -setup { set tmp [makeFile {exit 0x00000101} tmpfile.exec-13.4] } -constraints {win} -body { @@ -556,7 +556,7 @@ test exec-14.3 {unknown switch} -constraints {exec} -body { } -returnCodes error -result {bad option "-gorp": must be -ignorestderr, -keepnewline, or --} test exec-14.4 {-- switch} -constraints {exec notValgrind} -body { exec -- -gorp -} -returnCodes error -result {couldn't execute "-gorp": no such file or directory} +} -returnCodes error -result {couldn't execute "-gorp": No such file or directory} test exec-14.5 {-ignorestderr switch} {exec} { # Alas, the use of -ignorestderr is buried here :-( exec [interpreter] $path(sh2) -c [list $path(echo2) foo bar] 2>@1 diff --git a/tests/fCmd.test b/tests/fCmd.test index 22ac7b8..9c4ba21 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.test @@ -246,7 +246,7 @@ test fCmd-3.4 {FileCopyRename: Tcl_TranslateFileName passes} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { file copy tf1 ~ -} -result {error copying "tf1": no such file or directory} +} -result {error copying "tf1": No such file or directory} test fCmd-3.5 {FileCopyRename: target doesn't exist: stat(target) != 0} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -321,7 +321,7 @@ test fCmd-3.15 {FileCopyRename: source[0] == '\x00'} -setup { } -constraints {notRoot unixOrWin} -returnCodes error -body { file mkdir td1 file rename / td1 -} -result {error renaming "/" to "td1": file already exists} +} -result {error renaming "/" to "td1": File exists} test fCmd-3.16 {FileCopyRename: break on first error} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { @@ -332,7 +332,7 @@ test fCmd-3.16 {FileCopyRename: break on first error} -setup { file mkdir td1 createfile [file join td1 tf3] file rename tf1 tf2 tf3 tf4 td1 -} -result [subst {error renaming "tf3" to "[file join td1 tf3]": file already exists}] +} -result [subst {error renaming "tf3" to "[file join td1 tf3]": File exists}] test fCmd-4.1 {TclFileMakeDirsCmd: make each dir: 1 dir} -setup { cleanup @@ -362,7 +362,7 @@ test fCmd-4.5 {TclFileMakeDirsCmd: Tcl_SplitPath returns 0: *name == '\x00'} -se cleanup } -constraints {notRoot} -returnCodes error -body { file mkdir "" -} -result {can't create directory "": no such file or directory} +} -result {can't create directory "": No such file or directory} test fCmd-4.6 {TclFileMakeDirsCmd: one level deep} -setup { cleanup } -constraints {notRoot} -body { @@ -388,7 +388,7 @@ test fCmd-4.9 {TclFileMakeDirsCmd: exists, not dir} -setup { } -constraints {notRoot} -returnCodes error -body { createfile tf1 file mkdir tf1 -} -result [subst {can't create directory "[file join tf1]": file already exists}] +} -result [subst {can't create directory "[file join tf1]": File exists}] test fCmd-4.10 {TclFileMakeDirsCmd: exists, is dir} -setup { cleanup } -constraints {notRoot} -body { @@ -406,7 +406,7 @@ test fCmd-4.11 {TclFileMakeDirsCmd: doesn't exist: errno != ENOENT} -setup { } -cleanup { testchmod 0o755 td1/td2 cleanup -} -result {can't create directory "td1/td2/td3": permission denied} +} -result {can't create directory "td1/td2/td3": Permission denied} test fCmd-4.13 {TclFileMakeDirsCmd: doesn't exist: errno == ENOENT} -setup { cleanup } -constraints {notRoot} -body { @@ -423,7 +423,7 @@ test fCmd-4.14 {TclFileMakeDirsCmd: TclpCreateDirectory fails} -setup { file mkdir foo/tf1 } -returnCodes error -cleanup { file delete -force foo -} -result {can't create directory "foo/tf1": permission denied} +} -result {can't create directory "foo/tf1": Permission denied} test fCmd-4.16 {TclFileMakeDirsCmd: TclpCreateDirectory succeeds} -setup { cleanup } -constraints {notRoot} -body { @@ -525,7 +525,7 @@ test fCmd-6.3 {CopyRenameOneFile: lstat(source) != 0} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { file rename tf1 tf2 -} -result {error renaming "tf1": no such file or directory} +} -result {error renaming "tf1": No such file or directory} test fCmd-6.4 {CopyRenameOneFile: lstat(source) == 0} -setup { cleanup } -constraints {notRoot} -body { @@ -549,7 +549,7 @@ test fCmd-6.6 {CopyRenameOneFile: errno != ENOENT} -setup { file rename tf1 td1 } -returnCodes error -cleanup { testchmod 0o755 td1 -} -result {error renaming "tf1" to "td1/tf1": permission denied} +} -result {error renaming "tf1" to "td1/tf1": Permission denied} test fCmd-6.9 {CopyRenameOneFile: errno == ENOENT} -setup { cleanup } -constraints {unix notRoot} -body { @@ -563,14 +563,14 @@ test fCmd-6.10 {CopyRenameOneFile: lstat(target) == 0} -setup { createfile tf1 createfile tf2 file rename tf1 tf2 -} -result {error renaming "tf1" to "tf2": file already exists} +} -result {error renaming "tf1" to "tf2": File exists} test fCmd-6.11 {CopyRenameOneFile: force == 0} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { createfile tf1 createfile tf2 file rename tf1 tf2 -} -result {error renaming "tf1" to "tf2": file already exists} +} -result {error renaming "tf1" to "tf2": File exists} test fCmd-6.12 {CopyRenameOneFile: force != 0} -setup { cleanup } -constraints {notRoot} -body { @@ -668,7 +668,7 @@ test fCmd-6.23 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { } -returnCodes error -cleanup { file attributes td1 -permissions 0o755 cleanup -} -match regexp -result {^error renaming "td1"( to "/tmp/tcl\d+/td1")?: permission denied$} +} -match regexp -result {^error renaming "td1"( to "/tmp/tcl\d+/td1")?: Permission denied$} test fCmd-6.24 {CopyRenameOneFile: error uses original name} -setup { cleanup } -constraints {unix notRoot} -body { @@ -679,7 +679,7 @@ test fCmd-6.24 {CopyRenameOneFile: error uses original name} -setup { } -returnCodes error -cleanup { file attributes $td1name -permissions 0o755 file delete -force ~/td1 -} -result {error copying "~/td1": permission denied} +} -result {error copying "~/td1": Permission denied} test fCmd-6.25 {CopyRenameOneFile: error uses original name} -setup { cleanup } -constraints {unix notRoot} -body { @@ -691,7 +691,7 @@ test fCmd-6.25 {CopyRenameOneFile: error uses original name} -setup { } -returnCodes error -cleanup { file attributes $td1name -permissions 0o755 file delete -force ~/td1 -} -result {error copying "td2" to "~/td1/td2": permission denied} +} -result {error copying "td2" to "~/td1/td2": Permission denied} test fCmd-6.26 {CopyRenameOneFile: doesn't use original name} -setup { cleanup } -constraints {unix notRoot} -body { @@ -702,7 +702,7 @@ test fCmd-6.26 {CopyRenameOneFile: doesn't use original name} -setup { } -returnCodes error -cleanup { file attributes $td2name -permissions 0o755 file delete -force ~/td1 -} -result "error copying \"~/td1\" to \"td1\": \"[file join $::env(HOME) td1 td2]\": permission denied" +} -result "error copying \"~/td1\" to \"td1\": \"[file join $::env(HOME) td1 td2]\": Permission denied" test fCmd-6.27 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { cleanup $tmpspace } -constraints {notRoot xdev} -returnCodes error -body { @@ -710,7 +710,7 @@ test fCmd-6.27 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { file mkdir [file join $tmpspace td1] createfile [file join $tmpspace td1 tf1] file rename -force td1 $tmpspace -} -match glob -result {error renaming "td1" to "/tmp/tcl*/td1": file already exists} +} -match glob -result {error renaming "td1" to "/tmp/tcl*/td1": File exists} test fCmd-6.28 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { cleanup $tmpspace } -constraints {notRoot xdev notWsl} -body { @@ -720,7 +720,7 @@ test fCmd-6.28 {CopyRenameOneFile: TclpCopyDirectory failed} -setup { } -returnCodes error -cleanup { file attributes td1/td2/td3 -permissions 0o755 cleanup $tmpspace -} -match glob -result {error renaming "td1" to "/tmp/tcl*/td1": "td1/td2/td3": permission denied} +} -match glob -result {error renaming "td1" to "/tmp/tcl*/td1": "td1/td2/td3": Permission denied} test fCmd-6.29 {CopyRenameOneFile: TclpCopyDirectory passed} -setup { cleanup $tmpspace } -constraints {notRoot xdev} -body { @@ -738,7 +738,7 @@ test fCmd-6.30 {CopyRenameOneFile: TclpRemoveDirectory failed} -setup { catch {file delete [file join $tmpspace bar]} catch {file attr foo -perm 0o40777} catch {file delete -force foo} -} -match glob -result {*: permission denied} +} -match glob -result {*: Permission denied} test fCmd-6.31 {CopyRenameOneFile: TclpDeleteFile passed} -setup { cleanup $tmpspace } -constraints {notRoot xdev} -body { @@ -751,7 +751,7 @@ test fCmd-6.32 {CopyRenameOneFile: copy} -constraints {notRoot} -setup { cleanup } -returnCodes error -body { file copy tf1 tf2 -} -result {error copying "tf1": no such file or directory} +} -result {error copying "tf1": No such file or directory} test fCmd-7.1 {FileForceOption: none} -constraints {notRoot} -setup { cleanup @@ -793,7 +793,7 @@ test fCmd-8.1 {FileBasename: basename of ~user: argc == 1 && *path == ~} \ file rename ~$user td1 } -returnCodes error -cleanup { file delete -force td1 -} -result "error renaming \"~$user\" to \"td1/[file tail ~$user]\": permission denied" +} -result "error renaming \"~$user\" to \"td1/[file tail ~$user]\": Permission denied" test fCmd-8.2 {FileBasename: basename of ~user: argc == 1 && *path == ~} \ -constraints {unix notRoot} -body { string equal [file tail ~$user] ~$user @@ -801,7 +801,7 @@ test fCmd-8.2 {FileBasename: basename of ~user: argc == 1 && *path == ~} \ test fCmd-8.3 {file copy and path translation: ensure correct error} -body { file copy ~ [file join this file doesnt exist] } -returnCodes error -result [subst \ - {error copying "~" to "[file join this file doesnt exist]": no such file or directory}] + {error copying "~" to "[file join this file doesnt exist]": No such file or directory}] test fCmd-9.1 {file rename: comprehensive: EACCES} -setup { cleanup @@ -813,12 +813,12 @@ test fCmd-9.1 {file rename: comprehensive: EACCES} -setup { } -returnCodes error -cleanup { file delete -force td2 file delete -force td1 -} -result {error renaming "td1" to "td2/td1": permission denied} +} -result {error renaming "td1" to "td2/td1": Permission denied} test fCmd-9.2 {file rename: comprehensive: source doesn't exist} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { file rename tf1 tf2 -} -result {error renaming "tf1": no such file or directory} +} -result {error renaming "tf1": No such file or directory} test fCmd-9.3 {file rename: comprehensive: file to new name} -setup { cleanup } -constraints {notRoot testchmod} -body { @@ -883,7 +883,7 @@ test fCmd-9.7 {file rename: comprehensive: file to existing file} -setup { file rename -force tfs3 tfd3 file rename -force tfs4 tfd4 list [lsort [glob tf*]] $msg [file writable tfd1] [file writable tfd2] [file writable tfd3] [file writable tfd4] -} -result {{tf1 tf2 tfd1 tfd2 tfd3 tfd4} {1 {error renaming "tf1" to "tf2": file already exists}} 1 1 0 0} +} -result {{tf1 tf2 tfd1 tfd2 tfd3 tfd4} {1 {error renaming "tf1" to "tf2": File exists}} 1 1 0 0} test fCmd-9.8 {file rename: comprehensive: dir to empty dir} -setup { cleanup } -constraints {notRoot testchmod notNetworkFilesystem} -body { @@ -919,7 +919,7 @@ test fCmd-9.8 {file rename: comprehensive: dir to empty dir} -setup { } list [lsort [glob td*]] $msg [file writable [file join tdd1 tds1]] \ [file writable [file join tdd2 tds2]] $w3 $w4 -} -result [subst {{td1 td2 tdd1 tdd2 tdd3 tdd4} {1 {error renaming "td1" to "[file join td2 td1]": file already exists}} 1 1 0 0}] +} -result [subst {{td1 td2 tdd1 tdd2 tdd3 tdd4} {1 {error renaming "td1" to "[file join td2 td1]": File exists}} 1 1 0 0}] # Test can hit EEXIST or EBUSY, depending on underlying filesystem test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} -setup { cleanup @@ -969,7 +969,7 @@ test fCmd-9.12 {file rename: comprehensive: target exists} -setup { [catch {file rename td1 td2} msg] $msg } -cleanup { testchmod 0o755 [file join td2 td1] -} -result [subst {0 1 1 {error renaming "td1" to "[file join td2 td1]": file already exists}}] +} -result [subst {0 1 1 {error renaming "td1" to "[file join td2 td1]": File exists}}] # Test can hit EEXIST or EBUSY, depending on underlying filesystem test fCmd-9.13 {file rename: comprehensive: can't overwrite target} -setup { cleanup @@ -1001,7 +1001,7 @@ test fCmd-9.14.2 {file rename: comprehensive: dir into self} -setup { file rename [file join .. td1] [file join .. td1x] } -returnCodes error -cleanup { cd $dir -} -result [subst {error renaming "[file join .. td1]" to "[file join .. td1x]": permission denied}] +} -result [subst {error renaming "[file join .. td1]" to "[file join .. td1x]": Permission denied}] test fCmd-9.14.3 {file rename: comprehensive: dir into self} -setup { cleanup set dir [pwd] @@ -1033,7 +1033,7 @@ test fCmd-10.1 {file copy: comprehensive: source doesn't exist} -setup { cleanup } -constraints {notRoot} -returnCodes error -body { file copy tf1 tf2 -} -result {error copying "tf1": no such file or directory} +} -result {error copying "tf1": No such file or directory} test fCmd-10.2 {file copy: comprehensive: file to new name} -setup { cleanup } -constraints {notRoot testchmod} -body { @@ -1106,7 +1106,7 @@ test fCmd-10.4 {file copy: comprehensive: file to existing file} -setup { file copy -force tfs3 tfd3 file copy -force tfs4 tfd4 list [lsort [glob tf*]] $msg [file writable tfd1] [file writable tfd2] [file writable tfd3] [file writable tfd4] -} -result {{tf1 tf2 tfd1 tfd2 tfd3 tfd4 tfs1 tfs2 tfs3 tfs4} {1 {error copying "tf1" to "tf2": file already exists}} 1 1 0 0} +} -result {{tf1 tf2 tfd1 tfd2 tfd3 tfd4 tfs1 tfs2 tfs3 tfs4} {1 {error copying "tf1" to "tf2": File exists}} 1 1 0 0} test fCmd-10.5 {file copy: comprehensive: dir to empty dir} -setup { cleanup } -constraints {notRoot testchmod} -body { @@ -1130,7 +1130,7 @@ test fCmd-10.5 {file copy: comprehensive: dir to empty dir} -setup { set a4 [catch {file copy -force tds3 tdd3}] set a5 [catch {file copy -force tds4 tdd4}] list [lsort [glob td*]] $a1 $a2 $a3 $a4 $a5 -} -result [subst {{td1 td2 tdd1 tdd2 tdd3 tdd4 tds1 tds2 tds3 tds4} {1 {error copying "td1" to "[file join td2 td1]": file already exists}} {1 {error copying "tds1" to "[file join tdd1 tds1]": file already exists}} 1 1 1}] +} -result [subst {{td1 td2 tdd1 tdd2 tdd3 tdd4 tds1 tds2 tds3 tds4} {1 {error copying "td1" to "[file join td2 td1]": File exists}} {1 {error copying "tds1" to "[file join tdd1 tds1]": File exists}} 1 1 1}] test fCmd-10.6 {file copy: comprehensive: dir to non-empty dir} -setup { cleanup } -constraints {notRoot unixOrWin testchmod notWsl} -body { @@ -1142,7 +1142,7 @@ test fCmd-10.6 {file copy: comprehensive: dir to non-empty dir} -setup { set a1 [list [catch {file copy -force tds1 tdd1} msg] $msg] set a2 [list [catch {file copy -force tds2 tdd2} msg] $msg] list [lsort [glob td*]] $a1 $a2 [file writable tds1] [file writable tds2] -} -result [subst {{tdd1 tdd2 tds1 tds2} {1 {error copying "tds1" to "[file join tdd1 tds1]": file already exists}} {1 {error copying "tds2" to "[file join tdd2 tds2]": file already exists}} 1 0}] +} -result [subst {{tdd1 tdd2 tds1 tds2} {1 {error copying "tds1" to "[file join tdd1 tds1]": File exists}} {1 {error copying "tds2" to "[file join tdd2 tds2]": File exists}} 1 0}] test fCmd-10.7 {file rename: comprehensive: file to new name and dir} -setup { cleanup } -constraints {notRoot testchmod} -body { @@ -1199,13 +1199,13 @@ test fCmd-10.11 {file copy: copy to empty file name} -setup { } -returnCodes error -body { createfile tf1 file copy tf1 "" -} -result {error copying "tf1" to "": no such file or directory} +} -result {error copying "tf1" to "": No such file or directory} test fCmd-10.12 {file rename: rename to empty file name} -setup { cleanup } -returnCodes error -body { createfile tf1 file rename tf1 "" -} -result {error renaming "tf1" to "": no such file or directory} +} -result {error renaming "tf1" to "": No such file or directory} cleanup # old tests @@ -2354,21 +2354,21 @@ test fCmd-28.5 {file link: source already exists} -setup { file link abc.dir abc2.dir } -returnCodes error -cleanup { cd [workingDirectory] -} -result {could not create new link "abc.dir": that path already exists} +} -result {could not create new link "abc.dir": File exists} test fCmd-28.6 {file link: unsupported operation} -setup { cd [temporaryDirectory] } -constraints {linkDirectory win} -body { file link -hard abc.link abc.dir } -returnCodes error -cleanup { cd [workingDirectory] -} -result {could not create new link "abc.link" pointing to "abc.dir": illegal operation on a directory} +} -result {could not create new link "abc.link" pointing to "abc.dir": Is a directory} test fCmd-28.7 {file link: source already exists} -setup { cd [temporaryDirectory] } -constraints {linkFile} -body { file link abc.file abc2.file } -returnCodes error -cleanup { cd [workingDirectory] -} -result {could not create new link "abc.file": that path already exists} +} -result {could not create new link "abc.file": File exists} # In Windows 10 developer mode, we _can_ create symbolic links to files! test fCmd-28.8 {file link} -constraints {linkFile winLessThan10} -setup { cd [temporaryDirectory] @@ -2377,7 +2377,7 @@ test fCmd-28.8 {file link} -constraints {linkFile winLessThan10} -setup { } -cleanup { file delete -force abc.link cd [workingDirectory] -} -returnCodes error -result {could not create new link "abc.link" pointing to "abc.file": invalid argument} +} -returnCodes error -result {could not create new link "abc.link" pointing to "abc.file": Invalid argument} test fCmd-28.9 {file link: success with file} -constraints {linkFile} -setup { cd [temporaryDirectory] file delete -force abc.link @@ -2416,7 +2416,7 @@ test fCmd-28.10.1 {file link: linking to nonexistent path} -setup { file link doesnt/abc.link abc.dir } -returnCodes error -cleanup { cd [workingDirectory] -} -result {could not create new link "doesnt/abc.link": no such file or directory} +} -result {could not create new link "doesnt/abc.link": No such file or directory} test fCmd-28.11 {file link: success with directory} -setup { cd [temporaryDirectory] file delete -force abc.link @@ -2463,7 +2463,7 @@ test fCmd-28.13 {file link} -constraints {linkDirectory notWine} -setup { } -returnCodes error -cleanup { file delete -force abc.link cd [workingDirectory] -} -result {could not create new link "abc.link": that path already exists} +} -result {could not create new link "abc.link": File exists} test fCmd-28.14 {file link: deletes link not dir} -setup { cd [temporaryDirectory] } -constraints {linkDirectory} -body { diff --git a/tests/fileName.test b/tests/fileName.test index 575a17f..6f8966f 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1331,8 +1331,8 @@ unset globname catch {file attributes globTest/a1 -permissions 0} test filename-15.1 {unix specific globbing} {unix nonPortable} { - string tolower [list [catch {glob globTest/a1/*} msg] $msg $errorCode] -} {1 {couldn't read directory "globtest/a1": permission denied} {posix eacces {permission denied}}} + list [catch {glob globTest/a1/*} msg] $msg $errorCode +} {1 {couldn't read directory "globtest/a1": Permission denied} {POSIX EACCES {Permission denied}}} test filename-15.2 {unix specific no complain: no errors} {unix nonPortable} { glob -nocomplain globTest/a1/* } {} diff --git a/tests/fileSystem.test b/tests/fileSystem.test index 0b6fa1d..40746be 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -498,19 +498,19 @@ test filesystem-5.1 {cache and ~} -constraints testfilesystem -setup { test filesystem-6.1 {empty file name} -returnCodes error -body { open "" -} -result {couldn't open "": no such file or directory} +} -result {couldn't open "": No such file or directory} test filesystem-6.2 {empty file name} -returnCodes error -body { file stat "" arr -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.3 {empty file name} -returnCodes error -body { file atime "" -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.4 {empty file name} -returnCodes error -body { file attributes "" -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.5 {empty file name} -returnCodes error -body { file copy "" "" -} -result {error copying "": no such file or directory} +} -result {error copying "": No such file or directory} test filesystem-6.6 {empty file name} {file delete ""} {} test filesystem-6.7 {empty file name} {file dirname ""} . test filesystem-6.8 {empty file name} {file executable ""} 0 @@ -521,19 +521,19 @@ test filesystem-6.12 {empty file name} {file isfile ""} 0 test filesystem-6.13 {empty file name} {file join ""} {} test filesystem-6.14 {empty file name} -returnCodes error -body { file link "" -} -result {could not read link "": no such file or directory} +} -result {could not read link "": No such file or directory} test filesystem-6.15 {empty file name} -returnCodes error -body { file lstat "" arr -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.16 {empty file name} -returnCodes error -body { file mtime "" -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.17 {empty file name} -returnCodes error -body { file mtime "" 0 -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.18 {empty file name} -returnCodes error -body { file mkdir "" -} -result {can't create directory "": no such file or directory} +} -result {can't create directory "": No such file or directory} test filesystem-6.19 {empty file name} {file nativename ""} {} test filesystem-6.20 {empty file name} {file normalize ""} {} test filesystem-6.21 {empty file name} {file owned ""} 0 @@ -541,17 +541,17 @@ test filesystem-6.22 {empty file name} {file pathtype ""} relative test filesystem-6.23 {empty file name} {file readable ""} 0 test filesystem-6.24 {empty file name} -returnCodes error -body { file readlink "" -} -result {could not read link "": no such file or directory} +} -result {could not read link "": No such file or directory} test filesystem-6.25 {empty file name} -returnCodes error -body { file rename "" "" -} -result {error renaming "": no such file or directory} +} -result {error renaming "": No such file or directory} test filesystem-6.26 {empty file name} {file rootname ""} {} test filesystem-6.27 {empty file name} -returnCodes error -body { file separator "" } -result {unrecognised path} test filesystem-6.28 {empty file name} -returnCodes error -body { file size "" -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.29 {empty file name} {file split ""} {} test filesystem-6.30 {empty file name} -returnCodes error -body { file system "" @@ -559,7 +559,7 @@ test filesystem-6.30 {empty file name} -returnCodes error -body { test filesystem-6.31 {empty file name} {file tail ""} {} test filesystem-6.32 {empty file name} -returnCodes error -body { file type "" -} -result {could not read "": no such file or directory} +} -result {could not read "": No such file or directory} test filesystem-6.33 {empty file name} {file writable ""} 0 test filesystem-6.34 {file name with (invalid) nul character} { list [catch "open foo\x00" msg] $msg @@ -692,7 +692,7 @@ test filesystem-7.4 {cross-filesystem file copy with -force} -setup { file delete -force simplefile file delete -force file2 cd $dir -} -result {0 {} 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 {} 1} +} -result {0 {} 1 {error copying "simplefs:/simplefile" to "file2": File exists} 0 {} 1} test filesystem-7.5 {cross-filesystem file copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] @@ -717,7 +717,7 @@ test filesystem-7.5 {cross-filesystem file copy with -force} -setup { file delete -force simplefile file delete -force file2 cd $dir -} -result {0 {} 1 {error copying "simplefs:/simplefile" to "file2": file already exists} 0 {} 1} +} -result {0 {} 1 {error copying "simplefs:/simplefile" to "file2": File exists} 0 {} 1} test filesystem-7.6 {cross-filesystem dir copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] @@ -745,7 +745,7 @@ test filesystem-7.6 {cross-filesystem dir copy with -force} -setup { file delete -force simpledir file delete -force dir2 cd $dir -} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} +} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": File exists} 0 {} 1 1} test filesystem-7.7 {cross-filesystem dir copy with -force} -setup { set dir [pwd] cd [tcltest::temporaryDirectory] @@ -775,7 +775,7 @@ test filesystem-7.7 {cross-filesystem dir copy with -force} -setup { file delete -force simpledir file delete -force dir2 cd $dir -} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": file already exists} 0 {} 1 1} +} -result {0 {} 1 {error copying "simplefs:/simpledir" to "dir2/simpledir": File exists} 0 {} 1 1} removeFile gorp.file test filesystem-7.8 {vfs cd} -setup { set dir [pwd] diff --git a/tests/http.test b/tests/http.test index 587e6e4..6e973d0 100644 --- a/tests/http.test +++ b/tests/http.test @@ -630,7 +630,7 @@ test http-4.14.$ThreadLevel {http::Event} -body { lindex [http::error $token] 0 } -cleanup { catch {http::cleanup $token} -} -result {connect failed connection refused} +} -result {Connect failed: Connection refused} # Bogus host test http-4.15.$ThreadLevel {http::Event} -body { diff --git a/tests/interp.test b/tests/interp.test index fa263e2..20fa50a 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -1214,7 +1214,7 @@ test interp-20.23 {interp hide vs safety} { lappend l $msg interp delete a set l -} {1 {permission denied: safe interpreter cannot hide commands}} +} {1 {Permission denied: safe interpreter cannot hide commands}} test interp-20.24 {interp hide vs safety} { catch {interp delete a} interp create a -safe @@ -1224,7 +1224,7 @@ test interp-20.24 {interp hide vs safety} { lappend l $msg interp delete a set l -} {1 {permission denied: safe interpreter cannot hide commands}} +} {1 {Permission denied: safe interpreter cannot hide commands}} test interp-20.25 {interp hide vs safety} { catch {interp delete a} interp create a -safe @@ -1267,7 +1267,7 @@ test interp-20.28 {interp expose vs safety} { lappend l $msg interp delete a set l -} {0 {} 1 {permission denied: safe interpreter cannot expose commands}} +} {0 {} 1 {Permission denied: safe interpreter cannot expose commands}} test interp-20.29 {interp expose vs safety} { catch {interp delete a} interp create a -safe @@ -1278,7 +1278,7 @@ test interp-20.29 {interp expose vs safety} { lappend l $msg interp delete a set l -} {0 {} 1 {permission denied: safe interpreter cannot expose commands}} +} {0 {} 1 {Permission denied: safe interpreter cannot expose commands}} test interp-20.30 {interp expose vs safety} { catch {interp delete a} interp create a -safe @@ -1290,7 +1290,7 @@ test interp-20.30 {interp expose vs safety} { lappend l $msg interp delete a set l -} {0 {} 1 {permission denied: safe interpreter cannot expose commands}} +} {0 {} 1 {Permission denied: safe interpreter cannot expose commands}} test interp-20.31 {interp expose vs safety} { catch {interp delete a} interp create a -safe @@ -1767,7 +1767,7 @@ test interp-22.5 {testing interp marktrusted} { catch {a eval {interp marktrusted b}} msg interp delete a set msg -} {permission denied: safe interpreter cannot mark trusted} +} {Permission denied: safe interpreter cannot mark trusted} test interp-22.6 {testing interp marktrusted} { catch {interp delete a} interp create a -safe @@ -1775,7 +1775,7 @@ test interp-22.6 {testing interp marktrusted} { catch {a eval {b marktrusted}} msg interp delete a set msg -} {permission denied: safe interpreter cannot mark trusted} +} {Permission denied: safe interpreter cannot mark trusted} test interp-22.7 {testing interp marktrusted} { catch {interp delete a} interp create a -safe @@ -3004,7 +3004,7 @@ test interp-29.6.8 {safe interpreter recursion limit} { set n [catch {child eval {interp recursionlimit {} 42}} msg] interp delete child list $n $msg -} {1 {permission denied: safe interpreters cannot change recursion limit}} +} {1 {Permission denied: safe interpreters cannot change recursion limit}} test interp-29.6.9 {safe interpreter recursion limit} { interp create child -safe set result [ @@ -3018,7 +3018,7 @@ test interp-29.6.9 {safe interpreter recursion limit} { ] interp delete child set result -} {1 {permission denied: safe interpreters cannot change recursion limit}} +} {1 {Permission denied: safe interpreters cannot change recursion limit}} test interp-29.6.10 {safe interpreter recursion limit} { interp create child -safe set result [ @@ -3032,7 +3032,7 @@ test interp-29.6.10 {safe interpreter recursion limit} { ] interp delete child set result -} {1 {permission denied: safe interpreters cannot change recursion limit}} +} {1 {Permission denied: safe interpreters cannot change recursion limit}} # # Deep recursion (into interps when the regular one fails): diff --git a/tests/io.test b/tests/io.test index a085976..b9426b5 100644 --- a/tests/io.test +++ b/tests/io.test @@ -2855,8 +2855,8 @@ test io-29.27 {Tcl_Flush on closed pipeline} stdio { } } regsub {".*":} $x {"":} x - string tolower $x -} {1 {error flushing "": broken pipe} {posix epipe {broken pipe}}} + set x +} {1 {error flushing "": Broken pipe} {POSIX EPIPE {Broken pipe}}} test io-29.28 {Tcl_WriteChars, lf mode} { file delete $path(test1) set f [open $path(test1) w] @@ -4211,7 +4211,7 @@ test io-32.3 {Tcl_Read, negative byte count} { set l [list [catch {read $f -1} msg] $msg] close $f set l -} {1 {expected non-negative integer but got "-1"}} +} {1 {Expected non-negative integer but got "-1"}} test io-32.4 {Tcl_Read, positive byte count} { set f [open $path(longfile) r] set x [read $f 1024] @@ -4753,8 +4753,8 @@ test io-34.8 {Tcl_Seek on pipes: not supported} stdio { set x [list [catch {seek $f1 0 current} msg] $msg] close $f1 regsub {".*":} $x {"":} x - string tolower $x -} {1 {error during seek on "": invalid argument}} + set x +} {1 {error during seek on "": Invalid argument}} test io-34.9 {Tcl_Seek, testing buffered input flushing} { file delete $path(test3) set f [open $path(test3) w] @@ -5931,11 +5931,11 @@ test io-40.10 {POSIX open access modes: RDONLY} { test io-40.11 {POSIX open access modes: RDONLY} -match regexp -body { file delete $path(test3) open $path(test3) RDONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test io-40.12 {POSIX open access modes: WRONLY} -match regexp -body { file delete $path(test3) open $path(test3) WRONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test io-40.13 {POSIX open access modes: WRONLY} { makeFile xyzzy test3 set f [open $path(test3) WRONLY] @@ -5951,7 +5951,7 @@ test io-40.13 {POSIX open access modes: WRONLY} { test io-40.14 {POSIX open access modes: RDWR} -match regexp -body { file delete $path(test3) open $path(test3) RDWR -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test io-40.15 {POSIX open access modes: RDWR} { makeFile xyzzy test3 set f [open $path(test3) RDWR] @@ -7638,7 +7638,7 @@ test io-52.20 {TclCopyChannel & encodings} -setup { } -cleanup { close $in close $out -} -returnCodes 1 -match glob -result {error reading "file*": illegal byte sequence} +} -returnCodes 1 -match glob -result {error reading "file*": Invalid or incomplete multibyte or wide character} test io-52.21 {TclCopyChannel & encodings} -setup { set out [open $path(utf8-fcopy.txt) w] fconfigure $out -encoding utf-8 -translation lf @@ -7659,7 +7659,7 @@ test io-52.21 {TclCopyChannel & encodings} -setup { } -cleanup { close $in close $out -} -returnCodes 1 -match glob -result {error writing "file*": illegal byte sequence} +} -returnCodes 1 -match glob -result {error writing "file*": Invalid or incomplete multibyte or wide character} test io-52.22 {TclCopyChannel & encodings} -setup { set out [open $path(utf8-fcopy.txt) w] fconfigure $out -encoding utf-8 -translation lf @@ -7686,7 +7686,7 @@ test io-52.22 {TclCopyChannel & encodings} -setup { close $in close $out unset ::s0 -} -match glob -result {0 {error reading "file*": illegal byte sequence}} +} -match glob -result {0 {error reading "file*": Invalid or incomplete multibyte or wide character}} test io-52.23 {TclCopyChannel & encodings} -setup { set out [open $path(utf8-fcopy.txt) w] fconfigure $out -encoding utf-8 -translation lf @@ -7713,7 +7713,7 @@ test io-52.23 {TclCopyChannel & encodings} -setup { close $in close $out unset ::s0 -} -match glob -result {0 {error writing "file*": illegal byte sequence}} +} -match glob -result {0 {error writing "file*": Invalid or incomplete multibyte or wide character}} test io-53.1 {CopyData} {fcopy} { @@ -8696,7 +8696,7 @@ test io-60.1 {writing illegal utf sequences} {fileevent testbytestring} { # cut of the remainder of the error stack, especially the filename set result [lreplace $result 3 3 [lindex [split [lindex $result 3] \n] 0]] list $x $result -} {1 {gets ABC catch {error writing "stdout": illegal byte sequence}}} +} {1 {gets ABC catch {error writing "stdout": Invalid or incomplete multibyte or wide character}}} test io-61.1 {Reset eof state after changing the eof char} -setup { set datafile [makeFile {} eofchar] @@ -9166,7 +9166,7 @@ test io-75.6 {invalid utf-8 encoding gets is not ignored (-profile strict)} -set } -cleanup { close $f removeFile io-75.6 -} -match glob -returnCodes 1 -result {error reading "*": illegal byte sequence} +} -match glob -returnCodes 1 -result {error reading "*": Invalid or incomplete multibyte or wide character} test io-75.7 {invalid utf-8 encoding gets is not ignored (-profile strict)} -setup { set fn [makeFile {} io-75.7] @@ -9182,7 +9182,7 @@ test io-75.7 {invalid utf-8 encoding gets is not ignored (-profile strict)} -set } -cleanup { close $f removeFile io-75.7 -} -match glob -returnCodes 1 -result {error reading "*": illegal byte sequence} +} -match glob -returnCodes 1 -result {error reading "*": Invalid or incomplete multibyte or wide character} test io-75.8 {invalid utf-8 encoding eof handling (-profile strict)} -setup { set fn [makeFile {} io-75.8] @@ -9216,7 +9216,7 @@ test io-75.9 {unrepresentable character write passes and is replaced by ?} -setu } -cleanup { close $f removeFile io-75.9 -} -match glob -result [list {A} {error writing "*": illegal byte sequence}] +} -match glob -result [list {A} {error writing "*": Invalid or incomplete multibyte or wide character}] # Incomplete sequence test. # This error may IMHO only be detected with the close. @@ -9260,7 +9260,7 @@ test io-75.11 {shiftjis encoding error read results in raw bytes} -setup { } -cleanup { close $f removeFile io-75.11 -} -match glob -result {41 1 {error reading "*": illegal byte sequence}} +} -match glob -result {41 1 {error reading "*": Invalid or incomplete multibyte or wide character}} test io-75.12 {invalid utf-8 encoding read is ignored} -setup { set fn [makeFile {} io-75.12] @@ -9295,7 +9295,7 @@ test io-75.13 {invalid utf-8 encoding read is not ignored (-profile strict)} -se } -cleanup { close $f removeFile io-75.13 -} -match glob -result {41 1 {error reading "*": illegal byte sequence}} +} -match glob -result {41 1 {error reading "*": Invalid or incomplete multibyte or wide character}} # ### ### ### ######### ######### ######### diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 61b3bdd..6054cc9 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -138,7 +138,7 @@ test iocmd-4.8 {read command with incorrect combination of arguments} { } {1 {wrong # args: should be "read channelId ?numChars?" or "read ?-nonewline? channelId"} {TCL WRONGARGS}} test iocmd-4.9 {read command} { list [catch {read stdin foo} msg] $msg $::errorCode -} {1 {expected non-negative integer but got "foo"} {TCL VALUE NUMBER}} +} {1 {Expected non-negative integer but got "foo"} {TCL VALUE NUMBER}} test iocmd-4.10 {read command} { list [catch {read file107} msg] $msg $::errorCode } {1 {can not find channel named "file107"} {TCL LOOKUP CHANNEL file107}} @@ -156,7 +156,7 @@ test iocmd-4.12 {read command} -setup { read $f 12z } -cleanup { close $f -} -result {expected non-negative integer but got "12z"} -errorCode {TCL VALUE NUMBER} +} -result {Expected non-negative integer but got "12z"} -errorCode {TCL VALUE NUMBER} test iocmd-5.1 {seek command} -returnCodes error -body { seek @@ -439,7 +439,7 @@ test iocmd-11.3 {I/O to command pipelines} {unixOrWin unixExecs} { } {1 {can't read output from command: standard output was redirected} {TCL OPERATION EXEC BADREDIRECT}} test iocmd-11.4 {I/O to command pipelines} {notValgrind unixOrWin} { list [catch {open "| no_such_command_exists" rb} msg] $msg $::errorCode -} {1 {couldn't execute "no_such_command_exists": no such file or directory} {POSIX ENOENT {no such file or directory}}} +} {1 {couldn't execute "no_such_command_exists": No such file or directory} {POSIX ENOENT {No such file or directory}}} test iocmd-12.1 {POSIX open access modes: RDONLY} { file delete $path(test1) @@ -456,11 +456,11 @@ test iocmd-12.1 {POSIX open access modes: RDONLY} { test iocmd-12.2 {POSIX open access modes: RDONLY} -match regexp -body { file delete $path(test3) open $path(test3) RDONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test iocmd-12.3 {POSIX open access modes: WRONLY} -match regexp -body { file delete $path(test3) open $path(test3) WRONLY -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} # # Test 13.4 relies on assigning the same channel name twice. # @@ -486,7 +486,7 @@ test iocmd-12.4 {POSIX open access modes: WRONLY} {unix} { test iocmd-12.5 {POSIX open access modes: RDWR} -match regexp -body { file delete $path(test3) open $path(test3) RDWR -} -returnCodes error -result {(?i)couldn't open ".*test3": no such file or directory} +} -returnCodes error -result {(?i)couldn't open ".*test3": No such file or directory} test iocmd-12.6 {POSIX open access modes: errors} { concat [catch {open $path(test3) "FOO \{BAR BAZ"} msg] $msg\n$::errorInfo } "1 unmatched open brace in list @@ -545,8 +545,8 @@ test iocmd-13.5 {errors in open command} { test iocmd-13.6 {errors in open command} { set msg [list [catch {open _non_existent_} msg] $msg $::errorCode] regsub [file join {} _non_existent_] $msg "_non_existent_" msg - string tolower $msg -} {1 {couldn't open "_non_existent_": no such file or directory} {posix enoent {no such file or directory}}} + set msg +} {1 {couldn't open "_non_existent_": No such file or directory} {POSIX ENOENT {No such file or directory}}} test iocmd-13.7 {errors in open command} { list [catch {open $path(test1) b} msg] $msg } {1 {illegal access mode "b"}} @@ -884,7 +884,7 @@ test iocmd-21.22 {[close] in [read] segfaults} -setup { } -returnCodes error -cleanup { catch {close $ch} rename foo {} -} -match glob -result {*invalid argument*} +} -match glob -result {*Invalid argument*} test iocmd-21.23 {[close] in [gets] segfaults} -setup { proc foo {method chan args} { switch -- $method initialize { @@ -1743,7 +1743,7 @@ test iocmd-28.10 {chan seek, not supported by handler} -match glob -body { close $c rename foo {} set res -} -result {1 {error during seek on "rc*": invalid argument}} +} -result {1 {error during seek on "rc*": Invalid argument}} test iocmd-28.11 {chan seek, error return} -match glob -body { set res {} proc foo {args} {oninit seek; onfinal; track; return -code error BOOM!} @@ -3433,7 +3433,7 @@ test iocmd.tf-28.10 {chan seek, not supported by handler} -match glob -body { } c] rename foo {} set res -} -result {1 {error during seek on "rc*": invalid argument}} \ +} -result {1 {error during seek on "rc*": Invalid argument}} \ -constraints {testchannel thread} test iocmd.tf-28.11 {chan seek, error return} -match glob -body { set res {} diff --git a/tests/load.test b/tests/load.test index 005c451..32b1c3b 100644 --- a/tests/load.test +++ b/tests/load.test @@ -96,13 +96,13 @@ test load-3.1 {error in _Init procedure, same interpreter} \ [list $dll $loaded] { list [catch {load [file join $testDir pkge$ext] pkge} msg] \ $msg $::errorInfo $::errorCode -} {1 {couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory +} {1 {couldn't open "non_existent": No such file or directory} {couldn't open "non_existent": No such file or directory while executing "open non_existent" invoked from within "if 44 {open non_existent}" invoked from within -"load [file join $testDir pkge$ext] pkge"} {POSIX ENOENT {no such file or directory}}} +"load [file join $testDir pkge$ext] pkge"} {POSIX ENOENT {No such file or directory}}} test load-3.2 {error in _Init procedure, child interpreter} \ [list $dll $loaded] { catch {interp delete x} @@ -113,13 +113,13 @@ test load-3.2 {error in _Init procedure, child interpreter} \ $msg $::errorInfo $::errorCode] interp delete x set result -} {1 {couldn't open "non_existent": no such file or directory} {couldn't open "non_existent": no such file or directory +} {1 {couldn't open "non_existent": No such file or directory} {couldn't open "non_existent": No such file or directory while executing "open non_existent" invoked from within "if 44 {open non_existent}" invoked from within -"load [file join $testDir pkge$ext] pkge x"} {POSIX ENOENT {no such file or directory}}} +"load [file join $testDir pkge$ext] pkge x"} {POSIX ENOENT {No such file or directory}}} test load-4.1 {reloading package into same interpreter} [list $dll $loaded] { list [catch {load [file join $testDir pkga$ext] pkga} msg] $msg diff --git a/tests/macOSXFCmd.test b/tests/macOSXFCmd.test index 5a62a2a..dc0eca0 100644 --- a/tests/macOSXFCmd.test +++ b/tests/macOSXFCmd.test @@ -34,7 +34,7 @@ if {[testConstraint unix] && $tcl_platform(os) eq "Darwin"} { test macOSXFCmd-1.1 {MacOSXGetFileAttribute - file not found} {macosxFileAttr notRoot} { catch {file delete -force -- foo.test} list [catch {file attributes foo.test -creator} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} +} {1 {could not read "foo.test": No such file or directory}} test macOSXFCmd-1.2 {MacOSXGetFileAttribute - creator} {macosxFileAttr notRoot} { catch {file delete -force -- foo.test} close [open foo.test w] @@ -63,7 +63,7 @@ test macOSXFCmd-1.5 {MacOSXGetFileAttribute - rsrclength} {macosxFileAttr notRoo test macOSXFCmd-2.1 {MacOSXSetFileAttribute - file not found} {macosxFileAttr notRoot} { catch {file delete -force -- foo.test} list [catch {file attributes foo.test -creator FOOC} msg] $msg -} {1 {could not read "foo.test": no such file or directory}} +} {1 {could not read "foo.test": No such file or directory}} test macOSXFCmd-2.2 {MacOSXSetFileAttribute - creator} {macosxFileAttr notRoot} { catch {file delete -force -- foo.test} close [open foo.test w] diff --git a/tests/result.test b/tests/result.test index 5ae29b2..3a86930 100644 --- a/tests/result.test +++ b/tests/result.test @@ -62,7 +62,7 @@ test result-2.1 {Tcl_RestoreInterpResult} {testsaveresult} { test result-3.1 {Tcl_DiscardInterpResult} -constraints testsaveresult -body { testsaveresult append {cd _foobar} 1 -} -returnCodes error -result {couldn't change working directory to "_foobar": no such file or directory} +} -returnCodes error -result {couldn't change working directory to "_foobar": No such file or directory} test result-3.2 {Tcl_DiscardInterpResult} {testsaveresult} { testsaveresult free {set x 42} 1 } {42} diff --git a/tests/safe-stock.test b/tests/safe-stock.test index d23d86e..f79db4f 100644 --- a/tests/safe-stock.test +++ b/tests/safe-stock.test @@ -45,7 +45,7 @@ foreach i [interp children] { if {[string match *zipfs:/* [info library]]} { # pkgIndex.tcl is in [info library] # file to be sourced is in [info library]/opt* - set pkgOptErrMsg {permission denied} + set pkgOptErrMsg {Permission denied} } else { # pkgIndex.tcl and file to be sourced are # both in [info library]/opt* diff --git a/tests/safe.test b/tests/safe.test index f3890b7..8efed54 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -549,7 +549,7 @@ test safe-8.3 {safe source control on file} -setup { safe::interpDelete $i rename safe-test-log {} unset i log -} -result {1 {permission denied} {{ERROR for child a : ".": is a directory}}} +} -result {1 {Permission denied} {{ERROR for child a : ".": is a directory}}} test safe-8.4 {safe source control on file} -setup { set i "a" catch {safe::interpDelete $i} @@ -565,7 +565,7 @@ test safe-8.4 {safe source control on file} -setup { safe::interpDelete $i rename safe-test-log {} unset i log -} -result {1 {permission denied} {{ERROR for child a : "/abc/def": not in access_path}}} +} -result {1 {Permission denied} {{ERROR for child a : "/abc/def": not in access_path}}} test safe-8.5 {safe source control on file} -setup { set i "a" catch {safe::interpDelete $i} @@ -585,7 +585,7 @@ test safe-8.5 {safe source control on file} -setup { safe::interpDelete $i rename safe-test-log {} unset i log -} -result [list 1 {no such file or directory} [list "ERROR for child a : [file join [info library] blah]:no such file or directory"]] +} -result [list 1 {No such file or directory} [list "ERROR for child a : [file join [info library] blah]:No such file or directory"]] test safe-8.6 {safe source control on file} -setup { set i "a" catch {safe::interpDelete $i} @@ -603,7 +603,7 @@ test safe-8.6 {safe source control on file} -setup { safe::interpDelete $i rename safe-test-log {} unset i log -} -result [list 1 {no such file or directory} [list "ERROR for child a : [file join [info library] blah.tcl]:no such file or directory"]] +} -result [list 1 {No such file or directory} [list "ERROR for child a : [file join [info library] blah.tcl]:No such file or directory"]] test safe-8.7 {safe source control on file} -setup { set i "a" catch {safe::interpDelete $i} @@ -623,7 +623,7 @@ test safe-8.7 {safe source control on file} -setup { safe::interpDelete $i rename safe-test-log {} unset i log -} -result [list 1 {no such file or directory} [list "ERROR for child a : [file join [info library] xxxxxxxxxxx.tcl]:no such file or directory"]] +} -result [list 1 {No such file or directory} [list "ERROR for child a : [file join [info library] xxxxxxxxxxx.tcl]:No such file or directory"]] test safe-8.8 {safe source forbids -rsrc} emptyTest { # Disabled this test. It was only useful for long unsupported # Mac OS 9 systems. [Bug 860a9f1945] @@ -1389,14 +1389,14 @@ test safe-10.2 {testing statics loading / -nostatics} -constraints tcl::test -bo interp eval $i {load {} Safepfx1} } -returnCodes error -cleanup { safe::interpDelete $i -} -result {permission denied (static library)} +} -result {Permission denied (static library)} test safe-10.3 {testing nested statics loading / no nested by default} -setup { set i [safe::interpCreate] } -constraints tcl::test -body { interp eval $i {interp create x; load {} Safepfx1 x} } -returnCodes error -cleanup { safe::interpDelete $i -} -result {permission denied (nested load)} +} -result {Permission denied (nested load)} test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body { set i [safe::interpCreate -nestedloadok] interp eval $i {interp create x; load {} Safepfx1 x} @@ -1521,21 +1521,21 @@ test safe-12.1 {glob is restricted [Bug 2906841]} -setup { $i eval glob ../* } -returnCodes error -cleanup { safe::interpDelete $i -} -result "permission denied" +} -result "Permission denied" test safe-12.2 {glob is restricted [Bug 2906841]} -setup { set i [safe::interpCreate] } -body { $i eval glob -directory .. * } -returnCodes error -cleanup { safe::interpDelete $i -} -result "permission denied" +} -result "Permission denied" test safe-12.3 {glob is restricted [Bug 2906841]} -setup { set i [safe::interpCreate] } -body { $i eval glob -join .. * } -returnCodes error -cleanup { safe::interpDelete $i -} -result "permission denied" +} -result "Permission denied" test safe-12.4 {glob is restricted [Bug 2906841]} -setup { set i [safe::interpCreate] } -body { @@ -1563,7 +1563,7 @@ test safe-12.7 {glob is restricted} -setup { $i eval glob * } -returnCodes error -cleanup { safe::interpDelete $i -} -result {permission denied} +} -result {Permission denied} ### 13. More tests for Safe base glob, with patches @ Bug 2964715 ### More tests of glob in sections 12, 16. @@ -1590,7 +1590,7 @@ test safe-13.1 {glob is restricted [Bug 2964715]} -setup { $i eval glob * } -returnCodes error -cleanup { safe::interpDelete $i -} -result {permission denied} +} -result {Permission denied} test safe-13.2 {mimic the valid glob call by ::tcl::tm::UnknownHandler [Bug 2964715]} -setup { set i [safe::interpCreate] buildEnvironment deleteme.tm @@ -1614,7 +1614,7 @@ test safe-13.3 {cf 13.2 but test glob failure when -directory is outside access } -returnCodes error -cleanup { safe::interpDelete $i removeDirectory $testdir -} -result {permission denied} +} -result {Permission denied} test safe-13.4 {another valid glob call [Bug 2964715]} -setup { set i [safe::interpCreate] buildEnvironment deleteme.tm @@ -1642,7 +1642,7 @@ test safe-13.5 {as 13.4 but test glob failure when -directory is outside access } -returnCodes error -cleanup { safe::interpDelete $i removeDirectory $testdir -} -result {permission denied} +} -result {Permission denied} test safe-13.6 {as 13.4 but test silent failure when result is outside access_path [Bug 2964715]} -setup { set i [safe::interpCreate] buildEnvironment deleteme.tm diff --git a/tests/socket.test b/tests/socket.test index b1435be..5e6ba66 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -645,7 +645,7 @@ test socket_$af-2.9 {socket conflict} -constraints [list socket supported_$af st close $f } -returnCodes error -cleanup { close $s -} -match glob -result {couldn't open socket: address already in use*} +} -match glob -result {couldn't open socket: Address in use*} test socket_$af-2.10 {close on accept, accepted socket lives} -setup { set done 0 set timer [after 20000 "set done timed_out"] @@ -802,7 +802,7 @@ test socket_$af-3.1 {socket conflict} -constraints [list socket supported_$af st } -cleanup { puts $f bye close $f -} -returnCodes error -result {couldn't open socket: address already in use} +} -returnCodes error -result {couldn't open socket: Address in use} test socket_$af-3.2 {server with several clients} -setup { file delete $path(script) set f [open $path(script) w] @@ -1397,7 +1397,7 @@ test socket_$af-11.6 {socket conflict} -setup { list [getPort $s2] [close $s2] } -cleanup { close $s1 -} -returnCodes error -result {couldn't open socket: address already in use} +} -returnCodes error -result {couldn't open socket: Address in use} test socket_$af-11.7 {server with several clients} -setup { set port [sendCommand { set server [socket -server accept 0] @@ -2041,7 +2041,7 @@ test socket-14.1 {[socket -async] fileevent while still connecting} \ close $client unset x } -result {{} ok} -test socket-14.2 {[socket -async] fileevent connection refused} \ +test socket-14.2 {[socket -async] fileevent Connection refused} \ -constraints {socket} \ -body { set client [socket -async localhost [randport]] @@ -2054,7 +2054,7 @@ test socket-14.2 {[socket -async] fileevent connection refused} \ after cancel $after close $client unset x after client - } -result {ok {connection refused}} + } -result {ok {Connection refused}} test socket-14.3 {[socket -async] when server only listens on IPv6} \ -constraints {socket supported_inet6 localhost_v6} \ -setup { @@ -2113,7 +2113,7 @@ test socket-14.5 {[socket -async] which fails before any connect() can be made} socket -async -myaddr 192.0.2.42 127.0.0.1 [randport] } \ -returnCodes 1 \ - -result {couldn't open socket: cannot assign requested address} + -result {couldn't open socket: Cannot assign requested address} test socket-14.6.0 {[socket -async] with no event loop and server listening on IPv4} \ -constraints {socket supported_inet localhost_v4} \ -setup { @@ -2226,7 +2226,7 @@ test socket-14.7.2 {pending [socket -async] and blocking [gets], no listener} \ list $x [fconfigure $sock -error] [fconfigure $sock -error] } -cleanup { close $sock - } -match glob -result {{error reading "sock*": socket is not connected} {connection refused} {}} + } -match glob -result {{error reading "sock*": Transport endpoint is not connected} {Connection refused} {}} test socket-14.8.0 {pending [socket -async] and nonblocking [gets], server is IPv4} \ -constraints {socket supported_inet localhost_v4} \ -setup { @@ -2291,7 +2291,7 @@ test socket-14.8.2 {pending [socket -async] and nonblocking [gets], no listener} list $x [fconfigure $sock -error] [fconfigure $sock -error] } -cleanup { close $sock - } -match glob -result {{error reading "sock*": socket is not connected} {connection refused} {}} + } -match glob -result {{error reading "sock*": Transport endpoint is not connected} {Connection refused} {}} test socket-14.9.0 {pending [socket -async] and blocking [puts], server is IPv4} \ -constraints {socket supported_inet localhost_v4} \ -setup { @@ -2406,7 +2406,7 @@ test socket-14.11.0 {pending [socket -async] and nonblocking [puts], no listener } -cleanup { catch {close $sock} unset x - } -result {socket is not connected} -returnCodes 1 + } -result {Transport endpoint is not connected} -returnCodes 1 test socket-14.11.1 {pending [socket -async] and nonblocking [puts], no listener, flush} \ -constraints {socket testsocket_testflags} \ -body { @@ -2425,7 +2425,7 @@ test socket-14.11.1 {pending [socket -async] and nonblocking [puts], no listener } -cleanup { catch {close $sock} catch {unset x} - } -result {socket is not connected} -returnCodes 1 + } -result {Transport endpoint is not connected} -returnCodes 1 test socket-14.12 {[socket -async] background progress triggered by [fconfigure -error]} \ -constraints {socket} \ -body { @@ -2439,7 +2439,7 @@ test socket-14.12 {[socket -async] background progress triggered by [fconfigure } -cleanup { close $s unset x s - } -result {connection refused} + } -result {Connection refused} test socket-14.13 {testing writable event when quick failure} \ -constraints {socket win supported_inet notWine} \ @@ -2543,7 +2543,7 @@ set num 0 set x {localhost {socket} 127.0.0.1 {supported_inet} ::1 {supported_inet6}} set resultok {-result "sock*" -match glob} set resulterr { - -result {couldn't open socket: connection refused} + -result {couldn't open socket: Connection refused} -returnCodes 1 } foreach {servip sc} $x { diff --git a/tests/source.test b/tests/source.test index f5f9f0f..59a9d1a 100644 --- a/tests/source.test +++ b/tests/source.test @@ -104,8 +104,8 @@ test source-2.6 {source error conditions} -setup { removeFile _non_existent_ } -body { source $sourcefile -} -match glob -result {couldn't read file "*_non_existent_": no such file or directory} \ - -errorCode {POSIX ENOENT {no such file or directory}} +} -match glob -result {couldn't read file "*_non_existent_": No such file or directory} \ + -errorCode {POSIX ENOENT {No such file or directory}} test source-2.7 {utf-8 with BOM} -setup { set sourcefile [makeFile {} source.file] } -body { diff --git a/tests/unixFCmd.test b/tests/unixFCmd.test index e1084af..4f5d8f4 100644 --- a/tests/unixFCmd.test +++ b/tests/unixFCmd.test @@ -103,7 +103,7 @@ test unixFCmd-1.1 {TclpRenameFile: EACCES} -setup { } -returnCodes error -cleanup { file attributes td1/td2 -permissions 0o755 cleanup -} -result {error renaming "td1/td2/td3": permission denied} +} -result {error renaming "td1/td2/td3": Permission denied} test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { cleanup } -constraints {unix notRoot} -body { @@ -112,7 +112,7 @@ test unixFCmd-1.2 {TclpRenameFile: EEXIST} -setup { file rename td2 td1 } -returnCodes error -cleanup { cleanup -} -result {error renaming "td2" to "td1/td2": file already exists} +} -result {error renaming "td2" to "td1/td2": File exists} test unixFCmd-1.3 {TclpRenameFile: EINVAL} -setup { cleanup } -constraints {unix notRoot} -body { @@ -131,7 +131,7 @@ test unixFCmd-1.5 {TclpRenameFile: ENOENT} -setup { file rename td2 td1 } -returnCodes error -cleanup { cleanup -} -result {error renaming "td2": no such file or directory} +} -result {error renaming "td2": No such file or directory} test unixFCmd-1.6 {TclpRenameFile: ENOTDIR} {emptyTest unix notRoot} { # can't make it happen } {} @@ -145,7 +145,7 @@ test unixFCmd-1.7 {TclpRenameFile: EXDEV} -setup { catch {file delete /tmp/bar} catch {file attr foo -perm 0o40777} catch {file delete -force foo} -} -match glob -result {*: permission denied} +} -match glob -result {*: Permission denied} test unixFCmd-1.8 {Checking EINTR Bug} {unix notRoot nonPortable} { testalarm after 2000 @@ -261,7 +261,7 @@ test unixFCmd-12.1 {GetGroupAttribute - file not found} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { file attributes foo.test -group -} -result {could not read "foo.test": no such file or directory} +} -result {could not read "foo.test": No such file or directory} test unixFCmd-12.2 {GetGroupAttribute - file found} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -body { @@ -275,7 +275,7 @@ test unixFCmd-13.1 {GetOwnerAttribute - file not found} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { file attributes foo.test -group -} -result {could not read "foo.test": no such file or directory} +} -result {could not read "foo.test": No such file or directory} test unixFCmd-13.2 {GetOwnerAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -body { @@ -289,7 +289,7 @@ test unixFCmd-14.1 {GetPermissionsAttribute - file not found} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { file attributes foo.test -permissions -} -result {could not read "foo.test": no such file or directory} +} -result {could not read "foo.test": No such file or directory} test unixFCmd-14.2 {GetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -body { @@ -311,7 +311,7 @@ test unixFCmd-15.2 {SetGroupAttribute - invalid file} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot foundGroup} -returnCodes error -body { file attributes foo.test -group $group -} -result {could not set group for file "foo.test": no such file or directory} +} -result {could not set group for file "foo.test": No such file or directory} #changing owners hard to do test unixFCmd-16.1 {SetOwnerAttribute - current owner} -setup { @@ -327,7 +327,7 @@ test unixFCmd-16.2 {SetOwnerAttribute - invalid file} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { file attributes foo.test -owner $user -} -result {could not set owner for file "foo.test": no such file or directory} +} -result {could not set owner for file "foo.test": No such file or directory} test unixFCmd-16.3 {SetOwnerAttribute - invalid owner} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { @@ -347,7 +347,7 @@ test unixFCmd-17.2 {SetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -returnCodes error -body { file attributes foo.test -permissions 0 -} -result {could not set permissions for file "foo.test": no such file or directory} +} -result {could not set permissions for file "foo.test": No such file or directory} test unixFCmd-17.3 {SetPermissionsAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot} -body { @@ -404,7 +404,7 @@ test unixFCmd-19.1 {GetReadOnlyAttribute - file not found} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot readonlyAttr} -returnCodes error -body { file attributes foo.test -readonly -} -result {could not read "foo.test": no such file or directory} +} -result {could not read "foo.test": No such file or directory} test unixFCmd-19.2 {GetReadOnlyAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot readonlyAttr} -body { @@ -430,7 +430,7 @@ test unixFCmd-20.2 {SetReadOnlyAttribute} -setup { catch {file delete -force -- foo.test} } -constraints {unix notRoot readonlyAttr} -returnCodes error -body { file attributes foo.test -readonly 1 -} -result {could not read "foo.test": no such file or directory} +} -result {could not read "foo.test": No such file or directory} # cleanup cleanup diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 3be1920..6848f21 100644 --- a/tests/winFCmd.test +++ b/tests/winFCmd.test @@ -946,12 +946,12 @@ test winFCmd-10.1 {AttributesPosixError - get} -constraints {win} -setup { cleanup } -body { file attributes td1 -archive -} -returnCodes error -result {could not read "td1": no such file or directory} +} -returnCodes error -result {could not read "td1": No such file or directory} test winFCmd-10.2 {AttributesPosixError - set} -constraints {win} -setup { cleanup } -body { file attributes td1 -archive 0 -} -returnCodes error -result {could not read "td1": no such file or directory} +} -returnCodes error -result {could not read "td1": No such file or directory} test winFCmd-11.1 {GetWinFileAttributes} -constraints {win} -setup { cleanup @@ -1098,7 +1098,7 @@ test winFCmd-15.1 {SetWinFileAttributes} -constraints {win} -setup { cleanup } -body { file attributes td1 -archive 0 -} -returnCodes error -result {could not read "td1": no such file or directory} +} -returnCodes error -result {could not read "td1": No such file or directory} test winFCmd-15.2 {SetWinFileAttributes - archive} -constraints {win} -setup { cleanup } -body { @@ -1268,11 +1268,11 @@ test winFCmd-17.1 {Windows bad permissions cd} -constraints win -body { regsub ".*: " $err "" err set err } else { - set err "permission denied" + set err "Permission denied" } } -cleanup { cd $pwd -} -result "permission denied" +} -result "Permission denied" cd $pwd unset d dd pwd diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 7396258..5cd6b7db 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -380,7 +380,7 @@ TclpInitPlatform(void) } /* - * The code below causes SIGPIPE (broken pipe) errors to be ignored. This + * The code below causes SIGPIPE (Broken pipe) errors to be ignored. This * is needed so that Tcl processes don't die if they create child * processes (e.g. using "exec" or "open") that terminate prematurely. * The signal handler is only set up when the first interpreter is diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 7f8cfd1..19411e8 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -1603,7 +1603,7 @@ ConvertFileNameFormat( if (splitPath == NULL || pathc == 0) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "could not read \"%s\": no such file or directory", + "could not read \"%s\": No such file or directory", Tcl_GetString(fileName))); errno = ENOENT; Tcl_PosixError(interp); -- cgit v0.12 From 2122f0eb09d729bfbfbdbbf1540fa26bbfa42453 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Sun, 26 Mar 2023 14:55:23 +0000 Subject: Failing test for [6d4e9d1af5bf5b7d]. --- tests/fileName.test | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/tcltests.tcl | 12 +++++++++++ 2 files changed, 73 insertions(+) diff --git a/tests/fileName.test b/tests/fileName.test index 575a17f..09662ff 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -18,6 +18,7 @@ if {"::tcltest" ni [namespace children]} { ::tcltest::loadTestedCommands catch [list package require -exact tcl::test [info patchlevel]] +source [file join [file dirname [info script]] tcltests.tcl] testConstraint testsetplatform [llength [info commands testsetplatform]] testConstraint testtranslatefilename [llength [info commands testtranslatefilename]] @@ -1629,6 +1630,66 @@ test fileName-20.10 {globbing for special chars} -setup { removeFile fileName-20.10 $s removeDirectory sub ~ } -result ~/sub/fileName-20.10 + + +apply [list {} { + test fileName-6d4e9d1af5bf5b7d { + memory leak in SetFsPathFromAny + + Runs under both a TCL_DEBUG_MEM build and a -DPURIFY build for + valgrind, which is useful since Valgrind provides information about the + error location, but [memory] doesn't. + } -setup { + makeFile {puts "In script"} script + + if {[namespace which ::memory] eq {}} { + set memcheckcmd [list ::apply [list script { + uplevel 1 $script + return 0 + } [namespace current]]] + } else { + set memcheckcmd ::tcltests::scriptmemcheck + } + } -body { + {*}$memcheckcmd { + set interp [interp create] + interp eval $interp { + apply [list {} { + upvar 1 f f + + # A unique name so that no internal representation of this + # literal value has been picked up from any other script + # that has alredy been sourced into this interpreter. + set variableUniqueInTheEntireTclCodebase a + set name variableUniqueInTheEntireTclCodebase + + # give the Tcl_Obj for "var1" an internal representation of + # type 'localVarNameType'. + set $name + + set f [open variableUniqueInTheEntireTclCodebase w] + try { + puts $f {some data} + } finally { + close $f + } + + set f [open variableUniqueInTheEntireTclCodebase] + try { + read $f + } finally { + catch {file delete variableUniqueInTheEntireTclCodebase} + close $f + } + } [namespace current]] + } + interp delete $interp + } + } -result 0 +} [namespace current]] + + + # cleanup catch {file delete -force C:/globTest} diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl index a2251bf..61366a4 100644 --- a/tests/tcltests.tcl +++ b/tests/tcltests.tcl @@ -34,6 +34,18 @@ namespace eval ::tcltests { } + # Stolen from dict.test + proc scriptmemcheck script { + set end [lindex [split [memory info] \n] 3 3] + for {set i 0} {$i < 5} {incr i} { + uplevel 1 $script + set tmp $end + set end [lindex [split [memory info] \n] 3 3] + } + expr {$end - $tmp} + } + + proc tempdir_alternate {} { close [file tempfile tempfile] set tmpdir [file dirname $tempfile] -- cgit v0.12 From 2002e0f0f0b3cb11791ef5c3c7d651af68d82d84 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Sun, 26 Mar 2023 15:02:55 +0000 Subject: Fix for [6d4e9d1af5bf5b7d]: Memory leak: SetFsPathFromAny, assisted by the global literal table, causes a Tcl_Obj to reference itself. --- generic/tclPathObj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 87aed3a..aefc84f 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2350,6 +2350,8 @@ SetFsPathFromAny( fsPathPtr = (FsPath *)ckalloc(sizeof(FsPath)); if (transPtr == pathPtr) { + Tcl_GetStringFromObj(pathPtr, NULL); + TclFreeInternalRep(pathPtr); transPtr = Tcl_DuplicateObj(pathPtr); fsPathPtr->filesystemEpoch = 0; } else { -- cgit v0.12 -- cgit v0.12 From e18f32780895d872f1cf09c8d12ba2afaf75ae53 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Sun, 26 Mar 2023 17:13:55 +0000 Subject: Update to tzdata 2023b --- library/tzdata/Africa/Cairo | 154 ++++++++++++++++++++ library/tzdata/Africa/Casablanca | 20 +-- library/tzdata/Africa/El_Aaiun | 20 +-- library/tzdata/America/Ciudad_Juarez | 223 +++++++++++++++++++++++++++++ library/tzdata/America/Nuuk | 155 +++++++++++++++++++- library/tzdata/America/Yellowknife | 267 +---------------------------------- library/tzdata/Asia/Beirut | 2 +- library/tzdata/Asia/Gaza | 97 ++++++++++--- library/tzdata/Asia/Hebron | 97 ++++++++++--- library/tzdata/Europe/Kirov | 92 ++++++------ library/tzdata/Europe/Volgograd | 98 ++++++------- 11 files changed, 806 insertions(+), 419 deletions(-) create mode 100644 library/tzdata/America/Ciudad_Juarez diff --git a/library/tzdata/Africa/Cairo b/library/tzdata/Africa/Cairo index aaeec54..3acbd5e 100644 --- a/library/tzdata/Africa/Cairo +++ b/library/tzdata/Africa/Cairo @@ -129,4 +129,158 @@ set TZData(:Africa/Cairo) { {1403816400 7200 0 EET} {1406844000 10800 1 EEST} {1411678800 7200 0 EET} + {1682632800 10800 1 EEST} + {1698354000 7200 0 EET} + {1714082400 10800 1 EEST} + {1730408400 7200 0 EET} + {1745532000 10800 1 EEST} + {1761858000 7200 0 EET} + {1776981600 10800 1 EEST} + {1793307600 7200 0 EET} + {1809036000 10800 1 EEST} + {1824757200 7200 0 EET} + {1840485600 10800 1 EEST} + {1856206800 7200 0 EET} + {1871935200 10800 1 EEST} + {1887656400 7200 0 EET} + {1903384800 10800 1 EEST} + {1919710800 7200 0 EET} + {1934834400 10800 1 EEST} + {1951160400 7200 0 EET} + {1966888800 10800 1 EEST} + {1982610000 7200 0 EET} + {1998338400 10800 1 EEST} + {2014059600 7200 0 EET} + {2029788000 10800 1 EEST} + {2045509200 7200 0 EET} + {2061237600 10800 1 EEST} + {2076958800 7200 0 EET} + {2092687200 10800 1 EEST} + {2109013200 7200 0 EET} + {2124136800 10800 1 EEST} + {2140462800 7200 0 EET} + {2156191200 10800 1 EEST} + {2171912400 7200 0 EET} + {2187640800 10800 1 EEST} + {2203362000 7200 0 EET} + {2219090400 10800 1 EEST} + {2234811600 7200 0 EET} + {2250540000 10800 1 EEST} + {2266866000 7200 0 EET} + {2281989600 10800 1 EEST} + {2298315600 7200 0 EET} + {2313439200 10800 1 EEST} + {2329765200 7200 0 EET} + {2345493600 10800 1 EEST} + {2361214800 7200 0 EET} + {2376943200 10800 1 EEST} + {2392664400 7200 0 EET} + {2408392800 10800 1 EEST} + {2424114000 7200 0 EET} + {2439842400 10800 1 EEST} + {2456168400 7200 0 EET} + {2471292000 10800 1 EEST} + {2487618000 7200 0 EET} + {2503346400 10800 1 EEST} + {2519067600 7200 0 EET} + {2534796000 10800 1 EEST} + {2550517200 7200 0 EET} + {2566245600 10800 1 EEST} + {2581966800 7200 0 EET} + {2597695200 10800 1 EEST} + {2614021200 7200 0 EET} + {2629144800 10800 1 EEST} + {2645470800 7200 0 EET} + {2660594400 10800 1 EEST} + {2676920400 7200 0 EET} + {2692648800 10800 1 EEST} + {2708370000 7200 0 EET} + {2724098400 10800 1 EEST} + {2739819600 7200 0 EET} + {2755548000 10800 1 EEST} + {2771269200 7200 0 EET} + {2786997600 10800 1 EEST} + {2803323600 7200 0 EET} + {2818447200 10800 1 EEST} + {2834773200 7200 0 EET} + {2850501600 10800 1 EEST} + {2866222800 7200 0 EET} + {2881951200 10800 1 EEST} + {2897672400 7200 0 EET} + {2913400800 10800 1 EEST} + {2929122000 7200 0 EET} + {2944850400 10800 1 EEST} + {2960571600 7200 0 EET} + {2976300000 10800 1 EEST} + {2992626000 7200 0 EET} + {3007749600 10800 1 EEST} + {3024075600 7200 0 EET} + {3039804000 10800 1 EEST} + {3055525200 7200 0 EET} + {3071253600 10800 1 EEST} + {3086974800 7200 0 EET} + {3102703200 10800 1 EEST} + {3118424400 7200 0 EET} + {3134152800 10800 1 EEST} + {3150478800 7200 0 EET} + {3165602400 10800 1 EEST} + {3181928400 7200 0 EET} + {3197052000 10800 1 EEST} + {3213378000 7200 0 EET} + {3229106400 10800 1 EEST} + {3244827600 7200 0 EET} + {3260556000 10800 1 EEST} + {3276277200 7200 0 EET} + {3292005600 10800 1 EEST} + {3307726800 7200 0 EET} + {3323455200 10800 1 EEST} + {3339781200 7200 0 EET} + {3354904800 10800 1 EEST} + {3371230800 7200 0 EET} + {3386959200 10800 1 EEST} + {3402680400 7200 0 EET} + {3418408800 10800 1 EEST} + {3434130000 7200 0 EET} + {3449858400 10800 1 EEST} + {3465579600 7200 0 EET} + {3481308000 10800 1 EEST} + {3497634000 7200 0 EET} + {3512757600 10800 1 EEST} + {3529083600 7200 0 EET} + {3544207200 10800 1 EEST} + {3560533200 7200 0 EET} + {3576261600 10800 1 EEST} + {3591982800 7200 0 EET} + {3607711200 10800 1 EEST} + {3623432400 7200 0 EET} + {3639160800 10800 1 EEST} + {3654882000 7200 0 EET} + {3670610400 10800 1 EEST} + {3686936400 7200 0 EET} + {3702060000 10800 1 EEST} + {3718386000 7200 0 EET} + {3734114400 10800 1 EEST} + {3749835600 7200 0 EET} + {3765564000 10800 1 EEST} + {3781285200 7200 0 EET} + {3797013600 10800 1 EEST} + {3812734800 7200 0 EET} + {3828463200 10800 1 EEST} + {3844184400 7200 0 EET} + {3859912800 10800 1 EEST} + {3876238800 7200 0 EET} + {3891362400 10800 1 EEST} + {3907688400 7200 0 EET} + {3923416800 10800 1 EEST} + {3939138000 7200 0 EET} + {3954866400 10800 1 EEST} + {3970587600 7200 0 EET} + {3986316000 10800 1 EEST} + {4002037200 7200 0 EET} + {4017765600 10800 1 EEST} + {4034091600 7200 0 EET} + {4049215200 10800 1 EEST} + {4065541200 7200 0 EET} + {4080664800 10800 1 EEST} + {4096990800 7200 0 EET} } diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index cb60740..05ae49f 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -66,7 +66,7 @@ set TZData(:Africa/Casablanca) { {1648346400 0 1 +01} {1651975200 3600 0 +01} {1679191200 0 1 +01} - {1682820000 3600 0 +01} + {1682215200 3600 0 +01} {1710036000 0 1 +01} {1713060000 3600 0 +01} {1740276000 0 1 +01} @@ -82,7 +82,7 @@ set TZData(:Africa/Casablanca) { {1893290400 0 1 +01} {1896919200 3600 0 +01} {1924135200 0 1 +01} - {1927764000 3600 0 +01} + {1927159200 3600 0 +01} {1954980000 0 1 +01} {1958004000 3600 0 +01} {1985220000 0 1 +01} @@ -98,7 +98,7 @@ set TZData(:Africa/Casablanca) { {2138234400 0 1 +01} {2141863200 3600 0 +01} {2169079200 0 1 +01} - {2172708000 3600 0 +01} + {2172103200 3600 0 +01} {2199924000 0 1 +01} {2202948000 3600 0 +01} {2230164000 0 1 +01} @@ -114,7 +114,7 @@ set TZData(:Africa/Casablanca) { {2383178400 0 1 +01} {2386807200 3600 0 +01} {2414023200 0 1 +01} - {2417652000 3600 0 +01} + {2417047200 3600 0 +01} {2444868000 0 1 +01} {2447892000 3600 0 +01} {2475108000 0 1 +01} @@ -130,7 +130,7 @@ set TZData(:Africa/Casablanca) { {2628122400 0 1 +01} {2631751200 3600 0 +01} {2658967200 0 1 +01} - {2662596000 3600 0 +01} + {2661991200 3600 0 +01} {2689812000 0 1 +01} {2692836000 3600 0 +01} {2720052000 0 1 +01} @@ -146,7 +146,7 @@ set TZData(:Africa/Casablanca) { {2873066400 0 1 +01} {2876695200 3600 0 +01} {2903911200 0 1 +01} - {2907540000 3600 0 +01} + {2906935200 3600 0 +01} {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} @@ -162,7 +162,7 @@ set TZData(:Africa/Casablanca) { {3118010400 0 1 +01} {3121639200 3600 0 +01} {3148855200 0 1 +01} - {3152484000 3600 0 +01} + {3151879200 3600 0 +01} {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} @@ -178,7 +178,7 @@ set TZData(:Africa/Casablanca) { {3362954400 0 1 +01} {3366583200 3600 0 +01} {3393799200 0 1 +01} - {3397428000 3600 0 +01} + {3396823200 3600 0 +01} {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} @@ -188,13 +188,13 @@ set TZData(:Africa/Casablanca) { {3515968800 0 1 +01} {3519597600 3600 0 +01} {3546813600 0 1 +01} - {3550442400 3600 0 +01} + {3549837600 3600 0 +01} {3577658400 0 1 +01} {3580682400 3600 0 +01} {3607898400 0 1 +01} {3611527200 3600 0 +01} {3638743200 0 1 +01} - {3642372000 3600 0 +01} + {3641767200 3600 0 +01} {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} diff --git a/library/tzdata/Africa/El_Aaiun b/library/tzdata/Africa/El_Aaiun index fd3e88f..8dbbdea 100644 --- a/library/tzdata/Africa/El_Aaiun +++ b/library/tzdata/Africa/El_Aaiun @@ -55,7 +55,7 @@ set TZData(:Africa/El_Aaiun) { {1648346400 0 1 +01} {1651975200 3600 0 +01} {1679191200 0 1 +01} - {1682820000 3600 0 +01} + {1682215200 3600 0 +01} {1710036000 0 1 +01} {1713060000 3600 0 +01} {1740276000 0 1 +01} @@ -71,7 +71,7 @@ set TZData(:Africa/El_Aaiun) { {1893290400 0 1 +01} {1896919200 3600 0 +01} {1924135200 0 1 +01} - {1927764000 3600 0 +01} + {1927159200 3600 0 +01} {1954980000 0 1 +01} {1958004000 3600 0 +01} {1985220000 0 1 +01} @@ -87,7 +87,7 @@ set TZData(:Africa/El_Aaiun) { {2138234400 0 1 +01} {2141863200 3600 0 +01} {2169079200 0 1 +01} - {2172708000 3600 0 +01} + {2172103200 3600 0 +01} {2199924000 0 1 +01} {2202948000 3600 0 +01} {2230164000 0 1 +01} @@ -103,7 +103,7 @@ set TZData(:Africa/El_Aaiun) { {2383178400 0 1 +01} {2386807200 3600 0 +01} {2414023200 0 1 +01} - {2417652000 3600 0 +01} + {2417047200 3600 0 +01} {2444868000 0 1 +01} {2447892000 3600 0 +01} {2475108000 0 1 +01} @@ -119,7 +119,7 @@ set TZData(:Africa/El_Aaiun) { {2628122400 0 1 +01} {2631751200 3600 0 +01} {2658967200 0 1 +01} - {2662596000 3600 0 +01} + {2661991200 3600 0 +01} {2689812000 0 1 +01} {2692836000 3600 0 +01} {2720052000 0 1 +01} @@ -135,7 +135,7 @@ set TZData(:Africa/El_Aaiun) { {2873066400 0 1 +01} {2876695200 3600 0 +01} {2903911200 0 1 +01} - {2907540000 3600 0 +01} + {2906935200 3600 0 +01} {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} @@ -151,7 +151,7 @@ set TZData(:Africa/El_Aaiun) { {3118010400 0 1 +01} {3121639200 3600 0 +01} {3148855200 0 1 +01} - {3152484000 3600 0 +01} + {3151879200 3600 0 +01} {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} @@ -167,7 +167,7 @@ set TZData(:Africa/El_Aaiun) { {3362954400 0 1 +01} {3366583200 3600 0 +01} {3393799200 0 1 +01} - {3397428000 3600 0 +01} + {3396823200 3600 0 +01} {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} @@ -177,13 +177,13 @@ set TZData(:Africa/El_Aaiun) { {3515968800 0 1 +01} {3519597600 3600 0 +01} {3546813600 0 1 +01} - {3550442400 3600 0 +01} + {3549837600 3600 0 +01} {3577658400 0 1 +01} {3580682400 3600 0 +01} {3607898400 0 1 +01} {3611527200 3600 0 +01} {3638743200 0 1 +01} - {3642372000 3600 0 +01} + {3641767200 3600 0 +01} {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} diff --git a/library/tzdata/America/Ciudad_Juarez b/library/tzdata/America/Ciudad_Juarez new file mode 100644 index 0000000..5a27e80 --- /dev/null +++ b/library/tzdata/America/Ciudad_Juarez @@ -0,0 +1,223 @@ +# created by tools/tclZIC.tcl - do not edit + +set TZData(:America/Ciudad_Juarez) { + {-9223372036854775808 -25556 0 LMT} + {-1514739600 -25200 0 MST} + {-1343066400 -21600 0 CST} + {-1234807200 -25200 0 MST} + {-1220292000 -21600 1 MDT} + {-1207159200 -25200 0 MST} + {-1191344400 -21600 0 CST} + {820476000 -21600 0 CST} + {828864000 -18000 1 CDT} + {846399600 -21600 0 CST} + {860313600 -18000 1 CDT} + {877849200 -21600 0 CST} + {883634400 -21600 0 CST} + {891766800 -21600 0 MDT} + {909302400 -25200 0 MST} + {923216400 -21600 1 MDT} + {941356800 -25200 0 MST} + {954666000 -21600 1 MDT} + {972806400 -25200 0 MST} + {989139600 -21600 1 MDT} + {1001836800 -25200 0 MST} + {1018170000 -21600 1 MDT} + {1035705600 -25200 0 MST} + {1049619600 -21600 1 MDT} + {1067155200 -25200 0 MST} + {1081069200 -21600 1 MDT} + {1099209600 -25200 0 MST} + {1112518800 -21600 1 MDT} + {1130659200 -25200 0 MST} + {1143968400 -21600 1 MDT} + {1162108800 -25200 0 MST} + {1175418000 -21600 1 MDT} + {1193558400 -25200 0 MST} + {1207472400 -21600 1 MDT} + {1225008000 -25200 0 MST} + {1238922000 -21600 1 MDT} + {1256457600 -25200 0 MST} + {1262329200 -25200 0 MST} + {1268557200 -21600 1 MDT} + {1289116800 -25200 0 MST} + {1300006800 -21600 1 MDT} + {1320566400 -25200 0 MST} + {1331456400 -21600 1 MDT} + {1352016000 -25200 0 MST} + {1362906000 -21600 1 MDT} + {1383465600 -25200 0 MST} + {1394355600 -21600 1 MDT} + {1414915200 -25200 0 MST} + {1425805200 -21600 1 MDT} + {1446364800 -25200 0 MST} + {1457859600 -21600 1 MDT} + {1478419200 -25200 0 MST} + {1489309200 -21600 1 MDT} + {1509868800 -25200 0 MST} + {1520758800 -21600 1 MDT} + {1541318400 -25200 0 MST} + {1552208400 -21600 1 MDT} + {1572768000 -25200 0 MST} + {1583658000 -21600 1 MDT} + {1604217600 -25200 0 MST} + {1615712400 -21600 1 MDT} + {1636272000 -25200 0 MST} + {1647162000 -21600 1 MDT} + {1667120400 -21600 0 CST} + {1669788000 -25200 0 MST} + {1678611600 -21600 1 MDT} + {1699171200 -25200 0 MST} + {1710061200 -21600 1 MDT} + {1730620800 -25200 0 MST} + {1741510800 -21600 1 MDT} + {1762070400 -25200 0 MST} + {1772960400 -21600 1 MDT} + {1793520000 -25200 0 MST} + {1805014800 -21600 1 MDT} + {1825574400 -25200 0 MST} + {1836464400 -21600 1 MDT} + {1857024000 -25200 0 MST} + {1867914000 -21600 1 MDT} + {1888473600 -25200 0 MST} + {1899363600 -21600 1 MDT} + {1919923200 -25200 0 MST} + {1930813200 -21600 1 MDT} + {1951372800 -25200 0 MST} + {1962867600 -21600 1 MDT} + {1983427200 -25200 0 MST} + {1994317200 -21600 1 MDT} + {2014876800 -25200 0 MST} + {2025766800 -21600 1 MDT} + {2046326400 -25200 0 MST} + {2057216400 -21600 1 MDT} + {2077776000 -25200 0 MST} + {2088666000 -21600 1 MDT} + {2109225600 -25200 0 MST} + {2120115600 -21600 1 MDT} + {2140675200 -25200 0 MST} + {2152170000 -21600 1 MDT} + {2172729600 -25200 0 MST} + {2183619600 -21600 1 MDT} + {2204179200 -25200 0 MST} + {2215069200 -21600 1 MDT} + {2235628800 -25200 0 MST} + {2246518800 -21600 1 MDT} + {2267078400 -25200 0 MST} + {2277968400 -21600 1 MDT} + {2298528000 -25200 0 MST} + {2309418000 -21600 1 MDT} + {2329977600 -25200 0 MST} + {2341472400 -21600 1 MDT} + {2362032000 -25200 0 MST} + {2372922000 -21600 1 MDT} + {2393481600 -25200 0 MST} + {2404371600 -21600 1 MDT} + {2424931200 -25200 0 MST} + {2435821200 -21600 1 MDT} + {2456380800 -25200 0 MST} + {2467270800 -21600 1 MDT} + {2487830400 -25200 0 MST} + {2499325200 -21600 1 MDT} + {2519884800 -25200 0 MST} + {2530774800 -21600 1 MDT} + {2551334400 -25200 0 MST} + {2562224400 -21600 1 MDT} + {2582784000 -25200 0 MST} + {2593674000 -21600 1 MDT} + {2614233600 -25200 0 MST} + {2625123600 -21600 1 MDT} + {2645683200 -25200 0 MST} + {2656573200 -21600 1 MDT} + {2677132800 -25200 0 MST} + {2688627600 -21600 1 MDT} + {2709187200 -25200 0 MST} + {2720077200 -21600 1 MDT} + {2740636800 -25200 0 MST} + {2751526800 -21600 1 MDT} + {2772086400 -25200 0 MST} + {2782976400 -21600 1 MDT} + {2803536000 -25200 0 MST} + {2814426000 -21600 1 MDT} + {2834985600 -25200 0 MST} + {2846480400 -21600 1 MDT} + {2867040000 -25200 0 MST} + {2877930000 -21600 1 MDT} + {2898489600 -25200 0 MST} + {2909379600 -21600 1 MDT} + {2929939200 -25200 0 MST} + {2940829200 -21600 1 MDT} + {2961388800 -25200 0 MST} + {2972278800 -21600 1 MDT} + {2992838400 -25200 0 MST} + {3003728400 -21600 1 MDT} + {3024288000 -25200 0 MST} + {3035782800 -21600 1 MDT} + {3056342400 -25200 0 MST} + {3067232400 -21600 1 MDT} + {3087792000 -25200 0 MST} + {3098682000 -21600 1 MDT} + {3119241600 -25200 0 MST} + {3130131600 -21600 1 MDT} + {3150691200 -25200 0 MST} + {3161581200 -21600 1 MDT} + {3182140800 -25200 0 MST} + {3193030800 -21600 1 MDT} + {3213590400 -25200 0 MST} + {3225085200 -21600 1 MDT} + {3245644800 -25200 0 MST} + {3256534800 -21600 1 MDT} + {3277094400 -25200 0 MST} + {3287984400 -21600 1 MDT} + {3308544000 -25200 0 MST} + {3319434000 -21600 1 MDT} + {3339993600 -25200 0 MST} + {3350883600 -21600 1 MDT} + {3371443200 -25200 0 MST} + {3382938000 -21600 1 MDT} + {3403497600 -25200 0 MST} + {3414387600 -21600 1 MDT} + {3434947200 -25200 0 MST} + {3445837200 -21600 1 MDT} + {3466396800 -25200 0 MST} + {3477286800 -21600 1 MDT} + {3497846400 -25200 0 MST} + {3508736400 -21600 1 MDT} + {3529296000 -25200 0 MST} + {3540186000 -21600 1 MDT} + {3560745600 -25200 0 MST} + {3572240400 -21600 1 MDT} + {3592800000 -25200 0 MST} + {3603690000 -21600 1 MDT} + {3624249600 -25200 0 MST} + {3635139600 -21600 1 MDT} + {3655699200 -25200 0 MST} + {3666589200 -21600 1 MDT} + {3687148800 -25200 0 MST} + {3698038800 -21600 1 MDT} + {3718598400 -25200 0 MST} + {3730093200 -21600 1 MDT} + {3750652800 -25200 0 MST} + {3761542800 -21600 1 MDT} + {3782102400 -25200 0 MST} + {3792992400 -21600 1 MDT} + {3813552000 -25200 0 MST} + {3824442000 -21600 1 MDT} + {3845001600 -25200 0 MST} + {3855891600 -21600 1 MDT} + {3876451200 -25200 0 MST} + {3887341200 -21600 1 MDT} + {3907900800 -25200 0 MST} + {3919395600 -21600 1 MDT} + {3939955200 -25200 0 MST} + {3950845200 -21600 1 MDT} + {3971404800 -25200 0 MST} + {3982294800 -21600 1 MDT} + {4002854400 -25200 0 MST} + {4013744400 -21600 1 MDT} + {4034304000 -25200 0 MST} + {4045194000 -21600 1 MDT} + {4065753600 -25200 0 MST} + {4076643600 -21600 1 MDT} + {4097203200 -25200 0 MST} +} diff --git a/library/tzdata/America/Nuuk b/library/tzdata/America/Nuuk index d010cab..06b472c 100644 --- a/library/tzdata/America/Nuuk +++ b/library/tzdata/America/Nuuk @@ -89,5 +89,158 @@ set TZData(:America/Nuuk) { {1635642000 -10800 0 -03} {1648342800 -7200 1 -02} {1667091600 -10800 0 -03} - {1679792400 -7200 0 -02} + {1679792400 -7200 1 -02} + {1698541200 -7200 0 -02} + {1711846800 -3600 1 -01} + {1729990800 -7200 0 -02} + {1743296400 -3600 1 -01} + {1761440400 -7200 0 -02} + {1774746000 -3600 1 -01} + {1792890000 -7200 0 -02} + {1806195600 -3600 1 -01} + {1824944400 -7200 0 -02} + {1837645200 -3600 1 -01} + {1856394000 -7200 0 -02} + {1869094800 -3600 1 -01} + {1887843600 -7200 0 -02} + {1901149200 -3600 1 -01} + {1919293200 -7200 0 -02} + {1932598800 -3600 1 -01} + {1950742800 -7200 0 -02} + {1964048400 -3600 1 -01} + {1982797200 -7200 0 -02} + {1995498000 -3600 1 -01} + {2014246800 -7200 0 -02} + {2026947600 -3600 1 -01} + {2045696400 -7200 0 -02} + {2058397200 -3600 1 -01} + {2077146000 -7200 0 -02} + {2090451600 -3600 1 -01} + {2108595600 -7200 0 -02} + {2121901200 -3600 1 -01} + {2140045200 -7200 0 -02} + {2153350800 -3600 1 -01} + {2172099600 -7200 0 -02} + {2184800400 -3600 1 -01} + {2203549200 -7200 0 -02} + {2216250000 -3600 1 -01} + {2234998800 -7200 0 -02} + {2248304400 -3600 1 -01} + {2266448400 -7200 0 -02} + {2279754000 -3600 1 -01} + {2297898000 -7200 0 -02} + {2311203600 -3600 1 -01} + {2329347600 -7200 0 -02} + {2342653200 -3600 1 -01} + {2361402000 -7200 0 -02} + {2374102800 -3600 1 -01} + {2392851600 -7200 0 -02} + {2405552400 -3600 1 -01} + {2424301200 -7200 0 -02} + {2437606800 -3600 1 -01} + {2455750800 -7200 0 -02} + {2469056400 -3600 1 -01} + {2487200400 -7200 0 -02} + {2500506000 -3600 1 -01} + {2519254800 -7200 0 -02} + {2531955600 -3600 1 -01} + {2550704400 -7200 0 -02} + {2563405200 -3600 1 -01} + {2582154000 -7200 0 -02} + {2595459600 -3600 1 -01} + {2613603600 -7200 0 -02} + {2626909200 -3600 1 -01} + {2645053200 -7200 0 -02} + {2658358800 -3600 1 -01} + {2676502800 -7200 0 -02} + {2689808400 -3600 1 -01} + {2708557200 -7200 0 -02} + {2721258000 -3600 1 -01} + {2740006800 -7200 0 -02} + {2752707600 -3600 1 -01} + {2771456400 -7200 0 -02} + {2784762000 -3600 1 -01} + {2802906000 -7200 0 -02} + {2816211600 -3600 1 -01} + {2834355600 -7200 0 -02} + {2847661200 -3600 1 -01} + {2866410000 -7200 0 -02} + {2879110800 -3600 1 -01} + {2897859600 -7200 0 -02} + {2910560400 -3600 1 -01} + {2929309200 -7200 0 -02} + {2942010000 -3600 1 -01} + {2960758800 -7200 0 -02} + {2974064400 -3600 1 -01} + {2992208400 -7200 0 -02} + {3005514000 -3600 1 -01} + {3023658000 -7200 0 -02} + {3036963600 -3600 1 -01} + {3055712400 -7200 0 -02} + {3068413200 -3600 1 -01} + {3087162000 -7200 0 -02} + {3099862800 -3600 1 -01} + {3118611600 -7200 0 -02} + {3131917200 -3600 1 -01} + {3150061200 -7200 0 -02} + {3163366800 -3600 1 -01} + {3181510800 -7200 0 -02} + {3194816400 -3600 1 -01} + {3212960400 -7200 0 -02} + {3226266000 -3600 1 -01} + {3245014800 -7200 0 -02} + {3257715600 -3600 1 -01} + {3276464400 -7200 0 -02} + {3289165200 -3600 1 -01} + {3307914000 -7200 0 -02} + {3321219600 -3600 1 -01} + {3339363600 -7200 0 -02} + {3352669200 -3600 1 -01} + {3370813200 -7200 0 -02} + {3384118800 -3600 1 -01} + {3402867600 -7200 0 -02} + {3415568400 -3600 1 -01} + {3434317200 -7200 0 -02} + {3447018000 -3600 1 -01} + {3465766800 -7200 0 -02} + {3479072400 -3600 1 -01} + {3497216400 -7200 0 -02} + {3510522000 -3600 1 -01} + {3528666000 -7200 0 -02} + {3541971600 -3600 1 -01} + {3560115600 -7200 0 -02} + {3573421200 -3600 1 -01} + {3592170000 -7200 0 -02} + {3604870800 -3600 1 -01} + {3623619600 -7200 0 -02} + {3636320400 -3600 1 -01} + {3655069200 -7200 0 -02} + {3668374800 -3600 1 -01} + {3686518800 -7200 0 -02} + {3699824400 -3600 1 -01} + {3717968400 -7200 0 -02} + {3731274000 -3600 1 -01} + {3750022800 -7200 0 -02} + {3762723600 -3600 1 -01} + {3781472400 -7200 0 -02} + {3794173200 -3600 1 -01} + {3812922000 -7200 0 -02} + {3825622800 -3600 1 -01} + {3844371600 -7200 0 -02} + {3857677200 -3600 1 -01} + {3875821200 -7200 0 -02} + {3889126800 -3600 1 -01} + {3907270800 -7200 0 -02} + {3920576400 -3600 1 -01} + {3939325200 -7200 0 -02} + {3952026000 -3600 1 -01} + {3970774800 -7200 0 -02} + {3983475600 -3600 1 -01} + {4002224400 -7200 0 -02} + {4015530000 -3600 1 -01} + {4033674000 -7200 0 -02} + {4046979600 -3600 1 -01} + {4065123600 -7200 0 -02} + {4078429200 -3600 1 -01} + {4096573200 -7200 0 -02} } diff --git a/library/tzdata/America/Yellowknife b/library/tzdata/America/Yellowknife index 65ddbb6..69e171d 100644 --- a/library/tzdata/America/Yellowknife +++ b/library/tzdata/America/Yellowknife @@ -1,266 +1,5 @@ # created by tools/tclZIC.tcl - do not edit - -set TZData(:America/Yellowknife) { - {-9223372036854775808 0 0 -00} - {-1104537600 -25200 0 MST} - {-880210800 -21600 1 MWT} - {-769395600 -21600 1 MPT} - {-765388800 -25200 0 MST} - {73472400 -21600 1 MDT} - {89193600 -25200 0 MST} - {104922000 -21600 1 MDT} - {120643200 -25200 0 MST} - {136371600 -21600 1 MDT} - {152092800 -25200 0 MST} - {167821200 -21600 1 MDT} - {183542400 -25200 0 MST} - {199270800 -21600 1 MDT} - {215596800 -25200 0 MST} - {230720400 -21600 1 MDT} - {247046400 -25200 0 MST} - {262774800 -21600 1 MDT} - {278496000 -25200 0 MST} - {294224400 -21600 1 MDT} - {309945600 -25200 0 MST} - {315558000 -25200 0 MST} - {325674000 -21600 1 MDT} - {341395200 -25200 0 MST} - {357123600 -21600 1 MDT} - {372844800 -25200 0 MST} - {388573200 -21600 1 MDT} - {404899200 -25200 0 MST} - {420022800 -21600 1 MDT} - {436348800 -25200 0 MST} - {452077200 -21600 1 MDT} - {467798400 -25200 0 MST} - {483526800 -21600 1 MDT} - {499248000 -25200 0 MST} - {514976400 -21600 1 MDT} - {530697600 -25200 0 MST} - {544611600 -21600 1 MDT} - {562147200 -25200 0 MST} - {576061200 -21600 1 MDT} - {594201600 -25200 0 MST} - {607510800 -21600 1 MDT} - {625651200 -25200 0 MST} - {638960400 -21600 1 MDT} - {657100800 -25200 0 MST} - {671014800 -21600 1 MDT} - {688550400 -25200 0 MST} - {702464400 -21600 1 MDT} - {720000000 -25200 0 MST} - {733914000 -21600 1 MDT} - {752054400 -25200 0 MST} - {765363600 -21600 1 MDT} - {783504000 -25200 0 MST} - {796813200 -21600 1 MDT} - {814953600 -25200 0 MST} - {828867600 -21600 1 MDT} - {846403200 -25200 0 MST} - {860317200 -21600 1 MDT} - {877852800 -25200 0 MST} - {891766800 -21600 1 MDT} - {909302400 -25200 0 MST} - {923216400 -21600 1 MDT} - {941356800 -25200 0 MST} - {954666000 -21600 1 MDT} - {972806400 -25200 0 MST} - {986115600 -21600 1 MDT} - {1004256000 -25200 0 MST} - {1018170000 -21600 1 MDT} - {1035705600 -25200 0 MST} - {1049619600 -21600 1 MDT} - {1067155200 -25200 0 MST} - {1081069200 -21600 1 MDT} - {1099209600 -25200 0 MST} - {1112518800 -21600 1 MDT} - {1130659200 -25200 0 MST} - {1143968400 -21600 1 MDT} - {1162108800 -25200 0 MST} - {1173603600 -21600 1 MDT} - {1194163200 -25200 0 MST} - {1205053200 -21600 1 MDT} - {1225612800 -25200 0 MST} - {1236502800 -21600 1 MDT} - {1257062400 -25200 0 MST} - {1268557200 -21600 1 MDT} - {1289116800 -25200 0 MST} - {1300006800 -21600 1 MDT} - {1320566400 -25200 0 MST} - {1331456400 -21600 1 MDT} - {1352016000 -25200 0 MST} - {1362906000 -21600 1 MDT} - {1383465600 -25200 0 MST} - {1394355600 -21600 1 MDT} - {1414915200 -25200 0 MST} - {1425805200 -21600 1 MDT} - {1446364800 -25200 0 MST} - {1457859600 -21600 1 MDT} - {1478419200 -25200 0 MST} - {1489309200 -21600 1 MDT} - {1509868800 -25200 0 MST} - {1520758800 -21600 1 MDT} - {1541318400 -25200 0 MST} - {1552208400 -21600 1 MDT} - {1572768000 -25200 0 MST} - {1583658000 -21600 1 MDT} - {1604217600 -25200 0 MST} - {1615712400 -21600 1 MDT} - {1636272000 -25200 0 MST} - {1647162000 -21600 1 MDT} - {1667721600 -25200 0 MST} - {1678611600 -21600 1 MDT} - {1699171200 -25200 0 MST} - {1710061200 -21600 1 MDT} - {1730620800 -25200 0 MST} - {1741510800 -21600 1 MDT} - {1762070400 -25200 0 MST} - {1772960400 -21600 1 MDT} - {1793520000 -25200 0 MST} - {1805014800 -21600 1 MDT} - {1825574400 -25200 0 MST} - {1836464400 -21600 1 MDT} - {1857024000 -25200 0 MST} - {1867914000 -21600 1 MDT} - {1888473600 -25200 0 MST} - {1899363600 -21600 1 MDT} - {1919923200 -25200 0 MST} - {1930813200 -21600 1 MDT} - {1951372800 -25200 0 MST} - {1962867600 -21600 1 MDT} - {1983427200 -25200 0 MST} - {1994317200 -21600 1 MDT} - {2014876800 -25200 0 MST} - {2025766800 -21600 1 MDT} - {2046326400 -25200 0 MST} - {2057216400 -21600 1 MDT} - {2077776000 -25200 0 MST} - {2088666000 -21600 1 MDT} - {2109225600 -25200 0 MST} - {2120115600 -21600 1 MDT} - {2140675200 -25200 0 MST} - {2152170000 -21600 1 MDT} - {2172729600 -25200 0 MST} - {2183619600 -21600 1 MDT} - {2204179200 -25200 0 MST} - {2215069200 -21600 1 MDT} - {2235628800 -25200 0 MST} - {2246518800 -21600 1 MDT} - {2267078400 -25200 0 MST} - {2277968400 -21600 1 MDT} - {2298528000 -25200 0 MST} - {2309418000 -21600 1 MDT} - {2329977600 -25200 0 MST} - {2341472400 -21600 1 MDT} - {2362032000 -25200 0 MST} - {2372922000 -21600 1 MDT} - {2393481600 -25200 0 MST} - {2404371600 -21600 1 MDT} - {2424931200 -25200 0 MST} - {2435821200 -21600 1 MDT} - {2456380800 -25200 0 MST} - {2467270800 -21600 1 MDT} - {2487830400 -25200 0 MST} - {2499325200 -21600 1 MDT} - {2519884800 -25200 0 MST} - {2530774800 -21600 1 MDT} - {2551334400 -25200 0 MST} - {2562224400 -21600 1 MDT} - {2582784000 -25200 0 MST} - {2593674000 -21600 1 MDT} - {2614233600 -25200 0 MST} - {2625123600 -21600 1 MDT} - {2645683200 -25200 0 MST} - {2656573200 -21600 1 MDT} - {2677132800 -25200 0 MST} - {2688627600 -21600 1 MDT} - {2709187200 -25200 0 MST} - {2720077200 -21600 1 MDT} - {2740636800 -25200 0 MST} - {2751526800 -21600 1 MDT} - {2772086400 -25200 0 MST} - {2782976400 -21600 1 MDT} - {2803536000 -25200 0 MST} - {2814426000 -21600 1 MDT} - {2834985600 -25200 0 MST} - {2846480400 -21600 1 MDT} - {2867040000 -25200 0 MST} - {2877930000 -21600 1 MDT} - {2898489600 -25200 0 MST} - {2909379600 -21600 1 MDT} - {2929939200 -25200 0 MST} - {2940829200 -21600 1 MDT} - {2961388800 -25200 0 MST} - {2972278800 -21600 1 MDT} - {2992838400 -25200 0 MST} - {3003728400 -21600 1 MDT} - {3024288000 -25200 0 MST} - {3035782800 -21600 1 MDT} - {3056342400 -25200 0 MST} - {3067232400 -21600 1 MDT} - {3087792000 -25200 0 MST} - {3098682000 -21600 1 MDT} - {3119241600 -25200 0 MST} - {3130131600 -21600 1 MDT} - {3150691200 -25200 0 MST} - {3161581200 -21600 1 MDT} - {3182140800 -25200 0 MST} - {3193030800 -21600 1 MDT} - {3213590400 -25200 0 MST} - {3225085200 -21600 1 MDT} - {3245644800 -25200 0 MST} - {3256534800 -21600 1 MDT} - {3277094400 -25200 0 MST} - {3287984400 -21600 1 MDT} - {3308544000 -25200 0 MST} - {3319434000 -21600 1 MDT} - {3339993600 -25200 0 MST} - {3350883600 -21600 1 MDT} - {3371443200 -25200 0 MST} - {3382938000 -21600 1 MDT} - {3403497600 -25200 0 MST} - {3414387600 -21600 1 MDT} - {3434947200 -25200 0 MST} - {3445837200 -21600 1 MDT} - {3466396800 -25200 0 MST} - {3477286800 -21600 1 MDT} - {3497846400 -25200 0 MST} - {3508736400 -21600 1 MDT} - {3529296000 -25200 0 MST} - {3540186000 -21600 1 MDT} - {3560745600 -25200 0 MST} - {3572240400 -21600 1 MDT} - {3592800000 -25200 0 MST} - {3603690000 -21600 1 MDT} - {3624249600 -25200 0 MST} - {3635139600 -21600 1 MDT} - {3655699200 -25200 0 MST} - {3666589200 -21600 1 MDT} - {3687148800 -25200 0 MST} - {3698038800 -21600 1 MDT} - {3718598400 -25200 0 MST} - {3730093200 -21600 1 MDT} - {3750652800 -25200 0 MST} - {3761542800 -21600 1 MDT} - {3782102400 -25200 0 MST} - {3792992400 -21600 1 MDT} - {3813552000 -25200 0 MST} - {3824442000 -21600 1 MDT} - {3845001600 -25200 0 MST} - {3855891600 -21600 1 MDT} - {3876451200 -25200 0 MST} - {3887341200 -21600 1 MDT} - {3907900800 -25200 0 MST} - {3919395600 -21600 1 MDT} - {3939955200 -25200 0 MST} - {3950845200 -21600 1 MDT} - {3971404800 -25200 0 MST} - {3982294800 -21600 1 MDT} - {4002854400 -25200 0 MST} - {4013744400 -21600 1 MDT} - {4034304000 -25200 0 MST} - {4045194000 -21600 1 MDT} - {4065753600 -25200 0 MST} - {4076643600 -21600 1 MDT} - {4097203200 -25200 0 MST} +if {![info exists TZData(America/Edmonton)]} { + LoadTimeZoneFile America/Edmonton } +set TZData(:America/Yellowknife) $TZData(:America/Edmonton) diff --git a/library/tzdata/Asia/Beirut b/library/tzdata/Asia/Beirut index ac0a64e..a01a53a 100644 --- a/library/tzdata/Asia/Beirut +++ b/library/tzdata/Asia/Beirut @@ -113,7 +113,7 @@ set TZData(:Asia/Beirut) { {1635627600 7200 0 EET} {1648332000 10800 1 EEST} {1667077200 7200 0 EET} - {1679781600 10800 1 EEST} + {1682028000 10800 1 EEST} {1698526800 7200 0 EET} {1711836000 10800 1 EEST} {1729976400 7200 0 EET} diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 1ceb680..d3789d3 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -127,11 +127,11 @@ set TZData(:Asia/Gaza) { {1635458400 7200 0 EET} {1648332000 10800 1 EEST} {1666998000 7200 0 EET} - {1679702400 10800 1 EEST} + {1682726400 10800 1 EEST} {1698447600 7200 0 EET} - {1711756800 10800 1 EEST} + {1712966400 10800 1 EEST} {1729897200 7200 0 EET} - {1743206400 10800 1 EEST} + {1743811200 10800 1 EEST} {1761346800 7200 0 EET} {1774656000 10800 1 EEST} {1792796400 7200 0 EET} @@ -154,48 +154,80 @@ set TZData(:Asia/Gaza) { {2058307200 10800 1 EEST} {2077052400 7200 0 EET} {2090361600 10800 1 EEST} - {2108502000 7200 0 EET} + {2107897200 7200 0 EET} {2121811200 10800 1 EEST} - {2139951600 7200 0 EET} + {2138742000 7200 0 EET} {2153260800 10800 1 EEST} - {2172006000 7200 0 EET} + {2168982000 7200 0 EET} {2184710400 10800 1 EEST} + {2199826800 7200 0 EET} + {2202854400 10800 1 EEST} {2203455600 7200 0 EET} {2216160000 10800 1 EEST} + {2230066800 7200 0 EET} + {2233699200 10800 1 EEST} {2234905200 7200 0 EET} {2248214400 10800 1 EEST} + {2260911600 7200 0 EET} + {2263939200 10800 1 EEST} {2266354800 7200 0 EET} {2279664000 10800 1 EEST} + {2291756400 7200 0 EET} + {2294784000 10800 1 EEST} {2297804400 7200 0 EET} {2311113600 10800 1 EEST} + {2321996400 7200 0 EET} + {2325628800 10800 1 EEST} {2329254000 7200 0 EET} {2342563200 10800 1 EEST} + {2352841200 7200 0 EET} + {2355868800 10800 1 EEST} {2361308400 7200 0 EET} {2374012800 10800 1 EEST} + {2383686000 7200 0 EET} + {2386713600 10800 1 EEST} {2392758000 7200 0 EET} {2405462400 10800 1 EEST} + {2413926000 7200 0 EET} + {2417558400 10800 1 EEST} {2424207600 7200 0 EET} {2437516800 10800 1 EEST} + {2444770800 7200 0 EET} + {2447798400 10800 1 EEST} {2455657200 7200 0 EET} {2468966400 10800 1 EEST} + {2475010800 7200 0 EET} + {2478643200 10800 1 EEST} {2487106800 7200 0 EET} {2500416000 10800 1 EEST} + {2505855600 7200 0 EET} + {2508883200 10800 1 EEST} {2519161200 7200 0 EET} {2531865600 10800 1 EEST} + {2536700400 7200 0 EET} + {2539728000 10800 1 EEST} {2550610800 7200 0 EET} {2563315200 10800 1 EEST} + {2566940400 7200 0 EET} + {2570572800 10800 1 EEST} {2582060400 7200 0 EET} {2595369600 10800 1 EEST} + {2597785200 7200 0 EET} + {2600812800 10800 1 EEST} {2613510000 7200 0 EET} {2626819200 10800 1 EEST} + {2628025200 7200 0 EET} + {2631657600 10800 1 EEST} {2644959600 7200 0 EET} {2658268800 10800 1 EEST} + {2658870000 7200 0 EET} + {2662502400 10800 1 EEST} {2676409200 7200 0 EET} - {2689718400 10800 1 EEST} + {2692742400 10800 1 EEST} {2708463600 7200 0 EET} - {2721168000 10800 1 EEST} + {2723587200 10800 1 EEST} {2739913200 7200 0 EET} - {2752617600 10800 1 EEST} + {2753827200 10800 1 EEST} {2771362800 7200 0 EET} {2784672000 10800 1 EEST} {2802812400 7200 0 EET} @@ -218,42 +250,69 @@ set TZData(:Asia/Gaza) { {3068323200 10800 1 EEST} {3087068400 7200 0 EET} {3099772800 10800 1 EEST} - {3118518000 7200 0 EET} + {3117913200 7200 0 EET} {3131827200 10800 1 EEST} - {3149967600 7200 0 EET} + {3148758000 7200 0 EET} {3163276800 10800 1 EEST} - {3181417200 7200 0 EET} + {3179602800 7200 0 EET} {3194726400 10800 1 EEST} - {3212866800 7200 0 EET} + {3209842800 7200 0 EET} {3226176000 10800 1 EEST} - {3244921200 7200 0 EET} - {3257625600 10800 1 EEST} - {3276370800 7200 0 EET} - {3289075200 10800 1 EEST} - {3307820400 7200 0 EET} - {3321129600 10800 1 EEST} + {3240687600 7200 0 EET} + {3243715200 10800 1 EEST} + {3257622000 10800 1 EEST} + {3271532400 7200 0 EET} + {3274560000 10800 1 EEST} + {3289071600 10800 1 EEST} + {3301772400 7200 0 EET} + {3305404800 10800 1 EEST} + {3321126000 10800 1 EEST} + {3332617200 7200 0 EET} + {3335644800 10800 1 EEST} {3339270000 7200 0 EET} {3352579200 10800 1 EEST} + {3362857200 7200 0 EET} + {3366489600 10800 1 EEST} {3370719600 7200 0 EET} {3384028800 10800 1 EEST} + {3393702000 7200 0 EET} + {3397334400 10800 1 EEST} {3402774000 7200 0 EET} {3415478400 10800 1 EEST} + {3424546800 7200 0 EET} + {3427574400 10800 1 EEST} {3434223600 7200 0 EET} {3446928000 10800 1 EEST} + {3454786800 7200 0 EET} + {3458419200 10800 1 EEST} {3465673200 7200 0 EET} {3478982400 10800 1 EEST} + {3485631600 7200 0 EET} + {3488659200 10800 1 EEST} {3497122800 7200 0 EET} {3510432000 10800 1 EEST} + {3516476400 7200 0 EET} + {3519504000 10800 1 EEST} {3528572400 7200 0 EET} {3541881600 10800 1 EEST} + {3546716400 7200 0 EET} + {3550348800 10800 1 EEST} {3560022000 7200 0 EET} {3573331200 10800 1 EEST} + {3577561200 7200 0 EET} + {3580588800 10800 1 EEST} {3592076400 7200 0 EET} {3604780800 10800 1 EEST} + {3607801200 7200 0 EET} + {3611433600 10800 1 EEST} {3623526000 7200 0 EET} {3636230400 10800 1 EEST} + {3638646000 7200 0 EET} + {3642278400 10800 1 EEST} {3654975600 7200 0 EET} {3668284800 10800 1 EEST} + {3669490800 7200 0 EET} + {3672518400 10800 1 EEST} {3686425200 7200 0 EET} {3699734400 10800 1 EEST} {3717874800 7200 0 EET} diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron index b92db8d..140c841 100644 --- a/library/tzdata/Asia/Hebron +++ b/library/tzdata/Asia/Hebron @@ -126,11 +126,11 @@ set TZData(:Asia/Hebron) { {1635458400 7200 0 EET} {1648332000 10800 1 EEST} {1666998000 7200 0 EET} - {1679702400 10800 1 EEST} + {1682726400 10800 1 EEST} {1698447600 7200 0 EET} - {1711756800 10800 1 EEST} + {1712966400 10800 1 EEST} {1729897200 7200 0 EET} - {1743206400 10800 1 EEST} + {1743811200 10800 1 EEST} {1761346800 7200 0 EET} {1774656000 10800 1 EEST} {1792796400 7200 0 EET} @@ -153,48 +153,80 @@ set TZData(:Asia/Hebron) { {2058307200 10800 1 EEST} {2077052400 7200 0 EET} {2090361600 10800 1 EEST} - {2108502000 7200 0 EET} + {2107897200 7200 0 EET} {2121811200 10800 1 EEST} - {2139951600 7200 0 EET} + {2138742000 7200 0 EET} {2153260800 10800 1 EEST} - {2172006000 7200 0 EET} + {2168982000 7200 0 EET} {2184710400 10800 1 EEST} + {2199826800 7200 0 EET} + {2202854400 10800 1 EEST} {2203455600 7200 0 EET} {2216160000 10800 1 EEST} + {2230066800 7200 0 EET} + {2233699200 10800 1 EEST} {2234905200 7200 0 EET} {2248214400 10800 1 EEST} + {2260911600 7200 0 EET} + {2263939200 10800 1 EEST} {2266354800 7200 0 EET} {2279664000 10800 1 EEST} + {2291756400 7200 0 EET} + {2294784000 10800 1 EEST} {2297804400 7200 0 EET} {2311113600 10800 1 EEST} + {2321996400 7200 0 EET} + {2325628800 10800 1 EEST} {2329254000 7200 0 EET} {2342563200 10800 1 EEST} + {2352841200 7200 0 EET} + {2355868800 10800 1 EEST} {2361308400 7200 0 EET} {2374012800 10800 1 EEST} + {2383686000 7200 0 EET} + {2386713600 10800 1 EEST} {2392758000 7200 0 EET} {2405462400 10800 1 EEST} + {2413926000 7200 0 EET} + {2417558400 10800 1 EEST} {2424207600 7200 0 EET} {2437516800 10800 1 EEST} + {2444770800 7200 0 EET} + {2447798400 10800 1 EEST} {2455657200 7200 0 EET} {2468966400 10800 1 EEST} + {2475010800 7200 0 EET} + {2478643200 10800 1 EEST} {2487106800 7200 0 EET} {2500416000 10800 1 EEST} + {2505855600 7200 0 EET} + {2508883200 10800 1 EEST} {2519161200 7200 0 EET} {2531865600 10800 1 EEST} + {2536700400 7200 0 EET} + {2539728000 10800 1 EEST} {2550610800 7200 0 EET} {2563315200 10800 1 EEST} + {2566940400 7200 0 EET} + {2570572800 10800 1 EEST} {2582060400 7200 0 EET} {2595369600 10800 1 EEST} + {2597785200 7200 0 EET} + {2600812800 10800 1 EEST} {2613510000 7200 0 EET} {2626819200 10800 1 EEST} + {2628025200 7200 0 EET} + {2631657600 10800 1 EEST} {2644959600 7200 0 EET} {2658268800 10800 1 EEST} + {2658870000 7200 0 EET} + {2662502400 10800 1 EEST} {2676409200 7200 0 EET} - {2689718400 10800 1 EEST} + {2692742400 10800 1 EEST} {2708463600 7200 0 EET} - {2721168000 10800 1 EEST} + {2723587200 10800 1 EEST} {2739913200 7200 0 EET} - {2752617600 10800 1 EEST} + {2753827200 10800 1 EEST} {2771362800 7200 0 EET} {2784672000 10800 1 EEST} {2802812400 7200 0 EET} @@ -217,42 +249,69 @@ set TZData(:Asia/Hebron) { {3068323200 10800 1 EEST} {3087068400 7200 0 EET} {3099772800 10800 1 EEST} - {3118518000 7200 0 EET} + {3117913200 7200 0 EET} {3131827200 10800 1 EEST} - {3149967600 7200 0 EET} + {3148758000 7200 0 EET} {3163276800 10800 1 EEST} - {3181417200 7200 0 EET} + {3179602800 7200 0 EET} {3194726400 10800 1 EEST} - {3212866800 7200 0 EET} + {3209842800 7200 0 EET} {3226176000 10800 1 EEST} - {3244921200 7200 0 EET} - {3257625600 10800 1 EEST} - {3276370800 7200 0 EET} - {3289075200 10800 1 EEST} - {3307820400 7200 0 EET} - {3321129600 10800 1 EEST} + {3240687600 7200 0 EET} + {3243715200 10800 1 EEST} + {3257622000 10800 1 EEST} + {3271532400 7200 0 EET} + {3274560000 10800 1 EEST} + {3289071600 10800 1 EEST} + {3301772400 7200 0 EET} + {3305404800 10800 1 EEST} + {3321126000 10800 1 EEST} + {3332617200 7200 0 EET} + {3335644800 10800 1 EEST} {3339270000 7200 0 EET} {3352579200 10800 1 EEST} + {3362857200 7200 0 EET} + {3366489600 10800 1 EEST} {3370719600 7200 0 EET} {3384028800 10800 1 EEST} + {3393702000 7200 0 EET} + {3397334400 10800 1 EEST} {3402774000 7200 0 EET} {3415478400 10800 1 EEST} + {3424546800 7200 0 EET} + {3427574400 10800 1 EEST} {3434223600 7200 0 EET} {3446928000 10800 1 EEST} + {3454786800 7200 0 EET} + {3458419200 10800 1 EEST} {3465673200 7200 0 EET} {3478982400 10800 1 EEST} + {3485631600 7200 0 EET} + {3488659200 10800 1 EEST} {3497122800 7200 0 EET} {3510432000 10800 1 EEST} + {3516476400 7200 0 EET} + {3519504000 10800 1 EEST} {3528572400 7200 0 EET} {3541881600 10800 1 EEST} + {3546716400 7200 0 EET} + {3550348800 10800 1 EEST} {3560022000 7200 0 EET} {3573331200 10800 1 EEST} + {3577561200 7200 0 EET} + {3580588800 10800 1 EEST} {3592076400 7200 0 EET} {3604780800 10800 1 EEST} + {3607801200 7200 0 EET} + {3611433600 10800 1 EEST} {3623526000 7200 0 EET} {3636230400 10800 1 EEST} + {3638646000 7200 0 EET} + {3642278400 10800 1 EEST} {3654975600 7200 0 EET} {3668284800 10800 1 EEST} + {3669490800 7200 0 EET} + {3672518400 10800 1 EEST} {3686425200 7200 0 EET} {3699734400 10800 1 EEST} {3717874800 7200 0 EET} diff --git a/library/tzdata/Europe/Kirov b/library/tzdata/Europe/Kirov index 8762d22..9d2afa5 100644 --- a/library/tzdata/Europe/Kirov +++ b/library/tzdata/Europe/Kirov @@ -20,51 +20,51 @@ set TZData(:Europe/Kirov) { {559692000 14400 0 +04} {575416800 18000 1 +05} {591141600 14400 0 +04} - {606866400 10800 0 +04} - {606870000 14400 1 +04} - {622594800 10800 0 +03} - {638319600 14400 1 +04} - {654649200 10800 0 +03} + {606866400 10800 0 MSD} + {606870000 14400 1 MSD} + {622594800 10800 0 MSK} + {638319600 14400 1 MSD} + {654649200 10800 0 MSK} {670374000 14400 0 +04} - {701820000 10800 0 +04} - {701823600 14400 1 +04} - {717548400 10800 0 +03} - {733273200 14400 1 +04} - {748998000 10800 0 +03} - {764722800 14400 1 +04} - {780447600 10800 0 +03} - {796172400 14400 1 +04} - {811897200 10800 0 +03} - {828226800 14400 1 +04} - {846370800 10800 0 +03} - {859676400 14400 1 +04} - {877820400 10800 0 +03} - {891126000 14400 1 +04} - {909270000 10800 0 +03} - {922575600 14400 1 +04} - {941324400 10800 0 +03} - {954025200 14400 1 +04} - {972774000 10800 0 +03} - {985474800 14400 1 +04} - {1004223600 10800 0 +03} - {1017529200 14400 1 +04} - {1035673200 10800 0 +03} - {1048978800 14400 1 +04} - {1067122800 10800 0 +03} - {1080428400 14400 1 +04} - {1099177200 10800 0 +03} - {1111878000 14400 1 +04} - {1130626800 10800 0 +03} - {1143327600 14400 1 +04} - {1162076400 10800 0 +03} - {1174777200 14400 1 +04} - {1193526000 10800 0 +03} - {1206831600 14400 1 +04} - {1224975600 10800 0 +03} - {1238281200 14400 1 +04} - {1256425200 10800 0 +03} - {1269730800 14400 1 +04} - {1288479600 10800 0 +03} - {1301180400 14400 0 +04} - {1414274400 10800 0 +03} + {701820000 10800 0 MSD} + {701823600 14400 1 MSD} + {717548400 10800 0 MSK} + {733273200 14400 1 MSD} + {748998000 10800 0 MSK} + {764722800 14400 1 MSD} + {780447600 10800 0 MSK} + {796172400 14400 1 MSD} + {811897200 10800 0 MSK} + {828226800 14400 1 MSD} + {846370800 10800 0 MSK} + {859676400 14400 1 MSD} + {877820400 10800 0 MSK} + {891126000 14400 1 MSD} + {909270000 10800 0 MSK} + {922575600 14400 1 MSD} + {941324400 10800 0 MSK} + {954025200 14400 1 MSD} + {972774000 10800 0 MSK} + {985474800 14400 1 MSD} + {1004223600 10800 0 MSK} + {1017529200 14400 1 MSD} + {1035673200 10800 0 MSK} + {1048978800 14400 1 MSD} + {1067122800 10800 0 MSK} + {1080428400 14400 1 MSD} + {1099177200 10800 0 MSK} + {1111878000 14400 1 MSD} + {1130626800 10800 0 MSK} + {1143327600 14400 1 MSD} + {1162076400 10800 0 MSK} + {1174777200 14400 1 MSD} + {1193526000 10800 0 MSK} + {1206831600 14400 1 MSD} + {1224975600 10800 0 MSK} + {1238281200 14400 1 MSD} + {1256425200 10800 0 MSK} + {1269730800 14400 1 MSD} + {1288479600 10800 0 MSK} + {1301180400 14400 0 MSK} + {1414274400 10800 0 MSK} } diff --git a/library/tzdata/Europe/Volgograd b/library/tzdata/Europe/Volgograd index 2ce2dfe..00c3cb3 100644 --- a/library/tzdata/Europe/Volgograd +++ b/library/tzdata/Europe/Volgograd @@ -19,55 +19,55 @@ set TZData(:Europe/Volgograd) { {528242400 14400 0 +04} {543967200 18000 1 +05} {559692000 14400 0 +04} - {575416800 10800 0 +04} - {575420400 14400 1 +04} - {591145200 10800 0 +03} - {606870000 14400 1 +04} - {622594800 10800 0 +03} - {638319600 14400 1 +04} - {654649200 10800 0 +03} + {575416800 10800 0 MSD} + {575420400 14400 1 MSD} + {591145200 10800 0 MSK} + {606870000 14400 1 MSD} + {622594800 10800 0 MSK} + {638319600 14400 1 MSD} + {654649200 10800 0 MSK} {670374000 14400 0 +04} - {701820000 10800 0 +04} - {701823600 14400 1 +04} - {717548400 10800 0 +03} - {733273200 14400 1 +04} - {748998000 10800 0 +03} - {764722800 14400 1 +04} - {780447600 10800 0 +03} - {796172400 14400 1 +04} - {811897200 10800 0 +03} - {828226800 14400 1 +04} - {846370800 10800 0 +03} - {859676400 14400 1 +04} - {877820400 10800 0 +03} - {891126000 14400 1 +04} - {909270000 10800 0 +03} - {922575600 14400 1 +04} - {941324400 10800 0 +03} - {954025200 14400 1 +04} - {972774000 10800 0 +03} - {985474800 14400 1 +04} - {1004223600 10800 0 +03} - {1017529200 14400 1 +04} - {1035673200 10800 0 +03} - {1048978800 14400 1 +04} - {1067122800 10800 0 +03} - {1080428400 14400 1 +04} - {1099177200 10800 0 +03} - {1111878000 14400 1 +04} - {1130626800 10800 0 +03} - {1143327600 14400 1 +04} - {1162076400 10800 0 +03} - {1174777200 14400 1 +04} - {1193526000 10800 0 +03} - {1206831600 14400 1 +04} - {1224975600 10800 0 +03} - {1238281200 14400 1 +04} - {1256425200 10800 0 +03} - {1269730800 14400 1 +04} - {1288479600 10800 0 +03} - {1301180400 14400 0 +04} - {1414274400 10800 0 +03} + {701820000 10800 0 MSD} + {701823600 14400 1 MSD} + {717548400 10800 0 MSK} + {733273200 14400 1 MSD} + {748998000 10800 0 MSK} + {764722800 14400 1 MSD} + {780447600 10800 0 MSK} + {796172400 14400 1 MSD} + {811897200 10800 0 MSK} + {828226800 14400 1 MSD} + {846370800 10800 0 MSK} + {859676400 14400 1 MSD} + {877820400 10800 0 MSK} + {891126000 14400 1 MSD} + {909270000 10800 0 MSK} + {922575600 14400 1 MSD} + {941324400 10800 0 MSK} + {954025200 14400 1 MSD} + {972774000 10800 0 MSK} + {985474800 14400 1 MSD} + {1004223600 10800 0 MSK} + {1017529200 14400 1 MSD} + {1035673200 10800 0 MSK} + {1048978800 14400 1 MSD} + {1067122800 10800 0 MSK} + {1080428400 14400 1 MSD} + {1099177200 10800 0 MSK} + {1111878000 14400 1 MSD} + {1130626800 10800 0 MSK} + {1143327600 14400 1 MSD} + {1162076400 10800 0 MSK} + {1174777200 14400 1 MSD} + {1193526000 10800 0 MSK} + {1206831600 14400 1 MSD} + {1224975600 10800 0 MSK} + {1238281200 14400 1 MSD} + {1256425200 10800 0 MSK} + {1269730800 14400 1 MSD} + {1288479600 10800 0 MSK} + {1301180400 14400 0 MSK} + {1414274400 10800 0 MSK} {1540681200 14400 0 +04} - {1609020000 10800 0 +03} + {1609020000 10800 0 MSK} } -- cgit v0.12 From d2fc2aa765cea8a44d1d40502629a88c09bbfd41 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Sun, 26 Mar 2023 18:41:13 +0000 Subject: Sync all error-messages with modern Linux --- generic/tclPosixStr.c | 100 ++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 52 deletions(-) diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index c4647d9..d4c20fa 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -496,9 +496,6 @@ const char * Tcl_ErrnoMsg( int err) /* Error number (such as in errno variable). */ { -#ifndef _WIN32 - return strerror(err); -#else switch (err) { #if defined(E2BIG) && (!defined(EOVERFLOW) || (E2BIG != EOVERFLOW)) case E2BIG: return "Argument list too long"; @@ -507,28 +504,28 @@ Tcl_ErrnoMsg( case EACCES: return "Permission denied"; #endif #ifdef EADDRINUSE - case EADDRINUSE: return "Address in use"; + case EADDRINUSE: return "Address already in use"; #endif #ifdef EADDRNOTAVAIL - case EADDRNOTAVAIL: return "Address not available"; + case EADDRNOTAVAIL: return "Cannot assign requested address"; #endif #ifdef EADV case EADV: return "Advertise error"; #endif #ifdef EAFNOSUPPORT - case EAFNOSUPPORT: return "Address family not supported"; + case EAFNOSUPPORT: return "Address family not supported by protocol"; #endif #ifdef EAGAIN - case EAGAIN: return "Resource unavailable, try again"; + case EAGAIN: return "Resource temporarily unavailable"; #endif #ifdef EALIGN case EALIGN: return "EALIGN"; #endif #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY)) - case EALREADY: return "Connection already in progress"; + case EALREADY: return "Operation already in progress"; #endif #ifdef EBADE - case EBADE: return "Bad exchange descriptor"; + case EBADE: return "Invalid exchange"; #endif #ifdef EBADF case EBADF: return "Bad file descriptor"; @@ -540,13 +537,13 @@ Tcl_ErrnoMsg( case EBADMSG: return "Bad message"; #endif #ifdef EBADR - case EBADR: return "Bad request descriptor"; + case EBADR: return "Invalid request descriptor"; #endif #ifdef EBADRPC case EBADRPC: return "RPC structure is bad"; #endif #ifdef EBADRQC - case EBADRQC: return "Bad request code"; + case EBADRQC: return "Invalid request code"; #endif #ifdef EBADSLT case EBADSLT: return "Invalid slot"; @@ -570,19 +567,19 @@ Tcl_ErrnoMsg( case ECOMM: return "Communication error on send"; #endif #ifdef ECONNABORTED - case ECONNABORTED: return "Connection aborted"; + case ECONNABORTED: return "Software caused connection abort"; #endif #ifdef ECONNREFUSED case ECONNREFUSED: return "Connection refused"; #endif #ifdef ECONNRESET - case ECONNRESET: return "Connection reset"; + case ECONNRESET: return "Connection reset by peer"; #endif #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) - case EDEADLK: return "Resource deadlock would occur"; + case EDEADLK: return "Resource deadlock avoided"; #endif #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) - case EDEADLOCK: return "Resource deadlock would occur"; + case EDEADLOCK: return "Resource deadlock avoided"; #endif #ifdef EDESTADDRREQ case EDESTADDRREQ: return "Destination address required"; @@ -591,10 +588,10 @@ Tcl_ErrnoMsg( case EDIRTY: return "Mounting a dirty fs w/o force"; #endif #ifdef EDOM - case EDOM: return "Mathematics argument out of domain of function"; + case EDOM: return "Numerical argument out of domain"; #endif #ifdef EDOTDOT - case EDOTDOT: return "Cross mount point"; + case EDOTDOT: return "RFS specific error"; #endif #ifdef EDQUOT case EDQUOT: return "Disk quota exceeded"; @@ -615,7 +612,7 @@ Tcl_ErrnoMsg( case EHOSTDOWN: return "Host is down"; #endif #ifdef EHOSTUNREACH - case EHOSTUNREACH: return "Host is unreachable"; + case EHOSTUNREACH: return "No route to host"; #endif #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) case EIDRM: return "Identifier removed"; @@ -627,19 +624,19 @@ Tcl_ErrnoMsg( case EILSEQ: return "Invalid or incomplete multibyte or wide character"; #endif #ifdef EINPROGRESS - case EINPROGRESS: return "Operation in progress"; + case EINPROGRESS: return "Operation now in progress"; #endif #ifdef EINTR - case EINTR: return "Interrupted function"; + case EINTR: return "Interrupted system call"; #endif #ifdef EINVAL case EINVAL: return "Invalid argument"; #endif #ifdef EIO - case EIO: return "I/O error"; + case EIO: return "Input/output error"; #endif #ifdef EISCONN - case EISCONN: return "Socket is connected"; + case EISCONN: return "Transport endpoint is already connected"; #endif #ifdef EISDIR case EISDIR: return "Is a directory"; @@ -663,7 +660,7 @@ Tcl_ErrnoMsg( case EL3RST: return "Level 3 reset"; #endif #ifdef ELIBACC - case ELIBACC: return "Cannot access a needed shared library"; + case ELIBACC: return "Can not access a needed shared library"; #endif #ifdef ELIBBAD case ELIBBAD: return "Accessing a corrupted shared library"; @@ -673,7 +670,7 @@ Tcl_ErrnoMsg( #endif #if defined(ELIBMAX) && (!defined(ECANCELED) || (ELIBMAX != ECANCELED)) case ELIBMAX: return - "Attempting to link in more shared libraries than system limit"; + "Attempting to link in too many shared libraries"; #endif #ifdef ELIBSCN case ELIBSCN: return ".lib section in a.out corrupted"; @@ -685,22 +682,22 @@ Tcl_ErrnoMsg( case ELOOP: return "Too many levels of symbolic links"; #endif #ifdef EMFILE - case EMFILE: return "File descriptor value too large"; + case EMFILE: return "Too many open files"; #endif #ifdef EMLINK case EMLINK: return "Too many links"; #endif #ifdef EMSGSIZE - case EMSGSIZE: return "Message too large"; + case EMSGSIZE: return "Message too long"; #endif #ifdef EMULTIHOP case EMULTIHOP: return "Multihop attempted"; #endif #ifdef ENAMETOOLONG - case ENAMETOOLONG: return "Filename too long"; + case ENAMETOOLONG: return "File name too long"; #endif #ifdef ENAVAIL - case ENAVAIL: return "Not available"; + case ENAVAIL: return "No XENIX semaphores available"; #endif #ifdef ENET case ENET: return "ENET"; @@ -715,10 +712,10 @@ Tcl_ErrnoMsg( case ENETUNREACH: return "Network is unreachable"; #endif #ifdef ENFILE - case ENFILE: return "Too many files open in system"; + case ENFILE: return "Too many open files in system"; #endif #ifdef ENOANO - case ENOANO: return "Anode table overflow"; + case ENOANO: return "No anode"; #endif #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) case ENOBUFS: return "No buffer space available"; @@ -736,7 +733,7 @@ Tcl_ErrnoMsg( case ENOENT: return "No such file or directory"; #endif #ifdef ENOEXEC - case ENOEXEC: return "Executable format error"; + case ENOEXEC: return "Exec format error"; #endif #ifdef ENOLCK case ENOLCK: return "No locks available"; @@ -745,7 +742,7 @@ Tcl_ErrnoMsg( case ENOLINK: return "Link has been severed"; #endif #ifdef ENOMEM - case ENOMEM: return "Not enough space"; + case ENOMEM: return "Cannot allocate memory"; #endif #ifdef ENOMSG case ENOMSG: return "No message of desired type"; @@ -763,16 +760,16 @@ Tcl_ErrnoMsg( case ENOSPC: return "No space left on device"; #endif #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) - case ENOSR: return "No stream resources"; + case ENOSR: return "Out of streams resources"; #endif #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) - case ENOSTR: return "Not a stream"; + case ENOSTR: return "Device not a stream"; #endif #ifdef ENOSYM case ENOSYM: return "Unresolved symbol name"; #endif #ifdef ENOSYS - case ENOSYS: return "Functionality not supported"; + case ENOSYS: return "Function not implemented"; #endif #ifdef ENOTBLK case ENOTBLK: return "Block device required"; @@ -784,22 +781,22 @@ Tcl_ErrnoMsg( case ENOTRECOVERABLE: return "State not recoverable"; #endif #ifdef ENOTDIR - case ENOTDIR: return "Not a directory or a symbolic link to a directory"; + case ENOTDIR: return "Not a directory"; #endif #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) case ENOTEMPTY: return "Directory not empty"; #endif #ifdef ENOTNAM - case ENOTNAM: return "Not a name file"; + case ENOTNAM: return "Not a XENIX named type file"; #endif #ifdef ENOTSOCK - case ENOTSOCK: return "Not a socket"; + case ENOTSOCK: return "Socket operation on non-socket"; #endif #ifdef ENOTSUP - case ENOTSUP: return "Not supported"; + case ENOTSUP: return "Operation not supported"; #endif #ifdef ENOTTY - case ENOTTY: return "Inappropriate I/O control operation"; + case ENOTTY: return "Inappropriate ioctl for device"; #endif #ifdef ENOTUNIQ case ENOTUNIQ: return "Name not unique on network"; @@ -814,10 +811,10 @@ Tcl_ErrnoMsg( case EOTHER: return "Other error"; #endif #if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) - case EOVERFLOW: return "Value too large to be stored in data type"; + case EOVERFLOW: return "Value too large for defined data type"; #endif #ifdef EOWNERDEAD - case EOWNERDEAD: return "Previous owner died"; + case EOWNERDEAD: return "Owner died"; #endif #ifdef EPERM case EPERM: return "Operation not permitted"; @@ -850,7 +847,7 @@ Tcl_ErrnoMsg( case EPROTOTYPE: return "Protocol wrong type for socket"; #endif #ifdef ERANGE - case ERANGE: return "Result too large"; + case ERANGE: return "Numerical result out of range"; #endif #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) case EREFUSED: return "EREFUSED"; @@ -862,10 +859,10 @@ Tcl_ErrnoMsg( case EREMDEV: return "Remote device"; #endif #ifdef EREMOTE - case EREMOTE: return "Pathname hit remote file system"; + case EREMOTE: return "Object is remote"; #endif #ifdef EREMOTEIO - case EREMOTEIO: return "Remote i/o error"; + case EREMOTEIO: return "Remote I/O error"; #endif #ifdef EREMOTERELEASE case EREMOTERELEASE: return "EREMOTERELEASE"; @@ -880,13 +877,13 @@ Tcl_ErrnoMsg( case ERREMOTE: return "Object is remote"; #endif #ifdef ESHUTDOWN - case ESHUTDOWN: return "Cannot send after socket shutdown"; + case ESHUTDOWN: return "Cannot send after transport endpoint shutdown"; #endif #ifdef ESOCKTNOSUPPORT case ESOCKTNOSUPPORT: return "Socket type not supported"; #endif #ifdef ESPIPE - case ESPIPE: return "Invalid seek"; + case ESPIPE: return "Illegal seek"; #endif #ifdef ESRCH case ESRCH: return "No such process"; @@ -895,10 +892,10 @@ Tcl_ErrnoMsg( case ESRMNT: return "Srmount error"; #endif #ifdef ESTALE - case ESTALE: return "Stale remote file handle"; + case ESTALE: return "Stale file handle"; #endif #ifdef ESUCCESS - case ESUCCESS: return "Error 0"; + case ESUCCESS: return "Success"; #endif #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) case ETIME: return "Timer expired"; @@ -928,10 +925,10 @@ Tcl_ErrnoMsg( case EWOULDBLOCK: return "Operation would block"; #endif #ifdef EXDEV - case EXDEV: return "Cross-domain link"; + case EXDEV: return "Invalid cross-device link"; #endif #ifdef EXFULL - case EXFULL: return "Message tables full"; + case EXFULL: return "Exchange full"; #endif default: #ifdef NO_STRERROR @@ -940,7 +937,6 @@ Tcl_ErrnoMsg( return strerror(err); #endif } -#endif } /* -- cgit v0.12 From 7a84646588637ce4d7a9a4d611a9635b18338397 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Sun, 26 Mar 2023 19:14:36 +0000 Subject: Fix memory leak in Tcl_JoinObjCmd(). --- generic/tclCmdIL.c | 1 + 1 file changed, 1 insertion(+) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e1949a5..92014bd 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -2272,6 +2272,7 @@ Tcl_JoinObjCmd( return TCL_ERROR; } Tcl_AppendObjToObj(resObjPtr, valueObj); + Tcl_DecrRefCount(valueObj); } } else { for (i = 0; i < listLen; i++) { -- cgit v0.12 -- cgit v0.12 From 38a87927cf6adb2f3db0ee2a9ac195e4dd7853d4 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Sun, 26 Mar 2023 22:18:05 +0000 Subject: Update reference-counting advice for Tcl_ObjSetVar2 and friends. --- doc/SetVar.3 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/SetVar.3 b/doc/SetVar.3 index eb8333b..d061a2b 100644 --- a/doc/SetVar.3 +++ b/doc/SetVar.3 @@ -250,18 +250,18 @@ and \fBTcl_ObjGetVar2\fR is (if non-NULL) a value with a reference of at least operated upon. .PP The \fInewValuePtr\fR argument to \fBTcl_SetVar2Ex\fR and \fBTcl_ObjSetVar2\fR -may be an arbitrary reference count value; its reference count will be -incremented on success. However, it is recommended to not use a zero reference -count value, as that makes correct handling of the error case tricky. +may be an arbitrary reference count value. Its reference count is +incremented on success. On failure, if is reference count is zero, it is +decremented and freed so the caller need do nothing with it. .PP -The \fIpart1\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR can -have any reference count; these functions never modify it. It is recommended -to not use a zero reference count for this argument. +The \fIpart1Ptr\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR can +have any reference count. These functions never modify it. .PP -The \fIpart2\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR, if +The \fIpart2Ptr\fR argument to \fBTcl_ObjSetVar2\fR and \fBTcl_ObjGetVar2\fR, if non-NULL, should not have a zero reference count as these functions may -retain a reference to it (particularly when it is used to create an array -element that did not previously exist). +retain a reference to it, particularly when it is used to create an array +element that did not previously exist, and decrementing the reference count +later would leave them pointing to a freed Tcl_Obj. .SH "SEE ALSO" Tcl_GetObjResult, Tcl_GetStringResult, Tcl_TraceVar -- cgit v0.12 From 49b6ecfb4e17876dec5c9f9edad8d5e0a44cb52c Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Sun, 26 Mar 2023 22:29:05 +0000 Subject: Fix some formatting errors. --- doc/encoding.n | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/encoding.n b/doc/encoding.n index 8ede974..e02f316 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -96,7 +96,7 @@ Returns a list of the names of encoding profiles. See \fBPROFILES\fR below. Set the system encoding to \fIencoding\fR. If \fIencoding\fR is omitted then the command returns the current system encoding. The system encoding is used whenever Tcl passes strings to system calls. -\" Do not put .VS on whole section as that messes up the bullet list alignment +.\" Do not put .VS on whole section as that messes up the bullet list alignment .SH PROFILES .PP .VS "TCL8.7 TIP656" @@ -172,7 +172,7 @@ These examples use the utility proc below that prints the Unicode code points comprising a Tcl string. .PP .CS -proc codepoints {s} {join [lmap c [split $s ""] { +proc codepoints s {join [lmap c [split $s {}] { string cat U+ [format %.6X [scan $c %c]]}] } .CE @@ -193,8 +193,8 @@ Example 2: Error handling based on profiles: .PP The letter \fBA\fR is Unicode character U+0041 and the byte "\ex80" is invalid in ASCII encoding. -.CS .PP +.CS % codepoints [encoding convertfrom -profile tcl8 ascii A\ex80] U+000041 U+000080 % codepoints [encoding convertfrom -profile replace ascii A\ex80] -- cgit v0.12 From b026d900d38ca938fb38219c0ffb117df05dafe6 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 11:13:17 +0000 Subject: Avoid msvc "illegal indirection" error. --- generic/tclPathObj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 2d73379..b6275d4 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2207,7 +2207,7 @@ SetFsPathFromAny( fsPathPtr = (FsPath *)Tcl_Alloc(sizeof(FsPath)); if (transPtr == pathPtr) { - Tcl_GetStringFromObj(pathPtr, NULL); + (void) Tcl_GetStringFromObj(pathPtr, NULL); TclFreeInternalRep(pathPtr); transPtr = Tcl_DuplicateObj(pathPtr); fsPathPtr->filesystemEpoch = 0; -- cgit v0.12 From 587c1ebdba4cb0f92dcd91478ce711833552fd48 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 11:14:50 +0000 Subject: Avoid msvc "illegal indirection" error. --- generic/tclPathObj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index aefc84f..64b79ed 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2350,7 +2350,7 @@ SetFsPathFromAny( fsPathPtr = (FsPath *)ckalloc(sizeof(FsPath)); if (transPtr == pathPtr) { - Tcl_GetStringFromObj(pathPtr, NULL); + (void) Tcl_GetStringFromObj(pathPtr, NULL); TclFreeInternalRep(pathPtr); transPtr = Tcl_DuplicateObj(pathPtr); fsPathPtr->filesystemEpoch = 0; -- cgit v0.12 From 2524a62bb6b65a0b183dc413dd13ebbae997a537 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Mon, 27 Mar 2023 11:35:58 +0000 Subject: More (internal) usage of TclGetString() and TclGetStringFromObj() macro's --- generic/tclClock.c | 2 +- generic/tclCmdAH.c | 6 +++--- generic/tclCmdMZ.c | 4 ++-- generic/tclCompCmds.c | 6 +++--- generic/tclCompExpr.c | 2 +- generic/tclDate.c | 2 +- generic/tclDictObj.c | 4 ++-- generic/tclDisassemble.c | 2 +- generic/tclEncoding.c | 2 +- generic/tclEvent.c | 2 +- generic/tclExecute.c | 2 +- generic/tclFCmd.c | 2 +- generic/tclFileName.c | 6 +++--- generic/tclGetDate.y | 2 +- generic/tclIOCmd.c | 2 +- generic/tclIOUtil.c | 2 +- generic/tclInterp.c | 2 +- generic/tclOOBasic.c | 6 +++--- generic/tclOOMethod.c | 6 +++--- generic/tclPathObj.c | 4 ++-- generic/tclProc.c | 2 +- generic/tclStringObj.c | 14 +++++++------- generic/tclZipfs.c | 18 +++++++++--------- 23 files changed, 50 insertions(+), 50 deletions(-) diff --git a/generic/tclClock.c b/generic/tclClock.c index d1f08c1..dd3e1c9 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1918,7 +1918,7 @@ ClockParseformatargsObjCmd( if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &optionIndex) != TCL_OK) { Tcl_SetErrorCode(interp, "CLOCK", "badOption", - Tcl_GetString(objv[i]), NULL); + TclGetString(objv[i]), NULL); return TCL_ERROR; } switch (optionIndex) { diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 5c27bbc..2f50959 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -608,7 +608,7 @@ numArgsError: /* ONLY jump here if nothing needs to be freed!!! */ switch (optIndex) { case PROFILE: if (TclEncodingProfileNameToId(interp, - Tcl_GetString(objv[argIndex]), + TclGetString(objv[argIndex]), &profile) != TCL_OK) { return TCL_ERROR; } @@ -2054,7 +2054,7 @@ PathFilesystemCmd( if (fsInfo == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("unrecognised path", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", - Tcl_GetString(objv[1]), NULL); + TclGetString(objv[1]), NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, fsInfo); @@ -2306,7 +2306,7 @@ FilesystemSeparatorCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "unrecognised path", -1)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", - Tcl_GetString(objv[1]), NULL); + TclGetString(objv[1]), NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, separatorObj); diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 817416a..4a802c9 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -4793,7 +4793,7 @@ TclNRTryObjCmd( if (TclListObjLengthM(NULL, objv[i+1], &dummy) != TCL_OK) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad prefix '%s': must be a list", - Tcl_GetString(objv[i+1]))); + TclGetString(objv[i+1]))); Tcl_DecrRefCount(handlersObj); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRY", "TRAP", "EXNFORMAT", NULL); @@ -5333,7 +5333,7 @@ TclListLines( Tcl_Obj *const *elems) /* The list elems as Tcl_Obj*, in need of * derived continuation data */ { - const char *listStr = Tcl_GetString(listObj); + const char *listStr = TclGetString(listObj); const char *listHead = listStr; int i, length = strlen(listStr); const char *element = NULL, *next = NULL; diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index e5b20a9..dacb72a 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -3187,7 +3187,7 @@ TclCompileFormatCmd( * the format is broken). Do the format now. */ - tmpObj = Tcl_Format(interp, Tcl_GetString(formatObj), + tmpObj = Tcl_Format(interp, TclGetString(formatObj), parsePtr->numWords-2, objv); for (; --i>=0 ;) { Tcl_DecrRefCount(objv[i]); @@ -3231,7 +3231,7 @@ TclCompileFormatCmd( * Now scan through and check for non-%s and non-%% substitutions. */ - for (bytes = Tcl_GetString(formatObj) ; *bytes ; bytes++) { + for (bytes = TclGetString(formatObj) ; *bytes ; bytes++) { if (*bytes == '%') { bytes++; if (*bytes == 's') { @@ -3264,7 +3264,7 @@ TclCompileFormatCmd( i = 0; /* The count of things to concat. */ j = 2; /* The index into the argument tokens, for * TIP#280 handling. */ - start = Tcl_GetString(formatObj); + start = TclGetString(formatObj); /* The start of the currently-scanned literal * in the format string. */ TclNewObj(tmpObj); /* The buffer used to accumulate the literal diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index ded32aa..8808024 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -2565,7 +2565,7 @@ CompileExprTree( Tcl_Obj *tableValue; int numBytes; const char *bytes - = Tcl_GetStringFromObj(objPtr, &numBytes); + = TclGetStringFromObj(objPtr, &numBytes); idx = TclRegisterLiteral(envPtr, bytes, numBytes, 0); tableValue = TclFetchLiteral(envPtr, idx); diff --git a/generic/tclDate.c b/generic/tclDate.c index edf069a..97675fb 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2760,7 +2760,7 @@ TclClockOldscanObjCmd( return TCL_ERROR; } - yyInput = Tcl_GetString( objv[1] ); + yyInput = TclGetString( objv[1] ); dateInfo.dateStart = yyInput; yyHaveDate = 0; diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c index 55664ce..ab66186 100644 --- a/generic/tclDictObj.c +++ b/generic/tclDictObj.c @@ -635,7 +635,7 @@ SetDictFromAny( * convert back. */ - (void) Tcl_GetString(objPtr); + (void) TclGetString(objPtr); TclDecrRefCount(discardedValue); } @@ -3308,7 +3308,7 @@ DictUpdateCmd( } if (objPtr == NULL) { /* ??? */ - Tcl_UnsetVar2(interp, Tcl_GetString(objv[i+1]), NULL, 0); + Tcl_UnsetVar2(interp, TclGetString(objv[i+1]), NULL, 0); } else if (Tcl_ObjSetVar2(interp, objv[i+1], NULL, objPtr, TCL_LEAVE_ERR_MSG) == NULL) { TclDecrRefCount(dictPtr); diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c index 0bc3de1..10404e9 100644 --- a/generic/tclDisassemble.c +++ b/generic/tclDisassemble.c @@ -286,7 +286,7 @@ DisassembleByteCodeObj( GetLocationInformation(codePtr->procPtr, &fileObj, &line); if (line >= 0 && fileObj != NULL) { Tcl_AppendPrintfToObj(bufferObj, "\n File \"%s\" Line %d", - Tcl_GetString(fileObj), line); + TclGetString(fileObj), line); } Tcl_AppendPrintfToObj(bufferObj, "\n Cmds %d, src %d, inst %d, litObjs %u, aux %d, stkDepth %u, code/src %.2f\n", diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index b472db3..fc2835d 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -4423,7 +4423,7 @@ InitializeEncodingSearchPath( if (*encodingPtr) { ((Encoding *)(*encodingPtr))->refCount++; } - bytes = Tcl_GetStringFromObj(searchPathObj, &numBytes); + bytes = TclGetStringFromObj(searchPathObj, &numBytes); *lengthPtr = numBytes; *valuePtr = (char *)ckalloc(numBytes + 1); diff --git a/generic/tclEvent.c b/generic/tclEvent.c index 8729add..e28128f 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1522,7 +1522,7 @@ Tcl_VwaitObjCmd( OPT_TIMEOUT, OPT_VARIABLE, OPT_WRITABLE, OPT_LAST } index; - if ((objc == 2) && (strcmp(Tcl_GetString(objv[1]), "--") != 0)) { + if ((objc == 2) && (strcmp(TclGetString(objv[1]), "--") != 0)) { /* * Legacy "vwait" syntax, skip option handling. */ diff --git a/generic/tclExecute.c b/generic/tclExecute.c index e8aca32..4c6c088 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -3788,7 +3788,7 @@ TEBCresume( arrayPtr = NULL; part1Ptr = part2Ptr = NULL; cleanup = 0; - TRACE(("%u %s => ", opnd, Tcl_GetString(incrPtr))); + TRACE(("%u %s => ", opnd, TclGetString(incrPtr))); doIncrVar: if (TclIsVarDirectModifyable2(varPtr, arrayPtr)) { diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index ea8f715..bfc3f43 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -1679,7 +1679,7 @@ TclFileHomeCmd( Tcl_WrongNumArgs(interp, 1, objv, "?user?"); return TCL_ERROR; } - homeDirObj = TclGetHomeDirObj(interp, objc == 1 ? NULL : Tcl_GetString(objv[1])); + homeDirObj = TclGetHomeDirObj(interp, objc == 1 ? NULL : TclGetString(objv[1])); if (homeDirObj == NULL) { return TCL_ERROR; } diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 3ca1ab5..7b3b03f 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -502,11 +502,11 @@ TclpNativeSplitPath( switch (tclPlatform) { case TCL_PLATFORM_UNIX: - resultPtr = SplitUnixPath(Tcl_GetString(pathPtr)); + resultPtr = SplitUnixPath(TclGetString(pathPtr)); break; case TCL_PLATFORM_WINDOWS: - resultPtr = SplitWinPath(Tcl_GetString(pathPtr)); + resultPtr = SplitWinPath(TclGetString(pathPtr)); break; } @@ -919,7 +919,7 @@ TclpNativeJoinPath( */ Tcl_SetObjLength(prefix, length + (int) strlen(p)); - dest = Tcl_GetString(prefix) + length; + dest = TclGetString(prefix) + length; for (; *p != '\0'; p++) { if ((*p == '/') || (*p == '\\')) { while ((p[1] == '/') || (p[1] == '\\')) { diff --git a/generic/tclGetDate.y b/generic/tclGetDate.y index e85184b..08c0193 100644 --- a/generic/tclGetDate.y +++ b/generic/tclGetDate.y @@ -976,7 +976,7 @@ TclClockOldscanObjCmd( return TCL_ERROR; } - yyInput = Tcl_GetString( objv[1] ); + yyInput = TclGetString( objv[1] ); dateInfo.dateStart = yyInput; yyHaveDate = 0; diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index e8a534f..40f0090 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -1485,7 +1485,7 @@ Tcl_SocketObjCmd( TclInitSockets(); for (a = 1; a < objc; a++) { - const char *arg = Tcl_GetString(objv[a]); + const char *arg = TclGetString(objv[a]); if (arg[0] != '-') { break; diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index d1589c1..9a3ddfb 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1338,7 +1338,7 @@ TclFSNormalizeToUniquePath( * We check these first to avoid useless calls to the native filesystem's * normalizePathProc. */ - path = Tcl_GetStringFromObj(pathPtr, &i); + path = TclGetStringFromObj(pathPtr, &i); if ( (i >= 3) && ( (path[0] == '/' && path[1] == '/') || (path[0] == '\\' && path[1] == '\\') ) ) { diff --git a/generic/tclInterp.c b/generic/tclInterp.c index 70cf8fa..e743931 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -1111,7 +1111,7 @@ NRInterpCmd( if (hPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "alias \"%s\" in path \"%s\" not found", - aliasName, Tcl_GetString(objv[2]))); + aliasName, TclGetString(objv[2]))); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "ALIAS", aliasName, NULL); return TCL_ERROR; diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index 3593193..9b72060 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -208,7 +208,7 @@ TclOO_Class_Create( "objectName ?arg ...?"); return TCL_ERROR; } - objName = Tcl_GetStringFromObj( + objName = TclGetStringFromObj( objv[Tcl_ObjectContextSkippedArgs(context)], &len); if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -273,7 +273,7 @@ TclOO_Class_CreateNs( "objectName namespaceName ?arg ...?"); return TCL_ERROR; } - objName = Tcl_GetStringFromObj( + objName = TclGetStringFromObj( objv[Tcl_ObjectContextSkippedArgs(context)], &len); if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -281,7 +281,7 @@ TclOO_Class_CreateNs( Tcl_SetErrorCode(interp, "TCL", "OO", "EMPTY_NAME", NULL); return TCL_ERROR; } - nsName = Tcl_GetStringFromObj( + nsName = TclGetStringFromObj( objv[Tcl_ObjectContextSkippedArgs(context)+1], &len); if (len == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj( diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index 73368e4..a613fb4 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -1286,7 +1286,7 @@ MethodErrorHandler( kindName = "class"; } - objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr), &objectNameLen); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" method \"%.*s%s\" line %d)", @@ -1317,7 +1317,7 @@ ConstructorErrorHandler( kindName = "class"; } - objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr), &objectNameLen); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" constructor line %d)", kindName, @@ -1347,7 +1347,7 @@ DestructorErrorHandler( kindName = "class"; } - objectName = Tcl_GetStringFromObj(TclOOObjectName(interp, declarerPtr), + objectName = TclGetStringFromObj(TclOOObjectName(interp, declarerPtr), &objectNameLen); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (%s \"%.*s%s\" destructor line %d)", kindName, diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 64b79ed..e67ae64 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -2350,7 +2350,7 @@ SetFsPathFromAny( fsPathPtr = (FsPath *)ckalloc(sizeof(FsPath)); if (transPtr == pathPtr) { - (void) Tcl_GetStringFromObj(pathPtr, NULL); + (void)TclGetString(pathPtr); TclFreeInternalRep(pathPtr); transPtr = Tcl_DuplicateObj(pathPtr); fsPathPtr->filesystemEpoch = 0; @@ -2691,7 +2691,7 @@ TclResolveTildePath( int split; Tcl_DString resolvedPath; - path = Tcl_GetStringFromObj(pathObj, &len); + path = TclGetStringFromObj(pathObj, &len); if (path[0] != '~') { return pathObj; } diff --git a/generic/tclProc.c b/generic/tclProc.c index 3ada9ea..d02cac2 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -538,7 +538,7 @@ TclCreateProc( goto procError; } - argname = Tcl_GetStringFromObj(fieldValues[0], &nameLength); + argname = TclGetStringFromObj(fieldValues[0], &nameLength); /* * Check that the formal parameter name is a scalar. diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 708c157..e1f5160 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -3368,7 +3368,7 @@ TclStringRepeat( TclGetUnicodeFromObj_(objPtr, &length); } else { /* Result will be concat of string reps. Pre-size it. */ - Tcl_GetStringFromObj(objPtr, &length); + TclGetStringFromObj(objPtr, &length); } if (length == 0) { @@ -3618,7 +3618,7 @@ TclStringCat( /* No string rep; Take the chance we can avoid making it */ pendingPtr = objPtr; } else { - Tcl_GetStringFromObj(objPtr, &length); /* PANIC? */ + TclGetStringFromObj(objPtr, &length); /* PANIC? */ } } while (--oc && (length == 0) && (pendingPtr == NULL)); @@ -3644,14 +3644,14 @@ TclStringCat( do { Tcl_Obj *objPtr = *ov++; - Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */ + TclGetStringFromObj(objPtr, &numBytes); /* PANIC? */ } while (--oc && numBytes == 0 && pendingPtr->bytes == NULL); if (numBytes) { last = objc -oc -1; } if (oc || numBytes) { - Tcl_GetStringFromObj(pendingPtr, &length); + TclGetStringFromObj(pendingPtr, &length); } if (length == 0) { if (numBytes) { @@ -3670,7 +3670,7 @@ TclStringCat( /* assert ( length > 0 && pendingPtr == NULL ) */ - Tcl_GetStringFromObj(objPtr, &numBytes); /* PANIC? */ + TclGetStringFromObj(objPtr, &numBytes); /* PANIC? */ if (numBytes) { last = objc - oc; if (numBytes > INT_MAX - length) { @@ -3785,7 +3785,7 @@ TclStringCat( objResultPtr = *objv++; objc--; - Tcl_GetStringFromObj(objResultPtr, &start); + TclGetStringFromObj(objResultPtr, &start); if (0 == Tcl_AttemptSetObjLength(objResultPtr, length)) { if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( @@ -3818,7 +3818,7 @@ TclStringCat( if ((objPtr->bytes == NULL) || (objPtr->length)) { int more; - char *src = Tcl_GetStringFromObj(objPtr, &more); + char *src = TclGetStringFromObj(objPtr, &more); memcpy(dst, src, more); dst += more; diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 1b602ea..d834847 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -2415,7 +2415,7 @@ ZipFSMkKeyObjCmd( Tcl_WrongNumArgs(interp, 1, objv, "password"); return TCL_ERROR; } - pw = Tcl_GetStringFromObj(objv[1], &len); + pw = TclGetStringFromObj(objv[1], &len); if (len == 0) { return TCL_OK; } @@ -2942,7 +2942,7 @@ ComputeNameInArchive( if (directNameObj) { name = Tcl_GetString(directNameObj); } else { - name = Tcl_GetStringFromObj(pathObj, &len); + name = TclGetStringFromObj(pathObj, &len); if (slen > 0) { if ((len <= slen) || (strncmp(strip, name, slen) != 0)) { /* @@ -3028,7 +3028,7 @@ ZipFSMkZipOrImg( passBuf[0] = 0; if (passwordObj != NULL) { - pw = Tcl_GetStringFromObj(passwordObj, &pwlen); + pw = TclGetStringFromObj(passwordObj, &pwlen); if (IsPasswordValid(interp, pw, pwlen) != TCL_OK) { return TCL_ERROR; } @@ -3188,7 +3188,7 @@ ZipFSMkZipOrImg( Tcl_InitHashTable(&fileHash, TCL_STRING_KEYS); if (mappingList == NULL && stripPrefix != NULL) { - strip = Tcl_GetStringFromObj(stripPrefix, &slen); + strip = TclGetStringFromObj(stripPrefix, &slen); if (!slen) { strip = NULL; } @@ -5045,13 +5045,13 @@ ZipFSMatchInDirectoryProc( * The prefix that gets prepended to results. */ - prefix = Tcl_GetStringFromObj(pathPtr, &prefixLen); + prefix = TclGetStringFromObj(pathPtr, &prefixLen); /* * The (normalized) path we're searching. */ - path = Tcl_GetStringFromObj(normPathPtr, &len); + path = TclGetStringFromObj(normPathPtr, &len); Tcl_DStringInit(&dsPref); if (strcmp(prefix, path) == 0) { @@ -5166,7 +5166,7 @@ ZipFSMatchMountPoints( Tcl_HashEntry *hPtr; Tcl_HashSearch search; int l, normLength; - const char *path = Tcl_GetStringFromObj(normPathPtr, &normLength); + const char *path = TclGetStringFromObj(normPathPtr, &normLength); size_t len = (size_t) normLength; if (len < 1) { @@ -5253,7 +5253,7 @@ ZipFSPathInFilesystemProc( if (!pathPtr) { return -1; } - path = Tcl_GetStringFromObj(pathPtr, &len); + path = TclGetStringFromObj(pathPtr, &len); if (strncmp(path, ZIPFS_VOLUME, ZIPFS_VOLUME_LEN) != 0) { return -1; } @@ -5401,7 +5401,7 @@ ZipFSFileAttrsGetProc( if (!pathPtr) { return -1; } - path = Tcl_GetStringFromObj(pathPtr, &len); + path = TclGetStringFromObj(pathPtr, &len); ReadLock(); z = ZipFSLookup(path); if (!z) { -- cgit v0.12 From 3faf228237dd3d33b2f726b1145f8f70f1327180 Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 12:14:03 +0000 Subject: Make the documentation of [encoding] more concise and readable. --- doc/encoding.n | 183 ++++++++++++++++++++++++--------------------------------- 1 file changed, 78 insertions(+), 105 deletions(-) diff --git a/doc/encoding.n b/doc/encoding.n index e02f316..c881d26 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -8,78 +8,81 @@ .so man.macros .BS .SH NAME -encoding \- Manipulate encodings +encoding \- Work with encodings .SH SYNOPSIS -\fBencoding \fIoption\fR ?\fIarg arg ...\fR? +\fBencoding \fIoperation\fR ?\fIarg arg ...\fR? .BE .SH INTRODUCTION .PP -Strings in Tcl are logically a sequence of Unicode characters. -These strings are represented in memory as a sequence of bytes that -may be in one of several encodings: modified UTF\-8 (which uses 1 to 4 -bytes per character), or a custom encoding start as 8 bit binary data. -.PP -Different operating system interfaces or applications may generate -strings in other encodings such as Shift\-JIS. The \fBencoding\fR -command helps to bridge the gap between Unicode and these other -formats. +In Tcl every string is composed of Unicode values. Text may be encoded into an +encoding such as cp1252, iso8859-1, Shitf\-JIS, utf-8, utf-16, etc. Not every +Unicode vealue is encodable in every encoding, and some encodings can encode +values that are not available in Unicode. +.PP +Even though Unicode is for encoding the written texts of human languages, any +sequence of bytes can be encoded as the first 255 Unicode values. iso8859-1 an +encoding for a subset of Unicode in which each byte is a Unicode value of 255 +or less. Thus, any sequence of bytes can be considered to be a Unicode string +encoded in iso8859-1. To work with binary data in Tcl, decode it from +iso8859-1 when reading it in, and encode it into iso8859-1 when writing it out, +ensuring that each character in the string has a value of 255 or less. +Decoding such a string does nothing, and encoding encoding such a string also +does nothing. +.PP +For example, the following is true: +.CS +set text {In Tcl binary data is treated as Unicode text and it just works.} +set encoded [encoding convertto iso8859-1 $text] +expr {$text eq $encoded}; #-> 1 +.CE +The following is also true: +.CS +set decoded [encoding convertfrom iso8859-1 $text] +expr {$text eq $decoded}; #-> 1 +.CE .SH DESCRIPTION .PP -Performs one of several encoding related operations, depending on -\fIoption\fR. The legal \fIoption\fRs are: +Performs one of the following encoding \fIoperations\fR: .TP \fBencoding convertfrom\fR ?\fIencoding\fR? \fIdata\fR .TP \fBencoding convertfrom\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding\fR \fIdata\fR . -Converts \fIdata\fR, which should be in binary string encoded as per -\fIencoding\fR, to a Tcl string. If \fIencoding\fR is not specified, the current -system encoding is used. +Decodes \fIdata\fR encoded in \fIencoding\fR. If \fIencoding\fR is not +specified the current system encoding is used. .VS "TCL8.7 TIP607, TIP656" -The \fB-profile\fR option determines the command behavior in the presence -of conversion errors. See the \fBPROFILES\fR section below for details. Any premature -termination of processing due to errors is reported through an exception if -the \fB-failindex\fR option is not specified. - -If the \fB-failindex\fR is specified, instead of an exception being raised -on premature termination, the result of the conversion up to the point of the -error is returned as the result of the command. In addition, the index -of the source byte triggering the error is stored in \fBvar\fR. If no -errors are encountered, the entire result of the conversion is returned and -the value \fB-1\fR is stored in \fBvar\fR. +\fB-profile\fR determines how invalid data for the encoding are handled. See +the \fBPROFILES\fR section below for details. Returns an error if decoding +fails. However, if \fB-failindex\fR given, returns the result of the +conversion up to the point of termination, and stores in \fBvar\fR the index of +the character that could not be converted. If no errors are encountered the +entire result of the conversion is returned and the value \fB-1\fR is stored in +\fBvar\fR. .VE "TCL8.7 TIP607, TIP656" .TP \fBencoding convertto\fR ?\fIencoding\fR? \fIdata\fR .TP \fBencoding convertto\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding\fR \fIdata\fR . -Convert \fIstring\fR to the specified \fIencoding\fR. The result is a Tcl binary -string that contains the sequence of bytes representing the converted string in -the specified encoding. If \fIencoding\fR is not specified, the current system -encoding is used. +Converts \fIstring\fR to \fIencoding\fR. If \fIencoding\fR is not given, the +current system encoding is used. .VS "TCL8.7 TIP607, TIP656" -The \fB-profile\fR and \fB-failindex\fR options have the same effect as -described for the \fBencoding convertfrom\fR command. +See \fBencoding convertfrom\fR for the meaning of \fB-profile\fR and \fB-failindex\fR. .VE "TCL8.7 TIP607, TIP656" .TP \fBencoding dirs\fR ?\fIdirectoryList\fR? . -Tcl can load encoding data files from the file system that describe -additional encodings for it to work with. This command sets the search -path for \fB*.enc\fR encoding data files to the list of directories -\fIdirectoryList\fR. If \fIdirectoryList\fR is omitted then the -command returns the current list of directories that make up the -search path. It is an error for \fIdirectoryList\fR to not be a valid -list. If, when a search for an encoding data file is happening, an -element in \fIdirectoryList\fR does not refer to a readable, -searchable directory, that element is ignored. +Sets the search path for \fB*.enc\fR encoding data files to the list of +directories given by \fIdirectoryList\fR. If \fIdirectoryList\fR is not given, +returns the current list of directories that make up the search path. It is +not an error for an item in \fIdirectoryList\fR to not refer to a readable, +searchable directory. .TP \fBencoding names\fR . -Returns a list containing the names of all of the encodings that are -currently available. +Returns a list of the names of available encodings. The encodings .QW utf-8 and @@ -88,88 +91,58 @@ are guaranteed to be present in the list. .VS "TCL8.7 TIP656" .TP \fBencoding profiles\fR -Returns a list of the names of encoding profiles. See \fBPROFILES\fR below. +Returns a list of names of available encoding profiles. See \fBPROFILES\fR +below. .VE "TCL8.7 TIP656" .TP \fBencoding system\fR ?\fIencoding\fR? . -Set the system encoding to \fIencoding\fR. If \fIencoding\fR is -omitted then the command returns the current system encoding. The -system encoding is used whenever Tcl passes strings to system calls. +Sets the system encoding to \fIencoding\fR. If \fIencoding\fR is not given, +returns the current system encoding. The system encoding is used to pass +strings to system calls. .\" Do not put .VS on whole section as that messes up the bullet list alignment .SH PROFILES .PP .VS "TCL8.7 TIP656" -Operations involving encoding transforms may encounter several types of -errors such as invalid sequences in the source data, characters that -cannot be encoded in the target encoding and so on. -A \fIprofile\fR prescribes the strategy for dealing with such errors -in one of two ways: -.VE "TCL8.7 TIP656" -. -.IP \(bu -.VS "TCL8.7 TIP656" -Terminating further processing of the source data. The profile does not -determine how this premature termination is conveyed to the caller. By default, -this is signalled by raising an exception. If the \fB-failindex\fR option -is specified, errors are reported through that mechanism. -.VE "TCL8.7 TIP656" -.IP \(bu -.VS "TCL8.7 TIP656" -Continue further processing of the source data using a fallback strategy such -as replacing or discarding the offending bytes in a profile-defined manner. -.VE "TCL8.7 TIP656" +Each \fIprofile\fR is a distinct strategy for dealing with invalid data for an +encoding. .PP -The following profiles are currently implemented with \fBtcl8\fR being -the default if the \fB-profile\fR is not specified. +The following profiles are currently implemented. .VS "TCL8.7 TIP656" .TP \fBtcl8\fR . -The \fBtcl8\fR profile always follows the first strategy above and corresponds -to the behavior of encoding transforms in Tcl 8.6. When converting from an -external encoding \fBother than utf-8\fR to Tcl strings with the \fBencoding -convertfrom\fR command, invalid bytes are mapped to their numerically equivalent -code points. For example, the byte 0x80 which is invalid in ASCII would be -mapped to code point U+0080. When converting from \fButf-8\fR, invalid bytes -that are defined in CP1252 are mapped to their Unicode equivalents while those -that are not fall back to the numerical equivalents. For example, byte 0x80 is -defined by CP1252 and is therefore mapped to its Unicode equivalent U+20AC while -byte 0x81 which is not defined by CP1252 is mapped to U+0081. As an additional -special case, the sequence 0xC0 0x80 is mapped to U+0000. +The default profile. Provides for behaviour identical to that of Tcl 8.6: When +decoding, for encodings \fBother than utf-8\fR, each invalid byte is interpreted +as the Unicode value given by that one byte. For example, the byte 0x80, which +is invalid in the ASCII encoding would be mapped to the Unicode value U+0080. +For \fButf-8\fR, each invalid byte that is a valid CP1252 character is +interpreted as the Unicode value for that character, while each byte that is +not is treated as the Unicode value given by that one byte. For example, byte +0x80 is defined by CP1252 and is therefore mapped to its Unicode equivalent +U+20AC while byte 0x81 which is not defined by CP1252 is mapped to U+0081. As +an additional special case, the sequence 0xC0 0x80 is mapped to U+0000. -When converting from Tcl strings to an external encoding format using -\fBencoding convertto\fR, characters that cannot be represented in the -target encoding are replaced by an encoding-dependent character, usually -the question mark \fB?\fR. +When encoding, each character that cannot be represented in the encoding is +replaced by an encoding-dependent character, usually the question mark \fB?\fR. .TP \fBstrict\fR . -The \fBstrict\fR profile always stops processing when an conversion error is -encountered. The error is signalled via an exception or the \fB-failindex\fR -option mechanism. The \fBstrict\fR profile implements a Unicode standard -conformant behavior. +The operation fails when invalid data for the encoding are encountered. .TP \fBreplace\fR . -Like the \fBtcl8\fR profile, the \fBreplace\fR profile always continues -processing on conversion errors but follows a Unicode standard conformant -method for substitution of invalid source data. - -When converting an encoded byte sequence to a Tcl string using -\fBencoding convertfrom\fR, invalid bytes -are replaced by the U+FFFD REPLACEMENT CHARACTER code point. +When decoding, invalid bytes are replaced by U+FFFD, the Unicode REPLACEMENT +CHARACTER. -When encoding a Tcl string with \fBencoding convertto\fR, -code points that cannot be represented in the -target encoding are transformed to an encoding-specific fallback character, -U+FFFD REPLACEMENT CHARACTER for UTF targets and generally `?` for other -encodings. +When encoding, Unicode values that cannot be represented in the target encoding +are transformed to an encoding-specific fallback character, U+FFFD REPLACEMENT +CHARACTER for UTF targets, and generally `?` for other encodings. .VE "TCL8.7 TIP656" .SH EXAMPLES .PP -These examples use the utility proc below that prints the Unicode code points -comprising a Tcl string. +These examples use the utility proc below that prints the Unicode value for +each character in a string. .PP .CS proc codepoints s {join [lmap c [split $s {}] { @@ -177,14 +150,14 @@ proc codepoints s {join [lmap c [split $s {}] { } .CE .PP -Example 1: convert a byte sequence in Japanese euc-jp encoding to a TCL string: +Example 1: Convert from euc-jp: .PP .CS -% codepoints [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"] +% codepoints [\fBencoding convertfrom\fR euc-jp \exA4\exCF] U+00306F .CE .PP -The result is the unicode codepoint +The result is the Unicode value .QW "\eu306F" , which is the Hiragana letter HA. .VS "TCL8.7 TIP607, TIP656" -- cgit v0.12 From 5ffb8a5035ed620a3213975d030d4088f515c44c Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 12:16:36 +0000 Subject: Make the documentation of [encoding] more concise and readable. --- doc/encoding.n | 183 ++++++++++++++++++++++++--------------------------------- 1 file changed, 78 insertions(+), 105 deletions(-) diff --git a/doc/encoding.n b/doc/encoding.n index e02f316..c881d26 100644 --- a/doc/encoding.n +++ b/doc/encoding.n @@ -8,78 +8,81 @@ .so man.macros .BS .SH NAME -encoding \- Manipulate encodings +encoding \- Work with encodings .SH SYNOPSIS -\fBencoding \fIoption\fR ?\fIarg arg ...\fR? +\fBencoding \fIoperation\fR ?\fIarg arg ...\fR? .BE .SH INTRODUCTION .PP -Strings in Tcl are logically a sequence of Unicode characters. -These strings are represented in memory as a sequence of bytes that -may be in one of several encodings: modified UTF\-8 (which uses 1 to 4 -bytes per character), or a custom encoding start as 8 bit binary data. -.PP -Different operating system interfaces or applications may generate -strings in other encodings such as Shift\-JIS. The \fBencoding\fR -command helps to bridge the gap between Unicode and these other -formats. +In Tcl every string is composed of Unicode values. Text may be encoded into an +encoding such as cp1252, iso8859-1, Shitf\-JIS, utf-8, utf-16, etc. Not every +Unicode vealue is encodable in every encoding, and some encodings can encode +values that are not available in Unicode. +.PP +Even though Unicode is for encoding the written texts of human languages, any +sequence of bytes can be encoded as the first 255 Unicode values. iso8859-1 an +encoding for a subset of Unicode in which each byte is a Unicode value of 255 +or less. Thus, any sequence of bytes can be considered to be a Unicode string +encoded in iso8859-1. To work with binary data in Tcl, decode it from +iso8859-1 when reading it in, and encode it into iso8859-1 when writing it out, +ensuring that each character in the string has a value of 255 or less. +Decoding such a string does nothing, and encoding encoding such a string also +does nothing. +.PP +For example, the following is true: +.CS +set text {In Tcl binary data is treated as Unicode text and it just works.} +set encoded [encoding convertto iso8859-1 $text] +expr {$text eq $encoded}; #-> 1 +.CE +The following is also true: +.CS +set decoded [encoding convertfrom iso8859-1 $text] +expr {$text eq $decoded}; #-> 1 +.CE .SH DESCRIPTION .PP -Performs one of several encoding related operations, depending on -\fIoption\fR. The legal \fIoption\fRs are: +Performs one of the following encoding \fIoperations\fR: .TP \fBencoding convertfrom\fR ?\fIencoding\fR? \fIdata\fR .TP \fBencoding convertfrom\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding\fR \fIdata\fR . -Converts \fIdata\fR, which should be in binary string encoded as per -\fIencoding\fR, to a Tcl string. If \fIencoding\fR is not specified, the current -system encoding is used. +Decodes \fIdata\fR encoded in \fIencoding\fR. If \fIencoding\fR is not +specified the current system encoding is used. .VS "TCL8.7 TIP607, TIP656" -The \fB-profile\fR option determines the command behavior in the presence -of conversion errors. See the \fBPROFILES\fR section below for details. Any premature -termination of processing due to errors is reported through an exception if -the \fB-failindex\fR option is not specified. - -If the \fB-failindex\fR is specified, instead of an exception being raised -on premature termination, the result of the conversion up to the point of the -error is returned as the result of the command. In addition, the index -of the source byte triggering the error is stored in \fBvar\fR. If no -errors are encountered, the entire result of the conversion is returned and -the value \fB-1\fR is stored in \fBvar\fR. +\fB-profile\fR determines how invalid data for the encoding are handled. See +the \fBPROFILES\fR section below for details. Returns an error if decoding +fails. However, if \fB-failindex\fR given, returns the result of the +conversion up to the point of termination, and stores in \fBvar\fR the index of +the character that could not be converted. If no errors are encountered the +entire result of the conversion is returned and the value \fB-1\fR is stored in +\fBvar\fR. .VE "TCL8.7 TIP607, TIP656" .TP \fBencoding convertto\fR ?\fIencoding\fR? \fIdata\fR .TP \fBencoding convertto\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding\fR \fIdata\fR . -Convert \fIstring\fR to the specified \fIencoding\fR. The result is a Tcl binary -string that contains the sequence of bytes representing the converted string in -the specified encoding. If \fIencoding\fR is not specified, the current system -encoding is used. +Converts \fIstring\fR to \fIencoding\fR. If \fIencoding\fR is not given, the +current system encoding is used. .VS "TCL8.7 TIP607, TIP656" -The \fB-profile\fR and \fB-failindex\fR options have the same effect as -described for the \fBencoding convertfrom\fR command. +See \fBencoding convertfrom\fR for the meaning of \fB-profile\fR and \fB-failindex\fR. .VE "TCL8.7 TIP607, TIP656" .TP \fBencoding dirs\fR ?\fIdirectoryList\fR? . -Tcl can load encoding data files from the file system that describe -additional encodings for it to work with. This command sets the search -path for \fB*.enc\fR encoding data files to the list of directories -\fIdirectoryList\fR. If \fIdirectoryList\fR is omitted then the -command returns the current list of directories that make up the -search path. It is an error for \fIdirectoryList\fR to not be a valid -list. If, when a search for an encoding data file is happening, an -element in \fIdirectoryList\fR does not refer to a readable, -searchable directory, that element is ignored. +Sets the search path for \fB*.enc\fR encoding data files to the list of +directories given by \fIdirectoryList\fR. If \fIdirectoryList\fR is not given, +returns the current list of directories that make up the search path. It is +not an error for an item in \fIdirectoryList\fR to not refer to a readable, +searchable directory. .TP \fBencoding names\fR . -Returns a list containing the names of all of the encodings that are -currently available. +Returns a list of the names of available encodings. The encodings .QW utf-8 and @@ -88,88 +91,58 @@ are guaranteed to be present in the list. .VS "TCL8.7 TIP656" .TP \fBencoding profiles\fR -Returns a list of the names of encoding profiles. See \fBPROFILES\fR below. +Returns a list of names of available encoding profiles. See \fBPROFILES\fR +below. .VE "TCL8.7 TIP656" .TP \fBencoding system\fR ?\fIencoding\fR? . -Set the system encoding to \fIencoding\fR. If \fIencoding\fR is -omitted then the command returns the current system encoding. The -system encoding is used whenever Tcl passes strings to system calls. +Sets the system encoding to \fIencoding\fR. If \fIencoding\fR is not given, +returns the current system encoding. The system encoding is used to pass +strings to system calls. .\" Do not put .VS on whole section as that messes up the bullet list alignment .SH PROFILES .PP .VS "TCL8.7 TIP656" -Operations involving encoding transforms may encounter several types of -errors such as invalid sequences in the source data, characters that -cannot be encoded in the target encoding and so on. -A \fIprofile\fR prescribes the strategy for dealing with such errors -in one of two ways: -.VE "TCL8.7 TIP656" -. -.IP \(bu -.VS "TCL8.7 TIP656" -Terminating further processing of the source data. The profile does not -determine how this premature termination is conveyed to the caller. By default, -this is signalled by raising an exception. If the \fB-failindex\fR option -is specified, errors are reported through that mechanism. -.VE "TCL8.7 TIP656" -.IP \(bu -.VS "TCL8.7 TIP656" -Continue further processing of the source data using a fallback strategy such -as replacing or discarding the offending bytes in a profile-defined manner. -.VE "TCL8.7 TIP656" +Each \fIprofile\fR is a distinct strategy for dealing with invalid data for an +encoding. .PP -The following profiles are currently implemented with \fBtcl8\fR being -the default if the \fB-profile\fR is not specified. +The following profiles are currently implemented. .VS "TCL8.7 TIP656" .TP \fBtcl8\fR . -The \fBtcl8\fR profile always follows the first strategy above and corresponds -to the behavior of encoding transforms in Tcl 8.6. When converting from an -external encoding \fBother than utf-8\fR to Tcl strings with the \fBencoding -convertfrom\fR command, invalid bytes are mapped to their numerically equivalent -code points. For example, the byte 0x80 which is invalid in ASCII would be -mapped to code point U+0080. When converting from \fButf-8\fR, invalid bytes -that are defined in CP1252 are mapped to their Unicode equivalents while those -that are not fall back to the numerical equivalents. For example, byte 0x80 is -defined by CP1252 and is therefore mapped to its Unicode equivalent U+20AC while -byte 0x81 which is not defined by CP1252 is mapped to U+0081. As an additional -special case, the sequence 0xC0 0x80 is mapped to U+0000. +The default profile. Provides for behaviour identical to that of Tcl 8.6: When +decoding, for encodings \fBother than utf-8\fR, each invalid byte is interpreted +as the Unicode value given by that one byte. For example, the byte 0x80, which +is invalid in the ASCII encoding would be mapped to the Unicode value U+0080. +For \fButf-8\fR, each invalid byte that is a valid CP1252 character is +interpreted as the Unicode value for that character, while each byte that is +not is treated as the Unicode value given by that one byte. For example, byte +0x80 is defined by CP1252 and is therefore mapped to its Unicode equivalent +U+20AC while byte 0x81 which is not defined by CP1252 is mapped to U+0081. As +an additional special case, the sequence 0xC0 0x80 is mapped to U+0000. -When converting from Tcl strings to an external encoding format using -\fBencoding convertto\fR, characters that cannot be represented in the -target encoding are replaced by an encoding-dependent character, usually -the question mark \fB?\fR. +When encoding, each character that cannot be represented in the encoding is +replaced by an encoding-dependent character, usually the question mark \fB?\fR. .TP \fBstrict\fR . -The \fBstrict\fR profile always stops processing when an conversion error is -encountered. The error is signalled via an exception or the \fB-failindex\fR -option mechanism. The \fBstrict\fR profile implements a Unicode standard -conformant behavior. +The operation fails when invalid data for the encoding are encountered. .TP \fBreplace\fR . -Like the \fBtcl8\fR profile, the \fBreplace\fR profile always continues -processing on conversion errors but follows a Unicode standard conformant -method for substitution of invalid source data. - -When converting an encoded byte sequence to a Tcl string using -\fBencoding convertfrom\fR, invalid bytes -are replaced by the U+FFFD REPLACEMENT CHARACTER code point. +When decoding, invalid bytes are replaced by U+FFFD, the Unicode REPLACEMENT +CHARACTER. -When encoding a Tcl string with \fBencoding convertto\fR, -code points that cannot be represented in the -target encoding are transformed to an encoding-specific fallback character, -U+FFFD REPLACEMENT CHARACTER for UTF targets and generally `?` for other -encodings. +When encoding, Unicode values that cannot be represented in the target encoding +are transformed to an encoding-specific fallback character, U+FFFD REPLACEMENT +CHARACTER for UTF targets, and generally `?` for other encodings. .VE "TCL8.7 TIP656" .SH EXAMPLES .PP -These examples use the utility proc below that prints the Unicode code points -comprising a Tcl string. +These examples use the utility proc below that prints the Unicode value for +each character in a string. .PP .CS proc codepoints s {join [lmap c [split $s {}] { @@ -177,14 +150,14 @@ proc codepoints s {join [lmap c [split $s {}] { } .CE .PP -Example 1: convert a byte sequence in Japanese euc-jp encoding to a TCL string: +Example 1: Convert from euc-jp: .PP .CS -% codepoints [\fBencoding convertfrom\fR euc-jp "\exA4\exCF"] +% codepoints [\fBencoding convertfrom\fR euc-jp \exA4\exCF] U+00306F .CE .PP -The result is the unicode codepoint +The result is the Unicode value .QW "\eu306F" , which is the Hiragana letter HA. .VS "TCL8.7 TIP607, TIP656" -- cgit v0.12 From ac324e9b0b92af99acbeed747c9aea9de4cc40f6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Mon, 27 Mar 2023 14:42:18 +0000 Subject: spacing --- tests/fileName.test | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/fileName.test b/tests/fileName.test index 09662ff..9c54edd 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1655,7 +1655,7 @@ apply [list {} { set interp [interp create] interp eval $interp { apply [list {} { - upvar 1 f f + upvar 1 f f # A unique name so that no internal representation of this # literal value has been picked up from any other script @@ -1687,9 +1687,6 @@ apply [list {} { } } -result 0 } [namespace current]] - - - # cleanup catch {file delete -force C:/globTest} -- cgit v0.12 From 7f39dac888fd3fa2493dfbb85b06080b1ac7487e Mon Sep 17 00:00:00 2001 From: dgp <dgp@users.sourceforge.net> Date: Mon, 27 Mar 2023 17:23:48 +0000 Subject: test hygiene cleaning up created files. --- tests/fileName.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/fileName.test b/tests/fileName.test index 9c54edd..ebdda11 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1650,6 +1650,8 @@ apply [list {} { } else { set memcheckcmd ::tcltests::scriptmemcheck } + } -cleanup { + removeFile script } -body { {*}$memcheckcmd { set interp [interp create] -- cgit v0.12 From bc060f980cb4e43d0aa03762c8a9cd6110faddbc Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 19:56:36 +0000 Subject: Remove unneeded parts from test in fileName.test. --- tests/fileName.test | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/fileName.test b/tests/fileName.test index ebdda11..d70c09c 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1640,8 +1640,6 @@ apply [list {} { valgrind, which is useful since Valgrind provides information about the error location, but [memory] doesn't. } -setup { - makeFile {puts "In script"} script - if {[namespace which ::memory] eq {}} { set memcheckcmd [list ::apply [list script { uplevel 1 $script @@ -1650,8 +1648,6 @@ apply [list {} { } else { set memcheckcmd ::tcltests::scriptmemcheck } - } -cleanup { - removeFile script } -body { {*}$memcheckcmd { set interp [interp create] -- cgit v0.12 From 0899e9d020ce6fc0c55b56e6787085ab97bca9ef Mon Sep 17 00:00:00 2001 From: pooryorick <com.digitalsmarties@pooryorick.com> Date: Mon, 27 Mar 2023 20:08:21 +0000 Subject: Remove unneeded parts from test in fileName.test. --- tests/fileName.test | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/fileName.test b/tests/fileName.test index b92d11b..9538978 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1620,8 +1620,6 @@ apply [list {} { valgrind, which is useful since Valgrind provides information about the error location, but [memory] doesn't. } -setup { - makeFile {puts "In script"} script - if {[namespace which ::memory] eq {}} { set memcheckcmd [list ::apply [list script { uplevel 1 $script -- cgit v0.12 From 91fa419271d52aee3aaa718839eca26fa168d494 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Mon, 27 Mar 2023 20:24:09 +0000 Subject: More text fixes --- generic/tclPosixStr.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index ad3c26d..c31ab81 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -182,7 +182,7 @@ Tcl_ErrnoId(void) #ifdef EISDIR case EISDIR: return "EISDIR"; #endif -#ifdef EISNAME +#ifdef EISNAM case EISNAM: return "EISNAM"; #endif #ifdef EL2HLT @@ -221,6 +221,9 @@ Tcl_ErrnoId(void) #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) case ELOOP: return "ELOOP"; #endif +#ifdef EMEDIUMTYPE + case EMEDIUMTYPE: return "EMEDIUMTYPE"; +#endif #ifdef EMFILE case EMFILE: return "EMFILE"; #endif @@ -413,6 +416,9 @@ Tcl_ErrnoId(void) #ifdef EREMOTERELEASE case EREMOTERELEASE: return "EREMOTERELEASE"; #endif +#ifdef ERESTART + case ERESTART: return "ERESTART"; +#endif #ifdef EROFS case EROFS: return "EROFS"; #endif @@ -653,8 +659,8 @@ Tcl_ErrnoMsg( #ifdef EISDIR case EISDIR: return "is a directory"; #endif -#ifdef EISNAME - case EISNAM: return "is a name file"; +#ifdef EISNAM + case EISNAM: return "is a named type file"; #endif #ifdef EL2HLT case EL2HLT: return "level 2 halted"; @@ -693,6 +699,9 @@ Tcl_ErrnoMsg( #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) case ELOOP: return "too many levels of symbolic links"; #endif +#ifdef EMEDIUMTYPE + case EMEDIUMTYPE: return "wrong medium type"; +#endif #ifdef EMFILE case EMFILE: return "too many open files"; #endif @@ -757,7 +766,7 @@ Tcl_ErrnoMsg( case ENOMEM: return "cannot allocate memory"; #endif #ifdef ENOMEDIUM - case ENOMEDIUM: return "no medium"; + case ENOMEDIUM: return "no medium found"; #endif #ifdef ENOMSG case ENOMSG: return "no message of desired type"; @@ -885,6 +894,9 @@ Tcl_ErrnoMsg( #ifdef EREMOTERELEASE case EREMOTERELEASE: return "remote peer released connection"; #endif +#ifdef ERESTART + case ERESTART: return "interrupted system call should be restarted"; +#endif #ifdef EROFS case EROFS: return "read-only file system"; #endif -- cgit v0.12 From 82098d2dca6d710372f2cc12757f9295971c837f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" <nijtmans@users.sourceforge.net> Date: Mon, 27 Mar 2023 20:56:28 +0000 Subject: Fix some typo's in POSIX error-messages, and add missing ones (ESTRPIPE, ERESTART, ENOSHARE, ENOMEDIUM, ENMFILE, EMEDIUMTYPE, EFTYPE, ECASECLASH) --- generic/tclPosixStr.c | 83 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index c817faa..6a30e0e 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -74,9 +74,6 @@ Tcl_ErrnoId(void) #ifdef EBADMSG case EBADMSG: return "EBADMSG"; #endif -#ifdef ECANCELED - case ECANCELED: return "ECANCELED"; -#endif #ifdef EBADR case EBADR: return "EBADR"; #endif @@ -95,6 +92,12 @@ Tcl_ErrnoId(void) #ifdef EBUSY case EBUSY: return "EBUSY"; #endif +#ifdef ECANCELED + case ECANCELED: return "ECANCELED"; +#endif +#ifdef ECASECLASH + case ECASECLASH: return "ECASECLASH"; +#endif #ifdef ECHILD case ECHILD: return "ECHILD"; #endif @@ -146,6 +149,9 @@ Tcl_ErrnoId(void) #ifdef EFBIG case EFBIG: return "EFBIG"; #endif +#ifdef EFTYPE + case EFTYPE: return "EFTYPE"; +#endif #ifdef EHOSTDOWN case EHOSTDOWN: return "EHOSTDOWN"; #endif @@ -179,12 +185,9 @@ Tcl_ErrnoId(void) #ifdef EISDIR case EISDIR: return "EISDIR"; #endif -#ifdef EISNAME +#ifdef EISNAM case EISNAM: return "EISNAM"; #endif -#ifdef ELBIN - case ELBIN: return "ELBIN"; -#endif #ifdef EL2HLT case EL2HLT: return "EL2HLT"; #endif @@ -197,6 +200,9 @@ Tcl_ErrnoId(void) #ifdef EL3RST case EL3RST: return "EL3RST"; #endif +#ifdef ELBIN + case ELBIN: return "ELBIN"; +#endif #ifdef ELIBACC case ELIBACC: return "ELIBACC"; #endif @@ -218,6 +224,9 @@ Tcl_ErrnoId(void) #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) case ELOOP: return "ELOOP"; #endif +#ifdef EMEDIUMTYPE + case EMEDIUMTYPE: return "EMEDIUMTYPE"; +#endif #ifdef EMFILE case EMFILE: return "EMFILE"; #endif @@ -251,6 +260,9 @@ Tcl_ErrnoId(void) #ifdef ENFILE case ENFILE: return "ENFILE"; #endif +#ifdef ENMFILE + case ENMFILE: return "ENMFILE"; +#endif #ifdef ENOANO case ENOANO: return "ENOANO"; #endif @@ -281,6 +293,9 @@ Tcl_ErrnoId(void) #ifdef ENOMEM case ENOMEM: return "ENOMEM"; #endif +#ifdef ENOMEDIUM + case ENOMEDIUM: return "ENOMEDIUM"; +#endif #ifdef ENOMSG case ENOMSG: return "ENOMSG"; #endif @@ -293,6 +308,9 @@ Tcl_ErrnoId(void) #ifdef ENOPROTOOPT case ENOPROTOOPT: return "ENOPROTOOPT"; #endif +#ifdef ENOSHARE + case ENOSHARE: return "ENOSHARE"; +#endif #ifdef ENOSPC case ENOSPC: return "ENOSPC"; #endif @@ -404,6 +422,9 @@ Tcl_ErrnoId(void) #ifdef EREMOTERELEASE case EREMOTERELEASE: return "EREMOTERELEASE"; #endif +#ifdef ERESTART + case ERESTART: return "ERESTART"; +#endif #ifdef EROFS case EROFS: return "EROFS"; #endif @@ -536,9 +557,6 @@ Tcl_ErrnoMsg( #ifdef EBADMSG case EBADMSG: return "not a data message"; #endif -#ifdef ECANCELED - case ECANCELED: return "operation canceled"; -#endif #ifdef EBADR case EBADR: return "bad request descriptor"; #endif @@ -557,6 +575,12 @@ Tcl_ErrnoMsg( #ifdef EBUSY case EBUSY: return "file busy"; #endif +#ifdef ECANCELED + case ECANCELED: return "operation canceled"; +#endif +#ifdef ECASECLASH + case ECASECLASH: return "filename exists with different case"; +#endif #ifdef ECHILD case ECHILD: return "no children"; #endif @@ -608,6 +632,9 @@ Tcl_ErrnoMsg( #ifdef EFBIG case EFBIG: return "file too large"; #endif +#ifdef EFTYPE + case EFTYPE: return "inappropriate file type or format"; +#endif #ifdef EHOSTDOWN case EHOSTDOWN: return "host is down"; #endif @@ -641,12 +668,9 @@ Tcl_ErrnoMsg( #ifdef EISDIR case EISDIR: return "illegal operation on a directory"; #endif -#ifdef EISNAME +#ifdef EISNAM case EISNAM: return "is a name file"; #endif -#ifdef ELBIN - case ELBIN: return "ELBIN"; -#endif #ifdef EL2HLT case EL2HLT: return "level 2 halted"; #endif @@ -659,6 +683,9 @@ Tcl_ErrnoMsg( #ifdef EL3RST case EL3RST: return "level 3 reset"; #endif +#ifdef ELBIN + case ELBIN: return "inode is remote"; +#endif #ifdef ELIBACC case ELIBACC: return "cannot access a needed shared library"; #endif @@ -681,6 +708,9 @@ Tcl_ErrnoMsg( #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) case ELOOP: return "too many levels of symbolic links"; #endif +#ifdef EMEDIUMTYPE + case EMEDIUMTYPE: return "wrong medium type"; +#endif #ifdef EMFILE case EMFILE: return "too many open files"; #endif @@ -714,6 +744,9 @@ Tcl_ErrnoMsg( #ifdef ENFILE case ENFILE: return "file table overflow"; #endif +#ifdef ENMFILE + case ENMFILE: return "no more files"; +#endif #ifdef ENOANO case ENOANO: return "anode table overflow"; #endif @@ -744,6 +777,9 @@ Tcl_ErrnoMsg( #ifdef ENOMEM case ENOMEM: return "not enough memory"; #endif +#ifdef ENOMEDIUM + case ENOMEDIUM: return "no medium found"; +#endif #ifdef ENOMSG case ENOMSG: return "no message of desired type"; #endif @@ -756,6 +792,9 @@ Tcl_ErrnoMsg( #ifdef ENOPROTOOPT case ENOPROTOOPT: return "bad protocol option"; #endif +#ifdef ENOSHARE + case ENOSHARE: return "no such host or network path"; +#endif #ifdef ENOSPC case ENOSPC: return "no space left on device"; #endif @@ -777,9 +816,6 @@ Tcl_ErrnoMsg( #ifdef ENOTCONN case ENOTCONN: return "socket is not connected"; #endif -#ifdef ENOTRECOVERABLE - case ENOTRECOVERABLE: return "state not recoverable"; -#endif #ifdef ENOTDIR case ENOTDIR: return "not a directory"; #endif @@ -789,6 +825,9 @@ Tcl_ErrnoMsg( #ifdef ENOTNAM case ENOTNAM: return "not a name file"; #endif +#ifdef ENOTRECOVERABLE + case ENOTRECOVERABLE: return "state not recoverable"; +#endif #ifdef ENOTSOCK case ENOTSOCK: return "socket operation on non-socket"; #endif @@ -850,7 +889,7 @@ Tcl_ErrnoMsg( case ERANGE: return "math result unrepresentable"; #endif #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) - case EREFUSED: return "EREFUSED"; + case EREFUSED: return "connection refused"; #endif #ifdef EREMCHG case EREMCHG: return "remote address changed"; @@ -865,7 +904,10 @@ Tcl_ErrnoMsg( case EREMOTEIO: return "remote i/o error"; #endif #ifdef EREMOTERELEASE - case EREMOTERELEASE: return "EREMOTERELEASE"; + case EREMOTERELEASE: return "remote peer released connection"; +#endif +#ifdef ERESTART + case ERESTART: return "interrupted system call should be restarted"; #endif #ifdef EROFS case EROFS: return "read-only file system"; @@ -894,6 +936,9 @@ Tcl_ErrnoMsg( #ifdef ESTALE case ESTALE: return "stale remote file handle"; #endif +#ifdef ESTRPIPE + case ESTRPIPE: return "streams pipe error"; +#endif #ifdef ESUCCESS case ESUCCESS: return "Error 0"; #endif -- cgit v0.12 From 2616ef0ef16085f9c15283dfb56c9ccfd3f2da5d Mon Sep 17 00:00:00 2001 From: apnadkarni <apnmbx-wits@yahoo.com> Date: Tue, 28 Mar 2023 04:47:00 +0000 Subject: Fix irritating gcc warning for minizip --- compat/zlib/contrib/minizip/minizip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/zlib/contrib/minizip/minizip.c b/compat/zlib/contrib/minizip/minizip.c index e03e2b1..be1774f 100644 --- a/compat/zlib/contrib/minizip/minizip.c +++ b/compat/zlib/contrib/minizip/minizip.c @@ -365,7 +365,7 @@ void addFileToZip(zipFile zf, const char *filenameinzip, const char *password, i void addPathToZip(zipFile zf, const char *filenameinzip, const char *password, int opt_exclude_path,int opt_compress_level) { tinydir_dir dir; int i; - char newname[512]; + char newname[MAXFILENAME+1+MAXFILENAME+1]; tinydir_open_sorted(&dir, filenameinzip); @@ -375,7 +375,7 @@ void addPathToZip(zipFile zf, const char *filenameinzip, const char *password, i tinydir_readfile_n(&dir, &file, i); if(strcmp(file.name,".")==0) continue; if(strcmp(file.name,"..")==0) continue; - sprintf(newname,"%s/%s",dir.path,file.name); + sprintf(newname,"%.*s/%.*s", MAXFILENAME, dir.path, MAXFILENAME, file.name); if (file.is_dir) { addPathToZip(zf,newname,password,opt_exclude_path,opt_compress_level); -- cgit v0.12